From 42f3e473961c99ab9d8e256bf090dc899c0edfec Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 2 Feb 2025 14:11:07 +0000 Subject: [PATCH] Release version 5.2.0 to PRD --- assets/chakra-BF_mGyXb.js | 16 + assets/chakra-legacy-CS5U_L30.js | 280 ++++++++++++++++++ assets/chakra-legacy-DsJcG_7N.js | 280 ------------------ assets/chakra-xNcrfRXW.js | 16 - assets/change-type-modal-BN8Wot4j.js | 1 - assets/change-type-modal-Cu7YVLn7.js | 1 + assets/change-type-modal-legacy-Bi8yFeWH.js | 1 - assets/change-type-modal-legacy-CZZrhFpb.js | 1 + ...oard-yBOl3IpM.js => clipboard-Bcs6EvZd.js} | 2 +- ...dlt6N0.js => clipboard-legacy-BTcL0Trl.js} | 2 +- assets/details-BjKL7_V5.js | 1 + assets/details-Dqiw1DIF.js | 1 - assets/details-legacy-BmTVwGJQ.js | 1 + assets/details-legacy-C-XI805-.js | 1 - assets/index-BiHghyID.js | 10 - assets/index-CsgTWcmq.js | 2 + assets/index-legacy-CKg3D7KT.js | 10 - assets/index-legacy-CP4zwhgZ.js | 1 + assets/master-manager-BoebmmSV.js | 1 - assets/master-manager-DW7JCfNm.js | 1 + assets/master-manager-legacy-CZVSbF6t.js | 1 + assets/master-manager-legacy-DmddqoRb.js | 1 - ...des-3nt-Fm8T.js => misc-nodes-DWMfnp13.js} | 2 +- assets/misc-nodes-legacy-ClIinVYX.js | 1 - assets/misc-nodes-legacy-DROXA9Yl.js | 1 + ...er-BpUv6R7o.js => page-header-DH4nmP-r.js} | 4 +- assets/page-header-legacy-D9UDrK14.js | 9 - assets/page-header-legacy-DbtpRsfW.js | 9 + assets/polyfills-BFlSQA7b.js | 1 + assets/polyfills-BlSDjWs4.js | 1 - assets/polyfills-legacy-D_wvdNzk.js | 4 - assets/polyfills-legacy-DpJM1XSI.js | 4 + assets/react-0YWW4C_I.js | 33 +++ assets/react-D-_si4LB.js | 33 --- assets/react-legacy-CczY7eHI.js | 10 + assets/react-legacy-S3BmMPiz.js | 20 -- ...Ws.js => rmg-palette-app-clip-D4KwJcU-.js} | 2 +- ...> rmg-palette-app-clip-legacy-CI8NAU9x.js} | 2 +- ...er-Xiw4OObF.js => svg-wrapper-DsHbu_ep.js} | 2 +- assets/svg-wrapper-legacy-CiPXEZA7.js | 1 + assets/svg-wrapper-legacy-Cp6skDP9.js | 1 - assets/tools-D91kC9Kf.js | 1 + assets/tools-DZ01x_ln.js | 1 - assets/tools-legacy-DgamdWyG.js | 1 + assets/tools-legacy-vh8FZzIz.js | 1 - assets/tutorial-47WRWsqk.js | 1 + assets/tutorial-B9Su1GrM.js | 1 - assets/tutorial-legacy-DHxnaVOs.js | 1 - assets/tutorial-legacy-vF7BXoa9.js | 1 + index.html | 33 +-- info.json | 2 +- 51 files changed, 383 insertions(+), 431 deletions(-) create mode 100644 assets/chakra-BF_mGyXb.js create mode 100644 assets/chakra-legacy-CS5U_L30.js delete mode 100644 assets/chakra-legacy-DsJcG_7N.js delete mode 100644 assets/chakra-xNcrfRXW.js delete mode 100644 assets/change-type-modal-BN8Wot4j.js create mode 100644 assets/change-type-modal-Cu7YVLn7.js delete mode 100644 assets/change-type-modal-legacy-Bi8yFeWH.js create mode 100644 assets/change-type-modal-legacy-CZZrhFpb.js rename assets/{clipboard-yBOl3IpM.js => clipboard-Bcs6EvZd.js} (83%) rename assets/{clipboard-legacy-Dddlt6N0.js => clipboard-legacy-BTcL0Trl.js} (90%) create mode 100644 assets/details-BjKL7_V5.js delete mode 100644 assets/details-Dqiw1DIF.js create mode 100644 assets/details-legacy-BmTVwGJQ.js delete mode 100644 assets/details-legacy-C-XI805-.js delete mode 100644 assets/index-BiHghyID.js create mode 100644 assets/index-CsgTWcmq.js delete mode 100644 assets/index-legacy-CKg3D7KT.js create mode 100644 assets/index-legacy-CP4zwhgZ.js delete mode 100644 assets/master-manager-BoebmmSV.js create mode 100644 assets/master-manager-DW7JCfNm.js create mode 100644 assets/master-manager-legacy-CZVSbF6t.js delete mode 100644 assets/master-manager-legacy-DmddqoRb.js rename assets/{misc-nodes-3nt-Fm8T.js => misc-nodes-DWMfnp13.js} (99%) delete mode 100644 assets/misc-nodes-legacy-ClIinVYX.js create mode 100644 assets/misc-nodes-legacy-DROXA9Yl.js rename assets/{page-header-BpUv6R7o.js => page-header-DH4nmP-r.js} (71%) delete mode 100644 assets/page-header-legacy-D9UDrK14.js create mode 100644 assets/page-header-legacy-DbtpRsfW.js create mode 100644 assets/polyfills-BFlSQA7b.js delete mode 100644 assets/polyfills-BlSDjWs4.js delete mode 100644 assets/polyfills-legacy-D_wvdNzk.js create mode 100644 assets/polyfills-legacy-DpJM1XSI.js create mode 100644 assets/react-0YWW4C_I.js delete mode 100644 assets/react-D-_si4LB.js create mode 100644 assets/react-legacy-CczY7eHI.js delete mode 100644 assets/react-legacy-S3BmMPiz.js rename assets/{rmg-palette-app-clip-BKLlM3Ws.js => rmg-palette-app-clip-D4KwJcU-.js} (81%) rename assets/{rmg-palette-app-clip-legacy-DxtS-LUQ.js => rmg-palette-app-clip-legacy-CI8NAU9x.js} (83%) rename assets/{svg-wrapper-Xiw4OObF.js => svg-wrapper-DsHbu_ep.js} (93%) create mode 100644 assets/svg-wrapper-legacy-CiPXEZA7.js delete mode 100644 assets/svg-wrapper-legacy-Cp6skDP9.js create mode 100644 assets/tools-D91kC9Kf.js delete mode 100644 assets/tools-DZ01x_ln.js create mode 100644 assets/tools-legacy-DgamdWyG.js delete mode 100644 assets/tools-legacy-vh8FZzIz.js create mode 100644 assets/tutorial-47WRWsqk.js delete mode 100644 assets/tutorial-B9Su1GrM.js delete mode 100644 assets/tutorial-legacy-DHxnaVOs.js create mode 100644 assets/tutorial-legacy-vF7BXoa9.js diff --git a/assets/chakra-BF_mGyXb.js b/assets/chakra-BF_mGyXb.js new file mode 100644 index 00000000..ed79cb2c --- /dev/null +++ b/assets/chakra-BF_mGyXb.js @@ -0,0 +1,16 @@ +var $u=Object.freeze,iv=Object.defineProperty;var ca=(e,t)=>$u(iv(e,"raw",{value:$u(t||e.slice())}));import{r as av,a as f,c as xs,g as Vh,R as Ru,b as et,d as Wh}from"./react-0YWW4C_I.js";var la={exports:{}},oo={};/** + * @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 Mu;function cv(){if(Mu)return oo;Mu=1;var e=av(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(a,c,l){var u,d={},h=null,p=null;l!==void 0&&(h=""+l),c.key!==void 0&&(h=""+c.key),c.ref!==void 0&&(p=c.ref);for(u in c)r.call(c,u)&&!s.hasOwnProperty(u)&&(d[u]=c[u]);if(a&&a.defaultProps)for(u in c=a.defaultProps,c)d[u]===void 0&&(d[u]=c[u]);return{$$typeof:t,type:a,key:h,ref:p,props:d,_owner:o.current}}return oo.Fragment=n,oo.jsx=i,oo.jsxs=i,oo}var Ou;function lv(){return Ou||(Ou=1,la.exports=cv()),la.exports}var v=lv();function uv(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ki(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function dv(){return!!(globalThis!=null&&globalThis.document)}function Hh(e){return e.parentElement&&Hh(e.parentElement)?!0:e.hidden}function fv(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function hv(e){return!!e.getAttribute("disabled")||!!e.getAttribute("aria-disabled")}function pv(e){var t,n;return(n=(t=Uh(e))==null?void 0:t.defaultView)!=null?n:window}function Uh(e){return ki(e)?e.ownerDocument:document}function mv(e){var t;return(t=e.view)!=null?t:window}function gv(e){return Uh(e).activeElement}function bv(e){const t=mv(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function Gh(e){return!!e.touches}function yv(e){return Gh(e)&&e.touches.length>1}function vv(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n["".concat(t,"X")],y:n["".concat(t,"Y")]}}function xv(e,t="page"){return{x:e["".concat(t,"X")],y:e["".concat(t,"Y")]}}function qh(e,t="page"){return Gh(e)?vv(e,t):xv(e,t)}function Sv(e){return t=>{const n=bv(t);(!n||n&&t.button===0)&&e(t)}}function wv(e,t=!1){function n(o){e(o,{point:qh(o)})}return t?Sv(n):n}function Ls(e,t,n,r){return uv(e,t,wv(n,t==="pointerdown"),r)}function kv(e,...t){if(e==null)throw new TypeError("Cannot convert undefined or null to object");const n={...e};for(const r of t)if(r!=null)for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&(o in n&&delete n[o],n[o]=r[o]);return n}const ae=e=>e?"":void 0,cn=e=>e?!0:void 0;function ac(e){return Array.isArray(e)}function ct(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!ac(e)}function Cv(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function Pv(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function cc(e){if(e==null)return e;const{unitless:t}=Pv(e);return t||typeof e=="number"?"".concat(e,"px"):e}const Kh=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,el=e=>Object.fromEntries(Object.entries(e).sort(Kh));function Fu(e){const t=el(e);return Object.assign(Object.values(t),t)}function Tv(e){const t=Object.keys(el(e));return new Set(t)}function Du(e){var n;if(!e)return e;e=(n=cc(e))!=null?n:e;const t=-.02;return typeof e=="number"?"".concat(e+t):e.replace(/(\d+\.?\d*)/u,r=>"".concat(parseFloat(r)+t))}function po(e,t){const n=["@media screen"];return e&&n.push("and","(min-width: ".concat(cc(e),")")),t&&n.push("and","(max-width: ".concat(cc(t),")")),n.join(" ")}function _v(e){var s;if(!e)return null;e.base=(s=e.base)!=null?s:"0px";const t=Fu(e),n=Object.entries(e).sort(Kh).map(([i,a],c,l)=>{var d;let[,u]=(d=l[c+1])!=null?d:[];return u=parseFloat(u)>0?Du(u):void 0,{_minW:Du(a),breakpoint:i,minW:a,maxW:u,maxWQuery:po(null,u),minWQuery:po(a),minMaxQuery:po(a,u)}}),r=Tv(e),o=Array.from(r.values());return{keys:r,normalized:t,isResponsive(i){const a=Object.keys(i);return a.length>0&&a.every(c=>r.has(c))},asObject:el(e),asArray:Fu(e),details:n,get(i){return n.find(a=>a.breakpoint===i)},media:[null,...t.map(i=>po(i)).slice(1)],toArrayValue(i){if(!ct(i))throw new Error("toArrayValue: value must be an object");const a=o.map(c=>{var l;return(l=i[c])!=null?l:null});for(;Cv(a)===null;)a.pop();return a},toObjectValue(i){if(!Array.isArray(i))throw new Error("toObjectValue: value must be an array");return i.reduce((a,c,l)=>{const u=o[l];return u!=null&&c!=null&&(a[u]=c),a},{})}}}function tl(...e){return function(...n){e.forEach(r=>r==null?void 0:r(...n))}}function Q(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function nl(e){return f.Children.toArray(e).filter(t=>f.isValidElement(t))}function Jo(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Av(e,t){return"".concat(e," returned `undefined`. Seems you forgot to wrap component within ").concat(t)}function Ee(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:s,defaultValue:i}=e,a=f.createContext(i);a.displayName=t;function c(){var u;const l=f.useContext(a);if(!l&&n){const d=new Error(s!=null?s:Av(r,o));throw d.name="ContextError",(u=Error.captureStackTrace)==null||u.call(Error,d,c),d}return l}return[a.Provider,c,a]}const W=(...e)=>e.filter(Boolean).join(" "),Xh=e=>e.hasAttribute("tabindex"),Ev=e=>Xh(e)&&e.tabIndex===-1;function ii(e){if(!ki(e)||Hh(e)||hv(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():fv(e)?!0:Xh(e)}function Iv(e){return e?ki(e)&&ii(e)&&!Ev(e):!1}const $v=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],Rv=$v.join(),Mv=e=>e.offsetWidth>0&&e.offsetHeight>0;function Yh(e){const t=Array.from(e.querySelectorAll(Rv));return t.unshift(e),t.filter(n=>ii(n)&&Mv(n))}function Ov(e,t,n,r){const o=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,o,s,i)=>{if(typeof r>"u")return e(r,o,s);t.has(r)||t.set(r,new Map);const a=t.get(r);if(a.has(o))return a.get(o);const c=e(r,o,s,i);return a.set(o,c),c}},Zh=Fv(Ov),Dv=e=>e.default||e;function Jh(e){const{wasSelected:t,enabled:n,isSelected:r,mode:o="unmount"}=e;return!!(!n||r||o==="keepMounted"&&t)}function Nv(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function rl(e,t){let n=Nv(e);const r=10**(t!=null?t:10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function lc(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function Nu(e,t,n){return(e-t)*100/(n-t)}function jv(e,t,n){return(n-t)*e+t}function ju(e,t,n){const r=Math.round((e-t)/n)*n+t,o=lc(n);return rl(r,o)}function zs(e,t,n){return e==null?e:(nn===null?null:t(n)):ct(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}const Lv=e=>typeof e=="function";function ht(e,...t){return Lv(e)?e(...t):e}function zv(e){const t=e.ownerDocument.defaultView||window,{overflow:n,overflowX:r,overflowY:o}=t.getComputedStyle(e);return/auto|scroll|overlay|hidden/.test(n+o+r)}function Vv(e){return e.localName==="html"?e:e.assignedSlot||e.parentElement||e.ownerDocument.documentElement}function ep(e){return["html","body","#document"].includes(e.localName)?e.ownerDocument.body:ki(e)&&zv(e)?e:ep(Vv(e))}function Wv(e,t){const n={},r={};for(const[o,s]of Object.entries(e))t.includes(o)?n[o]=s:r[o]=s;return[n,r]}function Hv(e,...t){const n=Object.getOwnPropertyDescriptors(e),r=Object.keys(n),o=i=>{const a={};for(let c=0;co(Array.isArray(i)?i:r.filter(i));return t.map(s).concat(o(r))}function Bu(e,t,n={}){const{stop:r,getKey:o}=n;function s(i,a=[]){var c;if(ct(i)||Array.isArray(i)){const l={};for(const[u,d]of Object.entries(i)){const h=(c=o==null?void 0:o(u))!=null?c:u,p=[...a,h];if(r!=null&&r(i,p))return t(i,a);l[h]=s(d,p)}return l}return t(i,a)}return s(e)}const Qo=e=>{const{condition:t,message:n}=e};var mo={exports:{}};mo.exports;var Lu;function Uv(){return Lu||(Lu=1,function(e,t){var n=200,r="__lodash_hash_undefined__",o=800,s=16,i=9007199254740991,a="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",h="[object Error]",p="[object Function]",m="[object GeneratorFunction]",g="[object Map]",b="[object Number]",w="[object Null]",y="[object Object]",x="[object Proxy]",P="[object RegExp]",k="[object Set]",A="[object String]",T="[object Undefined]",E="[object WeakMap]",I="[object ArrayBuffer]",R="[object DataView]",M="[object Float32Array]",H="[object Float64Array]",K="[object Int8Array]",V="[object Int16Array]",Y="[object Int32Array]",Z="[object Uint8Array]",F="[object Uint8ClampedArray]",j="[object Uint16Array]",U="[object Uint32Array]",Se=/[\\^$.*+?()[\]{}|]/g,re=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,L={};L[M]=L[H]=L[K]=L[V]=L[Y]=L[Z]=L[F]=L[j]=L[U]=!0,L[a]=L[c]=L[I]=L[u]=L[R]=L[d]=L[h]=L[p]=L[g]=L[b]=L[y]=L[P]=L[k]=L[A]=L[E]=!1;var z=typeof xs=="object"&&xs&&xs.Object===Object&&xs,J=typeof self=="object"&&self&&self.Object===Object&&self,se=z||J||Function("return this")(),ve=t&&!t.nodeType&&t,pe=ve&&!0&&e&&!e.nodeType&&e,Me=pe&&pe.exports===ve,Oe=Me&&z.process,ce=function(){try{var S=pe&&pe.require&&pe.require("util").types;return S||Oe&&Oe.binding&&Oe.binding("util")}catch(_){}}(),ie=ce&&ce.isTypedArray;function le(S,_,$){switch($.length){case 0:return S.call(_);case 1:return S.call(_,$[0]);case 2:return S.call(_,$[0],$[1]);case 3:return S.call(_,$[0],$[1],$[2])}return S.apply(_,$)}function me(S,_){for(var $=-1,q=Array(S);++$-1}function gy(S,_){var $=this.__data__,q=gs($,S);return q<0?(++this.size,$.push([S,_])):$[q][1]=_,this}en.prototype.clear=fy,en.prototype.delete=hy,en.prototype.get=py,en.prototype.has=my,en.prototype.set=gy;function lr(S){var _=-1,$=S==null?0:S.length;for(this.clear();++_<$;){var q=S[_];this.set(q[0],q[1])}}function by(){this.size=0,this.__data__={hash:new Dn,map:new(to||en),string:new Dn}}function yy(S){var _=ys(this,S).delete(S);return this.size-=_?1:0,_}function vy(S){return ys(this,S).get(S)}function xy(S){return ys(this,S).has(S)}function Sy(S,_){var $=ys(this,S),q=$.size;return $.set(S,_),this.size+=$.size==q?0:1,this}lr.prototype.clear=by,lr.prototype.delete=yy,lr.prototype.get=vy,lr.prototype.has=xy,lr.prototype.set=Sy;function ur(S){var _=this.__data__=new en(S);this.size=_.size}function wy(){this.__data__=new en,this.size=0}function ky(S){var _=this.__data__,$=_.delete(S);return this.size=_.size,$}function Cy(S){return this.__data__.get(S)}function Py(S){return this.__data__.has(S)}function Ty(S,_){var $=this.__data__;if($ instanceof en){var q=$.__data__;if(!to||q.length1?$[ye-1]:void 0,Be=ye>2?$[2]:void 0;for($e=S.length>3&&typeof $e=="function"?(ye--,$e):void 0,Be&&Uy($[0],$[1],Be)&&($e=ye<3?void 0:$e,ye=1),_=Object(_);++q-1&&S%1==0&&S<_}function Uy(S,_,$){if(!Nn($))return!1;var q=typeof _;return(q=="number"?oa($)&&ku(_,$.length):q=="string"&&_ in $)?vs($[_],S):!1}function Gy(S){var _=typeof S;return _=="string"||_=="number"||_=="symbol"||_=="boolean"?S!=="__proto__":S===null}function qy(S){return!!yt&&yt in S}function Cu(S){var _=S&&S.constructor,$=typeof _=="function"&&_.prototype||fe;return S===$}function Ky(S){var _=[];if(S!=null)for(var $ in Object(S))_.push($);return _}function Xy(S){return Qt.call(S)}function Yy(S,_,$){return _=cr(_===void 0?S.length-1:_,0),function(){for(var q=arguments,ye=-1,$e=cr(q.length-_,0),Be=Array($e);++ye<$e;)Be[ye]=q[_+ye];ye=-1;for(var we=Array(_+1);++ye<_;)we[ye]=q[ye];return we[_]=$(Be),le(S,this,we)}}function ta(S,_){if(!(_==="constructor"&&typeof S[_]=="function")&&_!="__proto__")return S[_]}var Zy=Jy(Fy);function Jy(S){var _=0,$=0;return function(){var q=Fn(),ye=s-(q-$);if($=q,ye>0){if(++_>=o)return arguments[0]}else _=0;return S.apply(void 0,arguments)}}function Qy(S){if(S!=null){try{return Ye.call(S)}catch(_){}try{return S+""}catch(_){}}return""}function vs(S,_){return S===_||S!==S&&_!==_}var na=Su(function(){return arguments}())?Su:function(S){return no(S)&&Qe.call(S,"callee")&&!st.call(S,"callee")},ra=Array.isArray;function oa(S){return S!=null&&Tu(S.length)&&!sa(S)}function ev(S){return no(S)&&oa(S)}var Pu=Zi||sv;function sa(S){if(!Nn(S))return!1;var _=bs(S);return _==p||_==m||_==l||_==x}function Tu(S){return typeof S=="number"&&S>-1&&S%1==0&&S<=i}function Nn(S){var _=typeof S;return S!=null&&(_=="object"||_=="function")}function no(S){return S!=null&&typeof S=="object"}function tv(S){if(!no(S)||bs(S)!=y)return!1;var _=B(S);if(_===null)return!0;var $=Qe.call(_,"constructor")&&_.constructor;return typeof $=="function"&&$ instanceof $&&Ye.call($)==yn}var _u=ie?ee(ie):$y;function nv(S){return Ly(S,Au(S))}function Au(S){return oa(S)?_y(S):Ry(S)}var rv=zy(function(S,_,$,q){wu(S,_,$,q)});function ov(S){return function(){return S}}function Eu(S){return S}function sv(){return!1}e.exports=rv}(mo,mo.exports)),mo.exports}var Gv=Uv();const Et=Vh(Gv);function He(e,t=[]){const n=f.useRef(e);return f.useEffect(()=>{n.current=e}),f.useCallback((...r)=>{var o;return(o=n.current)==null?void 0:o.call(n,...r)},t)}function Un(e,t,n,r){const o=He(n);return f.useEffect(()=>{const s=typeof e=="function"?e():e!=null?e:document;if(!(!n||!s))return s.addEventListener(t,o,r),()=>{s.removeEventListener(t,o,r)}},[t,e,r,o,n]),()=>{const s=typeof e=="function"?e():e!=null?e:document;s==null||s.removeEventListener(t,o,r)}}function tp(e){const{isOpen:t,ref:n}=e,[r,o]=f.useState(t),[s,i]=f.useState(!1);return f.useEffect(()=>{s||(o(t),i(!0))},[t,s,r]),Un(()=>n.current,"animationend",()=>{o(t)}),{present:!(t?!1:!r),onComplete(){var u;const c=pv(n.current),l=new c.CustomEvent("animationend",{bubbles:!0});(u=n.current)==null||u.dispatchEvent(l)}}}function np(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:o=(h,p)=>h!==p}=e,s=He(r),i=He(o),[a,c]=f.useState(n),l=t!==void 0,u=l?t:a,d=He(h=>{const m=typeof h=="function"?h(u):h;i(u,m)&&(l||c(m),s(m))},[l,s,u,i]);return[u,d]}function qv(e={}){const{onChange:t,precision:n,defaultValue:r,value:o,step:s=1,min:i=Number.MIN_SAFE_INTEGER,max:a=Number.MAX_SAFE_INTEGER,keepWithinRange:c=!0}=e,l=He(t),[u,d]=f.useState(()=>{var R;return r==null?"":(R=ua(r,s,n))!=null?R:""}),h=typeof o<"u",p=h?o:u,m=rp(Cn(p),s),g=n!=null?n:m,b=f.useCallback(R=>{R!==p&&(h||d(R.toString()),l==null||l(R.toString(),Cn(R)))},[l,h,p]),w=f.useCallback(R=>{let M=R;return c&&(M=zs(M,i,a)),rl(M,g)},[g,c,a,i]),y=f.useCallback((R=s)=>{let M;p===""?M=Cn(R):M=Cn(p)+R,M=w(M),b(M)},[w,s,b,p]),x=f.useCallback((R=s)=>{let M;p===""?M=Cn(-R):M=Cn(p)-R,M=w(M),b(M)},[w,s,b,p]),P=f.useCallback(()=>{var M;let R;r==null?R="":R=(M=ua(r,s,n))!=null?M:i,b(R)},[r,n,s,b,i]),k=f.useCallback(R=>{var H;const M=(H=ua(R,s,g))!=null?H:i;b(M)},[g,s,b,i]),A=Cn(p);return{isOutOfRange:A>a||A{u||c(!1),i==null||i()},[u,i]),m=f.useCallback(()=>{u||c(!0),s==null||s()},[u,s]),g=f.useCallback(()=>{l?p():m()},[l,m,p]);function b(y={}){return{...y,"aria-expanded":l,"aria-controls":h,onClick(x){var P;(P=y.onClick)==null||P.call(y,x),g()}}}function w(y={}){return{...y,hidden:!l,id:h}}return{isOpen:l,onOpen:m,onClose:p,onToggle:g,isControlled:u,getButtonProps:b,getDisclosureProps:w}}const ln=globalThis!=null&&globalThis.document?f.useLayoutEffect:f.useEffect,pn=(e,t)=>{const n=f.useRef(!1),r=f.useRef(!1);f.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),f.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Kv(e){const t=e.current;if(!t)return!1;const n=gv(t);return!n||t.contains(n)?!1:!!Iv(n)}function op(e,t){const{shouldFocus:n,visible:r,focusRef:o}=t,s=n&&!r;pn(()=>{if(!s||Kv(e))return;const i=(o==null?void 0:o.current)||e.current;let a;if(i)return a=requestAnimationFrame(()=>{i.focus({preventScroll:!0})}),()=>{cancelAnimationFrame(a)}},[s,e,o])}const Xv={preventScroll:!0,shouldFocus:!1};function Yv(e,t=Xv){const{focusRef:n,preventScroll:r,shouldFocus:o,visible:s}=t,i=Zv(e)?e.current:e,a=o&&s,c=f.useRef(a),l=f.useRef(s);ln(()=>{!l.current&&s&&(c.current=a),l.current=s},[s,a]);const u=f.useCallback(()=>{if(!(!s||!i||!c.current)&&(c.current=!1,!i.contains(document.activeElement)))if(n!=null&&n.current)requestAnimationFrame(()=>{var d;(d=n.current)==null||d.focus({preventScroll:r})});else{const d=Yh(i);d.length>0&&requestAnimationFrame(()=>{d[0].focus({preventScroll:r})})}},[s,r,i,n]);pn(()=>{u()},[u]),Un(i,"transitionend",u)}function Zv(e){return"current"in e}function Jv(e){return"current"in e}const sp=()=>typeof window<"u";function Qv(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}const e0=e=>sp()&&e.test(navigator.vendor),t0=e=>sp()&&e.test(Qv()),n0=()=>t0(/mac|iphone|ipad|ipod/i),r0=()=>n0()&&e0(/apple/i);function o0(e){const{ref:t,elements:n,enabled:r}=e,o=()=>{var s,i;return(i=(s=t.current)==null?void 0:s.ownerDocument)!=null?i:document};Un(o,"pointerdown",s=>{var l,u,d;if(!r0()||!r)return;const i=(d=(u=(l=s.composedPath)==null?void 0:l.call(s))==null?void 0:u[0])!=null?d:s.target,c=(n!=null?n:[t]).some(h=>{const p=Jv(h)?h.current:h;return(p==null?void 0:p.contains(i))||p===i});o().activeElement!==i&&c&&(s.preventDefault(),i.focus())})}function s0(e,t){const n=f.useId();return f.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function i0(e,...t){const n=s0(e);return f.useMemo(()=>t.map(r=>"".concat(r,"-").concat(n)),[n,t])}function a0(e,t){const n=He(e);f.useEffect(()=>{let r=null;const o=()=>n();return t!==null&&(r=window.setInterval(o,t)),()=>{r&&window.clearInterval(r)}},[t,n])}function ip(e){const t=f.useRef(null);return t.current=e,t}function c0(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch(n){throw new Error("Cannot assign value '".concat(t,"' to ref '").concat(e,"'"))}}}function Re(...e){return t=>{e.forEach(n=>{c0(n,t)})}}function l0(...e){return f.useMemo(()=>Re(...e),e)}function ap(e){const{ref:t,handler:n,enabled:r=!0}=e,o=He(n),i=f.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;f.useEffect(()=>{if(!r)return;const a=d=>{da(d,t)&&(i.isPointerDown=!0)},c=d=>{if(i.ignoreEmulatedMouseEvents){i.ignoreEmulatedMouseEvents=!1;return}i.isPointerDown&&n&&da(d,t)&&(i.isPointerDown=!1,o(d))},l=d=>{i.ignoreEmulatedMouseEvents=!0,n&&i.isPointerDown&&da(d,t)&&(i.isPointerDown=!1,o(d))},u=cp(t.current);return u.addEventListener("mousedown",a,!0),u.addEventListener("mouseup",c,!0),u.addEventListener("touchstart",a,!0),u.addEventListener("touchend",l,!0),()=>{u.removeEventListener("mousedown",a,!0),u.removeEventListener("mouseup",c,!0),u.removeEventListener("touchstart",a,!0),u.removeEventListener("touchend",l,!0)}},[n,t,o,i,r])}function da(e,t){var r,o,s;const n=(o=(r=e.composedPath)==null?void 0:r.call(e)[0])!=null?o:e.target;return n&&!cp(n).contains(n)?!1:!((s=t.current)!=null&&s.contains(n))}function cp(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function u0(e,t){const n=He(e);f.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}const lp=1/60*1e3,d0=typeof performance<"u"?()=>performance.now():()=>Date.now(),up=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(d0()),lp);function f0(e){let t=[],n=[],r=0,o=!1,s=!1;const i=new WeakSet,a={schedule:(c,l=!1,u=!1)=>{const d=u&&o,h=d?t:n;return l&&i.add(c),h.indexOf(c)===-1&&(h.push(c),d&&o&&(r=t.length)),c},cancel:c=>{const l=n.indexOf(c);l!==-1&&n.splice(l,1),i.delete(c)},process:c=>{if(o){s=!0;return}if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let l=0;l(e[t]=f0(()=>Do=!0),e),{}),p0=es.reduce((e,t)=>{const n=Ci[t];return e[t]=(r,o=!1,s=!1)=>(Do||b0(),n.schedule(r,o,s)),e},{}),m0=es.reduce((e,t)=>(e[t]=Ci[t].cancel,e),{});es.reduce((e,t)=>(e[t]=()=>Ci[t].process(Er),e),{});const g0=e=>Ci[e].process(Er),dp=e=>{Do=!1,Er.delta=uc?lp:Math.max(Math.min(e-Er.timestamp,h0),1),Er.timestamp=e,dc=!0,es.forEach(g0),dc=!1,Do&&(uc=!1,up(dp))},b0=()=>{Do=!0,uc=!0,dc||up(dp)},zu=()=>Er;var y0=Object.defineProperty,v0=(e,t,n)=>t in e?y0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ft=(e,t,n)=>(v0(e,typeof t!="symbol"?t+"":t,n),n);class x0{constructor(t,n,r){var a;if(Ft(this,"history",[]),Ft(this,"startEvent",null),Ft(this,"lastEvent",null),Ft(this,"lastEventInfo",null),Ft(this,"handlers",{}),Ft(this,"removeListeners",()=>{}),Ft(this,"threshold",3),Ft(this,"win"),Ft(this,"updatePoint",()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const c=fa(this.lastEventInfo,this.history),l=this.startEvent!==null,u=C0(c.offset,{x:0,y:0})>=this.threshold;if(!l&&!u)return;const{timestamp:d}=zu();this.history.push({...c.point,timestamp:d});const{onStart:h,onMove:p}=this.handlers;l||(h==null||h(this.lastEvent,c),this.startEvent=this.lastEvent),p==null||p(this.lastEvent,c)}),Ft(this,"onPointerMove",(c,l)=>{this.lastEvent=c,this.lastEventInfo=l,p0.update(this.updatePoint,!0)}),Ft(this,"onPointerUp",(c,l)=>{const u=fa(l,this.history),{onEnd:d,onSessionEnd:h}=this.handlers;h==null||h(c,u),this.end(),!(!d||!this.startEvent)&&(d==null||d(c,u))}),this.win=(a=t.view)!=null?a:window,yv(t))return;this.handlers=n,r&&(this.threshold=r),t.stopPropagation(),t.preventDefault();const o={point:qh(t)},{timestamp:s}=zu();this.history=[{...o.point,timestamp:s}];const{onSessionStart:i}=n;i==null||i(t,fa(o,this.history)),this.removeListeners=k0(Ls(this.win,"pointermove",this.onPointerMove),Ls(this.win,"pointerup",this.onPointerUp),Ls(this.win,"pointercancel",this.onPointerUp))}updateHandlers(t){this.handlers=t}end(){var t;(t=this.removeListeners)==null||t.call(this),m0.update(this.updatePoint)}}function Vu(e,t){return{x:e.x-t.x,y:e.y-t.y}}function fa(e,t){return{point:e.point,delta:Vu(e.point,t[t.length-1]),offset:Vu(e.point,t[0]),velocity:w0(t,.1)}}const S0=e=>e*1e3;function w0(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=e[e.length-1];for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>S0(t)));)n--;if(!r)return{x:0,y:0};const s=(o.timestamp-r.timestamp)/1e3;if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function k0(...e){return t=>e.reduce((n,r)=>r(n),t)}function ha(e,t){return Math.abs(e-t)}function Wu(e){return"x"in e&&"y"in e}function C0(e,t){if(typeof e=="number"&&typeof t=="number")return ha(e,t);if(Wu(e)&&Wu(t)){const n=ha(e.x,t.x),r=ha(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function P0(e,t){const{onPan:n,onPanStart:r,onPanEnd:o,onPanSessionStart:s,onPanSessionEnd:i,threshold:a}=t,c=!!(n||r||o||s||i),l=f.useRef(null),u=ip({onSessionStart:s,onSessionEnd:i,onStart:r,onMove:n,onEnd(d,h){l.current=null,o==null||o(d,h)}});f.useEffect(()=>{var d;(d=l.current)==null||d.updateHandlers(u.current)}),f.useEffect(()=>{const d=e.current;if(!d||!c)return;function h(p){l.current=new x0(p,u.current,a)}return Ls(d,"pointerdown",h)},[e,c,u,a]),f.useEffect(()=>()=>{var d;(d=l.current)==null||d.end(),l.current=null},[])}const Ze={open:(e,t)=>"".concat(e,"[data-open], ").concat(e,"[open], ").concat(e,"[data-state=open] ").concat(t),closed:(e,t)=>"".concat(e,"[data-closed], ").concat(e,"[data-state=closed] ").concat(t),hover:(e,t)=>"".concat(e,":hover ").concat(t,", ").concat(e,"[data-hover] ").concat(t),focus:(e,t)=>"".concat(e,":focus ").concat(t,", ").concat(e,"[data-focus] ").concat(t),focusVisible:(e,t)=>"".concat(e,":focus-visible ").concat(t),focusWithin:(e,t)=>"".concat(e,":focus-within ").concat(t),active:(e,t)=>"".concat(e,":active ").concat(t,", ").concat(e,"[data-active] ").concat(t),disabled:(e,t)=>"".concat(e,":disabled ").concat(t,", ").concat(e,"[data-disabled] ").concat(t),invalid:(e,t)=>"".concat(e,":invalid ").concat(t,", ").concat(e,"[data-invalid] ").concat(t),checked:(e,t)=>"".concat(e,":checked ").concat(t,", ").concat(e,"[data-checked] ").concat(t),placeholderShown:(e,t)=>"".concat(e,":placeholder-shown ").concat(t)},jt=e=>fp(t=>e(t,"&"),"[role=group]","[data-group]",".group"),tn=e=>fp(t=>e(t,"~ &"),"[data-peer]",".peer"),fp=(e,...t)=>t.map(e).join(", "),Ir={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within, &[data-focus-within]",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty, &[data-empty]",_expanded:"&[aria-expanded=true], &[data-expanded], &[data-state=expanded]",_checked:"&[aria-checked=true], &[data-checked], &[data-state=checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate], &[data-state=indeterminate]",_groupOpen:jt(Ze.open),_groupClosed:jt(Ze.closed),_groupHover:jt(Ze.hover),_peerHover:tn(Ze.hover),_groupFocus:jt(Ze.focus),_peerFocus:tn(Ze.focus),_groupFocusVisible:jt(Ze.focusVisible),_peerFocusVisible:tn(Ze.focusVisible),_groupActive:jt(Ze.active),_peerActive:tn(Ze.active),_groupDisabled:jt(Ze.disabled),_peerDisabled:tn(Ze.disabled),_groupInvalid:jt(Ze.invalid),_peerInvalid:tn(Ze.invalid),_groupChecked:jt(Ze.checked),_peerChecked:tn(Ze.checked),_groupFocusWithin:jt(Ze.focusWithin),_peerFocusWithin:tn(Ze.focusWithin),_peerPlaceholderShown:tn(Ze.placeholderShown),_placeholder:"&::placeholder, &[data-placeholder]",_placeholderShown:"&:placeholder-shown, &[data-placeholder-shown]",_fullScreen:"&:fullscreen, &[data-fullscreen]",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]",_open:"&[data-open], &[open], &[data-state=open]",_closed:"&[data-closed], &[data-state=closed]",_complete:"&[data-complete]",_incomplete:"&[data-incomplete]",_current:"&[data-current]"},hp=Object.keys(Ir),T0=e=>/!(important)?$/.test(e),Hu=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,_0=(e,t)=>n=>{const r=String(t),o=T0(r),s=Hu(r),i=e?"".concat(e,".").concat(s):s;let a=ct(n.__cssMap)&&i in n.__cssMap?n.__cssMap[i].varRef:t;return a=Hu(a),o?"".concat(a," !important"):a};function sl(e){const{scale:t,transform:n,compose:r}=e;return(s,i)=>{var l;const a=_0(t,s)(i);let c=(l=n==null?void 0:n(a,i))!=null?l:a;return r&&(c=r(c,i)),c}}const Ss=(...e)=>t=>e.reduce((n,r)=>r(n),t);function Tt(e,t){return n=>{const r={property:n,scale:e};return r.transform=sl({scale:e,transform:t}),r}}const A0=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function E0(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:A0(t),transform:n?sl({scale:n,compose:r}):r}}const pp=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function I0(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...pp].join(" ")}function $0(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...pp].join(" ")}const R0={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},M0={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function O0(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}const F0={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},fc={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},D0=new Set(Object.values(fc)),hc=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),N0=e=>e.trim();function j0(e,t){if(e==null||hc.has(e))return e;if(!(pc(e)||hc.has(e)))return"url('".concat(e,"')");const o=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),s=o==null?void 0:o[1],i=o==null?void 0:o[2];if(!s||!i)return e;const a=s.includes("-gradient")?s:"".concat(s,"-gradient"),[c,...l]=i.split(",").map(N0).filter(Boolean);if((l==null?void 0:l.length)===0)return e;const u=c in fc?fc[c]:c;l.unshift(u);const d=l.map(h=>{if(D0.has(h))return h;const p=h.indexOf(" "),[m,g]=p!==-1?[h.substr(0,p),h.substr(p+1)]:[h],b=pc(g)?g:g&&g.split(" "),w="colors.".concat(m),y=w in t.__cssMap?t.__cssMap[w].varRef:m;return b?[y,...Array.isArray(b)?b:[b]].join(" "):y});return"".concat(a,"(").concat(d.join(", "),")")}const pc=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),B0=(e,t)=>j0(e,t!=null?t:{});function L0(e){return/^var\(--.+\)$/.test(e)}const z0=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},Bt=e=>t=>"".concat(e,"(").concat(t,")"),be={filter(e){return e!=="auto"?e:R0},backdropFilter(e){return e!=="auto"?e:M0},ring(e){return O0(be.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?I0():e==="auto-gpu"?$0():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=z0(e);return t||typeof e=="number"?"".concat(e,"px"):e},fraction(e){return typeof e!="number"||e>1?e:"".concat(e*100,"%")},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(L0(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?"".concat(e,"deg"):e},gradient:B0,blur:Bt("blur"),opacity:Bt("opacity"),brightness:Bt("brightness"),contrast:Bt("contrast"),dropShadow:Bt("drop-shadow"),grayscale:Bt("grayscale"),hueRotate:e=>Bt("hue-rotate")(be.degree(e)),invert:Bt("invert"),saturate:Bt("saturate"),sepia:Bt("sepia"),bgImage(e){return e==null||pc(e)||hc.has(e)?e:"url(".concat(e,")")},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var o;const{space:t,divide:n}=(o=F0[e])!=null?o:{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},C={borderWidths:Tt("borderWidths"),borderStyles:Tt("borderStyles"),colors:Tt("colors"),borders:Tt("borders"),gradients:Tt("gradients",be.gradient),radii:Tt("radii",be.px),space:Tt("space",Ss(be.vh,be.px)),spaceT:Tt("space",Ss(be.vh,be.px)),degreeT(e){return{property:e,transform:be.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:sl({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:Tt("sizes",Ss(be.vh,be.px)),sizesT:Tt("sizes",Ss(be.vh,be.fraction)),shadows:Tt("shadows"),logical:E0,blur:Tt("blur",be.blur)},Vs={background:C.colors("background"),backgroundColor:C.colors("backgroundColor"),backgroundImage:C.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:be.bgClip},bgSize:C.prop("backgroundSize"),bgPosition:C.prop("backgroundPosition"),bg:C.colors("background"),bgColor:C.colors("backgroundColor"),bgPos:C.prop("backgroundPosition"),bgRepeat:C.prop("backgroundRepeat"),bgAttachment:C.prop("backgroundAttachment"),bgGradient:C.gradients("backgroundImage"),bgClip:{transform:be.bgClip}};Object.assign(Vs,{bgImage:Vs.backgroundImage,bgImg:Vs.backgroundImage});const ke={border:C.borders("border"),borderWidth:C.borderWidths("borderWidth"),borderStyle:C.borderStyles("borderStyle"),borderColor:C.colors("borderColor"),borderRadius:C.radii("borderRadius"),borderTop:C.borders("borderTop"),borderBlockStart:C.borders("borderBlockStart"),borderTopLeftRadius:C.radii("borderTopLeftRadius"),borderStartStartRadius:C.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:C.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:C.radii("borderTopRightRadius"),borderStartEndRadius:C.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:C.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:C.borders("borderRight"),borderInlineEnd:C.borders("borderInlineEnd"),borderBottom:C.borders("borderBottom"),borderBlockEnd:C.borders("borderBlockEnd"),borderBottomLeftRadius:C.radii("borderBottomLeftRadius"),borderBottomRightRadius:C.radii("borderBottomRightRadius"),borderLeft:C.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:C.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:C.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:C.borders(["borderLeft","borderRight"]),borderInline:C.borders("borderInline"),borderY:C.borders(["borderTop","borderBottom"]),borderBlock:C.borders("borderBlock"),borderTopWidth:C.borderWidths("borderTopWidth"),borderBlockStartWidth:C.borderWidths("borderBlockStartWidth"),borderTopColor:C.colors("borderTopColor"),borderBlockStartColor:C.colors("borderBlockStartColor"),borderTopStyle:C.borderStyles("borderTopStyle"),borderBlockStartStyle:C.borderStyles("borderBlockStartStyle"),borderBottomWidth:C.borderWidths("borderBottomWidth"),borderBlockEndWidth:C.borderWidths("borderBlockEndWidth"),borderBottomColor:C.colors("borderBottomColor"),borderBlockEndColor:C.colors("borderBlockEndColor"),borderBottomStyle:C.borderStyles("borderBottomStyle"),borderBlockEndStyle:C.borderStyles("borderBlockEndStyle"),borderLeftWidth:C.borderWidths("borderLeftWidth"),borderInlineStartWidth:C.borderWidths("borderInlineStartWidth"),borderLeftColor:C.colors("borderLeftColor"),borderInlineStartColor:C.colors("borderInlineStartColor"),borderLeftStyle:C.borderStyles("borderLeftStyle"),borderInlineStartStyle:C.borderStyles("borderInlineStartStyle"),borderRightWidth:C.borderWidths("borderRightWidth"),borderInlineEndWidth:C.borderWidths("borderInlineEndWidth"),borderRightColor:C.colors("borderRightColor"),borderInlineEndColor:C.colors("borderInlineEndColor"),borderRightStyle:C.borderStyles("borderRightStyle"),borderInlineEndStyle:C.borderStyles("borderInlineEndStyle"),borderTopRadius:C.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:C.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:C.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:C.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(ke,{rounded:ke.borderRadius,roundedTop:ke.borderTopRadius,roundedTopLeft:ke.borderTopLeftRadius,roundedTopRight:ke.borderTopRightRadius,roundedTopStart:ke.borderStartStartRadius,roundedTopEnd:ke.borderStartEndRadius,roundedBottom:ke.borderBottomRadius,roundedBottomLeft:ke.borderBottomLeftRadius,roundedBottomRight:ke.borderBottomRightRadius,roundedBottomStart:ke.borderEndStartRadius,roundedBottomEnd:ke.borderEndEndRadius,roundedLeft:ke.borderLeftRadius,roundedRight:ke.borderRightRadius,roundedStart:ke.borderInlineStartRadius,roundedEnd:ke.borderInlineEndRadius,borderStart:ke.borderInlineStart,borderEnd:ke.borderInlineEnd,borderTopStartRadius:ke.borderStartStartRadius,borderTopEndRadius:ke.borderStartEndRadius,borderBottomStartRadius:ke.borderEndStartRadius,borderBottomEndRadius:ke.borderEndEndRadius,borderStartRadius:ke.borderInlineStartRadius,borderEndRadius:ke.borderInlineEndRadius,borderStartWidth:ke.borderInlineStartWidth,borderEndWidth:ke.borderInlineEndWidth,borderStartColor:ke.borderInlineStartColor,borderEndColor:ke.borderInlineEndColor,borderStartStyle:ke.borderInlineStartStyle,borderEndStyle:ke.borderInlineEndStyle});const V0={color:C.colors("color"),textColor:C.colors("color"),fill:C.colors("fill"),stroke:C.colors("stroke"),accentColor:C.colors("accentColor"),textFillColor:C.colors("textFillColor")},ai={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:be.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:C.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:C.space("gap"),rowGap:C.space("rowGap"),columnGap:C.space("columnGap")};Object.assign(ai,{flexDir:ai.flexDirection});const At={width:C.sizesT("width"),inlineSize:C.sizesT("inlineSize"),height:C.sizes("height"),blockSize:C.sizes("blockSize"),boxSize:C.sizes(["width","height"]),minWidth:C.sizes("minWidth"),minInlineSize:C.sizes("minInlineSize"),minHeight:C.sizes("minHeight"),minBlockSize:C.sizes("minBlockSize"),maxWidth:C.sizes("maxWidth"),maxInlineSize:C.sizes("maxInlineSize"),maxHeight:C.sizes("maxHeight"),maxBlockSize:C.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var o,s,i;const n=(i=(s=(o=t.__breakpoints)==null?void 0:o.get(e))==null?void 0:s.minW)!=null?i:e;return{["@media screen and (min-width: ".concat(n,")")]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var o,s,i;const n=(i=(s=(o=t.__breakpoints)==null?void 0:o.get(e))==null?void 0:s._minW)!=null?i:e;return{["@media screen and (max-width: ".concat(n,")")]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:C.propT("float",be.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(At,{w:At.width,h:At.height,minW:At.minWidth,maxW:At.maxWidth,minH:At.minHeight,maxH:At.maxHeight,overscroll:At.overscrollBehavior,overscrollX:At.overscrollBehaviorX,overscrollY:At.overscrollBehaviorY});const W0={filter:{transform:be.filter},blur:C.blur("--chakra-blur"),brightness:C.propT("--chakra-brightness",be.brightness),contrast:C.propT("--chakra-contrast",be.contrast),hueRotate:C.propT("--chakra-hue-rotate",be.hueRotate),invert:C.propT("--chakra-invert",be.invert),saturate:C.propT("--chakra-saturate",be.saturate),dropShadow:C.propT("--chakra-drop-shadow",be.dropShadow),backdropFilter:{transform:be.backdropFilter},backdropBlur:C.blur("--chakra-backdrop-blur"),backdropBrightness:C.propT("--chakra-backdrop-brightness",be.brightness),backdropContrast:C.propT("--chakra-backdrop-contrast",be.contrast),backdropHueRotate:C.propT("--chakra-backdrop-hue-rotate",be.hueRotate),backdropInvert:C.propT("--chakra-backdrop-invert",be.invert),backdropSaturate:C.propT("--chakra-backdrop-saturate",be.saturate)},H0={ring:{transform:be.ring},ringColor:C.colors("--chakra-ring-color"),ringOffset:C.prop("--chakra-ring-offset-width"),ringOffsetColor:C.colors("--chakra-ring-offset-color"),ringInset:C.prop("--chakra-ring-inset")},U0={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:be.outline},outlineOffset:!0,outlineColor:C.colors("outlineColor")},mp={gridGap:C.space("gridGap"),gridColumnGap:C.space("gridColumnGap"),gridRowGap:C.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0};function G0(e,t,n,r){const o=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,o,s,i)=>{if(typeof r>"u")return e(r,o,s);t.has(r)||t.set(r,new Map);const a=t.get(r);if(a.has(o))return a.get(o);const c=e(r,o,s,i);return a.set(o,c),c}},K0=q0(G0),X0={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Y0={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},pa=(e,t,n)=>{const r={},o=K0(e,t,{});for(const s in o)s in n&&n[s]!=null||(r[s]=o[s]);return r},Z0={srOnly:{transform(e){return e===!0?X0:e==="focusable"?Y0:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>pa(t,"layerStyles.".concat(e),n)},textStyle:{processResult:!0,transform:(e,t,n)=>pa(t,"textStyles.".concat(e),n)},apply:{processResult:!0,transform:(e,t,n)=>pa(t,e,n)}},Co={position:!0,pos:C.prop("position"),zIndex:C.prop("zIndex","zIndices"),inset:C.spaceT("inset"),insetX:C.spaceT(["left","right"]),insetInline:C.spaceT("insetInline"),insetY:C.spaceT(["top","bottom"]),insetBlock:C.spaceT("insetBlock"),top:C.spaceT("top"),insetBlockStart:C.spaceT("insetBlockStart"),bottom:C.spaceT("bottom"),insetBlockEnd:C.spaceT("insetBlockEnd"),left:C.spaceT("left"),insetInlineStart:C.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:C.spaceT("right"),insetInlineEnd:C.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Co,{insetStart:Co.insetInlineStart,insetEnd:Co.insetInlineEnd});const mc={boxShadow:C.shadows("boxShadow"),mixBlendMode:!0,blendMode:C.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:C.prop("backgroundBlendMode"),opacity:!0};Object.assign(mc,{shadow:mc.boxShadow});const je={margin:C.spaceT("margin"),marginTop:C.spaceT("marginTop"),marginBlockStart:C.spaceT("marginBlockStart"),marginRight:C.spaceT("marginRight"),marginInlineEnd:C.spaceT("marginInlineEnd"),marginBottom:C.spaceT("marginBottom"),marginBlockEnd:C.spaceT("marginBlockEnd"),marginLeft:C.spaceT("marginLeft"),marginInlineStart:C.spaceT("marginInlineStart"),marginX:C.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:C.spaceT("marginInline"),marginY:C.spaceT(["marginTop","marginBottom"]),marginBlock:C.spaceT("marginBlock"),padding:C.space("padding"),paddingTop:C.space("paddingTop"),paddingBlockStart:C.space("paddingBlockStart"),paddingRight:C.space("paddingRight"),paddingBottom:C.space("paddingBottom"),paddingBlockEnd:C.space("paddingBlockEnd"),paddingLeft:C.space("paddingLeft"),paddingInlineStart:C.space("paddingInlineStart"),paddingInlineEnd:C.space("paddingInlineEnd"),paddingX:C.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:C.space("paddingInline"),paddingY:C.space(["paddingTop","paddingBottom"]),paddingBlock:C.space("paddingBlock")};Object.assign(je,{m:je.margin,mt:je.marginTop,mr:je.marginRight,me:je.marginInlineEnd,marginEnd:je.marginInlineEnd,mb:je.marginBottom,ml:je.marginLeft,ms:je.marginInlineStart,marginStart:je.marginInlineStart,mx:je.marginX,my:je.marginY,p:je.padding,pt:je.paddingTop,py:je.paddingY,px:je.paddingX,pb:je.paddingBottom,pl:je.paddingLeft,ps:je.paddingInlineStart,paddingStart:je.paddingInlineStart,pr:je.paddingRight,pe:je.paddingInlineEnd,paddingEnd:je.paddingInlineEnd});const J0={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:C.spaceT("scrollMargin"),scrollMarginTop:C.spaceT("scrollMarginTop"),scrollMarginBottom:C.spaceT("scrollMarginBottom"),scrollMarginLeft:C.spaceT("scrollMarginLeft"),scrollMarginRight:C.spaceT("scrollMarginRight"),scrollMarginX:C.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:C.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:C.spaceT("scrollPadding"),scrollPaddingTop:C.spaceT("scrollPaddingTop"),scrollPaddingBottom:C.spaceT("scrollPaddingBottom"),scrollPaddingLeft:C.spaceT("scrollPaddingLeft"),scrollPaddingRight:C.spaceT("scrollPaddingRight"),scrollPaddingX:C.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:C.spaceT(["scrollPaddingTop","scrollPaddingBottom"])},Q0={fontFamily:C.prop("fontFamily","fonts"),fontSize:C.prop("fontSize","fontSizes",be.px),fontWeight:C.prop("fontWeight","fontWeights"),lineHeight:C.prop("lineHeight","lineHeights"),letterSpacing:C.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(e===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},ex={textDecorationColor:C.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:C.shadows("textShadow")},tx={clipPath:!0,transform:C.propT("transform",be.transform),transformOrigin:!0,translateX:C.spaceT("--chakra-translate-x"),translateY:C.spaceT("--chakra-translate-y"),skewX:C.degreeT("--chakra-skew-x"),skewY:C.degreeT("--chakra-skew-y"),scaleX:C.prop("--chakra-scale-x"),scaleY:C.prop("--chakra-scale-y"),scale:C.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:C.degreeT("--chakra-rotate")},nx={listStyleType:!0,listStylePosition:!0,listStylePos:C.prop("listStylePosition"),listStyleImage:!0,listStyleImg:C.prop("listStyleImage")},rx={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:C.prop("transitionDuration","transition.duration"),transitionProperty:C.prop("transitionProperty","transition.property"),transitionTimingFunction:C.prop("transitionTimingFunction","transition.easing")},il=Et({},Vs,ke,V0,ai,At,W0,H0,U0,mp,Z0,Co,mc,je,J0,Q0,ex,tx,nx,rx),ox=Object.assign({},je,At,ai,mp,Co),sx=Object.keys(ox),ix=[...Object.keys(il),...hp],ax={...il,...Ir},cx=e=>e in ax,lx=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:o}=t.__breakpoints,s={};for(const i in e){let a=ht(e[i],t);if(a==null)continue;if(a=ct(a)&&n(a)?r(a):a,!Array.isArray(a)){s[i]=a;continue}const c=a.slice(0,o.length).length;for(let l=0;le.startsWith("--")&&typeof t=="string"&&!dx(t),hx=(e,t)=>{var i,a;if(t==null)return t;const n=c=>{var l,u;return(u=(l=e.__cssMap)==null?void 0:l[c])==null?void 0:u.varRef},r=c=>{var l;return(l=n(c))!=null?l:c},[o,s]=ux(t);return t=(a=(i=n(o))!=null?i:r(s))!=null?a:r(t),t};function px(e){const{configs:t={},pseudos:n={},theme:r}=e,o=(s,i=!1)=>{var u,d,h;const a=ht(s,r),c=lx(a)(r);let l={};for(let p in c){const m=c[p];let g=ht(m,r);p in n&&(p=n[p]),fx(p,g)&&(g=hx(r,g));let b=t[p];if(b===!0&&(b={property:p}),ct(g)){l[p]=(u=l[p])!=null?u:{},l[p]=Et({},l[p],o(g,!0));continue}let w=(h=(d=b==null?void 0:b.transform)==null?void 0:d.call(b,g,r,a))!=null?h:g;w=b!=null&&b.processResult?o(w,!0):w;const y=ht(b==null?void 0:b.property,r);if(!i&&(b!=null&&b.static)){const x=ht(b.static,r);l=Et({},l,x)}if(y&&Array.isArray(y)){for(const x of y)l[x]=w;continue}if(y){y==="&"&&ct(w)?l=Et({},l,w):l[y]=w;continue}if(ct(w)){l=Et({},l,w);continue}l[p]=w}return l};return o}const gp=e=>t=>px({theme:t,pseudos:Ir,configs:il})(e);function De(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function mx(e,t,n){var r,o,s;return(s=(o=(r=e.__cssMap)==null?void 0:r["".concat(t,".").concat(n)])==null?void 0:o.varRef)!=null?s:n}function gx(e,t){if(Array.isArray(e))return e;if(ct(e))return t(e);if(e!=null)return[e]}function bx(e,t){for(let n=t+1;n{Et(a,{[x]:u?y[x]:{[w]:y[x]}})});continue}if(!d){u?Et(a,y):a[w]=y;continue}a[w]=y}}return a}}function vx(e){return t=>{var i;const{variant:n,size:r,theme:o}=t,s=yx(o);return Et({},ht((i=e.baseStyle)!=null?i:{},t),s(e,"sizes",r,t),s(e,"variants",n,t))}}function Ie(e){return Yr(e,["styleConfig","size","variant","colorScheme"])}function bp(e){return ct(e)&&e.reference?e.reference:String(e)}const Pi=(e,...t)=>t.map(bp).join(" ".concat(e," ")).replace(/calc/g,""),Uu=(...e)=>"calc(".concat(Pi("+",...e),")"),Gu=(...e)=>"calc(".concat(Pi("-",...e),")"),gc=(...e)=>"calc(".concat(Pi("*",...e),")"),qu=(...e)=>"calc(".concat(Pi("/",...e),")"),Ku=e=>{const t=bp(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):"-".concat(t):gc(t,-1)},nn=Object.assign(e=>({add:(...t)=>nn(Uu(e,...t)),subtract:(...t)=>nn(Gu(e,...t)),multiply:(...t)=>nn(gc(e,...t)),divide:(...t)=>nn(qu(e,...t)),negate:()=>nn(Ku(e)),toString:()=>e.toString()}),{add:Uu,subtract:Gu,multiply:gc,divide:qu,negate:Ku});function xx(e,t="-"){return e.replace(/\s+/g,t)}function Sx(e){const t=xx(e.toString());return kx(wx(t))}function wx(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function kx(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function Cx(e,t=""){return[t,e].filter(Boolean).join("-")}function Px(e,t){return"var(".concat(e).concat(t?", ".concat(t):"",")")}function Tx(e,t=""){return Sx("--".concat(Cx(e,t)))}function ne(e,t,n){const r=Tx(e,n);return{variable:r,reference:Px(r,t)}}function _x(e,t){const n={};for(const r of t){if(Array.isArray(r)){const[o,s]=r;n[o]=ne("".concat(e,"-").concat(o),s);continue}n[r]=ne("".concat(e,"-").concat(r))}return n}const Ax=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function Ex(e){return Qh(e,Ax)}function Ix(e){return e.semanticTokens}function $x(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...o}=e;return o}function Rx(e){const t=Ex(e),n=Ix(e),r=s=>hp.includes(s)||s==="default",o={};return Bu(t,(s,i)=>{s!=null&&(o[i.join(".")]={isSemantic:!1,value:s})}),Bu(n,(s,i)=>{s!=null&&(o[i.join(".")]={isSemantic:!0,value:s})},{stop:s=>Object.keys(s).every(r)}),o}function Xu(e,t){return ne(String(e).replace(/\./g,"-"),void 0,t)}function Mx(e){var i;const t=Rx(e),n=(i=e.config)==null?void 0:i.cssVarPrefix;let r={};const o={};function s(a,c){const u=[String(a).split(".")[0],c].join(".");if(!t[u])return c;const{reference:h}=Xu(u,n);return h}for(const[a,c]of Object.entries(t)){const{isSemantic:l,value:u}=c,{variable:d,reference:h}=Xu(a,n);if(!l){if(a.startsWith("space")){const m=a.split("."),[g,...b]=m,w="".concat(g,".-").concat(b.join(".")),y=nn.negate(u),x=nn.negate(h);o[w]={value:y,var:d,varRef:x}}r[d]=u,o[a]={value:u,var:d,varRef:h};continue}const p=ct(u)?u:{default:u};r=Et(r,Object.entries(p).reduce((m,[g,b])=>{var x;if(!b)return m;const w=s(a,"".concat(b));if(g==="default")return m[d]=w,m;const y=(x=Ir==null?void 0:Ir[g])!=null?x:g;return m[y]={[d]:w},m},{})),o[a]={value:h,var:d,varRef:h}}return{cssVars:r,cssMap:o}}function Ox(e){const t=$x(e),{cssMap:n,cssVars:r}=Mx(t);return Object.assign(t,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...r},__cssMap:n,__breakpoints:_v(t.breakpoints)}),t}function _e(e,t={}){let n=!1;function r(){if(!n){n=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function o(...u){r();for(const d of u)t[d]=c(d);return _e(e,t)}function s(...u){for(const d of u)d in t||(t[d]=c(d));return _e(e,t)}function i(){return Object.fromEntries(Object.entries(t).map(([d,h])=>[d,h.selector]))}function a(){return Object.fromEntries(Object.entries(t).map(([d,h])=>[d,h.className]))}function c(u){const h=(["container","root"].includes(u!=null?u:"")?[e]:[e,u]).filter(Boolean).join("__"),p="chakra-".concat(h);return{className:p,selector:".".concat(p),toString:()=>u}}return{parts:o,toPart:c,extend:s,selectors:i,classnames:a,get keys(){return Object.keys(t)},__type:{}}}const Fx=_e("accordion").parts("root","container","button","panel","icon"),Dx=_e("alert").parts("title","description","container","icon","spinner"),Nx=_e("avatar").parts("label","badge","container","excessLabel","group"),jx=_e("breadcrumb").parts("link","item","container","separator");_e("button").parts();const Bx=_e("checkbox").parts("control","icon","container","label");_e("progress").parts("track","filledTrack","label");const Lx=_e("drawer").parts("overlay","dialogContainer","dialog","header","closeButton","body","footer"),zx=_e("editable").parts("preview","input","textarea"),Vx=_e("form").parts("container","requiredIndicator","helperText"),Wx=_e("formError").parts("text","icon"),Hx=_e("input").parts("addon","field","element","group"),Ux=_e("list").parts("container","item","icon"),Gx=_e("menu").parts("button","list","item","groupTitle","icon","command","divider"),qx=_e("modal").parts("overlay","dialogContainer","dialog","header","closeButton","body","footer"),Kx=_e("numberinput").parts("root","field","stepperGroup","stepper");_e("pininput").parts("field");const Xx=_e("popover").parts("content","header","body","footer","popper","arrow","closeButton"),Yx=_e("progress").parts("label","filledTrack","track"),Zx=_e("radio").parts("container","control","label"),Jx=_e("select").parts("field","icon"),Qx=_e("slider").parts("container","track","thumb","filledTrack","mark"),eS=_e("stat").parts("container","label","helpText","number","icon"),tS=_e("switch").parts("container","track","thumb","label"),nS=_e("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),rS=_e("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),oS=_e("tag").parts("container","label","closeButton"),sS=_e("card").parts("container","header","body","footer");_e("stepper").parts("stepper","step","title","description","indicator","separator","icon","number");const{definePartsStyle:iS,defineMultiStyleConfig:aS}=De(Fx.keys),cS={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},lS={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},uS={pt:"2",px:"4",pb:"5"},dS={fontSize:"1.25em"},fS=iS({container:cS,button:lS,panel:uS,icon:dS}),hS=aS({baseStyle:fS});function Wn(e,t,n){return Math.min(Math.max(e,n),t)}class pS extends Error{constructor(t){super('Failed to parse color: "'.concat(t,'"'))}}var go=pS;function al(e){if(typeof e!="string")throw new go(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=wS.test(e)?bS(e):e;const n=yS.exec(t);if(n){const i=Array.from(n).slice(1);return[...i.slice(0,3).map(a=>parseInt(No(a,2),16)),parseInt(No(i[3]||"f",2),16)/255]}const r=vS.exec(t);if(r){const i=Array.from(r).slice(1);return[...i.slice(0,3).map(a=>parseInt(a,16)),parseInt(i[3]||"ff",16)/255]}const o=xS.exec(t);if(o){const i=Array.from(o).slice(1);return[...i.slice(0,3).map(a=>parseInt(a,10)),parseFloat(i[3]||"1")]}const s=SS.exec(t);if(s){const[i,a,c,l]=Array.from(s).slice(1).map(parseFloat);if(Wn(0,100,a)!==a)throw new go(e);if(Wn(0,100,c)!==c)throw new go(e);return[...kS(i,a,c),Number.isNaN(l)?1:l]}throw new go(e)}function mS(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0)%2341}const Yu=e=>parseInt(e.replace(/_/g,""),36),gS="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const n=Yu(t.substring(0,3)),r=Yu(t.substring(3)).toString(16);let o="";for(let s=0;s<6-r.length;s++)o+="0";return e[n]="".concat(o).concat(r),e},{});function bS(e){const t=e.toLowerCase().trim(),n=gS[mS(t)];if(!n)throw new go(e);return"#".concat(n)}const No=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),yS=new RegExp("^#".concat(No("([a-f0-9])",3),"([a-f0-9])?$"),"i"),vS=new RegExp("^#".concat(No("([a-f0-9]{2})",3),"([a-f0-9]{2})?$"),"i"),xS=new RegExp("^rgba?\\(\\s*(\\d+)\\s*".concat(No(",\\s*(\\d+)\\s*",2),"(?:,\\s*([\\d.]+))?\\s*\\)$"),"i"),SS=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,wS=/^[a-z]+$/i,Zu=e=>Math.round(e*255),kS=(e,t,n)=>{let r=n/100;if(t===0)return[r,r,r].map(Zu);const o=(e%360+360)%360/60,s=(1-Math.abs(2*r-1))*(t/100),i=s*(1-Math.abs(o%2-1));let a=0,c=0,l=0;o>=0&&o<1?(a=s,c=i):o>=1&&o<2?(a=i,c=s):o>=2&&o<3?(c=s,l=i):o>=3&&o<4?(c=i,l=s):o>=4&&o<5?(a=i,l=s):o>=5&&o<6&&(a=s,l=i);const u=r-s/2,d=a+u,h=c+u,p=l+u;return[d,h,p].map(Zu)};function CS(e,t,n,r){return"rgba(".concat(Wn(0,255,e).toFixed(),", ").concat(Wn(0,255,t).toFixed(),", ").concat(Wn(0,255,n).toFixed(),", ").concat(parseFloat(Wn(0,1,r).toFixed(3)),")")}function PS(e,t){const[n,r,o,s]=al(e);return CS(n,r,o,s-t)}function TS(e){const[t,n,r,o]=al(e);let s=i=>{const a=Wn(0,255,i).toString(16);return a.length===1?"0".concat(a):a};return"#".concat(s(t)).concat(s(n)).concat(s(r)).concat(o<1?s(Math.round(o*255)):"")}const _S=e=>Object.keys(e).length===0;function AS(e,t,n,r,o){for(t=t.split?t.split("."):t,r=0;r{const r=AS(e,"colors.".concat(t),t);try{return TS(r),r}catch(o){return"#000000"}},ES=e=>{const[t,n,r]=al(e);return(t*299+n*587+r*114)/1e3},IS=e=>t=>{const n=at(t,e);return ES(n)<128?"dark":"light"},$S=e=>t=>IS(e)(t)==="dark",Br=(e,t)=>n=>{const r=at(n,e);return PS(r,1-t)};function Ju(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:"linear-gradient(\n 45deg,\n ".concat(t," 25%,\n transparent 25%,\n transparent 50%,\n ").concat(t," 50%,\n ").concat(t," 75%,\n transparent 75%,\n transparent\n )"),backgroundSize:"".concat(e," ").concat(e)}}const RS=()=>"#".concat(Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0"));function MS(e){const t=RS();return!e||_S(e)?t:e.string&&e.colors?FS(e.string,e.colors):e.string&&!e.colors?OS(e.string):e.colors&&!e.string?DS(e.colors):t}function OS(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+="00".concat(o.toString(16)).substr(-2)}return n}function FS(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function cl(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function yp(e){return ct(e)&&e.reference?e.reference:String(e)}const Ti=(e,...t)=>t.map(yp).join(" ".concat(e," ")).replace(/calc/g,""),Qu=(...e)=>"calc(".concat(Ti("+",...e),")"),ed=(...e)=>"calc(".concat(Ti("-",...e),")"),bc=(...e)=>"calc(".concat(Ti("*",...e),")"),td=(...e)=>"calc(".concat(Ti("/",...e),")"),nd=e=>{const t=yp(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):"-".concat(t):bc(t,-1)},rn=Object.assign(e=>({add:(...t)=>rn(Qu(e,...t)),subtract:(...t)=>rn(ed(e,...t)),multiply:(...t)=>rn(bc(e,...t)),divide:(...t)=>rn(td(e,...t)),negate:()=>rn(nd(e)),toString:()=>e.toString()}),{add:Qu,subtract:ed,multiply:bc,divide:td,negate:nd});function NS(e){return!Number.isInteger(parseFloat(e.toString()))}function jS(e,t="-"){return e.replace(/\s+/g,t)}function vp(e){const t=jS(e.toString());return t.includes("\\.")?e:NS(e)?t.replace(".","\\."):e}function BS(e,t=""){return[t,vp(e)].filter(Boolean).join("-")}function LS(e,t){return"var(".concat(vp(e)).concat(t?", ".concat(t):"",")")}function zS(e,t=""){return"--".concat(BS(e,t))}function Je(e,t){const n=zS(e,t==null?void 0:t.prefix);return{variable:n,reference:LS(n,VS(t==null?void 0:t.fallback))}}function VS(e){return e==null?void 0:e.reference}const{definePartsStyle:ts,defineMultiStyleConfig:WS}=De(Dx.keys),xt=ne("alert-fg"),mn=ne("alert-bg"),HS=ts({container:{bg:mn.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:xt.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:xt.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function ll(e){const{theme:t,colorScheme:n}=e,r=Br("".concat(n,".200"),.16)(t);return{light:"colors.".concat(n,".100"),dark:r}}const US=ts(e=>{const{colorScheme:t}=e,n=ll(e);return{container:{[xt.variable]:"colors.".concat(t,".600"),[mn.variable]:n.light,_dark:{[xt.variable]:"colors.".concat(t,".200"),[mn.variable]:n.dark}}}}),GS=ts(e=>{const{colorScheme:t}=e,n=ll(e);return{container:{[xt.variable]:"colors.".concat(t,".600"),[mn.variable]:n.light,_dark:{[xt.variable]:"colors.".concat(t,".200"),[mn.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:xt.reference}}}),qS=ts(e=>{const{colorScheme:t}=e,n=ll(e);return{container:{[xt.variable]:"colors.".concat(t,".600"),[mn.variable]:n.light,_dark:{[xt.variable]:"colors.".concat(t,".200"),[mn.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:xt.reference}}}),KS=ts(e=>{const{colorScheme:t}=e;return{container:{[xt.variable]:"colors.white",[mn.variable]:"colors.".concat(t,".600"),_dark:{[xt.variable]:"colors.gray.900",[mn.variable]:"colors.".concat(t,".200")},color:xt.reference}}}),XS={subtle:US,"left-accent":GS,"top-accent":qS,solid:KS},YS=WS({baseStyle:HS,variants:XS,defaultProps:{variant:"subtle",colorScheme:"blue"}}),xp={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},ZS={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},JS={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Sp={...xp,...ZS,container:JS},QS=e=>typeof e=="function";function lt(e,...t){return QS(e)?e(...t):e}const{definePartsStyle:wp,defineMultiStyleConfig:e1}=De(Nx.keys),$r=ne("avatar-border-color"),Po=ne("avatar-bg"),jo=ne("avatar-font-size"),Lr=ne("avatar-size"),t1={borderRadius:"full",border:"0.2em solid",borderColor:$r.reference,[$r.variable]:"white",_dark:{[$r.variable]:"colors.gray.800"}},n1={bg:Po.reference,fontSize:jo.reference,width:Lr.reference,height:Lr.reference,lineHeight:"1",[Po.variable]:"colors.gray.200",_dark:{[Po.variable]:"colors.whiteAlpha.400"}},r1=e=>{const{name:t,theme:n}=e,r=t?MS({string:t}):"colors.gray.400",o=$S(r)(n);let s="white";return o||(s="gray.800"),{bg:Po.reference,fontSize:jo.reference,color:s,borderColor:$r.reference,verticalAlign:"top",width:Lr.reference,height:Lr.reference,"&:not([data-loaded])":{[Po.variable]:r},[$r.variable]:"colors.white",_dark:{[$r.variable]:"colors.gray.800"}}},o1={fontSize:jo.reference,lineHeight:"1"},s1=wp(e=>({badge:lt(t1,e),excessLabel:lt(n1,e),container:lt(r1,e),label:o1}));function wn(e){const t=e!=="100%"?Sp[e]:void 0;return wp({container:{[Lr.variable]:t!=null?t:e,[jo.variable]:"calc(".concat(t!=null?t:e," / 2.5)")},excessLabel:{[Lr.variable]:t!=null?t:e,[jo.variable]:"calc(".concat(t!=null?t:e," / 2.5)")}})}const i1={"2xs":wn(4),xs:wn(6),sm:wn(8),md:wn(12),lg:wn(16),xl:wn(24),"2xl":wn(32),full:wn("100%")},a1=e1({baseStyle:s1,sizes:i1,defaultProps:{size:"md"}}),Ge=_x("badge",["bg","color","shadow"]),c1={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:Ge.bg.reference,color:Ge.color.reference,boxShadow:Ge.shadow.reference},l1=e=>{const{colorScheme:t,theme:n}=e,r=Br("".concat(t,".500"),.6)(n);return{[Ge.bg.variable]:"colors.".concat(t,".500"),[Ge.color.variable]:"colors.white",_dark:{[Ge.bg.variable]:r,[Ge.color.variable]:"colors.whiteAlpha.800"}}},u1=e=>{const{colorScheme:t,theme:n}=e,r=Br("".concat(t,".200"),.16)(n);return{[Ge.bg.variable]:"colors.".concat(t,".100"),[Ge.color.variable]:"colors.".concat(t,".800"),_dark:{[Ge.bg.variable]:r,[Ge.color.variable]:"colors.".concat(t,".200")}}},d1=e=>{const{colorScheme:t,theme:n}=e,r=Br("".concat(t,".200"),.8)(n);return{[Ge.color.variable]:"colors.".concat(t,".500"),_dark:{[Ge.color.variable]:r},[Ge.shadow.variable]:"inset 0 0 0px 1px ".concat(Ge.color.reference)}},f1={solid:l1,subtle:u1,outline:d1},To={baseStyle:c1,variants:f1,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:h1,definePartsStyle:p1}=De(jx.keys),ma=ne("breadcrumb-link-decor"),m1={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:ma.reference,[ma.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[ma.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}},g1=p1({link:m1}),b1=h1({baseStyle:g1}),y1={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},kp=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:te("gray.800","whiteAlpha.900")(e),_hover:{bg:te("gray.100","whiteAlpha.200")(e)},_active:{bg:te("gray.200","whiteAlpha.300")(e)}};const r=Br("".concat(t,".200"),.12)(n),o=Br("".concat(t,".200"),.24)(n);return{color:te("".concat(t,".600"),"".concat(t,".200"))(e),bg:"transparent",_hover:{bg:te("".concat(t,".50"),r)(e)},_active:{bg:te("".concat(t,".100"),o)(e)}}},v1=e=>{const{colorScheme:t}=e,n=te("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...lt(kp,e)}},x1={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},S1=e=>{var a;const{colorScheme:t}=e;if(t==="gray"){const c=te("gray.100","whiteAlpha.200")(e);return{bg:c,color:te("gray.800","whiteAlpha.900")(e),_hover:{bg:te("gray.200","whiteAlpha.300")(e),_disabled:{bg:c}},_active:{bg:te("gray.300","whiteAlpha.400")(e)}}}const{bg:n="".concat(t,".500"),color:r="white",hoverBg:o="".concat(t,".600"),activeBg:s="".concat(t,".700")}=(a=x1[t])!=null?a:{},i=te(n,"".concat(t,".200"))(e);return{bg:i,color:te(r,"gray.800")(e),_hover:{bg:te(o,"".concat(t,".300"))(e),_disabled:{bg:i}},_active:{bg:te(s,"".concat(t,".400"))(e)}}},w1=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:te("".concat(t,".500"),"".concat(t,".200"))(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:te("".concat(t,".700"),"".concat(t,".500"))(e)}}},k1={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},C1={ghost:kp,outline:v1,solid:S1,link:w1,unstyled:k1},P1={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},T1={baseStyle:y1,variants:C1,sizes:P1,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Gn,defineMultiStyleConfig:_1}=De(sS.keys),ci=ne("card-bg"),un=ne("card-padding"),Cp=ne("card-shadow"),Ws=ne("card-radius"),Pp=ne("card-border-width","0"),Tp=ne("card-border-color"),A1=Gn({container:{[ci.variable]:"colors.chakra-body-bg",backgroundColor:ci.reference,boxShadow:Cp.reference,borderRadius:Ws.reference,color:"chakra-body-text",borderWidth:Pp.reference,borderColor:Tp.reference},body:{padding:un.reference,flex:"1 1 0%"},header:{padding:un.reference},footer:{padding:un.reference}}),E1={sm:Gn({container:{[Ws.variable]:"radii.base",[un.variable]:"space.3"}}),md:Gn({container:{[Ws.variable]:"radii.md",[un.variable]:"space.5"}}),lg:Gn({container:{[Ws.variable]:"radii.xl",[un.variable]:"space.7"}})},I1={elevated:Gn({container:{[Cp.variable]:"shadows.base",_dark:{[ci.variable]:"colors.gray.700"}}}),outline:Gn({container:{[Pp.variable]:"1px",[Tp.variable]:"colors.chakra-border-color"}}),filled:Gn({container:{[ci.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[un.variable]:0},header:{[un.variable]:0},footer:{[un.variable]:0}}},$1=_1({baseStyle:A1,variants:I1,sizes:E1,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:Hs,defineMultiStyleConfig:R1}=De(Bx.keys),_o=ne("checkbox-size"),M1=e=>{const{colorScheme:t}=e;return{w:_o.reference,h:_o.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:te("".concat(t,".500"),"".concat(t,".200"))(e),borderColor:te("".concat(t,".500"),"".concat(t,".200"))(e),color:te("white","gray.900")(e),_hover:{bg:te("".concat(t,".600"),"".concat(t,".300"))(e),borderColor:te("".concat(t,".600"),"".concat(t,".300"))(e)},_disabled:{borderColor:te("gray.200","transparent")(e),bg:te("gray.200","whiteAlpha.300")(e),color:te("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:te("".concat(t,".500"),"".concat(t,".200"))(e),borderColor:te("".concat(t,".500"),"".concat(t,".200"))(e),color:te("white","gray.900")(e)},_disabled:{bg:te("gray.100","whiteAlpha.100")(e),borderColor:te("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:te("red.500","red.300")(e)}}},O1={_disabled:{cursor:"not-allowed"}},F1={userSelect:"none",_disabled:{opacity:.4}},D1={transitionProperty:"transform",transitionDuration:"normal"},N1=Hs(e=>({icon:D1,container:O1,control:lt(M1,e),label:F1})),j1={sm:Hs({control:{[_o.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:Hs({control:{[_o.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:Hs({control:{[_o.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},Tn=R1({baseStyle:N1,sizes:j1,defaultProps:{size:"md",colorScheme:"blue"}}),Ao=Je("close-button-size"),so=Je("close-button-bg"),B1={w:[Ao.reference],h:[Ao.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[so.variable]:"colors.blackAlpha.100",_dark:{[so.variable]:"colors.whiteAlpha.100"}},_active:{[so.variable]:"colors.blackAlpha.200",_dark:{[so.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:so.reference},L1={lg:{[Ao.variable]:"sizes.10",fontSize:"md"},md:{[Ao.variable]:"sizes.8",fontSize:"xs"},sm:{[Ao.variable]:"sizes.6",fontSize:"2xs"}},z1={baseStyle:B1,sizes:L1,defaultProps:{size:"md"}},{variants:V1,defaultProps:W1}=To,H1={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:Ge.bg.reference,color:Ge.color.reference,boxShadow:Ge.shadow.reference},U1={baseStyle:H1,variants:V1,defaultProps:W1},G1={w:"100%",mx:"auto",maxW:"prose",px:"4"},q1={baseStyle:G1},K1={opacity:.6,borderColor:"inherit"},X1={borderStyle:"solid"},Y1={borderStyle:"dashed"},Z1={solid:X1,dashed:Y1},J1={baseStyle:K1,variants:Z1,defaultProps:{variant:"solid"}},{definePartsStyle:yc,defineMultiStyleConfig:Q1}=De(Lx.keys),ga=ne("drawer-bg"),ba=ne("drawer-box-shadow");function dr(e){return yc(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}const ew={bg:"blackAlpha.600",zIndex:"modal"},tw={display:"flex",zIndex:"modal",justifyContent:"center"},nw=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[ga.variable]:"colors.white",[ba.variable]:"shadows.lg",_dark:{[ga.variable]:"colors.gray.700",[ba.variable]:"shadows.dark-lg"},bg:ga.reference,boxShadow:ba.reference}},rw={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},ow={position:"absolute",top:"2",insetEnd:"3"},sw={px:"6",py:"2",flex:"1",overflow:"auto"},iw={px:"6",py:"4"},aw=yc(e=>({overlay:ew,dialogContainer:tw,dialog:lt(nw,e),header:rw,closeButton:ow,body:sw,footer:iw})),cw={xs:dr("xs"),sm:dr("md"),md:dr("lg"),lg:dr("2xl"),xl:dr("4xl"),full:dr("full")},lw=Q1({baseStyle:aw,sizes:cw,defaultProps:{size:"xs"}}),{definePartsStyle:uw,defineMultiStyleConfig:dw}=De(zx.keys),fw={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},hw={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},pw={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},mw=uw({preview:fw,input:hw,textarea:pw}),gw=dw({baseStyle:mw}),{definePartsStyle:bw,defineMultiStyleConfig:yw}=De(Vx.keys),Rr=ne("form-control-color"),vw={marginStart:"1",[Rr.variable]:"colors.red.500",_dark:{[Rr.variable]:"colors.red.300"},color:Rr.reference},xw={mt:"2",[Rr.variable]:"colors.gray.600",_dark:{[Rr.variable]:"colors.whiteAlpha.600"},color:Rr.reference,lineHeight:"normal",fontSize:"sm"},Sw=bw({container:{width:"100%",position:"relative"},requiredIndicator:vw,helperText:xw}),ww=yw({baseStyle:Sw}),{definePartsStyle:kw,defineMultiStyleConfig:Cw}=De(Wx.keys),Mr=ne("form-error-color"),Pw={[Mr.variable]:"colors.red.500",_dark:{[Mr.variable]:"colors.red.300"},color:Mr.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},Tw={marginEnd:"0.5em",[Mr.variable]:"colors.red.500",_dark:{[Mr.variable]:"colors.red.300"},color:Mr.reference},_w=kw({text:Pw,icon:Tw}),Aw=Cw({baseStyle:_w}),Ew={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Iw={baseStyle:Ew},$w={fontFamily:"heading",fontWeight:"bold"},Rw={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},Mw={baseStyle:$w,sizes:Rw,defaultProps:{size:"xl"}},{definePartsStyle:sn,defineMultiStyleConfig:Ow}=De(Hx.keys),yr=ne("input-height"),vr=ne("input-font-size"),xr=ne("input-padding"),Sr=ne("input-border-radius"),Fw=sn({addon:{height:yr.reference,fontSize:vr.reference,px:xr.reference,borderRadius:Sr.reference},field:{width:"100%",height:yr.reference,fontSize:vr.reference,px:xr.reference,borderRadius:Sr.reference,minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),kn={lg:{[vr.variable]:"fontSizes.lg",[xr.variable]:"space.4",[Sr.variable]:"radii.md",[yr.variable]:"sizes.12"},md:{[vr.variable]:"fontSizes.md",[xr.variable]:"space.4",[Sr.variable]:"radii.md",[yr.variable]:"sizes.10"},sm:{[vr.variable]:"fontSizes.sm",[xr.variable]:"space.3",[Sr.variable]:"radii.sm",[yr.variable]:"sizes.8"},xs:{[vr.variable]:"fontSizes.xs",[xr.variable]:"space.2",[Sr.variable]:"radii.sm",[yr.variable]:"sizes.6"}},Dw={lg:sn({field:kn.lg,group:kn.lg}),md:sn({field:kn.md,group:kn.md}),sm:sn({field:kn.sm,group:kn.sm}),xs:sn({field:kn.xs,group:kn.xs})};function ul(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||te("blue.500","blue.300")(e),errorBorderColor:n||te("red.500","red.300")(e)}}const Nw=sn(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=ul(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:te("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:at(t,r),boxShadow:"0 0 0 1px ".concat(at(t,r))},_focusVisible:{zIndex:1,borderColor:at(t,n),boxShadow:"0 0 0 1px ".concat(at(t,n))}},addon:{border:"1px solid",borderColor:te("inherit","whiteAlpha.50")(e),bg:te("gray.100","whiteAlpha.300")(e)}}}),jw=sn(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=ul(e);return{field:{border:"2px solid",borderColor:"transparent",bg:te("gray.100","whiteAlpha.50")(e),_hover:{bg:te("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:at(t,r)},_focusVisible:{bg:"transparent",borderColor:at(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:te("gray.100","whiteAlpha.50")(e)}}}),Bw=sn(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=ul(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:at(t,r),boxShadow:"0px 1px 0px 0px ".concat(at(t,r))},_focusVisible:{borderColor:at(t,n),boxShadow:"0px 1px 0px 0px ".concat(at(t,n))}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),Lw=sn({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),zw={outline:Nw,filled:jw,flushed:Bw,unstyled:Lw},Te=Ow({baseStyle:Fw,sizes:Dw,variants:zw,defaultProps:{size:"md",variant:"outline"}}),ya=ne("kbd-bg"),Vw={[ya.variable]:"colors.gray.100",_dark:{[ya.variable]:"colors.whiteAlpha.100"},bg:ya.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},Ww={baseStyle:Vw},Hw={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Uw={baseStyle:Hw},{defineMultiStyleConfig:Gw,definePartsStyle:qw}=De(Ux.keys),Kw={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Xw=qw({icon:Kw}),Yw=Gw({baseStyle:Xw}),{defineMultiStyleConfig:Zw,definePartsStyle:Jw}=De(Gx.keys),zt=ne("menu-bg"),va=ne("menu-shadow"),Qw={[zt.variable]:"#fff",[va.variable]:"shadows.sm",_dark:{[zt.variable]:"colors.gray.700",[va.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:"dropdown",borderRadius:"md",borderWidth:"1px",bg:zt.reference,boxShadow:va.reference},ek={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[zt.variable]:"colors.gray.100",_dark:{[zt.variable]:"colors.whiteAlpha.100"}},_active:{[zt.variable]:"colors.gray.200",_dark:{[zt.variable]:"colors.whiteAlpha.200"}},_expanded:{[zt.variable]:"colors.gray.100",_dark:{[zt.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:zt.reference},tk={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},nk={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},rk={opacity:.6},ok={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},sk={transitionProperty:"common",transitionDuration:"normal"},ik=Jw({button:sk,list:Qw,item:ek,groupTitle:tk,icon:nk,command:rk,divider:ok}),ak=Zw({baseStyle:ik}),{defineMultiStyleConfig:ck,definePartsStyle:vc}=De(qx.keys),xa=ne("modal-bg"),Sa=ne("modal-shadow"),lk={bg:"blackAlpha.600",zIndex:"modal"},uk=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}},dk=e=>{const{isCentered:t,scrollBehavior:n}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:n==="inside"?"calc(100% - 7.5rem)":void 0,[xa.variable]:"colors.white",[Sa.variable]:"shadows.lg",_dark:{[xa.variable]:"colors.gray.700",[Sa.variable]:"shadows.dark-lg"},bg:xa.reference,boxShadow:Sa.reference}},fk={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},hk={position:"absolute",top:"2",insetEnd:"3"},pk=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},mk={px:"6",py:"4"},gk=vc(e=>({overlay:lk,dialogContainer:lt(uk,e),dialog:lt(dk,e),header:fk,closeButton:hk,body:lt(pk,e),footer:mk}));function Dt(e){return vc(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}const bk={xs:Dt("xs"),sm:Dt("sm"),md:Dt("md"),lg:Dt("lg"),xl:Dt("xl"),"2xl":Dt("2xl"),"3xl":Dt("3xl"),"4xl":Dt("4xl"),"5xl":Dt("5xl"),"6xl":Dt("6xl"),full:Dt("full")},yk=ck({baseStyle:gk,sizes:bk,defaultProps:{size:"md"}}),_p={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},{defineMultiStyleConfig:vk,definePartsStyle:Ap}=De(Kx.keys),dl=Je("number-input-stepper-width"),Ep=Je("number-input-input-padding"),xk=rn(dl).add("0.5rem").toString(),wa=Je("number-input-bg"),ka=Je("number-input-color"),Ca=Je("number-input-border-color"),Sk={[dl.variable]:"sizes.6",[Ep.variable]:xk},wk=e=>{var t,n;return(n=(t=lt(Te.baseStyle,e))==null?void 0:t.field)!=null?n:{}},kk={width:dl.reference},Ck={borderStart:"1px solid",borderStartColor:Ca.reference,color:ka.reference,bg:wa.reference,[ka.variable]:"colors.chakra-body-text",[Ca.variable]:"colors.chakra-border-color",_dark:{[ka.variable]:"colors.whiteAlpha.800",[Ca.variable]:"colors.whiteAlpha.300"},_active:{[wa.variable]:"colors.gray.200",_dark:{[wa.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Pk=Ap(e=>{var t;return{root:Sk,field:(t=lt(wk,e))!=null?t:{},stepperGroup:kk,stepper:Ck}});function ws(e){var s,i,a;const t=(s=Te.sizes)==null?void 0:s[e],n={lg:"md",md:"md",sm:"sm",xs:"sm"},r=(a=(i=t.field)==null?void 0:i.fontSize)!=null?a:"md",o=_p.fontSizes[r];return Ap({field:{...t.field,paddingInlineEnd:Ep.reference,verticalAlign:"top"},stepper:{fontSize:rn(o).multiply(.75).toString(),_first:{borderTopEndRadius:n[e]},_last:{borderBottomEndRadius:n[e],mt:"-1px",borderTopWidth:1}}})}const Tk={xs:ws("xs"),sm:ws("sm"),md:ws("md"),lg:ws("lg")},_k=vk({baseStyle:Pk,sizes:Tk,variants:Te.variants,defaultProps:Te.defaultProps});var gh;const Ak={...(gh=Te.baseStyle)==null?void 0:gh.field,textAlign:"center"},Ek={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}};var bh,yh;const Ik={outline:e=>{var t,n,r;return(r=(n=lt((t=Te.variants)==null?void 0:t.outline,e))==null?void 0:n.field)!=null?r:{}},flushed:e=>{var t,n,r;return(r=(n=lt((t=Te.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)!=null?r:{}},filled:e=>{var t,n,r;return(r=(n=lt((t=Te.variants)==null?void 0:t.filled,e))==null?void 0:n.field)!=null?r:{}},unstyled:(yh=(bh=Te.variants)==null?void 0:bh.unstyled.field)!=null?yh:{}},$k={baseStyle:Ak,sizes:Ek,variants:Ik,defaultProps:Te.defaultProps},{defineMultiStyleConfig:Rk,definePartsStyle:Mk}=De(Xx.keys),ks=Je("popper-bg"),Ok=Je("popper-arrow-bg"),rd=Je("popper-arrow-shadow-color"),Fk={zIndex:"popover"},Dk={[ks.variable]:"colors.white",bg:ks.reference,[Ok.variable]:ks.reference,[rd.variable]:"colors.gray.200",_dark:{[ks.variable]:"colors.gray.700",[rd.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Nk={px:3,py:2,borderBottomWidth:"1px"},jk={px:3,py:2},Bk={px:3,py:2,borderTopWidth:"1px"},Lk={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},zk=Mk({popper:Fk,content:Dk,header:Nk,body:jk,footer:Bk,closeButton:Lk}),Vk=Rk({baseStyle:zk}),{defineMultiStyleConfig:Wk,definePartsStyle:bo}=De(Yx.keys),Hk=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:o}=e,s=te(Ju(),Ju("1rem","rgba(0,0,0,0.1)"))(e),i=te("".concat(t,".500"),"".concat(t,".200"))(e),a="linear-gradient(\n to right,\n transparent 0%,\n ".concat(at(n,i)," 50%,\n transparent 100%\n )");return{...!r&&o&&s,...r?{bgImage:a}:{bgColor:i}}},Uk={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Gk=e=>({bg:te("gray.100","whiteAlpha.300")(e)}),qk=e=>({transitionProperty:"common",transitionDuration:"slow",...Hk(e)}),Kk=bo(e=>({label:Uk,filledTrack:qk(e),track:Gk(e)})),Xk={xs:bo({track:{h:"1"}}),sm:bo({track:{h:"2"}}),md:bo({track:{h:"3"}}),lg:bo({track:{h:"4"}})},Yk=Wk({sizes:Xk,baseStyle:Kk,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Zk,definePartsStyle:Us}=De(Zx.keys),Jk=e=>{var n;const t=(n=lt(Tn.baseStyle,e))==null?void 0:n.control;return{...t,borderRadius:"full",_checked:{...t==null?void 0:t._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},Qk=Us(e=>{var t,n;return{label:(t=Tn.baseStyle)==null?void 0:t.call(Tn,e).label,container:(n=Tn.baseStyle)==null?void 0:n.call(Tn,e).container,control:Jk(e)}}),eC={md:Us({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:Us({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:Us({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},tC=Zk({baseStyle:Qk,sizes:eC,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:nC,definePartsStyle:rC}=De(Jx.keys),Cs=ne("select-bg");var vh;const oC={...(vh=Te.baseStyle)==null?void 0:vh.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:Cs.reference,[Cs.variable]:"colors.white",_dark:{[Cs.variable]:"colors.gray.700"},"> option, > optgroup":{bg:Cs.reference}},sC={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},iC=rC({field:oC,icon:sC}),Ps={paddingInlineEnd:"8"};var xh,Sh,wh,kh,Ch,Ph,Th,_h;const aC={lg:{...(xh=Te.sizes)==null?void 0:xh.lg,field:{...(Sh=Te.sizes)==null?void 0:Sh.lg.field,...Ps}},md:{...(wh=Te.sizes)==null?void 0:wh.md,field:{...(kh=Te.sizes)==null?void 0:kh.md.field,...Ps}},sm:{...(Ch=Te.sizes)==null?void 0:Ch.sm,field:{...(Ph=Te.sizes)==null?void 0:Ph.sm.field,...Ps}},xs:{...(Th=Te.sizes)==null?void 0:Th.xs,field:{...(_h=Te.sizes)==null?void 0:_h.xs.field,...Ps},icon:{insetEnd:"1"}}},cC=nC({baseStyle:iC,sizes:aC,variants:Te.variants,defaultProps:Te.defaultProps}),Pa=ne("skeleton-start-color"),Ta=ne("skeleton-end-color"),lC={[Pa.variable]:"colors.gray.100",[Ta.variable]:"colors.gray.400",_dark:{[Pa.variable]:"colors.gray.800",[Ta.variable]:"colors.gray.600"},background:Pa.reference,borderColor:Ta.reference,opacity:.7,borderRadius:"sm"},uC={baseStyle:lC},_a=ne("skip-link-bg"),dC={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[_a.variable]:"colors.white",_dark:{[_a.variable]:"colors.gray.700"},bg:_a.reference}},fC={baseStyle:dC},{defineMultiStyleConfig:hC,definePartsStyle:_i}=De(Qx.keys),Qn=ne("slider-thumb-size"),Bo=ne("slider-track-size"),An=ne("slider-bg"),pC=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...cl({orientation:t,vertical:{h:"100%",px:nn(Qn.reference).divide(2).toString()},horizontal:{w:"100%",py:nn(Qn.reference).divide(2).toString()}})}},mC=e=>({...cl({orientation:e.orientation,horizontal:{h:Bo.reference},vertical:{w:Bo.reference}}),overflow:"hidden",borderRadius:"sm",[An.variable]:"colors.gray.200",_dark:{[An.variable]:"colors.whiteAlpha.200"},_disabled:{[An.variable]:"colors.gray.300",_dark:{[An.variable]:"colors.whiteAlpha.300"}},bg:An.reference}),gC=e=>{const{orientation:t}=e;return{...cl({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:Qn.reference,h:Qn.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},bC=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[An.variable]:"colors.".concat(t,".500"),_dark:{[An.variable]:"colors.".concat(t,".200")},bg:An.reference}},yC=_i(e=>({container:pC(e),track:mC(e),thumb:gC(e),filledTrack:bC(e)})),vC=_i({container:{[Qn.variable]:"sizes.4",[Bo.variable]:"sizes.1"}}),xC=_i({container:{[Qn.variable]:"sizes.3.5",[Bo.variable]:"sizes.1"}}),SC=_i({container:{[Qn.variable]:"sizes.2.5",[Bo.variable]:"sizes.0.5"}}),wC={lg:vC,md:xC,sm:SC},kC=hC({baseStyle:yC,sizes:wC,defaultProps:{size:"md",colorScheme:"blue"}}),Vn=Je("spinner-size"),CC={width:[Vn.reference],height:[Vn.reference]},PC={xs:{[Vn.variable]:"sizes.3"},sm:{[Vn.variable]:"sizes.4"},md:{[Vn.variable]:"sizes.6"},lg:{[Vn.variable]:"sizes.8"},xl:{[Vn.variable]:"sizes.12"}},TC={baseStyle:CC,sizes:PC,defaultProps:{size:"md"}},{defineMultiStyleConfig:_C,definePartsStyle:Ip}=De(eS.keys),AC={fontWeight:"medium"},EC={opacity:.8,marginBottom:"2"},IC={verticalAlign:"baseline",fontWeight:"semibold"},$C={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},RC=Ip({container:{},label:AC,helpText:EC,number:IC,icon:$C}),MC={md:Ip({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},OC=_C({baseStyle:RC,sizes:MC,defaultProps:{size:"md"}}),{defineMultiStyleConfig:FC,definePartsStyle:yo}=De(["stepper","step","title","description","indicator","separator","icon","number"]),on=ne("stepper-indicator-size"),wr=ne("stepper-icon-size"),kr=ne("stepper-title-font-size"),vo=ne("stepper-description-font-size"),io=ne("stepper-accent-color"),DC=yo(({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[io.variable]:"colors.".concat(e,".500"),_dark:{[io.variable]:"colors.".concat(e,".200")}},title:{fontSize:kr.reference,fontWeight:"medium"},description:{fontSize:vo.reference,color:"chakra-subtle-text"},number:{fontSize:kr.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:wr.reference,height:wr.reference},indicator:{flexShrink:0,borderRadius:"full",width:on.reference,height:on.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:io.reference},"&[data-status=complete]":{bg:io.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:io.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:"calc(100% - ".concat(on.reference," - 8px)"),top:"calc(".concat(on.reference," + 4px)"),insetStart:"calc(".concat(on.reference," / 2 - 1px)")}}})),NC=FC({baseStyle:DC,sizes:{xs:yo({stepper:{[on.variable]:"sizes.4",[wr.variable]:"sizes.3",[kr.variable]:"fontSizes.xs",[vo.variable]:"fontSizes.xs"}}),sm:yo({stepper:{[on.variable]:"sizes.6",[wr.variable]:"sizes.4",[kr.variable]:"fontSizes.sm",[vo.variable]:"fontSizes.xs"}}),md:yo({stepper:{[on.variable]:"sizes.8",[wr.variable]:"sizes.5",[kr.variable]:"fontSizes.md",[vo.variable]:"fontSizes.sm"}}),lg:yo({stepper:{[on.variable]:"sizes.10",[wr.variable]:"sizes.6",[kr.variable]:"fontSizes.lg",[vo.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:jC,definePartsStyle:Gs}=De(tS.keys),Eo=Je("switch-track-width"),qn=Je("switch-track-height"),Aa=Je("switch-track-diff"),BC=rn.subtract(Eo,qn),xc=Je("switch-thumb-x"),ao=Je("switch-bg"),LC=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Eo.reference],height:[qn.reference],transitionProperty:"common",transitionDuration:"fast",[ao.variable]:"colors.gray.300",_dark:{[ao.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[ao.variable]:"colors.".concat(t,".500"),_dark:{[ao.variable]:"colors.".concat(t,".200")}},bg:ao.reference}},zC={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[qn.reference],height:[qn.reference],_checked:{transform:"translateX(".concat(xc.reference,")")}},VC=Gs(e=>({container:{[Aa.variable]:BC,[xc.variable]:Aa.reference,_rtl:{[xc.variable]:rn(Aa).negate().toString()}},track:LC(e),thumb:zC})),WC={sm:Gs({container:{[Eo.variable]:"1.375rem",[qn.variable]:"sizes.3"}}),md:Gs({container:{[Eo.variable]:"1.875rem",[qn.variable]:"sizes.4"}}),lg:Gs({container:{[Eo.variable]:"2.875rem",[qn.variable]:"sizes.6"}})},HC=jC({baseStyle:VC,sizes:WC,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:UC,definePartsStyle:Or}=De(nS.keys),GC=Or({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),li={"&[data-is-numeric=true]":{textAlign:"end"}},qC=Or(e=>{const{colorScheme:t}=e;return{th:{color:te("gray.600","gray.400")(e),borderBottom:"1px",borderColor:te("".concat(t,".100"),"".concat(t,".700"))(e),...li},td:{borderBottom:"1px",borderColor:te("".concat(t,".100"),"".concat(t,".700"))(e),...li},caption:{color:te("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),KC=Or(e=>{const{colorScheme:t}=e;return{th:{color:te("gray.600","gray.400")(e),borderBottom:"1px",borderColor:te("".concat(t,".100"),"".concat(t,".700"))(e),...li},td:{borderBottom:"1px",borderColor:te("".concat(t,".100"),"".concat(t,".700"))(e),...li},caption:{color:te("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:te("".concat(t,".100"),"".concat(t,".700"))(e)},td:{background:te("".concat(t,".100"),"".concat(t,".700"))(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),XC={simple:qC,striped:KC,unstyled:{}},YC={sm:Or({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:Or({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:Or({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},ZC=UC({baseStyle:GC,variants:XC,sizes:YC,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),ft=ne("tabs-color"),Nt=ne("tabs-bg"),Ts=ne("tabs-border-color"),{defineMultiStyleConfig:JC,definePartsStyle:Gt}=De(rS.keys),QC=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},eP=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},tP=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},nP={p:4},rP=Gt(e=>({root:QC(e),tab:eP(e),tablist:tP(e),tabpanel:nP})),oP={sm:Gt({tab:{py:1,px:4,fontSize:"sm"}}),md:Gt({tab:{fontSize:"md",py:2,px:4}}),lg:Gt({tab:{fontSize:"lg",py:3,px:4}})},sP=Gt(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",o=r?"borderStart":"borderBottom",s=r?"marginStart":"marginBottom";return{tablist:{[o]:"2px solid",borderColor:"inherit"},tab:{[o]:"2px solid",borderColor:"transparent",[s]:"-2px",_selected:{[ft.variable]:"colors.".concat(t,".600"),_dark:{[ft.variable]:"colors.".concat(t,".300")},borderColor:"currentColor"},_active:{[Nt.variable]:"colors.gray.200",_dark:{[Nt.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:ft.reference,bg:Nt.reference}}}),iP=Gt(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Ts.variable]:"transparent",_selected:{[ft.variable]:"colors.".concat(t,".600"),[Ts.variable]:"colors.white",_dark:{[ft.variable]:"colors.".concat(t,".300"),[Ts.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Ts.reference},color:ft.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),aP=Gt(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[Nt.variable]:"colors.gray.50",_dark:{[Nt.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[Nt.variable]:"colors.white",[ft.variable]:"colors.".concat(t,".600"),_dark:{[Nt.variable]:"colors.gray.800",[ft.variable]:"colors.".concat(t,".300")},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:ft.reference,bg:Nt.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),cP=Gt(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:at(n,"".concat(t,".700")),bg:at(n,"".concat(t,".100"))}}}}),lP=Gt(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[ft.variable]:"colors.gray.600",_dark:{[ft.variable]:"inherit"},_selected:{[ft.variable]:"colors.white",[Nt.variable]:"colors.".concat(t,".600"),_dark:{[ft.variable]:"colors.gray.800",[Nt.variable]:"colors.".concat(t,".300")}},color:ft.reference,bg:Nt.reference}}}),uP=Gt({}),dP={line:sP,enclosed:iP,"enclosed-colored":aP,"soft-rounded":cP,"solid-rounded":lP,unstyled:uP},fP=JC({baseStyle:rP,sizes:oP,variants:dP,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:hP,definePartsStyle:Kn}=De(oS.keys),od=ne("tag-bg"),sd=ne("tag-color"),Ea=ne("tag-shadow"),qs=ne("tag-min-height"),Ks=ne("tag-min-width"),Xs=ne("tag-font-size"),Ys=ne("tag-padding-inline"),pP={fontWeight:"medium",lineHeight:1.2,outline:0,[sd.variable]:Ge.color.reference,[od.variable]:Ge.bg.reference,[Ea.variable]:Ge.shadow.reference,color:sd.reference,bg:od.reference,boxShadow:Ea.reference,borderRadius:"md",minH:qs.reference,minW:Ks.reference,fontSize:Xs.reference,px:Ys.reference,_focusVisible:{[Ea.variable]:"shadows.outline"}},mP={lineHeight:1.2,overflow:"visible"},gP={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},bP=Kn({container:pP,label:mP,closeButton:gP}),yP={sm:Kn({container:{[qs.variable]:"sizes.5",[Ks.variable]:"sizes.5",[Xs.variable]:"fontSizes.xs",[Ys.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Kn({container:{[qs.variable]:"sizes.6",[Ks.variable]:"sizes.6",[Xs.variable]:"fontSizes.sm",[Ys.variable]:"space.2"}}),lg:Kn({container:{[qs.variable]:"sizes.8",[Ks.variable]:"sizes.8",[Xs.variable]:"fontSizes.md",[Ys.variable]:"space.3"}})},vP={subtle:Kn(e=>{var t;return{container:(t=To.variants)==null?void 0:t.subtle(e)}}),solid:Kn(e=>{var t;return{container:(t=To.variants)==null?void 0:t.solid(e)}}),outline:Kn(e=>{var t;return{container:(t=To.variants)==null?void 0:t.outline(e)}})},xP=hP({variants:vP,baseStyle:bP,sizes:yP,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}});var Ah;const SP={...(Ah=Te.baseStyle)==null?void 0:Ah.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"};var Eh,Ih;const wP={outline:e=>{var t,n;return(n=(t=Te.variants)==null?void 0:t.outline(e).field)!=null?n:{}},flushed:e=>{var t,n;return(n=(t=Te.variants)==null?void 0:t.flushed(e).field)!=null?n:{}},filled:e=>{var t,n;return(n=(t=Te.variants)==null?void 0:t.filled(e).field)!=null?n:{}},unstyled:(Ih=(Eh=Te.variants)==null?void 0:Eh.unstyled.field)!=null?Ih:{}};var $h,Rh,Mh,Oh,Fh,Dh,Nh,jh;const kP={xs:(Rh=($h=Te.sizes)==null?void 0:$h.xs.field)!=null?Rh:{},sm:(Oh=(Mh=Te.sizes)==null?void 0:Mh.sm.field)!=null?Oh:{},md:(Dh=(Fh=Te.sizes)==null?void 0:Fh.md.field)!=null?Dh:{},lg:(jh=(Nh=Te.sizes)==null?void 0:Nh.lg.field)!=null?jh:{}},CP={baseStyle:SP,sizes:kP,variants:wP,defaultProps:{size:"md",variant:"outline"}},_s=Je("tooltip-bg"),Ia=Je("tooltip-fg"),PP=Je("popper-arrow-bg"),TP={bg:_s.reference,color:Ia.reference,[_s.variable]:"colors.gray.700",[Ia.variable]:"colors.whiteAlpha.900",_dark:{[_s.variable]:"colors.gray.300",[Ia.variable]:"colors.gray.900"},[PP.variable]:_s.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},_P={baseStyle:TP},AP={Accordion:hS,Alert:YS,Avatar:a1,Badge:To,Breadcrumb:b1,Button:T1,Checkbox:Tn,CloseButton:z1,Code:U1,Container:q1,Divider:J1,Drawer:lw,Editable:gw,Form:ww,FormError:Aw,FormLabel:Iw,Heading:Mw,Input:Te,Kbd:Ww,Link:Uw,List:Yw,Menu:ak,Modal:yk,NumberInput:_k,PinInput:$k,Popover:Vk,Progress:Yk,Radio:tC,Select:cC,Skeleton:uC,SkipLink:fC,Slider:kC,Spinner:TC,Stat:OC,Switch:HC,Table:ZC,Tabs:fP,Tag:xP,Textarea:CP,Tooltip:_P,Card:$1,Stepper:NC},EP={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},IP={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},$P={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"}},RP={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},MP={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},OP={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},FP={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},DP={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},NP={property:OP,easing:FP,duration:DP},jP={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},BP={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},LP={breakpoints:IP,zIndices:jP,radii:RP,blur:BP,colors:$P,..._p,sizes:Sp,shadows:MP,space:xp,borders:EP,transition:NP},zP={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},VP={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color"}}},WP=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function HP(e){return ct(e)?WP.every(t=>Object.prototype.hasOwnProperty.call(e,t)):!1}const UP="ltr",GP={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},$p={semanticTokens:zP,direction:UP,...LP,components:AP,styles:VP,config:GP};function qP(e){if(e.sheet)return e.sheet;for(var t=0;t0?nt(Zr,--gt):0,zr--,Ke===10&&(zr=1,Ei--),Ke}function St(){return Ke=gt2||zo(Ke)>3?"":" "}function iT(e,t){for(;--t&&St()&&!(Ke<48||Ke>102||Ke>57&&Ke<65||Ke>70&&Ke<97););return ns(e,Zs()+(t<6&&qt()==32&&St()==32))}function wc(e){for(;St();)switch(Ke){case e:return gt;case 34:case 39:e!==34&&e!==39&&wc(Ke);break;case 40:e===41&&wc(e);break;case 92:St();break}return gt}function aT(e,t){for(;St()&&e+Ke!==57;)if(e+Ke===84&&qt()===47)break;return"/*"+ns(t,gt-1)+"*"+Ai(e===47?e:St())}function cT(e){for(;!zo(qt());)St();return ns(e,gt)}function lT(e){return Np(Qs("",null,null,null,[""],e=Dp(e),0,[0],e))}function Qs(e,t,n,r,o,s,i,a,c){for(var l=0,u=0,d=i,h=0,p=0,m=0,g=1,b=1,w=1,y=0,x="",P=o,k=s,A=r,T=x;b;)switch(m=y,y=St()){case 40:if(m!=108&&nt(T,d-1)==58){Sc(T+=Pe(Js(y),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:T+=Js(y);break;case 9:case 10:case 13:case 32:T+=sT(m);break;case 92:T+=iT(Zs()-1,7);continue;case 47:switch(qt()){case 42:case 47:As(uT(aT(St(),Zs()),t,n),c);break;default:T+="/"}break;case 123*g:a[l++]=Vt(T)*w;case 125*g:case 59:case 0:switch(y){case 0:case 125:b=0;case 59+u:w==-1&&(T=Pe(T,/\f/g,"")),p>0&&Vt(T)-d&&As(p>32?ad(T+";",r,n,d-1):ad(Pe(T," ","")+";",r,n,d-2),c);break;case 59:T+=";";default:if(As(A=id(T,t,n,l,u,o,a,x,P=[],k=[],d),s),y===123)if(u===0)Qs(T,t,A,A,P,s,d,a,k);else switch(h===99&&nt(T,3)===110?100:h){case 100:case 108:case 109:case 115:Qs(e,A,A,r&&As(id(e,A,A,0,0,o,a,x,o,P=[],d),k),o,k,d,a,r?P:k);break;default:Qs(T,A,A,A,[""],k,0,a,k)}}l=u=p=0,g=w=1,x=T="",d=i;break;case 58:d=1+Vt(T),p=m;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&oT()==125)continue}switch(T+=Ai(y),y*g){case 38:w=u>0?1:(T+="\f",-1);break;case 44:a[l++]=(Vt(T)-1)*w,w=1;break;case 64:qt()===45&&(T+=Js(St())),h=qt(),u=d=Vt(x=T+=cT(Zs())),y++;break;case 45:m===45&&Vt(T)==2&&(g=0)}}return s}function id(e,t,n,r,o,s,i,a,c,l,u){for(var d=o-1,h=o===0?s:[""],p=pl(h),m=0,g=0,b=0;m0?h[w]+" "+y:Pe(y,/&\f/g,h[w])))&&(c[b++]=x);return Ii(e,t,n,o===0?fl:a,c,l,u)}function uT(e,t,n){return Ii(e,t,n,Rp,Ai(rT()),Lo(e,2,-2),0)}function ad(e,t,n,r){return Ii(e,t,n,hl,Lo(e,0,r),Lo(e,r+1,-1),r)}function Fr(e,t){for(var n="",r=pl(e),o=0;o6)switch(nt(e,t+1)){case 109:if(nt(e,t+4)!==45)break;case 102:return Pe(e,/(.+:)(.+)-([^]+)/,"$1"+Ce+"$2-$3$1"+ui+(nt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Sc(e,"stretch")?Bp(Pe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(nt(e,t+1)!==115)break;case 6444:switch(nt(e,Vt(e)-3-(~Sc(e,"!important")&&10))){case 107:return Pe(e,":",":"+Ce)+e;case 101:return Pe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ce+(nt(e,14)===45?"inline-":"")+"box$3$1"+Ce+"$2$3$1"+rt+"$2box$3")+e}break;case 5936:switch(nt(e,t+11)){case 114:return Ce+e+rt+Pe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ce+e+rt+Pe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ce+e+rt+Pe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ce+e+rt+e+e}return e}var vT=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case hl:t.return=Bp(t.value,t.length);break;case Mp:return Fr([co(t,{value:Pe(t.value,"@","@"+Ce)})],o);case fl:if(t.length)return nT(t.props,function(s){switch(tT(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Fr([co(t,{props:[Pe(s,/:(read-\w+)/,":"+ui+"$1")]})],o);case"::placeholder":return Fr([co(t,{props:[Pe(s,/:(plac\w+)/,":"+Ce+"input-$1")]}),co(t,{props:[Pe(s,/:(plac\w+)/,":"+ui+"$1")]}),co(t,{props:[Pe(s,/:(plac\w+)/,rt+"input-$1")]})],o)}return""})}},xT=[vT],ST=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var b=g.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var o=t.stylisPlugins||xT,s={},i,a=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var b=g.getAttribute("data-emotion").split(" "),w=1;w=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var _T={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,scale: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},AT=/[A-Z]|^ms/g,ET=/_EMO_([^_]+?)_([^]*?)_EMO_/g,zp=function(t){return t.charCodeAt(1)===45},hd=function(t){return t!=null&&typeof t!="boolean"},Ma=jp(function(e){return zp(e)?e:e.replace(AT,"-$&").toLowerCase()}),pd=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(ET,function(r,o,s){return Wt={name:o,styles:s,next:Wt},o})}return _T[t]!==1&&!zp(t)&&typeof n=="number"&&n!==0?n+"px":n};function Vo(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return Wt={name:o.name,styles:o.styles,next:Wt},o.name;var s=n;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)Wt={name:i.name,styles:i.styles,next:Wt},i=i.next;var a=s.styles+";";return a}return IT(e,t,n)}case"function":{if(e!==void 0){var c=Wt,l=n(e);return Wt=c,Vo(e,t,l)}break}}var u=n;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function IT(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o{const s=t?r.preventTransition():void 0;document.documentElement.dataset.theme=o,document.documentElement.style.colorScheme=o,s==null||s()},setClassName(o){document.body.classList.add(o?Es.dark:Es.light),document.body.classList.remove(o?Es.light:Es.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(o){var i;return((i=r.query().matches)!=null?i:o==="dark")?"dark":"light"},addListener(o){const s=r.query(),i=a=>{o(a.matches?"dark":"light")};return typeof s.addListener=="function"?s.addListener(i):s.addEventListener("change",i),()=>{typeof s.removeListener=="function"?s.removeListener(i):s.removeEventListener("change",i)}},preventTransition(){const o=document.createElement("style");return o.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),n!==void 0&&(o.nonce=n),document.head.appendChild(o),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(o)})})}}};return r}const zT="chakra-ui-color-mode";function VT(e){return{ssr:!1,type:"localStorage",get(t){if(!(globalThis!=null&&globalThis.document))return t;let n;try{n=localStorage.getItem(e)||t}catch(r){}return n||t},set(t){try{localStorage.setItem(e,t)}catch(n){}}}}const WT=VT(zT),yd=()=>{},HT=dv()?f.useLayoutEffect:f.useEffect;function vd(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}const Up=Ri(function(t,n){const{value:r,children:o,options:{useSystemColorMode:s,initialColorMode:i,disableTransitionOnChange:a}={},colorModeManager:c=WT}=t,l=i==="dark"?"dark":"light",[u,d]=f.useState(()=>vd(c,l)),[h,p]=f.useState(()=>vd(c)),{getSystemTheme:m,setClassName:g,setDataset:b,addListener:w}=f.useMemo(()=>LT({preventTransition:a,nonce:n==null?void 0:n.nonce}),[a,n==null?void 0:n.nonce]),y=i==="system"&&!u?h:u,x=f.useCallback(A=>{const T=A==="system"?m():A;d(T),g(T==="dark"),b(T),c.set(T)},[c,m,g,b]);HT(()=>{i==="system"&&p(m())},[]),f.useEffect(()=>{const A=c.get();if(A){x(A);return}if(i==="system"){x("system");return}x(l)},[c,l,i,x]);const P=f.useCallback(()=>{x(y==="dark"?"light":"dark")},[y,x]);f.useEffect(()=>{if(s)return w(x)},[s,w,x]);const k=f.useMemo(()=>({colorMode:r!=null?r:y,toggleColorMode:r?yd:P,setColorMode:r?yd:x,forced:r!==void 0}),[y,P,x,r]);return v.jsx(yl.Provider,{value:k,children:o})});Up.displayName="ColorModeProvider";const Gp=String.raw;var Bh;const qp=Gp(Bh||(Bh=ca(["\n :root,\n :host {\n --chakra-vh: 100vh;\n }\n\n @supports (height: -webkit-fill-available) {\n :root,\n :host {\n --chakra-vh: -webkit-fill-available;\n }\n }\n\n @supports (height: -moz-fill-available) {\n :root,\n :host {\n --chakra-vh: -moz-fill-available;\n }\n }\n\n @supports (height: 100dvh) {\n :root,\n :host {\n --chakra-vh: 100dvh;\n }\n }\n"]))),UT=()=>v.jsx(Mi,{styles:qp});var Lh;const GT=({scope:e=""})=>v.jsx(Mi,{styles:Gp(Lh||(Lh=ca(['\n html {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n font-family: system-ui, sans-serif;\n -webkit-font-smoothing: antialiased;\n text-rendering: optimizeLegibility;\n -moz-osx-font-smoothing: grayscale;\n touch-action: manipulation;\n }\n\n body {\n position: relative;\n min-height: 100%;\n margin: 0;\n font-feature-settings: "kern";\n }\n\n '," :where(*, *::before, *::after) {\n border-width: 0;\n border-style: solid;\n box-sizing: border-box;\n word-wrap: break-word;\n }\n\n main {\n display: block;\n }\n\n "," hr {\n border-top-width: 1px;\n box-sizing: content-box;\n height: 0;\n overflow: visible;\n }\n\n "," :where(pre, code, kbd,samp) {\n font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;\n font-size: 1em;\n }\n\n "," a {\n background-color: transparent;\n color: inherit;\n text-decoration: inherit;\n }\n\n "," abbr[title] {\n border-bottom: none;\n text-decoration: underline;\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n\n "," :where(b, strong) {\n font-weight: bold;\n }\n\n "," small {\n font-size: 80%;\n }\n\n "," :where(sub,sup) {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n\n "," sub {\n bottom: -0.25em;\n }\n\n "," sup {\n top: -0.5em;\n }\n\n "," img {\n border-style: none;\n }\n\n "," :where(button, input, optgroup, select, textarea) {\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n }\n\n "," :where(button, input) {\n overflow: visible;\n }\n\n "," :where(button, select) {\n text-transform: none;\n }\n\n ",' :where(\n button::-moz-focus-inner,\n [type="button"]::-moz-focus-inner,\n [type="reset"]::-moz-focus-inner,\n [type="submit"]::-moz-focus-inner\n ) {\n border-style: none;\n padding: 0;\n }\n\n '," fieldset {\n padding: 0.35em 0.75em 0.625em;\n }\n\n "," legend {\n box-sizing: border-box;\n color: inherit;\n display: table;\n max-width: 100%;\n padding: 0;\n white-space: normal;\n }\n\n "," progress {\n vertical-align: baseline;\n }\n\n "," textarea {\n overflow: auto;\n }\n\n ",' :where([type="checkbox"], [type="radio"]) {\n box-sizing: border-box;\n padding: 0;\n }\n\n ',' input[type="number"]::-webkit-inner-spin-button,\n ',' input[type="number"]::-webkit-outer-spin-button {\n -webkit-appearance: none !important;\n }\n\n ',' input[type="number"] {\n -moz-appearance: textfield;\n }\n\n ',' input[type="search"] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n }\n\n ',' input[type="search"]::-webkit-search-decoration {\n -webkit-appearance: none !important;\n }\n\n '," ::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n }\n\n "," details {\n display: block;\n }\n\n "," summary {\n display: list-item;\n }\n\n template {\n display: none;\n }\n\n [hidden] {\n display: none !important;\n }\n\n "," :where(\n blockquote,\n dl,\n dd,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n hr,\n figure,\n p,\n pre\n ) {\n margin: 0;\n }\n\n "," button {\n background: transparent;\n padding: 0;\n }\n\n "," fieldset {\n margin: 0;\n padding: 0;\n }\n\n "," :where(ol, ul) {\n margin: 0;\n padding: 0;\n }\n\n "," textarea {\n resize: vertical;\n }\n\n ",' :where(button, [role="button"]) {\n cursor: pointer;\n }\n\n '," button::-moz-focus-inner {\n border: 0 !important;\n }\n\n "," table {\n border-collapse: collapse;\n }\n\n "," :where(h1, h2, h3, h4, h5, h6) {\n font-size: inherit;\n font-weight: inherit;\n }\n\n "," :where(button, input, optgroup, select, textarea) {\n padding: 0;\n line-height: inherit;\n color: inherit;\n }\n\n "," :where(img, svg, video, canvas, audio, iframe, embed, object) {\n display: block;\n }\n\n "," :where(img, video) {\n max-width: 100%;\n height: auto;\n }\n\n [data-js-focus-visible]\n :focus:not([data-focus-visible-added]):not(\n [data-focus-visible-disabled]\n ) {\n outline: none;\n box-shadow: none;\n }\n\n "," select::-ms-expand {\n display: none;\n }\n\n ","\n "])),e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,qp)});function qT(e){const{cssVarsRoot:t,theme:n,children:r}=e,o=f.useMemo(()=>Ox(n),[n]);return v.jsxs(OT,{theme:o,children:[v.jsx(KT,{root:t}),r]})}function KT({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return v.jsx(Mi,{styles:n=>({[t]:n.__cssVars})})}Ee({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function XT(){const{colorMode:e}=Fi();return v.jsx(Mi,{styles:t=>{const n=Zh(t,"styles.global"),r=ht(n,{theme:t,colorMode:e});return r?gp(r)(t):void 0}})}const[YT,ZT]=Ee({strict:!1,name:"PortalManagerContext"});function Kp(e){const{children:t,zIndex:n}=e;return v.jsx(YT,{value:{zIndex:n},children:t})}Kp.displayName="PortalManager";const Xp=f.createContext({getDocument(){return document},getWindow(){return window}});Xp.displayName="EnvironmentContext";function Yp(e){const{children:t,environment:n,disabled:r}=e,o=f.useRef(null),s=f.useMemo(()=>n||{getDocument:()=>{var a,c;return(c=(a=o.current)==null?void 0:a.ownerDocument)!=null?c:document},getWindow:()=>{var a,c;return(c=(a=o.current)==null?void 0:a.ownerDocument.defaultView)!=null?c:window}},[n]),i=!r||!n;return v.jsxs(Xp.Provider,{value:s,children:[t,i&&v.jsx("span",{id:"__chakra_env",hidden:!0,ref:o})]})}Yp.displayName="EnvironmentProvider";const JT=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetScope:o,resetCSS:s=!0,theme:i={},environment:a,cssVarsRoot:c,disableEnvironment:l,disableGlobalStyle:u}=e,d=v.jsx(Yp,{environment:a,disabled:l,children:t});return v.jsx(qT,{theme:i,cssVarsRoot:c,children:v.jsxs(Up,{colorModeManager:n,options:i.config,children:[s?v.jsx(GT,{scope:o}):v.jsx(UT,{}),!u&&v.jsx(XT,{}),r?v.jsx(Kp,{zIndex:r,children:d}):d]})})},Zp=f.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Di=f.createContext({}),rs=f.createContext(null),Ni=typeof document<"u",vl=Ni?f.useLayoutEffect:f.useEffect,Jp=f.createContext({strict:!1}),xl=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),QT="framerAppearId",Qp="data-"+xl(QT);function e_(e,t,n,r){const{visualElement:o}=f.useContext(Di),s=f.useContext(Jp),i=f.useContext(rs),a=f.useContext(Zp).reducedMotion,c=f.useRef();r=r||s.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:o,props:n,presenceContext:i,blockInitialAnimation:i?i.initial===!1:!1,reducedMotionConfig:a}));const l=c.current;f.useInsertionEffect(()=>{l&&l.update(n,i)});const u=f.useRef(!!(n[Qp]&&!window.HandoffComplete));return vl(()=>{l&&(l.render(),u.current&&l.animationState&&l.animationState.animateChanges())}),f.useEffect(()=>{l&&(l.updateFeatures(),!u.current&&l.animationState&&l.animationState.animateChanges(),u.current&&(u.current=!1,window.HandoffComplete=!0))}),l}function Cr(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function t_(e,t,n){return f.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Cr(n)&&(n.current=r))},[t])}function Wo(e){return typeof e=="string"||Array.isArray(e)}function ji(e){return typeof e=="object"&&typeof e.start=="function"}const Sl=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wl=["initial",...Sl];function Bi(e){return ji(e.animate)||wl.some(t=>Wo(e[t]))}function em(e){return!!(Bi(e)||e.variants)}function n_(e,t){if(Bi(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Wo(n)?n:void 0,animate:Wo(r)?r:void 0}}return e.inherit!==!1?t:{}}function r_(e){const{initial:t,animate:n}=n_(e,f.useContext(Di));return f.useMemo(()=>({initial:t,animate:n}),[xd(t),xd(n)])}function xd(e){return Array.isArray(e)?e.join(" "):e}const Sd={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ho={};for(const e in Sd)Ho[e]={isEnabled:t=>Sd[e].some(n=>!!t[n])};function o_(e){for(const t in e)Ho[t]={...Ho[t],...e[t]}}const kl=f.createContext({}),tm=f.createContext({}),s_=Symbol.for("motionComponentSymbol");function i_({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&o_(e);function s(a,c){let l;const u={...f.useContext(Zp),...a,layoutId:a_(a)},{isStatic:d}=u,h=r_(a),p=r(a,d);if(!d&&Ni){h.visualElement=e_(o,p,u,t);const m=f.useContext(tm),g=f.useContext(Jp).strict;h.visualElement&&(l=h.visualElement.loadFeatures(u,g,e,m))}return f.createElement(Di.Provider,{value:h},l&&h.visualElement?f.createElement(l,{visualElement:h.visualElement,...u}):null,n(o,a,t_(p,h.visualElement,c),p,d,h.visualElement))}const i=f.forwardRef(s);return i[s_]=o,i}function a_({layoutId:e}){const t=f.useContext(kl).id;return t&&e!==void 0?t+"-"+e:e}function c_(e){function t(r,o={}){return i_(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const l_=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Cl(e){return typeof e!="string"||e.includes("-")?!1:!!(l_.indexOf(e)>-1||/[A-Z]/.test(e))}const di={};function u_(e){Object.assign(di,e)}const os=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],sr=new Set(os);function nm(e,{layout:t,layoutId:n}){return sr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!di[e]||e==="opacity")}const bt=e=>!!(e&&e.getVelocity),d_={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},f_=os.length;function h_(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let s="";for(let i=0;it=>typeof t=="string"&&t.startsWith(e),om=rm("--"),Cc=rm("var(--"),p_=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,m_=(e,t)=>t&&typeof e=="number"?t.transform(e):e,In=(e,t,n)=>Math.min(Math.max(n,e),t),ir={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Io={...ir,transform:e=>In(0,1,e)},Is={...ir,default:1},$o=e=>Math.round(e*1e5)/1e5,Li=/(-)?([\d]*\.?[\d])+/g,sm=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,g_=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ss(e){return typeof e=="string"}const is=e=>({test:t=>ss(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>"".concat(t).concat(e)}),Pn=is("deg"),Kt=is("%"),oe=is("px"),b_=is("vh"),y_=is("vw"),wd={...Kt,parse:e=>Kt.parse(e)/100,transform:e=>Kt.transform(e*100)},kd={...ir,transform:Math.round},im={borderWidth:oe,borderTopWidth:oe,borderRightWidth:oe,borderBottomWidth:oe,borderLeftWidth:oe,borderRadius:oe,radius:oe,borderTopLeftRadius:oe,borderTopRightRadius:oe,borderBottomRightRadius:oe,borderBottomLeftRadius:oe,width:oe,maxWidth:oe,height:oe,maxHeight:oe,size:oe,top:oe,right:oe,bottom:oe,left:oe,padding:oe,paddingTop:oe,paddingRight:oe,paddingBottom:oe,paddingLeft:oe,margin:oe,marginTop:oe,marginRight:oe,marginBottom:oe,marginLeft:oe,rotate:Pn,rotateX:Pn,rotateY:Pn,rotateZ:Pn,scale:Is,scaleX:Is,scaleY:Is,scaleZ:Is,skew:Pn,skewX:Pn,skewY:Pn,distance:oe,translateX:oe,translateY:oe,translateZ:oe,x:oe,y:oe,z:oe,perspective:oe,transformPerspective:oe,opacity:Io,originX:wd,originY:wd,originZ:oe,zIndex:kd,fillOpacity:Io,strokeOpacity:Io,numOctaves:kd};function Pl(e,t,n,r){const{style:o,vars:s,transform:i,transformOrigin:a}=e;let c=!1,l=!1,u=!0;for(const d in t){const h=t[d];if(om(d)){s[d]=h;continue}const p=im[d],m=m_(h,p);if(sr.has(d)){if(c=!0,i[d]=m,!u)continue;h!==(p.default||0)&&(u=!1)}else d.startsWith("origin")?(l=!0,a[d]=m):o[d]=m}if(t.transform||(c||r?o.transform=h_(e.transform,n,u,r):o.transform&&(o.transform="none")),l){const{originX:d="50%",originY:h="50%",originZ:p=0}=a;o.transformOrigin="".concat(d," ").concat(h," ").concat(p)}}const Tl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function am(e,t,n){for(const r in t)!bt(t[r])&&!nm(r,n)&&(e[r]=t[r])}function v_({transformTemplate:e},t,n){return f.useMemo(()=>{const r=Tl();return Pl(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function x_(e,t,n){const r=e.style||{},o={};return am(o,r,e),Object.assign(o,v_(e,t,n)),e.transformValues?e.transformValues(o):o}function S_(e,t,n){const r={},o=x_(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":"pan-".concat(e.drag==="x"?"y":"x")),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const w_=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function fi(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||w_.has(e)}let cm=e=>!fi(e);function k_(e){e&&(cm=t=>t.startsWith("on")?!fi(t):e(t))}try{k_(require("@emotion/is-prop-valid").default)}catch(e){}function C_(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(cm(o)||n===!0&&fi(o)||!t&&!fi(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Cd(e,t,n){return typeof e=="string"?e:oe.transform(t+n*e)}function P_(e,t,n){const r=Cd(t,e.x,e.width),o=Cd(n,e.y,e.height);return"".concat(r," ").concat(o)}const T_={offset:"stroke-dashoffset",array:"stroke-dasharray"},__={offset:"strokeDashoffset",array:"strokeDasharray"};function A_(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?T_:__;e[s.offset]=oe.transform(-r);const i=oe.transform(t),a=oe.transform(n);e[s.array]="".concat(i," ").concat(a)}function _l(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:c=0,...l},u,d,h){if(Pl(e,l,u,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:g}=e;p.transform&&(g&&(m.transform=p.transform),delete p.transform),g&&(o!==void 0||s!==void 0||m.transform)&&(m.transformOrigin=P_(g,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),i!==void 0&&A_(p,i,a,c,!1)}const lm=()=>({...Tl(),attrs:{}}),Al=e=>typeof e=="string"&&e.toLowerCase()==="svg";function E_(e,t,n,r){const o=f.useMemo(()=>{const s=lm();return _l(s,t,{enableHardwareAcceleration:!1},Al(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};am(s,e.style,e),o.style={...s,...o.style}}return o}function I_(e=!1){return(n,r,o,{latestValues:s},i)=>{const c=(Cl(n)?E_:S_)(r,s,i,n),u={...C_(r,typeof n=="string",e),...c,ref:o},{children:d}=r,h=f.useMemo(()=>bt(d)?d.get():d,[d]);return f.createElement(n,{...u,children:h})}}function um(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const dm=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function fm(e,t,n,r){um(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(dm.has(o)?o:xl(o),t.attrs[o])}function El(e,t){const{style:n}=e,r={};for(const o in n)(bt(n[o])||t.style&&bt(t.style[o])||nm(o,e))&&(r[o]=n[o]);return r}function hm(e,t){const n=El(e,t);for(const r in e)if(bt(e[r])||bt(t[r])){const o=os.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[o]=e[r]}return n}function Il(e,t,n,r={},o={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),t}function pm(e){const t=f.useRef(null);return t.current===null&&(t.current=e()),t.current}const hi=e=>Array.isArray(e),$_=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),R_=e=>hi(e)?e[e.length-1]||0:e;function ei(e){const t=bt(e)?e.get():e;return $_(t)?t.toValue():t}function M_({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,s){const i={latestValues:O_(r,o,s,e),renderState:t()};return n&&(i.mount=a=>n(r,a,i)),i}const mm=e=>(t,n)=>{const r=f.useContext(Di),o=f.useContext(rs),s=()=>M_(e,t,r,o);return n?s():pm(s)};function O_(e,t,n,r){const o={},s=r(e,{});for(const h in s)o[h]=ei(s[h]);let{initial:i,animate:a}=e;const c=Bi(e),l=em(e);t&&l&&!c&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;return d&&typeof d!="boolean"&&!ji(d)&&(Array.isArray(d)?d:[d]).forEach(p=>{const m=Il(e,p);if(!m)return;const{transitionEnd:g,transition:b,...w}=m;for(const y in w){let x=w[y];if(Array.isArray(x)){const P=u?x.length-1:0;x=x[P]}x!==null&&(o[y]=x)}for(const y in g)o[y]=g[y]}),o}const Ue=e=>e;class Pd{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function F_(e){let t=new Pd,n=new Pd,r=0,o=!1,s=!1;const i=new WeakSet,a={schedule:(c,l=!1,u=!1)=>{const d=u&&o,h=d?t:n;return l&&i.add(c),h.add(c)&&d&&o&&(r=t.order.length),c},cancel:c=>{n.remove(c),i.delete(c)},process:c=>{if(o){s=!0;return}if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let l=0;l(d[h]=F_(()=>n=!0),d),{}),i=d=>s[d].process(o),a=()=>{const d=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(d-o.timestamp,D_),1),o.timestamp=d,o.isProcessing=!0,$s.forEach(i),o.isProcessing=!1,n&&t&&(r=!1,e(a))},c=()=>{n=!0,r=!0,o.isProcessing||e(a)};return{schedule:$s.reduce((d,h)=>{const p=s[h];return d[h]=(m,g=!1,b=!1)=>(n||c(),p.schedule(m,g,b)),d},{}),cancel:d=>$s.forEach(h=>s[h].cancel(d)),state:o,steps:s}}const{schedule:Fe,cancel:gn,state:ot,steps:Oa}=N_(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ue,!0),j_={useVisualState:mm({scrapeMotionValuesFromProps:hm,createRenderState:lm,onMount:(e,t,{renderState:n,latestValues:r})=>{Fe.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch(o){n.dimensions={x:0,y:0,width:0,height:0}}}),Fe.render(()=>{_l(n,r,{enableHardwareAcceleration:!1},Al(t.tagName),e.transformTemplate),fm(t,n)})}})},B_={useVisualState:mm({scrapeMotionValuesFromProps:El,createRenderState:Tl})};function L_(e,{forwardMotionProps:t=!1},n,r){return{...Cl(e)?j_:B_,preloadedFeatures:n,useRender:I_(t),createVisualElement:r,Component:e}}function an(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const gm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function zi(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const z_=e=>t=>gm(t)&&e(t,zi(t));function dn(e,t,n,r){return an(e,t,z_(n),r)}const V_=(e,t)=>n=>t(e(n)),En=(...e)=>e.reduce(V_);function bm(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Td=bm("dragHorizontal"),_d=bm("dragVertical");function ym(e){let t=!1;if(e==="y")t=_d();else if(e==="x")t=Td();else{const n=Td(),r=_d();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function vm(){const e=ym(!0);return e?(e(),!1):!0}class Rn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Ad(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),o=(s,i)=>{if(s.type==="touch"||vm())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&Fe.update(()=>a[r](s,i))};return dn(e.current,n,o,{passive:!e.getProps()[r]})}class W_ extends Rn{mount(){this.unmount=En(Ad(this.node,!0),Ad(this.node,!1))}unmount(){}}class H_ extends Rn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(n){t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=En(an(this.node.current,"focus",()=>this.onFocus()),an(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const xm=(e,t)=>t?e===t?!0:xm(e,t.parentElement):!1;function Fa(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,zi(n))}class U_ extends Rn{constructor(){super(...arguments),this.removeStartListeners=Ue,this.removeEndListeners=Ue,this.removeAccessibleListeners=Ue,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),s=dn(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:u}=this.node.getProps();Fe.update(()=>{xm(this.node.current,a.target)?l&&l(a,c):u&&u(a,c)})},{passive:!(r.onTap||r.onPointerUp)}),i=dn(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=En(s,i),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const i=a=>{a.key!=="Enter"||!this.checkPressEnd()||Fa("up",(c,l)=>{const{onTap:u}=this.node.getProps();u&&Fe.update(()=>u(c,l))})};this.removeEndListeners(),this.removeEndListeners=an(this.node.current,"keyup",i),Fa("down",(a,c)=>{this.startPress(a,c)})},n=an(this.node.current,"keydown",t),r=()=>{this.isPressing&&Fa("cancel",(s,i)=>this.cancelPress(s,i))},o=an(this.node.current,"blur",r);this.removeAccessibleListeners=En(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Fe.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!vm()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Fe.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=dn(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=an(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=En(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Pc=new WeakMap,Da=new WeakMap,G_=e=>{const t=Pc.get(e.target);t&&t(e)},q_=e=>{e.forEach(G_)};function K_({root:e,...t}){const n=e||document;Da.has(n)||Da.set(n,{});const r=Da.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(q_,{root:e,...t})),r[o]}function X_(e,t,n){const r=K_(t);return Pc.set(e,n),r.observe(e),()=>{Pc.delete(e),r.unobserve(e)}}const Y_={some:0,all:1};class Z_ extends Rn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:Y_[o]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,s&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=l?u:d;h&&h(c)};return X_(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(J_(t,n))&&this.startObserver()}unmount(){}}function J_({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Q_={inView:{Feature:Z_},tap:{Feature:U_},focus:{Feature:H_},hover:{Feature:W_}};function Sm(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[r]=n.get()),t}function tA(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Vi(e,t,n){const r=e.getProps();return Il(r,t,n!==void 0?n:r.custom,eA(e),tA(e))}let $l=Ue;const Xn=e=>e*1e3,fn=e=>e/1e3,nA={current:!1},wm=e=>Array.isArray(e)&&typeof e[0]=="number";function km(e){return!!(!e||typeof e=="string"&&Cm[e]||wm(e)||Array.isArray(e)&&e.every(km))}const xo=([e,t,n,r])=>"cubic-bezier(".concat(e,", ").concat(t,", ").concat(n,", ").concat(r,")"),Cm={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xo([0,.65,.55,1]),circOut:xo([.55,0,1,.45]),backIn:xo([.31,.01,.66,-.59]),backOut:xo([.33,1.53,.69,.99])};function Pm(e){if(e)return wm(e)?xo(e):Array.isArray(e)?e.map(Pm):Cm[e]}function rA(e,t,n,{delay:r=0,duration:o,repeat:s=0,repeatType:i="loop",ease:a,times:c}={}){const l={[t]:n};c&&(l.offset=c);const u=Pm(a);return Array.isArray(u)&&(l.easing=u),e.animate(l,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}function oA(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const Tm=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,sA=1e-7,iA=12;function aA(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=Tm(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>sA&&++aaA(s,0,1,e,n);return s=>s===0||s===1?s:Tm(o(s),t,r)}const cA=as(.42,0,1,1),lA=as(0,0,.58,1),_m=as(.42,0,.58,1),uA=e=>Array.isArray(e)&&typeof e[0]!="number",Am=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Em=e=>t=>1-e(1-t),Rl=e=>1-Math.sin(Math.acos(e)),Im=Em(Rl),dA=Am(Rl),$m=as(.33,1.53,.69,.99),Ml=Em($m),fA=Am(Ml),hA=e=>(e*=2)<1?.5*Ml(e):.5*(2-Math.pow(2,-10*(e-1))),pA={linear:Ue,easeIn:cA,easeInOut:_m,easeOut:lA,circIn:Rl,circInOut:dA,circOut:Im,backIn:Ml,backInOut:fA,backOut:$m,anticipate:hA},Ed=e=>{if(Array.isArray(e)){$l(e.length===4);const[t,n,r,o]=e;return as(t,n,r,o)}else if(typeof e=="string")return pA[e];return e},Ol=(e,t)=>n=>!!(ss(n)&&g_.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Rm=(e,t,n)=>r=>{if(!ss(r))return r;const[o,s,i,a]=r.match(Li);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},mA=e=>In(0,255,e),Na={...ir,transform:e=>Math.round(mA(e))},Hn={test:Ol("rgb","red"),parse:Rm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Na.transform(e)+", "+Na.transform(t)+", "+Na.transform(n)+", "+$o(Io.transform(r))+")"};function gA(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Tc={test:Ol("#"),parse:gA,transform:Hn.transform},Pr={test:Ol("hsl","hue"),parse:Rm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Kt.transform($o(t))+", "+Kt.transform($o(n))+", "+$o(Io.transform(r))+")"},it={test:e=>Hn.test(e)||Tc.test(e)||Pr.test(e),parse:e=>Hn.test(e)?Hn.parse(e):Pr.test(e)?Pr.parse(e):Tc.parse(e),transform:e=>ss(e)?e:e.hasOwnProperty("red")?Hn.transform(e):Pr.transform(e)},ze=(e,t,n)=>-n*e+n*t+e;function ja(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 bA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;o=ja(c,a,e+1/3),s=ja(c,a,e),i=ja(c,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}const Ba=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},yA=[Tc,Hn,Pr],vA=e=>yA.find(t=>t.test(e));function Id(e){const t=vA(e);let n=t.parse(e);return t===Pr&&(n=bA(n)),n}const Mm=(e,t)=>{const n=Id(e),r=Id(t),o={...n};return s=>(o.red=Ba(n.red,r.red,s),o.green=Ba(n.green,r.green,s),o.blue=Ba(n.blue,r.blue,s),o.alpha=ze(n.alpha,r.alpha,s),Hn.transform(o))};function xA(e){var t,n;return isNaN(e)&&ss(e)&&(((t=e.match(Li))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(sm))===null||n===void 0?void 0:n.length)||0)>0}const Om={regex:p_,countKey:"Vars",token:"${v}",parse:Ue},Fm={regex:sm,countKey:"Colors",token:"${c}",parse:it.parse},Dm={regex:Li,countKey:"Numbers",token:"${n}",parse:ir.parse};function La(e,{regex:t,countKey:n,token:r,parse:o}){const s=e.tokenised.match(t);s&&(e["num"+n]=s.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...s.map(o)))}function pi(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&La(n,Om),La(n,Fm),La(n,Dm),n}function Nm(e){return pi(e).values}function jm(e){const{values:t,numColors:n,numVars:r,tokenised:o}=pi(e),s=t.length;return i=>{let a=o;for(let c=0;ctypeof e=="number"?0:e;function wA(e){const t=Nm(e);return jm(e)(t.map(SA))}const $n={test:xA,parse:Nm,createTransformer:jm,getAnimatableNone:wA},Bm=(e,t)=>n=>"".concat(n>0?t:e);function Lm(e,t){return typeof e=="number"?n=>ze(e,t,n):it.test(e)?Mm(e,t):e.startsWith("var(")?Bm(e,t):Vm(e,t)}const zm=(e,t)=>{const n=[...e],r=n.length,o=e.map((s,i)=>Lm(s,t[i]));return s=>{for(let i=0;i{const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Lm(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}},Vm=(e,t)=>{const n=$n.createTransformer(t),r=pi(e),o=pi(t);return r.numVars===o.numVars&&r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?En(zm(r.values,o.values),n):Bm(e,t)},Uo=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},$d=(e,t)=>n=>ze(e,t,n);function CA(e){return typeof e=="number"?$d:typeof e=="string"?it.test(e)?Mm:Vm:Array.isArray(e)?zm:typeof e=="object"?kA:$d}function PA(e,t,n){const r=[],o=n||CA(e[0]),s=e.length-1;for(let i=0;it[0];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=PA(t,r,o),a=i.length,c=l=>{let u=0;if(a>1)for(;uc(In(e[0],e[s-1],l)):c}function TA(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Uo(0,t,r);e.push(ze(n,1,o))}}function _A(e){const t=[0];return TA(t,e.length-1),t}function AA(e,t){return e.map(n=>n*t)}function EA(e,t){return e.map(()=>t||_m).splice(0,e.length-1)}function mi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=uA(r)?r.map(Ed):Ed(r),s={done:!1,value:t[0]},i=AA(n&&n.length===t.length?n:_A(t),e),a=Wm(i,t,{ease:Array.isArray(o)?o:EA(t,o)});return{calculatedDuration:e,next:c=>(s.value=a(c),s.done=c>=e,s)}}function Hm(e,t){return t?e*(1e3/t):0}const IA=5;function Um(e,t,n){const r=Math.max(t-IA,0);return Hm(n-e(r),t-r)}const Rd=.001,$A=.01,RA=10,MA=.05,OA=1;function FA({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,s,i=1-t;i=In(MA,OA,i),e=In($A,RA,fn(e)),i<1?(o=l=>{const u=l*i,d=u*e,h=u-n,p=_c(l,i),m=Math.exp(-d);return Rd-h/p*m},s=l=>{const d=l*i*e,h=d*n+n,p=Math.pow(i,2)*Math.pow(l,2)*e,m=Math.exp(-d),g=_c(Math.pow(l,2),i);return(-o(l)+Rd>0?-1:1)*((h-p)*m)/g}):(o=l=>{const u=Math.exp(-l*e),d=(l-n)*e+1;return-.001+u*d},s=l=>{const u=Math.exp(-l*e),d=(n-l)*(e*e);return u*d});const a=5/e,c=NA(o,s,a);if(e=Xn(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:i*2*Math.sqrt(r*l),duration:e}}}const DA=12;function NA(e,t,n){let r=n;for(let o=1;oe[n]!==void 0)}function LA(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Md(e,BA)&&Md(e,jA)){const n=FA(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function Gm({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],s=e[e.length-1],i={done:!1,value:o},{stiffness:a,damping:c,mass:l,velocity:u,duration:d,isResolvedFromDuration:h}=LA(r),p=u?-fn(u):0,m=c/(2*Math.sqrt(a*l)),g=s-o,b=fn(Math.sqrt(a/l)),w=Math.abs(g)<5;n||(n=w?.01:2),t||(t=w?.005:.5);let y;if(m<1){const x=_c(b,m);y=P=>{const k=Math.exp(-m*b*P);return s-k*((p+m*b*g)/x*Math.sin(x*P)+g*Math.cos(x*P))}}else if(m===1)y=x=>s-Math.exp(-b*x)*(g+(p+b*g)*x);else{const x=b*Math.sqrt(m*m-1);y=P=>{const k=Math.exp(-m*b*P),A=Math.min(x*P,300);return s-k*((p+m*b*g)*Math.sinh(A)+x*g*Math.cosh(A))/x}}return{calculatedDuration:h&&d||null,next:x=>{const P=y(x);if(h)i.done=x>=d;else{let k=p;x!==0&&(m<1?k=Um(y,x,P):k=0);const A=Math.abs(k)<=n,T=Math.abs(s-P)<=t;i.done=A&&T}return i.value=i.done?s:P,i}}}function Od({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:c,restDelta:l=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},p=E=>a!==void 0&&Ec,m=E=>a===void 0?c:c===void 0||Math.abs(a-E)-g*Math.exp(-E/r),x=E=>w+y(E),P=E=>{const I=y(E),R=x(E);h.done=Math.abs(I)<=l,h.value=h.done?w:R};let k,A;const T=E=>{p(h.value)&&(k=E,A=Gm({keyframes:[h.value,m(h.value)],velocity:Um(x,E,h.value),damping:o,stiffness:s,restDelta:l,restSpeed:u}))};return T(0),{calculatedDuration:null,next:E=>{let I=!1;return!A&&k===void 0&&(I=!0,P(E),T(E)),k!==void 0&&E>k?A.next(E-k):(!I&&P(E),h)}}}const zA=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Fe.update(t,!0),stop:()=>gn(t),now:()=>ot.isProcessing?ot.timestamp:performance.now()}},Fd=2e4;function Dd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=Fd?1/0:t}const VA={decay:Od,inertia:Od,tween:mi,keyframes:mi,spring:Gm};function gi({autoplay:e=!0,delay:t=0,driver:n=zA,keyframes:r,type:o="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:a="loop",onPlay:c,onStop:l,onComplete:u,onUpdate:d,...h}){let p=1,m=!1,g,b;const w=()=>{b=new Promise(re=>{g=re})};w();let y;const x=VA[o]||mi;let P;x!==mi&&typeof r[0]!="number"&&(P=Wm([0,100],r,{clamp:!1}),r=[0,100]);const k=x({...h,keyframes:r});let A;a==="mirror"&&(A=x({...h,keyframes:[...r].reverse(),velocity:-(h.velocity||0)}));let T="idle",E=null,I=null,R=null;k.calculatedDuration===null&&s&&(k.calculatedDuration=Dd(k));const{calculatedDuration:M}=k;let H=1/0,K=1/0;M!==null&&(H=M+i,K=H*(s+1)-i);let V=0;const Y=re=>{if(I===null)return;p>0&&(I=Math.min(I,re)),p<0&&(I=Math.min(re-K/p,I)),E!==null?V=E:V=Math.round(re-I)*p;const he=V-t*(p>=0?1:-1),L=p>=0?he<0:he>K;V=Math.max(he,0),T==="finished"&&E===null&&(V=K);let z=V,J=k;if(s){const Me=V/H;let Oe=Math.floor(Me),ce=Me%1;!ce&&Me>=1&&(ce=1),ce===1&&Oe--,Oe=Math.min(Oe,s+1);const ie=!!(Oe%2);ie&&(a==="reverse"?(ce=1-ce,i&&(ce-=i/H)):a==="mirror"&&(J=A));let le=In(0,1,ce);V>K&&(le=a==="reverse"&&ie?1:0),z=le*H}const se=L?{done:!1,value:r[0]}:J.next(z);P&&(se.value=P(se.value));let{done:ve}=se;!L&&M!==null&&(ve=p>=0?V>=K:V<=0);const pe=E===null&&(T==="finished"||T==="running"&&ve);return d&&d(se.value),pe&&j(),se},Z=()=>{y&&y.stop(),y=void 0},F=()=>{T="idle",Z(),g(),w(),I=R=null},j=()=>{T="finished",u&&u(),Z(),g()},U=()=>{if(m)return;y||(y=n(Y));const re=y.now();c&&c(),E!==null?I=re-E:(!I||T==="finished")&&(I=re),T==="finished"&&w(),R=I,E=null,T="running",y.start()};e&&U();const Se={then(re,he){return b.then(re,he)},get time(){return fn(V)},set time(re){re=Xn(re),V=re,E!==null||!y||p===0?E=re:I=y.now()-re/p},get duration(){const re=k.calculatedDuration===null?Dd(k):k.calculatedDuration;return fn(re)},get speed(){return p},set speed(re){re===p||!y||(p=re,Se.time=fn(V))},get state(){return T},play:U,pause:()=>{T="paused",E=V},stop:()=>{m=!0,T!=="idle"&&(T="idle",l&&l(),F())},cancel:()=>{R!==null&&Y(R),F()},complete:()=>{T="finished"},sample:re=>(I=0,Y(re))};return Se}function WA(e){let t;return()=>(t===void 0&&(t=e()),t)}const HA=WA(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),UA=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Rs=10,GA=2e4,qA=(e,t)=>t.type==="spring"||e==="backgroundColor"||!km(t.ease);function KA(e,t,{onUpdate:n,onComplete:r,...o}){if(!(HA()&&UA.has(t)&&!o.repeatDelay&&o.repeatType!=="mirror"&&o.damping!==0&&o.type!=="inertia"))return!1;let i=!1,a,c;const l=()=>{c=new Promise(y=>{a=y})};l();let{keyframes:u,duration:d=300,ease:h,times:p}=o;if(qA(t,o)){const y=gi({...o,repeat:0,delay:0});let x={done:!1,value:u[0]};const P=[];let k=0;for(;!x.done&&km.cancel(),b=()=>{Fe.update(g),a(),l()};return m.onfinish=()=>{e.set(oA(u,o)),r&&r(),b()},{then(y,x){return c.then(y,x)},attachTimeline(y){return m.timeline=y,m.onfinish=null,Ue},get time(){return fn(m.currentTime||0)},set time(y){m.currentTime=Xn(y)},get speed(){return m.playbackRate},set speed(y){m.playbackRate=y},get duration(){return fn(d)},play:()=>{i||(m.play(),gn(g))},pause:()=>m.pause(),stop:()=>{if(i=!0,m.playState==="idle")return;const{currentTime:y}=m;if(y){const x=gi({...o,autoplay:!1});e.setWithVelocity(x.sample(y-Rs).value,x.sample(y).value,Rs)}b()},complete:()=>m.finish(),cancel:b}}function XA({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Ue,pause:Ue,stop:Ue,then:s=>(s(),Promise.resolve()),cancel:Ue,complete:Ue});return t?gi({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}const YA={type:"spring",stiffness:500,damping:25,restSpeed:10},ZA=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),JA={type:"keyframes",duration:.8},QA={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},eE=(e,{keyframes:t})=>t.length>2?JA:sr.has(e)?e.startsWith("scale")?ZA(t[1]):YA:QA,Ac=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&($n.test(t)||t==="0")&&!t.startsWith("url(")),tE=new Set(["brightness","contrast","saturate","opacity"]);function nE(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Li)||[];if(!r)return e;const o=n.replace(r,"");let s=tE.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const rE=/([a-z-]*)\(.*?\)/g,Ec={...$n,getAnimatableNone:e=>{const t=e.match(rE);return t?t.map(nE).join(" "):e}},oE={...im,color:it,backgroundColor:it,outlineColor:it,fill:it,stroke:it,borderColor:it,borderTopColor:it,borderRightColor:it,borderBottomColor:it,borderLeftColor:it,filter:Ec,WebkitFilter:Ec},Fl=e=>oE[e];function qm(e,t){let n=Fl(e);return n!==Ec&&(n=$n),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Km=e=>/^0[^.\s]+$/.test(e);function sE(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Km(e)}function iE(e,t,n,r){const o=Ac(t,n);let s;Array.isArray(n)?s=[...n]:s=[null,n];const i=r.from!==void 0?r.from:e.get();let a;const c=[];for(let l=0;lo=>{const s=Dl(r,e)||{},i=s.delay||r.delay||0;let{elapsed:a=0}=r;a=a-Xn(i);const c=iE(t,e,n,s),l=c[0],u=c[c.length-1],d=Ac(e,l),h=Ac(e,u);let p={keyframes:c,velocity:t.getVelocity(),ease:"easeOut",...s,delay:-a,onUpdate:m=>{t.set(m),s.onUpdate&&s.onUpdate(m)},onComplete:()=>{o(),s.onComplete&&s.onComplete()}};if(aE(s)||(p={...p,...eE(e,p)}),p.duration&&(p.duration=Xn(p.duration)),p.repeatDelay&&(p.repeatDelay=Xn(p.repeatDelay)),!d||!h||nA.current||s.type===!1)return XA(p);if(!r.isHandoff&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const m=KA(t,e,p);if(m)return m}return gi(p)};function bi(e){return!!(bt(e)&&e.add)}const Xm=e=>/^\-?\d*\.?\d+$/.test(e);function jl(e,t){e.indexOf(t)===-1&&e.push(t)}function Bl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Ll{constructor(){this.subscriptions=[]}add(t){return jl(this.subscriptions,t),()=>Bl(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s!isNaN(parseFloat(e));class lE{constructor(t,n={}){this.version="10.16.16",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,o=!0)=>{this.prev=this.current,this.current=r;const{delta:s,timestamp:i}=ot;this.lastUpdated!==i&&(this.timeDelta=s,this.lastUpdated=i,Fe.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Fe.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=cE(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ll);const r=this.events[t].add(n);return t==="change"?()=>{r(),Fe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Hm(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Wr(e,t){return new lE(e,t)}const Ym=e=>t=>t.test(e),uE={test:e=>e==="auto",parse:e=>e},Zm=[ir,oe,Kt,Pn,y_,b_,uE],lo=e=>Zm.find(Ym(e)),dE=[...Zm,it,$n],fE=e=>dE.find(Ym(e));function hE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Wr(n))}function pE(e,t){const n=Vi(e,t);let{transitionEnd:r={},transition:o={},...s}=n?e.makeTargetAnimatable(n,!1):{};s={...s,...r};for(const i in s){const a=R_(s[i]);hE(e,i,a)}}function mE(e,t,n){var r,o;const s=Object.keys(t).filter(a=>!e.hasValue(a)),i=s.length;if(i)for(let a=0;ac.remove(d))),l.push(b)}return i&&Promise.all(l).then(()=>{i&&pE(e,i)}),l}function Ic(e,t,n={}){const r=Vi(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(Jm(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:d}=o;return xE(e,t,l+c,u,d,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[c,l]=a==="beforeChildren"?[s,i]:[i,s];return c().then(()=>l())}else return Promise.all([s(),i(n.delay)])}function xE(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,c=o===1?(l=0)=>l*r:(l=0)=>a-l*r;return Array.from(e.variantChildren).sort(SE).forEach((l,u)=>{l.notify("AnimationStart",t),i.push(Ic(l,t,{...s,delay:n+c(u)}).then(()=>l.notify("AnimationComplete",t)))}),Promise.all(i)}function SE(e,t){return e.sortNodePosition(t)}function wE(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>Ic(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=Ic(e,t,n);else{const o=typeof t=="function"?Vi(e,t,n.custom):t;r=Promise.all(Jm(e,o,n))}return r.then(()=>e.notify("AnimationComplete",t))}const kE=[...Sl].reverse(),CE=Sl.length;function PE(e){return t=>Promise.all(t.map(({animation:n,options:r})=>wE(e,n,r)))}function TE(e){let t=PE(e);const n=AE();let r=!0;const o=(c,l)=>{const u=Vi(e,l);if(u){const{transition:d,transitionEnd:h,...p}=u;c={...c,...p,...h}}return c};function s(c){t=c(e)}function i(c,l){const u=e.getProps(),d=e.getVariantContext(!0)||{},h=[],p=new Set;let m={},g=1/0;for(let w=0;wg&&k;const R=Array.isArray(P)?P:[P];let M=R.reduce(o,{});A===!1&&(M={});const{prevResolvedValues:H={}}=x,K={...H,...M},V=Y=>{I=!0,p.delete(Y),x.needsAnimating[Y]=!0};for(const Y in K){const Z=M[Y],F=H[Y];m.hasOwnProperty(Y)||(Z!==F?hi(Z)&&hi(F)?!Sm(Z,F)||E?V(Y):x.protectedKeys[Y]=!0:Z!==void 0?V(Y):p.add(Y):Z!==void 0&&p.has(Y)?V(Y):x.protectedKeys[Y]=!0)}x.prevProp=P,x.prevResolvedValues=M,x.isActive&&(m={...m,...M}),r&&e.blockInitialAnimation&&(I=!1),I&&!T&&h.push(...R.map(Y=>({animation:Y,options:{type:y,...c}})))}if(p.size){const w={};p.forEach(y=>{const x=e.getBaseTarget(y);x!==void 0&&(w[y]=x)}),h.push({animation:w})}let b=!!h.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,b?t(h):Promise.resolve()}function a(c,l,u){var d;if(n[c].isActive===l)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(p=>{var m;return(m=p.animationState)===null||m===void 0?void 0:m.setActive(c,l)}),n[c].isActive=l;const h=i(u,c);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n}}function _E(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Sm(t,e):!1}function jn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function AE(){return{animate:jn(!0),whileInView:jn(),whileHover:jn(),whileTap:jn(),whileDrag:jn(),whileFocus:jn(),exit:jn()}}class EE extends Rn{constructor(t){super(t),t.animationState||(t.animationState=TE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),ji(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let IE=0;class $E extends Rn{constructor(){super(...arguments),this.id=IE++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const s=this.node.animationState.setActive("exit",!t,{custom:r!=null?r:this.node.getProps().custom});n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const RE={animation:{Feature:EE},exit:{Feature:$E}},Nd=(e,t)=>Math.abs(e-t);function ME(e,t){const n=Nd(e.x,t.x),r=Nd(e.y,t.y);return Math.sqrt(n**2+r**2)}class Qm{constructor(t,n,{transformPagePoint:r,contextWindow:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Va(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=ME(u.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=u,{timestamp:m}=ot;this.history.push({...p,timestamp:m});const{onStart:g,onMove:b}=this.handlers;d||(g&&g(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=za(d,this.transformPagePoint),Fe.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:h,onSessionEnd:p}=this.handlers,m=Va(u.type==="pointercancel"?this.lastMoveEventInfo:za(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,m),p&&p(u,m)},!gm(t))return;this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=zi(t),i=za(s,this.transformPagePoint),{point:a}=i,{timestamp:c}=ot;this.history=[{...a,timestamp:c}];const{onSessionStart:l}=n;l&&l(t,Va(i,this.history)),this.removeListeners=En(dn(this.contextWindow,"pointermove",this.handlePointerMove),dn(this.contextWindow,"pointerup",this.handlePointerUp),dn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),gn(this.updatePoint)}}function za(e,t){return t?{point:t(e.point)}:e}function jd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Va({point:e},t){return{point:e,delta:jd(e,eg(t)),offset:jd(e,OE(t)),velocity:FE(t,.1)}}function OE(e){return e[0]}function eg(e){return e[e.length-1]}function FE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=eg(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Xn(t)));)n--;if(!r)return{x:0,y:0};const s=fn(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function wt(e){return e.max-e.min}function $c(e,t=0,n=.01){return Math.abs(e-t)<=n}function Bd(e,t,n,r=.5){e.origin=r,e.originPoint=ze(t.min,t.max,e.origin),e.scale=wt(n)/wt(t),($c(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=ze(n.min,n.max,e.origin)-e.originPoint,($c(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Ro(e,t,n,r){Bd(e.x,t.x,n.x,r?r.originX:void 0),Bd(e.y,t.y,n.y,r?r.originY:void 0)}function Ld(e,t,n){e.min=n.min+t.min,e.max=e.min+wt(t)}function DE(e,t,n){Ld(e.x,t.x,n.x),Ld(e.y,t.y,n.y)}function zd(e,t,n){e.min=t.min-n.min,e.max=e.min+wt(t)}function Mo(e,t,n){zd(e.x,t.x,n.x),zd(e.y,t.y,n.y)}function NE(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?ze(n,e,r.max):Math.min(e,n)),e}function Vd(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function jE(e,{top:t,left:n,bottom:r,right:o}){return{x:Vd(e.x,n,o),y:Vd(e.y,t,r)}}function Wd(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Uo(t.min,t.max-r,e.min):r>o&&(n=Uo(e.min,e.max-o,t.min)),In(0,1,n)}function zE(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Rc=.35;function VE(e=Rc){return e===!1?e=0:e===!0&&(e=Rc),{x:Hd(e,"left","right"),y:Hd(e,"top","bottom")}}function Hd(e,t,n){return{min:Ud(e,t),max:Ud(e,n)}}function Ud(e,t){return typeof e=="number"?e:e[t]||0}const Gd=()=>({translate:0,scale:1,origin:0,originPoint:0}),Tr=()=>({x:Gd(),y:Gd()}),qd=()=>({min:0,max:0}),qe=()=>({x:qd(),y:qd()});function Lt(e){return[e("x"),e("y")]}function tg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function WE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function HE(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Wa(e){return e===void 0||e===1}function Mc({scale:e,scaleX:t,scaleY:n}){return!Wa(e)||!Wa(t)||!Wa(n)}function Bn(e){return Mc(e)||ng(e)||e.z||e.rotate||e.rotateX||e.rotateY}function ng(e){return Kd(e.x)||Kd(e.y)}function Kd(e){return e&&e!=="0%"}function yi(e,t,n){const r=e-n,o=t*r;return n+o}function Xd(e,t,n,r,o){return o!==void 0&&(e=yi(e,o,r)),yi(e,n,r)+t}function Oc(e,t=0,n=1,r,o){e.min=Xd(e.min,t,n,r,o),e.max=Xd(e.max,t,n,r,o)}function rg(e,{x:t,y:n}){Oc(e.x,t.translate,t.scale,t.originPoint),Oc(e.y,n.translate,n.scale,n.originPoint)}function UE(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a1.0000000000001||e<.999999999999?e:1}function _n(e,t){e.min=e.min+t,e.max=e.max+t}function Zd(e,t,[n,r,o]){const s=t[o]!==void 0?t[o]:.5,i=ze(e.min,e.max,s);Oc(e,t[n],t[r],i,t.scale)}const GE=["x","scaleX","originX"],qE=["y","scaleY","originY"];function _r(e,t){Zd(e.x,t,GE),Zd(e.y,t,qE)}function og(e,t){return tg(HE(e.getBoundingClientRect(),t))}function KE(e,t,n){const r=og(e,n),{scroll:o}=t;return o&&(_n(r.x,o.offset.x),_n(r.y,o.offset.y)),r}const sg=({current:e})=>e?e.ownerDocument.defaultView:null,XE=new WeakMap;class YE{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=qe(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=c=>{this.stopAnimation(),n&&this.snapToCursor(zi(c,"page").point)},s=(c,l)=>{const{drag:u,dragPropagation:d,onDragStart:h}=this.getProps();if(u&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ym(u),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Lt(m=>{let g=this.getAxisMotionValue(m).get()||0;if(Kt.test(g)){const{projection:b}=this.visualElement;if(b&&b.layout){const w=b.layout.layoutBox[m];w&&(g=wt(w)*(parseFloat(g)/100))}}this.originPoint[m]=g}),h&&Fe.update(()=>h(c,l),!1,!0);const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},i=(c,l)=>{const{dragPropagation:u,dragDirectionLock:d,onDirectionLock:h,onDrag:p}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:m}=l;if(d&&this.currentDirection===null){this.currentDirection=ZE(m),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",l.point,m),this.updateAxis("y",l.point,m),this.visualElement.render(),p&&p(c,l)},a=(c,l)=>this.stop(c,l);this.panSession=new Qm(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),contextWindow:sg(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&Fe.update(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Ms(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=NE(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&Cr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=jE(o.layoutBox,n):this.constraints=!1,this.elastic=VE(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Lt(i=>{this.getAxisMotionValue(i)&&(this.constraints[i]=zE(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Cr(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=KE(r,o.root,this.visualElement.getTransformPagePoint());let i=BE(o.layout.layoutBox,s);if(n){const a=n(WE(i));this.hasMutatedConstraints=!!a,a&&(i=tg(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=Lt(u=>{if(!Ms(u,n,this.currentDirection))return;let d=c&&c[u]||{};i&&(d={min:0,max:0});const h=o?200:1e6,p=o?40:1e7,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(l).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Nl(t,r,0,n))}stopAnimation(){Lt(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Lt(n=>{const{drag:r}=this.getProps();if(!Ms(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-ze(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Cr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Lt(i=>{const a=this.getAxisMotionValue(i);if(a){const c=a.get();o[i]=LE({min:c,max:c},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Lt(i=>{if(!Ms(i,t,null))return;const a=this.getAxisMotionValue(i),{min:c,max:l}=this.constraints[i];a.set(ze(c,l,o[i]))})}addListeners(){if(!this.visualElement.current)return;XE.set(this.visualElement,this);const t=this.visualElement.current,n=dn(t,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Cr(c)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),r();const i=an(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(Lt(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=c[u].translate,d.set(d.get()+c[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=Rc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function Ms(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function ZE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class JE extends Rn{constructor(t){super(t),this.removeGroupControls=Ue,this.removeListeners=Ue,this.controls=new YE(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ue}unmount(){this.removeGroupControls(),this.removeListeners()}}const Jd=e=>(t,n)=>{e&&Fe.update(()=>e(t,n))};class QE extends Rn{constructor(){super(...arguments),this.removePointerDownListener=Ue}onPointerDown(t){this.session=new Qm(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:sg(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Jd(t),onStart:Jd(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&Fe.update(()=>o(s,i))}}}mount(){this.removePointerDownListener=dn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function ig(){const e=f.useContext(rs);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=f.useId();return f.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}function eI(){return tI(f.useContext(rs))}function tI(e){return e===null?!0:e.isPresent}const ti={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Qd(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const uo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(oe.test(e))e=parseFloat(e);else return e;const n=Qd(e,t.target.x),r=Qd(e,t.target.y);return"".concat(n,"% ").concat(r,"%")}},nI={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=$n.parse(e);if(o.length>5)return r;const s=$n.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=c;const l=ze(a,c,.5);return typeof o[2+i]=="number"&&(o[2+i]/=l),typeof o[3+i]=="number"&&(o[3+i]/=l),s(o)}};class rI extends et.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;u_(oI),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ti.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||Fe.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ag(e){const[t,n]=ig(),r=f.useContext(kl);return et.createElement(rI,{...e,layoutGroup:r,switchLayoutGroup:f.useContext(tm),isPresent:t,safeToRemove:n})}const oI={borderRadius:{...uo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:uo,borderTopRightRadius:uo,borderBottomLeftRadius:uo,borderBottomRightRadius:uo,boxShadow:nI},cg=["TopLeft","TopRight","BottomLeft","BottomRight"],sI=cg.length,ef=e=>typeof e=="string"?parseFloat(e):e,tf=e=>typeof e=="number"||oe.test(e);function iI(e,t,n,r,o,s){o?(e.opacity=ze(0,n.opacity!==void 0?n.opacity:1,aI(r)),e.opacityExit=ze(t.opacity!==void 0?t.opacity:1,0,cI(r))):s&&(e.opacity=ze(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;irt?1:n(Uo(e,t,r))}function rf(e,t){e.min=t.min,e.max=t.max}function _t(e,t){rf(e.x,t.x),rf(e.y,t.y)}function of(e,t,n,r,o){return e-=t,e=yi(e,1/n,r),o!==void 0&&(e=yi(e,1/o,r)),e}function lI(e,t=0,n=1,r=.5,o,s=e,i=e){if(Kt.test(t)&&(t=parseFloat(t),t=ze(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=ze(s.min,s.max,r);e===s&&(a-=t),e.min=of(e.min,t,n,a,o),e.max=of(e.max,t,n,a,o)}function sf(e,t,[n,r,o],s,i){lI(e,t[n],t[r],t[o],t.scale,s,i)}const uI=["x","scaleX","originX"],dI=["y","scaleY","originY"];function af(e,t,n,r){sf(e.x,t,uI,n?n.x:void 0,r?r.x:void 0),sf(e.y,t,dI,n?n.y:void 0,r?r.y:void 0)}function cf(e){return e.translate===0&&e.scale===1}function ug(e){return cf(e.x)&&cf(e.y)}function fI(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function dg(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function lf(e){return wt(e.x)/wt(e.y)}class hI{constructor(){this.members=[]}add(t){jl(this.members,t),t.scheduleRender()}remove(t){if(Bl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function uf(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y;if((o||s)&&(r="translate3d(".concat(o,"px, ").concat(s,"px, 0) ")),(t.x!==1||t.y!==1)&&(r+="scale(".concat(1/t.x,", ").concat(1/t.y,") ")),n){const{rotate:c,rotateX:l,rotateY:u}=n;c&&(r+="rotate(".concat(c,"deg) ")),l&&(r+="rotateX(".concat(l,"deg) ")),u&&(r+="rotateY(".concat(u,"deg) "))}const i=e.x.scale*t.x,a=e.y.scale*t.y;return(i!==1||a!==1)&&(r+="scale(".concat(i,", ").concat(a,")")),r||"none"}const pI=(e,t)=>e.depth-t.depth;class mI{constructor(){this.children=[],this.isDirty=!1}add(t){jl(this.children,t),this.isDirty=!0}remove(t){Bl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(pI),this.isDirty=!1,this.children.forEach(t)}}function gI(e,t){const n=performance.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(gn(r),e(s-t))};return Fe.read(r,!0),()=>gn(r)}function bI(e){window.MotionDebug&&window.MotionDebug.record(e)}function yI(e){return e instanceof SVGElement&&e.tagName!=="svg"}function vI(e,t,n){const r=bt(e)?e:Wr(e);return r.start(Nl("",r,t,n)),r.animation}const df=["","X","Y","Z"],xI={visibility:"hidden"},ff=1e3;let SI=0;const Ln={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function fg({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=SI++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Ln.totalNodes=Ln.resolvedTargetDeltas=Ln.recalculatedProjection=0,this.nodes.forEach(CI),this.nodes.forEach(EI),this.nodes.forEach(II),this.nodes.forEach(PI),bI(Ln)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;cthis.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=gI(h,250),ti.hasAnimatedSinceResize&&(ti.hasAnimatedSinceResize=!1,this.nodes.forEach(pf))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||FI,{onLayoutAnimationStart:b,onLayoutAnimationComplete:w}=u.getProps(),y=!this.targetLayout||!dg(this.targetLayout,m)||p,x=!h&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);const P={...Dl(g,"layout"),onPlay:b,onComplete:w};(u.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P)}else h||pf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,gn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach($I),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;uthis.update()))}clearAllSnapshots(){this.nodes.forEach(TI),this.sharedNodes.forEach(RI)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Fe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Fe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const k=P/1e3;mf(d.x,i.x,k),mf(d.y,i.y,k),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mo(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),MI(this.relativeTarget,this.relativeTargetOrigin,h,k),x&&fI(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=qe()),_t(x,this.relativeTarget)),g&&(this.animationValues=u,iI(u,l,this.latestValues,k,y,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(gn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Fe.update(()=>{ti.hasAnimatedSinceResize=!0,this.currentAnimation=vI(0,ff,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ff),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=i;if(!(!a||!c||!l)){if(this!==i&&this.layout&&l&&hg(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||qe();const d=wt(this.layout.layoutBox.x);c.x.min=i.target.x.min,c.x.max=c.x.min+d;const h=wt(this.layout.layoutBox.y);c.y.min=i.target.y.min,c.y.max=c.y.min+h}_t(a,c),_r(a,u),Ro(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new hI),this.sharedNodes.get(i).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:c}=i;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const l={};for(let u=0;u{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(hf),this.root.sharedNodes.clear()}}}function wI(e){e.updateLayout()}function kI(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?Lt(d=>{const h=i?n.measuredBox[d]:n.layoutBox[d],p=wt(h);h.min=r[d].min,h.max=h.min+p}):hg(s,n.layoutBox,r)&&Lt(d=>{const h=i?n.measuredBox[d]:n.layoutBox[d],p=wt(r[d]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const a=Tr();Ro(a,r,n.layoutBox);const c=Tr();i?Ro(c,e.applyTransform(o,!0),n.measuredBox):Ro(c,r,n.layoutBox);const l=!ug(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:p}=d;if(h&&p){const m=qe();Mo(m,n.layoutBox,h.layoutBox);const g=qe();Mo(g,r,p.layoutBox),dg(m,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function CI(e){Ln.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function PI(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function TI(e){e.clearSnapshot()}function hf(e){e.clearMeasurements()}function _I(e){e.isLayoutDirty=!1}function AI(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function pf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function EI(e){e.resolveTargetDelta()}function II(e){e.calcProjection()}function $I(e){e.resetRotation()}function RI(e){e.removeLeadSnapshot()}function mf(e,t,n){e.translate=ze(t.translate,0,n),e.scale=ze(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function gf(e,t,n,r){e.min=ze(t.min,n.min,r),e.max=ze(t.max,n.max,r)}function MI(e,t,n,r){gf(e.x,t.x,n.x,r),gf(e.y,t.y,n.y,r)}function OI(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const FI={duration:.45,ease:[.4,0,.1,1]},bf=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),yf=bf("applewebkit/")&&!bf("chrome/")?Math.round:Ue;function vf(e){e.min=yf(e.min),e.max=yf(e.max)}function DI(e){vf(e.x),vf(e.y)}function hg(e,t,n){return e==="position"||e==="preserve-aspect"&&!$c(lf(t),lf(n),.2)}const NI=fg({attachResizeListener:(e,t)=>an(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ha={current:void 0},pg=fg({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ha.current){const e=new NI({});e.mount(window),e.setOptions({layoutScroll:!0}),Ha.current=e}return Ha.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),jI={pan:{Feature:QE},drag:{Feature:JE,ProjectionNode:pg,MeasureLayout:ag}},BI=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function LI(e){const t=BI.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function Fc(e,t,n=1){const[r,o]=LI(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Xm(i)?parseFloat(i):i}else return Cc(o)?Fc(o,t,n+1):o}function zI(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(o=>{const s=o.get();if(!Cc(s))return;const i=Fc(s,r);i&&o.set(i)});for(const o in t){const s=t[o];if(!Cc(s))continue;const i=Fc(s,r);i&&(t[o]=i,n||(n={}),n[o]===void 0&&(n[o]=s))}return{target:t,transitionEnd:n}}const VI=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),mg=e=>VI.has(e),WI=e=>Object.keys(e).some(mg),xf=e=>e===ir||e===oe,Sf=(e,t)=>parseFloat(e.split(", ")[t]),wf=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return Sf(o[1],t);{const s=r.match(/^matrix\((.+)\)$/);return s?Sf(s[1],e):0}},HI=new Set(["x","y","z"]),UI=os.filter(e=>!HI.has(e));function GI(e){const t=[];return UI.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Hr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:wf(4,13),y:wf(5,14)};Hr.translateX=Hr.x;Hr.translateY=Hr.y;const qI=(e,t,n)=>{const r=t.measureViewportBox(),o=t.current,s=getComputedStyle(o),{display:i}=s,a={};i==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(l=>{a[l]=Hr[l](r,s)}),t.render();const c=t.measureViewportBox();return n.forEach(l=>{const u=t.getValue(l);u&&u.jump(a[l]),e[l]=Hr[l](c,s)}),e},KI=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(mg);let s=[],i=!1;const a=[];if(o.forEach(c=>{const l=e.getValue(c);if(!e.hasValue(c))return;let u=n[c],d=lo(u);const h=t[c];let p;if(hi(h)){const m=h.length,g=h[0]===null?1:0;u=h[g],d=lo(u);for(let b=g;b=0?window.pageYOffset:null,l=qI(t,e,a);return s.length&&s.forEach(([u,d])=>{e.getValue(u).set(d)}),e.render(),Ni&&c!==null&&window.scrollTo({top:c}),{target:l,transitionEnd:r}}else return{target:t,transitionEnd:r}};function XI(e,t,n,r){return WI(t)?KI(e,t,n,r):{target:t,transitionEnd:r}}const YI=(e,t,n,r)=>{const o=zI(e,t,r);return t=o.target,r=o.transitionEnd,XI(e,t,n,r)},Dc={current:null},gg={current:!1};function ZI(){if(gg.current=!0,!!Ni)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Dc.current=e.matches;e.addListener(t),t()}else Dc.current=!1}function JI(e,t,n){const{willChange:r}=t;for(const o in t){const s=t[o],i=n[o];if(bt(s))e.addValue(o,s),bi(r)&&r.add(o);else if(bt(i))e.addValue(o,Wr(s,{owner:e})),bi(r)&&r.remove(o);else if(i!==s)if(e.hasValue(o)){const a=e.getValue(o);!a.hasAnimated&&a.set(s)}else{const a=e.getStaticValue(o);e.addValue(o,Wr(a!==void 0?a:s,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const kf=new WeakMap,bg=Object.keys(Ho),QI=bg.length,Cf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],e$=wl.length;class t${constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,visualState:s},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Fe.render(this.render,!1,!0);const{latestValues:a,renderState:c}=s;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=i,this.isControllingVariants=Bi(n),this.isVariantNode=em(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n,{});for(const d in u){const h=u[d];a[d]!==void 0&&bt(h)&&(h.set(a[d],!1),bi(l)&&l.add(d))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,kf.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),gg.current||ZI(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Dc.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){kf.delete(this.current),this.projection&&this.projection.unmount(),gn(this.notifyUpdate),gn(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=sr.has(t),o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Fe.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),s()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,o,s){let i,a;for(let c=0;cthis.scheduleRender(),animationType:typeof l=="string"?l:"both",initialPromotionConfig:s,layoutScroll:h,layoutRoot:p})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):qe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Wr(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,o=typeof r=="string"||typeof r=="object"?(n=Il(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!bt(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ll),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class yg extends t${sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:o},s){let i=bE(r,t||{},this);if(o&&(n&&(n=o(n)),r&&(r=o(r)),i&&(i=o(i))),s){mE(this,r,i);const a=YI(this,r,i,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function n$(e){return window.getComputedStyle(e)}class r$ extends yg{readValueFromInstance(t,n){if(sr.has(n)){const r=Fl(n);return r&&r.default||0}else{const r=n$(t),o=(om(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return og(t,n)}build(t,n,r,o){Pl(t,n,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,n){return El(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;bt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent="".concat(n))}))}renderInstance(t,n,r,o){um(t,n,r,o)}}class o$ extends yg{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(sr.has(n)){const r=Fl(n);return r&&r.default||0}return n=dm.has(n)?n:xl(n),t.getAttribute(n)}measureInstanceViewportBox(){return qe()}scrapeMotionValuesFromProps(t,n){return hm(t,n)}build(t,n,r,o){_l(t,n,r,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,r,o){fm(t,n,r,o)}mount(t){this.isSVGTag=Al(t.tagName),super.mount(t)}}const s$=(e,t)=>Cl(e)?new o$(t,{enableHardwareAcceleration:!1}):new r$(t,{enableHardwareAcceleration:!0}),i$={layout:{ProjectionNode:pg,MeasureLayout:ag}},a$={...RE,...Q_,...jI,...i$},Zt=c_((e,t)=>L_(e,t,a$,s$));function vg(){const e=f.useRef(!1);return vl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function c$(){const e=vg(),[t,n]=f.useState(0),r=f.useCallback(()=>{e.current&&n(t+1)},[t]);return[f.useCallback(()=>Fe.postRender(r),[r]),t]}class l$ extends f.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function u$({children:e,isPresent:t}){const n=f.useId(),r=f.useRef(null),o=f.useRef({width:0,height:0,top:0,left:0});return f.useInsertionEffect(()=>{const{width:s,height:i,top:a,left:c}=o.current;if(t||!r.current||!s||!i)return;r.current.dataset.motionPopId=n;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule('\n [data-motion-pop-id="'.concat(n,'"] {\n position: absolute !important;\n width: ').concat(s,"px !important;\n height: ").concat(i,"px !important;\n top: ").concat(a,"px !important;\n left: ").concat(c,"px !important;\n }\n ")),()=>{document.head.removeChild(l)}},[t]),f.createElement(l$,{isPresent:t,childRef:r,sizeRef:o},f.cloneElement(e,{ref:r}))}const Ua=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i})=>{const a=pm(d$),c=f.useId(),l=f.useMemo(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u=>{a.set(u,!0);for(const d of a.values())if(!d)return;r&&r()},register:u=>(a.set(u,!1),()=>a.delete(u))}),s?void 0:[n]);return f.useMemo(()=>{a.forEach((u,d)=>a.set(d,!1))},[n]),f.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),i==="popLayout"&&(e=f.createElement(u$,{isPresent:n},e)),f.createElement(rs.Provider,{value:l},e)};function d$(){return new Map}function f$(e){return f.useEffect(()=>()=>e(),[])}const zn=e=>e.key||"";function h$(e,t){e.forEach(n=>{const r=zn(n);t.set(r,n)})}function p$(e){const t=[];return f.Children.forEach(e,n=>{f.isValidElement(n)&&t.push(n)}),t}const ar=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:s=!0,mode:i="sync"})=>{const a=f.useContext(kl).forceRender||c$()[0],c=vg(),l=p$(e);let u=l;const d=f.useRef(new Map).current,h=f.useRef(u),p=f.useRef(new Map).current,m=f.useRef(!0);if(vl(()=>{m.current=!1,h$(l,p),h.current=u}),f$(()=>{m.current=!0,p.clear(),d.clear()}),m.current)return f.createElement(f.Fragment,null,u.map(y=>f.createElement(Ua,{key:zn(y),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:s,mode:i},y)));u=[...u];const g=h.current.map(zn),b=l.map(zn),w=g.length;for(let y=0;y{if(b.indexOf(x)!==-1)return;const P=p.get(x);if(!P)return;const k=g.indexOf(x);let A=y;if(!A){const T=()=>{d.delete(x);const E=Array.from(p.keys()).filter(I=>!b.includes(I));if(E.forEach(I=>p.delete(I)),h.current=l.filter(I=>{const R=zn(I);return R===x||E.includes(R)}),!d.size){if(c.current===!1)return;a(),r&&r()}};A=f.createElement(Ua,{key:zn(P),isPresent:!1,onExitComplete:T,custom:t,presenceAffectsLayout:s,mode:i},P),d.set(x,A)}u.splice(k,0,A)}),u=u.map(y=>{const x=y.key;return d.has(x)?y:f.createElement(Ua,{key:zn(y),isPresent:!0,presenceAffectsLayout:s,mode:i},y)}),f.createElement(f.Fragment,null,d.size?u:u.map(y=>f.cloneElement(y)))},m$=(e,t)=>e.find(n=>n.id===t);function Pf(e,t){const n=xg(e,t),r=n?e[n].findIndex(o=>o.id===t):-1;return{position:n,index:r}}function xg(e,t){for(const[n,r]of Object.entries(e))if(m$(r,t))return n}function g$(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function b$(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,o=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,s=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",i=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:o,right:s,left:i}}var y$=/^((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|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|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)-.*))$/,v$=jp(function(e){return y$.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),x$=v$,S$=function(t){return t!=="theme"},Tf=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?x$:S$},_f=function(t,n,r){var o;if(n){var s=n.shouldForwardProp;o=t.__emotion_forwardProp&&s?function(i){return t.__emotion_forwardProp(i)&&s(i)}:s}return typeof o!="function"&&r&&(o=t.__emotion_forwardProp),o},w$=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return ml(n,r,o),Wp(function(){return gl(n,r,o)}),null},k$=function e(t,n){var r=t.__emotion_real===t,o=r&&t.__emotion_base||t,s,i;n!==void 0&&(s=n.label,i=n.target);var a=_f(t,n,r),c=a||Tf(o),l=!c("as");return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(s!==void 0&&d.push("label:"+s+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{var h=u[0];d.push(h[0]);for(var p=u.length,m=1;mt=>{const{theme:n,css:r,__css:o,sx:s,...i}=t,[a]=Hv(i,cx),c=ht(e,t),l=kv({},o,c,Jo(a),s),u=gp(l)(t.theme);return r?[u,r]:u};function Ga(e,t){const{baseStyle:n,...r}=t!=null?t:{};r.shouldForwardProp||(r.shouldForwardProp=_$);const o=E$({baseStyle:n}),s=A$(e,r)(o);return f.forwardRef(function(c,l){const{children:u,...d}=c,{colorMode:h,forced:p}=Fi(),m=p?h:void 0;return f.createElement(s,{ref:l,"data-theme":m,...d},u)})}function I$(){const e=new Map;return new Proxy(Ga,{apply(t,n,r){return Ga(...r)},get(t,n){return e.has(n)||e.set(n,Ga(n)),e.get(n)}})}const O=I$(),$$={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},Sg=f.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:o,requestClose:s=!1,position:i="bottom",duration:a=5e3,containerStyle:c,motionVariants:l=$$,toastSpacing:u="0.5rem"}=e,[d,h]=f.useState(a),p=eI();pn(()=>{p||r==null||r()},[p]),pn(()=>{h(a)},[a]);const m=()=>h(null),g=()=>h(a),b=()=>{p&&o()};f.useEffect(()=>{p&&s&&o()},[p,s,o]),u0(b,d);const w=f.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:u,...c}),[c,u]),y=f.useMemo(()=>g$(i),[i]);return v.jsx(Zt.div,{layout:!0,className:"chakra-toast",variants:l,initial:"initial",animate:"animate",exit:"exit",onHoverStart:m,onHoverEnd:g,custom:{position:i},style:y,children:v.jsx(O.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:w,children:ht(n,{id:t,onClose:b})})})});Sg.displayName="ToastComponent";function D(e){return f.forwardRef(e)}var qa,Af;function R$(){if(Af)return qa;Af=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(s,i){if(s===i)return!0;if(s&&i&&typeof s=="object"&&typeof i=="object"){if(s.constructor!==i.constructor)return!1;var a,c,l;if(Array.isArray(s)){if(a=s.length,a!=i.length)return!1;for(c=a;c--!==0;)if(!o(s[c],i[c]))return!1;return!0}var u;if(t&&s instanceof Map&&i instanceof Map){if(s.size!==i.size)return!1;for(u=s.entries();!(c=u.next()).done;)if(!i.has(c.value[0]))return!1;for(u=s.entries();!(c=u.next()).done;)if(!o(c.value[1],i.get(c.value[0])))return!1;return!0}if(n&&s instanceof Set&&i instanceof Set){if(s.size!==i.size)return!1;for(u=s.entries();!(c=u.next()).done;)if(!i.has(c.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(s)&&ArrayBuffer.isView(i)){if(a=s.length,a!=i.length)return!1;for(c=a;c--!==0;)if(s[c]!==i[c])return!1;return!0}if(s.constructor===RegExp)return s.source===i.source&&s.flags===i.flags;if(s.valueOf!==Object.prototype.valueOf&&typeof s.valueOf=="function"&&typeof i.valueOf=="function")return s.valueOf()===i.valueOf();if(s.toString!==Object.prototype.toString&&typeof s.toString=="function"&&typeof i.toString=="function")return s.toString()===i.toString();if(l=Object.keys(s),a=l.length,a!==Object.keys(i).length)return!1;for(c=a;c--!==0;)if(!Object.prototype.hasOwnProperty.call(i,l[c]))return!1;if(e&&s instanceof Element)return!1;for(c=a;c--!==0;)if(!((l[c]==="_owner"||l[c]==="__v"||l[c]==="__o")&&s.$$typeof)&&!o(s[l[c]],i[l[c]]))return!1;return!0}return s!==s&&i!==i}return qa=function(i,a){try{return o(i,a)}catch(c){if((c.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw c}},qa}var M$=R$();const O$=Vh(M$);function cs(){const e=f.useContext(Vr);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function wg(){const e=Fi(),t=cs();return{...e,theme:t}}function kg(e,t={}){var u;const{styleConfig:n,...r}=t,{theme:o,colorMode:s}=wg(),i=e?Zh(o,"components.".concat(e)):void 0,a=n||i,c=Et({theme:o,colorMode:s},(u=a==null?void 0:a.defaultProps)!=null?u:{},Jo(Yr(r,["children"])),(d,h)=>d?void 0:h),l=f.useRef({});if(a){const h=vx(a)(c);O$(l.current,h)||(l.current=h)}return l.current}function Ct(e,t={}){return kg(e,t)}function tt(e,t={}){return kg(e,t)}const Ef={path:v.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[v.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),v.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),v.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Pt=D((e,t)=>{const{as:n,viewBox:r,color:o="currentColor",focusable:s=!1,children:i,className:a,__css:c,...l}=e,u=W("chakra-icon",a),d=Ct("Icon",e),h={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o,...c,...d},p={ref:t,focusable:s,className:u,__css:h},m=r!=null?r:Ef.viewBox;if(n&&typeof n!="string")return v.jsx(O.svg,{as:n,...p,...l});const g=i!=null?i:Ef.path;return v.jsx(O.svg,{verticalAlign:"middle",viewBox:m,...p,...l,children:g})});Pt.displayName="Icon";function F$(e){return v.jsx(Pt,{viewBox:"0 0 24 24",...e,children:v.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function D$(e){return v.jsx(Pt,{viewBox:"0 0 24 24",...e,children:v.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function If(e){return v.jsx(Pt,{viewBox:"0 0 24 24",...e,children:v.jsx("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}const N$=Oi({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),zl=D((e,t)=>{const n=Ct("Spinner",e),{label:r="Loading...",thickness:o="2px",speed:s="0.45s",emptyColor:i="transparent",className:a,...c}=Ie(e),l=W("chakra-spinner",a),u={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:o,borderBottomColor:i,borderLeftColor:i,animation:"".concat(N$," ").concat(s," linear infinite"),...n};return v.jsx(O.div,{ref:t,__css:u,className:l,...c,children:r&&v.jsx(O.span,{srOnly:!0,children:r})})});zl.displayName="Spinner";const[j$,Vl]=Ee({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[B$,Wl]=Ee({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Cg={info:{icon:D$,colorScheme:"blue"},warning:{icon:If,colorScheme:"orange"},success:{icon:F$,colorScheme:"green"},error:{icon:If,colorScheme:"red"},loading:{icon:zl,colorScheme:"blue"}};function L$(e){return Cg[e].colorScheme}function z$(e){return Cg[e].icon}const Pg=D(function(t,n){var l;const{status:r="info",addRole:o=!0,...s}=Ie(t),i=(l=t.colorScheme)!=null?l:L$(r),a=tt("Alert",{...t,colorScheme:i}),c={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...a.container};return v.jsx(j$,{value:{status:r},children:v.jsx(B$,{value:a,children:v.jsx(O.div,{"data-status":r,role:o?"alert":void 0,ref:n,...s,className:W("chakra-alert",t.className),__css:c})})})});Pg.displayName="Alert";function Tg(e){const{status:t}=Vl(),n=z$(t),r=Wl(),o=t==="loading"?r.spinner:r.icon;return v.jsx(O.span,{display:"inherit","data-status":t,...e,className:W("chakra-alert__icon",e.className),__css:o,children:e.children||v.jsx(n,{h:"100%",w:"100%"})})}Tg.displayName="AlertIcon";const _g=D(function(t,n){const r=Wl(),{status:o}=Vl();return v.jsx(O.div,{ref:n,"data-status":o,...t,className:W("chakra-alert__title",t.className),__css:r.title})});_g.displayName="AlertTitle";const Ag=D(function(t,n){const{status:r}=Vl(),o=Wl(),s={display:"inline",...o.description};return v.jsx(O.div,{ref:n,"data-status":r,...t,className:W("chakra-alert__desc",t.className),__css:s})});Ag.displayName="AlertDescription";function V$(e){return v.jsx(Pt,{focusable:"false","aria-hidden":!0,...e,children:v.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}const Wi=D(function(t,n){const r=Ct("CloseButton",t),{children:o,isDisabled:s,__css:i,...a}=Ie(t),c={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return v.jsx(O.button,{type:"button","aria-label":"Close",ref:n,disabled:s,__css:{...c,...r,...i},...a,children:o||v.jsx(V$,{width:"1em",height:"1em"})})});Wi.displayName="CloseButton";const W$=e=>{const{status:t,variant:n="solid",id:r,title:o,isClosable:s,onClose:i,description:a,colorScheme:c,icon:l}=e,u=r?{root:"toast-".concat(r),title:"toast-".concat(r,"-title"),description:"toast-".concat(r,"-description")}:void 0;return v.jsxs(Pg,{addRole:!1,status:t,variant:n,id:u==null?void 0:u.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:c,children:[v.jsx(Tg,{children:l}),v.jsxs(O.div,{flex:"1",maxWidth:"100%",children:[o&&v.jsx(_g,{id:u==null?void 0:u.title,children:o}),a&&v.jsx(Ag,{id:u==null?void 0:u.description,display:"block",children:a})]}),s&&v.jsx(Wi,{size:"sm",onClick:i,position:"absolute",insetEnd:1,top:1})]})};function Eg(e={}){const{render:t,toastComponent:n=W$}=e;return o=>typeof t=="function"?t({...o,...e}):v.jsx(n,{...o,...e})}const H$={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Ht=U$(H$);function U$(e){let t=e;const n=new Set,r=o=>{t=o(t),n.forEach(s=>s())};return{getState:()=>t,subscribe:o=>(n.add(o),()=>{r(()=>e),n.delete(o)}),removeToast:(o,s)=>{r(i=>({...i,[s]:i[s].filter(a=>a.id!=o)}))},notify:(o,s)=>{const i=G$(o,s),{position:a,id:c}=i;return r(l=>{var h,p;const d=a.includes("top")?[i,...(h=l[a])!=null?h:[]]:[...(p=l[a])!=null?p:[],i];return{...l,[a]:d}}),c},update:(o,s)=>{o&&r(i=>{const a={...i},{position:c,index:l}=Pf(a,o);return c&&l!==-1&&(a[c][l]={...a[c][l],...s,message:Eg(s)}),a})},closeAll:({positions:o}={})=>{r(s=>{const i=["bottom","bottom-right","bottom-left","top","top-left","top-right"];return(o!=null?o:i).reduce((c,l)=>(c[l]=s[l].map(u=>({...u,requestClose:!0})),c),{...s})})},close:o=>{r(s=>{const i=xg(s,o);return i?{...s,[i]:s[i].map(a=>a.id==o?{...a,requestClose:!0}:a)}:s})},isActive:o=>!!Pf(Ht.getState(),o).position}}let $f=0;function G$(e,t={}){var o,s;$f+=1;const n=(o=t.id)!=null?o:$f,r=(s=t.position)!=null?s:"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Ht.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}const[Ig,q$]=Ee({strict:!1,name:"PortalContext"}),Hl="chakra-portal",K$=".chakra-portal",X$=e=>v.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Y$=e=>{const{appendToParentPortal:t,children:n}=e,[r,o]=f.useState(null),s=f.useRef(null),[,i]=f.useState({});f.useEffect(()=>i({}),[]);const a=q$(),c=ZT();ln(()=>{if(!r)return;const u=r.ownerDocument,d=t&&a!=null?a:u.body;if(!d)return;s.current=u.createElement("div"),s.current.className=Hl,d.appendChild(s.current),i({});const h=s.current;return()=>{d.contains(h)&&d.removeChild(h)}},[r]);const l=c!=null&&c.zIndex?v.jsx(X$,{zIndex:c==null?void 0:c.zIndex,children:n}):n;return s.current?Wh.createPortal(v.jsx(Ig,{value:s.current,children:l}),s.current):v.jsx("span",{ref:u=>{u&&o(u)}})},Z$=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,o=n.current,s=o!=null?o:typeof window<"u"?document.body:void 0,i=f.useMemo(()=>{const c=o==null?void 0:o.ownerDocument.createElement("div");return c&&(c.className=Hl),c},[o]),[,a]=f.useState({});return ln(()=>a({}),[]),ln(()=>{if(!(!i||!s))return s.appendChild(i),()=>{s.removeChild(i)}},[i,s]),s&&i?Wh.createPortal(v.jsx(Ig,{value:r?i:null,children:t}),i):null};function Jr(e){const t={appendToParentPortal:!0,...e},{containerRef:n,...r}=t;return n?v.jsx(Z$,{containerRef:n,...r}):v.jsx(Y$,{...r})}Jr.className=Hl;Jr.selector=K$;Jr.displayName="Portal";const[J$,Q$]=Ee({name:"ToastOptionsContext",strict:!1}),eR=e=>{const t=f.useSyncExternalStore(Ht.subscribe,Ht.getState,Ht.getState),{motionVariants:n,component:r=Sg,portalProps:o,animatePresenceProps:s}=e,a=Object.keys(t).map(c=>{const l=t[c];return v.jsx("div",{role:"region","aria-live":"polite","aria-label":"Notifications-".concat(c),id:"chakra-toast-manager-".concat(c),style:b$(c),children:v.jsx(ar,{...s,initial:!1,children:l.map(u=>v.jsx(r,{motionVariants:n,...u},u.id))})},c)});return v.jsx(Jr,{...o,children:a})},tR=e=>function({children:n,theme:r=e,toastOptions:o,...s}){return v.jsxs(JT,{theme:r,...s,children:[v.jsx(J$,{value:o==null?void 0:o.defaultOptions,children:n}),v.jsx(eR,{...o})]})},kN=tR($p);function Rf(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}const nR=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function Mf(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function Of(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}const Ka=typeof window<"u"?f.useLayoutEffect:f.useEffect,Ff=e=>e;var rR=Object.defineProperty,oR=(e,t,n)=>t in e?rR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ve=(e,t,n)=>(oR(e,typeof t!="symbol"?t+"":t,n),n);class sR{constructor(){Ve(this,"descendants",new Map),Ve(this,"register",t=>{if(t!=null)return nR(t)?this.registerNode(t):n=>{this.registerNode(n,t)}}),Ve(this,"unregister",t=>{this.descendants.delete(t);const n=Rf(Array.from(this.descendants.keys()));this.assignIndex(n)}),Ve(this,"destroy",()=>{this.descendants.clear()}),Ve(this,"assignIndex",t=>{this.descendants.forEach(n=>{const r=t.indexOf(n.node);n.index=r,n.node.dataset.index=n.index.toString()})}),Ve(this,"count",()=>this.descendants.size),Ve(this,"enabledCount",()=>this.enabledValues().length),Ve(this,"values",()=>Array.from(this.descendants.values()).sort((n,r)=>n.index-r.index)),Ve(this,"enabledValues",()=>this.values().filter(t=>!t.disabled)),Ve(this,"item",t=>{if(this.count()!==0)return this.values()[t]}),Ve(this,"enabledItem",t=>{if(this.enabledCount()!==0)return this.enabledValues()[t]}),Ve(this,"first",()=>this.item(0)),Ve(this,"firstEnabled",()=>this.enabledItem(0)),Ve(this,"last",()=>this.item(this.descendants.size-1)),Ve(this,"lastEnabled",()=>{const t=this.enabledValues().length-1;return this.enabledItem(t)}),Ve(this,"indexOf",t=>{var n,r;return t&&(r=(n=this.descendants.get(t))==null?void 0:n.index)!=null?r:-1}),Ve(this,"enabledIndexOf",t=>t==null?-1:this.enabledValues().findIndex(n=>n.node.isSameNode(t))),Ve(this,"next",(t,n=!0)=>{const r=Mf(t,this.count(),n);return this.item(r)}),Ve(this,"nextEnabled",(t,n=!0)=>{const r=this.item(t);if(!r)return;const o=this.enabledIndexOf(r.node),s=Mf(o,this.enabledCount(),n);return this.enabledItem(s)}),Ve(this,"prev",(t,n=!0)=>{const r=Of(t,this.count()-1,n);return this.item(r)}),Ve(this,"prevEnabled",(t,n=!0)=>{const r=this.item(t);if(!r)return;const o=this.enabledIndexOf(r.node),s=Of(o,this.enabledCount()-1,n);return this.enabledItem(s)}),Ve(this,"registerNode",(t,n)=>{if(!t||this.descendants.has(t))return;const r=Array.from(this.descendants.keys()).concat(t),o=Rf(r);n!=null&&n.disabled&&(n.disabled=!!n.disabled);const s={node:t,index:-1,...n};this.descendants.set(t,s),this.assignIndex(o)})}}function $g(){const[e,t]=Ee({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});return[e,t,()=>{const o=f.useRef(new sR);return Ka(()=>()=>o.current.destroy()),o.current},o=>{const s=t(),[i,a]=f.useState(-1),c=f.useRef(null);Ka(()=>()=>{c.current&&s.unregister(c.current)},[]),Ka(()=>{if(!c.current)return;const u=Number(c.current.dataset.index);i!=u&&!Number.isNaN(u)&&a(u)});const l=Ff(o?s.register(o):s.register);return{descendants:s,index:i,enabledIndex:s.enabledIndexOf(c.current),register:Re(l,c)}}]}const[iR,Hi]=Ee({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[aR,Ul]=Ee({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[cR,CN,lR,uR]=$g();function dR(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:o,allowToggle:s,...i}=e;pR(e),mR(e);const a=lR(),[c,l]=f.useState(-1);f.useEffect(()=>()=>{l(-1)},[]);const[u,d]=np({value:r,defaultValue(){return o?n!=null?n:[]:n!=null?n:-1},onChange:t});return{index:u,setIndex:d,htmlProps:i,getAccordionItemProps:p=>{let m=!1;return p!==null&&(m=Array.isArray(u)?u.includes(p):u===p),{isOpen:m,onChange:b=>{if(p!==null)if(o&&Array.isArray(u)){const w=b?u.concat(p):u.filter(y=>y!==p);d(w)}else b?d(p):s&&d(-1)}}},focusedIndex:c,setFocusedIndex:l,descendants:a}}const[fR,Gl]=Ee({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function hR(e){const{isDisabled:t,isFocusable:n,id:r,...o}=e,{getAccordionItemProps:s,setFocusedIndex:i}=Gl(),a=f.useRef(null),c=f.useId(),l=r!=null?r:c,u="accordion-button-".concat(l),d="accordion-panel-".concat(l);gR(e);const{register:h,index:p,descendants:m}=uR({disabled:t&&!n}),{isOpen:g,onChange:b}=s(p===-1?null:p);bR({isOpen:g,isDisabled:t});const w=()=>{b==null||b(!0)},y=()=>{b==null||b(!1)},x=f.useCallback(()=>{b==null||b(!g),i(p)},[p,i,g,b]),P=f.useCallback(E=>{const R={ArrowDown:()=>{const M=m.nextEnabled(p);M==null||M.node.focus()},ArrowUp:()=>{const M=m.prevEnabled(p);M==null||M.node.focus()},Home:()=>{const M=m.firstEnabled();M==null||M.node.focus()},End:()=>{const M=m.lastEnabled();M==null||M.node.focus()}}[E.key];R&&(E.preventDefault(),R(E))},[m,p]),k=f.useCallback(()=>{i(p)},[i,p]),A=f.useCallback(function(I={},R=null){return{...I,type:"button",ref:Re(h,a,R),id:u,disabled:!!t,"aria-expanded":!!g,"aria-controls":d,onClick:Q(I.onClick,x),onFocus:Q(I.onFocus,k),onKeyDown:Q(I.onKeyDown,P)}},[u,t,g,x,k,P,d,h]),T=f.useCallback(function(I={},R=null){return{...I,ref:R,role:"region",id:d,"aria-labelledby":u,hidden:!g}},[u,g,d]);return{isOpen:g,isDisabled:t,isFocusable:n,onOpen:w,onClose:y,getButtonProps:A,getPanelProps:T,htmlProps:o}}function pR(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;Qo({condition:!!n,message:"If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ".concat(typeof t,",")})}function mR(e){Qo({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function gR(e){Qo({condition:!!(e.isFocusable&&!e.isDisabled),message:"Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well.\n "})}function bR(e){Qo({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}const yR=D(function({children:t,reduceMotion:n,...r},o){const s=tt("Accordion",r),i=Ie(r),{htmlProps:a,descendants:c,...l}=dR(i),u=f.useMemo(()=>({...l,reduceMotion:!!n}),[l,n]);return v.jsx(cR,{value:c,children:v.jsx(fR,{value:u,children:v.jsx(iR,{value:s,children:v.jsx(O.div,{ref:o,...a,className:W("chakra-accordion",r.className),__css:s.root,children:t})})})})});yR.displayName="Accordion";const vR=D(function(t,n){const{getButtonProps:r}=Ul(),o=r(t,n),i={display:"flex",alignItems:"center",width:"100%",outline:0,...Hi().button};return v.jsx(O.button,{...o,className:W("chakra-accordion__button",t.className),__css:i})});vR.displayName="AccordionButton";function xR(e){const{isOpen:t,isDisabled:n}=Ul(),{reduceMotion:r}=Gl(),o=W("chakra-accordion__icon",e.className),s=Hi(),i={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...s.icon};return v.jsx(Pt,{viewBox:"0 0 24 24","aria-hidden":!0,className:o,__css:i,...e,children:v.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}xR.displayName="AccordionIcon";const SR=D(function(t,n){const{children:r,className:o}=t,{htmlProps:s,...i}=hR(t),a=Hi(),c={...a.container,overflowAnchor:"none"},l=f.useMemo(()=>i,[i]);return v.jsx(aR,{value:l,children:v.jsx(O.div,{ref:n,...s,className:W("chakra-accordion__item",o),__css:c,children:typeof r=="function"?r({isExpanded:!!i.isOpen,isDisabled:!!i.isDisabled}):r})})});SR.displayName="AccordionItem";const Ar={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1]},Yn={enter:{duration:.2,ease:Ar.easeOut},exit:{duration:.1,ease:Ar.easeIn}},hn={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},wR=e=>e!=null&&parseInt(e.toString(),10)>0,Df={exit:{height:{duration:.2,ease:Ar.ease},opacity:{duration:.3,ease:Ar.ease}},enter:{height:{duration:.3,ease:Ar.ease},opacity:{duration:.4,ease:Ar.ease}}},kR={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:wR(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(s=n==null?void 0:n.exit)!=null?s:hn.exit(Df.exit,o)}},enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{...e&&{opacity:1},height:t,transitionEnd:r==null?void 0:r.enter,transition:(s=n==null?void 0:n.enter)!=null?s:hn.enter(Df.enter,o)}}},Rg=f.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:s=0,endingHeight:i="auto",style:a,className:c,transition:l,transitionEnd:u,animatePresenceProps:d,...h}=e,[p,m]=f.useState(!1);f.useEffect(()=>{const x=setTimeout(()=>{m(!0)});return()=>clearTimeout(x)},[]),Qo({condition:Number(s)>0&&!!r,message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const g=parseFloat(s.toString())>0,b={startingHeight:s,endingHeight:i,animateOpacity:o,transition:p?l:{enter:{duration:0}},transitionEnd:{enter:u==null?void 0:u.enter,exit:r?u==null?void 0:u.exit:{...u==null?void 0:u.exit,display:g?"block":"none"}}},w=r?n:!0,y=n||r?"enter":"exit";return v.jsx(ar,{...d,initial:!1,custom:b,children:w&&v.jsx(Zt.div,{ref:t,...h,className:W("chakra-collapse",c),style:{overflow:"hidden",display:"block",...a},custom:b,variants:kR,initial:r?"exit":!1,animate:y,exit:"exit"})})});Rg.displayName="Collapse";const CR=D(function(t,n){const{className:r,motionProps:o,...s}=t,{reduceMotion:i}=Gl(),{getPanelProps:a,isOpen:c}=Ul(),l=a(s,n),u=W("chakra-accordion__panel",r),d=Hi();i||delete l.hidden;const h=v.jsx(O.div,{...l,__css:d.panel,className:u});return i?h:v.jsx(Rg,{in:c,...o,children:h})});CR.displayName="AccordionPanel";const[PR,TR]=Ee({name:"AvatarStylesContext",hookName:"useAvatarStyles",providerName:""});function _R(e){var o;const t=e.trim().split(" "),n=(o=t[0])!=null?o:"",r=t.length>1?t[t.length-1]:"";return n&&r?"".concat(n.charAt(0)).concat(r.charAt(0)):n.charAt(0)}function Mg(e){const{name:t,getInitials:n,...r}=e,o=TR();return v.jsx(O.div,{role:"img","aria-label":t,...r,__css:o.label,children:t?n==null?void 0:n(t):null})}Mg.displayName="AvatarName";const Og=e=>v.jsxs(O.svg,{viewBox:"0 0 128 128",color:"#fff",width:"100%",height:"100%",className:"chakra-avatar__svg",...e,children:[v.jsx("path",{fill:"currentColor",d:"M103,102.1388 C93.094,111.92 79.3504,118 64.1638,118 C48.8056,118 34.9294,111.768 25,101.7892 L25,95.2 C25,86.8096 31.981,80 40.6,80 L87.4,80 C96.019,80 103,86.8096 103,95.2 L103,102.1388 Z"}),v.jsx("path",{fill:"currentColor",d:"M63.9961647,24 C51.2938136,24 41,34.2938136 41,46.9961647 C41,59.7061864 51.2938136,70 63.9961647,70 C76.6985159,70 87,59.7061864 87,46.9961647 C87,34.2938136 76.6985159,24 63.9961647,24"})]});function Fg(e){const{loading:t,src:n,srcSet:r,onLoad:o,onError:s,crossOrigin:i,sizes:a,ignoreFallback:c}=e,[l,u]=f.useState("pending");f.useEffect(()=>{u(n?"loading":"pending")},[n]);const d=f.useRef(),h=f.useCallback(()=>{if(!n)return;p();const m=new Image;m.src=n,i&&(m.crossOrigin=i),r&&(m.srcset=r),a&&(m.sizes=a),t&&(m.loading=t),m.onload=g=>{p(),u("loaded"),o==null||o(g)},m.onerror=g=>{p(),u("failed"),s==null||s(g)},d.current=m},[n,i,r,a,o,s,t]),p=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)};return ln(()=>{if(!c)return l==="loading"&&h(),()=>{p()}},[l,h,c]),c?"loaded":l}const AR=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError";function Dg(e){const{src:t,srcSet:n,onError:r,onLoad:o,getInitials:s,name:i,borderRadius:a,loading:c,iconLabel:l,icon:u=v.jsx(Og,{}),ignoreFallback:d,referrerPolicy:h,crossOrigin:p}=e,g=Fg({src:t,onError:r,crossOrigin:p,ignoreFallback:d})==="loaded";return!t||!g?i?v.jsx(Mg,{className:"chakra-avatar__initials",getInitials:s,name:i}):f.cloneElement(u,{role:"img","aria-label":l}):v.jsx(O.img,{src:t,srcSet:n,alt:i!=null?i:l,onLoad:o,referrerPolicy:h,crossOrigin:p!=null?p:void 0,className:"chakra-avatar__img",loading:c,__css:{width:"100%",height:"100%",objectFit:"cover",borderRadius:a}})}Dg.displayName="AvatarImage";const ER={display:"inline-flex",alignItems:"center",justifyContent:"center",textAlign:"center",textTransform:"uppercase",fontWeight:"medium",position:"relative",flexShrink:0},IR=D((e,t)=>{const n=tt("Avatar",e),[r,o]=f.useState(!1),{src:s,srcSet:i,name:a,showBorder:c,borderRadius:l="full",onError:u,onLoad:d,getInitials:h=_R,icon:p=v.jsx(Og,{}),iconLabel:m=" avatar",loading:g,children:b,borderColor:w,ignoreFallback:y,crossOrigin:x,referrerPolicy:P,...k}=Ie(e),A={borderRadius:l,borderWidth:c?"2px":void 0,...ER,...n.container};return w&&(A.borderColor=w),v.jsx(O.span,{ref:t,...k,className:W("chakra-avatar",e.className),"data-loaded":ae(r),__css:A,children:v.jsxs(PR,{value:n,children:[v.jsx(Dg,{src:s,srcSet:i,loading:g,onLoad:Q(d,()=>{o(!0)}),onError:u,getInitials:h,name:a,borderRadius:l,icon:p,iconLabel:m,ignoreFallback:y,crossOrigin:x,referrerPolicy:P}),b]})})});IR.displayName="Avatar";const $R=D(function(t,n){const r=Ct("Badge",t),{className:o,...s}=Ie(t);return v.jsx(O.span,{ref:n,className:W("chakra-badge",t.className),...s,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});$R.displayName="Badge";const RR=O("div");RR.displayName="Box";const[MR,OR]=Ee({strict:!1,name:"ButtonGroupContext"});function So(e){const{children:t,className:n,...r}=e,o=f.isValidElement(t)?f.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,s=W("chakra-button__icon",n);return v.jsx(O.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:s,children:o})}So.displayName="ButtonIcon";function jc(e){const{label:t,placement:n,spacing:r="0.5rem",children:o=v.jsx(zl,{color:"currentColor",width:"1em",height:"1em"}),className:s,__css:i,...a}=e,c=W("chakra-button__spinner",s),l=n==="start"?"marginEnd":"marginStart",u=f.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[l]:t?r:0,fontSize:"1em",lineHeight:"normal",...i}),[i,t,l,r]);return v.jsx(O.div,{className:c,...a,__css:u,children:o})}jc.displayName="ButtonSpinner";function FR(e){const[t,n]=f.useState(!e);return{ref:f.useCallback(s=>{s&&n(s.tagName==="BUTTON")},[]),type:t?"button":void 0}}const Ng=D((e,t)=>{const n=OR(),r=Ct("Button",{...n,...e}),{isDisabled:o=n==null?void 0:n.isDisabled,isLoading:s,isActive:i,children:a,leftIcon:c,rightIcon:l,loadingText:u,iconSpacing:d="0.5rem",type:h,spinner:p,spinnerPlacement:m="start",className:g,as:b,shouldWrapChildren:w,...y}=Ie(e),x=f.useMemo(()=>{const T={...r==null?void 0:r._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:T}}},[r,n]),{ref:P,type:k}=FR(b),A={rightIcon:l,leftIcon:c,iconSpacing:d,children:a,shouldWrapChildren:w};return v.jsxs(O.button,{disabled:o||s,ref:l0(t,P),as:b,type:h!=null?h:k,"data-active":ae(i),"data-loading":ae(s),__css:x,className:W("chakra-button",g),...y,children:[s&&m==="start"&&v.jsx(jc,{className:"chakra-button__spinner--start",label:u,placement:"start",spacing:d,children:p}),s?u||v.jsx(O.span,{opacity:0,children:v.jsx(Nf,{...A})}):v.jsx(Nf,{...A}),s&&m==="end"&&v.jsx(jc,{className:"chakra-button__spinner--end",label:u,placement:"end",spacing:d,children:p})]})});Ng.displayName="Button";function Nf(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:o,shouldWrapChildren:s}=e;return s?v.jsxs("span",{style:{display:"contents"},children:[t&&v.jsx(So,{marginEnd:o,children:t}),r,n&&v.jsx(So,{marginStart:o,children:n})]}):v.jsxs(v.Fragment,{children:[t&&v.jsx(So,{marginEnd:o,children:t}),r,n&&v.jsx(So,{marginStart:o,children:n})]})}const DR={horizontal:{"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}},vertical:{"> *:first-of-type:not(:last-of-type)":{borderBottomRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderTopRadius:0}}},NR={horizontal:e=>({"& > *:not(style) ~ *:not(style)":{marginStart:e}}),vertical:e=>({"& > *:not(style) ~ *:not(style)":{marginTop:e}})},jR=D(function(t,n){const{size:r,colorScheme:o,variant:s,className:i,spacing:a="0.5rem",isAttached:c,isDisabled:l,orientation:u="horizontal",...d}=t,h=W("chakra-button__group",i),p=f.useMemo(()=>({size:r,colorScheme:o,variant:s,isDisabled:l}),[r,o,s,l]);let m={display:"inline-flex",...c?DR[u]:NR[u](a)};const g=u==="vertical";return v.jsx(MR,{value:p,children:v.jsx(O.div,{ref:n,role:"group",__css:m,className:h,"data-attached":c?"":void 0,"data-orientation":u,flexDir:g?"column":void 0,...d})})});jR.displayName="ButtonGroup";const BR=D((e,t)=>{const{icon:n,children:r,isRound:o,"aria-label":s,...i}=e,a=n||r,c=f.isValidElement(a)?f.cloneElement(a,{"aria-hidden":!0,focusable:!1}):null;return v.jsx(Ng,{px:"0",py:"0",borderRadius:o?"full":void 0,ref:t,"aria-label":s,...i,children:c})});BR.displayName="IconButton";const LR=O("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});LR.displayName="Center";const zR={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};D(function(t,n){const{axis:r="both",...o}=t;return v.jsx(O.div,{ref:n,__css:zR[r],...o,position:"absolute"})});const[PN,VR]=Ee({name:"CheckboxGroupContext",strict:!1});function WR(e){return v.jsx(O.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:v.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function HR(e){return v.jsx(O.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e,children:v.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function UR(e){const{isIndeterminate:t,isChecked:n,...r}=e,o=t?HR:WR;return n||t?v.jsx(O.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:v.jsx(o,{...r})}):null}var GR=()=>typeof document<"u",jf=!1,ls=null,tr=!1,Bc=!1,Lc=new Set;function ql(e,t){Lc.forEach(n=>n(e,t))}var qR=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function KR(e){return!(e.metaKey||!qR&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Bf(e){tr=!0,KR(e)&&(ls="keyboard",ql("keyboard",e))}function fr(e){if(ls="pointer",e.type==="mousedown"||e.type==="pointerdown"){tr=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let n=!1;try{n=t.matches(":focus-visible")}catch(r){}if(n)return;ql("pointer",e)}}function XR(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function YR(e){XR(e)&&(tr=!0,ls="virtual")}function ZR(e){e.target===window||e.target===document||e.target instanceof Element&&e.target.hasAttribute("tabindex")||(!tr&&!Bc&&(ls="virtual",ql("virtual",e)),tr=!1,Bc=!1)}function JR(){tr=!1,Bc=!0}function Lf(){return ls!=="pointer"}function QR(){if(!GR()||jf)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){tr=!0,e.apply(this,n)},document.addEventListener("keydown",Bf,!0),document.addEventListener("keyup",Bf,!0),document.addEventListener("click",YR,!0),window.addEventListener("focus",ZR,!0),window.addEventListener("blur",JR,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",fr,!0),document.addEventListener("pointermove",fr,!0),document.addEventListener("pointerup",fr,!0)):(document.addEventListener("mousedown",fr,!0),document.addEventListener("mousemove",fr,!0),document.addEventListener("mouseup",fr,!0)),jf=!0}function eM(e){QR(),e(Lf());const t=()=>e(Lf());return Lc.add(t),()=>{Lc.delete(t)}}const[tM,jg]=Ee({name:"FormControlStylesContext",errorMessage:"useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),[nM,Qr]=Ee({strict:!1,name:"FormControlContext"});function rM(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:o,isReadOnly:s,...i}=e,a=f.useId(),c=t||"field-".concat(a),l="".concat(c,"-label"),u="".concat(c,"-feedback"),d="".concat(c,"-helptext"),[h,p]=f.useState(!1),[m,g]=f.useState(!1),[b,w]=f.useState(!1),y=f.useCallback((T={},E=null)=>({id:d,...T,ref:Re(E,I=>{I&&g(!0)})}),[d]),x=f.useCallback((T={},E=null)=>({...T,ref:E,"data-focus":ae(b),"data-disabled":ae(o),"data-invalid":ae(r),"data-readonly":ae(s),id:T.id!==void 0?T.id:l,htmlFor:T.htmlFor!==void 0?T.htmlFor:c}),[c,o,b,r,s,l]),P=f.useCallback((T={},E=null)=>({id:u,...T,ref:Re(E,I=>{I&&p(!0)}),"aria-live":"polite"}),[u]),k=f.useCallback((T={},E=null)=>({...T,...i,ref:E,role:"group","data-focus":ae(b),"data-disabled":ae(o),"data-invalid":ae(r),"data-readonly":ae(s)}),[i,o,b,r,s]),A=f.useCallback((T={},E=null)=>({...T,ref:E,role:"presentation","aria-hidden":!0,children:T.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!s,isDisabled:!!o,isFocused:!!b,onFocus:()=>w(!0),onBlur:()=>w(!1),hasFeedbackText:h,setHasFeedbackText:p,hasHelpText:m,setHasHelpText:g,id:c,labelId:l,feedbackId:u,helpTextId:d,htmlProps:i,getHelpTextProps:y,getErrorMessageProps:P,getRootProps:k,getLabelProps:x,getRequiredIndicatorProps:A}}const oM=D(function(t,n){const r=tt("Form",t),o=Ie(t),{getRootProps:s,...i}=rM(o),a=W("chakra-form-control",t.className);return v.jsx(nM,{value:i,children:v.jsx(tM,{value:r,children:v.jsx(O.div,{...s({},n),className:a,__css:r.container})})})});oM.displayName="FormControl";const sM=D(function(t,n){const r=Qr(),o=jg(),s=W("chakra-form__helper-text",t.className);return v.jsx(O.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:o.helperText,className:s})});sM.displayName="FormHelperText";function Kl(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:o,...s}=Xl(e);return{...s,disabled:t,readOnly:r,required:o,"aria-invalid":cn(n),"aria-required":cn(o),"aria-readonly":cn(r)}}function Xl(e){var m,g,b;const t=Qr(),{id:n,disabled:r,readOnly:o,required:s,isRequired:i,isInvalid:a,isReadOnly:c,isDisabled:l,onFocus:u,onBlur:d,...h}=e,p=e["aria-describedby"]?[e["aria-describedby"]]:[];return t!=null&&t.hasFeedbackText&&(t!=null&&t.isInvalid)&&p.push(t.feedbackId),t!=null&&t.hasHelpText&&p.push(t.helpTextId),{...h,"aria-describedby":p.join(" ")||void 0,id:n!=null?n:t==null?void 0:t.id,isDisabled:(m=r!=null?r:l)!=null?m:t==null?void 0:t.isDisabled,isReadOnly:(g=o!=null?o:c)!=null?g:t==null?void 0:t.isReadOnly,isRequired:(b=s!=null?s:i)!=null?b:t==null?void 0:t.isRequired,isInvalid:a!=null?a:t==null?void 0:t.isInvalid,onFocus:Q(t==null?void 0:t.onFocus,u),onBlur:Q(t==null?void 0:t.onBlur,d)}}const iM={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};function Bg(e={}){const t=Xl(e),{isDisabled:n,isReadOnly:r,isRequired:o,isInvalid:s,id:i,onBlur:a,onFocus:c,"aria-describedby":l}=t,{defaultChecked:u,isChecked:d,isFocusable:h,onChange:p,isIndeterminate:m,name:g,value:b,tabIndex:w=void 0,"aria-label":y,"aria-labelledby":x,"aria-invalid":P,...k}=e,A=Yr(k,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),T=He(p),E=He(a),I=He(c),[R,M]=f.useState(!1),[H,K]=f.useState(!1),[V,Y]=f.useState(!1),[Z,F]=f.useState(!1);f.useEffect(()=>eM(M),[]);const j=f.useRef(null),[U,Se]=f.useState(!0),[re,he]=f.useState(!!u),L=d!==void 0,z=L?d:re,J=f.useCallback(ee=>{if(r||n){ee.preventDefault();return}L||he(z?ee.currentTarget.checked:m?!0:ee.currentTarget.checked),T==null||T(ee)},[r,n,z,L,m,T]);ln(()=>{j.current&&(j.current.indeterminate=!!m)},[m]),pn(()=>{n&&K(!1)},[n,K]),ln(()=>{const ee=j.current;if(!(ee!=null&&ee.form))return;const ge=()=>{he(!!u)};return ee.form.addEventListener("reset",ge),()=>{var G;return(G=ee.form)==null?void 0:G.removeEventListener("reset",ge)}},[]);const se=n&&!h,ve=f.useCallback(ee=>{ee.key===" "&&F(!0)},[F]),pe=f.useCallback(ee=>{ee.key===" "&&F(!1)},[F]);ln(()=>{if(!j.current)return;j.current.checked!==z&&he(j.current.checked)},[j.current]);const Me=f.useCallback((ee={},ge=null)=>{const G=ue=>{H&&ue.preventDefault(),F(!0)};return{...ee,ref:ge,"data-active":ae(Z),"data-hover":ae(V),"data-checked":ae(z),"data-focus":ae(H),"data-focus-visible":ae(H&&R),"data-indeterminate":ae(m),"data-disabled":ae(n),"data-invalid":ae(s),"data-readonly":ae(r),"aria-hidden":!0,onMouseDown:Q(ee.onMouseDown,G),onMouseUp:Q(ee.onMouseUp,()=>F(!1)),onMouseEnter:Q(ee.onMouseEnter,()=>Y(!0)),onMouseLeave:Q(ee.onMouseLeave,()=>Y(!1))}},[Z,z,n,H,R,V,m,s,r]),Oe=f.useCallback((ee={},ge=null)=>({...ee,ref:ge,"data-active":ae(Z),"data-hover":ae(V),"data-checked":ae(z),"data-focus":ae(H),"data-focus-visible":ae(H&&R),"data-indeterminate":ae(m),"data-disabled":ae(n),"data-invalid":ae(s),"data-readonly":ae(r)}),[Z,z,n,H,R,V,m,s,r]),ce=f.useCallback((ee={},ge=null)=>({...A,...ee,ref:Re(ge,G=>{G&&Se(G.tagName==="LABEL")}),onClick:Q(ee.onClick,()=>{var G;U||((G=j.current)==null||G.click(),requestAnimationFrame(()=>{var ue;(ue=j.current)==null||ue.focus({preventScroll:!0})}))}),"data-disabled":ae(n),"data-checked":ae(z),"data-invalid":ae(s)}),[A,n,z,s,U]),ie=f.useCallback((ee={},ge=null)=>({...ee,ref:Re(j,ge),type:"checkbox",name:g,value:b,id:i,tabIndex:w,onChange:Q(ee.onChange,J),onBlur:Q(ee.onBlur,E,()=>K(!1)),onFocus:Q(ee.onFocus,I,()=>K(!0)),onKeyDown:Q(ee.onKeyDown,ve),onKeyUp:Q(ee.onKeyUp,pe),required:o,checked:z,disabled:se,readOnly:r,"aria-label":y,"aria-labelledby":x,"aria-invalid":P?!!P:s,"aria-describedby":l,"aria-disabled":n,style:iM}),[g,b,i,J,E,I,ve,pe,o,z,se,r,y,x,P,s,l,n,w]),le=f.useCallback((ee={},ge=null)=>({...ee,ref:ge,onMouseDown:Q(ee.onMouseDown,aM),"data-disabled":ae(n),"data-checked":ae(z),"data-invalid":ae(s)}),[z,n,s]);return{state:{isInvalid:s,isFocused:H,isChecked:z,isActive:Z,isHovered:V,isIndeterminate:m,isDisabled:n,isReadOnly:r,isRequired:o},getRootProps:ce,getCheckboxProps:Me,getIndicatorProps:Oe,getInputProps:ie,getLabelProps:le,htmlProps:A}}function aM(e){e.preventDefault(),e.stopPropagation()}function cM(e){const[t,n]=f.useState(e),[r,o]=f.useState(!1);return e!==t&&(o(!0),n(e)),r}const lM={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},uM={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},dM=Oi({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),fM=Oi({from:{opacity:0},to:{opacity:1}}),hM=Oi({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),pM=D(function(t,n){const r=VR(),o={...r,...t},s=tt("Checkbox",o),i=Ie(t),{spacing:a="0.5rem",className:c,children:l,iconColor:u,iconSize:d,icon:h=v.jsx(UR,{}),isChecked:p,isDisabled:m=r==null?void 0:r.isDisabled,onChange:g,inputProps:b,...w}=i;let y=p;r!=null&&r.value&&i.value&&(y=r.value.includes(i.value));let x=g;r!=null&&r.onChange&&i.value&&(x=tl(r.onChange,g));const{state:P,getInputProps:k,getCheckboxProps:A,getLabelProps:T,getRootProps:E}=Bg({...w,isDisabled:m,isChecked:y,onChange:x}),I=cM(P.isChecked),R=f.useMemo(()=>({animation:I?P.isIndeterminate?"".concat(fM," 20ms linear, ").concat(hM," 200ms linear"):"".concat(dM," 200ms linear"):void 0,...s.icon,...Jo({fontSize:d,color:u})}),[u,d,I,P.isIndeterminate,s.icon]),M=f.cloneElement(h,{__css:R,isIndeterminate:P.isIndeterminate,isChecked:P.isChecked});return v.jsxs(O.label,{__css:{...uM,...s.container},className:W("chakra-checkbox",c),...E(),children:[v.jsx("input",{className:"chakra-checkbox__input",...k(b,n)}),v.jsx(O.span,{__css:{...lM,...s.control},className:"chakra-checkbox__control",...A(),children:M}),l&&v.jsx(O.span,{className:"chakra-checkbox__label",...T(),__css:{marginStart:a,...s.label},children:l})]})});pM.displayName="Checkbox";const mM=D(function(t,n){const{borderLeftWidth:r,borderBottomWidth:o,borderTopWidth:s,borderRightWidth:i,borderWidth:a,borderStyle:c,borderColor:l,...u}=Ct("Divider",t),{className:d,orientation:h="horizontal",__css:p,...m}=Ie(t),g={vertical:{borderLeftWidth:r||i||a||"1px",height:"100%"},horizontal:{borderBottomWidth:o||s||a||"1px",width:"100%"}};return v.jsx(O.hr,{ref:n,"aria-orientation":h,...m,__css:{...u,border:"0",borderColor:l,borderStyle:c,...g[h],...p},className:W("chakra-divider",d)})});mM.displayName="Divider";function wo(e){return typeof e=="function"}function gM(...e){return t=>e.reduce((n,r)=>r(n),t)}const bM=e=>function(...n){let r=[...n],o=n[n.length-1];return HP(o)&&r.length>1?r=r.slice(0,r.length-1):o=e,gM(...r.map(s=>i=>wo(s)?s(i):yM(i,s)))(o)},TN=bM($p);function yM(...e){return Et({},...e,Lg)}function Lg(e,t,n,r){if((wo(e)||wo(t))&&Object.prototype.hasOwnProperty.call(r,n))return(...o)=>{const s=wo(e)?e(...o):e,i=wo(t)?t(...o):t;return Et({},s,i,Lg)};if(ct(e)&&ac(t)||ac(e)&&ct(t))return t}const vM=D(function(t,n){const{direction:r,align:o,justify:s,wrap:i,basis:a,grow:c,shrink:l,...u}=t,d={display:"flex",flexDirection:r,alignItems:o,justifyContent:s,flexWrap:i,flexBasis:a,flexGrow:c,flexShrink:l};return v.jsx(O.div,{ref:n,__css:d,...u})});vM.displayName="Flex";function xM(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var zc="data-focus-lock",zg="data-focus-lock-disabled",SM="data-no-focus-lock",wM="data-autofocus-inside",kM="data-no-autofocus";function Xa(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function CM(e,t){var n=f.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var PM=typeof window<"u"?f.useLayoutEffect:f.useEffect,zf=new WeakMap;function Vg(e,t){var n=CM(null,function(r){return e.forEach(function(o){return Xa(o,r)})});return PM(function(){var r=zf.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Xa(a,null)}),s.forEach(function(a){o.has(a)||Xa(a,i)})}zf.set(n,e)},[e]),n}var Ya={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Ut=function(){return Ut=Object.assign||function(t){for(var n,r=1,o=arguments.length;r=0}).sort(UM)},qM=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],eu=qM.join(","),KM="".concat(eu,", [data-focus-guard]"),ob=function(e,t){return Jt((e.shadowRoot||e).children).reduce(function(n,r){return n.concat(r.matches(t?KM:eu)?[r]:[],ob(r))},[])},XM=function(e,t){var n;return e instanceof HTMLIFrameElement&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?Ur([e.contentDocument.body],t):[e]},Ur=function(e,t){return e.reduce(function(n,r){var o,s=ob(r,t),i=(o=[]).concat.apply(o,s.map(function(a){return XM(a,t)}));return n.concat(i,r.parentNode?Jt(r.parentNode.querySelectorAll(eu)).filter(function(a){return a===r}):[])},[])},YM=function(e){var t=e.querySelectorAll("[".concat(wM,"]"));return Jt(t).map(function(n){return Ur([n])}).reduce(function(n,r){return n.concat(r)},[])},tu=function(e,t){return Jt(e).filter(function(n){return Qg(t,n)}).filter(function(n){return VM(n)})},Vf=function(e,t){return t===void 0&&(t=new Map),Jt(e).filter(function(n){return eb(t,n)})},nu=function(e,t,n){return Ql(tu(Ur(e,n),t),!0,n)},qo=function(e,t){return Ql(tu(Ur(e),t),!1)},ZM=function(e,t){return tu(YM(e),t)},Zn=function(e,t){return e.shadowRoot?Zn(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Jt(e.children).some(function(n){var r;if(n instanceof HTMLIFrameElement){var o=(r=n.contentDocument)===null||r===void 0?void 0:r.body;return o?Zn(o,t):!1}return Zn(n,t)})},JM=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(o),(s&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(i,a){return!t.has(a)})},sb=function(e){return e.parentNode?sb(e.parentNode):e},ru=function(e){var t=nr(e);return t.filter(Boolean).reduce(function(n,r){var o=r.getAttribute(zc);return n.push.apply(n,o?JM(Jt(sb(r).querySelectorAll("[".concat(zc,'="').concat(o,'"]:not([').concat(zg,'="disabled"])')))):[r]),n},[])},QM=function(e){try{return e()}catch(t){return}},Ko=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?Ko(t.shadowRoot):t instanceof HTMLIFrameElement&&QM(function(){return t.contentWindow.document})?Ko(t.contentWindow.document):t}},e2=function(e,t){return e===t},t2=function(e,t){return!!Jt(e.querySelectorAll("iframe")).some(function(n){return e2(n,t)})},ib=function(e,t){return t===void 0&&(t=Ko(Yg(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:ru(e).some(function(n){return Zn(n,t)||t2(n,t)})},n2=function(e){e===void 0&&(e=document);var t=Ko(e);return t?Jt(e.querySelectorAll("[".concat(SM,"]"))).some(function(n){return Zn(n,t)}):!1},r2=function(e,t){return t.filter(rb).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},ou=function(e,t){return rb(e)&&e.name?r2(e,t):e},o2=function(e){var t=new Set;return e.forEach(function(n){return t.add(ou(n,e))}),e.filter(function(n){return t.has(n)})},Wf=function(e){return e[0]&&e.length>1?ou(e[0],e):e[0]},Hf=function(e,t){return e.indexOf(ou(t,e))},Hc="NEW_FOCUS",s2=function(e,t,n,r,o){var s=e.length,i=e[0],a=e[s-1],c=Jl(r);if(!(r&&e.indexOf(r)>=0)){var l=r!==void 0?n.indexOf(r):-1,u=o?n.indexOf(o):l,d=o?e.indexOf(o):-1;if(l===-1)return d!==-1?d:Hc;if(d===-1)return Hc;var h=l-u,p=n.indexOf(i),m=n.indexOf(a),g=o2(n),b=r!==void 0?g.indexOf(r):-1,w=o?g.indexOf(o):b,y=g.filter(function(E){return E.tabIndex>=0}),x=r!==void 0?y.indexOf(r):-1,P=o?y.indexOf(o):x,k=x>=0&&P>=0?P-x:w-b;if(!h&&d>=0||t.length===0)return d;var A=Hf(e,t[0]),T=Hf(e,t[t.length-1]);if(l<=p&&c&&Math.abs(h)>1)return T;if(l>=m&&c&&Math.abs(h)>1)return A;if(h&&Math.abs(k)>1)return d;if(l<=p)return T;if(l>m)return A;if(h)return Math.abs(h)>1?d:(s+d+h)%s}},i2=function(e){return function(t){var n,r=(n=tb(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},Uf=function(e,t,n){var r=e.map(function(s){var i=s.node;return i}),o=Vf(r.filter(i2(n)));return o&&o.length?Wf(o):Wf(Vf(t))},Uc=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&Uc(e.parentNode.host||e.parentNode,t),t},Za=function(e,t){for(var n=Uc(e),r=Uc(t),o=0;o=0)return s}return!1},ab=function(e,t,n){var r=nr(e),o=nr(t),s=r[0],i=!1;return o.filter(Boolean).forEach(function(a){i=Za(i||a,a)||i,n.filter(Boolean).forEach(function(c){var l=Za(s,c);l&&(!i||Zn(l,i)?i=l:i=Za(l,i))})}),i},Gf=function(e,t){return e.reduce(function(n,r){return n.concat(ZM(r,t))},[])},a2=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(HM)},c2=function(e,t){var n=Ko(nr(e).length>0?document:Yg(e).ownerDocument),r=ru(e).filter(Wc),o=ab(n||e,e,r),s=new Map,i=qo(r,s),a=i.filter(function(m){var g=m.node;return Wc(g)});if(a[0]){var c=qo([o],s).map(function(m){var g=m.node;return g}),l=a2(c,a),u=l.map(function(m){var g=m.node;return g}),d=l.filter(function(m){var g=m.tabIndex;return g>=0}).map(function(m){var g=m.node;return g}),h=s2(u,d,c,n,t);if(h===Hc){var p=Uf(i,d,Gf(r,s))||Uf(i,u,Gf(r,s));if(p)return{node:p};console.warn("focus-lock: cannot find any node to move focus into");return}return h===void 0?h:l[h]}},l2=function(e){var t=ru(e).filter(Wc),n=ab(e,e,t),r=Ql(Ur([n],!0),!0,!0),o=Ur(t,!1);return r.map(function(s){var i=s.node,a=s.index;return{node:i,index:a,lockItem:o.indexOf(i)>=0,guard:Jl(i)}})},su=function(e,t){e&&("focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus())},Ja=0,Qa=!1,cb=function(e,t,n){n===void 0&&(n={});var r=c2(e,t);if(!Qa&&r){if(Ja>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Qa=!0,setTimeout(function(){Qa=!1},1);return}Ja++,su(r.node,n.focusOptions),Ja--}};function fo(e){if(!e)return null;if(typeof WeakRef>"u")return function(){return e||null};var t=e?new WeakRef(e):null;return function(){return(t==null?void 0:t.deref())||null}}var u2=function(e){if(!e)return null;for(var t=[],n=e;n&&n!==document.body;)t.push({current:fo(n),parent:fo(n.parentElement),left:fo(n.previousElementSibling),right:fo(n.nextElementSibling)}),n=n.parentElement;return{element:fo(e),stack:t,ownerDocument:e.ownerDocument}},d2=function(e){var t,n,r,o,s;if(e)for(var i=e.stack,a=e.ownerDocument,c=new Map,l=0,u=i;l-1&&(b.filter(function(y){var x=y.guard,P=y.node;return x&&P.dataset.focusAutoGuard}).forEach(function(y){var x=y.node;return x.removeAttribute("tabIndex")}),Kf(w,b.length,1,b),Kf(w,-1,-1,b))}}}return t},pb=function(t){vi()&&t&&(t.stopPropagation(),t.preventDefault())},cu=function(){return iu(vi)},E2=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||k2(r,n)},I2=function(){return null},mb=function(){au=!0},gb=function(){au=!1,Xo="just",iu(function(){Xo="meanwhile"})},$2=function(){document.addEventListener("focusin",pb),document.addEventListener("focusout",cu),window.addEventListener("focus",mb),window.addEventListener("blur",gb)},R2=function(){document.removeEventListener("focusin",pb),document.removeEventListener("focusout",cu),window.removeEventListener("focus",mb),window.removeEventListener("blur",gb)};function M2(e){return e.filter(function(t){var n=t.disabled;return!n})}var bb={moveFocusInside:cb,focusInside:ib,focusNextElement:m2,focusPrevElement:g2,focusFirstElement:b2,focusLastElement:y2,captureFocusRestore:lb};function O2(e){var t=e.slice(-1)[0];t&&!Dr&&$2();var n=Dr,r=n&&t&&t.id===n.id;Dr=t,n&&!r&&(n.onDeactivation(),e.filter(function(o){var s=o.id;return s===n.id}).length||n.returnFocus(!t)),t?(dt=null,(!r||n.observed!==t.observed)&&t.onActivation(bb),vi(),iu(vi)):(R2(),dt=null)}Kg.assignSyncMedium(E2);Xg.assignMedium(cu);AM.assignMedium(function(e){return e(bb)});const F2=DM(M2,O2)(I2);var Gc=f.forwardRef(function(t,n){return et.createElement(Zl,er({sideCar:F2,ref:n},t))}),yb=Zl.propTypes||{};yb.sideCar;xM(yb,["sideCar"]);Gc.propTypes={};var zh;const D2=(zh=Gc.default)!=null?zh:Gc,vb=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:o,children:s,isDisabled:i,autoFocus:a,persistentFocus:c,lockFocusAcrossFrames:l}=e,u=f.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&Yh(r.current).length===0&&requestAnimationFrame(()=>{var m;(m=r.current)==null||m.focus()})},[t,r]),d=f.useCallback(()=>{var p;(p=n==null?void 0:n.current)==null||p.focus()},[n]),h=o&&!n;return v.jsx(D2,{crossFrame:l,persistentFocus:c,autoFocus:a,disabled:i,onActivation:u,onDeactivation:d,returnFocus:h,children:s})};vb.displayName="FocusLock";const[N2,j2]=Ee({name:"FormErrorStylesContext",errorMessage:"useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),B2=D((e,t)=>{const n=tt("FormError",e),r=Ie(e),o=Qr();return o!=null&&o.isInvalid?v.jsx(N2,{value:n,children:v.jsx(O.div,{...o==null?void 0:o.getErrorMessageProps(r,t),className:W("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})}):null});B2.displayName="FormErrorMessage";const L2=D((e,t)=>{const n=j2(),r=Qr();if(!(r!=null&&r.isInvalid))return null;const o=W("chakra-form__error-icon",e.className);return v.jsx(Pt,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:o,children:v.jsx("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});L2.displayName="FormErrorIcon";const z2=D(function(t,n){var h;const r=Ct("FormLabel",t),o=Ie(t),{className:s,children:i,requiredIndicator:a=v.jsx(xb,{}),optionalIndicator:c=null,...l}=o,u=Qr(),d=(h=u==null?void 0:u.getLabelProps(l,n))!=null?h:{ref:n,...l};return v.jsxs(O.label,{...d,className:W("chakra-form__label",o.className),__css:{display:"block",textAlign:"start",...r},children:[i,u!=null&&u.isRequired?a:c]})});z2.displayName="FormLabel";const xb=D(function(t,n){const r=Qr(),o=jg();if(!(r!=null&&r.isRequired))return null;const s=W("chakra-form__required-indicator",t.className);return v.jsx(O.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:o.requiredIndicator,className:s})});xb.displayName="RequiredIndicator";const qc=D(function(t,n){const{htmlWidth:r,htmlHeight:o,alt:s,...i}=t;return v.jsx("img",{width:r,height:o,ref:n,alt:s,...i})});qc.displayName="NativeImage";const V2=D(function(t,n){const{fallbackSrc:r,fallback:o,src:s,srcSet:i,align:a,fit:c,loading:l,ignoreFallback:u,crossOrigin:d,fallbackStrategy:h="beforeLoadOrError",referrerPolicy:p,...m}=t,g=r!==void 0||o!==void 0,b=l!=null||u||!g,w=Fg({...t,crossOrigin:d,ignoreFallback:b}),y=AR(w,h),x={ref:n,objectFit:c,objectPosition:a,...b?m:Yr(m,["onError","onLoad"])};return y?o||v.jsx(O.img,{as:qc,className:"chakra-image__placeholder",src:r,...x}):v.jsx(O.img,{as:qc,src:s,srcSet:i,crossOrigin:d,loading:l,referrerPolicy:p,className:"chakra-image",...x})});V2.displayName="Image";const Sb=D(function(t,n){const{htmlSize:r,...o}=t,s=tt("Input",o),i=Ie(o),a=Kl(i),c=W("chakra-input",t.className);return v.jsx(O.input,{size:r,...a,__css:s.field,ref:n,className:c})});Sb.displayName="Input";Sb.id="Input";const[W2,H2]=Ee({name:"InputGroupStylesContext",errorMessage:"useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),U2=D(function(t,n){const r=tt("Input",t),{children:o,className:s,...i}=Ie(t),a=W("chakra-input__group",s),c={},l=nl(o),u=r.field;l.forEach(h=>{var p,m;r&&(u&&h.type.id==="InputLeftElement"&&(c.paddingStart=(p=u.height)!=null?p:u.h),u&&h.type.id==="InputRightElement"&&(c.paddingEnd=(m=u.height)!=null?m:u.h),h.type.id==="InputRightAddon"&&(c.borderEndRadius=0),h.type.id==="InputLeftAddon"&&(c.borderStartRadius=0))});const d=l.map(h=>{var m,g;const p=Jo({size:((m=h.props)==null?void 0:m.size)||t.size,variant:((g=h.props)==null?void 0:g.variant)||t.variant});return h.type.id!=="Input"?f.cloneElement(h,p):f.cloneElement(h,Object.assign(p,c,h.props))});return v.jsx(O.div,{className:a,ref:n,__css:{width:"100%",display:"flex",position:"relative",isolation:"isolate",...r.group},"data-group":!0,...i,children:v.jsx(W2,{value:r,children:d})})});U2.displayName="InputGroup";const G2=O("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),Ui=D(function(t,n){var l,u;const{placement:r="left",...o}=t,s=H2(),i=s.field,c={[r==="left"?"insetStart":"insetEnd"]:"0",width:(l=i==null?void 0:i.height)!=null?l:i==null?void 0:i.h,height:(u=i==null?void 0:i.height)!=null?u:i==null?void 0:i.h,fontSize:i==null?void 0:i.fontSize,...s.element};return v.jsx(G2,{ref:n,__css:c,...o})});Ui.id="InputElement";Ui.displayName="InputElement";const wb=D(function(t,n){const{className:r,...o}=t,s=W("chakra-input__left-element",r);return v.jsx(Ui,{ref:n,placement:"left",className:s,...o})});wb.id="InputLeftElement";wb.displayName="InputLeftElement";const kb=D(function(t,n){const{className:r,...o}=t,s=W("chakra-input__right-element",r);return v.jsx(Ui,{ref:n,placement:"right",className:s,...o})});kb.id="InputRightElement";kb.displayName="InputRightElement";const q2=D(function(t,n){const r=Ct("Kbd",t),{className:o,...s}=Ie(t);return v.jsx(O.kbd,{ref:n,className:W("chakra-kbd",o),...s,__css:{fontFamily:"mono",...r}})});q2.displayName="Kbd";const K2=D(function(t,n){const r=Ct("Link",t),{className:o,isExternal:s,...i}=Ie(t);return v.jsx(O.a,{target:s?"_blank":void 0,rel:s?"noopener":void 0,ref:n,className:W("chakra-link",o),...i,__css:r})});K2.displayName="Link";const[X2,Cb]=Ee({name:"ListStylesContext",errorMessage:"useListStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),lu=D(function(t,n){const r=tt("List",t),{children:o,styleType:s="none",stylePosition:i,spacing:a,...c}=Ie(t),l=nl(o),d=a?{["& > *:not(style) ~ *:not(style)"]:{mt:a}}:{};return v.jsx(X2,{value:r,children:v.jsx(O.ul,{ref:n,listStyleType:s,listStylePosition:i,role:"list",__css:{...r.container,...d},...c,children:l})})});lu.displayName="List";const Y2=D((e,t)=>{const{as:n,...r}=e;return v.jsx(lu,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Y2.displayName="OrderedList";const Z2=D(function(t,n){const{as:r,...o}=t;return v.jsx(lu,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...o})});Z2.displayName="UnorderedList";const J2=D(function(t,n){const r=Cb();return v.jsx(O.li,{ref:n,...t,__css:r.item})});J2.displayName="ListItem";const Q2=D(function(t,n){const r=Cb();return v.jsx(Pt,{ref:n,role:"presentation",...t,__css:r.icon})});Q2.displayName="ListIcon";function eO(e,t,n,r){if(t==null)return r;if(!r)return e.find(i=>n(i).toLowerCase().startsWith(t.toLowerCase()));const o=e.filter(s=>n(s).toLowerCase().startsWith(t.toLowerCase()));if(o.length>0){let s;return o.includes(r)?(s=o.indexOf(r)+1,s===o.length&&(s=0),o[s]):(s=e.indexOf(o[0]),e[s])}return r}function tO(e){const{key:t}=e;return t.length===1||t.length>1&&/[^a-zA-Z0-9]/.test(t)}function nO(e={}){const{timeout:t=300,preventDefault:n=()=>!0}=e,[r,o]=f.useState([]),s=f.useRef(),i=()=>{s.current&&(clearTimeout(s.current),s.current=null)},a=()=>{i(),s.current=setTimeout(()=>{o([]),s.current=null},t)};f.useEffect(()=>i,[]);function c(l){return u=>{if(u.key==="Backspace"){const d=[...r];d.pop(),o(d);return}if(tO(u)){const d=r.concat(u.key);n(u)&&(u.preventDefault(),u.stopPropagation()),o(d),l(d.join("")),a()}}}return c}var pt="top",$t="bottom",Rt="right",mt="left",uu="auto",us=[pt,$t,Rt,mt],Gr="start",Yo="end",rO="clippingParents",Pb="viewport",ho="popper",oO="reference",Xf=us.reduce(function(e,t){return e.concat([t+"-"+Gr,t+"-"+Yo])},[]),Tb=[].concat(us,[uu]).reduce(function(e,t){return e.concat([t,t+"-"+Gr,t+"-"+Yo])},[]),sO="beforeRead",iO="read",aO="afterRead",cO="beforeMain",lO="main",uO="afterMain",dO="beforeWrite",fO="write",hO="afterWrite",pO=[sO,iO,aO,cO,lO,uO,dO,fO,hO];function Yt(e){return e?(e.nodeName||"").toLowerCase():null}function kt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function rr(e){var t=kt(e).Element;return e instanceof t||e instanceof Element}function It(e){var t=kt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function du(e){if(typeof ShadowRoot>"u")return!1;var t=kt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function mO(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},s=t.elements[n];!It(s)||!Yt(s)||(Object.assign(s.style,r),Object.keys(o).forEach(function(i){var a=o[i];a===!1?s.removeAttribute(i):s.setAttribute(i,a===!0?"":a)}))})}function gO(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],s=t.attributes[r]||{},i=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=i.reduce(function(c,l){return c[l]="",c},{});!It(o)||!Yt(o)||(Object.assign(o.style,a),Object.keys(s).forEach(function(c){o.removeAttribute(c)}))})}}const bO={name:"applyStyles",enabled:!0,phase:"write",fn:mO,effect:gO,requires:["computeStyles"]};function Xt(e){return e.split("-")[0]}var Jn=Math.max,xi=Math.min,qr=Math.round;function Kc(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function _b(){return!/^((?!chrome|android).)*safari/i.test(Kc())}function Kr(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,s=1;t&&It(e)&&(o=e.offsetWidth>0&&qr(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&qr(r.height)/e.offsetHeight||1);var i=rr(e)?kt(e):window,a=i.visualViewport,c=!_b()&&n,l=(r.left+(c&&a?a.offsetLeft:0))/o,u=(r.top+(c&&a?a.offsetTop:0))/s,d=r.width/o,h=r.height/s;return{width:d,height:h,top:u,right:l+d,bottom:u+h,left:l,x:l,y:u}}function fu(e){var t=Kr(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Ab(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&du(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function bn(e){return kt(e).getComputedStyle(e)}function yO(e){return["table","td","th"].indexOf(Yt(e))>=0}function Mn(e){return((rr(e)?e.ownerDocument:e.document)||window.document).documentElement}function Gi(e){return Yt(e)==="html"?e:e.assignedSlot||e.parentNode||(du(e)?e.host:null)||Mn(e)}function Yf(e){return!It(e)||bn(e).position==="fixed"?null:e.offsetParent}function vO(e){var t=/firefox/i.test(Kc()),n=/Trident/i.test(Kc());if(n&&It(e)){var r=bn(e);if(r.position==="fixed")return null}var o=Gi(e);for(du(o)&&(o=o.host);It(o)&&["html","body"].indexOf(Yt(o))<0;){var s=bn(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function ds(e){for(var t=kt(e),n=Yf(e);n&&yO(n)&&bn(n).position==="static";)n=Yf(n);return n&&(Yt(n)==="html"||Yt(n)==="body"&&bn(n).position==="static")?t:n||vO(e)||t}function hu(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Oo(e,t,n){return Jn(e,xi(t,n))}function xO(e,t,n){var r=Oo(e,t,n);return r>n?n:r}function Eb(){return{top:0,right:0,bottom:0,left:0}}function Ib(e){return Object.assign({},Eb(),e)}function $b(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var SO=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Ib(typeof t!="number"?t:$b(t,us))};function wO(e){var t,n=e.state,r=e.name,o=e.options,s=n.elements.arrow,i=n.modifiersData.popperOffsets,a=Xt(n.placement),c=hu(a),l=[mt,Rt].indexOf(a)>=0,u=l?"height":"width";if(!(!s||!i)){var d=SO(o.padding,n),h=fu(s),p=c==="y"?pt:mt,m=c==="y"?$t:Rt,g=n.rects.reference[u]+n.rects.reference[c]-i[c]-n.rects.popper[u],b=i[c]-n.rects.reference[c],w=ds(s),y=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,x=g/2-b/2,P=d[p],k=y-h[u]-d[m],A=y/2-h[u]/2+x,T=Oo(P,A,k),E=c;n.modifiersData[r]=(t={},t[E]=T,t.centerOffset=T-A,t)}}function kO(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Ab(t.elements.popper,o)&&(t.elements.arrow=o))}const CO={name:"arrow",enabled:!0,phase:"main",fn:wO,effect:kO,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Xr(e){return e.split("-")[1]}var PO={top:"auto",right:"auto",bottom:"auto",left:"auto"};function TO(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:qr(n*o)/o||0,y:qr(r*o)/o||0}}function Zf(e){var t,n=e.popper,r=e.popperRect,o=e.placement,s=e.variation,i=e.offsets,a=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,h=i.x,p=h===void 0?0:h,m=i.y,g=m===void 0?0:m,b=typeof u=="function"?u({x:p,y:g}):{x:p,y:g};p=b.x,g=b.y;var w=i.hasOwnProperty("x"),y=i.hasOwnProperty("y"),x=mt,P=pt,k=window;if(l){var A=ds(n),T="clientHeight",E="clientWidth";if(A===kt(n)&&(A=Mn(n),bn(A).position!=="static"&&a==="absolute"&&(T="scrollHeight",E="scrollWidth")),A=A,o===pt||(o===mt||o===Rt)&&s===Yo){P=$t;var I=d&&A===k&&k.visualViewport?k.visualViewport.height:A[T];g-=I-r.height,g*=c?1:-1}if(o===mt||(o===pt||o===$t)&&s===Yo){x=Rt;var R=d&&A===k&&k.visualViewport?k.visualViewport.width:A[E];p-=R-r.width,p*=c?1:-1}}var M=Object.assign({position:a},l&&PO),H=u===!0?TO({x:p,y:g},kt(n)):{x:p,y:g};if(p=H.x,g=H.y,c){var K;return Object.assign({},M,(K={},K[P]=y?"0":"",K[x]=w?"0":"",K.transform=(k.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",K))}return Object.assign({},M,(t={},t[P]=y?g+"px":"",t[x]=w?p+"px":"",t.transform="",t))}function _O(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,s=n.adaptive,i=s===void 0?!0:s,a=n.roundOffsets,c=a===void 0?!0:a,l={placement:Xt(t.placement),variation:Xr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Zf(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Zf(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const AO={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_O,data:{}};var Os={passive:!0};function EO(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,s=o===void 0?!0:o,i=r.resize,a=i===void 0?!0:i,c=kt(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&l.forEach(function(u){u.addEventListener("scroll",n.update,Os)}),a&&c.addEventListener("resize",n.update,Os),function(){s&&l.forEach(function(u){u.removeEventListener("scroll",n.update,Os)}),a&&c.removeEventListener("resize",n.update,Os)}}const IO={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:EO,data:{}};var $O={left:"right",right:"left",bottom:"top",top:"bottom"};function ni(e){return e.replace(/left|right|bottom|top/g,function(t){return $O[t]})}var RO={start:"end",end:"start"};function Jf(e){return e.replace(/start|end/g,function(t){return RO[t]})}function pu(e){var t=kt(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function mu(e){return Kr(Mn(e)).left+pu(e).scrollLeft}function MO(e,t){var n=kt(e),r=Mn(e),o=n.visualViewport,s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;var l=_b();(l||!l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:a+mu(e),y:c}}function OO(e){var t,n=Mn(e),r=pu(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=Jn(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=Jn(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+mu(e),c=-r.scrollTop;return bn(o||n).direction==="rtl"&&(a+=Jn(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:a,y:c}}function gu(e){var t=bn(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Rb(e){return["html","body","#document"].indexOf(Yt(e))>=0?e.ownerDocument.body:It(e)&&gu(e)?e:Rb(Gi(e))}function Fo(e,t){var n;t===void 0&&(t=[]);var r=Rb(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=kt(r),i=o?[s].concat(s.visualViewport||[],gu(r)?r:[]):r,a=t.concat(i);return o?a:a.concat(Fo(Gi(i)))}function Xc(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function FO(e,t){var n=Kr(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Qf(e,t,n){return t===Pb?Xc(MO(e,n)):rr(t)?FO(t,n):Xc(OO(Mn(e)))}function DO(e){var t=Fo(Gi(e)),n=["absolute","fixed"].indexOf(bn(e).position)>=0,r=n&&It(e)?ds(e):e;return rr(r)?t.filter(function(o){return rr(o)&&Ab(o,r)&&Yt(o)!=="body"}):[]}function NO(e,t,n,r){var o=t==="clippingParents"?DO(e):[].concat(t),s=[].concat(o,[n]),i=s[0],a=s.reduce(function(c,l){var u=Qf(e,l,r);return c.top=Jn(u.top,c.top),c.right=xi(u.right,c.right),c.bottom=xi(u.bottom,c.bottom),c.left=Jn(u.left,c.left),c},Qf(e,i,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Mb(e){var t=e.reference,n=e.element,r=e.placement,o=r?Xt(r):null,s=r?Xr(r):null,i=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,c;switch(o){case pt:c={x:i,y:t.y-n.height};break;case $t:c={x:i,y:t.y+t.height};break;case Rt:c={x:t.x+t.width,y:a};break;case mt:c={x:t.x-n.width,y:a};break;default:c={x:t.x,y:t.y}}var l=o?hu(o):null;if(l!=null){var u=l==="y"?"height":"width";switch(s){case Gr:c[l]=c[l]-(t[u]/2-n[u]/2);break;case Yo:c[l]=c[l]+(t[u]/2-n[u]/2);break}}return c}function Zo(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,s=n.strategy,i=s===void 0?e.strategy:s,a=n.boundary,c=a===void 0?rO:a,l=n.rootBoundary,u=l===void 0?Pb:l,d=n.elementContext,h=d===void 0?ho:d,p=n.altBoundary,m=p===void 0?!1:p,g=n.padding,b=g===void 0?0:g,w=Ib(typeof b!="number"?b:$b(b,us)),y=h===ho?oO:ho,x=e.rects.popper,P=e.elements[m?y:h],k=NO(rr(P)?P:P.contextElement||Mn(e.elements.popper),c,u,i),A=Kr(e.elements.reference),T=Mb({reference:A,element:x,placement:o}),E=Xc(Object.assign({},x,T)),I=h===ho?E:A,R={top:k.top-I.top+w.top,bottom:I.bottom-k.bottom+w.bottom,left:k.left-I.left+w.left,right:I.right-k.right+w.right},M=e.modifiersData.offset;if(h===ho&&M){var H=M[o];Object.keys(R).forEach(function(K){var V=[Rt,$t].indexOf(K)>=0?1:-1,Y=[pt,$t].indexOf(K)>=0?"y":"x";R[K]+=H[Y]*V})}return R}function jO(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,s=n.rootBoundary,i=n.padding,a=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?Tb:c,u=Xr(r),d=u?a?Xf:Xf.filter(function(m){return Xr(m)===u}):us,h=d.filter(function(m){return l.indexOf(m)>=0});h.length===0&&(h=d);var p=h.reduce(function(m,g){return m[g]=Zo(e,{placement:g,boundary:o,rootBoundary:s,padding:i})[Xt(g)],m},{});return Object.keys(p).sort(function(m,g){return p[m]-p[g]})}function BO(e){if(Xt(e)===uu)return[];var t=ni(e);return[Jf(e),t,Jf(t)]}function LO(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,a=i===void 0?!0:i,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,g=n.allowedAutoPlacements,b=t.options.placement,w=Xt(b),y=w===b,x=c||(y||!m?[ni(b)]:BO(b)),P=[b].concat(x).reduce(function(z,J){return z.concat(Xt(J)===uu?jO(t,{placement:J,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:g}):J)},[]),k=t.rects.reference,A=t.rects.popper,T=new Map,E=!0,I=P[0],R=0;R=0,Y=V?"width":"height",Z=Zo(t,{placement:M,boundary:u,rootBoundary:d,altBoundary:h,padding:l}),F=V?K?Rt:mt:K?$t:pt;k[Y]>A[Y]&&(F=ni(F));var j=ni(F),U=[];if(s&&U.push(Z[H]<=0),a&&U.push(Z[F]<=0,Z[j]<=0),U.every(function(z){return z})){I=M,E=!1;break}T.set(M,U)}if(E)for(var Se=m?3:1,re=function(J){var se=P.find(function(ve){var pe=T.get(ve);if(pe)return pe.slice(0,J).every(function(Me){return Me})});if(se)return I=se,"break"},he=Se;he>0;he--){var L=re(he);if(L==="break")break}t.placement!==I&&(t.modifiersData[r]._skip=!0,t.placement=I,t.reset=!0)}}const zO={name:"flip",enabled:!0,phase:"main",fn:LO,requiresIfExists:["offset"],data:{_skip:!1}};function eh(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function th(e){return[pt,Rt,$t,mt].some(function(t){return e[t]>=0})}function VO(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,i=Zo(t,{elementContext:"reference"}),a=Zo(t,{altBoundary:!0}),c=eh(i,r),l=eh(a,o,s),u=th(c),d=th(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const WO={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:VO};function HO(e,t,n){var r=Xt(e),o=[mt,pt].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=s[0],a=s[1];return i=i||0,a=(a||0)*o,[mt,Rt].indexOf(r)>=0?{x:a,y:i}:{x:i,y:a}}function UO(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,i=Tb.reduce(function(u,d){return u[d]=HO(d,t.rects,s),u},{}),a=i[t.placement],c=a.x,l=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=i}const GO={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:UO};function qO(e){var t=e.state,n=e.name;t.modifiersData[n]=Mb({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const KO={name:"popperOffsets",enabled:!0,phase:"read",fn:qO,data:{}};function XO(e){return e==="x"?"y":"x"}function YO(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,a=i===void 0?!1:i,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,p=h===void 0?!0:h,m=n.tetherOffset,g=m===void 0?0:m,b=Zo(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),w=Xt(t.placement),y=Xr(t.placement),x=!y,P=hu(w),k=XO(P),A=t.modifiersData.popperOffsets,T=t.rects.reference,E=t.rects.popper,I=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,R=typeof I=="number"?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),M=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,H={x:0,y:0};if(A){if(s){var K,V=P==="y"?pt:mt,Y=P==="y"?$t:Rt,Z=P==="y"?"height":"width",F=A[P],j=F+b[V],U=F-b[Y],Se=p?-E[Z]/2:0,re=y===Gr?T[Z]:E[Z],he=y===Gr?-E[Z]:-T[Z],L=t.elements.arrow,z=p&&L?fu(L):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Eb(),se=J[V],ve=J[Y],pe=Oo(0,T[Z],z[Z]),Me=x?T[Z]/2-Se-pe-se-R.mainAxis:re-pe-se-R.mainAxis,Oe=x?-T[Z]/2+Se+pe+ve+R.mainAxis:he+pe+ve+R.mainAxis,ce=t.elements.arrow&&ds(t.elements.arrow),ie=ce?P==="y"?ce.clientTop||0:ce.clientLeft||0:0,le=(K=M==null?void 0:M[P])!=null?K:0,me=F+Me-le-ie,ee=F+Oe-le,ge=Oo(p?xi(j,me):j,F,p?Jn(U,ee):U);A[P]=ge,H[P]=ge-F}if(a){var G,ue=P==="x"?pt:mt,de=P==="x"?$t:Rt,fe=A[k],We=k==="y"?"height":"width",Ye=fe+b[ue],Qe=fe-b[de],yt=[pt,mt].indexOf(w)!==-1,Qt=(G=M==null?void 0:M[k])!=null?G:0,yn=yt?Ye:fe-T[We]-E[We]-Qt+R.altAxis,vn=yt?fe+T[We]+E[We]-Qt-R.altAxis:Qe,N=p&&yt?xO(yn,fe,vn):Oo(p?yn:Ye,fe,p?vn:Qe);A[k]=N,H[k]=N-fe}t.modifiersData[r]=H}}const ZO={name:"preventOverflow",enabled:!0,phase:"main",fn:YO,requiresIfExists:["offset"]};function JO(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function QO(e){return e===kt(e)||!It(e)?pu(e):JO(e)}function e5(e){var t=e.getBoundingClientRect(),n=qr(t.width)/e.offsetWidth||1,r=qr(t.height)/e.offsetHeight||1;return n!==1||r!==1}function t5(e,t,n){n===void 0&&(n=!1);var r=It(t),o=It(t)&&e5(t),s=Mn(t),i=Kr(e,o,n),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Yt(t)!=="body"||gu(s))&&(a=QO(t)),It(t)?(c=Kr(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=mu(s))),{x:i.left+a.scrollLeft-c.x,y:i.top+a.scrollTop-c.y,width:i.width,height:i.height}}function n5(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function o(s){n.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(a){if(!n.has(a)){var c=t.get(a);c&&o(c)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||o(s)}),r}function r5(e){var t=n5(e);return pO.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function o5(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function s5(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var nh={placement:"bottom",modifiers:[],strategy:"absolute"};function rh(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?"var(".concat(e,", ").concat(t,")"):"var(".concat(e,")")}),Xe={arrowShadowColor:hr("--popper-arrow-shadow-color"),arrowSize:hr("--popper-arrow-size","8px"),arrowSizeHalf:hr("--popper-arrow-size-half"),arrowBg:hr("--popper-arrow-bg"),transformOrigin:hr("--popper-transform-origin"),arrowOffset:hr("--popper-arrow-offset")};function l5(e){if(e.includes("top"))return"1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 0px 0 var(--popper-arrow-shadow-color)"}const u5={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},d5=e=>u5[e],oh={scroll:!0,resize:!0};function f5(e){let t;return typeof e=="object"?t={enabled:!0,options:{...oh,...e}}:t={enabled:e,options:oh},t}const h5={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width="".concat(e.rects.reference.width,"px")},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width="".concat(t.offsetWidth,"px")}},p5={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{sh(e)},effect:({state:e})=>()=>{sh(e)}},sh=e=>{e.elements.popper.style.setProperty(Xe.transformOrigin.var,d5(e.placement))},m5={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{g5(e)}},g5=e=>{var n;if(!e.placement)return;const t=b5(e.placement);if((n=e.elements)!=null&&n.arrow&&t){Object.assign(e.elements.arrow.style,{[t.property]:t.value,width:Xe.arrowSize.varRef,height:Xe.arrowSize.varRef,zIndex:-1});const r={[Xe.arrowSizeHalf.var]:"calc(".concat(Xe.arrowSize.varRef," / 2 - 1px)"),[Xe.arrowOffset.var]:"calc(".concat(Xe.arrowSizeHalf.varRef," * -1)")};for(const o in r)e.elements.arrow.style.setProperty(o,r[o])}},b5=e=>{if(e.startsWith("top"))return{property:"bottom",value:Xe.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Xe.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Xe.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Xe.arrowOffset.varRef}},y5={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{ih(e)},effect:({state:e})=>()=>{ih(e)}},ih=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const n=l5(e.placement);n&&t.style.setProperty("--popper-arrow-default-shadow",n),Object.assign(t.style,{transform:"rotate(45deg)",background:Xe.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},v5={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},x5={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function S5(e,t="ltr"){var r,o;const n=((r=v5[e])==null?void 0:r[t])||e;return t==="ltr"?n:(o=x5[e])!=null?o:n}function bu(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:o="absolute",arrowPadding:s=8,eventListeners:i=!0,offset:a,gutter:c=8,flip:l=!0,boundary:u="clippingParents",preventOverflow:d=!0,matchWidth:h,direction:p="ltr"}=e,m=f.useRef(null),g=f.useRef(null),b=f.useRef(null),w=S5(r,p),y=f.useRef(()=>{}),x=f.useCallback(()=>{var R;!t||!m.current||!g.current||((R=y.current)==null||R.call(y),b.current=c5(m.current,g.current,{placement:w,modifiers:[y5,m5,p5,{...h5,enabled:!!h},{name:"eventListeners",...f5(i)},{name:"arrow",options:{padding:s}},{name:"offset",options:{offset:a!=null?a:[0,c]}},{name:"flip",enabled:!!l,options:{padding:8}},{name:"preventOverflow",enabled:!!d,options:{boundary:u}},...n!=null?n:[]],strategy:o}),b.current.forceUpdate(),y.current=b.current.destroy)},[w,t,n,h,i,s,a,c,l,d,u,o]);f.useEffect(()=>()=>{var R;!m.current&&!g.current&&((R=b.current)==null||R.destroy(),b.current=null)},[]);const P=f.useCallback(R=>{m.current=R,x()},[x]),k=f.useCallback((R={},M=null)=>({...R,ref:Re(P,M)}),[P]),A=f.useCallback(R=>{g.current=R,x()},[x]),T=f.useCallback((R={},M=null)=>({...R,ref:Re(A,M),style:{...R.style,position:o,minWidth:h?void 0:"max-content",inset:"0 auto auto 0"}}),[o,A,h]),E=f.useCallback((R={},M=null)=>{const{size:H,shadowColor:K,bg:V,style:Y,...Z}=R;return{...Z,ref:M,"data-popper-arrow":"",style:w5(R)}},[]),I=f.useCallback((R={},M=null)=>({...R,ref:M,"data-popper-arrow-inner":""}),[]);return{update(){var R;(R=b.current)==null||R.update()},forceUpdate(){var R;(R=b.current)==null||R.forceUpdate()},transformOrigin:Xe.transformOrigin.varRef,referenceRef:P,popperRef:A,getPopperProps:T,getArrowProps:E,getArrowInnerProps:I,getReferenceProps:k}}function w5(e){const{size:t,shadowColor:n,bg:r,style:o}=e,s={...o,position:"absolute"};return t&&(s["--popper-arrow-size"]=t),n&&(s["--popper-arrow-shadow-color"]=n),r&&(s["--popper-arrow-bg"]=r),s}function k5(){const e=f.useRef(new Map),t=e.current,n=f.useCallback((o,s,i,a)=>{e.current.set(i,{type:s,el:o,options:a}),o.addEventListener(s,i,a)},[]),r=f.useCallback((o,s,i,a)=>{o.removeEventListener(s,i,a),e.current.delete(i)},[]);return f.useEffect(()=>()=>{t.forEach((o,s)=>{r(o.el,o.type,s,o.options)})},[r,t]),{add:n,remove:r}}function ec(e){var o,s,i;const t=(i=(s=(o=e.composedPath)==null?void 0:o.call(e))==null?void 0:s[0])!=null?i:e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function C5(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:o=!0,clickOnSpace:s=!0,onMouseDown:i,onMouseUp:a,onClick:c,onKeyDown:l,onKeyUp:u,tabIndex:d,onMouseOver:h,onMouseLeave:p,...m}=e,[g,b]=f.useState(!0),[w,y]=f.useState(!1),x=k5(),P=F=>{F&&F.tagName!=="BUTTON"&&b(!1)},k=g?d:d||0,A=n&&!r,T=f.useCallback(F=>{if(n){F.stopPropagation(),F.preventDefault();return}F.currentTarget.focus(),c==null||c(F)},[n,c]),E=f.useCallback(F=>{w&&ec(F)&&(F.preventDefault(),F.stopPropagation(),y(!1),x.remove(document,"keyup",E,!1))},[w,x]),I=f.useCallback(F=>{if(l==null||l(F),n||F.defaultPrevented||F.metaKey||!ec(F.nativeEvent)||g)return;const j=o&&F.key==="Enter";s&&F.key===" "&&(F.preventDefault(),y(!0)),j&&(F.preventDefault(),F.currentTarget.click()),x.add(document,"keyup",E,!1)},[n,g,l,o,s,x,E]),R=f.useCallback(F=>{if(u==null||u(F),n||F.defaultPrevented||F.metaKey||!ec(F.nativeEvent)||g)return;s&&F.key===" "&&(F.preventDefault(),y(!1),F.currentTarget.click())},[s,g,n,u]),M=f.useCallback(F=>{F.button===0&&(y(!1),x.remove(document,"mouseup",M,!1))},[x]),H=f.useCallback(F=>{if(F.button!==0)return;if(n){F.stopPropagation(),F.preventDefault();return}g||y(!0),F.currentTarget.focus({preventScroll:!0}),x.add(document,"mouseup",M,!1),i==null||i(F)},[n,g,i,x,M]),K=f.useCallback(F=>{F.button===0&&(g||y(!1),a==null||a(F))},[a,g]),V=f.useCallback(F=>{if(n){F.preventDefault();return}h==null||h(F)},[n,h]),Y=f.useCallback(F=>{w&&(F.preventDefault(),y(!1)),p==null||p(F)},[w,p]),Z=Re(t,P);return g?{...m,ref:Z,type:"button","aria-disabled":A?void 0:n,disabled:A,onClick:T,onMouseDown:i,onMouseUp:a,onKeyUp:u,onKeyDown:l,onMouseOver:h,onMouseLeave:p}:{...m,ref:Z,role:"button","data-active":ae(w),"aria-disabled":n?"true":void 0,tabIndex:A?void 0:k,onClick:T,onMouseDown:H,onMouseUp:K,onKeyUp:R,onKeyDown:I,onMouseOver:V,onMouseLeave:Y}}const[P5,T5,_5,A5]=$g(),[E5,fs]=Ee({strict:!1,name:"MenuContext"});function Ob(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function I5(e){return Ob(e).activeElement===e}function $5(e={}){const{id:t,closeOnSelect:n=!0,closeOnBlur:r=!0,initialFocusRef:o,autoSelect:s=!0,isLazy:i,isOpen:a,defaultIsOpen:c,onClose:l,onOpen:u,placement:d="bottom-start",lazyBehavior:h="unmount",direction:p,computePositionOnMount:m=!1,...g}=e,b=f.useRef(null),w=f.useRef(null),y=f.useRef(!0),x=_5(),P=f.useCallback(()=>{requestAnimationFrame(()=>{var L;(L=b.current)==null||L.focus({preventScroll:!1})})},[]),k=f.useCallback(()=>{const L=setTimeout(()=>{var z,J;if(o)(z=o.current)==null||z.focus();else if(!x.count())(J=b.current)==null||J.focus({preventScroll:!1});else{const se=x.firstEnabled();se&&V(se.index)}});U.current.add(L)},[x,o]),A=f.useCallback(()=>{const L=setTimeout(()=>{var z;if(!x.count())(z=b.current)==null||z.focus({preventScroll:!1});else{const J=x.lastEnabled();J&&V(J.index)}});U.current.add(L)},[x]),T=f.useCallback(()=>{u==null||u(),s?k():P()},[s,k,P,u]),{isOpen:E,onOpen:I,onClose:R,onToggle:M}=ol({isOpen:a,defaultIsOpen:c,onClose:l,onOpen:T});ap({enabled:E&&r,ref:b,handler:L=>{var J,se,ve,pe;const z=(ve=(se=(J=L.composedPath)==null?void 0:J.call(L))==null?void 0:se[0])!=null?ve:L.target;(pe=w.current)!=null&&pe.contains(z)||R()}});const H=bu({...g,enabled:E||m,placement:d,direction:p}),[K,V]=f.useState(-1);op(b,{focusRef:w,visible:E,shouldFocus:!0});const Y=tp({isOpen:E,ref:b}),[Z,F]=i0(t,"menu-button","menu-list"),j=f.useCallback(()=>{I(),P()},[I,P]),U=f.useRef(new Set([]));f.useEffect(()=>{const L=U.current;return()=>{L.forEach(z=>clearTimeout(z)),L.clear()}},[]),pn(()=>{var L;E||(V(-1),(L=b.current)==null||L.scrollTo(0,0))},[E]),pn(()=>{E&&K===-1&&P()},[K,E]),f.useEffect(()=>{var z;if(!E)return;const L=x.item(K);(z=L==null?void 0:L.node)==null||z.focus({preventScroll:!y.current})},[x,K,E]);const Se=f.useCallback(()=>{I(),k()},[k,I]),re=f.useCallback(()=>{y.current=!0,I(),A()},[I,A]),he=f.useCallback(()=>{var ve,pe;const L=Ob(b.current),z=(ve=b.current)==null?void 0:ve.contains(L.activeElement);if(!(E&&!z))return;const se=(pe=x.item(K))==null?void 0:pe.node;se==null||se.focus({preventScroll:!y.current})},[E,K,x]);return{openAndFocusMenu:j,openAndFocusFirstItem:Se,openAndFocusLastItem:re,onTransitionEnd:he,unstable__animationState:Y,descendants:x,popper:H,buttonId:Z,menuId:F,forceUpdate:H.forceUpdate,orientation:"vertical",isOpen:E,onToggle:M,onOpen:I,onClose:R,menuRef:b,buttonRef:w,focusedIndex:K,closeOnSelect:n,closeOnBlur:r,autoSelect:s,setFocusedIndex:V,isLazy:i,lazyBehavior:h,initialFocusRef:o,scrollIntoViewRef:y}}function R5(e={},t=null){const n=fs(),{onToggle:r,popper:o,openAndFocusFirstItem:s,openAndFocusLastItem:i,scrollIntoViewRef:a}=n,c=f.useCallback(l=>{const u=l.key,h={Enter:s,ArrowDown:s,ArrowUp:i}[u];h&&(a.current=!0,l.preventDefault(),l.stopPropagation(),h(l))},[s,i,a]);return{...e,ref:Re(n.buttonRef,t,o.referenceRef),id:n.buttonId,"data-active":ae(n.isOpen),"aria-expanded":n.isOpen,"aria-haspopup":"menu","aria-controls":n.menuId,onClick:Q(e.onClick,r),onKeyDown:Q(e.onKeyDown,c)}}function Yc(e){var t;return D5(e)&&!!((t=e==null?void 0:e.getAttribute("role"))!=null&&t.startsWith("menuitem"))}function M5(e={},t=null){const n=fs();if(!n)throw new Error("useMenuContext: context is undefined. Seems you forgot to wrap component within ");const{focusedIndex:r,setFocusedIndex:o,menuRef:s,isOpen:i,onClose:a,menuId:c,isLazy:l,lazyBehavior:u,scrollIntoViewRef:d,unstable__animationState:h}=n,p=T5(),m=nO({preventDefault:y=>y.key!==" "&&Yc(y.target)}),g=f.useCallback(y=>{if(!y.currentTarget.contains(y.target))return;const x=y.key,k={Tab:T=>T.preventDefault(),Escape:T=>{T.stopPropagation(),a()},ArrowDown:()=>{var E;d.current=!0;const T=(E=p.nextEnabled(r))!=null?E:p.firstEnabled();T&&o(T.index)},ArrowUp:()=>{var E;d.current=!0;const T=(E=p.prevEnabled(r))!=null?E:p.firstEnabled();T&&o(T.index)}}[x];if(k){y.preventDefault(),k(y);return}const A=m(T=>{const E=eO(p.values(),T,I=>{var R,M;return(M=(R=I==null?void 0:I.node)==null?void 0:R.textContent)!=null?M:""},p.item(r));if(E){const I=p.indexOf(E.node);o(I)}});Yc(y.target)&&A(y)},[p,r,m,a,o,d]),b=f.useRef(!1);i&&(b.current=!0);const w=Jh({wasSelected:b.current,enabled:l,mode:u,isSelected:h.present});return{...e,ref:Re(s,t),children:w?e.children:null,tabIndex:-1,role:"menu",id:c,style:{...e.style,transformOrigin:"var(--popper-transform-origin)"},"aria-orientation":"vertical",onKeyDown:Q(e.onKeyDown,g)}}function O5(e={}){const{popper:t,isOpen:n}=fs();return t.getPopperProps({...e,style:{visibility:n?"visible":"hidden",...e.style}})}function F5(e={},t=null){const{onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onClick:s,onFocus:i,isDisabled:a,isFocusable:c,closeOnSelect:l,type:u,...d}=e,h=fs(),{setFocusedIndex:p,focusedIndex:m,closeOnSelect:g,onClose:b,menuId:w,scrollIntoViewRef:y}=h,x=f.useRef(null),P="".concat(w,"-menuitem-").concat(f.useId()),{index:k,register:A}=A5({disabled:a&&!c}),T=f.useCallback(V=>{n==null||n(V),!a&&(y.current=!1,p(k))},[p,k,a,n,y]),E=f.useCallback(V=>{r==null||r(V),x.current&&!I5(x.current)&&T(V)},[T,r]),I=f.useCallback(V=>{o==null||o(V),!a&&p(-1)},[p,a,o]),R=f.useCallback(V=>{s==null||s(V),Yc(V.currentTarget)&&(l!=null?l:g)&&b()},[b,s,g,l]),M=f.useCallback(V=>{i==null||i(V),p(k)},[p,i,k]),H=k===m,K=C5({onClick:R,onFocus:M,onMouseEnter:T,onMouseMove:E,onMouseLeave:I,ref:Re(A,x,t),isDisabled:a,isFocusable:c});return{...d,...K,type:u!=null?u:K.type,id:P,role:"menuitem",tabIndex:H?0:-1}}function D5(e){var n;if(!N5(e))return!1;const t=(n=e.ownerDocument.defaultView)!=null?n:window;return e instanceof t.HTMLElement}function N5(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}const[j5,hs]=Ee({name:"MenuStylesContext",errorMessage:"useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),B5=e=>{const{children:t}=e,n=tt("Menu",e),r=Ie(e),{direction:o}=cs(),{descendants:s,...i}=$5({...r,direction:o}),a=f.useMemo(()=>i,[i]),{isOpen:c,onClose:l,forceUpdate:u}=a;return v.jsx(P5,{value:s,children:v.jsx(E5,{value:a,children:v.jsx(j5,{value:n,children:ht(t,{isOpen:c,onClose:l,forceUpdate:u})})})})};B5.displayName="Menu";const L5=D((e,t)=>{const n=hs();return v.jsx(O.button,{ref:t,...e,__css:{display:"inline-flex",appearance:"none",alignItems:"center",outline:0,...n.button}})}),z5=D((e,t)=>{const{children:n,as:r,...o}=e,s=R5(o,t),i=r||L5;return v.jsx(i,{...s,className:W("chakra-menu__menu-button",e.className),children:v.jsx(O.span,{__css:{pointerEvents:"none",flex:"1 1 auto",minW:0},children:e.children})})});z5.displayName="MenuButton";const Fb=D((e,t)=>{const n=hs();return v.jsx(O.span,{ref:t,...e,__css:n.command,className:"chakra-menu__command"})});Fb.displayName="MenuCommand";const Db=e=>{const{className:t,children:n,...r}=e,o=hs(),s=f.Children.only(n),i=f.isValidElement(s)?f.cloneElement(s,{focusable:"false","aria-hidden":!0,className:W("chakra-menu__icon",s.props.className)}):null,a=W("chakra-menu__icon-wrapper",t);return v.jsx(O.span,{className:a,...r,__css:o.icon,children:i})};Db.displayName="MenuIcon";const V5=D((e,t)=>{const{type:n,...r}=e,o=hs(),s=r.as||n?n!=null?n:void 0:"button",i=f.useMemo(()=>({textDecoration:"none",color:"inherit",userSelect:"none",display:"flex",width:"100%",alignItems:"center",textAlign:"start",flex:"0 0 auto",outline:0,...o.item}),[o.item]);return v.jsx(O.button,{ref:t,type:s,...r,__css:i})}),W5=D((e,t)=>{const{icon:n,iconSpacing:r="0.75rem",command:o,commandSpacing:s="0.75rem",children:i,...a}=e,c=F5(a,t),u=n||o?v.jsx("span",{style:{pointerEvents:"none",flex:1},children:i}):i;return v.jsxs(V5,{...c,className:W("chakra-menu__menuitem",c.className),children:[n&&v.jsx(Db,{fontSize:"0.8em",marginEnd:r,children:n}),u,o&&v.jsx(Fb,{marginStart:s,children:o})]})});W5.displayName="MenuItem";const H5={enter:{visibility:"visible",opacity:1,scale:1,transition:{duration:.2,ease:[.4,0,.2,1]}},exit:{transitionEnd:{visibility:"hidden"},opacity:0,scale:.8,transition:{duration:.1,easings:"easeOut"}}},U5=O(Zt.div),G5=D(function(t,n){var h,p;const{rootProps:r,motionProps:o,...s}=t,{isOpen:i,onTransitionEnd:a,unstable__animationState:c}=fs(),l=M5(s,n),u=O5(r),d=hs();return v.jsx(O.div,{...u,__css:{zIndex:(p=t.zIndex)!=null?p:(h=d.list)==null?void 0:h.zIndex},children:v.jsx(U5,{variants:H5,initial:!1,animate:i?"enter":"exit",__css:{outline:0,...d.list},...o,...l,className:W("chakra-menu__menu-list",l.className),onUpdate:a,onAnimationComplete:tl(c.onComplete,l.onAnimationComplete)})})});G5.displayName="MenuList";var q5=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},pr=new WeakMap,Fs=new WeakMap,Ds={},tc=0,Nb=function(e){return e&&(e.host||Nb(e.parentNode))},K5=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Nb(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})},X5=function(e,t,n,r){var o=K5(t,Array.isArray(e)?e:[e]);Ds[n]||(Ds[n]=new WeakMap);var s=Ds[n],i=[],a=new Set,c=new Set(o),l=function(d){!d||a.has(d)||(a.add(d),l(d.parentNode))};o.forEach(l);var u=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(h){if(a.has(h))u(h);else try{var p=h.getAttribute(r),m=p!==null&&p!=="false",g=(pr.get(h)||0)+1,b=(s.get(h)||0)+1;pr.set(h,g),s.set(h,b),i.push(h),g===1&&m&&Fs.set(h,!0),b===1&&h.setAttribute(n,"true"),m||h.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return u(t),a.clear(),tc++,function(){i.forEach(function(d){var h=pr.get(d)-1,p=s.get(d)-1;pr.set(d,h),s.set(d,p),h||(Fs.has(d)||d.removeAttribute(r),Fs.delete(d)),p||d.removeAttribute(n)}),tc--,tc||(pr=new WeakMap,pr=new WeakMap,Fs=new WeakMap,Ds={})}},Y5=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=q5(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),X5(r,o,n,"aria-hidden")):function(){return null}},Z5=Object.defineProperty,J5=(e,t,n)=>t in e?Z5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q5=(e,t,n)=>(J5(e,t+"",n),n);class eF{constructor(){Q5(this,"modals"),this.modals=new Set}add(t){return this.modals.add(t),this.modals.size}remove(t){this.modals.delete(t)}isTopModal(t){if(!t)return!1;const n=Array.from(this.modals)[this.modals.size-1];return t===n}}const Zc=new eF;function jb(e,t){const[n,r]=f.useState(0);return f.useEffect(()=>{const o=e.current;if(o){if(t){const s=Zc.add(o);r(s)}return()=>{Zc.remove(o),r(0)}}},[t,e]),n}function tF(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:o=!0,closeOnEsc:s=!0,useInert:i=!0,onOverlayClick:a,onEsc:c}=e,l=f.useRef(null),u=f.useRef(null),[d,h,p]=rF(r,"chakra-modal","chakra-modal--header","chakra-modal--body");nF(l,t&&i);const m=jb(l,t),g=f.useRef(null),b=f.useCallback(I=>{g.current=I.target},[]),w=f.useCallback(I=>{I.key==="Escape"&&(I.stopPropagation(),s&&(n==null||n()),c==null||c())},[s,n,c]),[y,x]=f.useState(!1),[P,k]=f.useState(!1),A=f.useCallback((I={},R=null)=>({role:"dialog",...I,ref:Re(R,l),id:d,tabIndex:-1,"aria-modal":!0,"aria-labelledby":y?h:void 0,"aria-describedby":P?p:void 0,onClick:Q(I.onClick,M=>M.stopPropagation())}),[p,P,d,h,y]),T=f.useCallback(I=>{I.stopPropagation(),g.current===I.target&&Zc.isTopModal(l.current)&&(o&&(n==null||n()),a==null||a())},[n,o,a]),E=f.useCallback((I={},R=null)=>({...I,ref:Re(R,u),onClick:Q(I.onClick,T),onKeyDown:Q(I.onKeyDown,w),onMouseDown:Q(I.onMouseDown,b)}),[w,b,T]);return{isOpen:t,onClose:n,headerId:h,bodyId:p,setBodyMounted:k,setHeaderMounted:x,dialogRef:l,overlayRef:u,getDialogProps:A,getDialogContainerProps:E,index:m}}function nF(e,t){const n=e.current;f.useEffect(()=>{if(!(!e.current||!t))return Y5(e.current)},[t,e,n])}function rF(e,...t){const n=f.useId(),r=e||n;return f.useMemo(()=>t.map(o=>"".concat(o,"-").concat(r)),[r,t])}const[oF,eo]=Ee({name:"ModalStylesContext",errorMessage:"useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),[sF,or]=Ee({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),Bb=e=>{const t={scrollBehavior:"outside",autoFocus:!0,trapFocus:!0,returnFocusOnClose:!0,blockScrollOnMount:!0,allowPinchZoom:!1,preserveScrollBarGap:!0,motionPreset:"scale",...e,lockFocusAcrossFrames:e.lockFocusAcrossFrames||!0},{portalProps:n,children:r,autoFocus:o,trapFocus:s,initialFocusRef:i,finalFocusRef:a,returnFocusOnClose:c,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:d,motionPreset:h,lockFocusAcrossFrames:p,animatePresenceProps:m,onCloseComplete:g}=t,b=tt("Modal",t),y={...tF(t),autoFocus:o,trapFocus:s,initialFocusRef:i,finalFocusRef:a,returnFocusOnClose:c,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:d,motionPreset:h,lockFocusAcrossFrames:p};return v.jsx(sF,{value:y,children:v.jsx(oF,{value:b,children:v.jsx(ar,{...m,onExitComplete:g,children:y.isOpen&&v.jsx(Jr,{...n,children:r})})})})};Bb.displayName="Modal";var ri="right-scroll-bar-position",oi="width-before-scroll-bar",iF="with-scroll-bars-hidden",aF="--removed-body-scroll-bar-size",Lb=Gg(),nc=function(){},qi=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:nc,onWheelCapture:nc,onTouchMoveCapture:nc}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,h=e.sideCar,p=e.noIsolation,m=e.inert,g=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,y=e.gapMode,x=Wg(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=h,k=Vg([n,t]),A=Ut(Ut({},x),o);return f.createElement(f.Fragment,null,u&&f.createElement(P,{sideCar:Lb,removeScrollBar:l,shards:d,noIsolation:p,inert:m,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:y}),i?f.cloneElement(f.Children.only(a),Ut(Ut({},A),{ref:k})):f.createElement(w,Ut({},A,{className:c,ref:k}),a))});qi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};qi.classNames={fullWidth:oi,zeroRight:ri};var cF=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lF(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=cF();return t&&e.setAttribute("nonce",t),e}function uF(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function dF(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var fF=function(){var e=0,t=null;return{add:function(n){e==0&&(t=lF())&&(uF(t,n),dF(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},hF=function(){var e=fF();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},zb=function(){var e=hF(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},pF={left:0,top:0,right:0,gap:0},rc=function(e){return parseInt(e||"",10)||0},mF=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[rc(n),rc(r),rc(o)]},gF=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pF;var t=mF(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])}},bF=zb(),jr="data-scroll-locked",yF=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),"\n .".concat(iF," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(a,"px ").concat(r,";\n }\n body[").concat(jr,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),n==="margin"&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(s,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(a,"px ").concat(r,";\n "),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(ri," {\n right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(oi," {\n margin-right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(ri," .").concat(ri," {\n right: 0 ").concat(r,";\n }\n \n .").concat(oi," .").concat(oi," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(jr,"] {\n ").concat(aF,": ").concat(a,"px;\n }\n")},ah=function(){var e=parseInt(document.body.getAttribute(jr)||"0",10);return isFinite(e)?e:0},vF=function(){f.useEffect(function(){return document.body.setAttribute(jr,(ah()+1).toString()),function(){var e=ah()-1;e<=0?document.body.removeAttribute(jr):document.body.setAttribute(jr,e.toString())}},[])},xF=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;vF();var s=f.useMemo(function(){return gF(o)},[o]);return f.createElement(bF,{styles:yF(s,!t,o,n?"":"!important")})},Jc=!1;if(typeof window<"u")try{var Ns=Object.defineProperty({},"passive",{get:function(){return Jc=!0,!0}});window.addEventListener("test",Ns,Ns),window.removeEventListener("test",Ns,Ns)}catch(e){Jc=!1}var mr=Jc?{passive:!1}:!1,SF=function(e){return e.tagName==="TEXTAREA"},Vb=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!SF(e)&&n[t]==="visible")},wF=function(e){return Vb(e,"overflowY")},kF=function(e){return Vb(e,"overflowX")},ch=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Wb(e,r);if(o){var s=Hb(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},CF=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},PF=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Wb=function(e,t){return e==="v"?wF(t):kF(t)},Hb=function(e,t){return e==="v"?CF(t):PF(t)},TF=function(e,t){return e==="h"&&t==="rtl"?-1:1},_F=function(e,t,n,r,o){var s=TF(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),l=!1,u=i>0,d=0,h=0;do{var p=Hb(e,a),m=p[0],g=p[1],b=p[2],w=g-b-s*m;(m||w)&&Wb(e,a)&&(d+=w,h+=m),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(u&&Math.abs(d)<1||!u&&Math.abs(h)<1)&&(l=!0),l},js=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},lh=function(e){return[e.deltaX,e.deltaY]},uh=function(e){return e&&"current"in e?e.current:e},AF=function(e,t){return e[0]===t[0]&&e[1]===t[1]},EF=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},IF=0,gr=[];function $F(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(IF++)[0],s=f.useState(zb)[0],i=f.useRef(e);f.useEffect(function(){i.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=TM([e.lockRef.current],(e.shards||[]).map(uh),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=f.useCallback(function(g,b){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var w=js(g),y=n.current,x="deltaX"in g?g.deltaX:y[0]-w[0],P="deltaY"in g?g.deltaY:y[1]-w[1],k,A=g.target,T=Math.abs(x)>Math.abs(P)?"h":"v";if("touches"in g&&T==="h"&&A.type==="range")return!1;var E=ch(T,A);if(!E)return!0;if(E?k=T:(k=T==="v"?"h":"v",E=ch(T,A)),!E)return!1;if(!r.current&&"changedTouches"in g&&(x||P)&&(r.current=k),!k)return!0;var I=r.current||k;return _F(I,b,g,I==="h"?x:P)},[]),c=f.useCallback(function(g){var b=g;if(!(!gr.length||gr[gr.length-1]!==s)){var w="deltaY"in b?lh(b):js(b),y=t.current.filter(function(k){return k.name===b.type&&(k.target===b.target||b.target===k.shadowParent)&&AF(k.delta,w)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var x=(i.current.shards||[]).map(uh).filter(Boolean).filter(function(k){return k.contains(b.target)}),P=x.length>0?a(b,x[0]):!i.current.noIsolation;P&&b.cancelable&&b.preventDefault()}}},[]),l=f.useCallback(function(g,b,w,y){var x={name:g,delta:b,target:w,should:y,shadowParent:RF(w)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(P){return P!==x})},1)},[]),u=f.useCallback(function(g){n.current=js(g),r.current=void 0},[]),d=f.useCallback(function(g){l(g.type,lh(g),g.target,a(g,e.lockRef.current))},[]),h=f.useCallback(function(g){l(g.type,js(g),g.target,a(g,e.lockRef.current))},[]);f.useEffect(function(){return gr.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",c,mr),document.addEventListener("touchmove",c,mr),document.addEventListener("touchstart",u,mr),function(){gr=gr.filter(function(g){return g!==s}),document.removeEventListener("wheel",c,mr),document.removeEventListener("touchmove",c,mr),document.removeEventListener("touchstart",u,mr)}},[]);var p=e.removeScrollBar,m=e.inert;return f.createElement(f.Fragment,null,m?f.createElement(s,{styles:EF(o)}):null,p?f.createElement(xF,{gapMode:e.gapMode}):null)}function RF(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const MF=_M(Lb,$F);var Ub=f.forwardRef(function(e,t){return f.createElement(qi,Ut({},e,{ref:t,sideCar:MF}))});Ub.classNames=qi.classNames;function OF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:s,allowPinchZoom:i,finalFocusRef:a,returnFocusOnClose:c,preserveScrollBarGap:l,lockFocusAcrossFrames:u,isOpen:d}=or(),[h,p]=ig();f.useEffect(()=>{!h&&p&&setTimeout(p)},[h,p]);const m=jb(r,d);return v.jsx(vb,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:a,restoreFocus:c,contentRef:r,lockFocusAcrossFrames:u,children:v.jsx(Ub,{removeScrollBar:!l,allowPinchZoom:i,enabled:m===1&&s,forwardProps:!0,children:e.children})})}const FF={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{opacity:0,x:e,y:t,transition:(s=n==null?void 0:n.exit)!=null?s:hn.exit(Yn.exit,o),transitionEnd:r==null?void 0:r.exit}},enter:({transition:e,transitionEnd:t,delay:n})=>{var r;return{opacity:1,x:0,y:0,transition:(r=e==null?void 0:e.enter)!=null?r:hn.enter(Yn.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:o,delay:s})=>{var a;const i={x:t,y:e};return{opacity:0,transition:(a=n==null?void 0:n.exit)!=null?a:hn.exit(Yn.exit,s),...o?{...i,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...i,...r==null?void 0:r.exit}}}}},ko={initial:"initial",animate:"enter",exit:"exit",variants:FF},DF=f.forwardRef(function(t,n){const{unmountOnExit:r,in:o,reverse:s=!0,className:i,offsetX:a=0,offsetY:c=8,transition:l,transitionEnd:u,delay:d,animatePresenceProps:h,...p}=t,m=r?o&&r:!0,g=o||r?"enter":"exit",b={offsetX:a,offsetY:c,reverse:s,transition:l,transitionEnd:u,delay:d};return v.jsx(ar,{...h,custom:b,children:m&&v.jsx(Zt.div,{ref:n,className:W("chakra-offset-slide",i),custom:b,...ko,animate:g,...p})})});DF.displayName="SlideFade";const NF={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:o})=>{var s;return{opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(s=n==null?void 0:n.exit)!=null?s:hn.exit(Yn.exit,o)}},enter:({transitionEnd:e,transition:t,delay:n})=>{var r;return{opacity:1,scale:1,transition:(r=t==null?void 0:t.enter)!=null?r:hn.enter(Yn.enter,n),transitionEnd:e==null?void 0:e.enter}}},Gb={initial:"exit",animate:"enter",exit:"exit",variants:NF},jF=f.forwardRef(function(t,n){const{unmountOnExit:r,in:o,reverse:s=!0,initialScale:i=.95,className:a,transition:c,transitionEnd:l,delay:u,animatePresenceProps:d,...h}=t,p=r?o&&r:!0,m=o||r?"enter":"exit",g={initialScale:i,reverse:s,transition:c,transitionEnd:l,delay:u};return v.jsx(ar,{...d,custom:g,children:p&&v.jsx(Zt.div,{ref:n,className:W("chakra-offset-slide",a),...Gb,animate:m,custom:g,...h})})});jF.displayName="ScaleFade";const BF={slideInBottom:{...ko,custom:{offsetY:16,reverse:!0}},slideInRight:{...ko,custom:{offsetX:16,reverse:!0}},slideInTop:{...ko,custom:{offsetY:-16,reverse:!0}},slideInLeft:{...ko,custom:{offsetX:-16,reverse:!0}},scale:{...Gb,custom:{initialScale:.95,reverse:!0}},none:{}},LF=O(Zt.section),zF=e=>BF[e||"none"],qb=f.forwardRef((e,t)=>{const{preset:n,motionProps:r=zF(n),...o}=e;return v.jsx(LF,{ref:t,...r,...o})});qb.displayName="ModalTransition";const Kb=D((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:s,...i}=e,{getDialogProps:a,getDialogContainerProps:c}=or(),l=a(i,t),u=c(o),d=W("chakra-modal__content",n),h=eo(),p={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...h.dialog},m={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...h.dialogContainer},{motionPreset:g}=or();return v.jsx(OF,{children:v.jsx(O.div,{...u,className:"chakra-modal__content-container",tabIndex:-1,__css:m,children:v.jsx(qb,{preset:g,motionProps:s,className:d,...l,__css:p,children:r})})})});Kb.displayName="ModalContent";const VF=D((e,t)=>{const{className:n,...r}=e,{bodyId:o,setBodyMounted:s}=or();f.useEffect(()=>(s(!0),()=>s(!1)),[s]);const i=W("chakra-modal__body",n),a=eo();return v.jsx(O.div,{ref:t,className:i,id:o,...r,__css:a.body})});VF.displayName="ModalBody";const WF=D((e,t)=>{const{onClick:n,className:r,...o}=e,{onClose:s}=or(),i=W("chakra-modal__close-btn",r),a=eo();return v.jsx(Wi,{ref:t,__css:a.closeButton,className:i,onClick:Q(n,c=>{c.stopPropagation(),s()}),...o})});WF.displayName="ModalCloseButton";const HF=D((e,t)=>{const{className:n,...r}=e,o=W("chakra-modal__footer",n),s=eo(),i={display:"flex",alignItems:"center",justifyContent:"flex-end",...s.footer};return v.jsx(O.footer,{ref:t,...r,__css:i,className:o})});HF.displayName="ModalFooter";const UF=D((e,t)=>{const{className:n,...r}=e,{headerId:o,setHeaderMounted:s}=or();f.useEffect(()=>(s(!0),()=>s(!1)),[s]);const i=W("chakra-modal__header",n),a=eo(),c={flex:0,...a.header};return v.jsx(O.header,{ref:t,className:i,id:o,...r,__css:c})});UF.displayName="ModalHeader";const GF={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:hn.enter(Yn.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:0,transition:(r=e==null?void 0:e.exit)!=null?r:hn.exit(Yn.exit,n),transitionEnd:t==null?void 0:t.exit}}},Xb={initial:"exit",animate:"enter",exit:"exit",variants:GF},qF=f.forwardRef(function(t,n){const{unmountOnExit:r,in:o,className:s,transition:i,transitionEnd:a,delay:c,animatePresenceProps:l,...u}=t,d=o||r?"enter":"exit",h=r?o&&r:!0,p={transition:i,transitionEnd:a,delay:c};return v.jsx(ar,{...l,custom:p,children:h&&v.jsx(Zt.div,{ref:n,className:W("chakra-fade",s),custom:p,...Xb,animate:d,...u})})});qF.displayName="Fade";const KF=O(Zt.div),XF=D((e,t)=>{const{className:n,transition:r,motionProps:o,...s}=e,i=W("chakra-modal__overlay",n),c={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...eo().overlay},{motionPreset:l}=or(),d=o||(l==="none"?{}:Xb);return v.jsx(KF,{...d,__css:c,ref:t,className:i,...s})});XF.displayName="ModalOverlay";function _N(e){const{leastDestructiveRef:t,...n}=e;return v.jsx(Bb,{...n,initialFocusRef:t})}const AN=D((e,t)=>v.jsx(Kb,{ref:t,role:"alertdialog",...e})),YF=e=>v.jsx(Pt,{viewBox:"0 0 24 24",...e,children:v.jsx("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),ZF=e=>v.jsx(Pt,{viewBox:"0 0 24 24",...e,children:v.jsx("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function dh(e,t,n,r){f.useEffect(()=>{var a;if(!e.current||!r)return;const o=(a=e.current.ownerDocument.defaultView)!=null?a:window,s=Array.isArray(t)?t:[t],i=new o.MutationObserver(c=>{for(const l of c)l.type==="attributes"&&l.attributeName&&s.includes(l.attributeName)&&n(l)});return i.observe(e.current,{attributes:!0,attributeFilter:s}),()=>i.disconnect()})}const JF=50,fh=300;function QF(e,t){const[n,r]=f.useState(!1),[o,s]=f.useState(null),[i,a]=f.useState(!0),c=f.useRef(null),l=()=>clearTimeout(c.current);a0(()=>{o==="increment"&&e(),o==="decrement"&&t()},n?JF:null);const u=f.useCallback(()=>{i&&e(),c.current=setTimeout(()=>{a(!1),r(!0),s("increment")},fh)},[e,i]),d=f.useCallback(()=>{i&&t(),c.current=setTimeout(()=>{a(!1),r(!0),s("decrement")},fh)},[t,i]),h=f.useCallback(()=>{a(!0),r(!1),l()},[]);return f.useEffect(()=>()=>l(),[]),{up:u,down:d,stop:h,isSpinning:n}}const eD=/^[Ee0-9+\-.]$/;function tD(e){return eD.test(e)}function nD(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function rD(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:o=Number.MIN_SAFE_INTEGER,max:s=Number.MAX_SAFE_INTEGER,step:i=1,isReadOnly:a,isDisabled:c,isRequired:l,isInvalid:u,pattern:d="[0-9]*(.[0-9]+)?",inputMode:h="decimal",allowMouseWheel:p,id:m,onChange:g,precision:b,name:w,"aria-describedby":y,"aria-label":x,"aria-labelledby":P,onFocus:k,onBlur:A,onInvalid:T,getAriaValueText:E,isValidCharacter:I,format:R,parse:M,...H}=e,K=He(k),V=He(A),Y=He(T),Z=He(I!=null?I:tD),F=He(E),j=qv(e),{update:U,increment:Se,decrement:re}=j,[he,L]=f.useState(!1),z=!(a||c),J=f.useRef(null),se=f.useRef(null),ve=f.useRef(null),pe=f.useRef(null),Me=f.useCallback(N=>N.split("").filter(Z).join(""),[Z]),Oe=f.useCallback(N=>{var xe;return(xe=M==null?void 0:M(N))!=null?xe:N},[M]),ce=f.useCallback(N=>{var xe;return((xe=R==null?void 0:R(N))!=null?xe:N).toString()},[R]);pn(()=>{(j.valueAsNumber>s||j.valueAsNumber{if(!J.current)return;if(J.current.value!=j.value){const xe=Oe(J.current.value);j.setValue(Me(xe))}},[Oe,Me]);const ie=f.useCallback((N=i)=>{z&&Se(N)},[Se,z,i]),le=f.useCallback((N=i)=>{z&&re(N)},[re,z,i]),me=QF(ie,le);dh(ve,"disabled",me.stop,me.isSpinning),dh(pe,"disabled",me.stop,me.isSpinning);const ee=f.useCallback(N=>{if(N.nativeEvent.isComposing)return;const Ne=Oe(N.currentTarget.value);U(Me(Ne)),se.current={start:N.currentTarget.selectionStart,end:N.currentTarget.selectionEnd}},[U,Me,Oe]),ge=f.useCallback(N=>{var xe,Ne,B;K==null||K(N),se.current&&(N.currentTarget.selectionStart=(Ne=se.current.start)!=null?Ne:(xe=N.currentTarget.value)==null?void 0:xe.length,N.currentTarget.selectionEnd=(B=se.current.end)!=null?B:N.currentTarget.selectionStart)},[K]),G=f.useCallback(N=>{if(N.nativeEvent.isComposing)return;nD(N,Z)||N.preventDefault();const xe=ue(N)*i,Ne=N.key,X={ArrowUp:()=>ie(xe),ArrowDown:()=>le(xe),Home:()=>U(o),End:()=>U(s)}[Ne];X&&(N.preventDefault(),X(N))},[Z,i,ie,le,U,o,s]),ue=N=>{let xe=1;return(N.metaKey||N.ctrlKey)&&(xe=.1),N.shiftKey&&(xe=10),xe},de=f.useMemo(()=>{const N=F==null?void 0:F(j.value);if(N!=null)return N;const xe=j.value.toString();return xe||void 0},[j.value,F]),fe=f.useCallback(()=>{let N=j.value;if(j.value==="")return;/^[eE]/.test(j.value.toString())?j.setValue(""):(j.valueAsNumbers&&(N=s),j.cast(N))},[j,s,o]),We=f.useCallback(()=>{L(!1),n&&fe()},[n,L,fe]),Ye=f.useCallback(()=>{t&&requestAnimationFrame(()=>{var N;(N=J.current)==null||N.focus()})},[t]),Qe=f.useCallback(N=>{N.preventDefault(),me.up(),Ye()},[Ye,me]),yt=f.useCallback(N=>{N.preventDefault(),me.down(),Ye()},[Ye,me]);Un(()=>J.current,"wheel",N=>{var st,Mt;const Ne=((Mt=(st=J.current)==null?void 0:st.ownerDocument)!=null?Mt:document).activeElement===J.current;if(!p||!Ne)return;N.preventDefault();const B=ue(N)*i,X=Math.sign(N.deltaY);X===-1?ie(B):X===1&&le(B)},{passive:!1});const Qt=f.useCallback((N={},xe=null)=>{const Ne=c||r&&j.isAtMax;return{...N,ref:Re(xe,ve),role:"button",tabIndex:-1,onPointerDown:Q(N.onPointerDown,B=>{B.button!==0||Ne||Qe(B)}),onPointerLeave:Q(N.onPointerLeave,me.stop),onPointerUp:Q(N.onPointerUp,me.stop),disabled:Ne,"aria-disabled":cn(Ne)}},[j.isAtMax,r,Qe,me.stop,c]),yn=f.useCallback((N={},xe=null)=>{const Ne=c||r&&j.isAtMin;return{...N,ref:Re(xe,pe),role:"button",tabIndex:-1,onPointerDown:Q(N.onPointerDown,B=>{B.button!==0||Ne||yt(B)}),onPointerLeave:Q(N.onPointerLeave,me.stop),onPointerUp:Q(N.onPointerUp,me.stop),disabled:Ne,"aria-disabled":cn(Ne)}},[j.isAtMin,r,yt,me.stop,c]),vn=f.useCallback((N={},xe=null)=>{var Ne,B,X,st;return{name:w,inputMode:h,type:"text",pattern:d,"aria-labelledby":P,"aria-label":x,"aria-describedby":y,id:m,disabled:c,...N,readOnly:(Ne=N.readOnly)!=null?Ne:a,"aria-readonly":(B=N.readOnly)!=null?B:a,"aria-required":(X=N.required)!=null?X:l,required:(st=N.required)!=null?st:l,ref:Re(J,xe),value:ce(j.value),role:"spinbutton","aria-valuemin":o,"aria-valuemax":s,"aria-valuenow":Number.isNaN(j.valueAsNumber)?void 0:j.valueAsNumber,"aria-invalid":cn(u!=null?u:j.isOutOfRange),"aria-valuetext":de,autoComplete:"off",autoCorrect:"off",onChange:Q(N.onChange,ee),onKeyDown:Q(N.onKeyDown,G),onFocus:Q(N.onFocus,ge,()=>L(!0)),onBlur:Q(N.onBlur,V,We)}},[w,h,d,P,x,ce,y,m,c,l,a,u,j.value,j.valueAsNumber,j.isOutOfRange,o,s,de,ee,G,ge,V,We]);return{value:ce(j.value),valueAsNumber:j.valueAsNumber,isFocused:he,isDisabled:c,isReadOnly:a,getIncrementButtonProps:Qt,getDecrementButtonProps:yn,getInputProps:vn,htmlProps:H}}const[oD,Ki]=Ee({name:"NumberInputStylesContext",errorMessage:"useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),[sD,yu]=Ee({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),iD=D(function(t,n){const r=tt("NumberInput",t),o=Ie(t),s=Xl(o),{htmlProps:i,...a}=rD(s),c=f.useMemo(()=>a,[a]);return v.jsx(sD,{value:c,children:v.jsx(oD,{value:r,children:v.jsx(O.div,{...i,ref:n,className:W("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})})})});iD.displayName="NumberInput";const aD=D(function(t,n){const r=Ki();return v.jsx(O.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});aD.displayName="NumberInputStepper";const cD=D(function(t,n){const{getInputProps:r}=yu(),o=r(t,n),s=Ki();return v.jsx(O.input,{...o,className:W("chakra-numberinput__field",t.className),__css:{width:"100%",...s.field}})});cD.displayName="NumberInputField";const Yb=O("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),lD=D(function(t,n){var i;const r=Ki(),{getDecrementButtonProps:o}=yu(),s=o(t,n);return v.jsx(Yb,{...s,__css:r.stepper,children:(i=t.children)!=null?i:v.jsx(YF,{})})});lD.displayName="NumberDecrementStepper";const uD=D(function(t,n){var i;const{getIncrementButtonProps:r}=yu(),o=r(t,n),s=Ki();return v.jsx(Yb,{...o,__css:s.stepper,children:(i=t.children)!=null?i:v.jsx(ZF,{})})});uD.displayName="NumberIncrementStepper";const[dD,On]=Ee({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[fD,ps]=Ee({name:"PopoverStylesContext",errorMessage:"usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),br={click:"click",hover:"hover"};function hD(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:o,returnFocusOnClose:s=!0,autoFocus:i=!0,arrowSize:a,arrowShadowColor:c,trigger:l=br.click,openDelay:u=200,closeDelay:d=200,isLazy:h,lazyBehavior:p="unmount",computePositionOnMount:m,...g}=e,{isOpen:b,onClose:w,onOpen:y,onToggle:x}=ol(e),[P,k]=f.useState(s);f.useEffect(()=>k(s),[s]);const A=f.useRef(null),T=f.useRef(null),E=f.useRef(null),I=f.useRef(!1),R=f.useRef(!1);b&&(R.current=!0);const[M,H]=f.useState(!1),[K,V]=f.useState(!1),Y=f.useId(),Z=o!=null?o:Y,[F,j,U,Se]=["popover-trigger","popover-content","popover-header","popover-body"].map(G=>"".concat(G,"-").concat(Z)),{referenceRef:re,getArrowProps:he,getPopperProps:L,getArrowInnerProps:z,forceUpdate:J}=bu({...g,enabled:b||!!m}),se=tp({isOpen:b,ref:E});o0({enabled:b,ref:T}),op(E,{focusRef:T,visible:b,shouldFocus:P&&l===br.click}),Yv(E,{focusRef:r,visible:b,shouldFocus:i&&l===br.click}),ap({enabled:b&&t,ref:E,handler(G){var de,fe;const ue=(fe=(de=G.composedPath)==null?void 0:de.call(G)[0])!=null?fe:[G.target];Bs(T.current,ue)||(ue&&k(!ii(ue)),w())}});const ve=Jh({wasSelected:R.current,enabled:h,mode:p,isSelected:se.present}),pe=f.useCallback((G={},ue=null)=>{const de={...G,style:{...G.style,transformOrigin:Xe.transformOrigin.varRef,[Xe.arrowSize.var]:a?"".concat(a,"px"):void 0,[Xe.arrowShadowColor.var]:c},ref:Re(E,ue),children:ve?G.children:null,id:j,tabIndex:-1,role:"dialog",onKeyDown:Q(G.onKeyDown,fe=>{fe.nativeEvent.isComposing||n&&fe.key==="Escape"&&(fe.preventDefault(),fe.stopPropagation(),w())}),onBlur:Q(G.onBlur,fe=>{const We=hh(fe),Ye=Bs(E.current,We),Qe=Bs(T.current,We),yt=!Ye&&!Qe;We&&k(!ii(We)),b&&t&&yt&&w()}),"aria-labelledby":M?U:void 0,"aria-describedby":K?Se:void 0};return l===br.hover&&(de.role="tooltip",de.onMouseEnter=Q(G.onMouseEnter,()=>{I.current=!0}),de.onMouseLeave=Q(G.onMouseLeave,fe=>{fe.nativeEvent.relatedTarget!==null&&(I.current=!1,setTimeout(()=>w(),d))})),de},[ve,j,M,U,K,Se,l,n,w,b,t,d,c,a]),Me=f.useCallback((G={},ue=null)=>L({...G,style:{visibility:b?"visible":"hidden",...G.style}},ue),[b,L]),Oe=f.useCallback((G,ue=null)=>({...G,ref:Re(ue,A,re)}),[A,re]),ce=f.useRef(),ie=f.useRef(),le=f.useCallback(G=>{A.current==null&&re(G)},[re]),me=f.useCallback((G={},ue=null)=>{const de={...G,ref:Re(T,ue,le),id:F,"aria-haspopup":"dialog","aria-expanded":b,"aria-controls":j};return l===br.click&&(de.onClick=Q(G.onClick,x)),l===br.hover&&(de.onFocus=Q(G.onFocus,()=>{ce.current===void 0&&y()}),de.onBlur=Q(G.onBlur,fe=>{const We=hh(fe),Ye=!Bs(E.current,We);b&&t&&Ye&&w()}),de.onKeyDown=Q(G.onKeyDown,fe=>{fe.key==="Escape"&&w()}),de.onMouseEnter=Q(G.onMouseEnter,()=>{I.current=!0,ce.current=window.setTimeout(()=>y(),u)}),de.onMouseLeave=Q(G.onMouseLeave,()=>{I.current=!1,ce.current&&(clearTimeout(ce.current),ce.current=void 0),ie.current=window.setTimeout(()=>{I.current===!1&&w()},d)})),de},[F,b,j,l,le,x,y,t,w,u,d]);f.useEffect(()=>()=>{ce.current&&clearTimeout(ce.current),ie.current&&clearTimeout(ie.current)},[]);const ee=f.useCallback((G={},ue=null)=>({...G,id:U,ref:Re(ue,de=>{H(!!de)})}),[U]),ge=f.useCallback((G={},ue=null)=>({...G,id:Se,ref:Re(ue,de=>{V(!!de)})}),[Se]);return{forceUpdate:J,isOpen:b,onAnimationComplete:se.onComplete,onClose:w,getAnchorProps:Oe,getArrowProps:he,getArrowInnerProps:z,getPopoverPositionerProps:Me,getPopoverProps:pe,getTriggerProps:me,getHeaderProps:ee,getBodyProps:ge}}function Bs(e,t){return e===t||(e==null?void 0:e.contains(t))}function hh(e){var n;const t=e.currentTarget.ownerDocument.activeElement;return(n=e.relatedTarget)!=null?n:t}function pD(e){const t=tt("Popover",e),{children:n,...r}=Ie(e),o=cs(),s=hD({...r,direction:o.direction});return v.jsx(dD,{value:s,children:v.jsx(fD,{value:t,children:ht(n,{isOpen:s.isOpen,onClose:s.onClose,forceUpdate:s.forceUpdate})})})}pD.displayName="Popover";function vu(e){var n;const t=f.version;return typeof t!="string"||t.startsWith("18.")?e==null?void 0:e.ref:(n=e==null?void 0:e.props)==null?void 0:n.ref}function mD(e){const t=f.Children.only(e.children),{getAnchorProps:n}=On();return v.jsx(v.Fragment,{children:f.cloneElement(t,n(t.props,vu(t)))})}mD.displayName="PopoverAnchor";const oc=(e,t)=>t?"".concat(e,".").concat(t,", ").concat(t):void 0;function gD(e){var p;const{bg:t,bgColor:n,backgroundColor:r,shadow:o,boxShadow:s,shadowColor:i,...a}=e,{getArrowProps:c,getArrowInnerProps:l}=On(),u=ps(),d=(p=t!=null?t:n)!=null?p:r,h=o!=null?o:s;return v.jsx(O.div,{...c(),className:"chakra-popover__arrow-positioner",children:v.jsx(O.div,{className:W("chakra-popover__arrow",e.className),...l(a),__css:{"--popper-arrow-shadow-color":oc("colors",i),"--popper-arrow-bg":oc("colors",d),"--popper-arrow-shadow":oc("shadows",h),...u.arrow}})})}gD.displayName="PopoverArrow";const bD=D(function(t,n){const{getBodyProps:r}=On(),o=ps();return v.jsx(O.div,{...r(t,n),className:W("chakra-popover__body",t.className),__css:o.body})});bD.displayName="PopoverBody";const yD=D(function(t,n){const{onClose:r}=On(),o=ps();return v.jsx(Wi,{size:"sm",onClick:r,className:W("chakra-popover__close-btn",t.className),__css:o.closeButton,ref:n,...t})});yD.displayName="PopoverCloseButton";function vD(e){if(e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}const xD={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},SD=O(Zt.section),Zb=D(function(t,n){const{variants:r=xD,...o}=t,{isOpen:s}=On();return v.jsx(SD,{ref:n,variants:vD(r),initial:!1,animate:s?"enter":"exit",...o})});Zb.displayName="PopoverTransition";const wD=D(function(t,n){const{rootProps:r,motionProps:o,...s}=t,{getPopoverProps:i,getPopoverPositionerProps:a,onAnimationComplete:c}=On(),l=ps(),u={position:"relative",display:"flex",flexDirection:"column",...l.content};return v.jsx(O.div,{...a(r),__css:l.popper,className:"chakra-popover__popper",children:v.jsx(Zb,{...o,...i(s,n),onAnimationComplete:tl(c,s.onAnimationComplete),className:W("chakra-popover__content",t.className),__css:u})})});wD.displayName="PopoverContent";const kD=D(function(t,n){const{getHeaderProps:r}=On(),o=ps();return v.jsx(O.header,{...r(t,n),className:W("chakra-popover__header",t.className),__css:o.header})});kD.displayName="PopoverHeader";function CD(e){const t=f.Children.only(e.children),{getTriggerProps:n}=On();return v.jsx(v.Fragment,{children:f.cloneElement(t,n(t.props,vu(t)))})}CD.displayName="PopoverTrigger";const Jb=D(function(t,n){const{children:r,placeholder:o,className:s,...i}=t;return v.jsxs(O.select,{...i,ref:n,className:W("chakra-select",s),children:[o&&v.jsx("option",{value:"",children:o}),r]})});Jb.displayName="SelectField";const PD=D((e,t)=>{var x;const n=tt("Select",e),{rootProps:r,placeholder:o,icon:s,color:i,height:a,h:c,minH:l,minHeight:u,iconColor:d,iconSize:h,...p}=Ie(e),[m,g]=Wv(p,sx),b=Kl(g),w={width:"100%",height:"fit-content",position:"relative",color:i},y={paddingEnd:"2rem",...n.field,_focus:{zIndex:"unset",...(x=n.field)==null?void 0:x._focus}};return v.jsxs(O.div,{className:"chakra-select__wrapper",__css:w,...m,...r,children:[v.jsx(Jb,{ref:t,height:c!=null?c:a,minH:l!=null?l:u,placeholder:o,...b,__css:y,children:e.children}),v.jsx(Qb,{"data-disabled":ae(b.disabled),...(d||i)&&{color:d||i},__css:n.icon,...h&&{fontSize:h},children:s})]})});PD.displayName="Select";const TD=e=>v.jsx("svg",{viewBox:"0 0 24 24",...e,children:v.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),_D=O("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),Qb=e=>{const{children:t=v.jsx(TD,{}),...n}=e,r=f.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return v.jsx(_D,{...n,className:"chakra-select__icon-wrapper",children:f.isValidElement(t)?r:null})};Qb.displayName="SelectIcon";function sc(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function AD(e){const{orientation:t,thumbPercents:n,isReversed:r}=e,o=p=>({position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...sc({orientation:t,vertical:{bottom:"calc(".concat(n[p],"% - var(--slider-thumb-size) / 2)")},horizontal:{left:"calc(".concat(n[p],"% - var(--slider-thumb-size) / 2)")}})}),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0},i={position:"absolute",...sc({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},a=n.length===1,c=[0,r?100-n[0]:n[0]],l=a?c:n;let u=l[0];!a&&r&&(u=100-u);const d=Math.abs(l[l.length-1]-l[0]),h={...i,...sc({orientation:t,vertical:r?{height:"".concat(d,"%"),top:"".concat(u,"%")}:{height:"".concat(d,"%"),bottom:"".concat(u,"%")},horizontal:r?{width:"".concat(d,"%"),right:"".concat(u,"%")}:{width:"".concat(d,"%"),left:"".concat(u,"%")}})};return{trackStyle:i,innerTrackStyle:h,rootStyle:s,getThumbStyle:o}}function ED(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function ID(e){var Ne;const{min:t=0,max:n=100,onChange:r,value:o,defaultValue:s,isReversed:i,direction:a="ltr",orientation:c="horizontal",id:l,isDisabled:u,isReadOnly:d,onChangeStart:h,onChangeEnd:p,step:m=1,getAriaValueText:g,"aria-valuetext":b,"aria-label":w,"aria-labelledby":y,name:x,focusThumbOnChange:P=!0,...k}=e,A=He(h),T=He(p),E=He(g),I=ED({isReversed:i,direction:a,orientation:c}),[R,M]=np({value:o,defaultValue:s!=null?s:RD(t,n),onChange:r}),[H,K]=f.useState(!1),[V,Y]=f.useState(!1),Z=!(u||d),F=(n-t)/10,j=m||(n-t)/100,U=zs(R,t,n),Se=n-U+t,he=Nu(I?Se:U,t,n),L=c==="vertical",z=ip({min:t,max:n,step:m,isDisabled:u,value:U,isInteractive:Z,isReversed:I,isVertical:L,eventSource:null,focusThumbOnChange:P,orientation:c}),J=f.useRef(null),se=f.useRef(null),ve=f.useRef(null),pe=f.useId(),Me=l!=null?l:pe,[Oe,ce]=["slider-thumb-".concat(Me),"slider-track-".concat(Me)],ie=f.useCallback(B=>{var to,Sn;if(!J.current)return;const X=z.current;X.eventSource="pointer";const st=J.current.getBoundingClientRect(),{clientX:Mt,clientY:ut}=(Sn=(to=B.touches)==null?void 0:to[0])!=null?Sn:B,xn=L?st.bottom-ut:Mt-st.left,Zi=L?st.height:st.width;let cr=xn/Zi;I&&(cr=1-cr);let Fn=jv(cr,X.min,X.max);return X.step&&(Fn=parseFloat(ju(Fn,X.min,X.step))),Fn=zs(Fn,X.min,X.max),Fn},[L,I,z]),le=f.useCallback(B=>{const X=z.current;X.isInteractive&&(B=parseFloat(ju(B,X.min,j)),B=zs(B,X.min,X.max),M(B))},[j,M,z]),me=f.useMemo(()=>({stepUp(B=j){const X=I?U-B:U+B;le(X)},stepDown(B=j){const X=I?U+B:U-B;le(X)},reset(){le(s||0)},stepTo(B){le(B)}}),[le,I,U,j,s]),ee=f.useCallback(B=>{const X=z.current,Mt={ArrowRight:()=>me.stepUp(),ArrowUp:()=>me.stepUp(),ArrowLeft:()=>me.stepDown(),ArrowDown:()=>me.stepDown(),PageUp:()=>me.stepUp(F),PageDown:()=>me.stepDown(F),Home:()=>le(X.min),End:()=>le(X.max)}[B.key];Mt&&(B.preventDefault(),B.stopPropagation(),Mt(B),X.eventSource="keyboard")},[me,le,F,z]),ge=(Ne=E==null?void 0:E(U))!=null?Ne:b,{getThumbStyle:G,rootStyle:ue,trackStyle:de,innerTrackStyle:fe}=f.useMemo(()=>{const B=z.current;return AD({isReversed:I,orientation:B.orientation,thumbPercents:[he]})},[I,he,z]),We=f.useCallback(()=>{z.current.focusThumbOnChange&&setTimeout(()=>{var X;return(X=se.current)==null?void 0:X.focus()})},[z]);pn(()=>{const B=z.current;We(),B.eventSource==="keyboard"&&(T==null||T(B.value))},[U,T]);function Ye(B){const X=ie(B);X!=null&&X!==z.current.value&&M(X)}P0(ve,{onPanSessionStart(B){const X=z.current;X.isInteractive&&(K(!0),We(),Ye(B),A==null||A(X.value))},onPanSessionEnd(){const B=z.current;B.isInteractive&&(K(!1),T==null||T(B.value))},onPan(B){z.current.isInteractive&&Ye(B)}});const Qe=f.useCallback((B={},X=null)=>({...B,...k,ref:Re(X,ve),tabIndex:-1,"aria-disabled":cn(u),"data-focused":ae(V),style:{...B.style,...ue}}),[k,u,V,ue]),yt=f.useCallback((B={},X=null)=>({...B,ref:Re(X,J),id:ce,"data-disabled":ae(u),style:{...B.style,...de}}),[u,ce,de]),Qt=f.useCallback((B={},X=null)=>({...B,ref:X,style:{...B.style,...fe}}),[fe]),yn=f.useCallback((B={},X=null)=>({...B,ref:Re(X,se),role:"slider",tabIndex:Z?0:void 0,id:Oe,"data-active":ae(H),"aria-valuetext":ge,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":U,"aria-orientation":c,"aria-disabled":cn(u),"aria-readonly":cn(d),"aria-label":w,"aria-labelledby":w?void 0:y,style:{...B.style,...G(0)},onKeyDown:Q(B.onKeyDown,ee),onFocus:Q(B.onFocus,()=>Y(!0)),onBlur:Q(B.onBlur,()=>Y(!1))}),[Z,Oe,H,ge,t,n,U,c,u,d,w,y,G,ee]),vn=f.useCallback((B,X=null)=>{const st=!(B.valuen),Mt=U>=B.value,ut=Nu(B.value,t,n),xn={position:"absolute",pointerEvents:"none",...$D({orientation:c,vertical:{bottom:I?"".concat(100-ut,"%"):"".concat(ut,"%")},horizontal:{left:I?"".concat(100-ut,"%"):"".concat(ut,"%")}})};return{...B,ref:X,role:"presentation","aria-hidden":!0,"data-disabled":ae(u),"data-invalid":ae(!st),"data-highlighted":ae(Mt),style:{...B.style,...xn}}},[u,I,n,t,c,U]),N=f.useCallback((B={},X=null)=>({...B,ref:X,type:"hidden",value:U,name:x}),[x,U]);return{state:{value:U,isFocused:V,isDragging:H},actions:me,getRootProps:Qe,getTrackProps:yt,getInnerTrackProps:Qt,getThumbProps:yn,getMarkerProps:vn,getInputProps:N}}function $D(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function RD(e,t){return t"}),[OD,Yi]=Ee({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),FD=D((e,t)=>{var d;const n={...e,orientation:(d=e==null?void 0:e.orientation)!=null?d:"horizontal"},r=tt("Slider",n),o=Ie(n),{direction:s}=cs();o.direction=s;const{getInputProps:i,getRootProps:a,...c}=ID(o),l=a(),u=i({},t);return v.jsx(MD,{value:c,children:v.jsx(OD,{value:r,children:v.jsxs(O.div,{...l,className:W("chakra-slider",n.className),__css:r.container,children:[n.children,v.jsx("input",{...u})]})})})});FD.displayName="Slider";const DD=D((e,t)=>{const{getThumbProps:n}=Xi(),r=Yi(),o=n(e,t);return v.jsx(O.div,{...o,className:W("chakra-slider__thumb",e.className),__css:r.thumb})});DD.displayName="SliderThumb";const ND=D((e,t)=>{const{getTrackProps:n}=Xi(),r=Yi(),o=n(e,t);return v.jsx(O.div,{...o,className:W("chakra-slider__track",e.className),__css:r.track})});ND.displayName="SliderTrack";const jD=D((e,t)=>{const{getInnerTrackProps:n}=Xi(),r=Yi(),o=n(e,t);return v.jsx(O.div,{...o,className:W("chakra-slider__filled-track",e.className),__css:r.filledTrack})});jD.displayName="SliderFilledTrack";const BD=D((e,t)=>{const{getMarkerProps:n}=Xi(),r=Yi(),o=n(e,t);return v.jsx(O.div,{...o,className:W("chakra-slider__marker",e.className),__css:r.mark})});BD.displayName="SliderMark";const LD=O("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});LD.displayName="Spacer";const ey=e=>v.jsx(O.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});ey.displayName="StackItem";function zD(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":Bv(n,o=>r[o])}}const xu=D((e,t)=>{const{isInline:n,direction:r,align:o,justify:s,spacing:i="0.5rem",wrap:a,children:c,divider:l,className:u,shouldWrapChildren:d,...h}=e,p=n?"row":r!=null?r:"column",m=f.useMemo(()=>zD({spacing:i,direction:p}),[i,p]),g=!!l,b=!d&&!g,w=f.useMemo(()=>{const x=nl(c);return b?x:x.map((P,k)=>{const A=typeof P.key<"u"?P.key:k,T=k+1===x.length,I=d?v.jsx(ey,{children:P},A):P;if(!g)return I;const R=f.cloneElement(l,{__css:m}),M=T?null:R;return v.jsxs(f.Fragment,{children:[I,M]},A)})},[l,m,g,b,d,c]),y=W("chakra-stack",u);return v.jsx(O.div,{ref:t,display:"flex",alignItems:o,justifyContent:s,flexDirection:p,flexWrap:a,gap:g?void 0:i,className:y,...h,children:w})});xu.displayName="Stack";const VD=D((e,t)=>v.jsx(xu,{align:"center",...e,direction:"row",ref:t}));VD.displayName="HStack";const WD=e=>v.jsx(O.div,{className:"chakra-stack__divider",...e,__css:{...e.__css,borderWidth:0,alignSelf:"stretch",borderColor:"inherit",width:"auto",height:"auto"}});WD.displayName="StackDivider";const HD=D((e,t)=>v.jsx(xu,{align:"center",...e,direction:"column",ref:t}));HD.displayName="VStack";const UD=D(function(t,n){const r=tt("Switch",t),{spacing:o="0.5rem",children:s,...i}=Ie(t),{getIndicatorProps:a,getInputProps:c,getCheckboxProps:l,getRootProps:u,getLabelProps:d}=Bg(i),h=f.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),p=f.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),m=f.useMemo(()=>({userSelect:"none",marginStart:o,...r.label}),[o,r.label]);return v.jsxs(O.label,{...u(),className:W("chakra-switch",t.className),__css:h,children:[v.jsx("input",{className:"chakra-switch__input",...c({},n)}),v.jsx(O.span,{...l(),className:"chakra-switch__track",__css:p,children:v.jsx(O.span,{__css:r.thumb,className:"chakra-switch__thumb",...a()})}),s&&v.jsx(O.span,{className:"chakra-switch__label",...d(),__css:m,children:s})]})});UD.displayName="Switch";const[GD,ms]=Ee({name:"TableStylesContext",errorMessage:"useTableStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),qD=D((e,t)=>{const n=tt("Table",e),{className:r,layout:o,...s}=Ie(e);return v.jsx(GD,{value:n,children:v.jsx(O.table,{ref:t,__css:{tableLayout:o,...n.table},className:W("chakra-table",r),...s})})});qD.displayName="Table";const EN=D((e,t)=>{const n=ms();return v.jsx(O.tbody,{...e,ref:t,__css:n.tbody})}),IN=D(({isNumeric:e,...t},n)=>{const r=ms();return v.jsx(O.td,{...t,ref:n,__css:r.td,"data-is-numeric":e})}),$N=D(({isNumeric:e,...t},n)=>{const r=ms();return v.jsx(O.th,{...t,ref:n,__css:r.th,"data-is-numeric":e})}),RN=D((e,t)=>{const n=ms();return v.jsx(O.thead,{...e,ref:t,__css:n.thead})}),MN=D((e,t)=>{const n=ms();return v.jsx(O.tr,{...e,ref:t,__css:n.tr})}),[KD,ty]=Ee({name:"TagStylesContext",errorMessage:"useTagStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),XD=D((e,t)=>{const n=tt("Tag",e),r=Ie(e),o={display:"inline-flex",verticalAlign:"top",alignItems:"center",maxWidth:"100%",...n.container};return v.jsx(KD,{value:n,children:v.jsx(O.span,{ref:t,...r,__css:o})})});XD.displayName="Tag";const YD=D((e,t)=>{const n=ty();return v.jsx(O.span,{ref:t,noOfLines:1,...e,__css:n.label})});YD.displayName="TagLabel";const ZD=D((e,t)=>v.jsx(Pt,{ref:t,verticalAlign:"top",marginEnd:"0.5rem",...e}));ZD.displayName="TagLeftIcon";const JD=D((e,t)=>v.jsx(Pt,{ref:t,verticalAlign:"top",marginStart:"0.5rem",...e}));JD.displayName="TagRightIcon";const ny=e=>v.jsx(Pt,{verticalAlign:"inherit",viewBox:"0 0 512 512",...e,children:v.jsx("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})});ny.displayName="TagCloseIcon";const QD=D((e,t)=>{const{isDisabled:n,children:r,...o}=e,i={display:"flex",alignItems:"center",justifyContent:"center",outline:"0",...ty().closeButton};return v.jsx(O.button,{ref:t,"aria-label":"close",...o,type:"button",disabled:n,__css:i,children:r||v.jsx(ny,{})})});QD.displayName="TagCloseButton";const eN=["h","minH","height","minHeight"],tN=D((e,t)=>{const n=Ct("Textarea",e),{className:r,rows:o,...s}=Ie(e),i=Kl(s),a=o?Yr(n,eN):n;return v.jsx(O.textarea,{ref:t,rows:o,...i,className:W("chakra-textarea",r),__css:a})});tN.displayName="Textarea";function nN(e,t){var s;const n=e!=null?e:"bottom",o={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return(s=o==null?void 0:o[t])!=null?s:n}function rN(e,t){const n=o=>{var s;return{...t,...o,position:nN((s=o==null?void 0:o.position)!=null?s:t==null?void 0:t.position,e)}},r=o=>{const s=n(o),i=Eg(s);return Ht.notify(i,s)};return r.update=(o,s)=>{Ht.update(o,n(s))},r.promise=(o,s)=>{const i=r({...s.loading,status:"loading",duration:null});o.then(a=>r.update(i,{status:"success",duration:5e3,...ht(s.success,a)})).catch(a=>r.update(i,{status:"error",duration:5e3,...ht(s.error,a)}))},r.closeAll=Ht.closeAll,r.close=Ht.close,r.isActive=Ht.isActive,r}function ON(e){const{theme:t}=wg(),n=Q$();return f.useMemo(()=>rN(t.direction,{...n,...e}),[e,t.direction,n])}const oN={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}},Qc=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},si=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function sN(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:o,closeOnScroll:s,closeOnPointerDown:i=o,closeOnEsc:a=!0,onOpen:c,onClose:l,placement:u,id:d,isOpen:h,defaultIsOpen:p,arrowSize:m=10,arrowShadowColor:g,arrowPadding:b,modifiers:w,isDisabled:y,gutter:x,offset:P,direction:k,...A}=e,{isOpen:T,onOpen:E,onClose:I}=ol({isOpen:h,defaultIsOpen:p,onOpen:c,onClose:l}),{referenceRef:R,getPopperProps:M,getArrowInnerProps:H,getArrowProps:K}=bu({enabled:T,placement:u,arrowPadding:b,modifiers:w,gutter:x,offset:P,direction:k}),V=f.useId(),Y=d!=null?d:V,Z="tooltip-".concat(Y),F=f.useRef(null),j=f.useRef(),U=f.useCallback(()=>{j.current&&(clearTimeout(j.current),j.current=void 0)},[]),Se=f.useRef(),re=f.useCallback(()=>{Se.current&&(clearTimeout(Se.current),Se.current=void 0)},[]),he=f.useCallback(()=>{re(),I()},[I,re]),L=iN(F,he),z=f.useCallback(()=>{if(!y&&!j.current){T&&L();const ie=si(F);j.current=ie.setTimeout(E,t)}},[L,y,T,E,t]),J=f.useCallback(()=>{U();const ie=si(F);Se.current=ie.setTimeout(he,n)},[n,he,U]),se=f.useCallback(()=>{T&&r&&J()},[r,J,T]),ve=f.useCallback(()=>{T&&i&&J()},[i,J,T]),pe=f.useCallback(ie=>{T&&ie.key==="Escape"&&J()},[T,J]);Un(()=>Qc(F),"keydown",a?pe:void 0),Un(()=>{if(!s)return null;const ie=F.current;if(!ie)return null;const le=ep(ie);return le.localName==="body"?si(F):le},"scroll",()=>{T&&s&&he()},{passive:!0,capture:!0}),f.useEffect(()=>{y&&(U(),T&&I())},[y,T,I,U]),f.useEffect(()=>()=>{U(),re()},[U,re]),Un(()=>F.current,"pointerleave",J);const Me=f.useCallback((ie={},le=null)=>({...ie,ref:Re(F,le,R),onPointerEnter:Q(ie.onPointerEnter,ee=>{ee.pointerType!=="touch"&&z()}),onClick:Q(ie.onClick,se),onPointerDown:Q(ie.onPointerDown,ve),onFocus:Q(ie.onFocus,z),onBlur:Q(ie.onBlur,J),"aria-describedby":T?Z:void 0}),[z,J,ve,T,Z,se,R]),Oe=f.useCallback((ie={},le=null)=>M({...ie,style:{...ie.style,[Xe.arrowSize.var]:m?"".concat(m,"px"):void 0,[Xe.arrowShadowColor.var]:g}},le),[M,m,g]),ce=f.useCallback((ie={},le=null)=>{const me={...ie.style,position:"relative",transformOrigin:Xe.transformOrigin.varRef};return{ref:le,...A,...ie,id:Z,role:"tooltip",style:me}},[A,Z]);return{isOpen:T,show:z,hide:J,getTriggerProps:Me,getTooltipProps:ce,getTooltipPositionerProps:Oe,getArrowProps:K,getArrowInnerProps:H}}const ic="chakra-ui:close-tooltip";function iN(e,t){return f.useEffect(()=>{const n=Qc(e);return n.addEventListener(ic,t),()=>n.removeEventListener(ic,t)},[t,e]),()=>{const n=Qc(e),r=si(e);n.dispatchEvent(new r.CustomEvent(ic))}}const aN=O(Zt.div),cN=D((e,t)=>{var R,M;const n=Ct("Tooltip",e),r=Ie(e),o=cs(),{children:s,label:i,shouldWrapChildren:a,"aria-label":c,hasArrow:l,bg:u,portalProps:d,background:h,backgroundColor:p,bgColor:m,motionProps:g,animatePresenceProps:b,...w}=r,y=(M=(R=h!=null?h:p)!=null?R:u)!=null?M:m;if(y){n.bg=y;const H=mx(o,"colors",y);n[Xe.arrowBg.var]=H}const x=sN({...w,direction:o.direction}),P=!f.isValidElement(s)||a;let k;if(P)k=v.jsx(O.span,{display:"inline-block",tabIndex:0,...x.getTriggerProps(),children:s});else{const H=f.Children.only(s);k=f.cloneElement(H,x.getTriggerProps(H.props,vu(H)))}const A=!!c,T=x.getTooltipProps({},t),E=A?Yr(T,["role","id"]):T,I=Qh(T,["role","id"]);return i?v.jsxs(v.Fragment,{children:[k,v.jsx(ar,{...b,children:x.isOpen&&v.jsx(Jr,{...d,children:v.jsx(O.div,{...x.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"},children:v.jsxs(aN,{variants:oN,initial:"exit",animate:"enter",exit:"exit",...g,...E,__css:n,children:[i,A&&v.jsx(O.span,{srOnly:!0,...I,children:c}),l&&v.jsx(O.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:v.jsx(O.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}})})]})})})})]}):v.jsx(v.Fragment,{children:s})});cN.displayName="Tooltip";const lN=D(function(t,n){const r=Ct("Heading",t),{className:o,...s}=Ie(t);return v.jsx(O.h2,{ref:n,className:W("chakra-heading",t.className),...s,__css:r})});lN.displayName="Heading";const uN=D(function(t,n){const r=Ct("Text",t),{className:o,align:s,decoration:i,casing:a,...c}=Ie(t),l=Jo({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return v.jsx(O.p,{ref:n,className:W("chakra-text",t.className),...l,...c,__css:r})});uN.displayName="Text";const dN=D(function(t,n){const{spacing:r="0.5rem",spacingX:o,spacingY:s,children:i,justify:a,direction:c,align:l,className:u,shouldWrapChildren:d,...h}=t,p=f.useMemo(()=>d?f.Children.map(i,(m,g)=>v.jsx(ry,{children:m},g)):i,[i,d]);return v.jsx(O.div,{ref:n,className:W("chakra-wrap",u),...h,children:v.jsx(O.ul,{className:"chakra-wrap__list",__css:{display:"flex",flexWrap:"wrap",justifyContent:a,alignItems:l,flexDirection:c,listStyleType:"none",gap:r,columnGap:o,rowGap:s,padding:"0"},children:p})})});dN.displayName="Wrap";const ry=D(function(t,n){const{className:r,...o}=t;return v.jsx(O.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:W("chakra-wrap__listitem",r),...o})});ry.displayName="WrapItem";var oy={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ph=et.createContext&&et.createContext(oy),fN=["attr","size","title"];function hN(e,t){if(e==null)return{};var n=pN(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pN(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Si(){return Si=Object.assign?Object.assign.bind():function(e){for(var t=1;tet.createElement(t.tag,wi({key:n},t.attr),sy(t.child)))}function FN(e){return t=>et.createElement(yN,Si({attr:wi({},e.attr)},t),sy(e.child))}function yN(e){var t=n=>{var{attr:r,size:o,title:s}=e,i=hN(e,fN),a=o||n.size||"1em",c;return n.className&&(c=n.className),e.className&&(c=(c?c+" ":"")+e.className),et.createElement("svg",Si({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,i,{className:c,style:wi(wi({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&et.createElement("title",null,s),e.children)};return ph!==void 0?et.createElement(ph.Consumer,null,n=>t(n)):t(oy)}export{B2 as $,kD as A,RR as B,LR as C,mM as D,bD as E,vb as F,_N as G,AN as H,U2 as I,UF as J,WF as K,VF as L,XF as M,uN as N,HF as O,Jr as P,SN as Q,K2 as R,zl as S,XD as T,Pg as U,Tg as V,ry as W,_g as X,Ag as Y,oM as Z,z2 as _,ap as a,sM as a0,PD as a1,BR as a2,FD as a3,ND as a4,jD as a5,DD as a6,UD as a7,Wi as a8,at as a9,MN as aA,$N as aB,EN as aC,IN as aD,q2 as aE,WD as aF,yR as aG,SR as aH,vR as aI,xR as aJ,CR as aK,ph as aL,LD as aM,iD as aN,cD as aO,$p as aa,TN as ab,kN as ac,Fi as ad,cs as ae,FN as af,Bb as ag,Kb as ah,V2 as ai,lN as aj,HD as ak,IR as al,xu as am,Y2 as an,J2 as ao,Pt as ap,B5 as aq,z5 as ar,G5 as as,W5 as at,pM as au,VD as av,ON as aw,cN as ax,qD as ay,RN as az,YD as b,O as c,QD as d,pD as e,D as f,l0 as g,vM as h,tt as i,v as j,dN as k,mD as l,wD as m,ol as n,np as o,pn as p,Sb as q,kb as r,jR as s,Ng as t,Ct as u,tN as v,CD as w,$R as x,gD as y,yD as z}; diff --git a/assets/chakra-legacy-CS5U_L30.js b/assets/chakra-legacy-CS5U_L30.js new file mode 100644 index 00000000..b50b6b2f --- /dev/null +++ b/assets/chakra-legacy-CS5U_L30.js @@ -0,0 +1,280 @@ +!function(){let e,t,n=e=>e;const r=["__cssMap","__cssVars","__breakpoints"],o=["attrX","attrY","attrScale","originX","originY","pathLength","pathSpacing","pathOffset"],i=["transitionEnd","transition"],a=["root"],s=["keyframes","restDelta","restSpeed"],l=["autoplay","delay","driver","keyframes","type","repeat","repeatDelay","repeatType","onPlay","onStop","onComplete","onUpdate"],c=["onUpdate","onComplete"],u=["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"],d=["transitionEnd","transition"],p=["transition","transitionEnd"],f=["transition","transitionEnd"],h=["willChange"],m=["children"],v=["transition","transitionEnd"],g=["theme","css","__css","sx"],b=["baseStyle"],y=["children"],x=["styleConfig"],w=["as","viewBox","color","focusable","children","className","__css"],k=["label","thickness","speed","emptyColor","className"],S=["status","addRole"],C=["children","isDisabled","__css"],_=["containerRef"],E=["children","theme","toastOptions"],P=["onChange","defaultIndex","index","allowMultiple","allowToggle"],j=["isDisabled","isFocusable","id"],T=["children","reduceMotion"],A=["htmlProps","descendants"],O=["htmlProps"],R=["in","unmountOnExit","animateOpacity","startingHeight","endingHeight","style","className","transition","transitionEnd","animatePresenceProps"],M=["className","motionProps"],N=["name","getInitials"],I=["src","srcSet","name","showBorder","borderRadius","onError","onLoad","getInitials","icon","iconLabel","loading","children","borderColor","ignoreFallback","crossOrigin","referrerPolicy"],D=["className"],z=["children","className"],B=["label","placement","spacing","children","className","__css"],F=["isDisabled","isLoading","isActive","children","leftIcon","rightIcon","loadingText","iconSpacing","type","spinner","spinnerPlacement","className","as","shouldWrapChildren"],L=["size","colorScheme","variant","className","spacing","isAttached","isDisabled","orientation"],$=["icon","children","isRound","aria-label"],V=["axis"],W=["isIndeterminate","isChecked"],H=["id","isRequired","isInvalid","isDisabled","isReadOnly"],U=["getRootProps"],q=["isDisabled","isInvalid","isReadOnly","isRequired"],Y=["id","disabled","readOnly","required","isRequired","isInvalid","isReadOnly","isDisabled","onFocus","onBlur"],X=["defaultChecked","isChecked","isFocusable","onChange","isIndeterminate","name","value","tabIndex","aria-label","aria-labelledby","aria-invalid"],G=["spacing","className","children","iconColor","iconSize","icon","isChecked","isDisabled","onChange","inputProps"],K=["borderLeftWidth","borderBottomWidth","borderTopWidth","borderRightWidth","borderWidth","borderStyle","borderColor"],Z=["className","orientation","__css"],J=["direction","align","justify","wrap","basis","grow","shrink"],Q=["className","children","requiredIndicator","optionalIndicator"],ee=["htmlWidth","htmlHeight","alt"],te=["fallbackSrc","fallback","src","srcSet","align","fit","loading","ignoreFallback","crossOrigin","fallbackStrategy","referrerPolicy"],ne=["htmlSize"],re=["children","className"],oe=["placement"],ie=["className"],ae=["className"],se=["className"],le=["className","isExternal"],ce=["children","styleType","stylePosition","spacing"],ue=["as"],de=["as"],pe=["size","shadowColor","bg","style"],fe=["ref","isDisabled","isFocusable","clickOnEnter","clickOnSpace","onMouseDown","onMouseUp","onClick","onKeyDown","onKeyUp","tabIndex","onMouseOver","onMouseLeave"],he=["id","closeOnSelect","closeOnBlur","initialFocusRef","autoSelect","isLazy","isOpen","defaultIsOpen","onClose","onOpen","placement","lazyBehavior","direction","computePositionOnMount"],me=["onMouseEnter","onMouseMove","onMouseLeave","onClick","onFocus","isDisabled","isFocusable","closeOnSelect","type"],ve=["descendants"],ge=["children","as"],be=["className","children"],ye=["type"],xe=["icon","iconSpacing","command","commandSpacing","children"],we=["rootProps","motionProps"],ke=["unmountOnExit","in","reverse","className","offsetX","offsetY","transition","transitionEnd","delay","animatePresenceProps"],Se=["unmountOnExit","in","reverse","initialScale","className","transition","transitionEnd","delay","animatePresenceProps"],Ce=["preset","motionProps"],_e=["className","children","containerProps","motionProps"],Ee=["className"],Pe=["onClick","className"],je=["className"],Te=["className"],Ae=["unmountOnExit","in","className","transition","transitionEnd","delay","animatePresenceProps"],Oe=["className","transition","motionProps"],Re=["leastDestructiveRef"],Me=["focusInputOnChange","clampValueOnBlur","keepWithinRange","min","max","step","isReadOnly","isDisabled","isRequired","isInvalid","pattern","inputMode","allowMouseWheel","id","onChange","precision","name","aria-describedby","aria-label","aria-labelledby","onFocus","onBlur","onInvalid","getAriaValueText","isValidCharacter","format","parse"],Ne=["htmlProps"],Ie=["closeOnBlur","closeOnEsc","initialFocusRef","id","returnFocusOnClose","autoFocus","arrowSize","arrowShadowColor","trigger","openDelay","closeDelay","isLazy","lazyBehavior","computePositionOnMount"],De=["children"],ze=["bg","bgColor","backgroundColor","shadow","boxShadow","shadowColor"],Be=["variants"],Fe=["rootProps","motionProps"],Le=["children","placeholder","className"],$e=["rootProps","placeholder","icon","color","height","h","minH","minHeight","iconColor","iconSize"],Ve=["children"],We=["min","max","onChange","value","defaultValue","isReversed","direction","orientation","id","isDisabled","isReadOnly","onChangeStart","onChangeEnd","step","getAriaValueText","aria-valuetext","aria-label","aria-labelledby","name","focusThumbOnChange"],He=["getInputProps","getRootProps"],Ue=["isInline","direction","align","justify","spacing","wrap","children","divider","className","shouldWrapChildren"],qe=["spacing","children"],Ye=["className","layout"],Xe=["isNumeric"],Ge=["isNumeric"],Ke=["isDisabled","children"],Ze=["className","rows"],Je=["openDelay","closeDelay","closeOnClick","closeOnMouseDown","closeOnScroll","closeOnPointerDown","closeOnEsc","onOpen","onClose","placement","id","isOpen","defaultIsOpen","arrowSize","arrowShadowColor","arrowPadding","modifiers","isDisabled","gutter","offset","direction"],Qe=["children","label","shouldWrapChildren","aria-label","hasArrow","bg","portalProps","background","backgroundColor","bgColor","motionProps","animatePresenceProps"],et=["className"],tt=["className","align","decoration","casing"],nt=["spacing","spacingX","spacingY","children","justify","direction","align","className","shouldWrapChildren"],rt=["className"];function ot(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r{lt=e.r,ct=e.a,ut=e.c,dt=e.g,pt=e.R,ft=e.b,ht=e.d}],execute:function(){var st,mt,vt,gt,bt,yt,xt,wt,kt,St,Ct,_t,Et,Pt,jt,Tt,At,Ot,Rt,Mt,Nt,It,Dt,zt;it({G:function(e){const{leastDestructiveRef:t}=e,n=ot(e,Re);return Vt.jsx(QP,at(at({},n),{},{initialFocusRef:t}))},P:Pw,Q:function(e,t){const{colorMode:n}=Up();return"dark"===n?t:e},V:pw,a:ar,aJ:Qw,ad:Up,ae:Kx,af:function(e){return t=>ft.createElement(IA,AA({attr:RA({},e.attr)},t),NA(e.child))},aw:function(e){const{theme:t}=Zx(),n=Tw();return ct.useMemo((()=>function(e,t){const n=n=>{var r;return at(at(at({},t),n),{},{position:hA(null!==(r=null==n?void 0:n.position)&&void 0!==r?r:null==t?void 0:t.position,e)})},r=e=>{const t=n(e),r=bw(t);return yw.notify(r,t)};return r.update=(e,t)=>{yw.update(e,n(t))},r.promise=(e,t)=>{const n=r(at(at({},t.loading),{},{status:"loading",duration:null}));e.then((e=>r.update(n,at({status:"success",duration:5e3},Rn(t.success,e))))).catch((e=>r.update(n,at({status:"error",duration:5e3},Rn(t.error,e)))))},r.closeAll=yw.closeAll,r.close=yw.close,r.isActive=yw.isActive,r}(t.direction,at(at({},n),e))),[e,t.direction,n])},e:CT,f:Ux,g:ir,i:ew,l:ET,n:Yn,o:Wn,u:Qx,w:zT,y:jT});var Bt,Ft,Lt={exports:{}},$t={};var Vt=it("j",(Ft||(Ft=1,Lt.exports=function(){if(Bt)return $t;Bt=1;var e=lt(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,a){var s,l={},c=null,u=null;for(s in void 0!==a&&(c=""+a),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(u=n.ref),n)r.call(n,s)&&!i.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:c,ref:u,props:l,_owner:o.current}}return $t.Fragment=n,$t.jsx=a,$t.jsxs=a,$t}()),Lt.exports));function Wt(e){return null!=e&&"object"==typeof e&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Ht(e){return!(!e.parentElement||!Ht(e.parentElement))||e.hidden}function Ut(e){return Wt(e)?e.ownerDocument:document}function qt(e){const t=function(e){var t;return null!==(t=e.view)&&void 0!==t?t:window}(e);return void 0!==t.PointerEvent&&e instanceof t.PointerEvent?!("mouse"!==e.pointerType):e instanceof t.MouseEvent}function Yt(e){return!!e.touches}function Xt(e,t="page"){return Yt(e)?function(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}(e,t):function(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}(e,t)}function Gt(e,t=!1){function n(t){e(t,{point:Xt(t)})}const r=t?function(e){return t=>{const n=qt(t);(!n||n&&0===t.button)&&e(t)}}(n):n;return r}function Kt(e,t,n,r){return function(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}(e,t,Gt(n,"pointerdown"===t),r)}const Zt=e=>e?"":void 0,Jt=e=>!!e||void 0;function Qt(e){return Array.isArray(e)}function en(e){const t=typeof e;return null!=e&&("object"===t||"function"===t)&&!Qt(e)}function tn(e){const t=null==e?0:e.length;return t?e[t-1]:void 0}function nn(e){if(null==e)return e;const{unitless:t}=function(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}(e);return t||"number"==typeof e?`${e}px`:e}const rn=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,on=e=>Object.fromEntries(Object.entries(e).sort(rn));function an(e){const t=on(e);return Object.assign(Object.values(t),t)}function sn(e){var t;if(!e)return e;e=null!==(t=nn(e))&&void 0!==t?t:e;return"number"==typeof e?`${e+-.02}`:e.replace(/([0-9]+\.?[0-9]*)/,(e=>`${parseFloat(e)+-.02}`))}function ln(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${nn(e)})`),t&&n.push("and",`(max-width: ${nn(t)})`),n.join(" ")}function cn(e){var t;if(!e)return null;e.base=null!==(t=e.base)&&void 0!==t?t:"0px";const n=an(e),r=Object.entries(e).sort(rn).map((([e,t],n,r)=>{var o;let[,i]=null!==(o=r[n+1])&&void 0!==o?o:[];return i=parseFloat(i)>0?sn(i):void 0,{_minW:sn(t),breakpoint:e,minW:t,maxW:i,maxWQuery:ln(null,i),minWQuery:ln(t),minMaxQuery:ln(t,i)}})),o=function(e){const t=Object.keys(on(e));return new Set(t)}(e),i=Array.from(o.values());return{keys:o,normalized:n,isResponsive(e){const t=Object.keys(e);return t.length>0&&t.every((e=>o.has(e)))},asObject:on(e),asArray:an(e),details:r,get:e=>r.find((t=>t.breakpoint===e)),media:[null,...n.map((e=>ln(e))).slice(1)],toArrayValue(e){if(!en(e))throw new Error("toArrayValue: value must be an object");const t=i.map((t=>{var n;return null!==(n=e[t])&&void 0!==n?n:null}));for(;null===tn(t);)t.pop();return t},toObjectValue(e){if(!Array.isArray(e))throw new Error("toObjectValue: value must be an array");return e.reduce(((e,t,n)=>{const r=i[n];return null!=r&&null!=t&&(e[r]=t),e}),{})}}}function un(...e){return function(...t){e.forEach((e=>null==e?void 0:e(...t)))}}function dn(...e){return function(t){e.some((e=>(null==e||e(t),null==t?void 0:t.defaultPrevented)))}}function pn(e){return ct.Children.toArray(e).filter((e=>ct.isValidElement(e)))}function fn(e){const t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}function hn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:i,defaultValue:a}=e,s=ct.createContext(a);return s.displayName=t,[s.Provider,function e(){const t=ct.useContext(s);if(!t&&n){var a;const t=new Error(null!=i?i:`${r} returned \`undefined\`. Seems you forgot to wrap component within ${o}`);throw t.name="ContextError",null===(a=Error.captureStackTrace)||void 0===a||a.call(Error,t,e),t}return t},s]}const mn=(...e)=>e.filter(Boolean).join(" "),vn=e=>e.hasAttribute("tabindex"),gn=e=>vn(e)&&-1===e.tabIndex;function bn(e){if(!Wt(e)||Ht(e)||function(e){return!0===Boolean(e.getAttribute("disabled"))||!0===Boolean(e.getAttribute("aria-disabled"))}(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const n={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in n?n[t]():!!function(e){const t=e.getAttribute("contenteditable");return"false"!==t&&null!=t}(e)||vn(e)}const yn=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"].join(),xn=e=>e.offsetWidth>0&&e.offsetHeight>0;function wn(e){const t=Array.from(e.querySelectorAll(yn));return t.unshift(e),t.filter((e=>bn(e)&&xn(e)))}const kn=(e=>{const t=new WeakMap;return(n,r,o,i)=>{if(void 0===n)return e(n,r,o);t.has(n)||t.set(n,new Map);const a=t.get(n);if(a.has(r))return a.get(r);const s=e(n,r,o,i);return a.set(r,s),s}})((function(e,t,n,r){const o="string"==typeof t?t.split("."):[t];for(r=0;r"function"==typeof e;function Rn(e,...t){return On(e)?e(...t):e}function Mn(e){return["html","body","#document"].includes(e.localName)?e.ownerDocument.body:Wt(e)&&function(e){const t=e.ownerDocument.defaultView||window,{overflow:n,overflowX:r,overflowY:o}=t.getComputedStyle(e);return/auto|scroll|overlay|hidden/.test(n+o+r)}(e)?e:Mn(function(e){return"html"===e.localName?e:e.assignedSlot||e.parentElement||e.ownerDocument.documentElement}(e))}function Nn(e,t,n={}){const{stop:r,getKey:o}=n;return function e(n,i=[]){if(en(n)||Array.isArray(n)){const s={};for(const[l,c]of Object.entries(n)){var a;const u=null!==(a=null==o?void 0:o(l))&&void 0!==a?a:l,d=[...i,u];if(null!=r&&r(n,d))return t(n,i);s[u]=e(c,d)}return s}return t(n,i)}(e)}const In=e=>{const{condition:t,message:n}=e};var Dn,zn={exports:{}};var Bn=(Dn||(Dn=1,function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",l="[object Null]",c="[object Object]",u="[object Proxy]",d="[object Undefined]",p=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,h={};h["[object Float32Array]"]=h["[object Float64Array]"]=h["[object Int8Array]"]=h["[object Int16Array]"]=h["[object Int32Array]"]=h["[object Uint8Array]"]=h["[object Uint8ClampedArray]"]=h["[object Uint16Array]"]=h["[object Uint32Array]"]=!0,h[o]=h["[object Array]"]=h["[object ArrayBuffer]"]=h["[object Boolean]"]=h["[object DataView]"]=h["[object Date]"]=h["[object Error]"]=h[a]=h["[object Map]"]=h["[object Number]"]=h[c]=h["[object RegExp]"]=h["[object Set]"]=h["[object String]"]=h["[object WeakMap]"]=!1;var m,v="object"==typeof ut&&ut&&ut.Object===Object&&ut,g="object"==typeof self&&self&&self.Object===Object&&self,b=v||g||Function("return this")(),y=t&&!t.nodeType&&t,x=y&&e&&!e.nodeType&&e,w=x&&x.exports===y,k=w&&v.process,S=function(){try{var e=x&&x.require&&x.require("util").types;return e||k&&k.binding&&k.binding("util")}catch(t){}}(),C=S&&S.isTypedArray,_=Array.prototype,E=Function.prototype,P=Object.prototype,j=b["__core-js_shared__"],T=E.toString,A=P.hasOwnProperty,O=(m=/[^.]+$/.exec(j&&j.keys&&j.keys.IE_PROTO||""))?"Symbol(src)_1."+m:"",R=P.toString,M=T.call(Object),N=RegExp("^"+T.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),I=w?b.Buffer:void 0,D=b.Symbol,z=b.Uint8Array;I&&I.allocUnsafe;var B=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object),F=Object.create,L=P.propertyIsEnumerable,$=_.splice,V=D?D.toStringTag:void 0,W=function(){try{var e=he(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),H=I?I.isBuffer:void 0,U=Math.max,q=Date.now,Y=he(b,"Map"),X=he(Object,"create"),G=function(){function e(){}return function(t){if(!Te(t))return{};if(F)return F(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function K(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},Z.prototype.set=function(e,t){var n=this.__data__,r=re(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},J.prototype.clear=function(){this.size=0,this.__data__={hash:new K,map:new(Y||Z),string:new K}},J.prototype.delete=function(e){var t=fe(this,e).delete(e);return this.size-=t?1:0,t},J.prototype.get=function(e){return fe(this,e).get(e)},J.prototype.has=function(e){return fe(this,e).has(e)},J.prototype.set=function(e,t){var n=fe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Q.prototype.clear=function(){this.__data__=new Z,this.size=0},Q.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Q.prototype.get=function(e){return this.__data__.get(e)},Q.prototype.has=function(e){return this.__data__.has(e)},Q.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Z){var r=n.__data__;if(!Y||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new J(r)}return n.set(e,t),this.size=n.size,this};var ie=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}return e};function ae(e){return null==e?void 0===e?d:l:V&&V in Object(e)?function(e){var t=A.call(e,V),n=e[V];try{e[V]=void 0;var r=!0}catch(i){}var o=R.call(e);return r&&(t?e[V]=n:delete e[V]),o}(e):function(e){return R.call(e)}(e)}function se(e){return Ae(e)&&ae(e)==o}function le(e){return!(!Te(e)||(t=e,O&&O in t))&&(Pe(e)?N:p).test(function(e){if(null!=e){try{return T.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e));var t}function ce(e){if(!Te(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ve(e),n=[];for(var r in e)("constructor"!=r||!t&&A.call(e,r))&&n.push(r);return n}function ue(e,t,n,r,o){e!==t&&ie(t,(function(i,a){if(o||(o=new Q),Te(i))!function(e,t,n,r,o,i,a){var s=ge(e,n),l=ge(t,n),u=a.get(l);if(u)te(e,n,u);else{var d,p=i?i(s,l,n+"",e,t,a):void 0,f=void 0===p;if(f){var h=Ce(l),m=!h&&Ee(l),v=!h&&!m&&Oe(l);p=l,h||m||v?Ce(s)?p=s:Ae(d=s)&&_e(d)?p=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n-1&&e%1==0&&e0){if(++ye>=800)return arguments[0]}else ye=0;return be.apply(void 0,arguments)});function ke(e,t){return e===t||e!=e&&t!=t}var Se=se(function(){return arguments}())?se:function(e){return Ae(e)&&A.call(e,"callee")&&!L.call(e,"callee")},Ce=Array.isArray;function _e(e){return null!=e&&je(e.length)&&!Pe(e)}var Ee=H||function(){return!1};function Pe(e){if(!Te(e))return!1;var t=ae(e);return t==a||t==s||t==i||t==u}function je(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Te(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ae(e){return null!=e&&"object"==typeof e}var Oe=C?function(e){return function(t){return e(t)}}(C):function(e){return Ae(e)&&je(e.length)&&!!h[ae(e)]};function Re(e){return _e(e)?ee(e):ce(e)}var Me,Ne=(Me=function(e,t,n,r){ue(e,t,n,r)},de((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=Me.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!Te(n))return!1;var r=typeof t;return!!("number"==r?_e(n)&&me(t,n.length):"string"==r&&t in n)&&ke(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n{n.current=e})),ct.useCallback(((...e)=>{var t;return null===(t=n.current)||void 0===t?void 0:t.call(n,...e)}),t)}function $n(e,t,n,r){const o=Ln(n);return ct.useEffect((()=>{const i="function"==typeof e?e():null!=e?e:document;if(n&&i)return i.addEventListener(t,o,r),()=>{i.removeEventListener(t,o,r)}}),[t,e,r,o,n]),()=>{const n="function"==typeof e?e():null!=e?e:document;null==n||n.removeEventListener(t,o,r)}}function Vn(e){const{isOpen:t,ref:n}=e,[r,o]=ct.useState(t),[i,a]=ct.useState(!1);ct.useEffect((()=>{i||(o(t),a(!0))}),[t,i,r]),$n((()=>n.current),"animationend",(()=>{o(t)}));return{present:!(!t&&!r),onComplete(){var e;const t=function(e){var t,n;return null!==(t=null===(n=Ut(e))||void 0===n?void 0:n.defaultView)&&void 0!==t?t:window}(n.current),r=new t.CustomEvent("animationend",{bubbles:!0});null===(e=n.current)||void 0===e||e.dispatchEvent(r)}}}function Wn(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:o=((e,t)=>e!==t)}=e,i=Ln(r),a=Ln(o),[s,l]=ct.useState(n),c=void 0!==t,u=c?t:s,d=Ln((e=>{const t="function"==typeof e?e(u):e;a(u,t)&&(c||l(t),i(t))}),[c,i,u,a]);return[u,d]}function Hn(e){return parseFloat(e.toString().replace(/[^\w.-]+/g,""))}function Un(e,t){return Math.max(_n(t),_n(e))}function qn(e,t,n){const r=Hn(e);if(Number.isNaN(r))return;const o=Un(r,t);return Cn(r,null!=n?n:o)}function Yn(e={}){const{onClose:t,onOpen:n,isOpen:r,id:o}=e,i=Ln(n),a=Ln(t),[s,l]=ct.useState(e.defaultIsOpen||!1),c=void 0!==r?r:s,u=void 0!==r,d=ct.useId(),p=null!=o?o:`disclosure-${d}`,f=ct.useCallback((()=>{u||l(!1),null==a||a()}),[u,a]),h=ct.useCallback((()=>{u||l(!0),null==i||i()}),[u,i]),m=ct.useCallback((()=>{c?f():h()}),[c,h,f]);return{isOpen:c,onOpen:h,onClose:f,onToggle:m,isControlled:u,getButtonProps:function(e={}){return at(at({},e),{},{"aria-expanded":c,"aria-controls":p,onClick(t){var n;null===(n=e.onClick)||void 0===n||n.call(e,t),m()}})},getDisclosureProps:function(e={}){return at(at({},e),{},{hidden:!c,id:p})}}}const Xn=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?ct.useLayoutEffect:ct.useEffect,Gn=it("p",((e,t)=>{const n=ct.useRef(!1),r=ct.useRef(!1);ct.useEffect((()=>{if(n.current&&r.current)return e();r.current=!0}),t),ct.useEffect((()=>(n.current=!0,()=>{n.current=!1})),[])}));function Kn(e){const t=e.current;if(!t)return!1;const n=function(e){return Ut(e).activeElement}(t);return!!n&&(!t.contains(n)&&!(!((r=n)&&Wt(r)&&bn(r))||gn(r)));var r}function Zn(e,t){const{shouldFocus:n,visible:r,focusRef:o}=t,i=n&&!r;Gn((()=>{if(!i)return;if(Kn(e))return;const t=(null==o?void 0:o.current)||e.current;let n;return t?(n=requestAnimationFrame((()=>{t.focus({preventScroll:!0})})),()=>{cancelAnimationFrame(n)}):void 0}),[i,e,o])}const Jn={preventScroll:!0,shouldFocus:!1};const Qn=()=>"undefined"!=typeof window;const er=e=>Qn()&&e.test(function(){var e;const t=navigator.userAgentData;return null!==(e=null==t?void 0:t.platform)&&void 0!==e?e:navigator.platform}()),tr=()=>{return er(/mac|iphone|ipad|ipod/i)&&(e=/apple/i,Qn()&&e.test(navigator.vendor));var e};function nr(e,...t){const n=function(e,t){const n=ct.useId();return ct.useMemo((()=>e||[t,n].filter(Boolean).join("-")),[e,t,n])}(e);return ct.useMemo((()=>t.map((e=>`${e}-${n}`))),[n,t])}function rr(e){const t=ct.useRef(null);return t.current=e,t}function or(...e){return t=>{e.forEach((e=>{!function(e,t){if(null!=e)if("function"!=typeof e)try{e.current=t}catch(n){throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}else e(t)}(e,t)}))}}function ir(...e){return ct.useMemo((()=>or(...e)),e)}function ar(e){const{ref:t,handler:n,enabled:r=!0}=e,o=Ln(n),i=ct.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;ct.useEffect((()=>{if(!r)return;const e=e=>{sr(e,t)&&(i.isPointerDown=!0)},a=e=>{i.ignoreEmulatedMouseEvents?i.ignoreEmulatedMouseEvents=!1:i.isPointerDown&&n&&sr(e,t)&&(i.isPointerDown=!1,o(e))},s=e=>{i.ignoreEmulatedMouseEvents=!0,n&&i.isPointerDown&&sr(e,t)&&(i.isPointerDown=!1,o(e))},l=lr(t.current);return l.addEventListener("mousedown",e,!0),l.addEventListener("mouseup",a,!0),l.addEventListener("touchstart",e,!0),l.addEventListener("touchend",s,!0),()=>{l.removeEventListener("mousedown",e,!0),l.removeEventListener("mouseup",a,!0),l.removeEventListener("touchstart",e,!0),l.removeEventListener("touchend",s,!0)}}),[n,t,o,i,r])}function sr(e,t){var n,r,o;const i=null!==(n=null===(r=e.composedPath)||void 0===r?void 0:r.call(e)[0])&&void 0!==n?n:e.target;if(i){if(!lr(i).contains(i))return!1}return!(null!==(o=t.current)&&void 0!==o&&o.contains(i))}function lr(e){var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document}const cr=1/60*1e3,ur="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),dr="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout((()=>e(ur())),cr);let pr=!0,fr=!1,hr=!1;const mr={delta:0,timestamp:0},vr=["read","update","preRender","render","postRender"],gr=vr.reduce(((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(e,i=!1,s=!1)=>{const l=s&&o,c=l?t:n;return i&&a.add(e),-1===c.indexOf(e)&&(c.push(e),l&&o&&(r=t.length)),e},cancel:e=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;nfr=!0)),e)),{}),br=vr.reduce(((e,t)=>{const n=gr[t];return e[t]=(e,t=!1,r=!1)=>(fr||kr(),n.schedule(e,t,r)),e}),{}),yr=vr.reduce(((e,t)=>(e[t]=gr[t].cancel,e)),{});vr.reduce(((e,t)=>(e[t]=()=>gr[t].process(mr),e)),{});const xr=e=>gr[e].process(mr),wr=e=>{fr=!1,mr.delta=pr?cr:Math.max(Math.min(e-mr.timestamp,40),1),mr.timestamp=e,hr=!0,vr.forEach(xr),hr=!1,fr&&(pr=!1,dr(wr))},kr=()=>{fr=!0,pr=!0,hr||dr(wr)},Sr=()=>mr;var Cr=Object.defineProperty,_r=(e,t,n)=>(((e,t,n)=>{t in e?Cr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);class Er{constructor(e,t,n){var r;if(_r(this,"history",[]),_r(this,"startEvent",null),_r(this,"lastEvent",null),_r(this,"lastEventInfo",null),_r(this,"handlers",{}),_r(this,"removeListeners",(()=>{})),_r(this,"threshold",3),_r(this,"win"),_r(this,"updatePoint",(()=>{if(!this.lastEvent||!this.lastEventInfo)return;const e=jr(this.lastEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){if("number"==typeof e&&"number"==typeof t)return Or(e,t);if(Rr(e)&&Rr(t)){const n=Or(e.x,t.x),r=Or(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=Sr();this.history.push(at(at({},e.point),{},{timestamp:r}));const{onStart:o,onMove:i}=this.handlers;t||(null==o||o(this.lastEvent,e),this.startEvent=this.lastEvent),null==i||i(this.lastEvent,e)})),_r(this,"onPointerMove",((e,t)=>{this.lastEvent=e,this.lastEventInfo=t,br.update(this.updatePoint,!0)})),_r(this,"onPointerUp",((e,t)=>{const n=jr(t,this.history),{onEnd:r,onSessionEnd:o}=this.handlers;null==o||o(e,n),this.end(),r&&this.startEvent&&(null==r||r(e,n))})),this.win=null!==(r=e.view)&&void 0!==r?r:window,function(e){return Yt(e)&&e.touches.length>1}(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const o={point:Xt(e)},{timestamp:i}=Sr();this.history=[at(at({},o.point),{},{timestamp:i})];const{onSessionStart:a}=t;null==a||a(e,jr(o,this.history)),this.removeListeners=function(...e){return t=>e.reduce(((e,t)=>t(e)),t)}(Kt(this.win,"pointermove",this.onPointerMove),Kt(this.win,"pointerup",this.onPointerUp),Kt(this.win,"pointercancel",this.onPointerUp))}updateHandlers(e){this.handlers=e}end(){var e;null===(e=this.removeListeners)||void 0===e||e.call(this),yr.update(this.updatePoint)}}function Pr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function jr(e,t){return{point:e.point,delta:Pr(e.point,t[t.length-1]),offset:Pr(e.point,t[0]),velocity:Ar(t,.1)}}const Tr=e=>1e3*e;function Ar(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=e[e.length-1];for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Tr(t)));)n--;if(!r)return{x:0,y:0};const i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Or(e,t){return Math.abs(e-t)}function Rr(e){return"x"in e&&"y"in e}const Mr=(e,t)=>`${e}[data-closed], ${e}[data-state=closed] ${t}`,Nr=(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,Ir=(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,Dr=(e,t)=>`${e}:focus-visible ${t}`,zr=(e,t)=>`${e}:focus-within ${t}`,Br=(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,Fr=(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,Lr=(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,$r=(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,Vr=(e,t)=>`${e}:placeholder-shown ${t}`,Wr=e=>Ur((t=>e(t,"&")),"[role=group]","[data-group]",".group"),Hr=e=>Ur((t=>e(t,"~ &")),"[data-peer]",".peer"),Ur=(e,...t)=>t.map(e).join(", "),qr={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within, &[data-focus-within]",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty, &[data-empty]",_expanded:"&[aria-expanded=true], &[data-expanded], &[data-state=expanded]",_checked:"&[aria-checked=true], &[data-checked], &[data-state=checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate], &[data-state=indeterminate]",_groupOpen:Wr(((e,t)=>`${e}[data-open], ${e}[open], ${e}[data-state=open] ${t}`)),_groupClosed:Wr(Mr),_groupHover:Wr(Nr),_peerHover:Hr(Nr),_groupFocus:Wr(Ir),_peerFocus:Hr(Ir),_groupFocusVisible:Wr(Dr),_peerFocusVisible:Hr(Dr),_groupActive:Wr(Br),_peerActive:Hr(Br),_groupDisabled:Wr(Fr),_peerDisabled:Hr(Fr),_groupInvalid:Wr(Lr),_peerInvalid:Hr(Lr),_groupChecked:Wr($r),_peerChecked:Hr($r),_groupFocusWithin:Wr(zr),_peerFocusWithin:Hr(zr),_peerPlaceholderShown:Hr(Vr),_placeholder:"&::placeholder, &[data-placeholder]",_placeholderShown:"&:placeholder-shown, &[data-placeholder-shown]",_fullScreen:"&:fullscreen, &[data-fullscreen]",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]",_open:"&[data-open], &[open], &[data-state=open]",_closed:"&[data-closed], &[data-state=closed]",_complete:"&[data-complete]",_incomplete:"&[data-incomplete]",_current:"&[data-current]"},Yr=Object.keys(qr),Xr=e=>"string"==typeof e?e.replace(/!(important)?$/,"").trim():e,Gr=(e,t)=>n=>{const r=String(t),o=(e=>/!(important)?$/.test(e))(r),i=Xr(r),a=e?`${e}.${i}`:i;let s=en(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=Xr(s),o?`${s} !important`:s};function Kr(e){const{scale:t,transform:n,compose:r}=e;return(e,o)=>{var i;const a=Gr(t,e)(o);let s=null!==(i=null==n?void 0:n(a,o))&&void 0!==i?i:a;return r&&(s=r(s,o)),s}}const Zr=(...e)=>t=>e.reduce(((e,t)=>t(e)),t);function Jr(e,t){return n=>{const r={property:n,scale:e};return r.transform=Kr({scale:e,transform:t}),r}}const Qr=({rtl:e,ltr:t})=>n=>"rtl"===n.direction?e:t;const eo=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];const to={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},no={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};const ro={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},oo={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},io=new Set(Object.values(oo)),ao=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),so=e=>e.trim();const lo=e=>"string"==typeof e&&e.includes("(")&&e.includes(")");const co=e=>t=>`${e}(${t})`,uo={filter:e=>"auto"!==e?e:to,backdropFilter:e=>"auto"!==e?e:no,ring:e=>function(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}(uo.px(e)),bgClip:e=>"text"===e?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e},transform:e=>"auto"===e?["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...eo].join(" "):"auto-gpu"===e?["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...eo].join(" "):e,vh:e=>"$100vh"===e?"var(--chakra-vh)":e,px(e){if(null==e)return e;const{unitless:t}=(e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}})(e);return t||"number"==typeof e?`${e}px`:e},fraction:e=>"number"!=typeof e||e>1?e:100*e+"%",float:(e,t)=>"rtl"===t.direction?{left:"right",right:"left"}[e]:e,degree(e){if(function(e){return/^var\(--.+\)$/.test(e)}(e)||null==e)return e;const t="string"==typeof e&&!e.endsWith("deg");return"number"==typeof e||t?`${e}deg`:e},gradient:(e,t)=>function(e,t){if(null==e||ao.has(e))return e;if(!lo(e)&&!ao.has(e))return`url('${e}')`;const n=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),r=null==n?void 0:n[1],o=null==n?void 0:n[2];if(!r||!o)return e;const i=r.includes("-gradient")?r:`${r}-gradient`,[a,...s]=o.split(",").map(so).filter(Boolean);if(0===(null==s?void 0:s.length))return e;const l=a in oo?oo[a]:a;s.unshift(l);const c=s.map((e=>{if(io.has(e))return e;const n=e.indexOf(" "),[r,o]=-1!==n?[e.substr(0,n),e.substr(n+1)]:[e],i=lo(o)?o:o&&o.split(" "),a=`colors.${r}`,s=a in t.__cssMap?t.__cssMap[a].varRef:r;return i?[s,...Array.isArray(i)?i:[i]].join(" "):s}));return`${i}(${c.join(", ")})`}(e,null!=t?t:{}),blur:co("blur"),opacity:co("opacity"),brightness:co("brightness"),contrast:co("contrast"),dropShadow:co("drop-shadow"),grayscale:co("grayscale"),hueRotate:e=>co("hue-rotate")(uo.degree(e)),invert:co("invert"),saturate:co("saturate"),sepia:co("sepia"),bgImage(e){if(null==e)return e;return lo(e)||ao.has(e)?e:`url(${e})`},outline(e){const t="0"===String(e)||"none"===String(e);return null!==e&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;const{space:n,divide:r}=null!==(t=ro[e])&&void 0!==t?t:{},o={flexDirection:e};return n&&(o[n]=1),r&&(o[r]=1),o}},po={borderWidths:Jr("borderWidths"),borderStyles:Jr("borderStyles"),colors:Jr("colors"),borders:Jr("borders"),gradients:Jr("gradients",uo.gradient),radii:Jr("radii",uo.px),space:Jr("space",Zr(uo.vh,uo.px)),spaceT:Jr("space",Zr(uo.vh,uo.px)),degreeT:e=>({property:e,transform:uo.degree}),prop:(e,t,n)=>at({property:e,scale:t},t&&{transform:Kr({scale:t,transform:n})}),propT:(e,t)=>({property:e,transform:t}),sizes:Jr("sizes",Zr(uo.vh,uo.px)),sizesT:Jr("sizes",Zr(uo.vh,uo.fraction)),shadows:Jr("shadows"),logical:function(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:Qr(t),transform:n?Kr({scale:n,compose:r}):r}},blur:Jr("blur",uo.blur)},fo={background:po.colors("background"),backgroundColor:po.colors("backgroundColor"),backgroundImage:po.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:uo.bgClip},bgSize:po.prop("backgroundSize"),bgPosition:po.prop("backgroundPosition"),bg:po.colors("background"),bgColor:po.colors("backgroundColor"),bgPos:po.prop("backgroundPosition"),bgRepeat:po.prop("backgroundRepeat"),bgAttachment:po.prop("backgroundAttachment"),bgGradient:po.gradients("backgroundImage"),bgClip:{transform:uo.bgClip}};Object.assign(fo,{bgImage:fo.backgroundImage,bgImg:fo.backgroundImage});const ho={border:po.borders("border"),borderWidth:po.borderWidths("borderWidth"),borderStyle:po.borderStyles("borderStyle"),borderColor:po.colors("borderColor"),borderRadius:po.radii("borderRadius"),borderTop:po.borders("borderTop"),borderBlockStart:po.borders("borderBlockStart"),borderTopLeftRadius:po.radii("borderTopLeftRadius"),borderStartStartRadius:po.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:po.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:po.radii("borderTopRightRadius"),borderStartEndRadius:po.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:po.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:po.borders("borderRight"),borderInlineEnd:po.borders("borderInlineEnd"),borderBottom:po.borders("borderBottom"),borderBlockEnd:po.borders("borderBlockEnd"),borderBottomLeftRadius:po.radii("borderBottomLeftRadius"),borderBottomRightRadius:po.radii("borderBottomRightRadius"),borderLeft:po.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:po.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:po.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:po.borders(["borderLeft","borderRight"]),borderInline:po.borders("borderInline"),borderY:po.borders(["borderTop","borderBottom"]),borderBlock:po.borders("borderBlock"),borderTopWidth:po.borderWidths("borderTopWidth"),borderBlockStartWidth:po.borderWidths("borderBlockStartWidth"),borderTopColor:po.colors("borderTopColor"),borderBlockStartColor:po.colors("borderBlockStartColor"),borderTopStyle:po.borderStyles("borderTopStyle"),borderBlockStartStyle:po.borderStyles("borderBlockStartStyle"),borderBottomWidth:po.borderWidths("borderBottomWidth"),borderBlockEndWidth:po.borderWidths("borderBlockEndWidth"),borderBottomColor:po.colors("borderBottomColor"),borderBlockEndColor:po.colors("borderBlockEndColor"),borderBottomStyle:po.borderStyles("borderBottomStyle"),borderBlockEndStyle:po.borderStyles("borderBlockEndStyle"),borderLeftWidth:po.borderWidths("borderLeftWidth"),borderInlineStartWidth:po.borderWidths("borderInlineStartWidth"),borderLeftColor:po.colors("borderLeftColor"),borderInlineStartColor:po.colors("borderInlineStartColor"),borderLeftStyle:po.borderStyles("borderLeftStyle"),borderInlineStartStyle:po.borderStyles("borderInlineStartStyle"),borderRightWidth:po.borderWidths("borderRightWidth"),borderInlineEndWidth:po.borderWidths("borderInlineEndWidth"),borderRightColor:po.colors("borderRightColor"),borderInlineEndColor:po.colors("borderInlineEndColor"),borderRightStyle:po.borderStyles("borderRightStyle"),borderInlineEndStyle:po.borderStyles("borderInlineEndStyle"),borderTopRadius:po.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:po.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:po.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:po.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(ho,{rounded:ho.borderRadius,roundedTop:ho.borderTopRadius,roundedTopLeft:ho.borderTopLeftRadius,roundedTopRight:ho.borderTopRightRadius,roundedTopStart:ho.borderStartStartRadius,roundedTopEnd:ho.borderStartEndRadius,roundedBottom:ho.borderBottomRadius,roundedBottomLeft:ho.borderBottomLeftRadius,roundedBottomRight:ho.borderBottomRightRadius,roundedBottomStart:ho.borderEndStartRadius,roundedBottomEnd:ho.borderEndEndRadius,roundedLeft:ho.borderLeftRadius,roundedRight:ho.borderRightRadius,roundedStart:ho.borderInlineStartRadius,roundedEnd:ho.borderInlineEndRadius,borderStart:ho.borderInlineStart,borderEnd:ho.borderInlineEnd,borderTopStartRadius:ho.borderStartStartRadius,borderTopEndRadius:ho.borderStartEndRadius,borderBottomStartRadius:ho.borderEndStartRadius,borderBottomEndRadius:ho.borderEndEndRadius,borderStartRadius:ho.borderInlineStartRadius,borderEndRadius:ho.borderInlineEndRadius,borderStartWidth:ho.borderInlineStartWidth,borderEndWidth:ho.borderInlineEndWidth,borderStartColor:ho.borderInlineStartColor,borderEndColor:ho.borderInlineEndColor,borderStartStyle:ho.borderInlineStartStyle,borderEndStyle:ho.borderInlineEndStyle});const mo={color:po.colors("color"),textColor:po.colors("color"),fill:po.colors("fill"),stroke:po.colors("stroke"),accentColor:po.colors("accentColor"),textFillColor:po.colors("textFillColor")},vo={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:uo.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:po.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:po.space("gap"),rowGap:po.space("rowGap"),columnGap:po.space("columnGap")};Object.assign(vo,{flexDir:vo.flexDirection});const go={width:po.sizesT("width"),inlineSize:po.sizesT("inlineSize"),height:po.sizes("height"),blockSize:po.sizes("blockSize"),boxSize:po.sizes(["width","height"]),minWidth:po.sizes("minWidth"),minInlineSize:po.sizes("minInlineSize"),minHeight:po.sizes("minHeight"),minBlockSize:po.sizes("minBlockSize"),maxWidth:po.sizes("maxWidth"),maxInlineSize:po.sizes("maxInlineSize"),maxHeight:po.sizes("maxHeight"),maxBlockSize:po.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var n,r;return{[`@media screen and (min-width: ${null!==(n=null===(r=t.__breakpoints)||void 0===r||null===(r=r.get(e))||void 0===r?void 0:r.minW)&&void 0!==n?n:e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var n,r;return{[`@media screen and (max-width: ${null!==(n=null===(r=t.__breakpoints)||void 0===r||null===(r=r.get(e))||void 0===r?void 0:r._minW)&&void 0!==n?n:e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:po.propT("float",uo.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(go,{w:go.width,h:go.height,minW:go.minWidth,maxW:go.maxWidth,minH:go.minHeight,maxH:go.maxHeight,overscroll:go.overscrollBehavior,overscrollX:go.overscrollBehaviorX,overscrollY:go.overscrollBehaviorY});const bo={filter:{transform:uo.filter},blur:po.blur("--chakra-blur"),brightness:po.propT("--chakra-brightness",uo.brightness),contrast:po.propT("--chakra-contrast",uo.contrast),hueRotate:po.propT("--chakra-hue-rotate",uo.hueRotate),invert:po.propT("--chakra-invert",uo.invert),saturate:po.propT("--chakra-saturate",uo.saturate),dropShadow:po.propT("--chakra-drop-shadow",uo.dropShadow),backdropFilter:{transform:uo.backdropFilter},backdropBlur:po.blur("--chakra-backdrop-blur"),backdropBrightness:po.propT("--chakra-backdrop-brightness",uo.brightness),backdropContrast:po.propT("--chakra-backdrop-contrast",uo.contrast),backdropHueRotate:po.propT("--chakra-backdrop-hue-rotate",uo.hueRotate),backdropInvert:po.propT("--chakra-backdrop-invert",uo.invert),backdropSaturate:po.propT("--chakra-backdrop-saturate",uo.saturate)},yo={ring:{transform:uo.ring},ringColor:po.colors("--chakra-ring-color"),ringOffset:po.prop("--chakra-ring-offset-width"),ringOffsetColor:po.colors("--chakra-ring-offset-color"),ringInset:po.prop("--chakra-ring-inset")},xo={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:uo.outline},outlineOffset:!0,outlineColor:po.colors("outlineColor")},wo={gridGap:po.space("gridGap"),gridColumnGap:po.space("gridColumnGap"),gridRowGap:po.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0};const ko=(e=>{const t=new WeakMap;return(n,r,o,i)=>{if(void 0===n)return e(n,r,o);t.has(n)||t.set(n,new Map);const a=t.get(n);if(a.has(r))return a.get(r);const s=e(n,r,o,i);return a.set(r,s),s}})((function(e,t,n,r){const o="string"==typeof t?t.split("."):[t];for(r=0;r{const r={},o=ko(e,t,{});for(const i in o){i in n&&null!=n[i]||(r[i]=o[i])}return r},Eo={srOnly:{transform:e=>!0===e?So:"focusable"===e?Co:{}},layerStyle:{processResult:!0,transform:(e,t,n)=>_o(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>_o(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>_o(t,e,n)}},Po={position:!0,pos:po.prop("position"),zIndex:po.prop("zIndex","zIndices"),inset:po.spaceT("inset"),insetX:po.spaceT(["left","right"]),insetInline:po.spaceT("insetInline"),insetY:po.spaceT(["top","bottom"]),insetBlock:po.spaceT("insetBlock"),top:po.spaceT("top"),insetBlockStart:po.spaceT("insetBlockStart"),bottom:po.spaceT("bottom"),insetBlockEnd:po.spaceT("insetBlockEnd"),left:po.spaceT("left"),insetInlineStart:po.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:po.spaceT("right"),insetInlineEnd:po.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Po,{insetStart:Po.insetInlineStart,insetEnd:Po.insetInlineEnd});const jo={boxShadow:po.shadows("boxShadow"),mixBlendMode:!0,blendMode:po.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:po.prop("backgroundBlendMode"),opacity:!0};Object.assign(jo,{shadow:jo.boxShadow});const To={margin:po.spaceT("margin"),marginTop:po.spaceT("marginTop"),marginBlockStart:po.spaceT("marginBlockStart"),marginRight:po.spaceT("marginRight"),marginInlineEnd:po.spaceT("marginInlineEnd"),marginBottom:po.spaceT("marginBottom"),marginBlockEnd:po.spaceT("marginBlockEnd"),marginLeft:po.spaceT("marginLeft"),marginInlineStart:po.spaceT("marginInlineStart"),marginX:po.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:po.spaceT("marginInline"),marginY:po.spaceT(["marginTop","marginBottom"]),marginBlock:po.spaceT("marginBlock"),padding:po.space("padding"),paddingTop:po.space("paddingTop"),paddingBlockStart:po.space("paddingBlockStart"),paddingRight:po.space("paddingRight"),paddingBottom:po.space("paddingBottom"),paddingBlockEnd:po.space("paddingBlockEnd"),paddingLeft:po.space("paddingLeft"),paddingInlineStart:po.space("paddingInlineStart"),paddingInlineEnd:po.space("paddingInlineEnd"),paddingX:po.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:po.space("paddingInline"),paddingY:po.space(["paddingTop","paddingBottom"]),paddingBlock:po.space("paddingBlock")};Object.assign(To,{m:To.margin,mt:To.marginTop,mr:To.marginRight,me:To.marginInlineEnd,marginEnd:To.marginInlineEnd,mb:To.marginBottom,ml:To.marginLeft,ms:To.marginInlineStart,marginStart:To.marginInlineStart,mx:To.marginX,my:To.marginY,p:To.padding,pt:To.paddingTop,py:To.paddingY,px:To.paddingX,pb:To.paddingBottom,pl:To.paddingLeft,ps:To.paddingInlineStart,paddingStart:To.paddingInlineStart,pr:To.paddingRight,pe:To.paddingInlineEnd,paddingEnd:To.paddingInlineEnd});const Ao={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:po.spaceT("scrollMargin"),scrollMarginTop:po.spaceT("scrollMarginTop"),scrollMarginBottom:po.spaceT("scrollMarginBottom"),scrollMarginLeft:po.spaceT("scrollMarginLeft"),scrollMarginRight:po.spaceT("scrollMarginRight"),scrollMarginX:po.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:po.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:po.spaceT("scrollPadding"),scrollPaddingTop:po.spaceT("scrollPaddingTop"),scrollPaddingBottom:po.spaceT("scrollPaddingBottom"),scrollPaddingLeft:po.spaceT("scrollPaddingLeft"),scrollPaddingRight:po.spaceT("scrollPaddingRight"),scrollPaddingX:po.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:po.spaceT(["scrollPaddingTop","scrollPaddingBottom"])},Oo={fontFamily:po.prop("fontFamily","fonts"),fontSize:po.prop("fontSize","fontSizes",uo.px),fontWeight:po.prop("fontWeight","fontWeights"),lineHeight:po.prop("lineHeight","lineHeights"),letterSpacing:po.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(!0===e)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},Ro={textDecorationColor:po.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:po.shadows("textShadow")},Mo={clipPath:!0,transform:po.propT("transform",uo.transform),transformOrigin:!0,translateX:po.spaceT("--chakra-translate-x"),translateY:po.spaceT("--chakra-translate-y"),skewX:po.degreeT("--chakra-skew-x"),skewY:po.degreeT("--chakra-skew-y"),scaleX:po.prop("--chakra-scale-x"),scaleY:po.prop("--chakra-scale-y"),scale:po.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:po.degreeT("--chakra-rotate")},No={listStyleType:!0,listStylePosition:!0,listStylePos:po.prop("listStylePosition"),listStyleImage:!0,listStyleImg:po.prop("listStyleImage")},Io={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:po.prop("transitionDuration","transition.duration"),transitionProperty:po.prop("transitionProperty","transition.property"),transitionTimingFunction:po.prop("transitionTimingFunction","transition.easing")},Do=Fn({},fo,ho,mo,vo,go,bo,yo,xo,wo,Eo,Po,jo,To,Ao,Oo,Ro,Mo,No,Io),zo=Object.assign({},To,go,vo,wo,Po),Bo=Object.keys(zo),Fo=[...Object.keys(Do),...Yr],Lo=at(at({},Do),qr),$o=e=>e in Lo;const Vo=(e,t)=>e.startsWith("--")&&"string"==typeof t&&!function(e){return/^var\(--.+\)$/.test(e)}(t),Wo=(e,t)=>{var n,r;if(null==t)return t;const o=t=>{var n;return null===(n=e.__cssMap)||void 0===n||null===(n=n[t])||void 0===n?void 0:n.varRef},i=e=>{var t;return null!==(t=o(e))&&void 0!==t?t:e},[a,s]=function(e){const t=[];let n="",r=!1;for(let o=0;o{const a=Rn(e,r),s=(e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:o}=t.__breakpoints,i={};for(const a in e){let s=Rn(e[a],t);if(null==s)continue;if(s=en(s)&&n(s)?r(s):s,!Array.isArray(s)){i[a]=s;continue}const l=s.slice(0,o.length).length;for(let e=0;et=>Ho({theme:t,pseudos:qr,configs:Do})(e);function qo(e){return{definePartsStyle:e=>e,defineMultiStyleConfig:t=>at({parts:e},t)}}function Yo(e,t){for(let n=t+1;n{Fn(i,{[e]:l?h[e]:{[f]:h[e]}})}));else c?i[f]=h:l?Fn(i,h):i[f]=h}return i}}function Go(e){return Tn(e,["styleConfig","size","variant","colorScheme"])}function Ko(e){return en(e)&&e.reference?e.reference:String(e)}const Zo=(e,...t)=>t.map(Ko).join(` ${e} `).replace(/calc/g,""),Jo=(...e)=>`calc(${Zo("+",...e)})`,Qo=(...e)=>`calc(${Zo("-",...e)})`,ei=(...e)=>`calc(${Zo("*",...e)})`,ti=(...e)=>`calc(${Zo("/",...e)})`,ni=e=>{const t=Ko(e);return null==t||Number.isNaN(parseFloat(t))?ei(t,-1):String(t).startsWith("-")?String(t).slice(1):`-${t}`},ri=Object.assign((e=>({add:(...t)=>ri(Jo(e,...t)),subtract:(...t)=>ri(Qo(e,...t)),multiply:(...t)=>ri(ei(e,...t)),divide:(...t)=>ri(ti(e,...t)),negate:()=>ri(ni(e)),toString:()=>e.toString()})),{add:Jo,subtract:Qo,multiply:ei,divide:ti,negate:ni});function oi(e){return function(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}(function(e){if(e.includes("\\."))return e;const t=!Number.isInteger(parseFloat(e.toString()));return t?e.replace(".","\\."):e}(function(e,t="-"){return e.replace(/\s+/g,t)}(e.toString())))}function ii(e,t){return`var(${e}${t?`, ${t}`:""})`}function ai(e,t=""){return oi(`--${function(e,t=""){return[t,e].filter(Boolean).join("-")}(e,t)}`)}function si(e,t,n){const r=ai(e,n);return{variable:r,reference:ii(r,t)}}const li=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function ci(e){return An(e,li)}function ui(e,t){return si(String(e).replace(/\./g,"-"),void 0,t)}function di(e){var t;const n=function(e){const t=ci(e),n=function(e){return e.semanticTokens}(e),r=e=>Yr.includes(e)||"default"===e,o={};return Nn(t,((e,t)=>{null!=e&&(o[t.join(".")]={isSemantic:!1,value:e})})),Nn(n,((e,t)=>{null!=e&&(o[t.join(".")]={isSemantic:!0,value:e})}),{stop:e=>Object.keys(e).every(r)}),o}(e),r=null===(t=e.config)||void 0===t?void 0:t.cssVarPrefix;let o={};const i={};function a(e,t){const o=[String(e).split(".")[0],t].join(".");if(!n[o])return t;const{reference:i}=ui(o,r);return i}for(const[s,l]of Object.entries(n)){const{isSemantic:e,value:t}=l,{variable:n,reference:c}=ui(s,r);if(!e){if(s.startsWith("space")){const e=s.split("."),[r,...o]=e,a=`${r}.-${o.join(".")}`,l=ri.negate(t),u=ri.negate(c);i[a]={value:l,var:n,varRef:u}}o[n]=t,i[s]={value:t,var:n,varRef:c};continue}const u=en(t)?t:{default:t};o=Fn(o,Object.entries(u).reduce(((e,[t,r])=>{var o;if(!r)return e;const i=a(s,`${r}`);if("default"===t)return e[n]=i,e;return e[null!==(o=null==qr?void 0:qr[t])&&void 0!==o?o:t]={[n]:i},e}),{})),i[s]={value:c,var:n,varRef:c}}return{cssVars:o,cssMap:i}}function pi(e){const t=function(e){const{__cssMap:t,__cssVars:n,__breakpoints:o}=e;return ot(e,r)}(e),{cssMap:n,cssVars:o}=di(t);return Object.assign(t,{__cssVars:at(at({},{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"}),o),__cssMap:n,__breakpoints:cn(t.breakpoints)}),t}function fi(e,t={}){let n=!1;function r(t){const n=`chakra-${(["container","root"].includes(null!=t?t:"")?[e]:[e,t]).filter(Boolean).join("__")}`;return{className:n,selector:`.${n}`,toString:()=>t}}return{parts:function(...o){!function(){if(n)throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?");n=!0}();for(const e of o)t[e]=r(e);return fi(e,t)},toPart:r,extend:function(...n){for(const e of n)e in t||(t[e]=r(e));return fi(e,t)},selectors:function(){return Object.fromEntries(Object.entries(t).map((([e,t])=>[e,t.selector])))},classnames:function(){return Object.fromEntries(Object.entries(t).map((([e,t])=>[e,t.className])))},get keys(){return Object.keys(t)},__type:{}}}const hi=fi("accordion").parts("root","container","button","panel","icon"),mi=fi("alert").parts("title","description","container","icon","spinner"),vi=fi("avatar").parts("label","badge","container","excessLabel","group"),gi=fi("breadcrumb").parts("link","item","container","separator");fi("button").parts();const bi=fi("checkbox").parts("control","icon","container","label");fi("progress").parts("track","filledTrack","label");const yi=fi("drawer").parts("overlay","dialogContainer","dialog","header","closeButton","body","footer"),xi=fi("editable").parts("preview","input","textarea"),wi=fi("form").parts("container","requiredIndicator","helperText"),ki=fi("formError").parts("text","icon"),Si=fi("input").parts("addon","field","element","group"),Ci=fi("list").parts("container","item","icon"),_i=fi("menu").parts("button","list","item","groupTitle","icon","command","divider"),Ei=fi("modal").parts("overlay","dialogContainer","dialog","header","closeButton","body","footer"),Pi=fi("numberinput").parts("root","field","stepperGroup","stepper");fi("pininput").parts("field");const ji=fi("popover").parts("content","header","body","footer","popper","arrow","closeButton"),Ti=fi("progress").parts("label","filledTrack","track"),Ai=fi("radio").parts("container","control","label"),Oi=fi("select").parts("field","icon"),Ri=fi("slider").parts("container","track","thumb","filledTrack","mark"),Mi=fi("stat").parts("container","label","helpText","number","icon"),Ni=fi("switch").parts("container","track","thumb","label"),Ii=fi("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),Di=fi("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),zi=fi("tag").parts("container","label","closeButton"),Bi=fi("card").parts("container","header","body","footer");fi("stepper").parts("stepper","step","title","description","indicator","separator","icon","number");const{definePartsStyle:Fi,defineMultiStyleConfig:Li}=qo(hi.keys),$i=Li({baseStyle:Fi({container:{borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},button:{transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},panel:{pt:"2",px:"4",pb:"5"},icon:{fontSize:"1.25em"}})});function Vi(e,t,n){return Math.min(Math.max(e,n),t)}class Wi extends Error{constructor(e){super(`Failed to parse color: "${e}"`)}}var Hi=Wi;function Ui(e){if("string"!=typeof e)throw new Hi(e);if("transparent"===e.trim().toLowerCase())return[0,0,0,0];let t=e.trim();t=Qi.test(e)?function(e){const t=e.toLowerCase().trim(),n=Yi[function(e){let t=5381,n=e.length;for(;n;)t=33*t^e.charCodeAt(--n);return(t>>>0)%2341}(t)];if(!n)throw new Hi(e);return`#${n}`}(e):e;const n=Gi.exec(t);if(n){const e=Array.from(n).slice(1);return[...e.slice(0,3).map((e=>parseInt(Xi(e,2),16))),parseInt(Xi(e[3]||"f",2),16)/255]}const r=Ki.exec(t);if(r){const e=Array.from(r).slice(1);return[...e.slice(0,3).map((e=>parseInt(e,16))),parseInt(e[3]||"ff",16)/255]}const o=Zi.exec(t);if(o){const e=Array.from(o).slice(1);return[...e.slice(0,3).map((e=>parseInt(e,10))),parseFloat(e[3]||"1")]}const i=Ji.exec(t);if(i){const[t,n,r,o]=Array.from(i).slice(1).map(parseFloat);if(Vi(0,100,n)!==n)throw new Hi(e);if(Vi(0,100,r)!==r)throw new Hi(e);return[...ta(t,n,r),Number.isNaN(o)?1:o]}throw new Hi(e)}const qi=e=>parseInt(e.replace(/_/g,""),36),Yi="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce(((e,t)=>{const n=qi(t.substring(0,3)),r=qi(t.substring(3)).toString(16);let o="";for(let i=0;i<6-r.length;i++)o+="0";return e[n]=`${o}${r}`,e}),{});const Xi=(e,t)=>Array.from(Array(t)).map((()=>e)).join(""),Gi=new RegExp(`^#${Xi("([a-f0-9])",3)}([a-f0-9])?$`,"i"),Ki=new RegExp(`^#${Xi("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),Zi=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Xi(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),Ji=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,Qi=/^[a-z]+$/i,ea=e=>Math.round(255*e),ta=(e,t,n)=>{let r=n/100;if(0===t)return[r,r,r].map(ea);const o=(e%360+360)%360/60,i=(1-Math.abs(2*r-1))*(t/100),a=i*(1-Math.abs(o%2-1));let s=0,l=0,c=0;o>=0&&o<1?(s=i,l=a):o>=1&&o<2?(s=a,l=i):o>=2&&o<3?(l=i,c=a):o>=3&&o<4?(l=a,c=i):o>=4&&o<5?(s=a,c=i):o>=5&&o<6&&(s=i,c=a);const u=r-i/2;return[s+u,l+u,c+u].map(ea)};function na(e,t){const[n,r,o,i]=Ui(e);return function(e,t,n,r){return`rgba(${Vi(0,255,e).toFixed()}, ${Vi(0,255,t).toFixed()}, ${Vi(0,255,n).toFixed()}, ${parseFloat(Vi(0,1,r).toFixed(3))})`}(n,r,o,i-t)}const ra=it("a9",((e,t,n)=>{const r=function(e,t,n,r,o){for(t=t.split?t.split("."):t,r=0;r{const t=Vi(0,255,e).toString(16);return 1===t.length?`0${t}`:t};i(t),i(n),i(r),o<1&&i(Math.round(255*o))}(r),r}catch(o){return"#000000"}})),oa=e=>t=>{const n=(e=>{const[t,n,r]=Ui(e);return(299*t+587*n+114*r)/1e3})(ra(t,e));return n<128?"dark":"light"},ia=(e,t)=>n=>na(ra(n,e),1-t);function aa(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient(\n 45deg,\n ${t} 25%,\n transparent 25%,\n transparent 50%,\n ${t} 50%,\n ${t} 75%,\n transparent 75%,\n transparent\n )`,backgroundSize:`${e} ${e}`}}function sa(e){const t=`#${Math.floor(16777215*Math.random()).toString(16).padEnd(6,"0")}`;return e&&(n=e,0!==Object.keys(n).length)?e.string&&e.colors?function(e,t){let n=0;if(0===e.length)return t[0];for(let r=0;r>8*r&255).toString(16)}`.substr(-2)}return n}(e.string):e.colors&&!e.string?function(e){return e[Math.floor(Math.random()*e.length)]}(e.colors):t:t;var n}function la(e,t){return n=>"dark"===n.colorMode?t:e}function ca(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?"vertical"===t?n:r:{}}function ua(e){return en(e)&&e.reference?e.reference:String(e)}const da=(e,...t)=>t.map(ua).join(` ${e} `).replace(/calc/g,""),pa=(...e)=>`calc(${da("+",...e)})`,fa=(...e)=>`calc(${da("-",...e)})`,ha=(...e)=>`calc(${da("*",...e)})`,ma=(...e)=>`calc(${da("/",...e)})`,va=e=>{const t=ua(e);return null==t||Number.isNaN(parseFloat(t))?ha(t,-1):String(t).startsWith("-")?String(t).slice(1):`-${t}`},ga=Object.assign((e=>({add:(...t)=>ga(pa(e,...t)),subtract:(...t)=>ga(fa(e,...t)),multiply:(...t)=>ga(ha(e,...t)),divide:(...t)=>ga(ma(e,...t)),negate:()=>ga(va(e)),toString:()=>e.toString()})),{add:pa,subtract:fa,multiply:ha,divide:ma,negate:va});function ba(e){const t=function(e,t="-"){return e.replace(/\s+/g,t)}(e.toString());return t.includes("\\.")?e:function(e){return!Number.isInteger(parseFloat(e.toString()))}(e)?t.replace(".","\\."):e}function ya(e,t){return`var(${ba(e)}${t?`, ${t}`:""})`}function xa(e,t=""){return`--${function(e,t=""){return[t,ba(e)].filter(Boolean).join("-")}(e,t)}`}function wa(e,t){const n=xa(e,null==t?void 0:t.prefix);return{variable:n,reference:ya(n,(r=null==t?void 0:t.fallback,null==r?void 0:r.reference))};var r}const{definePartsStyle:ka,defineMultiStyleConfig:Sa}=qo(mi.keys),Ca=si("alert-fg"),_a=si("alert-bg");function Ea(e){const{theme:t,colorScheme:n}=e;return{light:`colors.${n}.100`,dark:ia(`${n}.200`,.16)(t)}}const Pa=Sa({baseStyle:ka({container:{bg:_a.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:Ca.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:Ca.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}}),variants:{subtle:ka((e=>{const{colorScheme:t}=e,n=Ea(e);return{container:{[Ca.variable]:`colors.${t}.600`,[_a.variable]:n.light,_dark:{[Ca.variable]:`colors.${t}.200`,[_a.variable]:n.dark}}}})),"left-accent":ka((e=>{const{colorScheme:t}=e,n=Ea(e);return{container:{[Ca.variable]:`colors.${t}.600`,[_a.variable]:n.light,_dark:{[Ca.variable]:`colors.${t}.200`,[_a.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:Ca.reference}}})),"top-accent":ka((e=>{const{colorScheme:t}=e,n=Ea(e);return{container:{[Ca.variable]:`colors.${t}.600`,[_a.variable]:n.light,_dark:{[Ca.variable]:`colors.${t}.200`,[_a.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:Ca.reference}}})),solid:ka((e=>{const{colorScheme:t}=e;return{container:{[Ca.variable]:"colors.white",[_a.variable]:`colors.${t}.600`,_dark:{[Ca.variable]:"colors.gray.900",[_a.variable]:`colors.${t}.200`},color:Ca.reference}}}))},defaultProps:{variant:"subtle",colorScheme:"blue"}}),ja={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},Ta=at(at(at({},ja),{max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"}),{},{container:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px"}});function Aa(e,...t){return"function"==typeof e?e(...t):e}const{definePartsStyle:Oa,defineMultiStyleConfig:Ra}=qo(vi.keys),Ma=si("avatar-border-color"),Na=si("avatar-bg"),Ia=si("avatar-font-size"),Da=si("avatar-size"),za={borderRadius:"full",border:"0.2em solid",borderColor:Ma.reference,[Ma.variable]:"white",_dark:{[Ma.variable]:"colors.gray.800"}},Ba={bg:Na.reference,fontSize:Ia.reference,width:Da.reference,height:Da.reference,lineHeight:"1",[Na.variable]:"colors.gray.200",_dark:{[Na.variable]:"colors.whiteAlpha.400"}},Fa=e=>{const{name:t,theme:n}=e,r=t?sa({string:t}):"colors.gray.400",o=(e=>t=>"dark"===oa(e)(t))(r)(n);let i="white";return o||(i="gray.800"),{bg:Na.reference,fontSize:Ia.reference,color:i,borderColor:Ma.reference,verticalAlign:"top",width:Da.reference,height:Da.reference,"&:not([data-loaded])":{[Na.variable]:r},[Ma.variable]:"colors.white",_dark:{[Ma.variable]:"colors.gray.800"}}},La={fontSize:Ia.reference,lineHeight:"1"};function $a(e){const t="100%"!==e?Ta[e]:void 0;return Oa({container:{[Da.variable]:null!=t?t:e,[Ia.variable]:`calc(${null!=t?t:e} / 2.5)`},excessLabel:{[Da.variable]:null!=t?t:e,[Ia.variable]:`calc(${null!=t?t:e} / 2.5)`}})}const Va=Ra({baseStyle:Oa((e=>({badge:Aa(za,e),excessLabel:Aa(Ba,e),container:Aa(Fa,e),label:La}))),sizes:{"2xs":$a(4),xs:$a(6),sm:$a(8),md:$a(12),lg:$a(16),xl:$a(24),"2xl":$a(32),full:$a("100%")},defaultProps:{size:"md"}}),Wa=function(e,t){const n={};for(const r of t)if(Array.isArray(r)){const[t,o]=r;n[t]=si(`${e}-${t}`,o)}else n[r]=si(`${e}-${r}`);return n}("badge",["bg","color","shadow"]),Ha=e=>{const{colorScheme:t,theme:n}=e,r=ia(`${t}.500`,.6)(n);return{[Wa.bg.variable]:`colors.${t}.500`,[Wa.color.variable]:"colors.white",_dark:{[Wa.bg.variable]:r,[Wa.color.variable]:"colors.whiteAlpha.800"}}},Ua=e=>{const{colorScheme:t,theme:n}=e,r=ia(`${t}.200`,.16)(n);return{[Wa.bg.variable]:`colors.${t}.100`,[Wa.color.variable]:`colors.${t}.800`,_dark:{[Wa.bg.variable]:r,[Wa.color.variable]:`colors.${t}.200`}}},qa=e=>{const{colorScheme:t,theme:n}=e,r=ia(`${t}.200`,.8)(n);return{[Wa.color.variable]:`colors.${t}.500`,_dark:{[Wa.color.variable]:r},[Wa.shadow.variable]:`inset 0 0 0px 1px ${Wa.color.reference}`}},Ya={baseStyle:{px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:Wa.bg.reference,color:Wa.color.reference,boxShadow:Wa.shadow.reference},variants:{solid:Ha,subtle:Ua,outline:qa},defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Xa,definePartsStyle:Ga}=qo(gi.keys),Ka=si("breadcrumb-link-decor"),Za=Xa({baseStyle:Ga({link:{transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:Ka.reference,[Ka.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[Ka.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}}})}),Ja=e=>{const{colorScheme:t,theme:n}=e;if("gray"===t)return{color:la("gray.800","whiteAlpha.900")(e),_hover:{bg:la("gray.100","whiteAlpha.200")(e)},_active:{bg:la("gray.200","whiteAlpha.300")(e)}};const r=ia(`${t}.200`,.12)(n),o=ia(`${t}.200`,.24)(n);return{color:la(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:la(`${t}.50`,r)(e)},_active:{bg:la(`${t}.100`,o)(e)}}},Qa={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},es=e=>{var t;const{colorScheme:n}=e;if("gray"===n){const t=la("gray.100","whiteAlpha.200")(e);return{bg:t,color:la("gray.800","whiteAlpha.900")(e),_hover:{bg:la("gray.200","whiteAlpha.300")(e),_disabled:{bg:t}},_active:{bg:la("gray.300","whiteAlpha.400")(e)}}}const{bg:r=`${n}.500`,color:o="white",hoverBg:i=`${n}.600`,activeBg:a=`${n}.700`}=null!==(t=Qa[n])&&void 0!==t?t:{},s=la(r,`${n}.200`)(e);return{bg:s,color:la(o,"gray.800")(e),_hover:{bg:la(i,`${n}.300`)(e),_disabled:{bg:s}},_active:{bg:la(a,`${n}.400`)(e)}}},ts={baseStyle:{lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},variants:{ghost:Ja,outline:e=>{const{colorScheme:t}=e,n=la("gray.200","whiteAlpha.300")(e);return at({border:"1px solid",borderColor:"gray"===t?n:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"}},Aa(Ja,e))},solid:es,link:e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:la(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:la(`${t}.700`,`${t}.500`)(e)}}},unstyled:{bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"}},sizes:{lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:ns,defineMultiStyleConfig:rs}=qo(Bi.keys),os=si("card-bg"),is=si("card-padding"),as=si("card-shadow"),ss=si("card-radius"),ls=si("card-border-width","0"),cs=si("card-border-color"),us=ns({container:{[os.variable]:"colors.chakra-body-bg",backgroundColor:os.reference,boxShadow:as.reference,borderRadius:ss.reference,color:"chakra-body-text",borderWidth:ls.reference,borderColor:cs.reference},body:{padding:is.reference,flex:"1 1 0%"},header:{padding:is.reference},footer:{padding:is.reference}}),ds={sm:ns({container:{[ss.variable]:"radii.base",[is.variable]:"space.3"}}),md:ns({container:{[ss.variable]:"radii.md",[is.variable]:"space.5"}}),lg:ns({container:{[ss.variable]:"radii.xl",[is.variable]:"space.7"}})},ps=rs({baseStyle:us,variants:{elevated:ns({container:{[as.variable]:"shadows.base",_dark:{[os.variable]:"colors.gray.700"}}}),outline:ns({container:{[ls.variable]:"1px",[cs.variable]:"colors.chakra-border-color"}}),filled:ns({container:{[os.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[is.variable]:0},header:{[is.variable]:0},footer:{[is.variable]:0}}},sizes:ds,defaultProps:{variant:"elevated",size:"md"}}),{definePartsStyle:fs,defineMultiStyleConfig:hs}=qo(bi.keys),ms=si("checkbox-size"),vs=e=>{const{colorScheme:t}=e;return{w:ms.reference,h:ms.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:la(`${t}.500`,`${t}.200`)(e),borderColor:la(`${t}.500`,`${t}.200`)(e),color:la("white","gray.900")(e),_hover:{bg:la(`${t}.600`,`${t}.300`)(e),borderColor:la(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:la("gray.200","transparent")(e),bg:la("gray.200","whiteAlpha.300")(e),color:la("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:la(`${t}.500`,`${t}.200`)(e),borderColor:la(`${t}.500`,`${t}.200`)(e),color:la("white","gray.900")(e)},_disabled:{bg:la("gray.100","whiteAlpha.100")(e),borderColor:la("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:la("red.500","red.300")(e)}}},gs={_disabled:{cursor:"not-allowed"}},bs={userSelect:"none",_disabled:{opacity:.4}},ys={transitionProperty:"transform",transitionDuration:"normal"},xs=hs({baseStyle:fs((e=>({icon:ys,container:gs,control:Aa(vs,e),label:bs}))),sizes:{sm:fs({control:{[ms.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:fs({control:{[ms.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:fs({control:{[ms.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},defaultProps:{size:"md",colorScheme:"blue"}}),ws=wa("close-button-size"),ks=wa("close-button-bg"),Ss={baseStyle:{w:[ws.reference],h:[ws.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[ks.variable]:"colors.blackAlpha.100",_dark:{[ks.variable]:"colors.whiteAlpha.100"}},_active:{[ks.variable]:"colors.blackAlpha.200",_dark:{[ks.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:ks.reference},sizes:{lg:{[ws.variable]:"sizes.10",fontSize:"md"},md:{[ws.variable]:"sizes.8",fontSize:"xs"},sm:{[ws.variable]:"sizes.6",fontSize:"2xs"}},defaultProps:{size:"md"}},{variants:Cs,defaultProps:_s}=Ya,Es={baseStyle:{fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:Wa.bg.reference,color:Wa.color.reference,boxShadow:Wa.shadow.reference},variants:Cs,defaultProps:_s},Ps={baseStyle:{w:"100%",mx:"auto",maxW:"prose",px:"4"}},js={baseStyle:{opacity:.6,borderColor:"inherit"},variants:{solid:{borderStyle:"solid"},dashed:{borderStyle:"dashed"}},defaultProps:{variant:"solid"}},{definePartsStyle:Ts,defineMultiStyleConfig:As}=qo(yi.keys),Os=si("drawer-bg"),Rs=si("drawer-box-shadow");function Ms(e){return Ts("full"===e?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}const Ns={bg:"blackAlpha.600",zIndex:"modal"},Is={display:"flex",zIndex:"modal",justifyContent:"center"},Ds=e=>{const{isFullHeight:t}=e;return at(at({},t&&{height:"100vh"}),{},{zIndex:"modal",maxH:"100vh",color:"inherit",[Os.variable]:"colors.white",[Rs.variable]:"shadows.lg",_dark:{[Os.variable]:"colors.gray.700",[Rs.variable]:"shadows.dark-lg"},bg:Os.reference,boxShadow:Rs.reference})},zs={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Bs={position:"absolute",top:"2",insetEnd:"3"},Fs={px:"6",py:"2",flex:"1",overflow:"auto"},Ls={px:"6",py:"4"},$s=As({baseStyle:Ts((e=>({overlay:Ns,dialogContainer:Is,dialog:Aa(Ds,e),header:zs,closeButton:Bs,body:Fs,footer:Ls}))),sizes:{xs:Ms("xs"),sm:Ms("md"),md:Ms("lg"),lg:Ms("2xl"),xl:Ms("4xl"),full:Ms("full")},defaultProps:{size:"xs"}}),{definePartsStyle:Vs,defineMultiStyleConfig:Ws}=qo(xi.keys),Hs=Ws({baseStyle:Vs({preview:{borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},input:{borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},textarea:{borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}}})}),{definePartsStyle:Us,defineMultiStyleConfig:qs}=qo(wi.keys),Ys=si("form-control-color"),Xs=qs({baseStyle:Us({container:{width:"100%",position:"relative"},requiredIndicator:{marginStart:"1",[Ys.variable]:"colors.red.500",_dark:{[Ys.variable]:"colors.red.300"},color:Ys.reference},helperText:{mt:"2",[Ys.variable]:"colors.gray.600",_dark:{[Ys.variable]:"colors.whiteAlpha.600"},color:Ys.reference,lineHeight:"normal",fontSize:"sm"}})}),{definePartsStyle:Gs,defineMultiStyleConfig:Ks}=qo(ki.keys),Zs=si("form-error-color"),Js=Ks({baseStyle:Gs({text:{[Zs.variable]:"colors.red.500",_dark:{[Zs.variable]:"colors.red.300"},color:Zs.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},icon:{marginEnd:"0.5em",[Zs.variable]:"colors.red.500",_dark:{[Zs.variable]:"colors.red.300"},color:Zs.reference}})}),Qs={baseStyle:{fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}}},el={baseStyle:{fontFamily:"heading",fontWeight:"bold"},sizes:{"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},defaultProps:{size:"xl"}},{definePartsStyle:tl,defineMultiStyleConfig:nl}=qo(Si.keys),rl=si("input-height"),ol=si("input-font-size"),il=si("input-padding"),al=si("input-border-radius"),sl=tl({addon:{height:rl.reference,fontSize:ol.reference,px:il.reference,borderRadius:al.reference},field:{width:"100%",height:rl.reference,fontSize:ol.reference,px:il.reference,borderRadius:al.reference,minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),ll={lg:{[ol.variable]:"fontSizes.lg",[il.variable]:"space.4",[al.variable]:"radii.md",[rl.variable]:"sizes.12"},md:{[ol.variable]:"fontSizes.md",[il.variable]:"space.4",[al.variable]:"radii.md",[rl.variable]:"sizes.10"},sm:{[ol.variable]:"fontSizes.sm",[il.variable]:"space.3",[al.variable]:"radii.sm",[rl.variable]:"sizes.8"},xs:{[ol.variable]:"fontSizes.xs",[il.variable]:"space.2",[al.variable]:"radii.sm",[rl.variable]:"sizes.6"}},cl={lg:tl({field:ll.lg,group:ll.lg}),md:tl({field:ll.md,group:ll.md}),sm:tl({field:ll.sm,group:ll.sm}),xs:tl({field:ll.xs,group:ll.xs})};function ul(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||la("blue.500","blue.300")(e),errorBorderColor:n||la("red.500","red.300")(e)}}const dl=tl((e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=ul(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:la("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:ra(t,r),boxShadow:`0 0 0 1px ${ra(t,r)}`},_focusVisible:{zIndex:1,borderColor:ra(t,n),boxShadow:`0 0 0 1px ${ra(t,n)}`}},addon:{border:"1px solid",borderColor:la("inherit","whiteAlpha.50")(e),bg:la("gray.100","whiteAlpha.300")(e)}}})),pl=tl((e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=ul(e);return{field:{border:"2px solid",borderColor:"transparent",bg:la("gray.100","whiteAlpha.50")(e),_hover:{bg:la("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:ra(t,r)},_focusVisible:{bg:"transparent",borderColor:ra(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:la("gray.100","whiteAlpha.50")(e)}}})),fl=tl((e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=ul(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:ra(t,r),boxShadow:`0px 1px 0px 0px ${ra(t,r)}`},_focusVisible:{borderColor:ra(t,n),boxShadow:`0px 1px 0px 0px ${ra(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}})),hl=nl({baseStyle:sl,sizes:cl,variants:{outline:dl,filled:pl,flushed:fl,unstyled:tl({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}})},defaultProps:{size:"md",variant:"outline"}}),ml=si("kbd-bg"),vl={baseStyle:{[ml.variable]:"colors.gray.100",_dark:{[ml.variable]:"colors.whiteAlpha.100"},bg:ml.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}},gl={baseStyle:{transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}}},{defineMultiStyleConfig:bl,definePartsStyle:yl}=qo(Ci.keys),xl=bl({baseStyle:yl({icon:{marginEnd:"2",display:"inline",verticalAlign:"text-bottom"}})}),{defineMultiStyleConfig:wl,definePartsStyle:kl}=qo(_i.keys),Sl=si("menu-bg"),Cl=si("menu-shadow"),_l=wl({baseStyle:kl({button:{transitionProperty:"common",transitionDuration:"normal"},list:{[Sl.variable]:"#fff",[Cl.variable]:"shadows.sm",_dark:{[Sl.variable]:"colors.gray.700",[Cl.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:"dropdown",borderRadius:"md",borderWidth:"1px",bg:Sl.reference,boxShadow:Cl.reference},item:{py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[Sl.variable]:"colors.gray.100",_dark:{[Sl.variable]:"colors.whiteAlpha.100"}},_active:{[Sl.variable]:"colors.gray.200",_dark:{[Sl.variable]:"colors.whiteAlpha.200"}},_expanded:{[Sl.variable]:"colors.gray.100",_dark:{[Sl.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:Sl.reference},groupTitle:{mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},icon:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},command:{opacity:.6},divider:{border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6}})}),{defineMultiStyleConfig:El,definePartsStyle:Pl}=qo(Ei.keys),jl=si("modal-bg"),Tl=si("modal-shadow"),Al={bg:"blackAlpha.600",zIndex:"modal"},Ol=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:"inside"===n?"hidden":"auto",overscrollBehaviorY:"none"}},Rl=e=>{const{isCentered:t,scrollBehavior:n}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:"inside"===n?"calc(100% - 7.5rem)":void 0,[jl.variable]:"colors.white",[Tl.variable]:"shadows.lg",_dark:{[jl.variable]:"colors.gray.700",[Tl.variable]:"shadows.dark-lg"},bg:jl.reference,boxShadow:Tl.reference}},Ml={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Nl={position:"absolute",top:"2",insetEnd:"3"},Il=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:"inside"===t?"auto":void 0}},Dl={px:"6",py:"4"};function zl(e){return Pl("full"===e?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}const Bl=El({baseStyle:Pl((e=>({overlay:Al,dialogContainer:Aa(Ol,e),dialog:Aa(Rl,e),header:Ml,closeButton:Nl,body:Aa(Il,e),footer:Dl}))),sizes:{xs:zl("xs"),sm:zl("sm"),md:zl("md"),lg:zl("lg"),xl:zl("xl"),"2xl":zl("2xl"),"3xl":zl("3xl"),"4xl":zl("4xl"),"5xl":zl("5xl"),"6xl":zl("6xl"),full:zl("full")},defaultProps:{size:"md"}}),Fl={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},{defineMultiStyleConfig:Ll,definePartsStyle:$l}=qo(Pi.keys),Vl=wa("number-input-stepper-width"),Wl=wa("number-input-input-padding"),Hl=ga(Vl).add("0.5rem").toString(),Ul=wa("number-input-bg"),ql=wa("number-input-color"),Yl=wa("number-input-border-color"),Xl={[Vl.variable]:"sizes.6",[Wl.variable]:Hl},Gl=e=>{var t,n;return null!==(t=null===(n=Aa(hl.baseStyle,e))||void 0===n?void 0:n.field)&&void 0!==t?t:{}},Kl={width:Vl.reference},Zl={borderStart:"1px solid",borderStartColor:Yl.reference,color:ql.reference,bg:Ul.reference,[ql.variable]:"colors.chakra-body-text",[Yl.variable]:"colors.chakra-border-color",_dark:{[ql.variable]:"colors.whiteAlpha.800",[Yl.variable]:"colors.whiteAlpha.300"},_active:{[Ul.variable]:"colors.gray.200",_dark:{[Ul.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}};function Jl(e){var t,n,r;const o=null===(t=hl.sizes)||void 0===t?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},a=null!==(n=null===(r=o.field)||void 0===r?void 0:r.fontSize)&&void 0!==n?n:"md",s=Fl.fontSizes[a];return $l({field:at(at({},o.field),{},{paddingInlineEnd:Wl.reference,verticalAlign:"top"}),stepper:{fontSize:ga(s).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}const Ql=Ll({baseStyle:$l((e=>{var t;return{root:Xl,field:null!==(t=Aa(Gl,e))&&void 0!==t?t:{},stepperGroup:Kl,stepper:Zl}})),sizes:{xs:Jl("xs"),sm:Jl("sm"),md:Jl("md"),lg:Jl("lg")},variants:hl.variants,defaultProps:hl.defaultProps}),ec={baseStyle:at(at({},null===(st=hl.baseStyle)||void 0===st?void 0:st.field),{},{textAlign:"center"}),sizes:{lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},variants:{outline:e=>{var t,n,r;return null!==(t=null===(n=Aa(null===(r=hl.variants)||void 0===r?void 0:r.outline,e))||void 0===n?void 0:n.field)&&void 0!==t?t:{}},flushed:e=>{var t,n,r;return null!==(t=null===(n=Aa(null===(r=hl.variants)||void 0===r?void 0:r.flushed,e))||void 0===n?void 0:n.field)&&void 0!==t?t:{}},filled:e=>{var t,n,r;return null!==(t=null===(n=Aa(null===(r=hl.variants)||void 0===r?void 0:r.filled,e))||void 0===n?void 0:n.field)&&void 0!==t?t:{}},unstyled:null!==(mt=null===(vt=hl.variants)||void 0===vt?void 0:vt.unstyled.field)&&void 0!==mt?mt:{}},defaultProps:hl.defaultProps},{defineMultiStyleConfig:tc,definePartsStyle:nc}=qo(ji.keys),rc=wa("popper-bg"),oc=wa("popper-arrow-bg"),ic=wa("popper-arrow-shadow-color"),ac=tc({baseStyle:nc({popper:{zIndex:"popover"},content:{[rc.variable]:"colors.white",bg:rc.reference,[oc.variable]:rc.reference,[ic.variable]:"colors.gray.200",_dark:{[rc.variable]:"colors.gray.700",[ic.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},header:{px:3,py:2,borderBottomWidth:"1px"},body:{px:3,py:2},footer:{px:3,py:2,borderTopWidth:"1px"},closeButton:{position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2}})}),{defineMultiStyleConfig:sc,definePartsStyle:lc}=qo(Ti.keys),cc=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:o}=e,i=la(aa(),aa("1rem","rgba(0,0,0,0.1)"))(e),a=la(`${t}.500`,`${t}.200`)(e),s=`linear-gradient(\n to right,\n transparent 0%,\n ${ra(n,a)} 50%,\n transparent 100%\n )`;return at(at({},!r&&o&&i),r?{bgImage:s}:{bgColor:a})},uc={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},dc=e=>({bg:la("gray.100","whiteAlpha.300")(e)}),pc=e=>at({transitionProperty:"common",transitionDuration:"slow"},cc(e)),fc=lc((e=>({label:uc,filledTrack:pc(e),track:dc(e)}))),hc=sc({sizes:{xs:lc({track:{h:"1"}}),sm:lc({track:{h:"2"}}),md:lc({track:{h:"3"}}),lg:lc({track:{h:"4"}})},baseStyle:fc,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:mc,definePartsStyle:vc}=qo(Ai.keys),gc=e=>{var t;const n=null===(t=Aa(xs.baseStyle,e))||void 0===t?void 0:t.control;return at(at({},n),{},{borderRadius:"full",_checked:at(at({},null==n?void 0:n._checked),{},{_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}})})},bc=mc({baseStyle:vc((e=>{var t,n;return{label:null===(t=xs.baseStyle)||void 0===t?void 0:t.call(xs,e).label,container:null===(n=xs.baseStyle)||void 0===n?void 0:n.call(xs,e).container,control:gc(e)}})),sizes:{md:vc({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:vc({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:vc({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:yc,definePartsStyle:xc}=qo(Oi.keys),wc=si("select-bg"),kc={paddingInlineEnd:"8"},Sc=yc({baseStyle:xc({field:at(at({},null===(gt=hl.baseStyle)||void 0===gt?void 0:gt.field),{},{appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:wc.reference,[wc.variable]:"colors.white",_dark:{[wc.variable]:"colors.gray.700"},"> option, > optgroup":{bg:wc.reference}}),icon:{width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}}}),sizes:{lg:at(at({},null===(bt=hl.sizes)||void 0===bt?void 0:bt.lg),{},{field:at(at({},null===(yt=hl.sizes)||void 0===yt?void 0:yt.lg.field),kc)}),md:at(at({},null===(xt=hl.sizes)||void 0===xt?void 0:xt.md),{},{field:at(at({},null===(wt=hl.sizes)||void 0===wt?void 0:wt.md.field),kc)}),sm:at(at({},null===(kt=hl.sizes)||void 0===kt?void 0:kt.sm),{},{field:at(at({},null===(St=hl.sizes)||void 0===St?void 0:St.sm.field),kc)}),xs:at(at({},null===(Ct=hl.sizes)||void 0===Ct?void 0:Ct.xs),{},{field:at(at({},null===(_t=hl.sizes)||void 0===_t?void 0:_t.xs.field),kc),icon:{insetEnd:"1"}})},variants:hl.variants,defaultProps:hl.defaultProps}),Cc=si("skeleton-start-color"),_c=si("skeleton-end-color"),Ec={baseStyle:{[Cc.variable]:"colors.gray.100",[_c.variable]:"colors.gray.400",_dark:{[Cc.variable]:"colors.gray.800",[_c.variable]:"colors.gray.600"},background:Cc.reference,borderColor:_c.reference,opacity:.7,borderRadius:"sm"}},Pc=si("skip-link-bg"),jc={baseStyle:{borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Pc.variable]:"colors.white",_dark:{[Pc.variable]:"colors.gray.700"},bg:Pc.reference}}},{defineMultiStyleConfig:Tc,definePartsStyle:Ac}=qo(Ri.keys),Oc=si("slider-thumb-size"),Rc=si("slider-track-size"),Mc=si("slider-bg"),Nc=e=>{const{orientation:t}=e;return at({display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"}},ca({orientation:t,vertical:{h:"100%",px:ri(Oc.reference).divide(2).toString()},horizontal:{w:"100%",py:ri(Oc.reference).divide(2).toString()}}))},Ic=e=>at(at({},ca({orientation:e.orientation,horizontal:{h:Rc.reference},vertical:{w:Rc.reference}})),{},{overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),Dc=e=>{const{orientation:t}=e;return at(at({},ca({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}})),{},{w:Oc.reference,h:Oc.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}})},zc=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},Bc=Tc({baseStyle:Ac((e=>({container:Nc(e),track:Ic(e),thumb:Dc(e),filledTrack:zc(e)}))),sizes:{lg:Ac({container:{[Oc.variable]:"sizes.4",[Rc.variable]:"sizes.1"}}),md:Ac({container:{[Oc.variable]:"sizes.3.5",[Rc.variable]:"sizes.1"}}),sm:Ac({container:{[Oc.variable]:"sizes.2.5",[Rc.variable]:"sizes.0.5"}})},defaultProps:{size:"md",colorScheme:"blue"}}),Fc=wa("spinner-size"),Lc={baseStyle:{width:[Fc.reference],height:[Fc.reference]},sizes:{xs:{[Fc.variable]:"sizes.3"},sm:{[Fc.variable]:"sizes.4"},md:{[Fc.variable]:"sizes.6"},lg:{[Fc.variable]:"sizes.8"},xl:{[Fc.variable]:"sizes.12"}},defaultProps:{size:"md"}},{defineMultiStyleConfig:$c,definePartsStyle:Vc}=qo(Mi.keys),Wc=$c({baseStyle:Vc({container:{},label:{fontWeight:"medium"},helpText:{opacity:.8,marginBottom:"2"},number:{verticalAlign:"baseline",fontWeight:"semibold"},icon:{marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"}}),sizes:{md:Vc({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},defaultProps:{size:"md"}}),{defineMultiStyleConfig:Hc,definePartsStyle:Uc}=qo(["stepper","step","title","description","indicator","separator","icon","number"]),qc=si("stepper-indicator-size"),Yc=si("stepper-icon-size"),Xc=si("stepper-title-font-size"),Gc=si("stepper-description-font-size"),Kc=si("stepper-accent-color"),Zc=Hc({baseStyle:Uc((({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[Kc.variable]:`colors.${e}.500`,_dark:{[Kc.variable]:`colors.${e}.200`}},title:{fontSize:Xc.reference,fontWeight:"medium"},description:{fontSize:Gc.reference,color:"chakra-subtle-text"},number:{fontSize:Xc.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:Yc.reference,height:Yc.reference},indicator:{flexShrink:0,borderRadius:"full",width:qc.reference,height:qc.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:Kc.reference},"&[data-status=complete]":{bg:Kc.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:Kc.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${qc.reference} - 8px)`,top:`calc(${qc.reference} + 4px)`,insetStart:`calc(${qc.reference} / 2 - 1px)`}}}))),sizes:{xs:Uc({stepper:{[qc.variable]:"sizes.4",[Yc.variable]:"sizes.3",[Xc.variable]:"fontSizes.xs",[Gc.variable]:"fontSizes.xs"}}),sm:Uc({stepper:{[qc.variable]:"sizes.6",[Yc.variable]:"sizes.4",[Xc.variable]:"fontSizes.sm",[Gc.variable]:"fontSizes.xs"}}),md:Uc({stepper:{[qc.variable]:"sizes.8",[Yc.variable]:"sizes.5",[Xc.variable]:"fontSizes.md",[Gc.variable]:"fontSizes.sm"}}),lg:Uc({stepper:{[qc.variable]:"sizes.10",[Yc.variable]:"sizes.6",[Xc.variable]:"fontSizes.lg",[Gc.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Jc,definePartsStyle:Qc}=qo(Ni.keys),eu=wa("switch-track-width"),tu=wa("switch-track-height"),nu=wa("switch-track-diff"),ru=ga.subtract(eu,tu),ou=wa("switch-thumb-x"),iu=wa("switch-bg"),au=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[eu.reference],height:[tu.reference],transitionProperty:"common",transitionDuration:"fast",[iu.variable]:"colors.gray.300",_dark:{[iu.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[iu.variable]:`colors.${t}.500`,_dark:{[iu.variable]:`colors.${t}.200`}},bg:iu.reference}},su={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[tu.reference],height:[tu.reference],_checked:{transform:`translateX(${ou.reference})`}},lu=Jc({baseStyle:Qc((e=>({container:{[nu.variable]:ru,[ou.variable]:nu.reference,_rtl:{[ou.variable]:ga(nu).negate().toString()}},track:au(e),thumb:su}))),sizes:{sm:Qc({container:{[eu.variable]:"1.375rem",[tu.variable]:"sizes.3"}}),md:Qc({container:{[eu.variable]:"1.875rem",[tu.variable]:"sizes.4"}}),lg:Qc({container:{[eu.variable]:"2.875rem",[tu.variable]:"sizes.6"}})},defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:cu,definePartsStyle:uu}=qo(Ii.keys),du=uu({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),pu={"&[data-is-numeric=true]":{textAlign:"end"}},fu=cu({baseStyle:du,variants:{simple:uu((e=>{const{colorScheme:t}=e;return{th:at({color:la("gray.600","gray.400")(e),borderBottom:"1px",borderColor:la(`${t}.100`,`${t}.700`)(e)},pu),td:at({borderBottom:"1px",borderColor:la(`${t}.100`,`${t}.700`)(e)},pu),caption:{color:la("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}})),striped:uu((e=>{const{colorScheme:t}=e;return{th:at({color:la("gray.600","gray.400")(e),borderBottom:"1px",borderColor:la(`${t}.100`,`${t}.700`)(e)},pu),td:at({borderBottom:"1px",borderColor:la(`${t}.100`,`${t}.700`)(e)},pu),caption:{color:la("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:la(`${t}.100`,`${t}.700`)(e)},td:{background:la(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}})),unstyled:{}},sizes:{sm:uu({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:uu({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:uu({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),hu=si("tabs-color"),mu=si("tabs-bg"),vu=si("tabs-border-color"),{defineMultiStyleConfig:gu,definePartsStyle:bu}=qo(Di.keys),yu=e=>{const{orientation:t}=e;return{display:"vertical"===t?"flex":"block"}},xu=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},wu=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:"vertical"===n?"column":"row"}},ku={p:4},Su=bu((e=>({root:yu(e),tab:xu(e),tablist:wu(e),tabpanel:ku}))),Cu={sm:bu({tab:{py:1,px:4,fontSize:"sm"}}),md:bu({tab:{fontSize:"md",py:2,px:4}}),lg:bu({tab:{fontSize:"lg",py:3,px:4}})},_u=bu((e=>{const{colorScheme:t,orientation:n}=e,r="vertical"===n,o=r?"borderStart":"borderBottom";return{tablist:{[o]:"2px solid",borderColor:"inherit"},tab:{[o]:"2px solid",borderColor:"transparent",[r?"marginStart":"marginBottom"]:"-2px",_selected:{[hu.variable]:`colors.${t}.600`,_dark:{[hu.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[mu.variable]:"colors.gray.200",_dark:{[mu.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:hu.reference,bg:mu.reference}}})),Eu=bu((e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[vu.variable]:"transparent",_selected:{[hu.variable]:`colors.${t}.600`,[vu.variable]:"colors.white",_dark:{[hu.variable]:`colors.${t}.300`,[vu.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:vu.reference},color:hu.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}})),Pu=bu((e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[mu.variable]:"colors.gray.50",_dark:{[mu.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[mu.variable]:"colors.white",[hu.variable]:`colors.${t}.600`,_dark:{[mu.variable]:"colors.gray.800",[hu.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:hu.reference,bg:mu.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}})),ju=bu((e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:ra(n,`${t}.700`),bg:ra(n,`${t}.100`)}}}})),Tu=gu({baseStyle:Su,sizes:Cu,variants:{line:_u,enclosed:Eu,"enclosed-colored":Pu,"soft-rounded":ju,"solid-rounded":bu((e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[hu.variable]:"colors.gray.600",_dark:{[hu.variable]:"inherit"},_selected:{[hu.variable]:"colors.white",[mu.variable]:`colors.${t}.600`,_dark:{[hu.variable]:"colors.gray.800",[mu.variable]:`colors.${t}.300`}},color:hu.reference,bg:mu.reference}}})),unstyled:bu({})},defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Au,definePartsStyle:Ou}=qo(zi.keys),Ru=si("tag-bg"),Mu=si("tag-color"),Nu=si("tag-shadow"),Iu=si("tag-min-height"),Du=si("tag-min-width"),zu=si("tag-font-size"),Bu=si("tag-padding-inline"),Fu=Ou({container:{fontWeight:"medium",lineHeight:1.2,outline:0,[Mu.variable]:Wa.color.reference,[Ru.variable]:Wa.bg.reference,[Nu.variable]:Wa.shadow.reference,color:Mu.reference,bg:Ru.reference,boxShadow:Nu.reference,borderRadius:"md",minH:Iu.reference,minW:Du.reference,fontSize:zu.reference,px:Bu.reference,_focusVisible:{[Nu.variable]:"shadows.outline"}},label:{lineHeight:1.2,overflow:"visible"},closeButton:{fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}}}),Lu={sm:Ou({container:{[Iu.variable]:"sizes.5",[Du.variable]:"sizes.5",[zu.variable]:"fontSizes.xs",[Bu.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Ou({container:{[Iu.variable]:"sizes.6",[Du.variable]:"sizes.6",[zu.variable]:"fontSizes.sm",[Bu.variable]:"space.2"}}),lg:Ou({container:{[Iu.variable]:"sizes.8",[Du.variable]:"sizes.8",[zu.variable]:"fontSizes.md",[Bu.variable]:"space.3"}})},$u=Au({variants:{subtle:Ou((e=>{var t;return{container:null===(t=Ya.variants)||void 0===t?void 0:t.subtle(e)}})),solid:Ou((e=>{var t;return{container:null===(t=Ya.variants)||void 0===t?void 0:t.solid(e)}})),outline:Ou((e=>{var t;return{container:null===(t=Ya.variants)||void 0===t?void 0:t.outline(e)}}))},baseStyle:Fu,sizes:Lu,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),Vu=at(at({},null===(Et=hl.baseStyle)||void 0===Et?void 0:Et.field),{},{paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"}),Wu={outline:e=>{var t,n;return null!==(t=null===(n=hl.variants)||void 0===n?void 0:n.outline(e).field)&&void 0!==t?t:{}},flushed:e=>{var t,n;return null!==(t=null===(n=hl.variants)||void 0===n?void 0:n.flushed(e).field)&&void 0!==t?t:{}},filled:e=>{var t,n;return null!==(t=null===(n=hl.variants)||void 0===n?void 0:n.filled(e).field)&&void 0!==t?t:{}},unstyled:null!==(Pt=null===(jt=hl.variants)||void 0===jt?void 0:jt.unstyled.field)&&void 0!==Pt?Pt:{}},Hu={baseStyle:Vu,sizes:{xs:null!==(Tt=null===(At=hl.sizes)||void 0===At?void 0:At.xs.field)&&void 0!==Tt?Tt:{},sm:null!==(Ot=null===(Rt=hl.sizes)||void 0===Rt?void 0:Rt.sm.field)&&void 0!==Ot?Ot:{},md:null!==(Mt=null===(Nt=hl.sizes)||void 0===Nt?void 0:Nt.md.field)&&void 0!==Mt?Mt:{},lg:null!==(It=null===(Dt=hl.sizes)||void 0===Dt?void 0:Dt.lg.field)&&void 0!==It?It:{}},variants:Wu,defaultProps:{size:"md",variant:"outline"}},Uu=wa("tooltip-bg"),qu=wa("tooltip-fg"),Yu=wa("popper-arrow-bg"),Xu={bg:Uu.reference,color:qu.reference,[Uu.variable]:"colors.gray.700",[qu.variable]:"colors.whiteAlpha.900",_dark:{[Uu.variable]:"colors.gray.300",[qu.variable]:"colors.gray.900"},[Yu.variable]:Uu.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Gu={Accordion:$i,Alert:Pa,Avatar:Va,Badge:Ya,Breadcrumb:Za,Button:ts,Checkbox:xs,CloseButton:Ss,Code:Es,Container:Ps,Divider:js,Drawer:$s,Editable:Hs,Form:Xs,FormError:Js,FormLabel:Qs,Heading:el,Input:hl,Kbd:vl,Link:gl,List:xl,Menu:_l,Modal:Bl,NumberInput:Ql,PinInput:ec,Popover:ac,Progress:hc,Radio:bc,Select:Sc,Skeleton:Ec,SkipLink:jc,Slider:Bc,Spinner:Lc,Stat:Wc,Switch:lu,Table:fu,Tabs:Tu,Tag:$u,Textarea:Hu,Tooltip:{baseStyle:Xu},Card:ps,Stepper:Zc},Ku={property:{common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},easing:{"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},duration:{"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"}},Zu=at(at({breakpoints:{base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},zIndices:{hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},radii:{none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},blur:{none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},colors:{transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"}}},Fl),{},{sizes:Ta,shadows:{xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},space:ja,borders:{none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},transition:Ku}),Ju=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];const Qu=it("aa",at(at({semanticTokens:{colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},direction:"ltr"},Zu),{},{components:Gu,styles:{global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color"}}},config:{useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"}}));var ed=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?hd(Cd,--kd):0,xd--,10===Sd&&(xd=1,yd--),Sd}function jd(){return Sd=kd2||Rd(Sd)>3?"":" "}function zd(e,t){for(;--t&&jd()&&!(Sd<48||Sd>102||Sd>57&&Sd<65||Sd>70&&Sd<97););return Od(e,Ad()+(t<6&&32==Td()&&32==jd()))}function Bd(e){for(;jd();)switch(Sd){case e:return kd;case 34:case 39:34!==e&&39!==e&&Bd(Sd);break;case 40:41===e&&Bd(e);break;case 92:jd()}return kd}function Fd(e,t){for(;jd()&&e+Sd!==57&&(e+Sd!==84||47!==Td()););return"/*"+Od(t,kd-1)+"*"+cd(47===e?e:jd())}function Ld(e){for(;!Rd(Td());)jd();return Od(e,kd)}function $d(e){return Nd(Vd("",null,null,null,[""],e=Md(e),0,[0],e))}function Vd(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,p=0,f=0,h=0,m=1,v=1,g=1,b=0,y="",x=o,w=i,k=r,S=y;v;)switch(h=b,b=jd()){case 40:if(108!=h&&58==hd(S,d-1)){-1!=fd(S+=pd(Id(b),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:S+=Id(b);break;case 9:case 10:case 13:case 32:S+=Dd(h);break;case 92:S+=zd(Ad()-1,7);continue;case 47:switch(Td()){case 42:case 47:bd(Hd(Fd(jd(),Ad()),t,n),l);break;default:S+="/"}break;case 123*m:s[c++]=vd(S)*g;case 125*m:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+u:-1==g&&(S=pd(S,/\f/g,"")),f>0&&vd(S)-d&&bd(f>32?Ud(S+";",r,n,d-1):Ud(pd(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(bd(k=Wd(S,t,n,c,u,o,s,y,x=[],w=[],d),i),123===b)if(0===u)Vd(S,t,k,k,x,i,d,s,w);else switch(99===p&&110===hd(S,3)?100:p){case 100:case 108:case 109:case 115:Vd(e,k,k,r&&bd(Wd(e,k,k,0,0,o,s,y,o,x=[],d),w),o,w,d,s,r?x:w);break;default:Vd(S,k,k,k,[""],w,0,s,w)}}c=u=f=0,m=g=1,y=S="",d=a;break;case 58:d=1+vd(S),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==Pd())continue;switch(S+=cd(b),b*m){case 38:g=u>0?1:(S+="\f",-1);break;case 44:s[c++]=(vd(S)-1)*g,g=1;break;case 64:45===Td()&&(S+=Id(jd())),p=Td(),u=d=vd(y=S+=Ld(Ad())),b++;break;case 45:45===h&&2==vd(S)&&(m=0)}}return i}function Wd(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,p=0===o?i:[""],f=gd(p),h=0,m=0,v=0;h0?p[g]+" "+b:pd(b,/&\f/g,p[g])))&&(l[v++]=y);return _d(e,t,n,0===o?id:s,l,c,u)}function Hd(e,t,n){return _d(e,t,n,od,cd(Sd),md(e,2,-2),0)}function Ud(e,t,n,r){return _d(e,t,n,ad,md(e,0,r),md(e,r+1,-1),r)}function qd(e,t){for(var n="",r=gd(e),o=0;o6)switch(hd(e,t+1)){case 109:if(45!==hd(e,t+4))break;case 102:return pd(e,/(.+:)(.+)-([^]+)/,"$1"+rd+"$2-$3$1"+nd+(108==hd(e,t+3)?"$3":"$2-$3"))+e;case 115:return~fd(e,"stretch")?tp(pd(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==hd(e,t+1))break;case 6444:switch(hd(e,vd(e)-3-(~fd(e,"!important")&&10))){case 107:return pd(e,":",":"+rd)+e;case 101:return pd(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+rd+(45===hd(e,14)?"inline-":"")+"box$3$1"+rd+"$2$3$1"+td+"$2box$3")+e}break;case 5936:switch(hd(e,t+11)){case 114:return rd+e+td+pd(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return rd+e+td+pd(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return rd+e+td+pd(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return rd+e+td+e+e}return e}var np=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ad:e.return=tp(e.value,e.length);break;case sd:return qd([Ed(e,{value:pd(e.value,"@","@"+rd)})],r);case id:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return qd([Ed(e,{props:[pd(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return qd([Ed(e,{props:[pd(t,/:(plac\w+)/,":"+rd+"input-$1")]}),Ed(e,{props:[pd(t,/:(plac\w+)/,":-moz-$1")]}),Ed(e,{props:[pd(t,/:(plac\w+)/,td+"input-$1")]})],r)}return""}))}}],rp=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,o,i=e.stylisPlugins||np,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:Sp}}var Ep=!!pt.useInsertionEffect&&pt.useInsertionEffect,Pp=Ep||function(e){return e()},jp=Ep||ct.useLayoutEffect,Tp=ct.createContext("undefined"!=typeof HTMLElement?rp({key:"css"}):null);Tp.Provider;var Ap,Op,Rp=function(e){return ct.forwardRef((function(t,n){var r=ct.useContext(Tp);return e(t,r,n)}))},Mp=ct.createContext({}),Np=Xd((function(e){return Xd((function(t){return function(e,t){return"function"==typeof t?t(e):op({},e,t)}(e,t)}))})),Ip=function(e){var t=ct.useContext(Mp);return e.theme!==t&&(t=Np(t)(e.theme)),ct.createElement(Mp.Provider,{value:t},e.children)},Dp={}.hasOwnProperty,zp="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Bp=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return fp(t,n,r),Pp((function(){return hp(t,n,r)})),null},Fp=Rp((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[zp],i=[r],a="";"string"==typeof e.className?a=pp(t.registered,i,e.className):null!=e.className&&(a=e.className+" ");var s=_p(i,void 0,ct.useContext(Mp));a+=t.key+"-"+s.name;var l={};for(var c in e)Dp.call(e,c)&&"css"!==c&&c!==zp&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),ct.createElement(ct.Fragment,null,ct.createElement(Bp,{cache:t,serialized:s,isStringTag:"string"==typeof o}),ct.createElement(o,l))})),Lp=function(e,t){var n=arguments;if(null==t||!Dp.call(t,"css"))return ct.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=Fp,o[1]=function(e,t){var n={};for(var r in t)Dp.call(t,r)&&(n[r]=t[r]);return n[zp]=e,n}(e,t);for(var i=2;i{},Zp=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?ct.useLayoutEffect:ct.useEffect;function Jp(e,t){return"cookie"===e.type&&e.ssr?e.get(t):t}const Qp=Rp((function(e,t){const{value:n,children:r,options:{useSystemColorMode:o,initialColorMode:i,disableTransitionOnChange:a}={},colorModeManager:s=Xp}=e,l="dark"===i?"dark":"light",[c,u]=ct.useState((()=>Jp(s,l))),[d,p]=ct.useState((()=>Jp(s))),{getSystemTheme:f,setClassName:h,setDataset:m,addListener:v}=ct.useMemo((()=>function(e={}){const{preventTransition:t=!0,nonce:n}=e,r={setDataset:e=>{const n=t?r.preventTransition():void 0;document.documentElement.dataset.theme=e,document.documentElement.style.colorScheme=e,null==n||n()},setClassName(e){document.body.classList.add(e?Yp:qp),document.body.classList.remove(e?qp:Yp)},query:()=>window.matchMedia("(prefers-color-scheme: dark)"),getSystemTheme(e){var t;return(null!==(t=r.query().matches)&&void 0!==t?t:"dark"===e)?"dark":"light"},addListener(e){const t=r.query(),n=t=>{e(t.matches?"dark":"light")};return"function"==typeof t.addListener?t.addListener(n):t.addEventListener("change",n),()=>{"function"==typeof t.removeListener?t.removeListener(n):t.removeEventListener("change",n)}},preventTransition(){const e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),void 0!==n&&(e.nonce=n),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),requestAnimationFrame((()=>{requestAnimationFrame((()=>{document.head.removeChild(e)}))}))}}};return r}({preventTransition:a,nonce:null==t?void 0:t.nonce})),[a,null==t?void 0:t.nonce]),g="system"!==i||c?c:d,b=ct.useCallback((e=>{const t="system"===e?f():e;u(t),h("dark"===t),m(t),s.set(t)}),[s,f,h,m]);Zp((()=>{"system"===i&&p(f())}),[]),ct.useEffect((()=>{const e=s.get();b(e||("system"!==i?l:"system"))}),[s,l,i,b]);const y=ct.useCallback((()=>{b("dark"===g?"light":"dark")}),[g,b]);ct.useEffect((()=>{if(o)return v(b)}),[o,v,b]);const x=ct.useMemo((()=>({colorMode:null!=n?n:g,toggleColorMode:n?Kp:y,setColorMode:n?Kp:b,forced:void 0!==n})),[g,y,b,n]);return Vt.jsx(Hp.Provider,{value:x,children:r})}));Qp.displayName="ColorModeProvider";const ef=String.raw,tf=ef(e||(e=n` + :root, + :host { + --chakra-vh: 100vh; + } + + @supports (height: -webkit-fill-available) { + :root, + :host { + --chakra-vh: -webkit-fill-available; + } + } + + @supports (height: -moz-fill-available) { + :root, + :host { + --chakra-vh: -moz-fill-available; + } + } + + @supports (height: 100dvh) { + :root, + :host { + --chakra-vh: 100dvh; + } + } +`)),nf=()=>Vt.jsx($p,{styles:tf}),rf=({scope:e=""})=>Vt.jsx($p,{styles:ef(t||(t=n` + html { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + font-family: system-ui, sans-serif; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + touch-action: manipulation; + } + + body { + position: relative; + min-height: 100%; + margin: 0; + font-feature-settings: "kern"; + } + + ${0} :where(*, *::before, *::after) { + border-width: 0; + border-style: solid; + box-sizing: border-box; + word-wrap: break-word; + } + + main { + display: block; + } + + ${0} hr { + border-top-width: 1px; + box-sizing: content-box; + height: 0; + overflow: visible; + } + + ${0} :where(pre, code, kbd,samp) { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; + font-size: 1em; + } + + ${0} a { + background-color: transparent; + color: inherit; + text-decoration: inherit; + } + + ${0} abbr[title] { + border-bottom: none; + text-decoration: underline; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + + ${0} :where(b, strong) { + font-weight: bold; + } + + ${0} small { + font-size: 80%; + } + + ${0} :where(sub,sup) { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + ${0} sub { + bottom: -0.25em; + } + + ${0} sup { + top: -0.5em; + } + + ${0} img { + border-style: none; + } + + ${0} :where(button, input, optgroup, select, textarea) { + font-family: inherit; + font-size: 100%; + line-height: 1.15; + margin: 0; + } + + ${0} :where(button, input) { + overflow: visible; + } + + ${0} :where(button, select) { + text-transform: none; + } + + ${0} :where( + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner + ) { + border-style: none; + padding: 0; + } + + ${0} fieldset { + padding: 0.35em 0.75em 0.625em; + } + + ${0} legend { + box-sizing: border-box; + color: inherit; + display: table; + max-width: 100%; + padding: 0; + white-space: normal; + } + + ${0} progress { + vertical-align: baseline; + } + + ${0} textarea { + overflow: auto; + } + + ${0} :where([type="checkbox"], [type="radio"]) { + box-sizing: border-box; + padding: 0; + } + + ${0} input[type="number"]::-webkit-inner-spin-button, + ${0} input[type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none !important; + } + + ${0} input[type="number"] { + -moz-appearance: textfield; + } + + ${0} input[type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; + } + + ${0} input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none !important; + } + + ${0} ::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; + } + + ${0} details { + display: block; + } + + ${0} summary { + display: list-item; + } + + template { + display: none; + } + + [hidden] { + display: none !important; + } + + ${0} :where( + blockquote, + dl, + dd, + h1, + h2, + h3, + h4, + h5, + h6, + hr, + figure, + p, + pre + ) { + margin: 0; + } + + ${0} button { + background: transparent; + padding: 0; + } + + ${0} fieldset { + margin: 0; + padding: 0; + } + + ${0} :where(ol, ul) { + margin: 0; + padding: 0; + } + + ${0} textarea { + resize: vertical; + } + + ${0} :where(button, [role="button"]) { + cursor: pointer; + } + + ${0} button::-moz-focus-inner { + border: 0 !important; + } + + ${0} table { + border-collapse: collapse; + } + + ${0} :where(h1, h2, h3, h4, h5, h6) { + font-size: inherit; + font-weight: inherit; + } + + ${0} :where(button, input, optgroup, select, textarea) { + padding: 0; + line-height: inherit; + color: inherit; + } + + ${0} :where(img, svg, video, canvas, audio, iframe, embed, object) { + display: block; + } + + ${0} :where(img, video) { + max-width: 100%; + height: auto; + } + + [data-js-focus-visible] + :focus:not([data-focus-visible-added]):not( + [data-focus-visible-disabled] + ) { + outline: none; + box-shadow: none; + } + + ${0} select::-ms-expand { + display: none; + } + + ${0} + `),e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,tf)});function of(e){const{cssVarsRoot:t,theme:n,children:r}=e,o=ct.useMemo((()=>pi(n)),[n]);return Vt.jsxs(Ip,{theme:o,children:[Vt.jsx(af,{root:t}),r]})}function af({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return Vt.jsx($p,{styles:e=>({[t]:e.__cssVars})})}function sf(){const{colorMode:e}=Up();return Vt.jsx($p,{styles:t=>{const n=Rn(kn(t,"styles.global"),{theme:t,colorMode:e});if(!n)return;return Uo(n)(t)}})}hn({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});const[lf,cf]=hn({strict:!1,name:"PortalManagerContext"});function uf(e){const{children:t,zIndex:n}=e;return Vt.jsx(lf,{value:{zIndex:n},children:t})}uf.displayName="PortalManager";const df=ct.createContext({getDocument:()=>document,getWindow:()=>window});function pf(e){const{children:t,environment:n,disabled:r}=e,o=ct.useRef(null),i=ct.useMemo((()=>n||{getDocument:()=>{var e,t;return null!==(e=null===(t=o.current)||void 0===t?void 0:t.ownerDocument)&&void 0!==e?e:document},getWindow:()=>{var e,t;return null!==(e=null===(t=o.current)||void 0===t?void 0:t.ownerDocument.defaultView)&&void 0!==e?e:window}}),[n]),a=!r||!n;return Vt.jsxs(df.Provider,{value:i,children:[t,a&&Vt.jsx("span",{id:"__chakra_env",hidden:!0,ref:o})]})}df.displayName="EnvironmentContext",pf.displayName="EnvironmentProvider";const ff=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetScope:o,resetCSS:i=!0,theme:a={},environment:s,cssVarsRoot:l,disableEnvironment:c,disableGlobalStyle:u}=e,d=Vt.jsx(pf,{environment:s,disabled:c,children:t});return Vt.jsx(of,{theme:a,cssVarsRoot:l,children:Vt.jsxs(Qp,{colorModeManager:n,options:a.config,children:[i?Vt.jsx(rf,{scope:o}):Vt.jsx(nf,{}),!u&&Vt.jsx(sf,{}),r?Vt.jsx(uf,{zIndex:r,children:d}):d]})})},hf=ct.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),mf=ct.createContext({}),vf=ct.createContext(null),gf="undefined"!=typeof document,bf=gf?ct.useLayoutEffect:ct.useEffect,yf=ct.createContext({strict:!1}),xf=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),wf="data-"+xf("framerAppearId");function kf(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Sf(e){return"string"==typeof e||Array.isArray(e)}function Cf(e){return"object"==typeof e&&"function"==typeof e.start}const _f=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ef=["initial",..._f];function Pf(e){return Cf(e.animate)||Ef.some((t=>Sf(e[t])))}function jf(e){return Boolean(Pf(e)||e.variants)}function Tf(e){const{initial:t,animate:n}=function(e,t){if(Pf(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Sf(t)?t:void 0,animate:Sf(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,ct.useContext(mf));return ct.useMemo((()=>({initial:t,animate:n})),[Af(t),Af(n)])}function Af(e){return Array.isArray(e)?e.join(" "):e}const Of={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Rf={};for(const e in Of)Rf[e]={isEnabled:t=>Of[e].some((e=>!!t[e]))};const Mf=ct.createContext({}),Nf=ct.createContext({}),If=Symbol.for("motionComponentSymbol");function Df({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&function(e){for(const t in e)Rf[t]=at(at({},Rf[t]),e[t])}(e);const i=ct.forwardRef((function(i,a){let s;const l=at(at(at({},ct.useContext(hf)),i),{},{layoutId:zf(i)}),{isStatic:c}=l,u=Tf(i),d=r(i,c);if(!c&&gf){u.visualElement=function(e,t,n,r){const{visualElement:o}=ct.useContext(mf),i=ct.useContext(yf),a=ct.useContext(vf),s=ct.useContext(hf).reducedMotion,l=ct.useRef();r=r||i.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:!!a&&!1===a.initial,reducedMotionConfig:s}));const c=l.current;ct.useInsertionEffect((()=>{c&&c.update(n,a)}));const u=ct.useRef(Boolean(n[wf]&&!window.HandoffComplete));return bf((()=>{c&&(c.render(),u.current&&c.animationState&&c.animationState.animateChanges())})),ct.useEffect((()=>{c&&(c.updateFeatures(),!u.current&&c.animationState&&c.animationState.animateChanges(),u.current&&(u.current=!1,window.HandoffComplete=!0))})),c}(o,d,l,t);const n=ct.useContext(Nf),r=ct.useContext(yf).strict;u.visualElement&&(s=u.visualElement.loadFeatures(l,r,e,n))}return ct.createElement(mf.Provider,{value:u},s&&u.visualElement?ct.createElement(s,at({visualElement:u.visualElement},l)):null,n(o,i,function(e,t,n){return ct.useCallback((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):kf(n)&&(n.current=r))}),[t])}(d,u.visualElement,a),d,c,u.visualElement))}));return i[If]=o,i}function zf({layoutId:e}){const t=ct.useContext(Mf).id;return t&&void 0!==e?t+"-"+e:e}function Bf(e){function t(t,n={}){return Df(e(t,n))}if("undefined"==typeof Proxy)return t;const n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}const Ff=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Lf(e){return"string"==typeof e&&!e.includes("-")&&!!(Ff.indexOf(e)>-1||/[A-Z]/.test(e))}const $f={};const Vf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Wf=new Set(Vf);function Hf(e,{layout:t,layoutId:n}){return Wf.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!$f[e]||"opacity"===e)}const Uf=e=>Boolean(e&&e.getVelocity),qf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Yf=Vf.length;const Xf=e=>t=>"string"==typeof t&&t.startsWith(e),Gf=Xf("--"),Kf=Xf("var(--"),Zf=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Jf=(e,t,n)=>Math.min(Math.max(n,e),t),Qf={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},eh=at(at({},Qf),{},{transform:e=>Jf(0,1,e)}),th=at(at({},Qf),{},{default:1}),nh=e=>Math.round(1e5*e)/1e5,rh=/(-)?([\d]*\.?[\d])+/g,oh=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,ih=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ah(e){return"string"==typeof e}const sh=e=>({test:t=>ah(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),lh=sh("deg"),ch=sh("%"),uh=sh("px"),dh=sh("vh"),ph=sh("vw"),fh=at(at({},ch),{},{parse:e=>ch.parse(e)/100,transform:e=>ch.transform(100*e)}),hh=at(at({},Qf),{},{transform:Math.round}),mh={borderWidth:uh,borderTopWidth:uh,borderRightWidth:uh,borderBottomWidth:uh,borderLeftWidth:uh,borderRadius:uh,radius:uh,borderTopLeftRadius:uh,borderTopRightRadius:uh,borderBottomRightRadius:uh,borderBottomLeftRadius:uh,width:uh,maxWidth:uh,height:uh,maxHeight:uh,size:uh,top:uh,right:uh,bottom:uh,left:uh,padding:uh,paddingTop:uh,paddingRight:uh,paddingBottom:uh,paddingLeft:uh,margin:uh,marginTop:uh,marginRight:uh,marginBottom:uh,marginLeft:uh,rotate:lh,rotateX:lh,rotateY:lh,rotateZ:lh,scale:th,scaleX:th,scaleY:th,scaleZ:th,skew:lh,skewX:lh,skewY:lh,distance:uh,translateX:uh,translateY:uh,translateZ:uh,x:uh,y:uh,z:uh,perspective:uh,transformPerspective:uh,opacity:eh,originX:fh,originY:fh,originZ:uh,zIndex:hh,fillOpacity:eh,strokeOpacity:eh,numOctaves:hh};function vh(e,t,n,r){const{style:o,vars:i,transform:a,transformOrigin:s}=e;let l=!1,c=!1,u=!0;for(const d in t){const e=t[d];if(Gf(d)){i[d]=e;continue}const n=mh[d],r=Zf(e,n);if(Wf.has(d)){if(l=!0,a[d]=r,!u)continue;e!==(n.default||0)&&(u=!1)}else d.startsWith("origin")?(c=!0,s[d]=r):o[d]=r}if(t.transform||(l||r?o.transform=function(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let i="";for(let a=0;a({style:{},transform:{},transformOrigin:{},vars:{}});function bh(e,t,n){for(const r in t)Uf(t[r])||Hf(r,n)||(e[r]=t[r])}function yh(e,t,n){const r={};return bh(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},t,n){return ct.useMemo((()=>{const r=gh();return vh(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)}),[t])}(e,t,n)),e.transformValues?e.transformValues(r):r}function xh(e,t,n){const r={},o=yh(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const wh=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function kh(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||wh.has(e)}let Sh=e=>!kh(e);try{(Ch=require("@emotion/is-prop-valid").default)&&(Sh=e=>e.startsWith("on")?!kh(e):Ch(e))}catch(DA){}var Ch;function _h(e,t,n){return"string"==typeof e?e:uh.transform(t+n*e)}const Eh={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ph={offset:"strokeDashoffset",array:"strokeDasharray"};function jh(e,t,n,r,i){let{attrX:a,attrY:s,attrScale:l,originX:c,originY:u,pathLength:d,pathSpacing:p=1,pathOffset:f=0}=t;if(vh(e,ot(t,o),n,i),r)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:h,style:m,dimensions:v}=e;h.transform&&(v&&(m.transform=h.transform),delete h.transform),v&&(void 0!==c||void 0!==u||m.transform)&&(m.transformOrigin=function(e,t,n){return`${_h(t,e.x,e.width)} ${_h(n,e.y,e.height)}`}(v,void 0!==c?c:.5,void 0!==u?u:.5)),void 0!==a&&(h.x=a),void 0!==s&&(h.y=s),void 0!==l&&(h.scale=l),void 0!==d&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Eh:Ph;e[i.offset]=uh.transform(-r);const a=uh.transform(t),s=uh.transform(n);e[i.array]=`${a} ${s}`}(h,d,p,f,!1)}const Th=()=>at(at({},gh()),{},{attrs:{}}),Ah=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Oh(e,t,n,r){const o=ct.useMemo((()=>{const n=Th();return jh(n,t,{enableHardwareAcceleration:!1},Ah(r),e.transformTemplate),at(at({},n.attrs),{},{style:at({},n.style)})}),[t]);if(e.style){const t={};bh(t,e.style,e),o.style=at(at({},t),o.style)}return o}function Rh(e=!1){return(t,n,r,{latestValues:o},i)=>{const a=(Lf(t)?Oh:xh)(n,o,i,t),s=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(Sh(o)||!0===n&&kh(o)||!t&&!kh(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),l=at(at(at({},s),a),{},{ref:r}),{children:c}=n,u=ct.useMemo((()=>Uf(c)?c.get():c),[c]);return ct.createElement(t,at(at({},l),{},{children:u}))}}function Mh(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Nh=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ih(e,t,n,r){Mh(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Nh.has(o)?o:xf(o),t.attrs[o])}function Dh(e,t){const{style:n}=e,r={};for(const o in n)(Uf(n[o])||t.style&&Uf(t.style[o])||Hf(o,e))&&(r[o]=n[o]);return r}function zh(e,t){const n=Dh(e,t);for(const r in e)if(Uf(e[r])||Uf(t[r])){n[-1!==Vf.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]}return n}function Bh(e,t,n,r={},o={}){return"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),"string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),t}function Fh(e){const t=ct.useRef(null);return null===t.current&&(t.current=e()),t.current}const Lh=e=>Array.isArray(e),$h=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),Vh=e=>Lh(e)?e[e.length-1]||0:e;function Wh(e){const t=Uf(e)?e.get():e;return $h(t)?t.toValue():t}const Hh=e=>(t,n)=>{const r=ct.useContext(mf),o=ct.useContext(vf),i=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const a={latestValues:Uh(r,o,i,e),renderState:t()};return n&&(a.mount=e=>n(r,e,a)),a}(e,t,r,o);return n?i():Fh(i)};function Uh(e,t,n,r){const o={},a=r(e,{});for(const i in a)o[i]=Wh(a[i]);let{initial:s,animate:l}=e;const c=Pf(e),u=jf(e);t&&u&&!c&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===l&&(l=t.animate));let d=!!n&&!1===n.initial;d=d||!1===s;const p=d?l:s;if(p&&"boolean"!=typeof p&&!Cf(p)){(Array.isArray(p)?p:[p]).forEach((t=>{const n=Bh(e,t);if(!n)return;const{transitionEnd:r,transition:a}=n,s=ot(n,i);for(const e in s){let t=s[e];if(Array.isArray(t)){t=t[d?t.length-1:0]}null!==t&&(o[e]=t)}for(const e in r)o[e]=r[e]}))}return o}const qh=e=>e;class Yh{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const t=this.order.indexOf(e);-1!==t&&(this.order.splice(t,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}const Xh=["prepare","read","update","preRender","render","postRender"];const{schedule:Gh,cancel:Kh,state:Zh,steps:Jh}=function(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=Xh.reduce(((e,t)=>(e[t]=function(e){let t=new Yh,n=new Yh,r=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(e,i=!1,s=!1)=>{const l=s&&o,c=l?t:n;return i&&a.add(e),c.add(e)&&l&&o&&(r=t.order.length),e},cancel:e=>{n.remove(e),a.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let n=0;nn=!0)),e)),{}),a=e=>i[e].process(o),s=()=>{const i=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,Xh.forEach(a),o.isProcessing=!1,n&&t&&(r=!1,e(s))},l=Xh.reduce(((t,a)=>{const l=i[a];return t[a]=(t,i=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(s)),l.schedule(t,i,a)),t}),{});return{schedule:l,cancel:e=>Xh.forEach((t=>i[t].cancel(e))),state:o,steps:i}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:qh,!0),Qh={useVisualState:Hh({scrapeMotionValuesFromProps:zh,createRenderState:Th,onMount:(e,t,{renderState:n,latestValues:r})=>{Gh.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}})),Gh.render((()=>{jh(n,r,{enableHardwareAcceleration:!1},Ah(t.tagName),e.transformTemplate),Ih(t,n)}))}})},em={useVisualState:Hh({scrapeMotionValuesFromProps:Dh,createRenderState:gh})};function tm(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const nm=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function rm(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const om=e=>t=>nm(t)&&e(t,rm(t));function im(e,t,n,r){return tm(e,t,om(n),r)}const am=(e,t)=>n=>t(e(n)),sm=(...e)=>e.reduce(am);function lm(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const cm=lm("dragHorizontal"),um=lm("dragVertical");function dm(e){let t=!1;if("y"===e)t=um();else if("x"===e)t=cm();else{const e=cm(),n=um();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function pm(){const e=dm(!0);return!e||(e(),!1)}class fm{constructor(e){this.isMounted=!1,this.node=e}update(){}}function hm(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End");return im(e.current,n,((n,o)=>{if("touch"===n.type||pm())return;const i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t),i[r]&&Gh.update((()=>i[r](n,o)))}),{passive:!e.getProps()[r]})}const mm=(e,t)=>!!t&&(e===t||mm(e,t.parentElement));function vm(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,rm(n))}const gm=new WeakMap,bm=new WeakMap,ym=e=>{const t=gm.get(e.target);t&&t(e)},xm=e=>{e.forEach(ym)};function wm(e,t,n){const r=function(e){let{root:t}=e,n=ot(e,a);const r=t||document;bm.has(r)||bm.set(r,{});const o=bm.get(r),i=JSON.stringify(n);return o[i]||(o[i]=new IntersectionObserver(xm,at({root:t},n))),o[i]}(t);return gm.set(e,n),r.observe(e),()=>{gm.delete(e),r.unobserve(e)}}const km={some:0,all:1};const Sm={inView:{Feature:class extends fm{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:km[r]};return wm(this.node.current,i,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node,n=["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t));n&&this.startObserver()}unmount(){}}},tap:{Feature:class extends fm{constructor(){super(...arguments),this.removeStartListeners=qh,this.removeEndListeners=qh,this.removeAccessibleListeners=qh,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),r=im(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r}=this.node.getProps();Gh.update((()=>{mm(this.node.current,e.target)?n&&n(e,t):r&&r(e,t)}))}),{passive:!(n.onTap||n.onPointerUp)}),o=im(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=sm(r,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=tm(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=tm(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&vm("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&Gh.update((()=>n(e,t)))}))})),vm("down",((e,t)=>{this.startPress(e,t)}))})),t=tm(this.node.current,"blur",(()=>{this.isPressing&&vm("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=sm(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Gh.update((()=>n(e,t)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!pm()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Gh.update((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=im(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=tm(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=sm(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends fm{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=sm(tm(this.node.current,"focus",(()=>this.onFocus())),tm(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends fm{mount(){this.unmount=sm(hm(this.node,!0),hm(this.node,!1))}unmount(){}}}};function Cm(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[n]=e.get())),t}(e),function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.getVelocity())),t}(e))}let Em=qh;const Pm=e=>1e3*e,jm=e=>e/1e3,Tm=!1,Am=e=>Array.isArray(e)&&"number"==typeof e[0];function Om(e){return Boolean(!e||"string"==typeof e&&Mm[e]||Am(e)||Array.isArray(e)&&e.every(Om))}const Rm=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Mm={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rm([0,.65,.55,1]),circOut:Rm([.55,0,1,.45]),backIn:Rm([.31,.01,.66,-.59]),backOut:Rm([.33,1.53,.69,.99])};function Nm(e){if(e)return Am(e)?Rm(e):Array.isArray(e)?e.map(Nm):Mm[e]}const Im=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Dm=1e-7,zm=12;function Bm(e,t,n,r){if(e===t&&n===r)return qh;const o=t=>function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=Im(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>Dm&&++s0===e||1===e?e:Im(o(e),t,r)}const Fm=Bm(.42,0,1,1),Lm=Bm(0,0,.58,1),$m=Bm(.42,0,.58,1),Vm=e=>Array.isArray(e)&&"number"!=typeof e[0],Wm=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Hm=e=>t=>1-e(1-t),Um=e=>1-Math.sin(Math.acos(e)),qm=Hm(Um),Ym=Wm(Um),Xm=Bm(.33,1.53,.69,.99),Gm=Hm(Xm),Km=Wm(Gm),Zm={linear:qh,easeIn:Fm,easeInOut:$m,easeOut:Lm,circIn:Um,circInOut:Ym,circOut:qm,backIn:Gm,backInOut:Km,backOut:Xm,anticipate:e=>(e*=2)<1?.5*Gm(e):.5*(2-Math.pow(2,-10*(e-1)))},Jm=e=>{if(Array.isArray(e)){Em(4===e.length);const[t,n,r,o]=e;return Bm(t,n,r,o)}return"string"==typeof e?Zm[e]:e},Qm=(e,t)=>n=>Boolean(ah(n)&&ih.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),ev=(e,t,n)=>r=>{if(!ah(r))return r;const[o,i,a,s]=r.match(rh);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},tv=at(at({},Qf),{},{transform:e=>Math.round((e=>Jf(0,255,e))(e))}),nv={test:Qm("rgb","red"),parse:ev("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+tv.transform(e)+", "+tv.transform(t)+", "+tv.transform(n)+", "+nh(eh.transform(r))+")"};const rv={test:Qm("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:nv.transform},ov={test:Qm("hsl","hue"),parse:ev("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ch.transform(nh(t))+", "+ch.transform(nh(n))+", "+nh(eh.transform(r))+")"},iv={test:e=>nv.test(e)||rv.test(e)||ov.test(e),parse:e=>nv.test(e)?nv.parse(e):ov.test(e)?ov.parse(e):rv.parse(e),transform:e=>ah(e)?e:e.hasOwnProperty("red")?nv.transform(e):ov.transform(e)},av=(e,t,n)=>-n*e+n*t+e;function sv(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}const lv=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},cv=[rv,nv,ov];function uv(e){const t=(n=e,cv.find((e=>e.test(n))));var n;let r=t.parse(e);return t===ov&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=sv(s,r,e+1/3),i=sv(s,r,e),a=sv(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(r)),r}const dv=(e,t)=>{const n=uv(e),r=uv(t),o=at({},n);return e=>(o.red=lv(n.red,r.red,e),o.green=lv(n.green,r.green,e),o.blue=lv(n.blue,r.blue,e),o.alpha=av(n.alpha,r.alpha,e),nv.transform(o))};const pv={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:qh},fv={regex:oh,countKey:"Colors",token:"${c}",parse:iv.parse},hv={regex:rh,countKey:"Numbers",token:"${n}",parse:Qf.parse};function mv(e,{regex:t,countKey:n,token:r,parse:o}){const i=e.tokenised.match(t);i&&(e["num"+n]=i.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...i.map(o)))}function vv(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&mv(n,pv),mv(n,fv),mv(n,hv),n}function gv(e){return vv(e).values}function bv(e){const{values:t,numColors:n,numVars:r,tokenised:o}=vv(e),i=t.length;return e=>{let t=o;for(let o=0;o"number"==typeof e?0:e;const xv={test:function(e){var t,n;return isNaN(e)&&ah(e)&&((null===(t=e.match(rh))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(oh))||void 0===n?void 0:n.length)||0)>0},parse:gv,createTransformer:bv,getAnimatableNone:function(e){const t=gv(e);return bv(e)(t.map(yv))}},wv=(e,t)=>n=>`${n>0?t:e}`;function kv(e,t){return"number"==typeof e?n=>av(e,t,n):iv.test(e)?dv(e,t):e.startsWith("var(")?wv(e,t):_v(e,t)}const Sv=(e,t)=>{const n=[...e],r=n.length,o=e.map(((e,n)=>kv(e,t[n])));return e=>{for(let t=0;t{const n=at(at({},e),t),r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=kv(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}},_v=(e,t)=>{const n=xv.createTransformer(t),r=vv(e),o=vv(t);return r.numVars===o.numVars&&r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?sm(Sv(r.values,o.values),n):wv(e,t)},Ev=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Pv=(e,t)=>n=>av(e,t,n);function jv(e,t,n){const r=[],o=n||("number"==typeof(i=e[0])?Pv:"string"==typeof i?iv.test(i)?dv:_v:Array.isArray(i)?Sv:"object"==typeof i?Cv:Pv);var i;const a=e.length-1;for(let s=0;st[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=jv(t,r,o),s=a.length,l=t=>{let n=0;if(s>1)for(;nl(Jf(e[0],e[i-1],t)):l}function Av(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Ev(0,t,r);e.push(av(n,1,o))}}(t,e.length-1),t}function Ov({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Vm(r)?r.map(Jm):Jm(r),i={done:!1,value:t[0]},a=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:Av(t),e),s=Tv(a,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map((()=>c||$m)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}function Rv(e,t){return t?e*(1e3/t):0}const Mv=5;function Nv(e,t,n){const r=Math.max(t-Mv,0);return Rv(n-e(r),t-r)}const Iv=.001,Dv=.01,zv=10,Bv=.05,Fv=1;function Lv({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i,a=1-t;a=Jf(Bv,Fv,a),e=Jf(Dv,zv,jm(e)),a<1?(o=t=>{const r=t*a,o=r*e,i=r-n,s=Vv(t,a),l=Math.exp(-o);return Iv-i/s*l},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=Vv(Math.pow(t,2),a);return(-o(t)+Iv>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let o=1;o<$v;o++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=Pm(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}const $v=12;function Vv(e,t){return e*Math.sqrt(1-t*t)}const Wv=["duration","bounce"],Hv=["stiffness","damping","mass"];function Uv(e,t){return t.some((t=>void 0!==e[t]))}function qv(e){let{keyframes:t,restDelta:n,restSpeed:r}=e,o=ot(e,s);const i=t[0],a=t[t.length-1],l={done:!1,value:i},{stiffness:c,damping:u,mass:d,velocity:p,duration:f,isResolvedFromDuration:h}=function(e){let t=at({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!Uv(e,Hv)&&Uv(e,Wv)){const n=Lv(e);t=at(at(at({},t),n),{},{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}(o),m=p?-jm(p):0,v=u/(2*Math.sqrt(c*d)),g=a-i,b=jm(Math.sqrt(c/d)),y=Math.abs(g)<5;let x;if(r||(r=y?.01:2),n||(n=y?.005:.5),v<1){const e=Vv(b,v);x=t=>{const n=Math.exp(-v*b*t);return a-n*((m+v*b*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===v)x=e=>a-Math.exp(-b*e)*(g+(m+b*g)*e);else{const e=b*Math.sqrt(v*v-1);x=t=>{const n=Math.exp(-v*b*t),r=Math.min(e*t,300);return a-n*((m+v*b*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}return{calculatedDuration:h&&f||null,next:e=>{const t=x(e);if(h)l.done=e>=f;else{let o=m;0!==e&&(o=v<1?Nv(x,e,t):0);const i=Math.abs(o)<=r,s=Math.abs(a-t)<=n;l.done=i&&s}return l.value=l.done?a:t,l}}}function Yv({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},f=e=>void 0===s?l:void 0===l||Math.abs(s-e)-h*Math.exp(-e/r),b=e=>v+g(e),y=e=>{const t=g(e),n=b(e);p.done=Math.abs(t)<=c,p.value=p.done?v:n};let x,w;const k=e=>{var t;(t=p.value,void 0!==s&&tl)&&(x=e,w=qv({keyframes:[p.value,f(p.value)],velocity:Nv(b,e,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,y(e),k(e)),void 0!==x&&e>x?w.next(e-x):(!t&&y(e),p)}}}const Xv=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Gh.update(t,!0),stop:()=>Kh(t),now:()=>Zh.isProcessing?Zh.timestamp:performance.now()}},Gv=2e4;function Kv(e){let t=0;let n=e.next(t);for(;!n.done&&t=Gv?1/0:t}const Zv={decay:Yv,inertia:Yv,tween:Ov,keyframes:Ov,spring:qv};function Jv(e){let t,n,{autoplay:r=!0,delay:o=0,driver:i=Xv,keyframes:a,type:s="keyframes",repeat:c=0,repeatDelay:u=0,repeatType:d="loop",onPlay:p,onStop:f,onComplete:h,onUpdate:m}=e,v=ot(e,l),g=1,b=!1;const y=()=>{n=new Promise((e=>{t=e}))};let x;y();const w=Zv[s]||Ov;let k;w!==Ov&&"number"!=typeof a[0]&&(k=Tv([0,100],a,{clamp:!1}),a=[0,100]);const S=w(at(at({},v),{},{keyframes:a}));let C;"mirror"===d&&(C=w(at(at({},v),{},{keyframes:[...a].reverse(),velocity:-(v.velocity||0)})));let _="idle",E=null,P=null,j=null;null===S.calculatedDuration&&c&&(S.calculatedDuration=Kv(S));const{calculatedDuration:T}=S;let A=1/0,O=1/0;null!==T&&(A=T+u,O=A*(c+1)-u);let R=0;const M=e=>{if(null===P)return;g>0&&(P=Math.min(P,e)),g<0&&(P=Math.min(e-O/g,P)),R=null!==E?E:Math.round(e-P)*g;const t=R-o*(g>=0?1:-1),n=g>=0?t<0:t>O;R=Math.max(t,0),"finished"===_&&null===E&&(R=O);let r=R,i=S;if(c){const e=R/A;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,c+1);const o=Boolean(t%2);o&&("reverse"===d?(n=1-n,u&&(n-=u/A)):"mirror"===d&&(i=C));let a=Jf(0,1,n);R>O&&(a="reverse"===d&&o?1:0),r=a*A}const s=n?{done:!1,value:a[0]}:i.next(r);k&&(s.value=k(s.value));let{done:l}=s;n||null===T||(l=g>=0?R>=O:R<=0);const p=null===E&&("finished"===_||"running"===_&&l);return m&&m(s.value),p&&D(),s},N=()=>{x&&x.stop(),x=void 0},I=()=>{_="idle",N(),t(),y(),P=j=null},D=()=>{_="finished",h&&h(),N(),t()},z=()=>{if(b)return;x||(x=i(M));const e=x.now();p&&p(),null!==E?P=e-E:P&&"finished"!==_||(P=e),"finished"===_&&y(),j=P,E=null,_="running",x.start()};r&&z();const B={then:(e,t)=>n.then(e,t),get time(){return jm(R)},set time(e){e=Pm(e),R=e,null===E&&x&&0!==g?P=x.now()-e/g:E=e},get duration(){const e=null===S.calculatedDuration?Kv(S):S.calculatedDuration;return jm(e)},get speed(){return g},set speed(e){e!==g&&x&&(g=e,B.time=jm(R))},get state(){return _},play:z,pause:()=>{_="paused",E=R},stop:()=>{b=!0,"idle"!==_&&(_="idle",f&&f(),I())},cancel:()=>{null!==j&&M(j),I()},complete:()=>{_="finished"},sample:e=>(P=0,M(e))};return B}const Qv=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),eg=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);function tg(e,t,n){let{onUpdate:r,onComplete:o}=n,i=ot(n,c);if(!(Qv()&&eg.has(t)&&!i.repeatDelay&&"mirror"!==i.repeatType&&0!==i.damping&&"inertia"!==i.type))return!1;let a,s,l=!1;const u=()=>{s=new Promise((e=>{a=e}))};u();let{keyframes:d,duration:p=300,ease:f,times:h}=i;if(((e,t)=>"spring"===t.type||"backgroundColor"===e||!Om(t.ease))(t,i)){const e=Jv(at(at({},i),{},{repeat:0,delay:0}));let t={done:!1,value:d[0]};const n=[];let r=0;for(;!t.done&&r<2e4;)t=e.sample(r),n.push(t.value),r+=10;h=void 0,d=n,p=r-10,f="linear"}const m=function(e,t,n,{delay:r=0,duration:o,repeat:i=0,repeatType:a="loop",ease:s,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Nm(s);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"})}(e.owner.current,t,d,at(at({},i),{},{duration:p,ease:f,times:h})),v=()=>m.cancel(),g=()=>{Gh.update(v),a(),u()};m.onfinish=()=>{e.set(function(e,{repeat:t,repeatType:n="loop"}){return e[t&&"loop"!==n&&t%2==1?0:e.length-1]}(d,i)),o&&o(),g()};return{then:(e,t)=>s.then(e,t),attachTimeline:e=>(m.timeline=e,m.onfinish=null,qh),get time(){return jm(m.currentTime||0)},set time(e){m.currentTime=Pm(e)},get speed(){return m.playbackRate},set speed(e){m.playbackRate=e},get duration(){return jm(p)},play:()=>{l||(m.play(),Kh(v))},pause:()=>m.pause(),stop:()=>{if(l=!0,"idle"===m.playState)return;const{currentTime:t}=m;if(t){const n=Jv(at(at({},i),{},{autoplay:!1}));e.setWithVelocity(n.sample(t-10).value,n.sample(t).value,10)}g()},complete:()=>m.finish(),cancel:g}}const ng={type:"spring",stiffness:500,damping:25,restSpeed:10},rg={type:"keyframes",duration:.8},og={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ig=(e,{keyframes:t})=>t.length>2?rg:Wf.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:ng:og,ag=(e,t)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!xv.test(t)&&"0"!==t||t.startsWith("url("))),sg=new Set(["brightness","contrast","saturate","opacity"]);function lg(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(rh)||[];if(!r)return e;const o=n.replace(r,"");let i=sg.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const cg=/([a-z-]*)\(.*?\)/g,ug=at(at({},xv),{},{getAnimatableNone:e=>{const t=e.match(cg);return t?t.map(lg).join(" "):e}}),dg=at(at({},mh),{},{color:iv,backgroundColor:iv,outlineColor:iv,fill:iv,stroke:iv,borderColor:iv,borderTopColor:iv,borderRightColor:iv,borderBottomColor:iv,borderLeftColor:iv,filter:ug,WebkitFilter:ug}),pg=e=>dg[e];function fg(e,t){let n=pg(e);return n!==ug&&(n=xv),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const hg=e=>/^0[^.\s]+$/.test(e);function mg(e){return"number"==typeof e?0===e:null!==e?"none"===e||"0"===e||hg(e):void 0}function vg(e,t){return e[t]||e.default||e}const gg=(e,t,n,r={})=>o=>{const i=vg(r,e)||{},a=i.delay||r.delay||0;let{elapsed:s=0}=r;s-=Pm(a);const l=function(e,t,n,r){const o=ag(t,n);let i;i=Array.isArray(n)?[...n]:[null,n];const a=void 0!==r.from?r.from:e.get();let s;const l=[];for(let c=0;c{t.set(e),i.onUpdate&&i.onUpdate(e)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}});if(function(e){let{when:t,delay:n,delayChildren:r,staggerChildren:o,staggerDirection:i,repeat:a,repeatType:s,repeatDelay:l,from:c,elapsed:d}=e,p=ot(e,u);return!!Object.keys(p).length}(i)||(h=at(at({},h),ig(e,h))),h.duration&&(h.duration=Pm(h.duration)),h.repeatDelay&&(h.repeatDelay=Pm(h.repeatDelay)),!p||!f||Tm||!1===i.type)return function({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:qh,pause:qh,stop:qh,then:e=>(e(),Promise.resolve()),cancel:qh,complete:qh});return t?Jv({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}(h);if(!r.isHandoff&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const n=tg(t,e,h);if(n)return n}return Jv(h)};function bg(e){return Boolean(Uf(e)&&e.add)}const yg=e=>/^\-?\d*\.?\d+$/.test(e);function xg(e,t){-1===e.indexOf(t)&&e.push(t)}function wg(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class kg{constructor(){this.subscriptions=[]}add(e){return xg(this.subscriptions,e),()=>wg(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o{this.prev=this.current,this.current=e;const{delta:n,timestamp:r}=Zh;this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,Gh.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Gh.postRender(this.velocityCheck),this.velocityCheck=({timestamp:e})=>{e!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new kg);const n=this.events[e].add(t);return"change"===e?()=>{n(),Gh.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Rv(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Cg(e,t){return new Sg(e,t)}const _g=e=>t=>t.test(e),Eg=[Qf,uh,ch,lh,ph,dh,{test:e=>"auto"===e,parse:e=>e}],Pg=e=>Eg.find(_g(e)),jg=[...Eg,iv,xv];function Tg(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Cg(n))}function Ag(e,t){if(!t)return;return(t[e]||t.default||t).from}function Og({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Rg(e,t){const n=e.get();if(!Array.isArray(t))return n!==t;for(let r=0;rc.remove(d)))),u.push(s)}return s&&Promise.all(u).then((()=>{s&&function(e,t){const n=_m(e,t);let r=n?e.makeTargetAnimatable(n,!1):{},{transitionEnd:o={},transition:i={}}=r,a=ot(r,d);a=at(at({},a),o);for(const s in a)Tg(e,s,Vh(a[s]))}(e,s)})),u}function Ng(e,t,n={}){const r=_m(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(Mg(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:a,staggerDirection:s}=o;return function(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(Ig).forEach(((e,r)=>{e.notify("AnimationStart",t),a.push(Ng(e,t,at(at({},i),{},{delay:n+l(r)})).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(a)}(e,t,i+r,a,s,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[e,t]="beforeChildren"===s?[i,a]:[a,i];return e().then((()=>t()))}return Promise.all([i(),a(n.delay)])}function Ig(e,t){return e.sortNodePosition(t)}const Dg=[..._f].reverse(),zg=_f.length;function Bg(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>Ng(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=Ng(e,t,n);else{const o="function"==typeof t?_m(e,t,n.custom):t;r=Promise.all(Mg(e,o,n))}return r.then((()=>e.notify("AnimationComplete",t)))}(e,t,n))))}function Fg(e){let t=Bg(e);const n={animate:$g(!0),whileInView:$g(),whileHover:$g(),whileTap:$g(),whileDrag:$g(),whileFocus:$g(),exit:$g()};let r=!0;const o=(t,n)=>{const r=_m(e,n);if(r){const{transition:e,transitionEnd:n}=r,o=ot(r,f);t=at(at(at({},t),o),n)}return t};function i(i,a){const s=e.getProps(),l=e.getVariantContext(!0)||{},c=[],u=new Set;let d={},p=1/0;for(let t=0;tp&&v;const w=Array.isArray(m)?m:[m];let k=w.reduce(o,{});!1===g&&(k={});const{prevResolvedValues:S={}}=h,C=at(at({},S),k),_=e=>{x=!0,u.delete(e),h.needsAnimating[e]=!0};for(const e in C){const t=k[e],n=S[e];d.hasOwnProperty(e)||(t!==n?Lh(t)&&Lh(n)?!Cm(t,n)||y?_(e):h.protectedKeys[e]=!0:void 0!==t?_(e):u.add(e):void 0!==t&&u.has(e)?_(e):h.protectedKeys[e]=!0)}h.prevProp=m,h.prevResolvedValues=k,h.isActive&&(d=at(at({},d),k)),r&&e.blockInitialAnimation&&(x=!1),x&&!b&&c.push(...w.map((e=>({animation:e,options:at({type:f},i)}))))}if(u.size){const t={};u.forEach((n=>{const r=e.getBaseTarget(n);void 0!==r&&(t[n]=r)})),c.push({animation:t})}let f=Boolean(c.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(f=!1),r=!1,f?t(c):Promise.resolve()}return{animateChanges:i,setActive:function(t,r,o){var a;if(n[t].isActive===r)return Promise.resolve();null===(a=e.variantChildren)||void 0===a||a.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=i(o,t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n}}function Lg(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Cm(t,e)}function $g(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let Vg=0;const Wg={animation:{Feature:class extends fm{constructor(e){super(e),e.animationState||(e.animationState=Fg(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Cf(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends fm{constructor(){super(...arguments),this.id=Vg++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const o=this.node.animationState.setActive("exit",!e,{custom:null!=n?n:this.node.getProps().custom});t&&!e&&o.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},Hg=(e,t)=>Math.abs(e-t);class Ug{constructor(e,t,{transformPagePoint:n,contextWindow:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Xg(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Hg(e.x,t.x),r=Hg(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=Zh;this.history.push(at(at({},r),{},{timestamp:o}));const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=qg(t,this.transformPagePoint),Gh.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:r}=this.handlers,o=Xg("pointercancel"===e.type?this.lastMoveEventInfo:qg(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!nm(e))return;this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const o=qg(rm(e),this.transformPagePoint),{point:i}=o,{timestamp:a}=Zh;this.history=[at(at({},i),{},{timestamp:a})];const{onSessionStart:s}=t;s&&s(e,Xg(o,this.history)),this.removeListeners=sm(im(this.contextWindow,"pointermove",this.handlePointerMove),im(this.contextWindow,"pointerup",this.handlePointerUp),im(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Kh(this.updatePoint)}}function qg(e,t){return t?{point:t(e.point)}:e}function Yg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Xg({point:e},t){return{point:e,delta:Yg(e,Kg(t)),offset:Yg(e,Gg(t)),velocity:Zg(t,.1)}}function Gg(e){return e[0]}function Kg(e){return e[e.length-1]}function Zg(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Kg(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Pm(t)));)n--;if(!r)return{x:0,y:0};const i=jm(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Jg(e){return e.max-e.min}function Qg(e,t=0,n=.01){return Math.abs(e-t)<=n}function eb(e,t,n,r=.5){e.origin=r,e.originPoint=av(t.min,t.max,e.origin),e.scale=Jg(n)/Jg(t),(Qg(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=av(n.min,n.max,e.origin)-e.originPoint,(Qg(e.translate)||isNaN(e.translate))&&(e.translate=0)}function tb(e,t,n,r){eb(e.x,t.x,n.x,r?r.originX:void 0),eb(e.y,t.y,n.y,r?r.originY:void 0)}function nb(e,t,n){e.min=n.min+t.min,e.max=e.min+Jg(t)}function rb(e,t,n){e.min=t.min-n.min,e.max=e.min+Jg(t)}function ob(e,t,n){rb(e.x,t.x,n.x),rb(e.y,t.y,n.y)}function ib(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function ab(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),db=()=>({x:{min:0,max:0},y:{min:0,max:0}});function pb(e){return[e("x"),e("y")]}function fb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hb(e){return void 0===e||1===e}function mb({scale:e,scaleX:t,scaleY:n}){return!hb(e)||!hb(t)||!hb(n)}function vb(e){return mb(e)||gb(e)||e.z||e.rotate||e.rotateX||e.rotateY}function gb(e){return bb(e.x)||bb(e.y)}function bb(e){return e&&"0%"!==e}function yb(e,t,n){return n+t*(e-n)}function xb(e,t,n,r,o){return void 0!==o&&(e=yb(e,o,r)),yb(e,n,r)+t}function wb(e,t=0,n=1,r,o){e.min=xb(e.min,t,n,r,o),e.max=xb(e.max,t,n,r,o)}function kb(e,{x:t,y:n}){wb(e.x,t.translate,t.scale,t.originPoint),wb(e.y,n.translate,n.scale,n.originPoint)}function Sb(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Cb(e,t){e.min=e.min+t,e.max=e.max+t}function _b(e,t,[n,r,o]){const i=void 0!==t[o]?t[o]:.5,a=av(e.min,e.max,i);wb(e,t[n],t[r],a,t.scale)}const Eb=["x","scaleX","originX"],Pb=["y","scaleY","originY"];function jb(e,t){_b(e.x,t,Eb),_b(e.y,t,Pb)}function Tb(e,t){return fb(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const Ab=({current:e})=>e?e.ownerDocument.defaultView:null,Ob=new WeakMap;class Rb{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=db(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;this.panSession=new Ug(e,{onSessionStart:e=>{this.stopAnimation(),t&&this.snapToCursor(rm(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=dm(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pb((e=>{let t=this.getAxisMotionValue(e).get()||0;if(ch.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=Jg(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),o&&Gh.update((()=>o(e,t)),!1,!0);const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t)},{transformPagePoint:this.visualElement.getTransformPagePoint(),contextWindow:Ab(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&Gh.update((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Mb(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&en&&(e=r?av(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&kf(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:ib(e.x,n,o),y:ib(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=sb){return!1===e?e=0:!0===e&&(e=sb),{x:lb(e,"left","right"),y:lb(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&pb((e=>{this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!kf(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=Tb(e,n),{scroll:o}=t;return o&&(Cb(r.x,o.offset.x),Cb(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:ab(e.x,t.x),y:ab(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=fb(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=pb((a=>{if(!Mb(a,t,this.currentDirection))return;let l=s&&s[a]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d=at(at({type:"inertia",velocity:n?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10},o),l);return this.startAxisValueAnimation(a,d)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(gg(e,n,0,t))}stopAnimation(){pb((e=>this.getAxisMotionValue(e).stop()))}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){pb((t=>{const{drag:n}=this.getProps();if(!Mb(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-av(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!kf(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};pb((e=>{const t=this.getAxisMotionValue(e);if(t){const n=t.get();r[e]=function(e,t){let n=.5;const r=Jg(e),o=Jg(t);return o>r?n=Ev(t.min,t.max-r,e.min):r>o&&(n=Ev(e.min,e.max-o,t.min)),Jf(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),pb((t=>{if(!Mb(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(av(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Ob.set(this.visualElement,this);const e=im(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();kf(e)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),t();const o=tm(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(pb((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=sb,dragMomentum:a=!0}=e;return at(at({},e),{},{drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a})}}function Mb(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Nb=e=>(t,n)=>{e&&Gh.update((()=>e(t,n)))};function Ib(){const e=ct.useContext(vf);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=ct.useId();ct.useEffect((()=>r(o)),[]);return!t&&n?[!1,()=>n&&n(o)]:[!0]}function Db(){return null===(e=ct.useContext(vf))||e.isPresent;var e}const zb={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Bb(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Fb={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!uh.test(e))return e;e=parseFloat(e)}return`${Bb(e,t.target.x)}% ${Bb(e,t.target.y)}%`}},Lb={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=xv.parse(e);if(o.length>5)return r;const i=xv.createTransformer(e),a="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=av(s,l,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}};class $b extends ft.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=Wb,Object.assign($f,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions(at(at({},o.options),{},{onExitComplete:()=>this.safeToRemove()}))),zb.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||Gh.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Vb(e){const[t,n]=Ib(),r=ct.useContext(Mf);return ft.createElement($b,at(at({},e),{},{layoutGroup:r,switchLayoutGroup:ct.useContext(Nf),isPresent:t,safeToRemove:n}))}const Wb={borderRadius:at(at({},Fb),{},{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Fb,borderTopRightRadius:Fb,borderBottomLeftRadius:Fb,borderBottomRightRadius:Fb,boxShadow:Lb},Hb=["TopLeft","TopRight","BottomLeft","BottomRight"],Ub=Hb.length,qb=e=>"string"==typeof e?parseFloat(e):e,Yb=e=>"number"==typeof e||uh.test(e);function Xb(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Gb=Zb(0,.5,qm),Kb=Zb(.5,.95,qh);function Zb(e,t,n){return r=>rt?1:n(Ev(e,t,r))}function Jb(e,t){e.min=t.min,e.max=t.max}function Qb(e,t){Jb(e.x,t.x),Jb(e.y,t.y)}function ey(e,t,n,r,o){return e=yb(e-=t,1/n,r),void 0!==o&&(e=yb(e,1/o,r)),e}function ty(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){ch.test(t)&&(t=parseFloat(t),t=av(a.min,a.max,t/100)-a.min);if("number"!=typeof t)return;let s=av(i.min,i.max,r);e===i&&(s-=t),e.min=ey(e.min,t,n,s,o),e.max=ey(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const ny=["x","scaleX","originX"],ry=["y","scaleY","originY"];function oy(e,t,n,r){ty(e.x,t,ny,n?n.x:void 0,r?r.x:void 0),ty(e.y,t,ry,n?n.y:void 0,r?r.y:void 0)}function iy(e){return 0===e.translate&&1===e.scale}function ay(e){return iy(e.x)&&iy(e.y)}function sy(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function ly(e){return Jg(e.x)/Jg(e.y)}class cy{constructor(){this.members=[]}add(e){xg(this.members,e),e.scheduleRender()}remove(e){if(wg(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function uy(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y;if((o||i)&&(r=`translate3d(${o}px, ${i}px, 0) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:e,rotateX:t,rotateY:o}=n;e&&(r+=`rotate(${e}deg) `),t&&(r+=`rotateX(${t}deg) `),o&&(r+=`rotateY(${o}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return 1===a&&1===s||(r+=`scale(${a}, ${s})`),r||"none"}const dy=(e,t)=>e.depth-t.depth;class py{constructor(){this.children=[],this.isDirty=!1}add(e){xg(this.children,e),this.isDirty=!0}remove(e){wg(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(dy),this.isDirty=!1,this.children.forEach(e)}}const fy=["","X","Y","Z"],hy={visibility:"hidden"};let my=0;const vy={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function gy({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=my++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var e;this.projectionUpdateScheduled=!1,vy.totalNodes=vy.resolvedTargetDeltas=vy.recalculatedProjection=0,this.nodes.forEach(xy),this.nodes.forEach(Py),this.nodes.forEach(jy),this.nodes.forEach(wy),e=vy,window.MotionDebug&&window.MotionDebug.record(e)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;tthis.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=performance.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Kh(r),e(i-t))};return Gh.read(r,!0),()=>Kh(r)}(r,250),zb.hasAnimatedSinceResize&&(zb.hasAnimatedSinceResize=!1,this.nodes.forEach(Ey))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||Ny,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!sy(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t=at(at({},vg(o,"layout")),{},{onPlay:i,onComplete:s});(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Ey(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Kh(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ty),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let o=0;othis.update())))}clearAllSnapshots(){this.nodes.forEach(ky),this.sharedNodes.forEach(Ay)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Gh.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Gh.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n{const n=t/1e3;var l,p;Oy(i.x,e.x,n),Oy(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ob(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){Ry(e.x,t.x,n.x,r),Ry(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,a,n),d&&(l=this.relativeTarget,p=d,l.x.min===p.x.min&&l.x.max===p.x.max&&l.y.min===p.y.min&&l.y.max===p.y.max)&&(this.isProjectionDirty=!1),d||(d=db()),Qb(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=av(0,void 0!==n.opacity?n.opacity:1,Gb(r)),e.opacityExit=av(void 0!==t.opacity?t.opacity:1,0,Kb(r))):i&&(e.opacity=av(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let a=0;a{zb.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=Uf(e)?e:Cg(e);return r.start(gg("",r,t,n)),r.animation}(0,1e3,at(at({},e),{},{onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}})),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&By(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||db();const t=Jg(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Jg(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Qb(t,n),jb(t,o),tb(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new cy);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(t=!0),!t)return;const r={};for(let o=0;o{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Sy),this.root.sharedNodes.clear()}}}function by(e){e.updateLayout()}function yy(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?pb((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=Jg(r);r.min=t[e].min,r.max=r.min+o})):By(o,n.layoutBox,t)&&pb((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],a=Jg(t[r]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)}));const a=ub();tb(a,t,n.layoutBox);const s=ub();i?tb(s,e.applyTransform(r,!0),n.measuredBox):tb(s,t,n.layoutBox);const l=!ay(a);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const a=db();ob(a,n.layoutBox,o.layoutBox);const s=db();ob(s,t,i.layoutBox),sy(a,s)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function xy(e){vy.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function wy(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ky(e){e.clearSnapshot()}function Sy(e){e.clearMeasurements()}function Cy(e){e.isLayoutDirty=!1}function _y(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ey(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Py(e){e.resolveTargetDelta()}function jy(e){e.calcProjection()}function Ty(e){e.resetRotation()}function Ay(e){e.removeLeadSnapshot()}function Oy(e,t,n){e.translate=av(t.translate,0,n),e.scale=av(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ry(e,t,n,r){e.min=av(t.min,n.min,r),e.max=av(t.max,n.max,r)}function My(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Ny={duration:.45,ease:[.4,0,.1,1]},Iy=e=>"undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().includes(e),Dy=Iy("applewebkit/")&&!Iy("chrome/")?Math.round:qh;function zy(e){e.min=Dy(e.min),e.max=Dy(e.max)}function By(e,t,n){return"position"===e||"preserve-aspect"===e&&!Qg(ly(t),ly(n),.2)}const Fy=gy({attachResizeListener:(e,t)=>tm(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ly={current:void 0},$y=gy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ly.current){const e=new Fy({});e.mount(window),e.setOptions({layoutScroll:!0}),Ly.current=e}return Ly.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Vy={pan:{Feature:class extends fm{constructor(){super(...arguments),this.removePointerDownListener=qh}onPointerDown(e){this.session=new Ug(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ab(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Nb(e),onStart:Nb(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Gh.update((()=>r(e,t)))}}}mount(){this.removePointerDownListener=im(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends fm{constructor(e){super(e),this.removeGroupControls=qh,this.removeListeners=qh,this.controls=new Rb(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||qh}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:$y,MeasureLayout:Vb}},Wy=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Hy(e,t,n=1){const[r,o]=function(e){const t=Wy.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return yg(e)?parseFloat(e):e}return Kf(o)?Hy(o,t,n+1):o}function Uy(e,t,n){let r=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(t),t));const o=e.current;if(!(o instanceof Element))return{target:r,transitionEnd:n};n&&(n=at({},n)),e.values.forEach((e=>{const t=e.get();if(!Kf(t))return;const n=Hy(t,o);n&&e.set(n)}));for(const i in r){const e=r[i];if(!Kf(e))continue;const t=Hy(e,o);t&&(r[i]=t,n||(n={}),void 0===n[i]&&(n[i]=e))}return{target:r,transitionEnd:n}}const qy=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Yy=e=>qy.has(e),Xy=e=>e===Qf||e===uh,Gy=(e,t)=>parseFloat(e.split(", ")[t]),Ky=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return Gy(o[1],t);{const t=r.match(/^matrix\((.+)\)$/);return t?Gy(t[1],e):0}},Zy=new Set(["x","y","z"]),Jy=Vf.filter((e=>!Zy.has(e)));const Qy={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Ky(4,13),y:Ky(5,14)};Qy.translateX=Qy.x,Qy.translateY=Qy.y;const ex=(e,t,n={},r={})=>{t=at({},t),r=at({},r);const o=Object.keys(t).filter(Yy);let i=[],a=!1;const s=[];if(o.forEach((o=>{const l=e.getValue(o);if(!e.hasValue(o))return;let c=n[o],u=Pg(c);const d=t[o];let p;if(Lh(d)){const e=d.length,t=null===d[0]?1:0;c=d[t],u=Pg(c);for(let n=t;n{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.render(),t}(e),a=!0),s.push(o),r[o]=void 0!==r[o]?r[o]:t[o],l.jump(d))})),s.length){const n=s.indexOf("height")>=0?window.pageYOffset:null,o=((e,t,n)=>{const r=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:a}=i,s={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach((e=>{s[e]=Qy[e](r,i)})),t.render();const l=t.measureViewportBox();return n.forEach((n=>{const r=t.getValue(n);r&&r.jump(s[n]),e[n]=Qy[n](l,i)})),e})(t,e,s);return i.length&&i.forEach((([t,n])=>{e.getValue(t).set(n)})),e.render(),gf&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:r}}return{target:t,transitionEnd:r}};function tx(e,t,n,r){return(e=>Object.keys(e).some(Yy))(t)?ex(e,t,n,r):{target:t,transitionEnd:r}}const nx={current:null},rx={current:!1};const ox=new WeakMap,ix=Object.keys(Rf),ax=ix.length,sx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],lx=Ef.length;class cx{constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,visualState:o},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Gh.render(this.render,!1,!0);const{latestValues:a,renderState:s}=o;this.latestValues=a,this.baseTarget=at({},a),this.initialValues=t.initial?at({},a):{},this.renderState=s,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=i,this.isControllingVariants=Pf(t),this.isVariantNode=jf(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const l=this.scrapeMotionValuesFromProps(t,{}),{willChange:c}=l,u=ot(l,h);for(const d in u){const e=u[d];void 0!==a[d]&&Uf(e)&&(e.set(a[d],!1),bg(c)&&c.add(d))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,ox.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),rx.current||function(){if(rx.current=!0,gf)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>nx.current=e.matches;e.addListener(t),t()}else nx.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||nx.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){ox.delete(this.current),this.projection&&this.projection.unmount(),Kh(this.notifyUpdate),Kh(this.render),this.valueSubscriptions.forEach((e=>e())),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const n=Wf.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Gh.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(()=>{r(),o()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures(e,t,n,r){let o,i,{children:a}=e,s=ot(e,m);for(let l=0;lthis.scheduleRender(),animationType:"string"==typeof t?t:"both",initialPromotionConfig:r,layoutScroll:a,layoutRoot:l})}return i}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):db()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;nt.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Cg(t,{owner:this}),this.addValue(e,n)),n}readValue(e){var t;return void 0===this.latestValues[e]&&this.current?null!==(t=this.getBaseTargetFromProps(this.props,e))&&void 0!==t?t:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e]}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props,r="string"==typeof n||"object"==typeof n?null===(t=Bh(this.props,n))||void 0===t?void 0:t[e]:void 0;if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||Uf(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new kg),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class ux extends cx{sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}makeTargetAnimatableFromInstance(e,{transformValues:t},n){let{transition:r,transitionEnd:o}=e,i=ot(e,v),a=function(e,t,n){const r={};for(const o in e){const e=Ag(o,t);if(void 0!==e)r[o]=e;else{const e=n.getValue(o);e&&(r[o]=e.get())}}return r}(i,r||{},this);if(t&&(o&&(o=t(o)),i&&(i=t(i)),a&&(a=t(a))),n){!function(e,t,n){var r,o;const i=Object.keys(t).filter((t=>!e.hasValue(t))),a=i.length;var s;if(a)for(let l=0;l{const o=Uy(e,t,r);return tx(e,t=o.target,n,r=o.transitionEnd)})(this,i,a,o);o=e.transitionEnd,i=e.target}return at({transition:r,transitionEnd:o},i)}}class dx extends ux{readValueFromInstance(e,t){if(Wf.has(t)){const e=pg(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(Gf(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Tb(e,t)}build(e,t,n,r){vh(e,t,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return Dh(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Uf(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}renderInstance(e,t,n,r){Mh(e,t,n,r)}}class px extends ux{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Wf.has(t)){const e=pg(t);return e&&e.default||0}return t=Nh.has(t)?t:xf(t),e.getAttribute(t)}measureInstanceViewportBox(){return db()}scrapeMotionValuesFromProps(e,t){return zh(e,t)}build(e,t,n,r){jh(e,t,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,n,r){Ih(e,t,0,r)}mount(e){this.isSVGTag=Ah(e.tagName),super.mount(e)}}const fx=(e,t)=>Lf(e)?new px(t,{enableHardwareAcceleration:!1}):new dx(t,{enableHardwareAcceleration:!0}),hx={layout:{ProjectionNode:$y,MeasureLayout:Vb}},mx=at(at(at(at({},Wg),Sm),Vy),hx),vx=Bf(((e,t)=>function(e,{forwardMotionProps:t=!1},n,r){return at(at({},Lf(e)?Qh:em),{},{preloadedFeatures:n,useRender:Rh(t),createVisualElement:r,Component:e})}(e,t,mx,fx)));function gx(){const e=ct.useRef(!1);return bf((()=>(e.current=!0,()=>{e.current=!1})),[]),e}class bx extends ct.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function yx({children:e,isPresent:t}){const n=ct.useId(),r=ct.useRef(null),o=ct.useRef({width:0,height:0,top:0,left:0});return ct.useInsertionEffect((()=>{const{width:e,height:i,top:a,left:s}=o.current;if(t||!r.current||!e||!i)return;r.current.dataset.motionPopId=n;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${i}px !important;\n top: ${a}px !important;\n left: ${s}px !important;\n }\n `),()=>{document.head.removeChild(l)}}),[t]),ct.createElement(bx,{isPresent:t,childRef:r,sizeRef:o},ct.cloneElement(e,{ref:r}))}const xx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a})=>{const s=Fh(wx),l=ct.useId(),c=ct.useMemo((()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:e=>{s.set(e,!0);for(const t of s.values())if(!t)return;r&&r()},register:e=>(s.set(e,!1),()=>s.delete(e))})),i?void 0:[n]);return ct.useMemo((()=>{s.forEach(((e,t)=>s.set(t,!1)))}),[n]),ct.useEffect((()=>{!n&&!s.size&&r&&r()}),[n]),"popLayout"===a&&(e=ct.createElement(yx,{isPresent:n},e)),ct.createElement(vf.Provider,{value:c},e)};function wx(){return new Map}const kx=e=>e.key||"";const Sx=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:a="sync"})=>{const s=ct.useContext(Mf).forceRender||function(){const e=gx(),[t,n]=ct.useState(0),r=ct.useCallback((()=>{e.current&&n(t+1)}),[t]);return[ct.useCallback((()=>Gh.postRender(r)),[r]),t]}()[0],l=gx(),c=function(e){const t=[];return ct.Children.forEach(e,(e=>{ct.isValidElement(e)&&t.push(e)})),t}(e);let u=c;const d=ct.useRef(new Map).current,p=ct.useRef(u),f=ct.useRef(new Map).current,h=ct.useRef(!0);var m;if(bf((()=>{h.current=!1,function(e,t){e.forEach((e=>{const n=kx(e);t.set(n,e)}))}(c,f),p.current=u})),m=()=>{h.current=!0,f.clear(),d.clear()},ct.useEffect((()=>()=>m()),[]),h.current)return ct.createElement(ct.Fragment,null,u.map((e=>ct.createElement(xx,{key:kx(e),isPresent:!0,initial:!!n&&void 0,presenceAffectsLayout:i,mode:a},e))));u=[...u];const v=p.current.map(kx),g=c.map(kx),b=v.length;for(let y=0;y{if(-1!==g.indexOf(n))return;const o=f.get(n);if(!o)return;const h=v.indexOf(n);let m=e;if(!m){const e=()=>{d.delete(n);const e=Array.from(f.keys()).filter((e=>!g.includes(e)));if(e.forEach((e=>f.delete(e))),p.current=c.filter((t=>{const r=kx(t);return r===n||e.includes(r)})),!d.size){if(!1===l.current)return;s(),r&&r()}};m=ct.createElement(xx,{key:kx(o),isPresent:!1,onExitComplete:e,custom:t,presenceAffectsLayout:i,mode:a},o),d.set(n,m)}u.splice(h,0,m)})),u=u.map((e=>{const t=e.key;return d.has(t)?e:ct.createElement(xx,{key:kx(e),isPresent:!0,presenceAffectsLayout:i,mode:a},e)})),ct.createElement(ct.Fragment,null,d.size?u:u.map((e=>ct.cloneElement(e))))},Cx=(e,t)=>e.find((e=>e.id===t));function _x(e,t){const n=Ex(e,t);return{position:n,index:n?e[n].findIndex((e=>e.id===t)):-1}}function Ex(e,t){for(const[n,r]of Object.entries(e))if(Cx(r,t))return n}function Px(e){return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:"top"===e||"bottom"===e?"0 auto":void 0,top:e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,bottom:e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,right:e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",left:e.includes("right")?void 0:"env(safe-area-inset-left, 0px)"}}var jx=/^((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|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|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)-.*))$/,Tx=Gd((function(e){return jx.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Ax=function(e){return"theme"!==e},Ox=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Tx:Ax},Rx=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Mx=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return fp(t,n,r),Pp((function(){return hp(t,n,r)})),null},Nx=function e(t,n){var r,o,i=t.__emotion_real===t,a=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var s=Rx(t,n,i),l=s||Ox(a),c=!l("as");return function(){var u=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{var p=u[0];d.push(p[0]);for(var f=u.length,h=1;ht=>{const{theme:n,css:r,__css:o,sx:i}=t,a=ot(t,g),[s]=function(e,...t){const n=Object.getOwnPropertyDescriptors(e),r=Object.keys(n),o=e=>{const t={};for(let r=0;ro(Array.isArray(e)?e:r.filter(e)))).concat(o(r))}(a,$o),l=function(e,...t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");const n=at({},e);for(const r of t)if(null!=r)for(const e in r)Object.prototype.hasOwnProperty.call(r,e)&&(e in n&&delete n[e],n[e]=r[e]);return n}({},o,Rn(e,t),fn(s),i),c=Uo(l)(t.theme);return r?[c,r]:c};function $x(e,t){const n=null!=t?t:{},{baseStyle:r}=n,o=ot(n,b);o.shouldForwardProp||(o.shouldForwardProp=zx);const i=Lx({baseStyle:r}),a=Bx(e,o)(i);return ct.forwardRef((function(e,t){const{children:n}=e,r=ot(e,y),{colorMode:o,forced:i}=Up(),s=i?o:void 0;return ct.createElement(a,at({ref:t,"data-theme":s},r),n)}))}const Vx=it("c",function(){const e=new Map;return new Proxy($x,{apply:(e,t,n)=>$x(...n),get:(t,n)=>(e.has(n)||e.set(n,$x(n)),e.get(n))})}()),Wx={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return"bottom"===t&&(r=1),{opacity:0,[n]:24*r}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},Hx=ct.memo((e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:o,requestClose:i=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:c=Wx,toastSpacing:u="0.5rem"}=e,[d,p]=ct.useState(s),f=Db();Gn((()=>{f||null==r||r()}),[f]),Gn((()=>{p(s)}),[s]);const h=()=>{f&&o()};ct.useEffect((()=>{f&&i&&o()}),[f,i,o]),function(e,t){const n=Ln(e);ct.useEffect((()=>{if(null==t)return;let e=null;return e=window.setTimeout((()=>{n()}),t),()=>{e&&window.clearTimeout(e)}}),[t,n])}(h,d);const m=ct.useMemo((()=>at({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:u},l)),[l,u]),v=ct.useMemo((()=>function(e){let t="center";return e.includes("right")&&(t="flex-end"),e.includes("left")&&(t="flex-start"),{display:"flex",flexDirection:"column",alignItems:t}}(a)),[a]);return Vt.jsx(vx.div,{layout:!0,className:"chakra-toast",variants:c,initial:"initial",animate:"animate",exit:"exit",onHoverStart:()=>p(null),onHoverEnd:()=>p(s),custom:{position:a},style:v,children:Vt.jsx(Vx.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:m,children:Rn(n,{id:t,onClose:h})})})}));function Ux(e){return ct.forwardRef(e)}var qx,Yx;Hx.displayName="ToastComponent";var Xx=function(){if(Yx)return qx;Yx=1;var e="undefined"!=typeof Element,t="function"==typeof Map,n="function"==typeof Set,r="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function o(i,a){if(i===a)return!0;if(i&&a&&"object"==typeof i&&"object"==typeof a){if(i.constructor!==a.constructor)return!1;var s,l,c,u;if(Array.isArray(i)){if((s=i.length)!=a.length)return!1;for(l=s;0!=l--;)if(!o(i[l],a[l]))return!1;return!0}if(t&&i instanceof Map&&a instanceof Map){if(i.size!==a.size)return!1;for(u=i.entries();!(l=u.next()).done;)if(!a.has(l.value[0]))return!1;for(u=i.entries();!(l=u.next()).done;)if(!o(l.value[1],a.get(l.value[0])))return!1;return!0}if(n&&i instanceof Set&&a instanceof Set){if(i.size!==a.size)return!1;for(u=i.entries();!(l=u.next()).done;)if(!a.has(l.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(a)){if((s=i.length)!=a.length)return!1;for(l=s;0!=l--;)if(i[l]!==a[l])return!1;return!0}if(i.constructor===RegExp)return i.source===a.source&&i.flags===a.flags;if(i.valueOf!==Object.prototype.valueOf&&"function"==typeof i.valueOf&&"function"==typeof a.valueOf)return i.valueOf()===a.valueOf();if(i.toString!==Object.prototype.toString&&"function"==typeof i.toString&&"function"==typeof a.toString)return i.toString()===a.toString();if((s=(c=Object.keys(i)).length)!==Object.keys(a).length)return!1;for(l=s;0!=l--;)if(!Object.prototype.hasOwnProperty.call(a,c[l]))return!1;if(e&&i instanceof Element)return!1;for(l=s;0!=l--;)if(("_owner"!==c[l]&&"__v"!==c[l]&&"__o"!==c[l]||!i.$$typeof)&&!o(i[c[l]],a[c[l]]))return!1;return!0}return i!=i&&a!=a}return qx=function(e,t){try{return o(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}}();const Gx=dt(Xx);function Kx(){const e=ct.useContext(Mp);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function Zx(){const e=Up(),t=Kx();return at(at({},e),{},{theme:t})}function Jx(e,t={}){var n;const{styleConfig:r}=t,o=ot(t,x),{theme:i,colorMode:a}=Zx(),s=e?kn(i,`components.${e}`):void 0,l=r||s,c=Fn({theme:i,colorMode:a},null!==(n=null==l?void 0:l.defaultProps)&&void 0!==n?n:{},fn(Tn(o,["children"])),((e,t)=>e?void 0:t)),u=ct.useRef({});if(l){const e=function(e){return t=>{var n;const{variant:r,size:o,theme:i}=t,a=Xo(i);return Fn({},Rn(null!==(n=e.baseStyle)&&void 0!==n?n:{},t),a(e,"sizes",o,t),a(e,"variants",r,t))}}(l),t=e(c);Gx(u.current,t)||(u.current=t)}return u.current}function Qx(e,t={}){return Jx(e,t)}function ew(e,t={}){return Jx(e,t)}const tw={path:Vt.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[Vt.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),Vt.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),Vt.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},nw=it("ap",Ux(((e,t)=>{const{as:n,viewBox:r,color:o="currentColor",focusable:i=!1,children:a,className:s,__css:l}=e,c=ot(e,w),u=mn("chakra-icon",s),d=Qx("Icon",e),p={ref:t,focusable:i,className:u,__css:at(at({w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o},l),d)},f=null!=r?r:tw.viewBox;if(n&&"string"!=typeof n)return Vt.jsx(Vx.svg,at(at({as:n},p),c));const h=null!=a?a:tw.path;return Vt.jsx(Vx.svg,at(at(at({verticalAlign:"middle",viewBox:f},p),c),{},{children:h}))})));function rw(e){return Vt.jsx(nw,at(at({viewBox:"0 0 24 24"},e),{},{children:Vt.jsx("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})}))}nw.displayName="Icon";const ow=Wp({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),iw=it("S",Ux(((e,t)=>{const n=Qx("Spinner",e),r=Go(e),{label:o="Loading...",thickness:i="2px",speed:a="0.45s",emptyColor:s="transparent",className:l}=r,c=ot(r,k),u=mn("chakra-spinner",l),d=at({display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:s,borderLeftColor:s,animation:`${ow} ${a} linear infinite`},n);return Vt.jsx(Vx.div,at(at({ref:t,__css:d,className:u},c),{},{children:o&&Vt.jsx(Vx.span,{srOnly:!0,children:o})}))})));iw.displayName="Spinner";const[aw,sw]=hn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[lw,cw]=hn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),uw={info:{icon:function(e){return Vt.jsx(nw,at(at({viewBox:"0 0 24 24"},e),{},{children:Vt.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})}))},colorScheme:"blue"},warning:{icon:rw,colorScheme:"orange"},success:{icon:function(e){return Vt.jsx(nw,at(at({viewBox:"0 0 24 24"},e),{},{children:Vt.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})}))},colorScheme:"green"},error:{icon:rw,colorScheme:"red"},loading:{icon:iw,colorScheme:"blue"}};const dw=it("U",Ux((function(e,t){var n;const r=Go(e),{status:o="info",addRole:i=!0}=r,a=ot(r,S),s=null!==(n=e.colorScheme)&&void 0!==n?n:function(e){return uw[e].colorScheme}(o),l=ew("Alert",at(at({},e),{},{colorScheme:s})),c=at({width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden"},l.container);return Vt.jsx(aw,{value:{status:o},children:Vt.jsx(lw,{value:l,children:Vt.jsx(Vx.div,at(at({"data-status":o,role:i?"alert":void 0,ref:t},a),{},{className:mn("chakra-alert",e.className),__css:c}))})})})));function pw(e){const{status:t}=sw(),n=function(e){return uw[e].icon}(t),r=cw(),o="loading"===t?r.spinner:r.icon;return Vt.jsx(Vx.span,at(at({display:"inherit","data-status":t},e),{},{className:mn("chakra-alert__icon",e.className),__css:o,children:e.children||Vt.jsx(n,{h:"100%",w:"100%"})}))}dw.displayName="Alert",pw.displayName="AlertIcon";const fw=it("X",Ux((function(e,t){const n=cw(),{status:r}=sw();return Vt.jsx(Vx.div,at(at({ref:t,"data-status":r},e),{},{className:mn("chakra-alert__title",e.className),__css:n.title}))})));fw.displayName="AlertTitle";const hw=it("Y",Ux((function(e,t){const{status:n}=sw(),r=at({display:"inline"},cw().description);return Vt.jsx(Vx.div,at(at({ref:t,"data-status":n},e),{},{className:mn("chakra-alert__desc",e.className),__css:r}))})));function mw(e){return Vt.jsx(nw,at(at({focusable:"false","aria-hidden":!0},e),{},{children:Vt.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})}))}hw.displayName="AlertDescription";const vw=it("a8",Ux((function(e,t){const n=Qx("CloseButton",e),r=Go(e),{children:o,isDisabled:i,__css:a}=r,s=ot(r,C);return Vt.jsx(Vx.button,at(at({type:"button","aria-label":"Close",ref:t,disabled:i,__css:at(at(at({},{outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}),n),a)},s),{},{children:o||Vt.jsx(mw,{width:"1em",height:"1em"})}))})));vw.displayName="CloseButton";const gw=e=>{const{status:t,variant:n="solid",id:r,title:o,isClosable:i,onClose:a,description:s,colorScheme:l,icon:c}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return Vt.jsxs(dw,{addRole:!1,status:t,variant:n,id:null==u?void 0:u.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:l,children:[Vt.jsx(pw,{children:c}),Vt.jsxs(Vx.div,{flex:"1",maxWidth:"100%",children:[o&&Vt.jsx(fw,{id:null==u?void 0:u.title,children:o}),s&&Vt.jsx(hw,{id:null==u?void 0:u.description,display:"block",children:s})]}),i&&Vt.jsx(vw,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1})]})};function bw(e={}){const{render:t,toastComponent:n=gw}=e;return r=>"function"==typeof t?t(at(at({},r),e)):Vt.jsx(n,at(at({},r),e))}const yw=function(e){let t=e;const n=new Set,r=e=>{t=e(t),n.forEach((e=>e()))};return{getState:()=>t,subscribe:t=>(n.add(t),()=>{r((()=>e)),n.delete(t)}),removeToast:(e,t)=>{r((n=>at(at({},n),{},{[t]:n[t].filter((t=>t.id!=e))})))},notify:(e,t)=>{const n=function(e,t={}){var n,r;xw+=1;const o=null!==(n=t.id)&&void 0!==n?n:xw,i=null!==(r=t.position)&&void 0!==r?r:"bottom";return{id:o,message:e,position:i,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>yw.removeToast(String(o),i),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}(e,t),{position:o,id:i}=n;return r((e=>{var t,r;const i=o.includes("top")?[n,...null!==(t=e[o])&&void 0!==t?t:[]]:[...null!==(r=e[o])&&void 0!==r?r:[],n];return at(at({},e),{},{[o]:i})})),i},update:(e,t)=>{e&&r((n=>{const r=at({},n),{position:o,index:i}=_x(r,e);return o&&-1!==i&&(r[o][i]=at(at(at({},r[o][i]),t),{},{message:bw(t)})),r}))},closeAll:({positions:e}={})=>{r((t=>(null!=e?e:["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce(((e,n)=>(e[n]=t[n].map((e=>at(at({},e),{},{requestClose:!0}))),e)),at({},t))))},close:e=>{r((t=>{const n=Ex(t,e);return n?at(at({},t),{},{[n]:t[n].map((t=>t.id==e?at(at({},t),{},{requestClose:!0}):t))}):t}))},isActive:e=>Boolean(_x(yw.getState(),e).position)}}({top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]});let xw=0;const[ww,kw]=hn({strict:!1,name:"PortalContext"}),Sw="chakra-portal",Cw=e=>Vt.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),_w=e=>{const{appendToParentPortal:t,children:n}=e,[r,o]=ct.useState(null),i=ct.useRef(null),[,a]=ct.useState({});ct.useEffect((()=>a({})),[]);const s=kw(),l=cf();Xn((()=>{if(!r)return;const e=r.ownerDocument,n=t&&null!=s?s:e.body;if(!n)return;i.current=e.createElement("div"),i.current.className=Sw,n.appendChild(i.current),a({});const o=i.current;return()=>{n.contains(o)&&n.removeChild(o)}}),[r]);const c=null!=l&&l.zIndex?Vt.jsx(Cw,{zIndex:null==l?void 0:l.zIndex,children:n}):n;return i.current?ht.createPortal(Vt.jsx(ww,{value:i.current,children:c}),i.current):Vt.jsx("span",{ref:e=>{e&&o(e)}})},Ew=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,o=n.current,i=null!=o?o:"undefined"!=typeof window?document.body:void 0,a=ct.useMemo((()=>{const e=null==o?void 0:o.ownerDocument.createElement("div");return e&&(e.className=Sw),e}),[o]),[,s]=ct.useState({});return Xn((()=>s({})),[]),Xn((()=>{if(a&&i)return i.appendChild(a),()=>{i.removeChild(a)}}),[a,i]),i&&a?ht.createPortal(Vt.jsx(ww,{value:r?a:null,children:t}),a):null};function Pw(e){const t=at({appendToParentPortal:!0},e),{containerRef:n}=t,r=ot(t,_);return n?Vt.jsx(Ew,at({containerRef:n},r)):Vt.jsx(_w,at({},r))}Pw.className=Sw,Pw.selector=".chakra-portal",Pw.displayName="Portal";const[jw,Tw]=hn({name:"ToastOptionsContext",strict:!1}),Aw=e=>{const t=ct.useSyncExternalStore(yw.subscribe,yw.getState,yw.getState),{motionVariants:n,component:r=Hx,portalProps:o,animatePresenceProps:i}=e,a=Object.keys(t).map((e=>{const o=t[e];return Vt.jsx("div",{role:"region","aria-live":"polite","aria-label":`Notifications-${e}`,id:`chakra-toast-manager-${e}`,style:Px(e),children:Vt.jsx(Sx,at(at({},i),{},{initial:!1,children:o.map((e=>Vt.jsx(r,at({motionVariants:n},e),e.id)))}))},e)}));return Vt.jsx(Pw,at(at({},o),{},{children:a}))};it("ac",(Ow=Qu,function(e){let{children:t,theme:n=Ow,toastOptions:r}=e,o=ot(e,E);return Vt.jsxs(ff,at(at({theme:n},o),{},{children:[Vt.jsx(jw,{value:null==r?void 0:r.defaultOptions,children:t}),Vt.jsx(Aw,at({},r))]}))}));var Ow;function Rw(e){return e.sort(((e,t)=>{const n=e.compareDocumentPosition(t);if(n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(n&Node.DOCUMENT_POSITION_DISCONNECTED||n&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0}))}function Mw(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function Nw(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}const Iw="undefined"!=typeof window?ct.useLayoutEffect:ct.useEffect;var Dw=Object.defineProperty,zw=(e,t,n)=>(((e,t,n)=>{t in e?Dw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);class Bw{constructor(){zw(this,"descendants",new Map),zw(this,"register",(e=>{var t;if(null!=e)return"object"==typeof(t=e)&&"nodeType"in t&&t.nodeType===Node.ELEMENT_NODE?this.registerNode(e):t=>{this.registerNode(t,e)}})),zw(this,"unregister",(e=>{this.descendants.delete(e);const t=Rw(Array.from(this.descendants.keys()));this.assignIndex(t)})),zw(this,"destroy",(()=>{this.descendants.clear()})),zw(this,"assignIndex",(e=>{this.descendants.forEach((t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()}))})),zw(this,"count",(()=>this.descendants.size)),zw(this,"enabledCount",(()=>this.enabledValues().length)),zw(this,"values",(()=>Array.from(this.descendants.values()).sort(((e,t)=>e.index-t.index)))),zw(this,"enabledValues",(()=>this.values().filter((e=>!e.disabled)))),zw(this,"item",(e=>{if(0!==this.count())return this.values()[e]})),zw(this,"enabledItem",(e=>{if(0!==this.enabledCount())return this.enabledValues()[e]})),zw(this,"first",(()=>this.item(0))),zw(this,"firstEnabled",(()=>this.enabledItem(0))),zw(this,"last",(()=>this.item(this.descendants.size-1))),zw(this,"lastEnabled",(()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)})),zw(this,"indexOf",(e=>{var t,n;return e&&null!==(t=null===(n=this.descendants.get(e))||void 0===n?void 0:n.index)&&void 0!==t?t:-1})),zw(this,"enabledIndexOf",(e=>null==e?-1:this.enabledValues().findIndex((t=>t.node.isSameNode(e))))),zw(this,"next",((e,t=!0)=>{const n=Mw(e,this.count(),t);return this.item(n)})),zw(this,"nextEnabled",((e,t=!0)=>{const n=this.item(e);if(!n)return;const r=Mw(this.enabledIndexOf(n.node),this.enabledCount(),t);return this.enabledItem(r)})),zw(this,"prev",((e,t=!0)=>{const n=Nw(e,this.count()-1,t);return this.item(n)})),zw(this,"prevEnabled",((e,t=!0)=>{const n=this.item(e);if(!n)return;const r=Nw(this.enabledIndexOf(n.node),this.enabledCount()-1,t);return this.enabledItem(r)})),zw(this,"registerNode",((e,t)=>{if(!e||this.descendants.has(e))return;const n=Rw(Array.from(this.descendants.keys()).concat(e));null!=t&&t.disabled&&(t.disabled=!!t.disabled);const r=at({node:e,index:-1},t);this.descendants.set(e,r),this.assignIndex(n)}))}}function Fw(){const[e,t]=hn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});return[e,t,()=>{const e=ct.useRef(new Bw);return Iw((()=>()=>e.current.destroy())),e.current},e=>{const n=t(),[r,o]=ct.useState(-1),i=ct.useRef(null);Iw((()=>()=>{i.current&&n.unregister(i.current)}),[]),Iw((()=>{if(!i.current)return;const e=Number(i.current.dataset.index);r==e||Number.isNaN(e)||o(e)}));const a=e?n.register(e):n.register;return{descendants:n,index:r,enabledIndex:n.enabledIndexOf(i.current),register:or(a,i)}}]}const[Lw,$w]=hn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Vw,Ww]=hn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Hw,Uw,qw,Yw]=Fw();function Xw(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:o,allowToggle:i}=e,a=ot(e,P);!function(e){const t=e.index||e.defaultIndex,n=null!=t&&!Array.isArray(t)&&e.allowMultiple;In({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}(e),function(e){In({condition:!(!e.allowMultiple||!e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}(e);const s=qw(),[l,c]=ct.useState(-1);ct.useEffect((()=>()=>{c(-1)}),[]);const[u,d]=Wn({value:r,defaultValue:()=>o?null!=n?n:[]:null!=n?n:-1,onChange:t});return{index:u,setIndex:d,htmlProps:a,getAccordionItemProps:e=>{let t=!1;null!==e&&(t=Array.isArray(u)?u.includes(e):u===e);return{isOpen:t,onChange:t=>{if(null!==e)if(o&&Array.isArray(u)){const n=t?u.concat(e):u.filter((t=>t!==e));d(n)}else t?d(e):i&&d(-1)}}},focusedIndex:l,setFocusedIndex:c,descendants:s}}const[Gw,Kw]=hn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Zw(e){const{isDisabled:t,isFocusable:n,id:r}=e,o=ot(e,j),{getAccordionItemProps:i,setFocusedIndex:a}=Kw(),s=ct.useRef(null),l=ct.useId(),c=null!=r?r:l,u=`accordion-button-${c}`,d=`accordion-panel-${c}`;!function(e){In({condition:!(!e.isFocusable||e.isDisabled),message:"Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well.\n "})}(e);const{register:p,index:f,descendants:h}=Yw({disabled:t&&!n}),{isOpen:m,onChange:v}=i(-1===f?null:f);!function(e){In({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}({isOpen:m,isDisabled:t});const g=ct.useCallback((()=>{null==v||v(!m),a(f)}),[f,a,m,v]),b=ct.useCallback((e=>{const t={ArrowDown:()=>{const e=h.nextEnabled(f);null==e||e.node.focus()},ArrowUp:()=>{const e=h.prevEnabled(f);null==e||e.node.focus()},Home:()=>{const e=h.firstEnabled();null==e||e.node.focus()},End:()=>{const e=h.lastEnabled();null==e||e.node.focus()}},n=t[e.key];n&&(e.preventDefault(),n(e))}),[h,f]),y=ct.useCallback((()=>{a(f)}),[a,f]),x=ct.useCallback((function(e={},n=null){return at(at({},e),{},{type:"button",ref:or(p,s,n),id:u,disabled:!!t,"aria-expanded":!!m,"aria-controls":d,onClick:dn(e.onClick,g),onFocus:dn(e.onFocus,y),onKeyDown:dn(e.onKeyDown,b)})}),[u,t,m,g,y,b,d,p]),w=ct.useCallback((function(e={},t=null){return at(at({},e),{},{ref:t,role:"region",id:d,"aria-labelledby":u,hidden:!m})}),[u,m,d]);return{isOpen:m,isDisabled:t,isFocusable:n,onOpen:()=>{null==v||v(!0)},onClose:()=>{null==v||v(!1)},getButtonProps:x,getPanelProps:w,htmlProps:o}}const Jw=it("aG",Ux((function(e,t){let{children:n,reduceMotion:r}=e,o=ot(e,T);const i=ew("Accordion",o),a=Xw(Go(o)),{htmlProps:s,descendants:l}=a,c=ot(a,A),u=ct.useMemo((()=>at(at({},c),{},{reduceMotion:!!r})),[c,r]);return Vt.jsx(Hw,{value:l,children:Vt.jsx(Gw,{value:u,children:Vt.jsx(Lw,{value:i,children:Vt.jsx(Vx.div,at(at({ref:t},s),{},{className:mn("chakra-accordion",o.className),__css:i.root,children:n}))})})})})));Jw.displayName="Accordion";function Qw(e){const{isOpen:t,isDisabled:n}=Ww(),{reduceMotion:r}=Kw(),o=mn("chakra-accordion__icon",e.className),i=at({opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center"},$w().icon);return Vt.jsx(nw,at(at({viewBox:"0 0 24 24","aria-hidden":!0,className:o,__css:i},e),{},{children:Vt.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}))}it("aI",Ux((function(e,t){const{getButtonProps:n}=Ww(),r=n(e,t),o=at({display:"flex",alignItems:"center",width:"100%",outline:0},$w().button);return Vt.jsx(Vx.button,at(at({},r),{},{className:mn("chakra-accordion__button",e.className),__css:o}))}))).displayName="AccordionButton",Qw.displayName="AccordionIcon";it("aH",Ux((function(e,t){const{children:n,className:r}=e,o=Zw(e),{htmlProps:i}=o,a=ot(o,O),s=at(at({},$w().container),{},{overflowAnchor:"none"}),l=ct.useMemo((()=>a),[a]);return Vt.jsx(Vw,{value:l,children:Vt.jsx(Vx.div,at(at({ref:t},i),{},{className:mn("chakra-accordion__item",r),__css:s,children:"function"==typeof n?n({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):n}))})}))).displayName="AccordionItem";const ek={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1]},tk={enter:{duration:.2,ease:ek.easeOut},exit:{duration:.1,ease:ek.easeIn}},nk=(e,t)=>at(at({},e),{},{delay:"number"==typeof t?t:null==t?void 0:t.enter}),rk=(e,t)=>at(at({},e),{},{delay:"number"==typeof t?t:null==t?void 0:t.exit}),ok={exit:{height:{duration:.2,ease:ek.ease},opacity:{duration:.3,ease:ek.ease}},enter:{height:{duration:.3,ease:ek.ease},opacity:{duration:.4,ease:ek.ease}}},ik={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var i,a;return at(at({},e&&{opacity:(a=t,null!=a&&parseInt(a.toString(),10)>0?1:0)}),{},{height:t,transitionEnd:null==r?void 0:r.exit,transition:null!==(i=null==n?void 0:n.exit)&&void 0!==i?i:rk(ok.exit,o)})},enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var i;return at(at({},e&&{opacity:1}),{},{height:t,transitionEnd:null==r?void 0:r.enter,transition:null!==(i=null==n?void 0:n.enter)&&void 0!==i?i:nk(ok.enter,o)})}},ak=ct.forwardRef(((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:i=0,endingHeight:a="auto",style:s,className:l,transition:c,transitionEnd:u,animatePresenceProps:d}=e,p=ot(e,R),[f,h]=ct.useState(!1);ct.useEffect((()=>{const e=setTimeout((()=>{h(!0)}));return()=>clearTimeout(e)}),[]),In({condition:Number(i)>0&&!!r,message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const m=parseFloat(i.toString())>0,v={startingHeight:i,endingHeight:a,animateOpacity:o,transition:f?c:{enter:{duration:0}},transitionEnd:{enter:null==u?void 0:u.enter,exit:r?null==u?void 0:u.exit:at(at({},null==u?void 0:u.exit),{},{display:m?"block":"none"})}},g=!r||n,b=n||r?"enter":"exit";return Vt.jsx(Sx,at(at({},d),{},{initial:!1,custom:v,children:g&&Vt.jsx(vx.div,at(at({ref:t},p),{},{className:mn("chakra-collapse",l),style:at({overflow:"hidden",display:"block"},s),custom:v,variants:ik,initial:!!r&&"exit",animate:b,exit:"exit"}))}))}));ak.displayName="Collapse";const sk=it("aK",Ux((function(e,t){const{className:n,motionProps:r}=e,o=ot(e,M),{reduceMotion:i}=Kw(),{getPanelProps:a,isOpen:s}=Ww(),l=a(o,t),c=mn("chakra-accordion__panel",n),u=$w();i||delete l.hidden;const d=Vt.jsx(Vx.div,at(at({},l),{},{__css:u.panel,className:c}));return i?d:Vt.jsx(ak,at(at({in:s},r),{},{children:d}))})));sk.displayName="AccordionPanel";const[lk,ck]=hn({name:"AvatarStylesContext",hookName:"useAvatarStyles",providerName:""});function uk(e){var t;const n=e.trim().split(" "),r=null!==(t=n[0])&&void 0!==t?t:"",o=n.length>1?n[n.length-1]:"";return r&&o?`${r.charAt(0)}${o.charAt(0)}`:r.charAt(0)}function dk(e){const{name:t,getInitials:n}=e,r=ot(e,N),o=ck();return Vt.jsx(Vx.div,at(at({role:"img","aria-label":t},r),{},{__css:o.label,children:t?null==n?void 0:n(t):null}))}dk.displayName="AvatarName";const pk=e=>Vt.jsxs(Vx.svg,at(at({viewBox:"0 0 128 128",color:"#fff",width:"100%",height:"100%",className:"chakra-avatar__svg"},e),{},{children:[Vt.jsx("path",{fill:"currentColor",d:"M103,102.1388 C93.094,111.92 79.3504,118 64.1638,118 C48.8056,118 34.9294,111.768 25,101.7892 L25,95.2 C25,86.8096 31.981,80 40.6,80 L87.4,80 C96.019,80 103,86.8096 103,95.2 L103,102.1388 Z"}),Vt.jsx("path",{fill:"currentColor",d:"M63.9961647,24 C51.2938136,24 41,34.2938136 41,46.9961647 C41,59.7061864 51.2938136,70 63.9961647,70 C76.6985159,70 87,59.7061864 87,46.9961647 C87,34.2938136 76.6985159,24 63.9961647,24"})]}));function fk(e){const{loading:t,src:n,srcSet:r,onLoad:o,onError:i,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[c,u]=ct.useState("pending");ct.useEffect((()=>{u(n?"loading":"pending")}),[n]);const d=ct.useRef(),p=ct.useCallback((()=>{if(!n)return;f();const e=new Image;e.src=n,a&&(e.crossOrigin=a),r&&(e.srcset=r),s&&(e.sizes=s),t&&(e.loading=t),e.onload=e=>{f(),u("loaded"),null==o||o(e)},e.onerror=e=>{f(),u("failed"),null==i||i(e)},d.current=e}),[n,a,r,s,o,i,t]),f=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)};return Xn((()=>{if(!l)return"loading"===c&&p(),()=>{f()}}),[c,p,l]),l?"loaded":c}function hk(e){const{src:t,srcSet:n,onError:r,onLoad:o,getInitials:i,name:a,borderRadius:s,loading:l,iconLabel:c,icon:u=Vt.jsx(pk,{}),ignoreFallback:d,referrerPolicy:p,crossOrigin:f}=e,h=fk({src:t,onError:r,crossOrigin:f,ignoreFallback:d});return!t||!("loaded"===h)?a?Vt.jsx(dk,{className:"chakra-avatar__initials",getInitials:i,name:a}):ct.cloneElement(u,{role:"img","aria-label":c}):Vt.jsx(Vx.img,{src:t,srcSet:n,alt:null!=a?a:c,onLoad:o,referrerPolicy:p,crossOrigin:null!=f?f:void 0,className:"chakra-avatar__img",loading:l,__css:{width:"100%",height:"100%",objectFit:"cover",borderRadius:s}})}hk.displayName="AvatarImage";const mk={display:"inline-flex",alignItems:"center",justifyContent:"center",textAlign:"center",textTransform:"uppercase",fontWeight:"medium",position:"relative",flexShrink:0},vk=it("al",Ux(((e,t)=>{const n=ew("Avatar",e),[r,o]=ct.useState(!1),i=Go(e),{src:a,srcSet:s,name:l,showBorder:c,borderRadius:u="full",onError:d,onLoad:p,getInitials:f=uk,icon:h=Vt.jsx(pk,{}),iconLabel:m=" avatar",loading:v,children:g,borderColor:b,ignoreFallback:y,crossOrigin:x,referrerPolicy:w}=i,k=ot(i,I),S=at(at({borderRadius:u,borderWidth:c?"2px":void 0},mk),n.container);return b&&(S.borderColor=b),Vt.jsx(Vx.span,at(at({ref:t},k),{},{className:mn("chakra-avatar",e.className),"data-loaded":Zt(r),__css:S,children:Vt.jsxs(lk,{value:n,children:[Vt.jsx(hk,{src:a,srcSet:s,loading:v,onLoad:dn(p,(()=>{o(!0)})),onError:d,getInitials:f,name:l,borderRadius:u,icon:h,iconLabel:m,ignoreFallback:y,crossOrigin:x,referrerPolicy:w}),g]})}))})));vk.displayName="Avatar";const gk=it("x",Ux((function(e,t){const n=Qx("Badge",e),r=Go(e),{className:o}=r,i=ot(r,D);return Vt.jsx(Vx.span,at(at({ref:t,className:mn("chakra-badge",e.className)},i),{},{__css:at({display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle"},n)}))})));gk.displayName="Badge";it("B",Vx("div")).displayName="Box";const[bk,yk]=hn({strict:!1,name:"ButtonGroupContext"});function xk(e){const{children:t,className:n}=e,r=ot(e,z),o=ct.isValidElement(t)?ct.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,i=mn("chakra-button__icon",n);return Vt.jsx(Vx.span,at(at({display:"inline-flex",alignSelf:"center",flexShrink:0},r),{},{className:i,children:o}))}function wk(e){const{label:t,placement:n,spacing:r="0.5rem",children:o=Vt.jsx(iw,{color:"currentColor",width:"1em",height:"1em"}),className:i,__css:a}=e,s=ot(e,B),l=mn("chakra-button__spinner",i),c="start"===n?"marginEnd":"marginStart",u=ct.useMemo((()=>at({display:"flex",alignItems:"center",position:t?"relative":"absolute",[c]:t?r:0,fontSize:"1em",lineHeight:"normal"},a)),[a,t,c,r]);return Vt.jsx(Vx.div,at(at({className:l},s),{},{__css:u,children:o}))}xk.displayName="ButtonIcon",wk.displayName="ButtonSpinner";const kk=it("t",Ux(((e,t)=>{const n=yk(),r=Qx("Button",at(at({},n),e)),o=Go(e),{isDisabled:i=(null==n?void 0:n.isDisabled),isLoading:a,isActive:s,children:l,leftIcon:c,rightIcon:u,loadingText:d,iconSpacing:p="0.5rem",type:f,spinner:h,spinnerPlacement:m="start",className:v,as:g,shouldWrapChildren:b}=o,y=ot(o,F),x=ct.useMemo((()=>{const e=at(at({},null==r?void 0:r._focus),{},{zIndex:1});return at(at({display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none"},r),!!n&&{_focus:e})}),[r,n]),{ref:w,type:k}=function(e){const[t,n]=ct.useState(!e),r=ct.useCallback((e=>{e&&n("BUTTON"===e.tagName)}),[]);return{ref:r,type:t?"button":void 0}}(g),S={rightIcon:u,leftIcon:c,iconSpacing:p,children:l,shouldWrapChildren:b};return Vt.jsxs(Vx.button,at(at({disabled:i||a,ref:ir(t,w),as:g,type:null!=f?f:k,"data-active":Zt(s),"data-loading":Zt(a),__css:x,className:mn("chakra-button",v)},y),{},{children:[a&&"start"===m&&Vt.jsx(wk,{className:"chakra-button__spinner--start",label:d,placement:"start",spacing:p,children:h}),a?d||Vt.jsx(Vx.span,{opacity:0,children:Vt.jsx(Sk,at({},S))}):Vt.jsx(Sk,at({},S)),a&&"end"===m&&Vt.jsx(wk,{className:"chakra-button__spinner--end",label:d,placement:"end",spacing:p,children:h})]}))})));function Sk(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:o,shouldWrapChildren:i}=e;return i?Vt.jsxs("span",{style:{display:"contents"},children:[t&&Vt.jsx(xk,{marginEnd:o,children:t}),r,n&&Vt.jsx(xk,{marginStart:o,children:n})]}):Vt.jsxs(Vt.Fragment,{children:[t&&Vt.jsx(xk,{marginEnd:o,children:t}),r,n&&Vt.jsx(xk,{marginStart:o,children:n})]})}kk.displayName="Button";const Ck={horizontal:{"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}},vertical:{"> *:first-of-type:not(:last-of-type)":{borderBottomRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderTopRadius:0}}},_k={horizontal:e=>({"& > *:not(style) ~ *:not(style)":{marginStart:e}}),vertical:e=>({"& > *:not(style) ~ *:not(style)":{marginTop:e}})},Ek=it("s",Ux((function(e,t){const{size:n,colorScheme:r,variant:o,className:i,spacing:a="0.5rem",isAttached:s,isDisabled:l,orientation:c="horizontal"}=e,u=ot(e,L),d=mn("chakra-button__group",i),p=ct.useMemo((()=>({size:n,colorScheme:r,variant:o,isDisabled:l})),[n,r,o,l]);let f=at({display:"inline-flex"},s?Ck[c]:_k[c](a));const h="vertical"===c;return Vt.jsx(bk,{value:p,children:Vt.jsx(Vx.div,at({ref:t,role:"group",__css:f,className:d,"data-attached":s?"":void 0,"data-orientation":c,flexDir:h?"column":void 0},u))})})));Ek.displayName="ButtonGroup";it("a2",Ux(((e,t)=>{const{icon:n,children:r,isRound:o,"aria-label":i}=e,a=ot(e,$),s=n||r,l=ct.isValidElement(s)?ct.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return Vt.jsx(kk,at(at({px:"0",py:"0",borderRadius:o?"full":void 0,ref:t,"aria-label":i},a),{},{children:l}))}))).displayName="IconButton";it("C",Vx("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}})).displayName="Center";const Pk={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Ux((function(e,t){const{axis:n="both"}=e,r=ot(e,V);return Vt.jsx(Vx.div,at(at({ref:t,__css:Pk[n]},r),{},{position:"absolute"}))}));const[jk,Tk]=hn({name:"CheckboxGroupContext",strict:!1});function Ak(e){return Vt.jsx(Vx.svg,at(at({width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16}},e),{},{children:Vt.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})}))}function Ok(e){return Vt.jsx(Vx.svg,at(at({width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4}},e),{},{children:Vt.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})}))}function Rk(e){const{isIndeterminate:t,isChecked:n}=e,r=ot(e,W),o=t?Ok:Ak;return n||t?Vt.jsx(Vx.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:Vt.jsx(o,at({},r))}):null}var Mk=()=>"undefined"!=typeof document,Nk=!1,Ik=null,Dk=!1,zk=!1,Bk=new Set;function Fk(e,t){Bk.forEach((n=>n(e,t)))}var Lk="undefined"!=typeof window&&null!=window.navigator&&/^Mac/.test(window.navigator.platform);function $k(e){var t;Dk=!0,(t=e).metaKey||!Lk&&t.altKey||t.ctrlKey||"Control"===t.key||"Shift"===t.key||"Meta"===t.key||(Ik="keyboard",Fk("keyboard",e))}function Vk(e){if(Ik="pointer","mousedown"===e.type||"pointerdown"===e.type){Dk=!0;const n=e.composedPath?e.composedPath()[0]:e.target;let r=!1;try{r=n.matches(":focus-visible")}catch(t){}if(r)return;Fk("pointer",e)}}function Wk(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||0===t.detail&&!t.pointerType)&&(Dk=!0,Ik="virtual")}function Hk(e){e.target!==window&&e.target!==document&&(e.target instanceof Element&&e.target.hasAttribute("tabindex")||(Dk||zk||(Ik="virtual",Fk("virtual",e)),Dk=!1,zk=!1))}function Uk(){Dk=!1,zk=!0}function qk(){return"pointer"!==Ik}function Yk(e){!function(){if(!Mk()||Nk)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...t){Dk=!0,e.apply(this,t)},document.addEventListener("keydown",$k,!0),document.addEventListener("keyup",$k,!0),document.addEventListener("click",Wk,!0),window.addEventListener("focus",Hk,!0),window.addEventListener("blur",Uk,!1),"undefined"!=typeof PointerEvent?(document.addEventListener("pointerdown",Vk,!0),document.addEventListener("pointermove",Vk,!0),document.addEventListener("pointerup",Vk,!0)):(document.addEventListener("mousedown",Vk,!0),document.addEventListener("mousemove",Vk,!0),document.addEventListener("mouseup",Vk,!0)),Nk=!0}(),e(qk());const t=()=>e(qk());return Bk.add(t),()=>{Bk.delete(t)}}const[Xk,Gk]=hn({name:"FormControlStylesContext",errorMessage:"useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),[Kk,Zk]=hn({strict:!1,name:"FormControlContext"});const Jk=it("Z",Ux((function(e,t){const n=ew("Form",e),r=function(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:o,isReadOnly:i}=e,a=ot(e,H),s=ct.useId(),l=t||`field-${s}`,c=`${l}-label`,u=`${l}-feedback`,d=`${l}-helptext`,[p,f]=ct.useState(!1),[h,m]=ct.useState(!1),[v,g]=ct.useState(!1),b=ct.useCallback(((e={},t=null)=>at(at({id:d},e),{},{ref:or(t,(e=>{e&&m(!0)}))})),[d]),y=ct.useCallback(((e={},t=null)=>at(at({},e),{},{ref:t,"data-focus":Zt(v),"data-disabled":Zt(o),"data-invalid":Zt(r),"data-readonly":Zt(i),id:void 0!==e.id?e.id:c,htmlFor:void 0!==e.htmlFor?e.htmlFor:l})),[l,o,v,r,i,c]),x=ct.useCallback(((e={},t=null)=>at(at({id:u},e),{},{ref:or(t,(e=>{e&&f(!0)})),"aria-live":"polite"})),[u]),w=ct.useCallback(((e={},t=null)=>at(at(at({},e),a),{},{ref:t,role:"group","data-focus":Zt(v),"data-disabled":Zt(o),"data-invalid":Zt(r),"data-readonly":Zt(i)})),[a,o,v,r,i]),k=ct.useCallback(((e={},t=null)=>at(at({},e),{},{ref:t,role:"presentation","aria-hidden":!0,children:e.children||"*"})),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!i,isDisabled:!!o,isFocused:!!v,onFocus:()=>g(!0),onBlur:()=>g(!1),hasFeedbackText:p,setHasFeedbackText:f,hasHelpText:h,setHasHelpText:m,id:l,labelId:c,feedbackId:u,helpTextId:d,htmlProps:a,getHelpTextProps:b,getErrorMessageProps:x,getRootProps:w,getLabelProps:y,getRequiredIndicatorProps:k}}(Go(e)),{getRootProps:o}=r,i=ot(r,U),a=mn("chakra-form-control",e.className);return Vt.jsx(Kk,{value:i,children:Vt.jsx(Xk,{value:n,children:Vt.jsx(Vx.div,at(at({},o({},t)),{},{className:a,__css:n.container}))})})})));Jk.displayName="FormControl";const Qk=it("a0",Ux((function(e,t){const n=Zk(),r=Gk(),o=mn("chakra-form__helper-text",e.className);return Vt.jsx(Vx.div,at(at({},null==n?void 0:n.getHelpTextProps(e,t)),{},{__css:r.helperText,className:o}))})));function eS(e){const t=tS(e),{isDisabled:n,isInvalid:r,isReadOnly:o,isRequired:i}=t;return at(at({},ot(t,q)),{},{disabled:n,readOnly:o,required:i,"aria-invalid":Jt(r),"aria-required":Jt(i),"aria-readonly":Jt(o)})}function tS(e){var t,n,r;const o=Zk(),{id:i,disabled:a,readOnly:s,required:l,isRequired:c,isInvalid:u,isReadOnly:d,isDisabled:p,onFocus:f,onBlur:h}=e,m=ot(e,Y),v=e["aria-describedby"]?[e["aria-describedby"]]:[];return null!=o&&o.hasFeedbackText&&null!=o&&o.isInvalid&&v.push(o.feedbackId),null!=o&&o.hasHelpText&&v.push(o.helpTextId),at(at({},m),{},{"aria-describedby":v.join(" ")||void 0,id:null!=i?i:null==o?void 0:o.id,isDisabled:null!==(t=null!=a?a:p)&&void 0!==t?t:null==o?void 0:o.isDisabled,isReadOnly:null!==(n=null!=s?s:d)&&void 0!==n?n:null==o?void 0:o.isReadOnly,isRequired:null!==(r=null!=l?l:c)&&void 0!==r?r:null==o?void 0:o.isRequired,isInvalid:null!=u?u:null==o?void 0:o.isInvalid,onFocus:dn(null==o?void 0:o.onFocus,f),onBlur:dn(null==o?void 0:o.onBlur,h)})}Qk.displayName="FormHelperText";const nS={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};function rS(e={}){const t=tS(e),{isDisabled:n,isReadOnly:r,isRequired:o,isInvalid:i,id:a,onBlur:s,onFocus:l,"aria-describedby":c}=t,{defaultChecked:u,isChecked:d,isFocusable:p,onChange:f,isIndeterminate:h,name:m,value:v,tabIndex:g,"aria-label":b,"aria-labelledby":y,"aria-invalid":x}=e,w=Tn(ot(e,X),["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),k=Ln(f),S=Ln(s),C=Ln(l),[_,E]=ct.useState(!1),[P,j]=ct.useState(!1),[T,A]=ct.useState(!1),[O,R]=ct.useState(!1);ct.useEffect((()=>Yk(E)),[]);const M=ct.useRef(null),[N,I]=ct.useState(!0),[D,z]=ct.useState(!!u),B=void 0!==d,F=B?d:D,L=ct.useCallback((e=>{r||n?e.preventDefault():(B||z(F?e.currentTarget.checked:!!h||e.currentTarget.checked),null==k||k(e))}),[r,n,F,B,h,k]);Xn((()=>{M.current&&(M.current.indeterminate=Boolean(h))}),[h]),Gn((()=>{n&&j(!1)}),[n,j]),Xn((()=>{const e=M.current;if(null==e||!e.form)return;const t=()=>{z(!!u)};return e.form.addEventListener("reset",t),()=>{var n;return null===(n=e.form)||void 0===n?void 0:n.removeEventListener("reset",t)}}),[]);const $=n&&!p,V=ct.useCallback((e=>{" "===e.key&&R(!0)}),[R]),W=ct.useCallback((e=>{" "===e.key&&R(!1)}),[R]);Xn((()=>{if(!M.current)return;M.current.checked!==F&&z(M.current.checked)}),[M.current]);const H=ct.useCallback(((e={},t=null)=>at(at({},e),{},{ref:t,"data-active":Zt(O),"data-hover":Zt(T),"data-checked":Zt(F),"data-focus":Zt(P),"data-focus-visible":Zt(P&&_),"data-indeterminate":Zt(h),"data-disabled":Zt(n),"data-invalid":Zt(i),"data-readonly":Zt(r),"aria-hidden":!0,onMouseDown:dn(e.onMouseDown,(e=>{P&&e.preventDefault(),R(!0)})),onMouseUp:dn(e.onMouseUp,(()=>R(!1))),onMouseEnter:dn(e.onMouseEnter,(()=>A(!0))),onMouseLeave:dn(e.onMouseLeave,(()=>A(!1)))})),[O,F,n,P,_,T,h,i,r]),U=ct.useCallback(((e={},t=null)=>at(at({},e),{},{ref:t,"data-active":Zt(O),"data-hover":Zt(T),"data-checked":Zt(F),"data-focus":Zt(P),"data-focus-visible":Zt(P&&_),"data-indeterminate":Zt(h),"data-disabled":Zt(n),"data-invalid":Zt(i),"data-readonly":Zt(r)})),[O,F,n,P,_,T,h,i,r]),q=ct.useCallback(((e={},t=null)=>at(at(at({},w),e),{},{ref:or(t,(e=>{e&&I("LABEL"===e.tagName)})),onClick:dn(e.onClick,(()=>{var e;N||(null===(e=M.current)||void 0===e||e.click(),requestAnimationFrame((()=>{var e;null===(e=M.current)||void 0===e||e.focus({preventScroll:!0})})))})),"data-disabled":Zt(n),"data-checked":Zt(F),"data-invalid":Zt(i)})),[w,n,F,i,N]),Y=ct.useCallback(((e={},t=null)=>at(at({},e),{},{ref:or(M,t),type:"checkbox",name:m,value:v,id:a,tabIndex:g,onChange:dn(e.onChange,L),onBlur:dn(e.onBlur,S,(()=>j(!1))),onFocus:dn(e.onFocus,C,(()=>j(!0))),onKeyDown:dn(e.onKeyDown,V),onKeyUp:dn(e.onKeyUp,W),required:o,checked:F,disabled:$,readOnly:r,"aria-label":b,"aria-labelledby":y,"aria-invalid":x?Boolean(x):i,"aria-describedby":c,"aria-disabled":n,style:nS})),[m,v,a,L,S,C,V,W,o,F,$,r,b,y,x,i,c,n,g]),G=ct.useCallback(((e={},t=null)=>at(at({},e),{},{ref:t,onMouseDown:dn(e.onMouseDown,oS),"data-disabled":Zt(n),"data-checked":Zt(F),"data-invalid":Zt(i)})),[F,n,i]);return{state:{isInvalid:i,isFocused:P,isChecked:F,isActive:O,isHovered:T,isIndeterminate:h,isDisabled:n,isReadOnly:r,isRequired:o},getRootProps:q,getCheckboxProps:H,getIndicatorProps:U,getInputProps:Y,getLabelProps:G,htmlProps:w}}function oS(e){e.preventDefault(),e.stopPropagation()}const iS={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},aS={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},sS=Wp({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),lS=Wp({from:{opacity:0},to:{opacity:1}}),cS=Wp({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),uS=it("au",Ux((function(e,t){const n=Tk(),r=ew("Checkbox",at(at({},n),e)),o=Go(e),{spacing:i="0.5rem",className:a,children:s,iconColor:l,iconSize:c,icon:u=Vt.jsx(Rk,{}),isChecked:d,isDisabled:p=(null==n?void 0:n.isDisabled),onChange:f,inputProps:h}=o,m=ot(o,G);let v=d;null!=n&&n.value&&o.value&&(v=n.value.includes(o.value));let g=f;null!=n&&n.onChange&&o.value&&(g=un(n.onChange,f));const{state:b,getInputProps:y,getCheckboxProps:x,getLabelProps:w,getRootProps:k}=rS(at(at({},m),{},{isDisabled:p,isChecked:v,onChange:g})),S=function(e){const[t,n]=ct.useState(e),[r,o]=ct.useState(!1);return e!==t&&(o(!0),n(e)),r}(b.isChecked),C=ct.useMemo((()=>at(at({animation:S?b.isIndeterminate?`${lS} 20ms linear, ${cS} 200ms linear`:`${sS} 200ms linear`:void 0},r.icon),fn({fontSize:c,color:l}))),[l,c,S,b.isIndeterminate,r.icon]),_=ct.cloneElement(u,{__css:C,isIndeterminate:b.isIndeterminate,isChecked:b.isChecked});return Vt.jsxs(Vx.label,at(at({__css:at(at({},aS),r.container),className:mn("chakra-checkbox",a)},k()),{},{children:[Vt.jsx("input",at({className:"chakra-checkbox__input"},y(h,t))),Vt.jsx(Vx.span,at(at({__css:at(at({},iS),r.control),className:"chakra-checkbox__control"},x()),{},{children:_})),s&&Vt.jsx(Vx.span,at(at({className:"chakra-checkbox__label"},w()),{},{__css:at({marginStart:i},r.label),children:s}))]}))})));uS.displayName="Checkbox";const dS=it("D",Ux((function(e,t){const n=Qx("Divider",e),{borderLeftWidth:r,borderBottomWidth:o,borderTopWidth:i,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:c}=n,u=ot(n,K),d=Go(e),{className:p,orientation:f="horizontal",__css:h}=d,m=ot(d,Z),v={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:o||i||s||"1px",width:"100%"}};return Vt.jsx(Vx.hr,at(at({ref:t,"aria-orientation":f},m),{},{__css:at(at(at({},u),{},{border:"0",borderColor:c,borderStyle:l},v[f]),h),className:mn("chakra-divider",p)}))})));function pS(e){return"function"==typeof e}dS.displayName="Divider";it("ab",(fS=Qu,function(...e){let t=[...e],n=e[e.length-1];var r;return en(r=n)&&Ju.every((e=>Object.prototype.hasOwnProperty.call(r,e)))&&t.length>1?t=t.slice(0,t.length-1):n=fS,function(...e){return t=>e.reduce(((e,t)=>t(e)),t)}(...t.map((e=>t=>pS(e)?e(t):function(...e){return Fn({},...e,hS)}(t,e))))(n)}));var fS;function hS(e,t,n,r){return(pS(e)||pS(t))&&Object.prototype.hasOwnProperty.call(r,n)?(...n)=>{const r=pS(e)?e(...n):e,o=pS(t)?t(...n):t;return Fn({},r,o,hS)}:en(e)&&Qt(t)||Qt(e)&&en(t)?t:void 0}const mS=it("h",Ux((function(e,t){const{direction:n,align:r,justify:o,wrap:i,basis:a,grow:s,shrink:l}=e,c=ot(e,J),u={display:"flex",flexDirection:n,alignItems:r,justifyContent:o,flexWrap:i,flexBasis:a,flexGrow:s,flexShrink:l};return Vt.jsx(Vx.div,at({ref:t,__css:u},c))})));mS.displayName="Flex";var vS="data-focus-lock",gS="data-focus-lock-disabled";function bS(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var yS="undefined"!=typeof window?ct.useLayoutEffect:ct.useEffect,xS=new WeakMap;function wS(e,t){var n,r,o,i=(n=null,r=function(t){return e.forEach((function(e){return bS(e,t)}))},(o=ct.useState((function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=r,o.facade);return yS((function(){var t=xS.get(i);if(t){var n=new Set(t),r=new Set(e),o=i.current;n.forEach((function(e){r.has(e)||bS(e,null)})),r.forEach((function(e){n.has(e)||bS(e,o)}))}xS.set(i,e)}),[e]),i}var kS={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},SS=function(){return SS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0})).sort(tC)},rC=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"].join(","),oC="".concat(rC,", [data-focus-guard]"),iC=function(e,t){return LS((e.shadowRoot||e).children).reduce((function(e,n){return e.concat(n.matches(t?oC:rC)?[n]:[],iC(n))}),[])},aC=function(e,t){return e.reduce((function(e,n){var r,o=iC(n,t),i=(r=[]).concat.apply(r,o.map((function(e){return function(e,t){var n;return e instanceof HTMLIFrameElement&&(null===(n=e.contentDocument)||void 0===n?void 0:n.body)?aC([e.contentDocument.body],t):[e]}(e,t)})));return e.concat(i,n.parentNode?LS(n.parentNode.querySelectorAll(rC)).filter((function(e){return e===n})):[])}),[])},sC=function(e,t){return LS(e).filter((function(e){return qS(t,e)})).filter((function(e){return function(e){return!((GS(e)||function(e){return"BUTTON"===e.tagName}(e))&&("hidden"===e.type||e.disabled))}(e)}))},lC=function(e,t){return void 0===t&&(t=new Map),LS(e).filter((function(e){return YS(t,e)}))},cC=function(e,t,n){return nC(sC(aC(e,n),t),!0,n)},uC=function(e,t){return nC(sC(aC(e),t),!1)},dC=function(e,t){return sC((n=e.querySelectorAll("[".concat("data-autofocus-inside","]")),LS(n).map((function(e){return aC([e])})).reduce((function(e,t){return e.concat(t)}),[])),t);var n},pC=function(e,t){return e.shadowRoot?pC(e.shadowRoot,t):!(void 0===Object.getPrototypeOf(e).contains||!Object.getPrototypeOf(e).contains.call(e,t))||LS(e.children).some((function(e){var n;if(e instanceof HTMLIFrameElement){var r=null===(n=e.contentDocument)||void 0===n?void 0:n.body;return!!r&&pC(r,t)}return pC(e,t)}))},fC=function(e){return e.parentNode?fC(e.parentNode):e},hC=function(e){return $S(e).filter(Boolean).reduce((function(e,t){var n=t.getAttribute(vS);return e.push.apply(e,n?function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(o),(i&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter((function(e,n){return!t.has(n)}))}(LS(fC(t).querySelectorAll("[".concat(vS,'="').concat(n,'"]:not([').concat(gS,'="disabled"])')))):[t]),e}),[])},mC=function(e){if(void 0===e&&(e=document),e&&e.activeElement){var t=e.activeElement;return t.shadowRoot?mC(t.shadowRoot):t instanceof HTMLIFrameElement&&function(e){try{return e()}catch(t){return}}((function(){return t.contentWindow.document}))?mC(t.contentWindow.document):t}},vC=function(e,t){return void 0===t&&(t=mC(VS(e).ownerDocument)),!(!t||t.dataset&&t.dataset.focusGuard)&&hC(e).some((function(e){return pC(e,t)||function(e,t){return Boolean(LS(e.querySelectorAll("iframe")).some((function(e){return function(e,t){return e===t}(e,t)})))}(e,t)}))},gC=function(e,t){return KS(e)&&e.name?function(e,t){return t.filter(KS).filter((function(t){return t.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e,t):e},bC=function(e){return e[0]&&e.length>1?gC(e[0],e):e[0]},yC=function(e,t){return e.indexOf(gC(t,e))},xC="NEW_FOCUS",wC=function(e,t,n,r,o){var i=e.length,a=e[0],s=e[i-1],l=JS(r);if(!(r&&e.indexOf(r)>=0)){var c=void 0!==r?n.indexOf(r):-1,u=o?n.indexOf(o):c,d=o?e.indexOf(o):-1;if(-1===c)return-1!==d?d:xC;if(-1===d)return xC;var p,f,h=c-u,m=n.indexOf(a),v=n.indexOf(s),g=(p=n,f=new Set,p.forEach((function(e){return f.add(gC(e,p))})),p.filter((function(e){return f.has(e)}))),b=void 0!==r?g.indexOf(r):-1,y=o?g.indexOf(o):b,x=g.filter((function(e){return e.tabIndex>=0})),w=void 0!==r?x.indexOf(r):-1,k=o?x.indexOf(o):w,S=w>=0&&k>=0?k-w:y-b;if(!h&&d>=0)return d;if(0===t.length)return d;var C=yC(e,t[0]),_=yC(e,t[t.length-1]);return c<=m&&l&&Math.abs(h)>1?_:c>=v&&l&&Math.abs(h)>1?C:h&&Math.abs(S)>1?d:c<=m?_:c>v?C:h?Math.abs(h)>1?d:(i+d+h)%i:void 0}},kC=function(e,t,n){var r,o=e.map((function(e){return e.node})),i=lC(o.filter((r=n,function(e){var t,n=null===(t=XS(e))||void 0===t?void 0:t.autofocus;return e.autofocus||void 0!==n&&"false"!==n||r.indexOf(e)>=0})));return i&&i.length?bC(i):bC(lC(t))},SC=function(e,t){return void 0===t&&(t=[]),t.push(e),e.parentNode&&SC(e.parentNode.host||e.parentNode,t),t},CC=function(e,t){for(var n=SC(e),r=SC(t),o=0;o=0)return i}return!1},_C=function(e,t,n){var r=$S(e),o=$S(t),i=r[0],a=!1;return o.filter(Boolean).forEach((function(e){a=CC(a||e,e)||a,n.filter(Boolean).forEach((function(e){var t=CC(i,e);t&&(a=!a||pC(t,a)?t:CC(t,a))}))})),a},EC=function(e,t){return e.reduce((function(e,n){return e.concat(dC(n,t))}),[])},PC=function(e,t){var n=mC($S(e).length>0?document:VS(e).ownerDocument),r=hC(e).filter(QS),o=_C(n||e,e,r),i=new Map,a=uC(r,i),s=a.filter((function(e){var t=e.node;return QS(t)}));if(s[0]){var l,c,u,d=uC([o],i).map((function(e){return e.node})),p=(l=d,c=s,u=new Map,c.forEach((function(e){return u.set(e.node,e)})),l.map((function(e){return u.get(e)})).filter(eC)),f=p.map((function(e){return e.node})),h=p.filter((function(e){return e.tabIndex>=0})).map((function(e){return e.node})),m=wC(f,h,d,n,t);if(m===xC){var v=kC(a,h,EC(r,i))||kC(a,f,EC(r,i));return v?{node:v}:void console.warn("focus-lock: cannot find any node to move focus into")}return void 0===m?m:p[m]}},jC=function(e,t){e&&("focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus())},TC=0,AC=!1,OC=function(e,t,n){void 0===n&&(n={});var r=PC(e,t);if(!AC&&r){if(TC>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),AC=!0,void setTimeout((function(){AC=!1}),1);TC++,jC(r.node,n.focusOptions),TC--}};function RC(e){if(!e)return null;if("undefined"==typeof WeakRef)return function(){return e||null};var t=e?new WeakRef(e):null;return function(){return(null==t?void 0:t.deref())||null}}var MC=function(e){var t=function(e){if(!e)return null;for(var t=[],n=e;n&&n!==document.body;)t.push({current:RC(n),parent:RC(n.parentElement),left:RC(n.previousElementSibling),right:RC(n.nextElementSibling)}),n=n.parentElement;return{element:RC(e),stack:t,ownerDocument:e.ownerDocument}}(e);return function(){return function(e){var t,n,r,o,i;if(e)for(var a=e.stack,s=e.ownerDocument,l=new Map,c=0,u=a;c=0,guard:JS(t)}}))),w=x.map((function(e){return e.node})).indexOf(y);w>-1&&(x.filter((function(e){var t=e.guard,n=e.node;return t&&n.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),YC(w,x.length,1,x),YC(w,-1,-1,x))}}}return a},ZC=function(e){KC()&&e&&(e.stopPropagation(),e.preventDefault())},JC=function(){return DC(KC)},QC=function(){UC=!0},e_=function(){UC=!1,HC="just",DC((function(){HC="meanwhile"}))};var t_={moveFocusInside:OC,focusInside:vC,focusNextElement:function(e,t){void 0===t&&(t={}),NC(e,t,(function(e,t){var n=e.next,r=e.first;return n||t&&r}))},focusPrevElement:function(e,t){void 0===t&&(t={}),NC(e,t,(function(e,t){var n=e.prev,r=e.last;return n||t&&r}))},focusFirstElement:function(e,t){void 0===t&&(t={}),IC(e,t,"first")},focusLastElement:function(e,t){void 0===t&&(t={}),IC(e,t,"last")},captureFocusRestore:MC};AS.assignSyncMedium((function(e){var t=e.target,n=e.currentTarget;n.contains(t)||(WC={observerNode:n,portaledElement:t})})),OS.assignMedium(JC),RS.assignMedium((function(e){return e(t_)}));const n_=function(e,t){return function(n){var r,o=[];function i(){r=e(o.map((function(e){return e.props}))),t(r)}var a=function(e){function t(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,zS(e,t)}(t,e),t.peek=function(){return r};var a=t.prototype;return a.componentDidMount=function(){o.push(this),i()},a.componentDidUpdate=function(){i()},a.componentWillUnmount=function(){var e=o.indexOf(this);o.splice(e,1),i()},a.render=function(){return ft.createElement(n,this.props)},t}(ct.PureComponent);return function(e,t,n){(t=FS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(a,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(n)+")"),a}}((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var t=e.slice(-1)[0];t&&!LC&&(document.addEventListener("focusin",ZC),document.addEventListener("focusout",JC),window.addEventListener("focus",QC),window.addEventListener("blur",e_));var n=LC,r=n&&t&&t.id===n.id;LC=t,n&&!r&&(n.onDeactivation(),e.filter((function(e){return e.id===n.id})).length||n.returnFocus(!t)),t?($C=null,r&&n.observed===t.observed||t.onActivation(t_),KC(),DC(KC)):(document.removeEventListener("focusin",ZC),document.removeEventListener("focusout",JC),window.removeEventListener("focus",QC),window.removeEventListener("blur",e_),$C=null)}))((function(){return null}));var r_=ct.forwardRef((function(e,t){return ft.createElement(DS,op({sideCar:n_,ref:t},e))})),o_=DS.propTypes||{};o_.sideCar,function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}}(o_,["sideCar"]),r_.propTypes={};const i_=null!==(zt=r_.default)&&void 0!==zt?zt:r_,a_=it("F",(e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:o,children:i,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:c}=e,u=ct.useCallback((()=>{if(null!=t&&t.current)t.current.focus();else if(null!=r&&r.current){0===wn(r.current).length&&requestAnimationFrame((()=>{var e;null===(e=r.current)||void 0===e||e.focus()}))}}),[t,r]),d=ct.useCallback((()=>{var e;null==n||null===(e=n.current)||void 0===e||e.focus()}),[n]),p=o&&!n;return Vt.jsx(i_,{crossFrame:c,persistentFocus:l,autoFocus:s,disabled:a,onActivation:u,onDeactivation:d,returnFocus:p,children:i})}));a_.displayName="FocusLock";const[s_,l_]=hn({name:"FormErrorStylesContext",errorMessage:"useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),c_=it("$",Ux(((e,t)=>{const n=ew("FormError",e),r=Go(e),o=Zk();return null!=o&&o.isInvalid?Vt.jsx(s_,{value:n,children:Vt.jsx(Vx.div,at(at({},null==o?void 0:o.getErrorMessageProps(r,t)),{},{className:mn("chakra-form__error-message",e.className),__css:at({display:"flex",alignItems:"center"},n.text)}))}):null})));c_.displayName="FormErrorMessage";const u_=Ux(((e,t)=>{const n=l_(),r=Zk();if(null==r||!r.isInvalid)return null;const o=mn("chakra-form__error-icon",e.className);return Vt.jsx(nw,at(at({ref:t,"aria-hidden":!0},e),{},{__css:n.icon,className:o,children:Vt.jsx("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})}))}));u_.displayName="FormErrorIcon";const d_=it("_",Ux((function(e,t){var n;const r=Qx("FormLabel",e),o=Go(e),{className:i,children:a,requiredIndicator:s=Vt.jsx(p_,{}),optionalIndicator:l=null}=o,c=ot(o,Q),u=Zk(),d=null!==(n=null==u?void 0:u.getLabelProps(c,t))&&void 0!==n?n:at({ref:t},c);return Vt.jsxs(Vx.label,at(at({},d),{},{className:mn("chakra-form__label",o.className),__css:at({display:"block",textAlign:"start"},r),children:[a,null!=u&&u.isRequired?s:l]}))})));d_.displayName="FormLabel";const p_=Ux((function(e,t){const n=Zk(),r=Gk();if(null==n||!n.isRequired)return null;const o=mn("chakra-form__required-indicator",e.className);return Vt.jsx(Vx.span,at(at({},null==n?void 0:n.getRequiredIndicatorProps(e,t)),{},{__css:r.requiredIndicator,className:o}))}));p_.displayName="RequiredIndicator";const f_=Ux((function(e,t){const{htmlWidth:n,htmlHeight:r,alt:o}=e,i=ot(e,ee);return Vt.jsx("img",at({width:n,height:r,ref:t,alt:o},i))}));f_.displayName="NativeImage";it("ai",Ux((function(e,t){const{fallbackSrc:n,fallback:r,src:o,srcSet:i,align:a,fit:s,loading:l,ignoreFallback:c,crossOrigin:u,fallbackStrategy:d="beforeLoadOrError",referrerPolicy:p}=e,f=ot(e,te),h=null!=l||c||!(void 0!==n||void 0!==r),m=((e,t)=>"loaded"!==e&&"beforeLoadOrError"===t||"failed"===e&&"onError"===t)(fk(at(at({},e),{},{crossOrigin:u,ignoreFallback:h})),d),v=at({ref:t,objectFit:s,objectPosition:a},h?f:Tn(f,["onError","onLoad"]));return m?r||Vt.jsx(Vx.img,at({as:f_,className:"chakra-image__placeholder",src:n},v)):Vt.jsx(Vx.img,at({as:f_,src:o,srcSet:i,crossOrigin:u,loading:l,referrerPolicy:p,className:"chakra-image"},v))}))).displayName="Image";const h_=it("q",Ux((function(e,t){const{htmlSize:n}=e,r=ot(e,ne),o=ew("Input",r),i=eS(Go(r)),a=mn("chakra-input",e.className);return Vt.jsx(Vx.input,at(at({size:n},i),{},{__css:o.field,ref:t,className:a}))})));h_.displayName="Input",h_.id="Input";const[m_,v_]=hn({name:"InputGroupStylesContext",errorMessage:"useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),g_=it("I",Ux((function(e,t){const n=ew("Input",e),r=Go(e),{children:o,className:i}=r,a=ot(r,re),s=mn("chakra-input__group",i),l={},c=pn(o),u=n.field;c.forEach((e=>{if(n){var t,r;if(u&&"InputLeftElement"===e.type.id)l.paddingStart=null!==(t=u.height)&&void 0!==t?t:u.h;if(u&&"InputRightElement"===e.type.id)l.paddingEnd=null!==(r=u.height)&&void 0!==r?r:u.h;"InputRightAddon"===e.type.id&&(l.borderEndRadius=0),"InputLeftAddon"===e.type.id&&(l.borderStartRadius=0)}}));const d=c.map((t=>{var n,r;const o=fn({size:(null===(n=t.props)||void 0===n?void 0:n.size)||e.size,variant:(null===(r=t.props)||void 0===r?void 0:r.variant)||e.variant});return"Input"!==t.type.id?ct.cloneElement(t,o):ct.cloneElement(t,Object.assign(o,l,t.props))}));return Vt.jsx(Vx.div,at(at({className:s,ref:t,__css:at({width:"100%",display:"flex",position:"relative",isolation:"isolate"},n.group),"data-group":!0},a),{},{children:Vt.jsx(m_,{value:n,children:d})}))})));g_.displayName="InputGroup";const b_=Vx("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),y_=Ux((function(e,t){var n,r;const{placement:o="left"}=e,i=ot(e,oe),a=v_(),s=a.field,l=at({["left"===o?"insetStart":"insetEnd"]:"0",width:null!==(n=null==s?void 0:s.height)&&void 0!==n?n:null==s?void 0:s.h,height:null!==(r=null==s?void 0:s.height)&&void 0!==r?r:null==s?void 0:s.h,fontSize:null==s?void 0:s.fontSize},a.element);return Vt.jsx(b_,at({ref:t,__css:l},i))}));y_.id="InputElement",y_.displayName="InputElement";const x_=Ux((function(e,t){const{className:n}=e,r=ot(e,ie),o=mn("chakra-input__left-element",n);return Vt.jsx(y_,at({ref:t,placement:"left",className:o},r))}));x_.id="InputLeftElement",x_.displayName="InputLeftElement";const w_=it("r",Ux((function(e,t){const{className:n}=e,r=ot(e,ae),o=mn("chakra-input__right-element",n);return Vt.jsx(y_,at({ref:t,placement:"right",className:o},r))})));w_.id="InputRightElement",w_.displayName="InputRightElement";const k_=it("aE",Ux((function(e,t){const n=Qx("Kbd",e),r=Go(e),{className:o}=r,i=ot(r,se);return Vt.jsx(Vx.kbd,at(at({ref:t,className:mn("chakra-kbd",o)},i),{},{__css:at({fontFamily:"mono"},n)}))})));k_.displayName="Kbd";const S_=it("R",Ux((function(e,t){const n=Qx("Link",e),r=Go(e),{className:o,isExternal:i}=r,a=ot(r,le);return Vt.jsx(Vx.a,at(at({target:i?"_blank":void 0,rel:i?"noopener":void 0,ref:t,className:mn("chakra-link",o)},a),{},{__css:n}))})));S_.displayName="Link";const[C_,__]=hn({name:"ListStylesContext",errorMessage:"useListStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),E_=Ux((function(e,t){const n=ew("List",e),r=Go(e),{children:o,styleType:i="none",stylePosition:a,spacing:s}=r,l=ot(r,ce),c=pn(o),u=s?{"& > *:not(style) ~ *:not(style)":{mt:s}}:{};return Vt.jsx(C_,{value:n,children:Vt.jsx(Vx.ul,at(at({ref:t,listStyleType:i,listStylePosition:a,role:"list",__css:at(at({},n.container),u)},l),{},{children:c}))})}));E_.displayName="List";it("an",Ux(((e,t)=>{const{as:n}=e,r=ot(e,ue);return Vt.jsx(E_,at({ref:t,as:"ol",styleType:"decimal",marginStart:"1em"},r))}))).displayName="OrderedList";Ux((function(e,t){const{as:n}=e,r=ot(e,de);return Vt.jsx(E_,at({ref:t,as:"ul",styleType:"initial",marginStart:"1em"},r))})).displayName="UnorderedList";const P_=it("ao",Ux((function(e,t){const n=__();return Vt.jsx(Vx.li,at(at({ref:t},e),{},{__css:n.item}))})));P_.displayName="ListItem";const j_=Ux((function(e,t){const n=__();return Vt.jsx(nw,at(at({ref:t,role:"presentation"},e),{},{__css:n.icon}))}));function T_(e={}){const{timeout:t=300,preventDefault:n=(()=>!0)}=e,[r,o]=ct.useState([]),i=ct.useRef(),a=()=>{i.current&&(clearTimeout(i.current),i.current=null)};return ct.useEffect((()=>a),[]),function(e){return s=>{if("Backspace"===s.key){const e=[...r];return e.pop(),void o(e)}if(function(e){const{key:t}=e;return 1===t.length||t.length>1&&/[^a-zA-Z0-9]/.test(t)}(s)){const l=r.concat(s.key);n(s)&&(s.preventDefault(),s.stopPropagation()),o(l),e(l.join("")),a(),i.current=setTimeout((()=>{o([]),i.current=null}),t)}}}}j_.displayName="ListIcon";var A_="top",O_="bottom",R_="right",M_="left",N_="auto",I_=[A_,O_,R_,M_],D_="start",z_="end",B_="clippingParents",F_="viewport",L_="popper",$_="reference",V_=I_.reduce((function(e,t){return e.concat([t+"-"+D_,t+"-"+z_])}),[]),W_=[].concat(I_,[N_]).reduce((function(e,t){return e.concat([t,t+"-"+D_,t+"-"+z_])}),[]),H_=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function U_(e){return e?(e.nodeName||"").toLowerCase():null}function q_(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Y_(e){return e instanceof q_(e).Element||e instanceof Element}function X_(e){return e instanceof q_(e).HTMLElement||e instanceof HTMLElement}function G_(e){return"undefined"!=typeof ShadowRoot&&(e instanceof q_(e).ShadowRoot||e instanceof ShadowRoot)}const K_={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];X_(o)&&U_(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});X_(r)&&U_(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function Z_(e){return e.split("-")[0]}var J_=Math.max,Q_=Math.min,eE=Math.round;function tE(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function nE(){return!/^((?!chrome|android).)*safari/i.test(tE())}function rE(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&X_(e)&&(o=e.offsetWidth>0&&eE(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&eE(r.height)/e.offsetHeight||1);var a=(Y_(e)?q_(e):window).visualViewport,s=!nE()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,c=(r.top+(s&&a?a.offsetTop:0))/i,u=r.width/o,d=r.height/i;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function oE(e){var t=rE(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function iE(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&G_(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function aE(e){return q_(e).getComputedStyle(e)}function sE(e){return["table","td","th"].indexOf(U_(e))>=0}function lE(e){return((Y_(e)?e.ownerDocument:e.document)||window.document).documentElement}function cE(e){return"html"===U_(e)?e:e.assignedSlot||e.parentNode||(G_(e)?e.host:null)||lE(e)}function uE(e){return X_(e)&&"fixed"!==aE(e).position?e.offsetParent:null}function dE(e){for(var t=q_(e),n=uE(e);n&&sE(n)&&"static"===aE(n).position;)n=uE(n);return n&&("html"===U_(n)||"body"===U_(n)&&"static"===aE(n).position)?t:n||function(e){var t=/firefox/i.test(tE());if(/Trident/i.test(tE())&&X_(e)&&"fixed"===aE(e).position)return null;var n=cE(e);for(G_(n)&&(n=n.host);X_(n)&&["html","body"].indexOf(U_(n))<0;){var r=aE(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function pE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function fE(e,t,n){return J_(e,Q_(t,n))}function hE(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function mE(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}const vE={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Z_(n.placement),l=pE(s),c=[M_,R_].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return hE("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:mE(e,I_))}(o.padding,n),d=oE(i),p="y"===l?A_:M_,f="y"===l?O_:R_,h=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],m=a[l]-n.rects.reference[l],v=dE(i),g=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,b=h/2-m/2,y=u[p],x=g-d[c]-u[f],w=g/2-d[c]/2+b,k=fE(y,w,x),S=l;n.modifiersData[r]=((t={})[S]=k,t.centerOffset=k-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&iE(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function gE(e){return e.split("-")[1]}var bE={top:"auto",right:"auto",bottom:"auto",left:"auto"};function yE(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=a.x,f=void 0===p?0:p,h=a.y,m=void 0===h?0:h,v="function"==typeof u?u({x:f,y:m}):{x:f,y:m};f=v.x,m=v.y;var g=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),y=M_,x=A_,w=window;if(c){var k=dE(n),S="clientHeight",C="clientWidth";if(k===q_(n)&&"static"!==aE(k=lE(n)).position&&"absolute"===s&&(S="scrollHeight",C="scrollWidth"),o===A_||(o===M_||o===R_)&&i===z_)x=O_,m-=(d&&k===w&&w.visualViewport?w.visualViewport.height:k[S])-r.height,m*=l?1:-1;if(o===M_||(o===A_||o===O_)&&i===z_)y=R_,f-=(d&&k===w&&w.visualViewport?w.visualViewport.width:k[C])-r.width,f*=l?1:-1}var _,E=Object.assign({position:s},c&&bE),P=!0===u?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:eE(n*o)/o||0,y:eE(r*o)/o||0}}({x:f,y:m},q_(n)):{x:f,y:m};return f=P.x,m=P.y,l?Object.assign({},E,((_={})[x]=b?"0":"",_[y]=g?"0":"",_.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",_)):Object.assign({},E,((t={})[x]=b?m+"px":"",t[y]=g?f+"px":"",t.transform="",t))}const xE={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,c={placement:Z_(t.placement),variation:gE(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,yE(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,yE(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var wE={passive:!0};const kE={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,l=q_(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,wE)})),s&&l.addEventListener("resize",n.update,wE),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,wE)})),s&&l.removeEventListener("resize",n.update,wE)}},data:{}};var SE={left:"right",right:"left",bottom:"top",top:"bottom"};function CE(e){return e.replace(/left|right|bottom|top/g,(function(e){return SE[e]}))}var _E={start:"end",end:"start"};function EE(e){return e.replace(/start|end/g,(function(e){return _E[e]}))}function PE(e){var t=q_(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function jE(e){return rE(lE(e)).left+PE(e).scrollLeft}function TE(e){var t=aE(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function AE(e){return["html","body","#document"].indexOf(U_(e))>=0?e.ownerDocument.body:X_(e)&&TE(e)?e:AE(cE(e))}function OE(e,t){var n;void 0===t&&(t=[]);var r=AE(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=q_(r),a=o?[i].concat(i.visualViewport||[],TE(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(OE(cE(a)))}function RE(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ME(e,t,n){return t===F_?RE(function(e,t){var n=q_(e),r=lE(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=nE();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+jE(e),y:l}}(e,n)):Y_(t)?function(e,t){var n=rE(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):RE(function(e){var t,n=lE(e),r=PE(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=J_(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=J_(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+jE(e),l=-r.scrollTop;return"rtl"===aE(o||n).direction&&(s+=J_(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(lE(e)))}function NE(e,t,n,r){var o="clippingParents"===t?function(e){var t=OE(cE(e)),n=["absolute","fixed"].indexOf(aE(e).position)>=0&&X_(e)?dE(e):e;return Y_(n)?t.filter((function(e){return Y_(e)&&iE(e,n)&&"body"!==U_(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=ME(e,n,r);return t.top=J_(o.top,t.top),t.right=Q_(o.right,t.right),t.bottom=Q_(o.bottom,t.bottom),t.left=J_(o.left,t.left),t}),ME(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function IE(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?Z_(o):null,a=o?gE(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case A_:t={x:s,y:n.y-r.height};break;case O_:t={x:s,y:n.y+n.height};break;case R_:t={x:n.x+n.width,y:l};break;case M_:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?pE(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case D_:t[c]=t[c]-(n[u]/2-r[u]/2);break;case z_:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function DE(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?B_:s,c=n.rootBoundary,u=void 0===c?F_:c,d=n.elementContext,p=void 0===d?L_:d,f=n.altBoundary,h=void 0!==f&&f,m=n.padding,v=void 0===m?0:m,g=hE("number"!=typeof v?v:mE(v,I_)),b=p===L_?$_:L_,y=e.rects.popper,x=e.elements[h?b:p],w=NE(Y_(x)?x:x.contextElement||lE(e.elements.popper),l,u,a),k=rE(e.elements.reference),S=IE({reference:k,element:y,placement:o}),C=RE(Object.assign({},y,S)),_=p===L_?C:k,E={top:w.top-_.top+g.top,bottom:_.bottom-w.bottom+g.bottom,left:w.left-_.left+g.left,right:_.right-w.right+g.right},P=e.modifiersData.offset;if(p===L_&&P){var j=P[o];Object.keys(E).forEach((function(e){var t=[R_,O_].indexOf(e)>=0?1:-1,n=[A_,O_].indexOf(e)>=0?"y":"x";E[e]+=j[n]*t}))}return E}function zE(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?W_:l,u=gE(r),d=u?s?V_:V_.filter((function(e){return gE(e)===u})):I_,p=d.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=d);var f=p.reduce((function(t,n){return t[n]=DE(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[Z_(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}const BE={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,h=void 0===f||f,m=n.allowedAutoPlacements,v=t.options.placement,g=Z_(v),b=l||(g===v||!h?[CE(v)]:function(e){if(Z_(e)===N_)return[];var t=CE(e);return[EE(e),t,EE(t)]}(v)),y=[v].concat(b).reduce((function(e,n){return e.concat(Z_(n)===N_?zE(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),x=t.rects.reference,w=t.rects.popper,k=new Map,S=!0,C=y[0],_=0;_=0,A=T?"width":"height",O=DE(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),R=T?j?R_:M_:j?O_:A_;x[A]>w[A]&&(R=CE(R));var M=CE(R),N=[];if(i&&N.push(O[P]<=0),s&&N.push(O[R]<=0,O[M]<=0),N.every((function(e){return e}))){C=E,S=!1;break}k.set(E,N)}if(S)for(var I=function(e){var t=y.find((function(t){var n=k.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},D=h?3:1;D>0;D--){if("break"===I(D))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function FE(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function LE(e){return[A_,R_,O_,M_].some((function(t){return e[t]>=0}))}const $E={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=DE(t,{elementContext:"reference"}),s=DE(t,{altBoundary:!0}),l=FE(a,r),c=FE(s,o,i),u=LE(l),d=LE(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};const VE={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=W_.reduce((function(e,n){return e[n]=function(e,t,n){var r=Z_(e),o=[M_,A_].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[M_,R_].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};const WE={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=IE({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}};const HE={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,f=void 0===p||p,h=n.tetherOffset,m=void 0===h?0:h,v=DE(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),g=Z_(t.placement),b=gE(t.placement),y=!b,x=pE(g),w="x"===x?"y":"x",k=t.modifiersData.popperOffsets,S=t.rects.reference,C=t.rects.popper,_="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,E="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(k){if(i){var T,A="y"===x?A_:M_,O="y"===x?O_:R_,R="y"===x?"height":"width",M=k[x],N=M+v[A],I=M-v[O],D=f?-C[R]/2:0,z=b===D_?S[R]:C[R],B=b===D_?-C[R]:-S[R],F=t.elements.arrow,L=f&&F?oE(F):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=$[A],W=$[O],H=fE(0,S[R],L[R]),U=y?S[R]/2-D-H-V-E.mainAxis:z-H-V-E.mainAxis,q=y?-S[R]/2+D+H+W+E.mainAxis:B+H+W+E.mainAxis,Y=t.elements.arrow&&dE(t.elements.arrow),X=Y?"y"===x?Y.clientTop||0:Y.clientLeft||0:0,G=null!=(T=null==P?void 0:P[x])?T:0,K=M+q-G,Z=fE(f?Q_(N,M+U-G-X):N,M,f?J_(I,K):I);k[x]=Z,j[x]=Z-M}if(s){var J,Q="x"===x?A_:M_,ee="x"===x?O_:R_,te=k[w],ne="y"===w?"height":"width",re=te+v[Q],oe=te-v[ee],ie=-1!==[A_,M_].indexOf(g),ae=null!=(J=null==P?void 0:P[w])?J:0,se=ie?re:te-S[ne]-C[ne]-ae+E.altAxis,le=ie?te+S[ne]+C[ne]-ae-E.altAxis:oe,ce=f&&ie?function(e,t,n){var r=fE(e,t,n);return r>n?n:r}(se,te,le):fE(f?se:re,te,f?le:oe);k[w]=ce,j[w]=ce-te}t.modifiersData[r]=j}},requiresIfExists:["offset"]};function UE(e,t,n){void 0===n&&(n=!1);var r=X_(t),o=X_(t)&&function(e){var t=e.getBoundingClientRect(),n=eE(t.width)/e.offsetWidth||1,r=eE(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=lE(t),a=rE(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==U_(t)||TE(i))&&(s=function(e){return e!==q_(e)&&X_(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:PE(e);var t}(t)),X_(t)?((l=rE(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=jE(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function qE(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var YE={placement:"bottom",modifiers:[],strategy:"absolute"};function XE(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),JE={arrowShadowColor:ZE("--popper-arrow-shadow-color"),arrowSize:ZE("--popper-arrow-size","8px"),arrowSizeHalf:ZE("--popper-arrow-size-half"),arrowBg:ZE("--popper-arrow-bg"),transformOrigin:ZE("--popper-transform-origin"),arrowOffset:ZE("--popper-arrow-offset")};const QE={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},eP={scroll:!0,resize:!0};function tP(e){let t;return t="object"==typeof e?{enabled:!0,options:at(at({},eP),e)}:{enabled:e,options:eP},t}const nP={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},rP={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{oP(e)},effect:({state:e})=>()=>{oP(e)}},oP=e=>{var t;e.elements.popper.style.setProperty(JE.transformOrigin.var,(t=e.placement,QE[t]))},iP={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{aP(e)}},aP=e=>{var t;if(!e.placement)return;const n=sP(e.placement);if(null!==(t=e.elements)&&void 0!==t&&t.arrow&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:JE.arrowSize.varRef,height:JE.arrowSize.varRef,zIndex:-1});const t={[JE.arrowSizeHalf.var]:`calc(${JE.arrowSize.varRef} / 2 - 1px)`,[JE.arrowOffset.var]:`calc(${JE.arrowSizeHalf.varRef} * -1)`};for(const n in t)e.elements.arrow.style.setProperty(n,t[n])}},sP=e=>e.startsWith("top")?{property:"bottom",value:JE.arrowOffset.varRef}:e.startsWith("bottom")?{property:"top",value:JE.arrowOffset.varRef}:e.startsWith("left")?{property:"right",value:JE.arrowOffset.varRef}:e.startsWith("right")?{property:"left",value:JE.arrowOffset.varRef}:void 0,lP={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{cP(e)},effect:({state:e})=>()=>{cP(e)}},cP=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const n=(r=e.placement).includes("top")?"1px 1px 0px 0 var(--popper-arrow-shadow-color)":r.includes("bottom")?"-1px -1px 0px 0 var(--popper-arrow-shadow-color)":r.includes("right")?"-1px 1px 0px 0 var(--popper-arrow-shadow-color)":r.includes("left")?"1px -1px 0px 0 var(--popper-arrow-shadow-color)":void 0;var r;n&&t.style.setProperty("--popper-arrow-default-shadow",n),Object.assign(t.style,{transform:"rotate(45deg)",background:JE.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},uP={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},dP={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function pP(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:o="absolute",arrowPadding:i=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:c=!0,boundary:u="clippingParents",preventOverflow:d=!0,matchWidth:p,direction:f="ltr"}=e,h=ct.useRef(null),m=ct.useRef(null),v=ct.useRef(null),g=function(e,t="ltr"){var n,r;const o=(null===(n=uP[e])||void 0===n?void 0:n[t])||e;return"ltr"===t?o:null!==(r=dP[e])&&void 0!==r?r:o}(r,f),b=ct.useRef((()=>{})),y=ct.useCallback((()=>{var e;t&&h.current&&m.current&&(null===(e=b.current)||void 0===e||e.call(b),v.current=KE(h.current,m.current,{placement:g,modifiers:[lP,iP,rP,at(at({},nP),{},{enabled:!!p}),at({name:"eventListeners"},tP(a)),{name:"arrow",options:{padding:i}},{name:"offset",options:{offset:null!=s?s:[0,l]}},{name:"flip",enabled:!!c,options:{padding:8}},{name:"preventOverflow",enabled:!!d,options:{boundary:u}},...null!=n?n:[]],strategy:o}),v.current.forceUpdate(),b.current=v.current.destroy)}),[g,t,n,p,a,i,s,l,c,d,u,o]);ct.useEffect((()=>()=>{var e;h.current||m.current||(null===(e=v.current)||void 0===e||e.destroy(),v.current=null)}),[]);const x=ct.useCallback((e=>{h.current=e,y()}),[y]),w=ct.useCallback(((e={},t=null)=>at(at({},e),{},{ref:or(x,t)})),[x]),k=ct.useCallback((e=>{m.current=e,y()}),[y]),S=ct.useCallback(((e={},t=null)=>at(at({},e),{},{ref:or(k,t),style:at(at({},e.style),{},{position:o,minWidth:p?void 0:"max-content",inset:"0 auto auto 0"})})),[o,k,p]),C=ct.useCallback(((e={},t=null)=>{const{size:n,shadowColor:r,bg:o,style:i}=e;return at(at({},ot(e,pe)),{},{ref:t,"data-popper-arrow":"",style:fP(e)})}),[]),_=ct.useCallback(((e={},t=null)=>at(at({},e),{},{ref:t,"data-popper-arrow-inner":""})),[]);return{update(){var e;null===(e=v.current)||void 0===e||e.update()},forceUpdate(){var e;null===(e=v.current)||void 0===e||e.forceUpdate()},transformOrigin:JE.transformOrigin.varRef,referenceRef:x,popperRef:k,getPopperProps:S,getArrowProps:C,getArrowInnerProps:_,getReferenceProps:w}}function fP(e){const{size:t,shadowColor:n,bg:r,style:o}=e,i=at(at({},o),{},{position:"absolute"});return t&&(i["--popper-arrow-size"]=t),n&&(i["--popper-arrow-shadow-color"]=n),r&&(i["--popper-arrow-bg"]=r),i}function hP(e){var t,n;const r=null!==(t=null===(n=e.composedPath)||void 0===n||null===(n=n.call(e))||void 0===n?void 0:n[0])&&void 0!==t?t:e.target,{tagName:o,isContentEditable:i}=r;return"INPUT"!==o&&"TEXTAREA"!==o&&!0!==i}function mP(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:o=!0,clickOnSpace:i=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:c,onKeyUp:u,tabIndex:d,onMouseOver:p,onMouseLeave:f}=e,h=ot(e,fe),[m,v]=ct.useState(!0),[g,b]=ct.useState(!1),y=function(){const e=ct.useRef(new Map),t=e.current,n=ct.useCallback(((t,n,r,o)=>{e.current.set(r,{type:n,el:t,options:o}),t.addEventListener(n,r,o)}),[]),r=ct.useCallback(((t,n,r,o)=>{t.removeEventListener(n,r,o),e.current.delete(r)}),[]);return ct.useEffect((()=>()=>{t.forEach(((e,t)=>{r(e.el,e.type,t,e.options)}))}),[r,t]),{add:n,remove:r}}(),x=m?d:d||0,w=n&&!r,k=ct.useCallback((e=>{if(n)return e.stopPropagation(),void e.preventDefault();e.currentTarget.focus(),null==l||l(e)}),[n,l]),S=ct.useCallback((e=>{g&&hP(e)&&(e.preventDefault(),e.stopPropagation(),b(!1),y.remove(document,"keyup",S,!1))}),[g,y]),C=ct.useCallback((e=>{if(null==c||c(e),n||e.defaultPrevented||e.metaKey)return;if(!hP(e.nativeEvent)||m)return;const t=o&&"Enter"===e.key;if(i&&" "===e.key&&(e.preventDefault(),b(!0)),t){e.preventDefault();e.currentTarget.click()}y.add(document,"keyup",S,!1)}),[n,m,c,o,i,y,S]),_=ct.useCallback((e=>{if(null==u||u(e),n||e.defaultPrevented||e.metaKey)return;if(!hP(e.nativeEvent)||m)return;if(i&&" "===e.key){e.preventDefault(),b(!1);e.currentTarget.click()}}),[i,m,n,u]),E=ct.useCallback((e=>{0===e.button&&(b(!1),y.remove(document,"mouseup",E,!1))}),[y]),P=ct.useCallback((e=>{if(0!==e.button)return;if(n)return e.stopPropagation(),void e.preventDefault();m||b(!0);e.currentTarget.focus({preventScroll:!0}),y.add(document,"mouseup",E,!1),null==a||a(e)}),[n,m,a,y,E]),j=ct.useCallback((e=>{0===e.button&&(m||b(!1),null==s||s(e))}),[s,m]),T=ct.useCallback((e=>{n?e.preventDefault():null==p||p(e)}),[n,p]),A=ct.useCallback((e=>{g&&(e.preventDefault(),b(!1)),null==f||f(e)}),[g,f]),O=or(t,(e=>{e&&"BUTTON"!==e.tagName&&v(!1)}));return at(at({},h),{},m?{ref:O,type:"button","aria-disabled":w?void 0:n,disabled:w,onClick:k,onMouseDown:a,onMouseUp:s,onKeyUp:u,onKeyDown:c,onMouseOver:p,onMouseLeave:f}:{ref:O,role:"button","data-active":Zt(g),"aria-disabled":n?"true":void 0,tabIndex:w?void 0:x,onClick:k,onMouseDown:P,onMouseUp:j,onKeyUp:_,onKeyDown:C,onMouseOver:T,onMouseLeave:A})}const[vP,gP,bP,yP]=Fw(),[xP,wP]=hn({strict:!1,name:"MenuContext"});function kP(e){var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document}function SP(e){var t;return function(e){var t;if(!function(e){return null!=e&&"object"==typeof e&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}(e))return!1;const n=null!==(t=e.ownerDocument.defaultView)&&void 0!==t?t:window;return e instanceof n.HTMLElement}(e)&&!(null==e||null===(t=e.getAttribute("role"))||void 0===t||!t.startsWith("menuitem"))}function CP(e={},t=null){const{onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onClick:i,onFocus:a,isDisabled:s,isFocusable:l,closeOnSelect:c,type:u}=e,d=ot(e,me),p=wP(),{setFocusedIndex:f,focusedIndex:h,closeOnSelect:m,onClose:v,menuId:g,scrollIntoViewRef:b}=p,y=ct.useRef(null),x=`${g}-menuitem-${ct.useId()}`,{index:w,register:k}=yP({disabled:s&&!l}),S=ct.useCallback((e=>{null==n||n(e),s||(b.current=!1,f(w))}),[f,w,s,n,b]),C=ct.useCallback((e=>{var t;null==r||r(e),y.current&&kP(t=y.current).activeElement!==t&&S(e)}),[S,r]),_=ct.useCallback((e=>{null==o||o(e),s||f(-1)}),[f,s,o]),E=ct.useCallback((e=>{null==i||i(e),SP(e.currentTarget)&&(null!=c?c:m)&&v()}),[v,i,m,c]),P=ct.useCallback((e=>{null==a||a(e),f(w)}),[f,a,w]),j=w===h,T=mP({onClick:E,onFocus:P,onMouseEnter:S,onMouseMove:C,onMouseLeave:_,ref:or(k,y,t),isDisabled:s,isFocusable:l});return at(at(at({},d),T),{},{type:null!=u?u:T.type,id:x,role:"menuitem",tabIndex:j?0:-1})}const[_P,EP]=hn({name:"MenuStylesContext",errorMessage:"useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),PP=it("aq",(e=>{const{children:t}=e,n=ew("Menu",e),r=Go(e),{direction:o}=Kx(),i=function(e={}){const{id:t,closeOnSelect:n=!0,closeOnBlur:r=!0,initialFocusRef:o,autoSelect:i=!0,isLazy:a,isOpen:s,defaultIsOpen:l,onClose:c,onOpen:u,placement:d="bottom-start",lazyBehavior:p="unmount",direction:f,computePositionOnMount:h=!1}=e,m=ot(e,he),v=ct.useRef(null),g=ct.useRef(null),b=ct.useRef(!0),y=bP(),x=ct.useCallback((()=>{requestAnimationFrame((()=>{var e;null===(e=v.current)||void 0===e||e.focus({preventScroll:!1})}))}),[]),w=ct.useCallback((()=>{const e=setTimeout((()=>{var e;if(o)null===(e=o.current)||void 0===e||e.focus();else if(y.count()){const e=y.firstEnabled();e&&A(e.index)}else{var t;null===(t=v.current)||void 0===t||t.focus({preventScroll:!1})}}));I.current.add(e)}),[y,o]),k=ct.useCallback((()=>{const e=setTimeout((()=>{if(y.count()){const e=y.lastEnabled();e&&A(e.index)}else{var e;null===(e=v.current)||void 0===e||e.focus({preventScroll:!1})}}));I.current.add(e)}),[y]),S=ct.useCallback((()=>{null==u||u(),i?w():x()}),[i,w,x,u]),{isOpen:C,onOpen:_,onClose:E,onToggle:P}=Yn({isOpen:s,defaultIsOpen:l,onClose:c,onOpen:S});ar({enabled:C&&r,ref:v,handler:e=>{var t,n,r;const o=null!==(t=null===(n=e.composedPath)||void 0===n||null===(n=n.call(e))||void 0===n?void 0:n[0])&&void 0!==t?t:e.target;null!==(r=g.current)&&void 0!==r&&r.contains(o)||E()}});const j=pP(at(at({},m),{},{enabled:C||h,placement:d,direction:f})),[T,A]=ct.useState(-1);Zn(v,{focusRef:g,visible:C,shouldFocus:!0});const O=Vn({isOpen:C,ref:v}),[R,M]=nr(t,"menu-button","menu-list"),N=ct.useCallback((()=>{_(),x()}),[_,x]),I=ct.useRef(new Set([]));ct.useEffect((()=>{const e=I.current;return()=>{e.forEach((e=>clearTimeout(e))),e.clear()}}),[]),Gn((()=>{var e;C||(A(-1),null===(e=v.current)||void 0===e||e.scrollTo(0,0))}),[C]),Gn((()=>{C&&-1===T&&x()}),[T,C]),ct.useEffect((()=>{var e;if(!C)return;const t=y.item(T);null==t||null===(e=t.node)||void 0===e||e.focus({preventScroll:!b.current})}),[y,T,C]);const D=ct.useCallback((()=>{_(),w()}),[w,_]),z=ct.useCallback((()=>{b.current=!0,_(),k()}),[_,k]),B=ct.useCallback((()=>{var e,t;const n=kP(v.current),r=null===(e=v.current)||void 0===e?void 0:e.contains(n.activeElement);if(!C||r)return;const o=null===(t=y.item(T))||void 0===t?void 0:t.node;null==o||o.focus({preventScroll:!b.current})}),[C,T,y]);return{openAndFocusMenu:N,openAndFocusFirstItem:D,openAndFocusLastItem:z,onTransitionEnd:B,unstable__animationState:O,descendants:y,popper:j,buttonId:R,menuId:M,forceUpdate:j.forceUpdate,orientation:"vertical",isOpen:C,onToggle:P,onOpen:_,onClose:E,menuRef:v,buttonRef:g,focusedIndex:T,closeOnSelect:n,closeOnBlur:r,autoSelect:i,setFocusedIndex:A,isLazy:a,lazyBehavior:p,initialFocusRef:o,scrollIntoViewRef:b}}(at(at({},r),{},{direction:o})),{descendants:a}=i,s=ot(i,ve),l=ct.useMemo((()=>s),[s]),{isOpen:c,onClose:u,forceUpdate:d}=l;return Vt.jsx(vP,{value:a,children:Vt.jsx(xP,{value:l,children:Vt.jsx(_P,{value:n,children:Rn(t,{isOpen:c,onClose:u,forceUpdate:d})})})})}));PP.displayName="Menu";const jP=Ux(((e,t)=>{const n=EP();return Vt.jsx(Vx.button,at(at({ref:t},e),{},{__css:at({display:"inline-flex",appearance:"none",alignItems:"center",outline:0},n.button)}))})),TP=it("ar",Ux(((e,t)=>{const{children:n,as:r}=e,o=function(e={},t=null){const n=wP(),{onToggle:r,popper:o,openAndFocusFirstItem:i,openAndFocusLastItem:a,scrollIntoViewRef:s}=n,l=ct.useCallback((e=>{const t=e.key,n={Enter:i,ArrowDown:i,ArrowUp:a}[t];n&&(s.current=!0,e.preventDefault(),e.stopPropagation(),n(e))}),[i,a,s]);return at(at({},e),{},{ref:or(n.buttonRef,t,o.referenceRef),id:n.buttonId,"data-active":Zt(n.isOpen),"aria-expanded":n.isOpen,"aria-haspopup":"menu","aria-controls":n.menuId,onClick:dn(e.onClick,r),onKeyDown:dn(e.onKeyDown,l)})}(ot(e,ge),t),i=r||jP;return Vt.jsx(i,at(at({},o),{},{className:mn("chakra-menu__menu-button",e.className),children:Vt.jsx(Vx.span,{__css:{pointerEvents:"none",flex:"1 1 auto",minW:0},children:e.children})}))})));TP.displayName="MenuButton";const AP=Ux(((e,t)=>{const n=EP();return Vt.jsx(Vx.span,at(at({ref:t},e),{},{__css:n.command,className:"chakra-menu__command"}))}));AP.displayName="MenuCommand";const OP=e=>{const{className:t,children:n}=e,r=ot(e,be),o=EP(),i=ct.Children.only(n),a=ct.isValidElement(i)?ct.cloneElement(i,{focusable:"false","aria-hidden":!0,className:mn("chakra-menu__icon",i.props.className)}):null,s=mn("chakra-menu__icon-wrapper",t);return Vt.jsx(Vx.span,at(at({className:s},r),{},{__css:o.icon,children:a}))};OP.displayName="MenuIcon";const RP=Ux(((e,t)=>{const{type:n}=e,r=ot(e,ye),o=EP(),i=r.as||n?null!=n?n:void 0:"button",a=ct.useMemo((()=>at({textDecoration:"none",color:"inherit",userSelect:"none",display:"flex",width:"100%",alignItems:"center",textAlign:"start",flex:"0 0 auto",outline:0},o.item)),[o.item]);return Vt.jsx(Vx.button,at(at({ref:t,type:i},r),{},{__css:a}))})),MP=it("at",Ux(((e,t)=>{const{icon:n,iconSpacing:r="0.75rem",command:o,commandSpacing:i="0.75rem",children:a}=e,s=CP(ot(e,xe),t),l=n||o?Vt.jsx("span",{style:{pointerEvents:"none",flex:1},children:a}):a;return Vt.jsxs(RP,at(at({},s),{},{className:mn("chakra-menu__menuitem",s.className),children:[n&&Vt.jsx(OP,{fontSize:"0.8em",marginEnd:r,children:n}),l,o&&Vt.jsx(AP,{marginStart:i,children:o})]}))})));MP.displayName="MenuItem";const NP={enter:{visibility:"visible",opacity:1,scale:1,transition:{duration:.2,ease:[.4,0,.2,1]}},exit:{transitionEnd:{visibility:"hidden"},opacity:0,scale:.8,transition:{duration:.1,easings:"easeOut"}}},IP=Vx(vx.div),DP=it("as",Ux((function(e,t){var n,r;const{rootProps:o,motionProps:i}=e,a=ot(e,we),{isOpen:s,onTransitionEnd:l,unstable__animationState:c}=wP(),u=function(e={},t=null){const n=wP();if(!n)throw new Error("useMenuContext: context is undefined. Seems you forgot to wrap component within ");const{focusedIndex:r,setFocusedIndex:o,menuRef:i,isOpen:a,onClose:s,menuId:l,isLazy:c,lazyBehavior:u,scrollIntoViewRef:d,unstable__animationState:p}=n,f=gP(),h=T_({preventDefault:e=>" "!==e.key&&SP(e.target)}),m=ct.useCallback((e=>{if(!e.currentTarget.contains(e.target))return;const t={Tab:e=>e.preventDefault(),Escape:e=>{e.stopPropagation(),s()},ArrowDown:()=>{var e;d.current=!0;const t=null!==(e=f.nextEnabled(r))&&void 0!==e?e:f.firstEnabled();t&&o(t.index)},ArrowUp:()=>{var e;d.current=!0;const t=null!==(e=f.prevEnabled(r))&&void 0!==e?e:f.firstEnabled();t&&o(t.index)}},n=t[e.key];if(n)return e.preventDefault(),void n(e);const i=h((e=>{const t=function(e,t,n,r){if(null==t)return r;if(!r)return e.find((e=>n(e).toLowerCase().startsWith(t.toLowerCase())));const o=e.filter((e=>n(e).toLowerCase().startsWith(t.toLowerCase())));if(o.length>0){let t;return o.includes(r)?(t=o.indexOf(r)+1,t===o.length&&(t=0),o[t]):(t=e.indexOf(o[0]),e[t])}return r}(f.values(),e,(e=>{var t,n;return null!==(t=null==e||null===(n=e.node)||void 0===n?void 0:n.textContent)&&void 0!==t?t:""}),f.item(r));if(t){const e=f.indexOf(t.node);o(e)}}));SP(e.target)&&i(e)}),[f,r,h,s,o,d]),v=ct.useRef(!1);a&&(v.current=!0);const g=Sn({wasSelected:v.current,enabled:c,mode:u,isSelected:p.present});return at(at({},e),{},{ref:or(i,t),children:g?e.children:null,tabIndex:-1,role:"menu",id:l,style:at(at({},e.style),{},{transformOrigin:"var(--popper-transform-origin)"}),"aria-orientation":"vertical",onKeyDown:dn(e.onKeyDown,m)})}(a,t),d=function(e={}){const{popper:t,isOpen:n}=wP();return t.getPopperProps(at(at({},e),{},{style:at({visibility:n?"visible":"hidden"},e.style)}))}(o),p=EP();return Vt.jsx(Vx.div,at(at({},d),{},{__css:{zIndex:null!==(n=e.zIndex)&&void 0!==n?n:null===(r=p.list)||void 0===r?void 0:r.zIndex},children:Vt.jsx(IP,at(at(at({variants:NP,initial:!1,animate:s?"enter":"exit",__css:at({outline:0},p.list)},i),u),{},{className:mn("chakra-menu__menu-list",u.className),onUpdate:l,onAnimationComplete:un(c.onComplete,u.onAnimationComplete)}))}))})));DP.displayName="MenuList";var zP=new WeakMap,BP=new WeakMap,FP={},LP=0,$P=function(e){return e&&(e.host||$P(e.parentNode))},VP=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=$P(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);FP[n]||(FP[n]=new WeakMap);var i=FP[n],a=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(zP.get(e)||0)+1,c=(i.get(e)||0)+1;zP.set(e,l),i.set(e,c),a.push(e),1===l&&o&&BP.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(d){console.error("aria-hidden: cannot operate on ",e,d)}}))};return u(t),s.clear(),LP++,function(){a.forEach((function(e){var t=zP.get(e)-1,o=i.get(e)-1;zP.set(e,t),i.set(e,o),t||(BP.has(e)||e.removeAttribute(r),BP.delete(e)),o||e.removeAttribute(n)})),--LP||(zP=new WeakMap,zP=new WeakMap,BP=new WeakMap,FP={})}},WP=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),VP(r,o,n,"aria-hidden")):function(){return null}},HP=Object.defineProperty,UP=(e,t,n)=>(((e,t,n)=>{t in e?HP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,t+"",n),n);const qP=new class{constructor(){UP(this,"modals"),this.modals=new Set}add(e){return this.modals.add(e),this.modals.size}remove(e){this.modals.delete(e)}isTopModal(e){if(!e)return!1;return e===Array.from(this.modals)[this.modals.size-1]}};function YP(e,t){const[n,r]=ct.useState(0);return ct.useEffect((()=>{const n=e.current;if(n){if(t){const e=qP.add(n);r(e)}return()=>{qP.remove(n),r(0)}}}),[t,e]),n}function XP(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:o=!0,closeOnEsc:i=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,c=ct.useRef(null),u=ct.useRef(null),[d,p,f]=function(e,...t){const n=ct.useId(),r=e||n;return ct.useMemo((()=>t.map((e=>`${e}-${r}`))),[r,t])}(r,"chakra-modal","chakra-modal--header","chakra-modal--body");!function(e,t){const n=e.current;ct.useEffect((()=>{if(e.current&&t)return WP(e.current)}),[t,e,n])}(c,t&&a);const h=YP(c,t),m=ct.useRef(null),v=ct.useCallback((e=>{m.current=e.target}),[]),g=ct.useCallback((e=>{"Escape"===e.key&&(e.stopPropagation(),i&&(null==n||n()),null==l||l())}),[i,n,l]),[b,y]=ct.useState(!1),[x,w]=ct.useState(!1),k=ct.useCallback(((e={},t=null)=>at(at({role:"dialog"},e),{},{ref:or(t,c),id:d,tabIndex:-1,"aria-modal":!0,"aria-labelledby":b?p:void 0,"aria-describedby":x?f:void 0,onClick:dn(e.onClick,(e=>e.stopPropagation()))})),[f,x,d,p,b]),S=ct.useCallback((e=>{e.stopPropagation(),m.current===e.target&&qP.isTopModal(c.current)&&(o&&(null==n||n()),null==s||s())}),[n,o,s]),C=ct.useCallback(((e={},t=null)=>at(at({},e),{},{ref:or(t,u),onClick:dn(e.onClick,S),onKeyDown:dn(e.onKeyDown,g),onMouseDown:dn(e.onMouseDown,v)})),[g,v,S]);return{isOpen:t,onClose:n,headerId:p,bodyId:f,setBodyMounted:w,setHeaderMounted:y,dialogRef:c,overlayRef:u,getDialogProps:k,getDialogContainerProps:C,index:h}}const[GP,KP]=hn({name:"ModalStylesContext",errorMessage:"useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),[ZP,JP]=hn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),QP=it("ag",(e=>{const t=at(at({scrollBehavior:"outside",autoFocus:!0,trapFocus:!0,returnFocusOnClose:!0,blockScrollOnMount:!0,allowPinchZoom:!1,preserveScrollBarGap:!0,motionPreset:"scale"},e),{},{lockFocusAcrossFrames:e.lockFocusAcrossFrames||!0}),{portalProps:n,children:r,autoFocus:o,trapFocus:i,initialFocusRef:a,finalFocusRef:s,returnFocusOnClose:l,blockScrollOnMount:c,allowPinchZoom:u,preserveScrollBarGap:d,motionPreset:p,lockFocusAcrossFrames:f,animatePresenceProps:h,onCloseComplete:m}=t,v=ew("Modal",t),g=at(at({},XP(t)),{},{autoFocus:o,trapFocus:i,initialFocusRef:a,finalFocusRef:s,returnFocusOnClose:l,blockScrollOnMount:c,allowPinchZoom:u,preserveScrollBarGap:d,motionPreset:p,lockFocusAcrossFrames:f});return Vt.jsx(ZP,{value:g,children:Vt.jsx(GP,{value:v,children:Vt.jsx(Sx,at(at({},h),{},{onExitComplete:m,children:g.isOpen&&Vt.jsx(Pw,at(at({},n),{},{children:r}))}))})})}));QP.displayName="Modal";var ej="right-scroll-bar-position",tj="width-before-scroll-bar",nj=jS(),rj=function(){},oj=ct.forwardRef((function(e,t){var n=ct.useRef(null),r=ct.useState({onScrollCapture:rj,onWheelCapture:rj,onTouchMoveCapture:rj}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,p=e.sideCar,f=e.noIsolation,h=e.inert,m=e.allowPinchZoom,v=e.as,g=void 0===v?"div":v,b=e.gapMode,y=CS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,w=wS([n,t]),k=SS(SS({},y),o);return ct.createElement(ct.Fragment,null,u&&ct.createElement(x,{sideCar:nj,removeScrollBar:c,shards:d,noIsolation:f,inert:h,setCallbacks:i,allowPinchZoom:!!m,lockRef:n,gapMode:b}),a?ct.cloneElement(ct.Children.only(s),SS(SS({},k),{ref:w})):ct.createElement(g,SS({},k,{className:l,ref:w}),s))}));oj.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},oj.classNames={fullWidth:tj,zeroRight:ej};function ij(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var aj=function(){var e=0,t=null;return{add:function(n){var r;0==e&&(t=ij())&&(!function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,n),r=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(r)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},sj=function(){var e,t=(e=aj(),function(t,n){ct.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},lj={left:0,top:0,right:0,gap:0},cj=function(e){return parseInt(e||"",10)||0},uj=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return lj;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[cj(n),cj(r),cj(o)]}(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])}},dj=sj(),pj="data-scroll-locked",fj=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(pj,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(ej," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(tj," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(ej," .").concat(ej," {\n right: 0 ").concat(r,";\n }\n \n .").concat(tj," .").concat(tj," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(pj,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},hj=function(){var e=parseInt(document.body.getAttribute(pj)||"0",10);return isFinite(e)?e:0},mj=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;ct.useEffect((function(){return document.body.setAttribute(pj,(hj()+1).toString()),function(){var e=hj()-1;e<=0?document.body.removeAttribute(pj):document.body.setAttribute(pj,e.toString())}}),[]);var i=ct.useMemo((function(){return uj(o)}),[o]);return ct.createElement(dj,{styles:fj(i,!t,o,n?"":"!important")})},vj=!1;if("undefined"!=typeof window)try{var gj=Object.defineProperty({},"passive",{get:function(){return vj=!0,!0}});window.addEventListener("test",gj,gj),window.removeEventListener("test",gj,gj)}catch(zA){vj=!1}var bj=!!vj&&{passive:!1},yj=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},xj=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),wj(e,r)){var o=kj(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},wj=function(e,t){return"v"===e?function(e){return yj(e,"overflowY")}(t):function(e){return yj(e,"overflowX")}(t)},kj=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Sj=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Cj=function(e){return[e.deltaX,e.deltaY]},_j=function(e){return e&&"current"in e?e.current:e},Ej=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Pj=0,jj=[];function Tj(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Aj=(Oj=function(e){var t=ct.useRef([]),n=ct.useRef([0,0]),r=ct.useRef(),o=ct.useState(Pj++)[0],i=ct.useState(sj)[0],a=ct.useRef(e);ct.useEffect((function(){a.current=e}),[e]),ct.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;oMath.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var p=xj(d,u);if(!p)return!0;if(p?o=d:(o="v"===d?"h":"v",p=xj(d,u)),!p)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=o),!o)return!0;var f=r.current||o;return function(e,t,n,r,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),c=!1,u=a>0,d=0,p=0;do{var f=kj(e,s),h=f[0],m=f[1]-f[2]-i*h;(h||m)&&wj(e,s)&&(d+=m,p+=h),s=s instanceof ShadowRoot?s.host:s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&Math.abs(d)<1||!u&&Math.abs(p)<1)&&(c=!0),c}(f,t,e,"h"===f?l:c)}),[]),l=ct.useCallback((function(e){var n=e;if(jj.length&&jj[jj.length-1]===i){var r="deltaY"in n?Cj(n):Sj(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var l=(a.current.shards||[]).map(_j).filter(Boolean).filter((function(e){return e.contains(n.target)}));(l.length>0?s(n,l[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),c=ct.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:Tj(r)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),u=ct.useCallback((function(e){n.current=Sj(e),r.current=void 0}),[]),d=ct.useCallback((function(t){c(t.type,Cj(t),t.target,s(t,e.lockRef.current))}),[]),p=ct.useCallback((function(t){c(t.type,Sj(t),t.target,s(t,e.lockRef.current))}),[]);ct.useEffect((function(){return jj.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,bj),document.addEventListener("touchmove",l,bj),document.addEventListener("touchstart",u,bj),function(){jj=jj.filter((function(e){return e!==i})),document.removeEventListener("wheel",l,bj),document.removeEventListener("touchmove",l,bj),document.removeEventListener("touchstart",u,bj)}}),[]);var f=e.removeScrollBar,h=e.inert;return ct.createElement(ct.Fragment,null,h?ct.createElement(i,{styles:Ej(o)}):null,f?ct.createElement(mj,{gapMode:e.gapMode}):null)},nj.useMedium(Oj),TS);var Oj,Rj=ct.forwardRef((function(e,t){return ct.createElement(oj,SS({},e,{ref:t,sideCar:Aj}))}));function Mj(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:i,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:c,lockFocusAcrossFrames:u,isOpen:d}=JP(),[p,f]=Ib();ct.useEffect((()=>{!p&&f&&setTimeout(f)}),[p,f]);const h=YP(r,d);return Vt.jsx(a_,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:u,children:Vt.jsx(Rj,{removeScrollBar:!c,allowPinchZoom:a,enabled:1===h&&i,forwardProps:!0,children:e.children})})}Rj.classNames=oj.classNames;const Nj={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:o})=>{var i;return{opacity:0,x:e,y:t,transition:null!==(i=null==n?void 0:n.exit)&&void 0!==i?i:rk(tk.exit,o),transitionEnd:null==r?void 0:r.exit}},enter:({transition:e,transitionEnd:t,delay:n})=>{var r;return{opacity:1,x:0,y:0,transition:null!==(r=null==e?void 0:e.enter)&&void 0!==r?r:nk(tk.enter,n),transitionEnd:null==t?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:o,delay:i})=>{var a;const s={x:t,y:e};return at({opacity:0,transition:null!==(a=null==n?void 0:n.exit)&&void 0!==a?a:rk(tk.exit,i)},o?at(at({},s),{},{transitionEnd:null==r?void 0:r.exit}):{transitionEnd:at(at({},s),null==r?void 0:r.exit)})}},Ij={initial:"initial",animate:"enter",exit:"exit",variants:Nj},Dj=ct.forwardRef((function(e,t){const{unmountOnExit:n,in:r,reverse:o=!0,className:i,offsetX:a=0,offsetY:s=8,transition:l,transitionEnd:c,delay:u,animatePresenceProps:d}=e,p=ot(e,ke),f=!n||r&&n,h=r||n?"enter":"exit",m={offsetX:a,offsetY:s,reverse:o,transition:l,transitionEnd:c,delay:u};return Vt.jsx(Sx,at(at({},d),{},{custom:m,children:f&&Vt.jsx(vx.div,at(at({ref:t,className:mn("chakra-offset-slide",i),custom:m},Ij),{},{animate:h},p))}))}));Dj.displayName="SlideFade";const zj={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:o})=>{var i;return at(at({opacity:0},e?{scale:t,transitionEnd:null==r?void 0:r.exit}:{transitionEnd:at({scale:t},null==r?void 0:r.exit)}),{},{transition:null!==(i=null==n?void 0:n.exit)&&void 0!==i?i:rk(tk.exit,o)})},enter:({transitionEnd:e,transition:t,delay:n})=>{var r;return{opacity:1,scale:1,transition:null!==(r=null==t?void 0:t.enter)&&void 0!==r?r:nk(tk.enter,n),transitionEnd:null==e?void 0:e.enter}}},Bj={initial:"exit",animate:"enter",exit:"exit",variants:zj},Fj=ct.forwardRef((function(e,t){const{unmountOnExit:n,in:r,reverse:o=!0,initialScale:i=.95,className:a,transition:s,transitionEnd:l,delay:c,animatePresenceProps:u}=e,d=ot(e,Se),p=!n||r&&n,f=r||n?"enter":"exit",h={initialScale:i,reverse:o,transition:s,transitionEnd:l,delay:c};return Vt.jsx(Sx,at(at({},u),{},{custom:h,children:p&&Vt.jsx(vx.div,at(at({ref:t,className:mn("chakra-offset-slide",a)},Bj),{},{animate:f,custom:h},d))}))}));Fj.displayName="ScaleFade";const Lj={slideInBottom:at(at({},Ij),{},{custom:{offsetY:16,reverse:!0}}),slideInRight:at(at({},Ij),{},{custom:{offsetX:16,reverse:!0}}),slideInTop:at(at({},Ij),{},{custom:{offsetY:-16,reverse:!0}}),slideInLeft:at(at({},Ij),{},{custom:{offsetX:-16,reverse:!0}}),scale:at(at({},Bj),{},{custom:{initialScale:.95,reverse:!0}}),none:{}},$j=Vx(vx.section),Vj=e=>Lj[e||"none"],Wj=ct.forwardRef(((e,t)=>{const{preset:n,motionProps:r=Vj(n)}=e,o=ot(e,Ce);return Vt.jsx($j,at(at({ref:t},r),o))}));Wj.displayName="ModalTransition";const Hj=it("ah",Ux(((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:i}=e,a=ot(e,_e),{getDialogProps:s,getDialogContainerProps:l}=JP(),c=s(a,t),u=l(o),d=mn("chakra-modal__content",n),p=KP(),f=at({display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0},p.dialog),h=at({display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0},p.dialogContainer),{motionPreset:m}=JP();return Vt.jsx(Mj,{children:Vt.jsx(Vx.div,at(at({},u),{},{className:"chakra-modal__content-container",tabIndex:-1,__css:h,children:Vt.jsx(Wj,at(at({preset:m,motionProps:i,className:d},c),{},{__css:f,children:r}))}))})})));Hj.displayName="ModalContent";const Uj=it("L",Ux(((e,t)=>{const{className:n}=e,r=ot(e,Ee),{bodyId:o,setBodyMounted:i}=JP();ct.useEffect((()=>(i(!0),()=>i(!1))),[i]);const a=mn("chakra-modal__body",n),s=KP();return Vt.jsx(Vx.div,at(at({ref:t,className:a,id:o},r),{},{__css:s.body}))})));Uj.displayName="ModalBody";const qj=it("K",Ux(((e,t)=>{const{onClick:n,className:r}=e,o=ot(e,Pe),{onClose:i}=JP(),a=mn("chakra-modal__close-btn",r),s=KP();return Vt.jsx(vw,at({ref:t,__css:s.closeButton,className:a,onClick:dn(n,(e=>{e.stopPropagation(),i()}))},o))})));qj.displayName="ModalCloseButton";it("O",Ux(((e,t)=>{const{className:n}=e,r=ot(e,je),o=mn("chakra-modal__footer",n),i=at({display:"flex",alignItems:"center",justifyContent:"flex-end"},KP().footer);return Vt.jsx(Vx.footer,at(at({ref:t},r),{},{__css:i,className:o}))}))).displayName="ModalFooter";it("J",Ux(((e,t)=>{const{className:n}=e,r=ot(e,Te),{headerId:o,setHeaderMounted:i}=JP();ct.useEffect((()=>(i(!0),()=>i(!1))),[i]);const a=mn("chakra-modal__header",n),s=at({flex:0},KP().header);return Vt.jsx(Vx.header,at(at({ref:t,className:a,id:o},r),{},{__css:s}))}))).displayName="ModalHeader";const Yj={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:null!==(r=null==e?void 0:e.enter)&&void 0!==r?r:nk(tk.enter,n),transitionEnd:null==t?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:0,transition:null!==(r=null==e?void 0:e.exit)&&void 0!==r?r:rk(tk.exit,n),transitionEnd:null==t?void 0:t.exit}}},Xj={initial:"exit",animate:"enter",exit:"exit",variants:Yj},Gj=ct.forwardRef((function(e,t){const{unmountOnExit:n,in:r,className:o,transition:i,transitionEnd:a,delay:s,animatePresenceProps:l}=e,c=ot(e,Ae),u=r||n?"enter":"exit",d=!n||r&&n,p={transition:i,transitionEnd:a,delay:s};return Vt.jsx(Sx,at(at({},l),{},{custom:p,children:d&&Vt.jsx(vx.div,at(at({ref:t,className:mn("chakra-fade",o),custom:p},Xj),{},{animate:u},c))}))}));Gj.displayName="Fade";const Kj=Vx(vx.div);it("M",Ux(((e,t)=>{const{className:n,transition:r,motionProps:o}=e,i=ot(e,Oe),a=mn("chakra-modal__overlay",n),s=at({pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh"},KP().overlay),{motionPreset:l}=JP(),c=o||("none"===l?{}:Xj);return Vt.jsx(Kj,at(at({},c),{},{__css:s,ref:t,className:a},i))}))).displayName="ModalOverlay";it("H",Ux(((e,t)=>Vt.jsx(Hj,at({ref:t,role:"alertdialog"},e)))));const Zj=e=>Vt.jsx(nw,at(at({viewBox:"0 0 24 24"},e),{},{children:Vt.jsx("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})})),Jj=e=>Vt.jsx(nw,at(at({viewBox:"0 0 24 24"},e),{},{children:Vt.jsx("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})}));function Qj(e,t,n,r){ct.useEffect((()=>{var o;if(!e.current||!r)return;const i=null!==(o=e.current.ownerDocument.defaultView)&&void 0!==o?o:window,a=Array.isArray(t)?t:[t],s=new i.MutationObserver((e=>{for(const t of e)"attributes"===t.type&&t.attributeName&&a.includes(t.attributeName)&&n(t)}));return s.observe(e.current,{attributes:!0,attributeFilter:a}),()=>s.disconnect()}))}const eT=50,tT=300;function nT(e,t){const[n,r]=ct.useState(!1),[o,i]=ct.useState(null),[a,s]=ct.useState(!0),l=ct.useRef(null),c=()=>clearTimeout(l.current);!function(e,t){const n=Ln(e);ct.useEffect((()=>{let e=null;const r=()=>n();return null!==t&&(e=window.setInterval(r,t)),()=>{e&&window.clearInterval(e)}}),[t,n])}((()=>{"increment"===o&&e(),"decrement"===o&&t()}),n?eT:null);const u=ct.useCallback((()=>{a&&e(),l.current=setTimeout((()=>{s(!1),r(!0),i("increment")}),tT)}),[e,a]),d=ct.useCallback((()=>{a&&t(),l.current=setTimeout((()=>{s(!1),r(!0),i("decrement")}),tT)}),[t,a]),p=ct.useCallback((()=>{s(!0),r(!1),c()}),[]);return ct.useEffect((()=>()=>c()),[]),{up:u,down:d,stop:p,isSpinning:n}}const rT=/^[Ee0-9+\-.]$/;function oT(e){return rT.test(e)}function iT(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:o=Number.MIN_SAFE_INTEGER,max:i=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:c,isInvalid:u,pattern:d="[0-9]*(.[0-9]+)?",inputMode:p="decimal",allowMouseWheel:f,id:h,onChange:m,precision:v,name:g,"aria-describedby":b,"aria-label":y,"aria-labelledby":x,onFocus:w,onBlur:k,onInvalid:S,getAriaValueText:C,isValidCharacter:_,format:E,parse:P}=e,j=ot(e,Me),T=Ln(w),A=Ln(k),O=Ln(S),R=Ln(null!=_?_:oT),M=Ln(C),N=function(e={}){const{onChange:t,precision:n,defaultValue:r,value:o,step:i=1,min:a=Number.MIN_SAFE_INTEGER,max:s=Number.MAX_SAFE_INTEGER,keepWithinRange:l=!0}=e,c=Ln(t),[u,d]=ct.useState((()=>{var e;return null==r?"":null!==(e=qn(r,i,n))&&void 0!==e?e:""})),p=void 0!==o,f=p?o:u,h=Un(Hn(f),i),m=null!=n?n:h,v=ct.useCallback((e=>{e!==f&&(p||d(e.toString()),null==c||c(e.toString(),Hn(e)))}),[c,p,f]),g=ct.useCallback((e=>{let t=e;return l&&(t=jn(t,a,s)),Cn(t,m)}),[m,l,s,a]),b=ct.useCallback(((e=i)=>{let t;t=""===f?Hn(e):Hn(f)+e,t=g(t),v(t)}),[g,i,v,f]),y=ct.useCallback(((e=i)=>{let t;t=""===f?Hn(-e):Hn(f)-e,t=g(t),v(t)}),[g,i,v,f]),x=ct.useCallback((()=>{let e;var t;e=null==r?"":null!==(t=qn(r,i,n))&&void 0!==t?t:a,v(e)}),[r,n,i,v,a]),w=ct.useCallback((e=>{var t;const n=null!==(t=qn(e,i,m))&&void 0!==t?t:a;v(n)}),[m,i,v,a]),k=Hn(f);return{isOutOfRange:k>s||ke.split("").filter(R).join("")),[R]),q=ct.useCallback((e=>{var t;return null!==(t=null==P?void 0:P(e))&&void 0!==t?t:e}),[P]),Y=ct.useCallback((e=>{var t;return(null!==(t=null==E?void 0:E(e))&&void 0!==t?t:e).toString()}),[E]);Gn((()=>{(N.valueAsNumber>i||N.valueAsNumber{if(!$.current)return;if($.current.value!=N.value){const e=q($.current.value);N.setValue(U(e))}}),[q,U]);const X=ct.useCallback(((e=a)=>{L&&D(e)}),[D,L,a]),G=ct.useCallback(((e=a)=>{L&&z(e)}),[z,L,a]),K=nT(X,G);Qj(W,"disabled",K.stop,K.isSpinning),Qj(H,"disabled",K.stop,K.isSpinning);const Z=ct.useCallback((e=>{if(e.nativeEvent.isComposing)return;const t=q(e.currentTarget.value);I(U(t)),V.current={start:e.currentTarget.selectionStart,end:e.currentTarget.selectionEnd}}),[I,U,q]),J=ct.useCallback((e=>{var t,n,r;null==T||T(e),V.current&&(e.currentTarget.selectionStart=null!==(t=V.current.start)&&void 0!==t?t:null===(n=e.currentTarget.value)||void 0===n?void 0:n.length,e.currentTarget.selectionEnd=null!==(r=V.current.end)&&void 0!==r?r:e.currentTarget.selectionStart)}),[T]),Q=ct.useCallback((e=>{if(e.nativeEvent.isComposing)return;(function(e,t){if(null==e.key)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(1===e.key.length&&!n)||t(e.key)})(e,R)||e.preventDefault();const t=ee(e)*a,n={ArrowUp:()=>X(t),ArrowDown:()=>G(t),Home:()=>I(o),End:()=>I(i)}[e.key];n&&(e.preventDefault(),n(e))}),[R,a,X,G,I,o,i]),ee=e=>{let t=1;return(e.metaKey||e.ctrlKey)&&(t=.1),e.shiftKey&&(t=10),t},te=ct.useMemo((()=>{const e=null==M?void 0:M(N.value);if(null!=e)return e;const t=N.value.toString();return t||void 0}),[N.value,M]),ne=ct.useCallback((()=>{let e=N.value;if(""===N.value)return;/^[eE]/.test(N.value.toString())?N.setValue(""):(N.valueAsNumberi&&(e=i),N.cast(e))}),[N,i,o]),re=ct.useCallback((()=>{F(!1),n&&ne()}),[n,F,ne]),oe=ct.useCallback((()=>{t&&requestAnimationFrame((()=>{var e;null===(e=$.current)||void 0===e||e.focus()}))}),[t]),ie=ct.useCallback((e=>{e.preventDefault(),K.up(),oe()}),[oe,K]),ae=ct.useCallback((e=>{e.preventDefault(),K.down(),oe()}),[oe,K]);$n((()=>$.current),"wheel",(e=>{var t,n;const r=(null!==(t=null===(n=$.current)||void 0===n?void 0:n.ownerDocument)&&void 0!==t?t:document).activeElement===$.current;if(!f||!r)return;e.preventDefault();const o=ee(e)*a,i=Math.sign(e.deltaY);-1===i?X(o):1===i&&G(o)}),{passive:!1});const se=ct.useCallback(((e={},t=null)=>{const n=l||r&&N.isAtMax;return at(at({},e),{},{ref:or(t,W),role:"button",tabIndex:-1,onPointerDown:dn(e.onPointerDown,(e=>{0!==e.button||n||ie(e)})),onPointerLeave:dn(e.onPointerLeave,K.stop),onPointerUp:dn(e.onPointerUp,K.stop),disabled:n,"aria-disabled":Jt(n)})}),[N.isAtMax,r,ie,K.stop,l]),le=ct.useCallback(((e={},t=null)=>{const n=l||r&&N.isAtMin;return at(at({},e),{},{ref:or(t,H),role:"button",tabIndex:-1,onPointerDown:dn(e.onPointerDown,(e=>{0!==e.button||n||ae(e)})),onPointerLeave:dn(e.onPointerLeave,K.stop),onPointerUp:dn(e.onPointerUp,K.stop),disabled:n,"aria-disabled":Jt(n)})}),[N.isAtMin,r,ae,K.stop,l]),ce=ct.useCallback(((e={},t=null)=>{var n,r,a,f;return at(at({name:g,inputMode:p,type:"text",pattern:d,"aria-labelledby":x,"aria-label":y,"aria-describedby":b,id:h,disabled:l},e),{},{readOnly:null!==(n=e.readOnly)&&void 0!==n?n:s,"aria-readonly":null!==(r=e.readOnly)&&void 0!==r?r:s,"aria-required":null!==(a=e.required)&&void 0!==a?a:c,required:null!==(f=e.required)&&void 0!==f?f:c,ref:or($,t),value:Y(N.value),role:"spinbutton","aria-valuemin":o,"aria-valuemax":i,"aria-valuenow":Number.isNaN(N.valueAsNumber)?void 0:N.valueAsNumber,"aria-invalid":Jt(null!=u?u:N.isOutOfRange),"aria-valuetext":te,autoComplete:"off",autoCorrect:"off",onChange:dn(e.onChange,Z),onKeyDown:dn(e.onKeyDown,Q),onFocus:dn(e.onFocus,J,(()=>F(!0))),onBlur:dn(e.onBlur,A,re)})}),[g,p,d,x,y,Y,b,h,l,c,s,u,N.value,N.valueAsNumber,N.isOutOfRange,o,i,te,Z,Q,J,A,re]);return{value:Y(N.value),valueAsNumber:N.valueAsNumber,isFocused:B,isDisabled:l,isReadOnly:s,getIncrementButtonProps:se,getDecrementButtonProps:le,getInputProps:ce,htmlProps:j}}const[aT,sT]=hn({name:"NumberInputStylesContext",errorMessage:"useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),[lT,cT]=hn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),uT=it("aN",Ux((function(e,t){const n=ew("NumberInput",e),r=iT(tS(Go(e))),{htmlProps:o}=r,i=ot(r,Ne),a=ct.useMemo((()=>i),[i]);return Vt.jsx(lT,{value:a,children:Vt.jsx(aT,{value:n,children:Vt.jsx(Vx.div,at(at({},o),{},{ref:t,className:mn("chakra-numberinput",e.className),__css:at({position:"relative",zIndex:0},n.root)}))})})})));uT.displayName="NumberInput";const dT=Ux((function(e,t){const n=sT();return Vt.jsx(Vx.div,at(at({"aria-hidden":!0,ref:t},e),{},{__css:at({display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1},n.stepperGroup)}))}));dT.displayName="NumberInputStepper";const pT=it("aO",Ux((function(e,t){const{getInputProps:n}=cT(),r=n(e,t),o=sT();return Vt.jsx(Vx.input,at(at({},r),{},{className:mn("chakra-numberinput__field",e.className),__css:at({width:"100%"},o.field)}))})));pT.displayName="NumberInputField";const fT=Vx("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),hT=Ux((function(e,t){var n;const r=sT(),{getDecrementButtonProps:o}=cT(),i=o(e,t);return Vt.jsx(fT,at(at({},i),{},{__css:r.stepper,children:null!==(n=e.children)&&void 0!==n?n:Vt.jsx(Zj,{})}))}));hT.displayName="NumberDecrementStepper";const mT=Ux((function(e,t){var n;const{getIncrementButtonProps:r}=cT(),o=r(e,t),i=sT();return Vt.jsx(fT,at(at({},o),{},{__css:i.stepper,children:null!==(n=e.children)&&void 0!==n?n:Vt.jsx(Jj,{})}))}));mT.displayName="NumberIncrementStepper";const[vT,gT]=hn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[bT,yT]=hn({name:"PopoverStylesContext",errorMessage:"usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),xT={click:"click",hover:"hover"};function wT(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:o,returnFocusOnClose:i=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:c=xT.click,openDelay:u=200,closeDelay:d=200,isLazy:p,lazyBehavior:f="unmount",computePositionOnMount:h}=e,m=ot(e,Ie),{isOpen:v,onClose:g,onOpen:b,onToggle:y}=Yn(e),[x,w]=ct.useState(i);ct.useEffect((()=>w(i)),[i]);const k=ct.useRef(null),S=ct.useRef(null),C=ct.useRef(null),_=ct.useRef(!1),E=ct.useRef(!1);v&&(E.current=!0);const[P,j]=ct.useState(!1),[T,A]=ct.useState(!1),O=ct.useId(),R=null!=o?o:O,[M,N,I,D]=["popover-trigger","popover-content","popover-header","popover-body"].map((e=>`${e}-${R}`)),{referenceRef:z,getArrowProps:B,getPopperProps:F,getArrowInnerProps:L,forceUpdate:$}=pP(at(at({},m),{},{enabled:v||!!h})),V=Vn({isOpen:v,ref:C});!function(e){const{ref:t,elements:n,enabled:r}=e,o=()=>{var e,n;return null!==(e=null===(n=t.current)||void 0===n?void 0:n.ownerDocument)&&void 0!==e?e:document};$n(o,"pointerdown",(e=>{var i,a;if(!tr()||!r)return;const s=null!==(i=null===(a=e.composedPath)||void 0===a||null===(a=a.call(e))||void 0===a?void 0:a[0])&&void 0!==i?i:e.target,l=(null!=n?n:[t]).some((e=>{const t="current"in e?e.current:e;return(null==t?void 0:t.contains(s))||t===s}));o().activeElement!==s&&l&&(e.preventDefault(),s.focus())}))}({enabled:v,ref:S}),Zn(C,{focusRef:S,visible:v,shouldFocus:x&&c===xT.click}),function(e,t=Jn){const{focusRef:n,preventScroll:r,shouldFocus:o,visible:i}=t,a="current"in e?e.current:e,s=o&&i,l=ct.useRef(s),c=ct.useRef(i);Xn((()=>{!c.current&&i&&(l.current=s),c.current=i}),[i,s]);const u=ct.useCallback((()=>{if(i&&a&&l.current&&(l.current=!1,!a.contains(document.activeElement)))if(null!=n&&n.current)requestAnimationFrame((()=>{var e;null===(e=n.current)||void 0===e||e.focus({preventScroll:r})}));else{const e=wn(a);e.length>0&&requestAnimationFrame((()=>{e[0].focus({preventScroll:r})}))}}),[i,r,a,n]);Gn((()=>{u()}),[u]),$n(a,"transitionend",u)}(C,{focusRef:r,visible:v,shouldFocus:a&&c===xT.click}),ar({enabled:v&&t,ref:C,handler(e){var t,n;const r=null!==(t=null===(n=e.composedPath)||void 0===n?void 0:n.call(e)[0])&&void 0!==t?t:[e.target];kT(S.current,r)||(r&&w(!bn(r)),g())}});const W=Sn({wasSelected:E.current,enabled:p,mode:f,isSelected:V.present}),H=ct.useCallback(((e={},r=null)=>{const o=at(at({},e),{},{style:at(at({},e.style),{},{transformOrigin:JE.transformOrigin.varRef,[JE.arrowSize.var]:s?`${s}px`:void 0,[JE.arrowShadowColor.var]:l}),ref:or(C,r),children:W?e.children:null,id:N,tabIndex:-1,role:"dialog",onKeyDown:dn(e.onKeyDown,(e=>{e.nativeEvent.isComposing||n&&"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),g())})),onBlur:dn(e.onBlur,(e=>{const n=ST(e),r=kT(C.current,n),o=kT(S.current,n),i=!r&&!o;n&&w(!bn(n)),v&&t&&i&&g()})),"aria-labelledby":P?I:void 0,"aria-describedby":T?D:void 0});return c===xT.hover&&(o.role="tooltip",o.onMouseEnter=dn(e.onMouseEnter,(()=>{_.current=!0})),o.onMouseLeave=dn(e.onMouseLeave,(e=>{null!==e.nativeEvent.relatedTarget&&(_.current=!1,setTimeout((()=>g()),d))}))),o}),[W,N,P,I,T,D,c,n,g,v,t,d,l,s]),U=ct.useCallback(((e={},t=null)=>F(at(at({},e),{},{style:at({visibility:v?"visible":"hidden"},e.style)}),t)),[v,F]),q=ct.useCallback(((e,t=null)=>at(at({},e),{},{ref:or(t,k,z)})),[k,z]),Y=ct.useRef(),X=ct.useRef(),G=ct.useCallback((e=>{null==k.current&&z(e)}),[z]),K=ct.useCallback(((e={},n=null)=>{const r=at(at({},e),{},{ref:or(S,n,G),id:M,"aria-haspopup":"dialog","aria-expanded":v,"aria-controls":N});return c===xT.click&&(r.onClick=dn(e.onClick,y)),c===xT.hover&&(r.onFocus=dn(e.onFocus,(()=>{void 0===Y.current&&b()})),r.onBlur=dn(e.onBlur,(e=>{const n=ST(e),r=!kT(C.current,n);v&&t&&r&&g()})),r.onKeyDown=dn(e.onKeyDown,(e=>{"Escape"===e.key&&g()})),r.onMouseEnter=dn(e.onMouseEnter,(()=>{_.current=!0,Y.current=window.setTimeout((()=>b()),u)})),r.onMouseLeave=dn(e.onMouseLeave,(()=>{_.current=!1,Y.current&&(clearTimeout(Y.current),Y.current=void 0),X.current=window.setTimeout((()=>{!1===_.current&&g()}),d)}))),r}),[M,v,N,c,G,y,b,t,g,u,d]);ct.useEffect((()=>()=>{Y.current&&clearTimeout(Y.current),X.current&&clearTimeout(X.current)}),[]);const Z=ct.useCallback(((e={},t=null)=>at(at({},e),{},{id:I,ref:or(t,(e=>{j(!!e)}))})),[I]),J=ct.useCallback(((e={},t=null)=>at(at({},e),{},{id:D,ref:or(t,(e=>{A(!!e)}))})),[D]);return{forceUpdate:$,isOpen:v,onAnimationComplete:V.onComplete,onClose:g,getAnchorProps:q,getArrowProps:B,getArrowInnerProps:L,getPopoverPositionerProps:U,getPopoverProps:H,getTriggerProps:K,getHeaderProps:Z,getBodyProps:J}}function kT(e,t){return e===t||(null==e?void 0:e.contains(t))}function ST(e){var t;const n=e.currentTarget.ownerDocument.activeElement;return null!==(t=e.relatedTarget)&&void 0!==t?t:n}function CT(e){const t=ew("Popover",e),n=Go(e),{children:r}=n,o=ot(n,De),i=Kx(),a=wT(at(at({},o),{},{direction:i.direction}));return Vt.jsx(vT,{value:a,children:Vt.jsx(bT,{value:t,children:Rn(r,{isOpen:a.isOpen,onClose:a.onClose,forceUpdate:a.forceUpdate})})})}function _T(e){var t;const n=ct.version;return"string"!=typeof n||n.startsWith("18.")?null==e?void 0:e.ref:null==e||null===(t=e.props)||void 0===t?void 0:t.ref}function ET(e){const t=ct.Children.only(e.children),{getAnchorProps:n}=gT();return Vt.jsx(Vt.Fragment,{children:ct.cloneElement(t,n(t.props,_T(t)))})}CT.displayName="Popover",ET.displayName="PopoverAnchor";const PT=(e,t)=>t?`${e}.${t}, ${t}`:void 0;function jT(e){var t;const{bg:n,bgColor:r,backgroundColor:o,shadow:i,boxShadow:a,shadowColor:s}=e,l=ot(e,ze),{getArrowProps:c,getArrowInnerProps:u}=gT(),d=yT(),p=null!==(t=null!=n?n:r)&&void 0!==t?t:o,f=null!=i?i:a;return Vt.jsx(Vx.div,at(at({},c()),{},{className:"chakra-popover__arrow-positioner",children:Vt.jsx(Vx.div,at(at({className:mn("chakra-popover__arrow",e.className)},u(l)),{},{__css:at({"--popper-arrow-shadow-color":PT("colors",s),"--popper-arrow-bg":PT("colors",p),"--popper-arrow-shadow":PT("shadows",f)},d.arrow)}))}))}jT.displayName="PopoverArrow";const TT=it("E",Ux((function(e,t){const{getBodyProps:n}=gT(),r=yT();return Vt.jsx(Vx.div,at(at({},n(e,t)),{},{className:mn("chakra-popover__body",e.className),__css:r.body}))})));TT.displayName="PopoverBody";const AT=it("z",Ux((function(e,t){const{onClose:n}=gT(),r=yT();return Vt.jsx(vw,at({size:"sm",onClick:n,className:mn("chakra-popover__close-btn",e.className),__css:r.closeButton,ref:t},e))})));function OT(e){if(e)return{enter:at(at({},e.enter),{},{visibility:"visible"}),exit:at(at({},e.exit),{},{transitionEnd:{visibility:"hidden"}})}}AT.displayName="PopoverCloseButton";const RT={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},MT=Vx(vx.section),NT=Ux((function(e,t){const{variants:n=RT}=e,r=ot(e,Be),{isOpen:o}=gT();return Vt.jsx(MT,at({ref:t,variants:OT(n),initial:!1,animate:o?"enter":"exit"},r))}));NT.displayName="PopoverTransition";const IT=it("m",Ux((function(e,t){const{rootProps:n,motionProps:r}=e,o=ot(e,Fe),{getPopoverProps:i,getPopoverPositionerProps:a,onAnimationComplete:s}=gT(),l=yT(),c=at({position:"relative",display:"flex",flexDirection:"column"},l.content);return Vt.jsx(Vx.div,at(at({},a(n)),{},{__css:l.popper,className:"chakra-popover__popper",children:Vt.jsx(NT,at(at(at({},r),i(o,t)),{},{onAnimationComplete:un(s,o.onAnimationComplete),className:mn("chakra-popover__content",e.className),__css:c}))}))})));IT.displayName="PopoverContent";const DT=it("A",Ux((function(e,t){const{getHeaderProps:n}=gT(),r=yT();return Vt.jsx(Vx.header,at(at({},n(e,t)),{},{className:mn("chakra-popover__header",e.className),__css:r.header}))})));function zT(e){const t=ct.Children.only(e.children),{getTriggerProps:n}=gT();return Vt.jsx(Vt.Fragment,{children:ct.cloneElement(t,n(t.props,_T(t)))})}DT.displayName="PopoverHeader",zT.displayName="PopoverTrigger";const BT=Ux((function(e,t){const{children:n,placeholder:r,className:o}=e,i=ot(e,Le);return Vt.jsxs(Vx.select,at(at({},i),{},{ref:t,className:mn("chakra-select",o),children:[r&&Vt.jsx("option",{value:"",children:r}),n]}))}));BT.displayName="SelectField";const FT=it("a1",Ux(((e,t)=>{var n;const r=ew("Select",e),o=Go(e),{rootProps:i,placeholder:a,icon:s,color:l,height:c,h:u,minH:d,minHeight:p,iconColor:f,iconSize:h}=o,m=ot(o,$e),[v,g]=function(e,t){const n={},r={};for(const[o,i]of Object.entries(e))t.includes(o)?n[o]=i:r[o]=i;return[n,r]}(m,Bo),b=eS(g),y={width:"100%",height:"fit-content",position:"relative",color:l},x=at(at({paddingEnd:"2rem"},r.field),{},{_focus:at({zIndex:"unset"},null===(n=r.field)||void 0===n?void 0:n._focus)});return Vt.jsxs(Vx.div,at(at(at({className:"chakra-select__wrapper",__css:y},v),i),{},{children:[Vt.jsx(BT,at(at({ref:t,height:null!=u?u:c,minH:null!=d?d:p,placeholder:a},b),{},{__css:x,children:e.children})),Vt.jsx(VT,at(at(at({"data-disabled":Zt(b.disabled)},(f||l)&&{color:f||l}),{},{__css:r.icon},h&&{fontSize:h}),{},{children:s}))]}))})));FT.displayName="Select";const LT=e=>Vt.jsx("svg",at(at({viewBox:"0 0 24 24"},e),{},{children:Vt.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})),$T=Vx("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),VT=e=>{const{children:t=Vt.jsx(LT,{})}=e,n=ot(e,Ve),r=ct.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return Vt.jsx($T,at(at({},n),{},{className:"chakra-select__icon-wrapper",children:ct.isValidElement(t)?r:null}))};function WT(e){const{orientation:t,vertical:n,horizontal:r}=e;return"vertical"===t?n:r}function HT(e){var t;const{min:n=0,max:r=100,onChange:o,value:i,defaultValue:a,isReversed:s,direction:l="ltr",orientation:c="horizontal",id:u,isDisabled:d,isReadOnly:p,onChangeStart:f,onChangeEnd:h,step:m=1,getAriaValueText:v,"aria-valuetext":g,"aria-label":b,"aria-labelledby":y,name:x,focusThumbOnChange:w=!0}=e,k=ot(e,We),S=Ln(f),C=Ln(h),_=Ln(v),E=function(e){const{isReversed:t,direction:n,orientation:r}=e;return"ltr"===n||"vertical"===r?t:!t}({isReversed:s,direction:l,orientation:c}),[P,j]=Wn({value:i,defaultValue:null!=a?a:UT(n,r),onChange:o}),[T,A]=ct.useState(!1),[O,R]=ct.useState(!1),M=!(d||p),N=(r-n)/10,I=m||(r-n)/100,D=jn(P,n,r),z=En(E?r-D+n:D,n,r),B="vertical"===c,F=rr({min:n,max:r,step:m,isDisabled:d,value:D,isInteractive:M,isReversed:E,isVertical:B,eventSource:null,focusThumbOnChange:w,orientation:c}),L=ct.useRef(null),$=ct.useRef(null),V=ct.useRef(null),W=ct.useId(),H=null!=u?u:W,[U,q]=[`slider-thumb-${H}`,`slider-track-${H}`],Y=ct.useCallback((e=>{var t,n;if(!L.current)return;const r=F.current;r.eventSource="pointer";const o=L.current.getBoundingClientRect(),{clientX:i,clientY:a}=null!==(t=null===(n=e.touches)||void 0===n?void 0:n[0])&&void 0!==t?t:e;let s=(B?o.bottom-a:i-o.left)/(B?o.height:o.width);E&&(s=1-s);let l=function(e,t,n){return(n-t)*e+t}(s,r.min,r.max);return r.step&&(l=parseFloat(Pn(l,r.min,r.step))),l=jn(l,r.min,r.max),l}),[B,E,F]),X=ct.useCallback((e=>{const t=F.current;t.isInteractive&&(e=jn(e=parseFloat(Pn(e,t.min,I)),t.min,t.max),j(e))}),[I,j,F]),G=ct.useMemo((()=>({stepUp(e=I){X(E?D-e:D+e)},stepDown(e=I){X(E?D+e:D-e)},reset(){X(a||0)},stepTo(e){X(e)}})),[X,E,D,I,a]),K=ct.useCallback((e=>{const t=F.current,n={ArrowRight:()=>G.stepUp(),ArrowUp:()=>G.stepUp(),ArrowLeft:()=>G.stepDown(),ArrowDown:()=>G.stepDown(),PageUp:()=>G.stepUp(N),PageDown:()=>G.stepDown(N),Home:()=>X(t.min),End:()=>X(t.max)}[e.key];n&&(e.preventDefault(),e.stopPropagation(),n(e),t.eventSource="keyboard")}),[G,X,N,F]),Z=null!==(t=null==_?void 0:_(D))&&void 0!==t?t:g,{getThumbStyle:J,rootStyle:Q,trackStyle:ee,innerTrackStyle:te}=ct.useMemo((()=>{const e=F.current;return function(e){const{orientation:t,thumbPercents:n,isReversed:r}=e,o=at({position:"absolute"},WT({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})),i=1===n.length,a=[0,r?100-n[0]:n[0]],s=i?a:n;let l=s[0];!i&&r&&(l=100-l);const c=Math.abs(s[s.length-1]-s[0]);return{trackStyle:o,innerTrackStyle:at(at({},o),WT({orientation:t,vertical:r?{height:`${c}%`,top:`${l}%`}:{height:`${c}%`,bottom:`${l}%`},horizontal:r?{width:`${c}%`,right:`${l}%`}:{width:`${c}%`,left:`${l}%`}})),rootStyle:{position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0},getThumbStyle:e=>at({position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none"},WT({orientation:t,vertical:{bottom:`calc(${n[e]}% - var(--slider-thumb-size) / 2)`},horizontal:{left:`calc(${n[e]}% - var(--slider-thumb-size) / 2)`}}))}}({isReversed:E,orientation:e.orientation,thumbPercents:[z]})}),[E,z,F]),ne=ct.useCallback((()=>{F.current.focusThumbOnChange&&setTimeout((()=>{var e;return null===(e=$.current)||void 0===e?void 0:e.focus()}))}),[F]);function re(e){const t=Y(e);null!=t&&t!==F.current.value&&j(t)}Gn((()=>{const e=F.current;ne(),"keyboard"===e.eventSource&&(null==C||C(e.value))}),[D,C]),function(e,t){const{onPan:n,onPanStart:r,onPanEnd:o,onPanSessionStart:i,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||o||i||a),c=ct.useRef(null),u=rr({onSessionStart:i,onSessionEnd:a,onStart:r,onMove:n,onEnd(e,t){c.current=null,null==o||o(e,t)}});ct.useEffect((()=>{var e;null===(e=c.current)||void 0===e||e.updateHandlers(u.current)})),ct.useEffect((()=>{const t=e.current;if(t&&l)return Kt(t,"pointerdown",(function(e){c.current=new Er(e,u.current,s)}))}),[e,l,u,s]),ct.useEffect((()=>()=>{var e;null===(e=c.current)||void 0===e||e.end(),c.current=null}),[])}(V,{onPanSessionStart(e){const t=F.current;t.isInteractive&&(A(!0),ne(),re(e),null==S||S(t.value))},onPanSessionEnd(){const e=F.current;e.isInteractive&&(A(!1),null==C||C(e.value))},onPan(e){F.current.isInteractive&&re(e)}});const oe=ct.useCallback(((e={},t=null)=>at(at(at({},e),k),{},{ref:or(t,V),tabIndex:-1,"aria-disabled":Jt(d),"data-focused":Zt(O),style:at(at({},e.style),Q)})),[k,d,O,Q]),ie=ct.useCallback(((e={},t=null)=>at(at({},e),{},{ref:or(t,L),id:q,"data-disabled":Zt(d),style:at(at({},e.style),ee)})),[d,q,ee]),ae=ct.useCallback(((e={},t=null)=>at(at({},e),{},{ref:t,style:at(at({},e.style),te)})),[te]),se=ct.useCallback(((e={},t=null)=>at(at({},e),{},{ref:or(t,$),role:"slider",tabIndex:M?0:void 0,id:U,"data-active":Zt(T),"aria-valuetext":Z,"aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":D,"aria-orientation":c,"aria-disabled":Jt(d),"aria-readonly":Jt(p),"aria-label":b,"aria-labelledby":b?void 0:y,style:at(at({},e.style),J(0)),onKeyDown:dn(e.onKeyDown,K),onFocus:dn(e.onFocus,(()=>R(!0))),onBlur:dn(e.onBlur,(()=>R(!1)))})),[M,U,T,Z,n,r,D,c,d,p,b,y,J,K]),le=ct.useCallback(((e,t=null)=>{const o=!(e.valuer),i=D>=e.value,a=En(e.value,n,r),s=at({position:"absolute",pointerEvents:"none"},function(e){const{orientation:t,vertical:n,horizontal:r}=e;return"vertical"===t?n:r}({orientation:c,vertical:{bottom:E?100-a+"%":`${a}%`},horizontal:{left:E?100-a+"%":`${a}%`}}));return at(at({},e),{},{ref:t,role:"presentation","aria-hidden":!0,"data-disabled":Zt(d),"data-invalid":Zt(!o),"data-highlighted":Zt(i),style:at(at({},e.style),s)})}),[d,E,r,n,c,D]),ce=ct.useCallback(((e={},t=null)=>at(at({},e),{},{ref:t,type:"hidden",value:D,name:x})),[x,D]);return{state:{value:D,isFocused:O,isDragging:T},actions:G,getRootProps:oe,getTrackProps:ie,getInnerTrackProps:ae,getThumbProps:se,getMarkerProps:le,getInputProps:ce}}function UT(e,t){return t"}),[XT,GT]=hn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),KT=it("a3",Ux(((e,t)=>{var n;const r=at(at({},e),{},{orientation:null!==(n=null==e?void 0:e.orientation)&&void 0!==n?n:"horizontal"}),o=ew("Slider",r),i=Go(r),{direction:a}=Kx();i.direction=a;const s=HT(i),{getInputProps:l,getRootProps:c}=s,u=ot(s,He),d=c(),p=l({},t);return Vt.jsx(qT,{value:u,children:Vt.jsx(XT,{value:o,children:Vt.jsxs(Vx.div,at(at({},d),{},{className:mn("chakra-slider",r.className),__css:o.container,children:[r.children,Vt.jsx("input",at({},p))]}))})})})));KT.displayName="Slider";const ZT=it("a6",Ux(((e,t)=>{const{getThumbProps:n}=YT(),r=GT(),o=n(e,t);return Vt.jsx(Vx.div,at(at({},o),{},{className:mn("chakra-slider__thumb",e.className),__css:r.thumb}))})));ZT.displayName="SliderThumb";const JT=it("a4",Ux(((e,t)=>{const{getTrackProps:n}=YT(),r=GT(),o=n(e,t);return Vt.jsx(Vx.div,at(at({},o),{},{className:mn("chakra-slider__track",e.className),__css:r.track}))})));JT.displayName="SliderTrack";const QT=it("a5",Ux(((e,t)=>{const{getInnerTrackProps:n}=YT(),r=GT(),o=n(e,t);return Vt.jsx(Vx.div,at(at({},o),{},{className:mn("chakra-slider__filled-track",e.className),__css:r.filledTrack}))})));QT.displayName="SliderFilledTrack";const eA=Ux(((e,t)=>{const{getMarkerProps:n}=YT(),r=GT(),o=n(e,t);return Vt.jsx(Vx.div,at(at({},o),{},{className:mn("chakra-slider__marker",e.className),__css:r.mark}))}));eA.displayName="SliderMark";it("aM",Vx("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}})).displayName="Spacer";const tA=e=>Vt.jsx(Vx.div,at(at({className:"chakra-stack__item"},e),{},{__css:at({display:"inline-block",flex:"0 0 auto",minWidth:0},e.__css)}));tA.displayName="StackItem";const nA=it("am",Ux(((e,t)=>{const{isInline:n,direction:r,align:o,justify:i,spacing:a="0.5rem",wrap:s,children:l,divider:c,className:u,shouldWrapChildren:d}=e,p=ot(e,Ue),f=n?"row":null!=r?r:"column",h=ct.useMemo((()=>function(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":(o=n,i=e=>r[e],Array.isArray(o)?o.map((e=>null===e?null:i(e))):en(o)?Object.keys(o).reduce(((e,t)=>(e[t]=i(o[t]),e)),{}):null!=o?i(o):null)};var o,i}({spacing:a,direction:f})),[a,f]),m=!!c,v=!d&&!m,g=ct.useMemo((()=>{const e=pn(l);return v?e:e.map(((t,n)=>{const r=void 0!==t.key?t.key:n,o=n+1===e.length,i=d?Vt.jsx(tA,{children:t},r):t;if(!m)return i;const a=ct.cloneElement(c,{__css:h}),s=o?null:a;return Vt.jsxs(ct.Fragment,{children:[i,s]},r)}))}),[c,h,m,v,d,l]),b=mn("chakra-stack",u);return Vt.jsx(Vx.div,at(at({ref:t,display:"flex",alignItems:o,justifyContent:i,flexDirection:f,flexWrap:s,gap:m?void 0:a,className:b},p),{},{children:g}))})));nA.displayName="Stack";it("av",Ux(((e,t)=>Vt.jsx(nA,at(at({align:"center"},e),{},{direction:"row",ref:t}))))).displayName="HStack";it("aF",(e=>Vt.jsx(Vx.div,at(at({className:"chakra-stack__divider"},e),{},{__css:at(at({},e.__css),{},{borderWidth:0,alignSelf:"stretch",borderColor:"inherit",width:"auto",height:"auto"})})))).displayName="StackDivider";it("ak",Ux(((e,t)=>Vt.jsx(nA,at(at({align:"center"},e),{},{direction:"column",ref:t}))))).displayName="VStack";const rA=it("a7",Ux((function(e,t){const n=ew("Switch",e),r=Go(e),{spacing:o="0.5rem",children:i}=r,a=ot(r,qe),{getIndicatorProps:s,getInputProps:l,getCheckboxProps:c,getRootProps:u,getLabelProps:d}=rS(a),p=ct.useMemo((()=>at({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0},n.container)),[n.container]),f=ct.useMemo((()=>at({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer"},n.track)),[n.track]),h=ct.useMemo((()=>at({userSelect:"none",marginStart:o},n.label)),[o,n.label]);return Vt.jsxs(Vx.label,at(at({},u()),{},{className:mn("chakra-switch",e.className),__css:p,children:[Vt.jsx("input",at({className:"chakra-switch__input"},l({},t))),Vt.jsx(Vx.span,at(at({},c()),{},{className:"chakra-switch__track",__css:f,children:Vt.jsx(Vx.span,at({__css:n.thumb,className:"chakra-switch__thumb"},s()))})),i&&Vt.jsx(Vx.span,at(at({className:"chakra-switch__label"},d()),{},{__css:h,children:i}))]}))})));rA.displayName="Switch";const[oA,iA]=hn({name:"TableStylesContext",errorMessage:"useTableStyles returned is 'undefined'. Seems you forgot to wrap the components in \"
\" "}),aA=it("ay",Ux(((e,t)=>{const n=ew("Table",e),r=Go(e),{className:o,layout:i}=r,a=ot(r,Ye);return Vt.jsx(oA,{value:n,children:Vt.jsx(Vx.table,at({ref:t,__css:at({tableLayout:i},n.table),className:mn("chakra-table",o)},a))})})));aA.displayName="Table";it("aC",Ux(((e,t)=>{const n=iA();return Vt.jsx(Vx.tbody,at(at({},e),{},{ref:t,__css:n.tbody}))}))),it("aD",Ux(((e,t)=>{let{isNumeric:n}=e,r=ot(e,Xe);const o=iA();return Vt.jsx(Vx.td,at(at({},r),{},{ref:t,__css:o.td,"data-is-numeric":n}))}))),it("aB",Ux(((e,t)=>{let{isNumeric:n}=e,r=ot(e,Ge);const o=iA();return Vt.jsx(Vx.th,at(at({},r),{},{ref:t,__css:o.th,"data-is-numeric":n}))}))),it("az",Ux(((e,t)=>{const n=iA();return Vt.jsx(Vx.thead,at(at({},e),{},{ref:t,__css:n.thead}))}))),it("aA",Ux(((e,t)=>{const n=iA();return Vt.jsx(Vx.tr,at(at({},e),{},{ref:t,__css:n.tr}))})));const[sA,lA]=hn({name:"TagStylesContext",errorMessage:"useTagStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),cA=it("T",Ux(((e,t)=>{const n=ew("Tag",e),r=Go(e),o=at({display:"inline-flex",verticalAlign:"top",alignItems:"center",maxWidth:"100%"},n.container);return Vt.jsx(sA,{value:n,children:Vt.jsx(Vx.span,at(at({ref:t},r),{},{__css:o}))})})));cA.displayName="Tag";const uA=it("b",Ux(((e,t)=>{const n=lA();return Vt.jsx(Vx.span,at(at({ref:t,noOfLines:1},e),{},{__css:n.label}))})));uA.displayName="TagLabel";Ux(((e,t)=>Vt.jsx(nw,at({ref:t,verticalAlign:"top",marginEnd:"0.5rem"},e)))).displayName="TagLeftIcon";Ux(((e,t)=>Vt.jsx(nw,at({ref:t,verticalAlign:"top",marginStart:"0.5rem"},e)))).displayName="TagRightIcon";const dA=e=>Vt.jsx(nw,at(at({verticalAlign:"inherit",viewBox:"0 0 512 512"},e),{},{children:Vt.jsx("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})}));dA.displayName="TagCloseIcon";it("d",Ux(((e,t)=>{const{isDisabled:n,children:r}=e,o=ot(e,Ke),i=at({display:"flex",alignItems:"center",justifyContent:"center",outline:"0"},lA().closeButton);return Vt.jsx(Vx.button,at(at({ref:t,"aria-label":"close"},o),{},{type:"button",disabled:n,__css:i,children:r||Vt.jsx(dA,{})}))}))).displayName="TagCloseButton";const pA=["h","minH","height","minHeight"],fA=it("v",Ux(((e,t)=>{const n=Qx("Textarea",e),r=Go(e),{className:o,rows:i}=r,a=eS(ot(r,Ze)),s=i?Tn(n,pA):n;return Vt.jsx(Vx.textarea,at(at({ref:t,rows:i},a),{},{className:mn("chakra-textarea",o),__css:s}))})));function hA(e,t){var n;const r=null!=e?e:"bottom",o={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[r];return null!==(n=null==o?void 0:o[t])&&void 0!==n?n:r}fA.displayName="Textarea";const mA={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}},vA=e=>{var t;return(null===(t=e.current)||void 0===t?void 0:t.ownerDocument)||document},gA=e=>{var t;return(null===(t=e.current)||void 0===t||null===(t=t.ownerDocument)||void 0===t?void 0:t.defaultView)||window};function bA(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:o,closeOnScroll:i,closeOnPointerDown:a=o,closeOnEsc:s=!0,onOpen:l,onClose:c,placement:u,id:d,isOpen:p,defaultIsOpen:f,arrowSize:h=10,arrowShadowColor:m,arrowPadding:v,modifiers:g,isDisabled:b,gutter:y,offset:x,direction:w}=e,k=ot(e,Je),{isOpen:S,onOpen:C,onClose:_}=Yn({isOpen:p,defaultIsOpen:f,onOpen:l,onClose:c}),{referenceRef:E,getPopperProps:P,getArrowInnerProps:j,getArrowProps:T}=pP({enabled:S,placement:u,arrowPadding:v,modifiers:g,gutter:y,offset:x,direction:w}),A=ct.useId(),O=`tooltip-${null!=d?d:A}`,R=ct.useRef(null),M=ct.useRef(),N=ct.useCallback((()=>{M.current&&(clearTimeout(M.current),M.current=void 0)}),[]),I=ct.useRef(),D=ct.useCallback((()=>{I.current&&(clearTimeout(I.current),I.current=void 0)}),[]),z=ct.useCallback((()=>{D(),_()}),[_,D]),B=function(e,t){return ct.useEffect((()=>{const n=vA(e);return n.addEventListener(yA,t),()=>n.removeEventListener(yA,t)}),[t,e]),()=>{const t=vA(e),n=gA(e);t.dispatchEvent(new n.CustomEvent(yA))}}(R,z),F=ct.useCallback((()=>{if(!b&&!M.current){S&&B();const e=gA(R);M.current=e.setTimeout(C,t)}}),[B,b,S,C,t]),L=ct.useCallback((()=>{N();const e=gA(R);I.current=e.setTimeout(z,n)}),[n,z,N]),$=ct.useCallback((()=>{S&&r&&L()}),[r,L,S]),V=ct.useCallback((()=>{S&&a&&L()}),[a,L,S]),W=ct.useCallback((e=>{S&&"Escape"===e.key&&L()}),[S,L]);$n((()=>vA(R)),"keydown",s?W:void 0),$n((()=>{if(!i)return null;const e=R.current;if(!e)return null;const t=Mn(e);return"body"===t.localName?gA(R):t}),"scroll",(()=>{S&&i&&z()}),{passive:!0,capture:!0}),ct.useEffect((()=>{b&&(N(),S&&_())}),[b,S,_,N]),ct.useEffect((()=>()=>{N(),D()}),[N,D]),$n((()=>R.current),"pointerleave",L);const H=ct.useCallback(((e={},t=null)=>at(at({},e),{},{ref:or(R,t,E),onPointerEnter:dn(e.onPointerEnter,(e=>{"touch"!==e.pointerType&&F()})),onClick:dn(e.onClick,$),onPointerDown:dn(e.onPointerDown,V),onFocus:dn(e.onFocus,F),onBlur:dn(e.onBlur,L),"aria-describedby":S?O:void 0})),[F,L,V,S,O,$,E]),U=ct.useCallback(((e={},t=null)=>P(at(at({},e),{},{style:at(at({},e.style),{},{[JE.arrowSize.var]:h?`${h}px`:void 0,[JE.arrowShadowColor.var]:m})}),t)),[P,h,m]),q=ct.useCallback(((e={},t=null)=>{const n=at(at({},e.style),{},{position:"relative",transformOrigin:JE.transformOrigin.varRef});return at(at(at({ref:t},k),e),{},{id:O,role:"tooltip",style:n})}),[k,O]);return{isOpen:S,show:F,hide:L,getTriggerProps:H,getTooltipProps:q,getTooltipPositionerProps:U,getArrowProps:T,getArrowInnerProps:j}}const yA="chakra-ui:close-tooltip";const xA=Vx(vx.div),wA=it("ax",Ux(((e,t)=>{var n,r;const o=Qx("Tooltip",e),i=Go(e),a=Kx(),{children:s,label:l,shouldWrapChildren:c,"aria-label":u,hasArrow:d,bg:p,portalProps:f,background:h,backgroundColor:m,bgColor:v,motionProps:g,animatePresenceProps:b}=i,y=ot(i,Qe),x=null!==(n=null!==(r=null!=h?h:m)&&void 0!==r?r:p)&&void 0!==n?n:v;if(x){o.bg=x;const e=function(e,t,n){var r,o;return null!==(r=null===(o=e.__cssMap)||void 0===o||null===(o=o[`${t}.${n}`])||void 0===o?void 0:o.varRef)&&void 0!==r?r:n}(a,"colors",x);o[JE.arrowBg.var]=e}const w=bA(at(at({},y),{},{direction:a.direction}));let k;if(!ct.isValidElement(s)||c)k=Vt.jsx(Vx.span,at(at({display:"inline-block",tabIndex:0},w.getTriggerProps()),{},{children:s}));else{const e=ct.Children.only(s);k=ct.cloneElement(e,w.getTriggerProps(e.props,_T(e)))}const S=!!u,C=w.getTooltipProps({},t),_=S?Tn(C,["role","id"]):C,E=An(C,["role","id"]);return l?Vt.jsxs(Vt.Fragment,{children:[k,Vt.jsx(Sx,at(at({},b),{},{children:w.isOpen&&Vt.jsx(Pw,at(at({},f),{},{children:Vt.jsx(Vx.div,at(at({},w.getTooltipPositionerProps()),{},{__css:{zIndex:o.zIndex,pointerEvents:"none"},children:Vt.jsxs(xA,at(at(at({variants:mA,initial:"exit",animate:"enter",exit:"exit"},g),_),{},{__css:o,children:[l,S&&Vt.jsx(Vx.span,at(at({srOnly:!0},E),{},{children:u})),d&&Vt.jsx(Vx.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:Vt.jsx(Vx.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:o.bg}})})]}))}))}))}))]}):Vt.jsx(Vt.Fragment,{children:s})})));wA.displayName="Tooltip";const kA=it("aj",Ux((function(e,t){const n=Qx("Heading",e),r=Go(e),{className:o}=r,i=ot(r,et);return Vt.jsx(Vx.h2,at(at({ref:t,className:mn("chakra-heading",e.className)},i),{},{__css:n}))})));kA.displayName="Heading";const SA=it("N",Ux((function(e,t){const n=Qx("Text",e),r=Go(e),{className:o,align:i,decoration:a,casing:s}=r,l=ot(r,tt),c=fn({textAlign:e.align,textDecoration:e.decoration,textTransform:e.casing});return Vt.jsx(Vx.p,at(at(at({ref:t,className:mn("chakra-text",e.className)},c),l),{},{__css:n}))})));SA.displayName="Text";const CA=it("k",Ux((function(e,t){const{spacing:n="0.5rem",spacingX:r,spacingY:o,children:i,justify:a,direction:s,align:l,className:c,shouldWrapChildren:u}=e,d=ot(e,nt),p=ct.useMemo((()=>u?ct.Children.map(i,((e,t)=>Vt.jsx(_A,{children:e},t))):i),[i,u]);return Vt.jsx(Vx.div,at(at({ref:t,className:mn("chakra-wrap",c)},d),{},{children:Vt.jsx(Vx.ul,{className:"chakra-wrap__list",__css:{display:"flex",flexWrap:"wrap",justifyContent:a,alignItems:l,flexDirection:s,listStyleType:"none",gap:n,columnGap:r,rowGap:o,padding:"0"},children:p})}))})));CA.displayName="Wrap";const _A=it("W",Ux((function(e,t){const{className:n}=e,r=ot(e,rt);return Vt.jsx(Vx.li,at({ref:t,__css:{display:"flex",alignItems:"flex-start"},className:mn("chakra-wrap__listitem",n)},r))})));_A.displayName="WrapItem";var EA={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},PA=it("aL",ft.createContext&&ft.createContext(EA)),jA=["attr","size","title"];function TA(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function AA(){return AA=Object.assign?Object.assign.bind():function(e){for(var t=1;tft.createElement(e.tag,RA({key:t},e.attr),NA(e.child))))}function IA(e){var t=t=>{var n,{attr:r,size:o,title:i}=e,a=TA(e,jA),s=o||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),ft.createElement("svg",AA({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,a,{className:n,style:RA(RA({color:e.color||t.color},t.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),i&&ft.createElement("title",null,i),e.children)};return void 0!==PA?ft.createElement(PA.Consumer,null,(e=>t(e))):t(EA)}}}}))}(); diff --git a/assets/chakra-legacy-DsJcG_7N.js b/assets/chakra-legacy-DsJcG_7N.js deleted file mode 100644 index 71f4be16..00000000 --- a/assets/chakra-legacy-DsJcG_7N.js +++ /dev/null @@ -1,280 +0,0 @@ -!function(){let e,t,r=e=>e;System.register(["./react-legacy-S3BmMPiz.js"],(function(n,o){"use strict";var i,a,s,l,c,u;return{setters:[e=>{i=e.r,a=e.R,s=e.a,l=e.g,c=e.c,u=e.b}],execute:function(){n({A:function(e){return Nu(e)?function(e){return Nu(e)&&0===e.length}(e):Du(e)?function(e){return Du(e)&&0===Object.keys(e).length}(e):null==e||""===e},E:Du,G:function(e,t){const r={};return t.forEach((t=>{t in e&&(r[t]=e[t])})),r},H:function(e){return void 0!==e&&void 0!==e},M:Mu,P:Nt,R:VP,V:KP,_:function(e){const{leastDestructiveRef:t,...r}=e;return y.jsx(N_,{...r,initialFocusRef:t})},a:function(e){const{ref:t,handler:r,enabled:n=!0}=e,o=kS(r),a=i.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;i.useEffect((()=>{if(!n)return;const e=e=>{SS(e,t)&&(a.isPointerDown=!0)},i=e=>{a.ignoreEmulatedMouseEvents?a.ignoreEmulatedMouseEvents=!1:a.isPointerDown&&r&&SS(e,t)&&(a.isPointerDown=!1,o(e))},s=e=>{a.ignoreEmulatedMouseEvents=!0,r&&a.isPointerDown&&SS(e,t)&&(a.isPointerDown=!1,o(e))},l=Au(t.current);return l.addEventListener("mousedown",e,!0),l.addEventListener("mouseup",i,!0),l.addEventListener("touchstart",e,!0),l.addEventListener("touchend",s,!0),()=>{l.removeEventListener("mousedown",e,!0),l.removeEventListener("mouseup",i,!0),l.removeEventListener("touchstart",e,!0),l.removeEventListener("touchend",s,!0)}}),[r,t,o,a,n])},a6:function(e,t){const{colorMode:r}=Bt();return"dark"===r?t:e},a9:py,aL:function(e){const{theme:t}=Ut(),r=ky();return i.useMemo((()=>function(e,t){const r=r=>{var n;return{...t,...r,position:ey(null!=(n=null==r?void 0:r.position)?n:null==t?void 0:t.position,e)}},n=e=>{const t=r(e),n=xy(t);return gy.notify(n,t)};return n.update=(e,t)=>{gy.update(e,r(t))},n.promise=(e,t)=>{const r=n({...t.loading,status:"loading",duration:null});e.then((e=>n.update(r,{status:"success",duration:5e3,...Gt(t.success,e)}))).catch((e=>n.update(r,{status:"error",duration:5e3,...Gt(t.error,e)})))},n.closeAll=gy.closeAll,n.close=gy.close,n.isActive=gy.isActive,n}(t.direction,{...r,...e})),[e,t.direction,r])},aY:Zy,aq:Bt,ar:Dt,as:function(e){return t=>u.createElement(yT,hT({attr:vT({},e.attr)},t),bT(e.child))},b:Ad,d:XP,e:function(...e){return i.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{e&&function(e,t){if(null==e)return;if("function"==typeof e)return void e(t);try{e.current=t}catch(r){throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}(e,t)}))}),e)},f:Pd,i:function(e){return void 0===e||void 0===e},l:ud,o:Ru,p:YP,r:zu,s:function(e={}){const{onClose:t,onOpen:r,isOpen:n,id:o}=e,a=kS(r),s=kS(t),[l,c]=i.useState(e.defaultIsOpen||!1),[u,d]=function(e,t){const r=void 0!==e,n=r&&void 0!==e?e:t;return[r,n]}(n,l),p=function(e,t){const r=i.useId();return i.useMemo((()=>e||[t,r].filter(Boolean).join("-")),[e,t,r])}(o,"disclosure"),f=i.useCallback((()=>{u||c(!1),null==s||s()}),[u,s]),h=i.useCallback((()=>{u||c(!0),null==a||a()}),[u,a]),m=i.useCallback((()=>{(d?f:h)()}),[d,h,f]);return{isOpen:!!d,onOpen:h,onClose:f,onToggle:m,isControlled:u,getButtonProps:(e={})=>({...e,"aria-expanded":d,"aria-controls":p,onClick:Bu(e.onClick,m)}),getDisclosureProps:(e={})=>({...e,hidden:!d,id:p})}},t:function(e){const{value:t,defaultValue:r,onChange:n,shouldUpdate:o=((e,t)=>e!==t)}=e,a=kS(n),s=kS(o),[l,c]=i.useState(r),u=void 0!==t,d=u?t:l,p=i.useCallback((e=>{const t=zu(e,d);s(d,t)&&(u||c(t),a(t))}),[u,a,d,s]);return[d,p]},u:cd,v:function(e,t,r=!0){const n=ed(e,t.length,1,r);return t[n]},w:function(e,t,r=!0){const n=function(e,t,r=!0){return ed(e,t,-1,r)}(e,t.length,r);return t[n]},x:function(e){return null!=e&&e.length?e[0]:void 0},y:function(e){const t=null==e?0:e.length;return t?e[t-1]:void 0}});var o={exports:{}},d={},p=i,f=Symbol.for("react.element"),h=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,v=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,g={key:!0,ref:!0,__self:!0,__source:!0};function b(e,t,r){var n,o={},i=null,a=null;for(n in void 0!==r&&(i=""+r),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(a=t.ref),t)m.call(t,n)&&!g.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===o[n]&&(o[n]=t[n]);return{$$typeof:f,type:e,key:i,ref:a,props:o,_owner:v.current}}d.Fragment=h,d.jsx=b,d.jsxs=b,o.exports=d;var y=n("j",o.exports);var x=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?I(H,--V):0,L--,10===W&&(L=1,F--),W}function Y(){return W=V<$?I(H,V++):0,L++,10===W&&(L=1,F++),W}function G(){return I(H,V)}function K(){return V}function Z(e,t){return N(H,e,t)}function Q(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 J(e){return F=L=1,$=D(H=e),V=0,[]}function ee(e){return H="",e}function te(e){return R(Z(V-1,oe(91===e?e+2:40===e?e+1:e)))}function re(e){for(;(W=G())&&W<33;)Y();return Q(e)>2||Q(W)>3?"":" "}function ne(e,t){for(;--t&&Y()&&!(W<48||W>102||W>57&&W<65||W>70&&W<97););return Z(e,K()+(t<6&&32==G()&&32==Y()))}function oe(e){for(;Y();)switch(W){case e:return V;case 34:case 39:34!==e&&39!==e&&oe(W);break;case 40:41===e&&oe(e);break;case 92:Y()}return V}function ie(e,t){for(;Y()&&e+W!==57&&(e+W!==84||47!==G()););return"/*"+Z(t,V-1)+"*"+T(47===e?e:Y())}function ae(e){for(;!Q(G());)Y();return Z(e,V)}function se(e){return ee(le("",null,null,null,[""],e=J(e),0,[0],e))}function le(e,t,r,n,o,i,a,s,l){for(var c=0,u=0,d=a,p=0,f=0,h=0,m=1,v=1,g=1,b=0,y="",x=o,w=i,k=n,S=y;v;)switch(h=b,b=Y()){case 40:if(108!=h&&58==I(S,d-1)){-1!=M(S+=O(te(b),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:S+=te(b);break;case 9:case 10:case 13:case 32:S+=re(h);break;case 92:S+=ne(K()-1,7);continue;case 47:switch(G()){case 42:case 47:B(ue(ie(Y(),K()),t,r),l);break;default:S+="/"}break;case 123*m:s[c++]=D(S)*g;case 125*m:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+u:-1==g&&(S=O(S,/\f/g,"")),f>0&&D(S)-d&&B(f>32?de(S+";",n,r,d-1):de(O(S," ","")+";",n,r,d-2),l);break;case 59:S+=";";default:if(B(k=ce(S,t,r,c,u,o,s,y,x=[],w=[],d),i),123===b)if(0===u)le(S,t,k,k,x,i,d,s,w);else switch(99===p&&110===I(S,3)?100:p){case 100:case 108:case 109:case 115:le(e,k,k,n&&B(ce(e,k,k,0,0,o,s,y,o,x=[],d),w),o,w,d,s,n?x:w);break;default:le(S,k,k,k,[""],w,0,s,w)}}c=u=f=0,m=g=1,y=S="",d=a;break;case 58:d=1+D(S),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==X())continue;switch(S+=T(b),b*m){case 38:g=u>0?1:(S+="\f",-1);break;case 44:s[c++]=(D(S)-1)*g,g=1;break;case 64:45===G()&&(S+=te(Y())),p=G(),u=d=D(y=S+=ae(K())),b++;break;case 45:45===h&&2==D(S)&&(m=0)}}return i}function ce(e,t,r,n,o,i,a,s,l,c,u){for(var d=o-1,p=0===o?i:[""],f=z(p),h=0,m=0,v=0;h0?p[g]+" "+b:O(b,/&\f/g,p[g])))&&(l[v++]=y);return U(e,t,r,0===o?E:s,l,c,u)}function ue(e,t,r){return U(e,t,r,C,T(W),N(e,2,-2),0)}function de(e,t,r,n){return U(e,t,r,_,N(e,0,n),N(e,n+1,-1),n)}function pe(e,t){for(var r="",n=z(e),o=0;o6)switch(I(e,t+1)){case 109:if(45!==I(e,t+4))break;case 102:return O(e,/(.+:)(.+)-([^]+)/,"$1"+S+"$2-$3$1"+k+(108==I(e,t+3)?"$3":"$2-$3"))+e;case 115:return~M(e,"stretch")?we(O(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==I(e,t+1))break;case 6444:switch(I(e,D(e)-3-(~M(e,"!important")&&10))){case 107:return O(e,":",":"+S)+e;case 101:return O(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+S+(45===I(e,14)?"inline-":"")+"box$3$1"+S+"$2$3$1"+w+"$2box$3")+e}break;case 5936:switch(I(e,t+11)){case 114:return S+e+w+O(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return S+e+w+O(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return S+e+w+O(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return S+e+w+e+e}return e}var ke=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case _:e.return=we(e.value,e.length);break;case P:return pe([q(e,{value:O(e.value,"@","@"+S)})],n);case E:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return pe([q(e,{props:[O(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return pe([q(e,{props:[O(t,/:(plac\w+)/,":"+S+"input-$1")]}),q(e,{props:[O(t,/:(plac\w+)/,":-moz-$1")]}),q(e,{props:[O(t,/:(plac\w+)/,w+"input-$1")]})],n)}return""}))}}],Se=function(e){var t=e.key;if("css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var n,o,i=e.stylisPlugins||ke,a={},s=[];n=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r=4;++n,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(o){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:at}},ct=!!a.useInsertionEffect&&a.useInsertionEffect,ut=ct||function(e){return e()},dt=ct||i.useLayoutEffect,pt=i.createContext("undefined"!=typeof HTMLElement?Se({key:"css"}):null);pt.Provider;var ft=function(e){return i.forwardRef((function(t,r){var n=i.useContext(pt);return e(t,n,r)}))},ht=n("T",i.createContext({})),mt=he((function(e){return he((function(t){return function(e,t){return"function"==typeof t?t(e):Ce({},e,t)}(e,t)}))})),vt=function(e){var t=i.useContext(ht);return e.theme!==t&&(t=mt(t)(e.theme)),i.createElement(ht.Provider,{value:t},e.children)},gt=ft((function(e,t){var r=e.styles,n=lt([r],void 0,i.useContext(ht)),o=i.useRef();return dt((function(){var e=t.key+"-global",r=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),i=!1,a=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(r.before=t.sheet.tags[0]),null!==a&&(i=!0,a.setAttribute("data-emotion",e),r.hydrate([a])),o.current=[r,i],function(){r.flush()}}),[t]),dt((function(){var e=o.current,r=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&Ze(t,n.next,!0),r.tags.length){var i=r.tags[r.tags.length-1].nextElementSibling;r.before=i,r.flush()}t.insert("",n,r,!1)}}),[t,n.name]),null}));function bt(){for(var e=arguments.length,t=new Array(e),r=0;ry.jsx(gt,{styles:wt}),St=({scope:e=""})=>y.jsx(gt,{styles:xt(t||(t=r` - html { - line-height: 1.5; - -webkit-text-size-adjust: 100%; - font-family: system-ui, sans-serif; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - -moz-osx-font-smoothing: grayscale; - touch-action: manipulation; - } - - body { - position: relative; - min-height: 100%; - margin: 0; - font-feature-settings: "kern"; - } - - ${0} :where(*, *::before, *::after) { - border-width: 0; - border-style: solid; - box-sizing: border-box; - word-wrap: break-word; - } - - main { - display: block; - } - - ${0} hr { - border-top-width: 1px; - box-sizing: content-box; - height: 0; - overflow: visible; - } - - ${0} :where(pre, code, kbd,samp) { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; - font-size: 1em; - } - - ${0} a { - background-color: transparent; - color: inherit; - text-decoration: inherit; - } - - ${0} abbr[title] { - border-bottom: none; - text-decoration: underline; - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; - } - - ${0} :where(b, strong) { - font-weight: bold; - } - - ${0} small { - font-size: 80%; - } - - ${0} :where(sub,sup) { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; - } - - ${0} sub { - bottom: -0.25em; - } - - ${0} sup { - top: -0.5em; - } - - ${0} img { - border-style: none; - } - - ${0} :where(button, input, optgroup, select, textarea) { - font-family: inherit; - font-size: 100%; - line-height: 1.15; - margin: 0; - } - - ${0} :where(button, input) { - overflow: visible; - } - - ${0} :where(button, select) { - text-transform: none; - } - - ${0} :where( - button::-moz-focus-inner, - [type="button"]::-moz-focus-inner, - [type="reset"]::-moz-focus-inner, - [type="submit"]::-moz-focus-inner - ) { - border-style: none; - padding: 0; - } - - ${0} fieldset { - padding: 0.35em 0.75em 0.625em; - } - - ${0} legend { - box-sizing: border-box; - color: inherit; - display: table; - max-width: 100%; - padding: 0; - white-space: normal; - } - - ${0} progress { - vertical-align: baseline; - } - - ${0} textarea { - overflow: auto; - } - - ${0} :where([type="checkbox"], [type="radio"]) { - box-sizing: border-box; - padding: 0; - } - - ${0} input[type="number"]::-webkit-inner-spin-button, - ${0} input[type="number"]::-webkit-outer-spin-button { - -webkit-appearance: none !important; - } - - ${0} input[type="number"] { - -moz-appearance: textfield; - } - - ${0} input[type="search"] { - -webkit-appearance: textfield; - outline-offset: -2px; - } - - ${0} input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none !important; - } - - ${0} ::-webkit-file-upload-button { - -webkit-appearance: button; - font: inherit; - } - - ${0} details { - display: block; - } - - ${0} summary { - display: list-item; - } - - template { - display: none; - } - - [hidden] { - display: none !important; - } - - ${0} :where( - blockquote, - dl, - dd, - h1, - h2, - h3, - h4, - h5, - h6, - hr, - figure, - p, - pre - ) { - margin: 0; - } - - ${0} button { - background: transparent; - padding: 0; - } - - ${0} fieldset { - margin: 0; - padding: 0; - } - - ${0} :where(ol, ul) { - margin: 0; - padding: 0; - } - - ${0} textarea { - resize: vertical; - } - - ${0} :where(button, [role="button"]) { - cursor: pointer; - } - - ${0} button::-moz-focus-inner { - border: 0 !important; - } - - ${0} table { - border-collapse: collapse; - } - - ${0} :where(h1, h2, h3, h4, h5, h6) { - font-size: inherit; - font-weight: inherit; - } - - ${0} :where(button, input, optgroup, select, textarea) { - padding: 0; - line-height: inherit; - color: inherit; - } - - ${0} :where(img, svg, video, canvas, audio, iframe, embed, object) { - display: block; - } - - ${0} :where(img, video) { - max-width: 100%; - height: auto; - } - - [data-js-focus-visible] - :focus:not([data-focus-visible-added]):not( - [data-focus-visible-disabled] - ) { - outline: none; - box-shadow: none; - } - - ${0} select::-ms-expand { - display: none; - } - - ${0} - `),e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,wt)});function Ct(e={}){const{name:t,strict:r=!0,hookName:n="useContext",providerName:o="Provider",errorMessage:a,defaultValue:s}=e,l=i.createContext(s);return l.displayName=t,[l.Provider,function e(){var t;const s=i.useContext(l);if(!s&&r){const r=new Error(null!=a?a:`${n} returned \`undefined\`. Seems you forgot to wrap component within ${o}`);throw r.name="ContextError",null==(t=Error.captureStackTrace)||t.call(Error,r,e),r}return s},l]}var[Et,_t]=Ct({strict:!1,name:"PortalManagerContext"});function Pt(e){const{children:t,zIndex:r}=e;return y.jsx(Et,{value:{zIndex:r},children:t})}Pt.displayName="PortalManager";var At=Boolean(null==globalThis?void 0:globalThis.document)?i.useLayoutEffect:i.useEffect,[Tt,jt]=Ct({strict:!1,name:"PortalContext"}),Rt="chakra-portal",Ot=e=>y.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Mt=e=>{const{appendToParentPortal:t,children:r}=e,[n,o]=i.useState(null),a=i.useRef(null),[,l]=i.useState({});i.useEffect((()=>l({})),[]);const c=jt(),u=_t();At((()=>{if(!n)return;const e=n.ownerDocument,r=t&&null!=c?c:e.body;if(!r)return;a.current=e.createElement("div"),a.current.className=Rt,r.appendChild(a.current),l({});const o=a.current;return()=>{r.contains(o)&&r.removeChild(o)}}),[n]);const d=(null==u?void 0:u.zIndex)?y.jsx(Ot,{zIndex:null==u?void 0:u.zIndex,children:r}):r;return a.current?s.createPortal(y.jsx(Tt,{value:a.current,children:d}),a.current):y.jsx("span",{ref:e=>{e&&o(e)}})},It=e=>{const{children:t,containerRef:r,appendToParentPortal:n}=e,o=r.current,a=null!=o?o:"undefined"!=typeof window?document.body:void 0,l=i.useMemo((()=>{const e=null==o?void 0:o.ownerDocument.createElement("div");return e&&(e.className=Rt),e}),[o]),[,c]=i.useState({});return At((()=>c({})),[]),At((()=>{if(l&&a)return a.appendChild(l),()=>{a.removeChild(l)}}),[l,a]),a&&l?s.createPortal(y.jsx(Tt,{value:n?l:null,children:t}),l):null};function Nt(e){const t={appendToParentPortal:!0,...e},{containerRef:r,...n}=t;return r?y.jsx(It,{containerRef:r,...n}):y.jsx(Mt,{...n})}function Dt(){const e=i.useContext(ht);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}Nt.className=Rt,Nt.selector=".chakra-portal",Nt.displayName="Portal";var zt=i.createContext({});function Bt(){const e=i.useContext(zt);if(void 0===e)throw new Error("useColorMode must be used within a ColorModeProvider");return e}zt.displayName="ColorModeContext";var Ft={light:"chakra-ui-light",dark:"chakra-ui-dark"};var Lt,$t=(Lt="chakra-ui-color-mode",{ssr:!1,type:"localStorage",get(e){if(!(null==globalThis?void 0:globalThis.document))return e;let t;try{t=localStorage.getItem(Lt)||e}catch(je){}return t||e},set(e){try{localStorage.setItem(Lt,e)}catch(je){}}}),Vt=()=>{};function Wt(e,t){return"cookie"===e.type&&e.ssr?e.get(t):t}function Ht(e){const{value:t,children:r,options:{useSystemColorMode:n,initialColorMode:o,disableTransitionOnChange:a}={},colorModeManager:s=$t}=e,l="dark"===o?"dark":"light",[c,u]=i.useState((()=>Wt(s,l))),[d,p]=i.useState((()=>Wt(s))),{getSystemTheme:f,setClassName:h,setDataset:m,addListener:v}=i.useMemo((()=>function(e={}){const{preventTransition:t=!0}=e,r={setDataset:e=>{const n=t?r.preventTransition():void 0;document.documentElement.dataset.theme=e,document.documentElement.style.colorScheme=e,null==n||n()},setClassName(e){document.body.classList.add(e?Ft.dark:Ft.light),document.body.classList.remove(e?Ft.light:Ft.dark)},query:()=>window.matchMedia("(prefers-color-scheme: dark)"),getSystemTheme(e){var t;return(null!=(t=r.query().matches)?t:"dark"===e)?"dark":"light"},addListener(e){const t=r.query(),n=t=>{e(t.matches?"dark":"light")};return"function"==typeof t.addListener?t.addListener(n):t.addEventListener("change",n),()=>{"function"==typeof t.removeListener?t.removeListener(n):t.removeEventListener("change",n)}},preventTransition(){const e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),requestAnimationFrame((()=>{requestAnimationFrame((()=>{document.head.removeChild(e)}))}))}}};return r}({preventTransition:a})),[a]),g="system"!==o||c?c:d,b=i.useCallback((e=>{const t="system"===e?f():e;u(t),h("dark"===t),m(t),s.set(t)}),[s,f,h,m]);At((()=>{"system"===o&&p(f())}),[]),i.useEffect((()=>{const e=s.get();b(e||("system"!==o?l:"system"))}),[s,l,o,b]);const x=i.useCallback((()=>{b("dark"===g?"light":"dark")}),[g,b]);i.useEffect((()=>{if(n)return v(b)}),[n,v,b]);const w=i.useMemo((()=>({colorMode:null!=t?t:g,toggleColorMode:t?Vt:x,setColorMode:t?Vt:b,forced:void 0!==t})),[g,x,b,t]);return y.jsx(zt.Provider,{value:w,children:r})}function Ut(){return{...Bt(),theme:Dt()}}Ht.displayName="ColorModeProvider";var qt=(...e)=>e.filter(Boolean).join(" ");function Xt(e){const t=typeof e;return null!=e&&("object"===t||"function"===t)&&!Array.isArray(e)}var Yt=e=>{};function Gt(e,...t){return Kt(e)?e(...t):e}var Kt=e=>"function"==typeof e,Zt=e=>e?"":void 0,Qt=e=>!!e||void 0;function Jt(...e){return function(t){e.some((e=>(null==e||e(t),null==t?void 0:t.defaultPrevented)))}}function er(...e){return function(t){e.forEach((e=>{null==e||e(t)}))}}var tr={exports:{}};!function(e,t){var r="__lodash_hash_undefined__",n=9007199254740991,o="[object Arguments]",i="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",l="[object Null]",u="[object Object]",d="[object Proxy]",p="[object Undefined]",f=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,m={};m["[object Float32Array]"]=m["[object Float64Array]"]=m["[object Int8Array]"]=m["[object Int16Array]"]=m["[object Int32Array]"]=m["[object Uint8Array]"]=m["[object Uint8ClampedArray]"]=m["[object Uint16Array]"]=m["[object Uint32Array]"]=!0,m[o]=m["[object Array]"]=m["[object ArrayBuffer]"]=m["[object Boolean]"]=m["[object DataView]"]=m["[object Date]"]=m["[object Error]"]=m[a]=m["[object Map]"]=m["[object Number]"]=m[u]=m["[object RegExp]"]=m["[object Set]"]=m["[object String]"]=m["[object WeakMap]"]=!1;var v="object"==typeof c&&c&&c.Object===Object&&c,g="object"==typeof self&&self&&self.Object===Object&&self,b=v||g||Function("return this")(),y=t&&!t.nodeType&&t,x=y&&e&&!e.nodeType&&e,w=x&&x.exports===y,k=w&&v.process,S=function(){try{var e=x&&x.require&&x.require("util").types;return e||k&&k.binding&&k.binding("util")}catch(je){}}(),C=S&&S.isTypedArray;var E,_=Array.prototype,P=Function.prototype,A=Object.prototype,T=b["__core-js_shared__"],j=P.toString,R=A.hasOwnProperty,O=(E=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",M=A.toString,I=j.call(Object),N=RegExp("^"+j.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=w?b.Buffer:void 0,z=b.Symbol,B=b.Uint8Array;D&&D.allocUnsafe;var F=function(e,t){return function(r){return e(t(r))}}(Object.getPrototypeOf,Object),L=Object.create,$=A.propertyIsEnumerable,V=_.splice,W=z?z.toStringTag:void 0,H=function(){try{var e=me(Object,"defineProperty");return e({},"",{}),e}catch(je){}}(),U=D?D.isBuffer:void 0,q=Math.max,X=Date.now,Y=me(b,"Map"),G=me(Object,"create"),K=function(){function e(){}return function(t){if(!Re(t))return{};if(L)return L(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Z(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1},Q.prototype.set=function(e,t){var r=this.__data__,n=oe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},J.prototype.clear=function(){this.size=0,this.__data__={hash:new Z,map:new(Y||Q),string:new Z}},J.prototype.delete=function(e){var t=he(this,e).delete(e);return this.size-=t?1:0,t},J.prototype.get=function(e){return he(this,e).get(e)},J.prototype.has=function(e){return he(this,e).has(e)},J.prototype.set=function(e,t){var r=he(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},ee.prototype.clear=function(){this.__data__=new Q,this.size=0},ee.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},ee.prototype.get=function(e){return this.__data__.get(e)},ee.prototype.has=function(e){return this.__data__.has(e)},ee.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Q){var n=r.__data__;if(!Y||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new J(n)}return r.set(e,t),this.size=r.size,this};var ae=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var s=i[++n];if(!1===t(o[s],s,o))break}return e};function se(e){return null==e?void 0===e?p:l:W&&W in Object(e)?function(e){var t=R.call(e,W),r=e[W];try{e[W]=void 0;var n=!0}catch(je){}var o=M.call(e);n&&(t?e[W]=r:delete e[W]);return o}(e):function(e){return M.call(e)}(e)}function le(e){return Oe(e)&&se(e)==o}function ce(e){return!(!Re(e)||(t=e,O&&O in t))&&(Ae(e)?N:f).test(function(e){if(null!=e){try{return j.call(e)}catch(je){}try{return e+""}catch(je){}}return""}(e));var t}function ue(e){if(!Re(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=ge(e),r=[];for(var n in e)("constructor"!=n||!t&&R.call(e,n))&&r.push(n);return r}function de(e,t,r,n,o){e!==t&&ae(t,(function(i,a){if(o||(o=new ee),Re(i))!function(e,t,r,n,o,i,a){var s=be(e,r),l=be(t,r),c=a.get(l);if(c)return void re(e,r,c);var d=i?i(s,l,r+"",e,t,a):void 0,p=void 0===d;if(p){var f=Ee(l),h=!f&&Pe(l),m=!f&&!h&&Me(l);d=l,f||h||m?Ee(s)?d=s:Oe(v=s)&&_e(v)?d=function(e,t){var r=-1,n=e.length;t||(t=Array(n));for(;++r-1&&e%1==0&&e0){if(++xe>=800)return arguments[0]}else xe=0;return ye.apply(void 0,arguments)});function Se(e,t){return e===t||e!=e&&t!=t}var Ce=le(function(){return arguments}())?le:function(e){return Oe(e)&&R.call(e,"callee")&&!$.call(e,"callee")},Ee=Array.isArray;function _e(e){return null!=e&&Te(e.length)&&!Ae(e)}var Pe=U||function(){return!1};function Ae(e){if(!Re(e))return!1;var t=se(e);return t==a||t==s||t==i||t==d}function Te(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}function Re(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Oe(e){return null!=e&&"object"==typeof e}var Me=C?function(e){return function(t){return e(t)}}(C):function(e){return Oe(e)&&Te(e.length)&&!!m[se(e)]};function Ie(e){return _e(e)?te(e):ue(e)}var Ne,De=(Ne=function(e,t,r,n){de(e,t,r,n)},pe((function(e,t){var r=-1,n=t.length,o=n>1?t[n-1]:void 0,i=n>2?t[2]:void 0;for(o=Ne.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(e,t,r){if(!Re(r))return!1;var n=typeof t;return!!("number"==n?_e(r)&&ve(t,r.length):"string"==n&&t in r)&&Se(r[t],e)}(t[0],t[1],i)&&(o=n<3?void 0:o,n=1),e=Object(e);++r"string"==typeof e?e.replace(/!(important)?$/,"").trim():e,or=(e,t)=>r=>{const n=String(t),o=(e=>/!(important)?$/.test(e))(n),i=nr(n),a=e?`${e}.${i}`:i;let s=Xt(r.__cssMap)&&a in r.__cssMap?r.__cssMap[a].varRef:t;return s=nr(s),o?`${s} !important`:s};function ir(e){const{scale:t,transform:r,compose:n}=e;return(e,o)=>{var i;const a=or(t,e)(o);let s=null!=(i=null==r?void 0:r(a,o))?i:a;return n&&(s=n(s,o)),s}}var ar=(...e)=>t=>e.reduce(((e,t)=>t(e)),t);function sr(e,t){return r=>{const n={property:r,scale:e};return n.transform=ir({scale:e,transform:t}),n}}var lr=({rtl:e,ltr:t})=>r=>"rtl"===r.direction?e:t;var cr=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];var ur={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},dr={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};var pr={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},fr={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},hr=new Set(Object.values(fr)),mr=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),vr=e=>e.trim();var gr=e=>"string"==typeof e&&e.includes("(")&&e.includes(")");var br=e=>t=>`${e}(${t})`,yr={filter:e=>"auto"!==e?e:ur,backdropFilter:e=>"auto"!==e?e:dr,ring:e=>function(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}(yr.px(e)),bgClip:e=>"text"===e?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e},transform:e=>"auto"===e?["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...cr].join(" "):"auto-gpu"===e?["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...cr].join(" "):e,vh:e=>"$100vh"===e?"var(--chakra-vh)":e,px(e){if(null==e)return e;const{unitless:t}=(e=>{const t=parseFloat(e.toString()),r=e.toString().replace(String(t),"");return{unitless:!r,value:t,unit:r}})(e);return t||"number"==typeof e?`${e}px`:e},fraction:e=>"number"!=typeof e||e>1?e:100*e+"%",float:(e,t)=>"rtl"===t.direction?{left:"right",right:"left"}[e]:e,degree(e){if(function(e){return/^var\(--.+\)$/.test(e)}(e)||null==e)return e;const t="string"==typeof e&&!e.endsWith("deg");return"number"==typeof e||t?`${e}deg`:e},gradient:(e,t)=>function(e,t){if(null==e||mr.has(e))return e;if(!gr(e)&&!mr.has(e))return`url('${e}')`;const r=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),n=null==r?void 0:r[1],o=null==r?void 0:r[2];if(!n||!o)return e;const i=n.includes("-gradient")?n:`${n}-gradient`,[a,...s]=o.split(",").map(vr).filter(Boolean);if(0===(null==s?void 0:s.length))return e;const l=a in fr?fr[a]:a;s.unshift(l);const c=s.map((e=>{if(hr.has(e))return e;const r=e.indexOf(" "),[n,o]=-1!==r?[e.substr(0,r),e.substr(r+1)]:[e],i=gr(o)?o:o&&o.split(" "),a=`colors.${n}`,s=a in t.__cssMap?t.__cssMap[a].varRef:n;return i?[s,...Array.isArray(i)?i:[i]].join(" "):s}));return`${i}(${c.join(", ")})`}(e,null!=t?t:{}),blur:br("blur"),opacity:br("opacity"),brightness:br("brightness"),contrast:br("contrast"),dropShadow:br("drop-shadow"),grayscale:br("grayscale"),hueRotate:e=>br("hue-rotate")(yr.degree(e)),invert:br("invert"),saturate:br("saturate"),sepia:br("sepia"),bgImage(e){if(null==e)return e;return gr(e)||mr.has(e)?e:`url(${e})`},outline(e){const t="0"===String(e)||"none"===String(e);return null!==e&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;const{space:r,divide:n}=null!=(t=pr[e])?t:{},o={flexDirection:e};return r&&(o[r]=1),n&&(o[n]=1),o}},xr={borderWidths:sr("borderWidths"),borderStyles:sr("borderStyles"),colors:sr("colors"),borders:sr("borders"),gradients:sr("gradients",yr.gradient),radii:sr("radii",yr.px),space:sr("space",ar(yr.vh,yr.px)),spaceT:sr("space",ar(yr.vh,yr.px)),degreeT:e=>({property:e,transform:yr.degree}),prop:(e,t,r)=>({property:e,scale:t,...t&&{transform:ir({scale:t,transform:r})}}),propT:(e,t)=>({property:e,transform:t}),sizes:sr("sizes",ar(yr.vh,yr.px)),sizesT:sr("sizes",ar(yr.vh,yr.fraction)),shadows:sr("shadows"),logical:function(e){const{property:t,scale:r,transform:n}=e;return{scale:r,property:lr(t),transform:r?ir({scale:r,compose:n}):n}},blur:sr("blur",yr.blur)},wr={background:xr.colors("background"),backgroundColor:xr.colors("backgroundColor"),backgroundImage:xr.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:yr.bgClip},bgSize:xr.prop("backgroundSize"),bgPosition:xr.prop("backgroundPosition"),bg:xr.colors("background"),bgColor:xr.colors("backgroundColor"),bgPos:xr.prop("backgroundPosition"),bgRepeat:xr.prop("backgroundRepeat"),bgAttachment:xr.prop("backgroundAttachment"),bgGradient:xr.gradients("backgroundImage"),bgClip:{transform:yr.bgClip}};Object.assign(wr,{bgImage:wr.backgroundImage,bgImg:wr.backgroundImage});var kr={border:xr.borders("border"),borderWidth:xr.borderWidths("borderWidth"),borderStyle:xr.borderStyles("borderStyle"),borderColor:xr.colors("borderColor"),borderRadius:xr.radii("borderRadius"),borderTop:xr.borders("borderTop"),borderBlockStart:xr.borders("borderBlockStart"),borderTopLeftRadius:xr.radii("borderTopLeftRadius"),borderStartStartRadius:xr.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:xr.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:xr.radii("borderTopRightRadius"),borderStartEndRadius:xr.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:xr.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:xr.borders("borderRight"),borderInlineEnd:xr.borders("borderInlineEnd"),borderBottom:xr.borders("borderBottom"),borderBlockEnd:xr.borders("borderBlockEnd"),borderBottomLeftRadius:xr.radii("borderBottomLeftRadius"),borderBottomRightRadius:xr.radii("borderBottomRightRadius"),borderLeft:xr.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:xr.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:xr.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:xr.borders(["borderLeft","borderRight"]),borderInline:xr.borders("borderInline"),borderY:xr.borders(["borderTop","borderBottom"]),borderBlock:xr.borders("borderBlock"),borderTopWidth:xr.borderWidths("borderTopWidth"),borderBlockStartWidth:xr.borderWidths("borderBlockStartWidth"),borderTopColor:xr.colors("borderTopColor"),borderBlockStartColor:xr.colors("borderBlockStartColor"),borderTopStyle:xr.borderStyles("borderTopStyle"),borderBlockStartStyle:xr.borderStyles("borderBlockStartStyle"),borderBottomWidth:xr.borderWidths("borderBottomWidth"),borderBlockEndWidth:xr.borderWidths("borderBlockEndWidth"),borderBottomColor:xr.colors("borderBottomColor"),borderBlockEndColor:xr.colors("borderBlockEndColor"),borderBottomStyle:xr.borderStyles("borderBottomStyle"),borderBlockEndStyle:xr.borderStyles("borderBlockEndStyle"),borderLeftWidth:xr.borderWidths("borderLeftWidth"),borderInlineStartWidth:xr.borderWidths("borderInlineStartWidth"),borderLeftColor:xr.colors("borderLeftColor"),borderInlineStartColor:xr.colors("borderInlineStartColor"),borderLeftStyle:xr.borderStyles("borderLeftStyle"),borderInlineStartStyle:xr.borderStyles("borderInlineStartStyle"),borderRightWidth:xr.borderWidths("borderRightWidth"),borderInlineEndWidth:xr.borderWidths("borderInlineEndWidth"),borderRightColor:xr.colors("borderRightColor"),borderInlineEndColor:xr.colors("borderInlineEndColor"),borderRightStyle:xr.borderStyles("borderRightStyle"),borderInlineEndStyle:xr.borderStyles("borderInlineEndStyle"),borderTopRadius:xr.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:xr.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:xr.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:xr.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(kr,{rounded:kr.borderRadius,roundedTop:kr.borderTopRadius,roundedTopLeft:kr.borderTopLeftRadius,roundedTopRight:kr.borderTopRightRadius,roundedTopStart:kr.borderStartStartRadius,roundedTopEnd:kr.borderStartEndRadius,roundedBottom:kr.borderBottomRadius,roundedBottomLeft:kr.borderBottomLeftRadius,roundedBottomRight:kr.borderBottomRightRadius,roundedBottomStart:kr.borderEndStartRadius,roundedBottomEnd:kr.borderEndEndRadius,roundedLeft:kr.borderLeftRadius,roundedRight:kr.borderRightRadius,roundedStart:kr.borderInlineStartRadius,roundedEnd:kr.borderInlineEndRadius,borderStart:kr.borderInlineStart,borderEnd:kr.borderInlineEnd,borderTopStartRadius:kr.borderStartStartRadius,borderTopEndRadius:kr.borderStartEndRadius,borderBottomStartRadius:kr.borderEndStartRadius,borderBottomEndRadius:kr.borderEndEndRadius,borderStartRadius:kr.borderInlineStartRadius,borderEndRadius:kr.borderInlineEndRadius,borderStartWidth:kr.borderInlineStartWidth,borderEndWidth:kr.borderInlineEndWidth,borderStartColor:kr.borderInlineStartColor,borderEndColor:kr.borderInlineEndColor,borderStartStyle:kr.borderInlineStartStyle,borderEndStyle:kr.borderInlineEndStyle});var Sr={color:xr.colors("color"),textColor:xr.colors("color"),fill:xr.colors("fill"),stroke:xr.colors("stroke")},Cr={boxShadow:xr.shadows("boxShadow"),mixBlendMode:!0,blendMode:xr.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:xr.prop("backgroundBlendMode"),opacity:!0};Object.assign(Cr,{shadow:Cr.boxShadow});var Er={filter:{transform:yr.filter},blur:xr.blur("--chakra-blur"),brightness:xr.propT("--chakra-brightness",yr.brightness),contrast:xr.propT("--chakra-contrast",yr.contrast),hueRotate:xr.propT("--chakra-hue-rotate",yr.hueRotate),invert:xr.propT("--chakra-invert",yr.invert),saturate:xr.propT("--chakra-saturate",yr.saturate),dropShadow:xr.propT("--chakra-drop-shadow",yr.dropShadow),backdropFilter:{transform:yr.backdropFilter},backdropBlur:xr.blur("--chakra-backdrop-blur"),backdropBrightness:xr.propT("--chakra-backdrop-brightness",yr.brightness),backdropContrast:xr.propT("--chakra-backdrop-contrast",yr.contrast),backdropHueRotate:xr.propT("--chakra-backdrop-hue-rotate",yr.hueRotate),backdropInvert:xr.propT("--chakra-backdrop-invert",yr.invert),backdropSaturate:xr.propT("--chakra-backdrop-saturate",yr.saturate)},_r={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:yr.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:xr.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:xr.space("gap"),rowGap:xr.space("rowGap"),columnGap:xr.space("columnGap")};Object.assign(_r,{flexDir:_r.flexDirection});var Pr={gridGap:xr.space("gridGap"),gridColumnGap:xr.space("gridColumnGap"),gridRowGap:xr.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},Ar={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:yr.outline},outlineOffset:!0,outlineColor:xr.colors("outlineColor")},Tr={width:xr.sizesT("width"),inlineSize:xr.sizesT("inlineSize"),height:xr.sizes("height"),blockSize:xr.sizes("blockSize"),boxSize:xr.sizes(["width","height"]),minWidth:xr.sizes("minWidth"),minInlineSize:xr.sizes("minInlineSize"),minHeight:xr.sizes("minHeight"),minBlockSize:xr.sizes("minBlockSize"),maxWidth:xr.sizes("maxWidth"),maxInlineSize:xr.sizes("maxInlineSize"),maxHeight:xr.sizes("maxHeight"),maxBlockSize:xr.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var r,n,o;return{[`@media screen and (min-width: ${null!=(o=null==(n=null==(r=t.__breakpoints)?void 0:r.get(e))?void 0:n.minW)?o:e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var r,n,o;return{[`@media screen and (max-width: ${null!=(o=null==(n=null==(r=t.__breakpoints)?void 0:r.get(e))?void 0:n._minW)?o:e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:xr.propT("float",yr.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Tr,{w:Tr.width,h:Tr.height,minW:Tr.minWidth,maxW:Tr.maxWidth,minH:Tr.minHeight,maxH:Tr.maxHeight,overscroll:Tr.overscrollBehavior,overscrollX:Tr.overscrollBehaviorX,overscrollY:Tr.overscrollBehaviorY});var jr={listStyleType:!0,listStylePosition:!0,listStylePos:xr.prop("listStylePosition"),listStyleImage:!0,listStyleImg:xr.prop("listStyleImage")};var Rr=(e=>{const t=new WeakMap;return(r,n,o,i)=>{if(void 0===r)return e(r,n,o);t.has(r)||t.set(r,new Map);const a=t.get(r);if(a.has(n))return a.get(n);const s=e(r,n,o,i);return a.set(n,s),s}})((function(e,t,r,n){const o="string"==typeof t?t.split("."):[t];for(n=0;n{const n={},o=Rr(e,t,{});for(const i in o){i in r&&null!=r[i]||(n[i]=o[i])}return n},Nr={srOnly:{transform:e=>!0===e?Or:"focusable"===e?Mr:{}},layerStyle:{processResult:!0,transform:(e,t,r)=>Ir(t,`layerStyles.${e}`,r)},textStyle:{processResult:!0,transform:(e,t,r)=>Ir(t,`textStyles.${e}`,r)},apply:{processResult:!0,transform:(e,t,r)=>Ir(t,e,r)}},Dr={position:!0,pos:xr.prop("position"),zIndex:xr.prop("zIndex","zIndices"),inset:xr.spaceT("inset"),insetX:xr.spaceT(["left","right"]),insetInline:xr.spaceT("insetInline"),insetY:xr.spaceT(["top","bottom"]),insetBlock:xr.spaceT("insetBlock"),top:xr.spaceT("top"),insetBlockStart:xr.spaceT("insetBlockStart"),bottom:xr.spaceT("bottom"),insetBlockEnd:xr.spaceT("insetBlockEnd"),left:xr.spaceT("left"),insetInlineStart:xr.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:xr.spaceT("right"),insetInlineEnd:xr.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Dr,{insetStart:Dr.insetInlineStart,insetEnd:Dr.insetInlineEnd});var zr={ring:{transform:yr.ring},ringColor:xr.colors("--chakra-ring-color"),ringOffset:xr.prop("--chakra-ring-offset-width"),ringOffsetColor:xr.colors("--chakra-ring-offset-color"),ringInset:xr.prop("--chakra-ring-inset")},Br={margin:xr.spaceT("margin"),marginTop:xr.spaceT("marginTop"),marginBlockStart:xr.spaceT("marginBlockStart"),marginRight:xr.spaceT("marginRight"),marginInlineEnd:xr.spaceT("marginInlineEnd"),marginBottom:xr.spaceT("marginBottom"),marginBlockEnd:xr.spaceT("marginBlockEnd"),marginLeft:xr.spaceT("marginLeft"),marginInlineStart:xr.spaceT("marginInlineStart"),marginX:xr.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:xr.spaceT("marginInline"),marginY:xr.spaceT(["marginTop","marginBottom"]),marginBlock:xr.spaceT("marginBlock"),padding:xr.space("padding"),paddingTop:xr.space("paddingTop"),paddingBlockStart:xr.space("paddingBlockStart"),paddingRight:xr.space("paddingRight"),paddingBottom:xr.space("paddingBottom"),paddingBlockEnd:xr.space("paddingBlockEnd"),paddingLeft:xr.space("paddingLeft"),paddingInlineStart:xr.space("paddingInlineStart"),paddingInlineEnd:xr.space("paddingInlineEnd"),paddingX:xr.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:xr.space("paddingInline"),paddingY:xr.space(["paddingTop","paddingBottom"]),paddingBlock:xr.space("paddingBlock")};Object.assign(Br,{m:Br.margin,mt:Br.marginTop,mr:Br.marginRight,me:Br.marginInlineEnd,marginEnd:Br.marginInlineEnd,mb:Br.marginBottom,ml:Br.marginLeft,ms:Br.marginInlineStart,marginStart:Br.marginInlineStart,mx:Br.marginX,my:Br.marginY,p:Br.padding,pt:Br.paddingTop,py:Br.paddingY,px:Br.paddingX,pb:Br.paddingBottom,pl:Br.paddingLeft,ps:Br.paddingInlineStart,paddingStart:Br.paddingInlineStart,pr:Br.paddingRight,pe:Br.paddingInlineEnd,paddingEnd:Br.paddingInlineEnd});var Fr={textDecorationColor:xr.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:xr.shadows("textShadow")},Lr={clipPath:!0,transform:xr.propT("transform",yr.transform),transformOrigin:!0,translateX:xr.spaceT("--chakra-translate-x"),translateY:xr.spaceT("--chakra-translate-y"),skewX:xr.degreeT("--chakra-skew-x"),skewY:xr.degreeT("--chakra-skew-y"),scaleX:xr.prop("--chakra-scale-x"),scaleY:xr.prop("--chakra-scale-y"),scale:xr.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:xr.degreeT("--chakra-rotate")},$r={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:xr.prop("transitionDuration","transition.duration"),transitionProperty:xr.prop("transitionProperty","transition.property"),transitionTimingFunction:xr.prop("transitionTimingFunction","transition.easing")},Vr={fontFamily:xr.prop("fontFamily","fonts"),fontSize:xr.prop("fontSize","fontSizes",yr.px),fontWeight:xr.prop("fontWeight","fontWeights"),lineHeight:xr.prop("lineHeight","lineHeights"),letterSpacing:xr.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(!0===e)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},Wr={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:xr.spaceT("scrollMargin"),scrollMarginTop:xr.spaceT("scrollMarginTop"),scrollMarginBottom:xr.spaceT("scrollMarginBottom"),scrollMarginLeft:xr.spaceT("scrollMarginLeft"),scrollMarginRight:xr.spaceT("scrollMarginRight"),scrollMarginX:xr.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:xr.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:xr.spaceT("scrollPadding"),scrollPaddingTop:xr.spaceT("scrollPaddingTop"),scrollPaddingBottom:xr.spaceT("scrollPaddingBottom"),scrollPaddingLeft:xr.spaceT("scrollPaddingLeft"),scrollPaddingRight:xr.spaceT("scrollPaddingRight"),scrollPaddingX:xr.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:xr.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function Hr(e){return Xt(e)&&e.reference?e.reference:String(e)}var Ur=(e,...t)=>t.map(Hr).join(` ${e} `).replace(/calc/g,""),qr=(...e)=>`calc(${Ur("+",...e)})`,Xr=(...e)=>`calc(${Ur("-",...e)})`,Yr=(...e)=>`calc(${Ur("*",...e)})`,Gr=(...e)=>`calc(${Ur("/",...e)})`,Kr=e=>{const t=Hr(e);return null==t||Number.isNaN(parseFloat(t))?Yr(t,-1):String(t).startsWith("-")?String(t).slice(1):`-${t}`},Zr=Object.assign((e=>({add:(...t)=>Zr(qr(e,...t)),subtract:(...t)=>Zr(Xr(e,...t)),multiply:(...t)=>Zr(Yr(e,...t)),divide:(...t)=>Zr(Gr(e,...t)),negate:()=>Zr(Kr(e)),toString:()=>e.toString()})),{add:qr,subtract:Xr,multiply:Yr,divide:Gr,negate:Kr});function Qr(e){return function(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}(function(e){if(e.includes("\\."))return e;const t=!Number.isInteger(parseFloat(e.toString()));return t?e.replace(".","\\."):e}(function(e,t="-"){return e.replace(/\s+/g,t)}(e.toString())))}function Jr(e,t){return`var(${e}${t?`, ${t}`:""})`}function en(e,t=""){return Qr(`--${function(e,t=""){return[t,e].filter(Boolean).join("-")}(e,t)}`)}function tn(e,t,r){const n=en(e,r);return{variable:n,reference:Jr(n,t)}}function rn(e){const t=null==e?0:e.length;return t?e[t-1]:void 0}function nn(e){if(null==e)return e;const{unitless:t}=function(e){const t=parseFloat(e.toString()),r=e.toString().replace(String(t),"");return{unitless:!r,value:t,unit:r}}(e);return t||"number"==typeof e?`${e}px`:e}var on=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,an=e=>Object.fromEntries(Object.entries(e).sort(on));function sn(e){const t=an(e);return Object.assign(Object.values(t),t)}function ln(e){var t;if(!e)return e;e=null!=(t=nn(e))?t:e;return"number"==typeof e?`${e+-.02}`:e.replace(/(\d+\.?\d*)/u,(e=>`${parseFloat(e)+-.02}`))}function cn(e,t){const r=["@media screen"];return e&&r.push("and",`(min-width: ${nn(e)})`),t&&r.push("and",`(max-width: ${nn(t)})`),r.join(" ")}function un(e){var t;if(!e)return null;e.base=null!=(t=e.base)?t:"0px";const r=sn(e),n=Object.entries(e).sort(on).map((([e,t],r,n)=>{var o;let[,i]=null!=(o=n[r+1])?o:[];return i=parseFloat(i)>0?ln(i):void 0,{_minW:ln(t),breakpoint:e,minW:t,maxW:i,maxWQuery:cn(null,i),minWQuery:cn(t),minMaxQuery:cn(t,i)}})),o=function(e){const t=Object.keys(an(e));return new Set(t)}(e),i=Array.from(o.values());return{keys:o,normalized:r,isResponsive(e){const t=Object.keys(e);return t.length>0&&t.every((e=>o.has(e)))},asObject:an(e),asArray:sn(e),details:n,get:e=>n.find((t=>t.breakpoint===e)),media:[null,...r.map((e=>cn(e))).slice(1)],toArrayValue(e){if(!Xt(e))throw new Error("toArrayValue: value must be an object");const t=i.map((t=>{var r;return null!=(r=e[t])?r:null}));for(;null===rn(t);)t.pop();return t},toObjectValue(e){if(!Array.isArray(e))throw new Error("toObjectValue: value must be an array");return e.reduce(((e,t,r)=>{const n=i[r];return null!=n&&null!=t&&(e[n]=t),e}),{})}}}var dn=(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,pn=(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,fn=(e,t)=>`${e}:focus-visible ${t}`,hn=(e,t)=>`${e}:focus-within ${t}`,mn=(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,vn=(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,gn=(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,bn=(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,yn=(e,t)=>`${e}:placeholder-shown ${t}`,xn=e=>kn((t=>e(t,"&")),"[role=group]","[data-group]",".group"),wn=e=>kn((t=>e(t,"~ &")),"[data-peer]",".peer"),kn=(e,...t)=>t.map(e).join(", "),Sn={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:xn(dn),_peerHover:wn(dn),_groupFocus:xn(pn),_peerFocus:wn(pn),_groupFocusVisible:xn(fn),_peerFocusVisible:wn(fn),_groupActive:xn(mn),_peerActive:wn(mn),_groupDisabled:xn(vn),_peerDisabled:wn(vn),_groupInvalid:xn(gn),_peerInvalid:wn(gn),_groupChecked:xn(bn),_peerChecked:wn(bn),_groupFocusWithin:xn(hn),_peerFocusWithin:wn(hn),_peerPlaceholderShown:wn(yn),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},Cn=Object.keys(Sn);function En(e,t){return tn(String(e).replace(/\./g,"-"),void 0,t)}function _n(e,t,r={}){const{stop:n,getKey:o}=r;return function e(r,i=[]){var a;if(function(e){return"object"==typeof e&&null!=e&&!Array.isArray(e)}(r)||Array.isArray(r)){const s={};for(const[l,c]of Object.entries(r)){const u=null!=(a=null==o?void 0:o(l))?a:l,d=[...i,u];if(null==n?void 0:n(r,d))return t(r,i);s[u]=e(c,d)}return s}return t(r,i)}(e)}var Pn=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];var An=e=>Cn.includes(e)||"default"===e;function Tn(e){var t;const r=function(e){const{__cssMap:t,__cssVars:r,__breakpoints:n,...o}=e;return o}(e),n=function(e){return function(e,t){const r={};for(const n of t)n in e&&(r[n]=e[n]);return r}(e,Pn)}(r),o=function(e){return e.semanticTokens}(r),i=function({tokens:e,semanticTokens:t}){const r={};return _n(e,((e,t)=>{null!=e&&(r[t.join(".")]={isSemantic:!1,value:e})})),_n(t,((e,t)=>{null!=e&&(r[t.join(".")]={isSemantic:!0,value:e})}),{stop:e=>Object.keys(e).every(An)}),r}({tokens:n,semanticTokens:o}),a=null==(t=r.config)?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=function(e,t){let r={};const n={};for(const[o,i]of Object.entries(e)){const{isSemantic:a,value:s}=i,{variable:l,reference:c}=En(o,null==t?void 0:t.cssVarPrefix);if(!a){if(o.startsWith("space")){const e=o.split("."),[t,...r]=e,i=`${t}.-${r.join(".")}`,a=Zr.negate(s),u=Zr.negate(c);n[i]={value:a,var:l,varRef:u}}r[l]=s,n[o]={value:s,var:l,varRef:c};continue}const u=r=>{const n=[String(o).split(".")[0],r].join(".");if(!e[n])return r;const{reference:i}=En(n,null==t?void 0:t.cssVarPrefix);return i},d=Xt(s)?s:{default:s};r=rr(r,Object.entries(d).reduce(((e,[t,r])=>{var n,o;if(!r)return e;const i=u(`${r}`);return"default"===t?(e[l]=i,e):(e[null!=(o=null==(n=Sn)?void 0:n[t])?o:t]={[l]:i},e)}),{})),n[o]={value:c,var:l,varRef:c}}return{cssVars:r,cssMap:n}}(i,{cssVarPrefix:a});return Object.assign(r,{__cssVars:{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0",...l},__cssMap:s,__breakpoints:un(r.breakpoints)}),r}var jn=rr({},wr,kr,Sr,_r,Tr,Er,zr,Ar,Pr,Nr,Dr,Cr,Br,Wr,Vr,Fr,Lr,jr,$r),Rn=Object.assign({},Br,Tr,_r,Pr,Dr),On=Object.keys(Rn),Mn=[...Object.keys(jn),...Cn],In={...jn,...Sn},Nn=e=>e in In;var Dn=(e,t)=>e.startsWith("--")&&"string"==typeof t&&!function(e){return/^var\(--.+\)$/.test(e)}(t),zn=(e,t)=>{var r,n;if(null==t)return t;const o=t=>{var r,n;return null==(n=null==(r=e.__cssMap)?void 0:r[t])?void 0:n.varRef},i=e=>{var t;return null!=(t=o(e))?t:e},[a,s]=function(e){const t=[];let r="",n=!1;for(let o=0;o{var a,s,l;const c=Gt(e,n),u=(e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:r,toArrayValue:n,media:o}=t.__breakpoints,i={};for(const a in e){let s=Gt(e[a],t);if(null==s)continue;if(s=Xt(s)&&r(s)?n(s):s,!Array.isArray(s)){i[a]=s;continue}const l=s.slice(0,o.length).length;for(let e=0;et=>Bn({theme:t,pseudos:Sn,configs:jn})(e);function Ln(e){return{definePartsStyle:e=>e,defineMultiStyleConfig:t=>({parts:e,...t})}}function $n(e,t){for(let r=t+1;r{rr(s,{[e]:u?h[e]:{[f]:h[e]}})})):d?s[f]=h:u?rr(s,h):s[f]=h)}return s}}function Wn(e){return function(e,t=[]){const r=Object.assign({},e);for(const n of t)n in r&&delete r[n];return r}(e,["styleConfig","size","variant","colorScheme"])}var Hn=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];var Un={property:{common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},easing:{"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},duration:{"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"}},qn={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},Xn={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Yn={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},Gn={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},Kn={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Zn={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},Qn={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Jn={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},eo={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},to={...eo,max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch",container:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px"}},ro={breakpoints:Yn,zIndices:qn,radii:Kn,blur:Qn,colors:Gn,...Jn,sizes:to,shadows:Zn,space:eo,borders:Xn,transition:Un},{defineMultiStyleConfig:no,definePartsStyle:oo}=Ln(["stepper","step","title","description","indicator","separator","icon","number"]),io=tn("stepper-indicator-size"),ao=tn("stepper-icon-size"),so=tn("stepper-title-font-size"),lo=tn("stepper-description-font-size"),co=tn("stepper-accent-color"),uo=oo((({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[co.variable]:`colors.${e}.500`,_dark:{[co.variable]:`colors.${e}.200`}},title:{fontSize:so.reference,fontWeight:"medium"},description:{fontSize:lo.reference,color:"chakra-subtle-text"},number:{fontSize:so.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:ao.reference,height:ao.reference},indicator:{flexShrink:0,borderRadius:"full",width:io.reference,height:io.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:co.reference},"&[data-status=complete]":{bg:co.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:co.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${io.reference} - 8px)`,top:`calc(${io.reference} + 4px)`,insetStart:`calc(${io.reference} / 2 - 1px)`}}}))),po=no({baseStyle:uo,sizes:{xs:oo({stepper:{[io.variable]:"sizes.4",[ao.variable]:"sizes.3",[so.variable]:"fontSizes.xs",[lo.variable]:"fontSizes.xs"}}),sm:oo({stepper:{[io.variable]:"sizes.6",[ao.variable]:"sizes.4",[so.variable]:"fontSizes.sm",[lo.variable]:"fontSizes.xs"}}),md:oo({stepper:{[io.variable]:"sizes.8",[ao.variable]:"sizes.5",[so.variable]:"fontSizes.md",[lo.variable]:"fontSizes.sm"}}),lg:oo({stepper:{[io.variable]:"sizes.10",[ao.variable]:"sizes.6",[so.variable]:"fontSizes.lg",[lo.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}});function fo(e,t={}){let r=!1;function n(t){const r=`chakra-${(["container","root"].includes(null!=t?t:"")?[e]:[e,t]).filter(Boolean).join("__")}`;return{className:r,selector:`.${r}`,toString:()=>t}}return{parts:function(...o){!function(){if(r)throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?");r=!0}();for(const e of o)t[e]=n(e);return fo(e,t)},toPart:n,extend:function(...r){for(const e of r)e in t||(t[e]=n(e));return fo(e,t)},selectors:function(){const e=Object.fromEntries(Object.entries(t).map((([e,t])=>[e,t.selector])));return e},classnames:function(){const e=Object.fromEntries(Object.entries(t).map((([e,t])=>[e,t.className])));return e},get keys(){return Object.keys(t)},__type:{}}}var ho=fo("accordion").parts("root","container","button","panel").extend("icon"),mo=fo("alert").parts("title","description","container").extend("icon","spinner"),vo=fo("avatar").parts("label","badge","container").extend("excessLabel","group"),go=fo("breadcrumb").parts("link","item","container").extend("separator");fo("button").parts();var bo=fo("checkbox").parts("control","icon","container").extend("label");fo("progress").parts("track","filledTrack").extend("label");var yo=fo("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),xo=fo("editable").parts("preview","input","textarea"),wo=fo("form").parts("container","requiredIndicator","helperText"),ko=fo("formError").parts("text","icon"),So=fo("input").parts("addon","field","element","group"),Co=fo("list").parts("container","item","icon"),Eo=fo("menu").parts("button","list","item").extend("groupTitle","icon","command","divider"),_o=fo("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),Po=fo("numberinput").parts("root","field","stepperGroup","stepper");fo("pininput").parts("field");var Ao=fo("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),To=fo("progress").parts("label","filledTrack","track"),jo=fo("radio").parts("container","control","label"),Ro=fo("select").parts("field","icon"),Oo=fo("slider").parts("container","track","thumb","filledTrack","mark"),Mo=fo("stat").parts("container","label","helpText","number","icon"),Io=fo("switch").parts("container","track","thumb","label"),No=fo("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),Do=fo("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),zo=fo("tag").parts("container","label","closeButton"),Bo=fo("card").parts("container","header","body","footer");function Fo(e,t,r){return Math.min(Math.max(e,r),t)}fo("stepper").parts("stepper","step","title","description","indicator","separator","icon","number");class Lo extends Error{constructor(e){super(`Failed to parse color: "${e}"`)}}var $o=Lo;function Vo(e){if("string"!=typeof e)throw new $o(e);if("transparent"===e.trim().toLowerCase())return[0,0,0,0];let t=e.trim();t=Ko.test(e)?function(e){const t=e.toLowerCase().trim(),r=Ho[function(e){let t=5381,r=e.length;for(;r;)t=33*t^e.charCodeAt(--r);return(t>>>0)%2341}(t)];if(!r)throw new $o(e);return`#${r}`}(e):e;const r=qo.exec(t);if(r){const e=Array.from(r).slice(1);return[...e.slice(0,3).map((e=>parseInt(Uo(e,2),16))),parseInt(Uo(e[3]||"f",2),16)/255]}const n=Xo.exec(t);if(n){const e=Array.from(n).slice(1);return[...e.slice(0,3).map((e=>parseInt(e,16))),parseInt(e[3]||"ff",16)/255]}const o=Yo.exec(t);if(o){const e=Array.from(o).slice(1);return[...e.slice(0,3).map((e=>parseInt(e,10))),parseFloat(e[3]||"1")]}const i=Go.exec(t);if(i){const[t,r,n,o]=Array.from(i).slice(1).map(parseFloat);if(Fo(0,100,r)!==r)throw new $o(e);if(Fo(0,100,n)!==n)throw new $o(e);return[...Qo(t,r,n),Number.isNaN(o)?1:o]}throw new $o(e)}const Wo=e=>parseInt(e.replace(/_/g,""),36),Ho="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce(((e,t)=>{const r=Wo(t.substring(0,3)),n=Wo(t.substring(3)).toString(16);let o="";for(let i=0;i<6-n.length;i++)o+="0";return e[r]=`${o}${n}`,e}),{});const Uo=(e,t)=>Array.from(Array(t)).map((()=>e)).join(""),qo=new RegExp(`^#${Uo("([a-f0-9])",3)}([a-f0-9])?$`,"i"),Xo=new RegExp(`^#${Uo("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),Yo=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Uo(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),Go=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,Ko=/^[a-z]+$/i,Zo=e=>Math.round(255*e),Qo=(e,t,r)=>{let n=r/100;if(0===t)return[n,n,n].map(Zo);const o=(e%360+360)%360/60,i=(1-Math.abs(2*n-1))*(t/100),a=i*(1-Math.abs(o%2-1));let s=0,l=0,c=0;o>=0&&o<1?(s=i,l=a):o>=1&&o<2?(s=a,l=i):o>=2&&o<3?(l=i,c=a):o>=3&&o<4?(l=a,c=i):o>=4&&o<5?(s=a,c=i):o>=5&&o<6&&(s=i,c=a);const u=n-i/2;return[s+u,l+u,c+u].map(Zo)};function Jo(e,t){const[r,n,o,i]=Vo(e);return function(e,t,r,n){return`rgba(${Fo(0,255,e).toFixed()}, ${Fo(0,255,t).toFixed()}, ${Fo(0,255,r).toFixed()}, ${parseFloat(Fo(0,1,n).toFixed(3))})`}(r,n,o,i-t)}var ei=n("am",((e,t,r)=>{const n=function(e,t,r,n,o){for(t=t.split?t.split("."):t,n=0;n{const t=Fo(0,255,e).toString(16);return 1===t.length?`0${t}`:t};i(t),i(r),i(n),o<1&&i(Math.round(255*o))}(n),n}catch{return null!=r?r:"#000000"}})),ti=e=>t=>{const r=(e=>{const[t,r,n]=Vo(e);return(299*t+587*r+114*n)/1e3})(ei(t,e));return r<128?"dark":"light"},ri=(e,t)=>r=>Jo(ei(r,e),1-t);function ni(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient(\n 45deg,\n ${t} 25%,\n transparent 25%,\n transparent 50%,\n ${t} 50%,\n ${t} 75%,\n transparent 75%,\n transparent\n )`,backgroundSize:`${e} ${e}`}}function oi(e){const t=`#${Math.floor(16777215*Math.random()).toString(16).padEnd(6,"0")}`;return e&&(r=e,0!==Object.keys(r).length)?e.string&&e.colors?function(e,t){let r=0;if(0===e.length)return t[0];for(let n=0;n>8*n&255).toString(16)}`.substr(-2)}return r}(e.string):e.colors&&!e.string?function(e){return e[Math.floor(Math.random()*e.length)]}(e.colors):t:t;var r}function ii(e,t){return r=>"dark"===r.colorMode?t:e}function ai(e){const{orientation:t,vertical:r,horizontal:n}=e;return t?"vertical"===t?r:n:{}}function si(e){return Xt(e)&&e.reference?e.reference:String(e)}var li=(e,...t)=>t.map(si).join(` ${e} `).replace(/calc/g,""),ci=(...e)=>`calc(${li("+",...e)})`,ui=(...e)=>`calc(${li("-",...e)})`,di=(...e)=>`calc(${li("*",...e)})`,pi=(...e)=>`calc(${li("/",...e)})`,fi=e=>{const t=si(e);return null==t||Number.isNaN(parseFloat(t))?di(t,-1):String(t).startsWith("-")?String(t).slice(1):`-${t}`},hi=Object.assign((e=>({add:(...t)=>hi(ci(e,...t)),subtract:(...t)=>hi(ui(e,...t)),multiply:(...t)=>hi(di(e,...t)),divide:(...t)=>hi(pi(e,...t)),negate:()=>hi(fi(e)),toString:()=>e.toString()})),{add:ci,subtract:ui,multiply:di,divide:pi,negate:fi});function mi(e){const t=function(e,t="-"){return e.replace(/\s+/g,t)}(e.toString());return t.includes("\\.")?e:function(e){return!Number.isInteger(parseFloat(e.toString()))}(e)?t.replace(".","\\."):e}function vi(e,t){return`var(${mi(e)}${t?`, ${t}`:""})`}function gi(e,t=""){return`--${function(e,t=""){return[t,mi(e)].filter(Boolean).join("-")}(e,t)}`}function bi(e,t){const r=gi(e,void 0);return{variable:r,reference:vi(r,yi(void 0))}}function yi(e){return"string"==typeof e?e:null==e?void 0:e.reference}var{defineMultiStyleConfig:xi,definePartsStyle:wi}=Ln(Io.keys),ki=bi("switch-track-width"),Si=bi("switch-track-height"),Ci=bi("switch-track-diff"),Ei=hi.subtract(ki,Si),_i=bi("switch-thumb-x"),Pi=bi("switch-bg"),Ai=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[ki.reference],height:[Si.reference],transitionProperty:"common",transitionDuration:"fast",[Pi.variable]:"colors.gray.300",_dark:{[Pi.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Pi.variable]:`colors.${t}.500`,_dark:{[Pi.variable]:`colors.${t}.200`}},bg:Pi.reference}},Ti={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Si.reference],height:[Si.reference],_checked:{transform:`translateX(${_i.reference})`}},ji=xi({baseStyle:wi((e=>({container:{[Ci.variable]:Ei,[_i.variable]:Ci.reference,_rtl:{[_i.variable]:hi(Ci).negate().toString()}},track:Ai(e),thumb:Ti}))),sizes:{sm:wi({container:{[ki.variable]:"1.375rem",[Si.variable]:"sizes.3"}}),md:wi({container:{[ki.variable]:"1.875rem",[Si.variable]:"sizes.4"}}),lg:wi({container:{[ki.variable]:"2.875rem",[Si.variable]:"sizes.6"}})},defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Ri,definePartsStyle:Oi}=Ln(No.keys),Mi=Oi({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),Ii={"&[data-is-numeric=true]":{textAlign:"end"}},Ni=Oi((e=>{const{colorScheme:t}=e;return{th:{color:ii("gray.600","gray.400")(e),borderBottom:"1px",borderColor:ii(`${t}.100`,`${t}.700`)(e),...Ii},td:{borderBottom:"1px",borderColor:ii(`${t}.100`,`${t}.700`)(e),...Ii},caption:{color:ii("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}})),Di=Oi((e=>{const{colorScheme:t}=e;return{th:{color:ii("gray.600","gray.400")(e),borderBottom:"1px",borderColor:ii(`${t}.100`,`${t}.700`)(e),...Ii},td:{borderBottom:"1px",borderColor:ii(`${t}.100`,`${t}.700`)(e),...Ii},caption:{color:ii("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:ii(`${t}.100`,`${t}.700`)(e)},td:{background:ii(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}})),zi=Ri({baseStyle:Mi,variants:{simple:Ni,striped:Di,unstyled:{}},sizes:{sm:Oi({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:Oi({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:Oi({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),Bi=tn("tabs-color"),Fi=tn("tabs-bg"),Li=tn("tabs-border-color"),{defineMultiStyleConfig:$i,definePartsStyle:Vi}=Ln(Do.keys),Wi=e=>{const{orientation:t}=e;return{display:"vertical"===t?"flex":"block"}},Hi=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},Ui=e=>{const{align:t="start",orientation:r}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:"vertical"===r?"column":"row"}},qi={p:4},Xi=Vi((e=>({root:Wi(e),tab:Hi(e),tablist:Ui(e),tabpanel:qi}))),Yi={sm:Vi({tab:{py:1,px:4,fontSize:"sm"}}),md:Vi({tab:{fontSize:"md",py:2,px:4}}),lg:Vi({tab:{fontSize:"lg",py:3,px:4}})},Gi=Vi((e=>{const{colorScheme:t,orientation:r}=e,n="vertical"===r,o=n?"borderStart":"borderBottom";return{tablist:{[o]:"2px solid",borderColor:"inherit"},tab:{[o]:"2px solid",borderColor:"transparent",[n?"marginStart":"marginBottom"]:"-2px",_selected:{[Bi.variable]:`colors.${t}.600`,_dark:{[Bi.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[Fi.variable]:"colors.gray.200",_dark:{[Fi.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:Bi.reference,bg:Fi.reference}}})),Ki=Vi((e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Li.variable]:"transparent",_selected:{[Bi.variable]:`colors.${t}.600`,[Li.variable]:"colors.white",_dark:{[Bi.variable]:`colors.${t}.300`,[Li.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Li.reference},color:Bi.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}})),Zi=Vi((e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[Fi.variable]:"colors.gray.50",_dark:{[Fi.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[Fi.variable]:"colors.white",[Bi.variable]:`colors.${t}.600`,_dark:{[Fi.variable]:"colors.gray.800",[Bi.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:Bi.reference,bg:Fi.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}})),Qi=Vi((e=>{const{colorScheme:t,theme:r}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:ei(r,`${t}.700`),bg:ei(r,`${t}.100`)}}}})),Ji=Vi((e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[Bi.variable]:"colors.gray.600",_dark:{[Bi.variable]:"inherit"},_selected:{[Bi.variable]:"colors.white",[Fi.variable]:`colors.${t}.600`,_dark:{[Bi.variable]:"colors.gray.800",[Fi.variable]:`colors.${t}.300`}},color:Bi.reference,bg:Fi.reference}}})),ea=$i({baseStyle:Xi,sizes:Yi,variants:{line:Gi,enclosed:Ki,"enclosed-colored":Zi,"soft-rounded":Qi,"solid-rounded":Ji,unstyled:Vi({})},defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),ta=function(e,t){const r={};for(const n of t)if(Array.isArray(n)){const[t,o]=n;r[t]=tn(`${e}-${t}`,o)}else r[n]=tn(`${e}-${n}`);return r}("badge",["bg","color","shadow"]),ra=e=>{const{colorScheme:t,theme:r}=e,n=ri(`${t}.500`,.6)(r);return{[ta.bg.variable]:`colors.${t}.500`,[ta.color.variable]:"colors.white",_dark:{[ta.bg.variable]:n,[ta.color.variable]:"colors.whiteAlpha.800"}}},na=e=>{const{colorScheme:t,theme:r}=e,n=ri(`${t}.200`,.16)(r);return{[ta.bg.variable]:`colors.${t}.100`,[ta.color.variable]:`colors.${t}.800`,_dark:{[ta.bg.variable]:n,[ta.color.variable]:`colors.${t}.200`}}},oa=e=>{const{colorScheme:t,theme:r}=e,n=ri(`${t}.200`,.8)(r);return{[ta.color.variable]:`colors.${t}.500`,_dark:{[ta.color.variable]:n},[ta.shadow.variable]:`inset 0 0 0px 1px ${ta.color.reference}`}},ia={baseStyle:{px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:ta.bg.reference,color:ta.color.reference,boxShadow:ta.shadow.reference},variants:{solid:ra,subtle:na,outline:oa},defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:aa,definePartsStyle:sa}=Ln(zo.keys),la=tn("tag-bg"),ca=tn("tag-color"),ua=tn("tag-shadow"),da=tn("tag-min-height"),pa=tn("tag-min-width"),fa=tn("tag-font-size"),ha=tn("tag-padding-inline"),ma=sa({container:{fontWeight:"medium",lineHeight:1.2,outline:0,[ca.variable]:ta.color.reference,[la.variable]:ta.bg.reference,[ua.variable]:ta.shadow.reference,color:ca.reference,bg:la.reference,boxShadow:ua.reference,borderRadius:"md",minH:da.reference,minW:pa.reference,fontSize:fa.reference,px:ha.reference,_focusVisible:{[ua.variable]:"shadows.outline"}},label:{lineHeight:1.2,overflow:"visible"},closeButton:{fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}}}),va={sm:sa({container:{[da.variable]:"sizes.5",[pa.variable]:"sizes.5",[fa.variable]:"fontSizes.xs",[ha.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:sa({container:{[da.variable]:"sizes.6",[pa.variable]:"sizes.6",[fa.variable]:"fontSizes.sm",[ha.variable]:"space.2"}}),lg:sa({container:{[da.variable]:"sizes.8",[pa.variable]:"sizes.8",[fa.variable]:"fontSizes.md",[ha.variable]:"space.3"}})},ga={subtle:sa((e=>{var t;return{container:null==(t=ia.variants)?void 0:t.subtle(e)}})),solid:sa((e=>{var t;return{container:null==(t=ia.variants)?void 0:t.solid(e)}})),outline:sa((e=>{var t;return{container:null==(t=ia.variants)?void 0:t.outline(e)}}))},ba=aa({variants:ga,baseStyle:ma,sizes:va,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:ya,defineMultiStyleConfig:xa}=Ln(So.keys),wa=tn("input-height"),ka=tn("input-font-size"),Sa=tn("input-padding"),Ca=tn("input-border-radius"),Ea=ya({addon:{height:wa.reference,fontSize:ka.reference,px:Sa.reference,borderRadius:Ca.reference},field:{width:"100%",height:wa.reference,fontSize:ka.reference,px:Sa.reference,borderRadius:Ca.reference,minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),_a={lg:{[ka.variable]:"fontSizes.lg",[Sa.variable]:"space.4",[Ca.variable]:"radii.md",[wa.variable]:"sizes.12"},md:{[ka.variable]:"fontSizes.md",[Sa.variable]:"space.4",[Ca.variable]:"radii.md",[wa.variable]:"sizes.10"},sm:{[ka.variable]:"fontSizes.sm",[Sa.variable]:"space.3",[Ca.variable]:"radii.sm",[wa.variable]:"sizes.8"},xs:{[ka.variable]:"fontSizes.xs",[Sa.variable]:"space.2",[Ca.variable]:"radii.sm",[wa.variable]:"sizes.6"}},Pa={lg:ya({field:_a.lg,group:_a.lg}),md:ya({field:_a.md,group:_a.md}),sm:ya({field:_a.sm,group:_a.sm}),xs:ya({field:_a.xs,group:_a.xs})};function Aa(e){const{focusBorderColor:t,errorBorderColor:r}=e;return{focusBorderColor:t||ii("blue.500","blue.300")(e),errorBorderColor:r||ii("red.500","red.300")(e)}}var Ta,ja,Ra,Oa,Ma,Ia,Na,Da,za,Ba,Fa,La=ya((e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=Aa(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:ii("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:ei(t,n),boxShadow:`0 0 0 1px ${ei(t,n)}`},_focusVisible:{zIndex:1,borderColor:ei(t,r),boxShadow:`0 0 0 1px ${ei(t,r)}`}},addon:{border:"1px solid",borderColor:ii("inherit","whiteAlpha.50")(e),bg:ii("gray.100","whiteAlpha.300")(e)}}})),$a=ya((e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=Aa(e);return{field:{border:"2px solid",borderColor:"transparent",bg:ii("gray.100","whiteAlpha.50")(e),_hover:{bg:ii("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:ei(t,n)},_focusVisible:{bg:"transparent",borderColor:ei(t,r)}},addon:{border:"2px solid",borderColor:"transparent",bg:ii("gray.100","whiteAlpha.50")(e)}}})),Va=ya((e=>{const{theme:t}=e,{focusBorderColor:r,errorBorderColor:n}=Aa(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:ei(t,n),boxShadow:`0px 1px 0px 0px ${ei(t,n)}`},_focusVisible:{borderColor:ei(t,r),boxShadow:`0px 1px 0px 0px ${ei(t,r)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}})),Wa=xa({baseStyle:Ea,sizes:Pa,variants:{outline:La,filled:$a,flushed:Va,unstyled:ya({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}})},defaultProps:{size:"md",variant:"outline"}}),Ha={...null==(Ta=Wa.baseStyle)?void 0:Ta.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},Ua={outline:e=>{var t,r;return null!=(r=null==(t=Wa.variants)?void 0:t.outline(e).field)?r:{}},flushed:e=>{var t,r;return null!=(r=null==(t=Wa.variants)?void 0:t.flushed(e).field)?r:{}},filled:e=>{var t,r;return null!=(r=null==(t=Wa.variants)?void 0:t.filled(e).field)?r:{}},unstyled:null!=(Ra=null==(ja=Wa.variants)?void 0:ja.unstyled.field)?Ra:{}},qa={baseStyle:Ha,sizes:{xs:null!=(Ma=null==(Oa=Wa.sizes)?void 0:Oa.xs.field)?Ma:{},sm:null!=(Na=null==(Ia=Wa.sizes)?void 0:Ia.sm.field)?Na:{},md:null!=(za=null==(Da=Wa.sizes)?void 0:Da.md.field)?za:{},lg:null!=(Fa=null==(Ba=Wa.sizes)?void 0:Ba.lg.field)?Fa:{}},variants:Ua,defaultProps:{size:"md",variant:"outline"}},Xa=bi("tooltip-bg"),Ya=bi("tooltip-fg"),Ga=bi("popper-arrow-bg"),Ka={baseStyle:{bg:Xa.reference,color:Ya.reference,[Xa.variable]:"colors.gray.700",[Ya.variable]:"colors.whiteAlpha.900",_dark:{[Xa.variable]:"colors.gray.300",[Ya.variable]:"colors.gray.900"},[Ga.variable]:Xa.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"}},{defineMultiStyleConfig:Za,definePartsStyle:Qa}=Ln(To.keys),Ja=e=>{const{colorScheme:t,theme:r,isIndeterminate:n,hasStripe:o}=e,i=ii(ni(),ni("1rem","rgba(0,0,0,0.1)"))(e),a=ii(`${t}.500`,`${t}.200`)(e),s=`linear-gradient(\n to right,\n transparent 0%,\n ${ei(r,a)} 50%,\n transparent 100%\n )`;return{...!n&&o&&i,...n?{bgImage:s}:{bgColor:a}}},es={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},ts=e=>({bg:ii("gray.100","whiteAlpha.300")(e)}),rs=e=>({transitionProperty:"common",transitionDuration:"slow",...Ja(e)}),ns=Qa((e=>({label:es,filledTrack:rs(e),track:ts(e)}))),os=Za({sizes:{xs:Qa({track:{h:"1"}}),sm:Qa({track:{h:"2"}}),md:Qa({track:{h:"3"}}),lg:Qa({track:{h:"4"}})},baseStyle:ns,defaultProps:{size:"md",colorScheme:"blue"}});function is(e,...t){return"function"==typeof e?e(...t):e}var as,ss,ls,cs,us,ds,ps,fs,hs,{definePartsStyle:ms,defineMultiStyleConfig:vs}=Ln(bo.keys),gs=tn("checkbox-size"),bs=e=>{const{colorScheme:t}=e;return{w:gs.reference,h:gs.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:ii(`${t}.500`,`${t}.200`)(e),borderColor:ii(`${t}.500`,`${t}.200`)(e),color:ii("white","gray.900")(e),_hover:{bg:ii(`${t}.600`,`${t}.300`)(e),borderColor:ii(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:ii("gray.200","transparent")(e),bg:ii("gray.200","whiteAlpha.300")(e),color:ii("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:ii(`${t}.500`,`${t}.200`)(e),borderColor:ii(`${t}.500`,`${t}.200`)(e),color:ii("white","gray.900")(e)},_disabled:{bg:ii("gray.100","whiteAlpha.100")(e),borderColor:ii("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:ii("red.500","red.300")(e)}}},ys={_disabled:{cursor:"not-allowed"}},xs={userSelect:"none",_disabled:{opacity:.4}},ws={transitionProperty:"transform",transitionDuration:"normal"},ks=vs({baseStyle:ms((e=>({icon:ws,container:ys,control:is(bs,e),label:xs}))),sizes:{sm:ms({control:{[gs.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:ms({control:{[gs.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:ms({control:{[gs.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Ss,definePartsStyle:Cs}=Ln(jo.keys),Es=e=>{var t;const r=null==(t=is(ks.baseStyle,e))?void 0:t.control;return{...r,borderRadius:"full",_checked:{...null==r?void 0:r._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},_s=Cs((e=>{var t,r,n,o;return{label:null==(r=(t=ks).baseStyle)?void 0:r.call(t,e).label,container:null==(o=(n=ks).baseStyle)?void 0:o.call(n,e).container,control:Es(e)}})),Ps=Ss({baseStyle:_s,sizes:{md:Cs({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:Cs({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:Cs({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:As,definePartsStyle:Ts}=Ln(Ro.keys),js=tn("select-bg"),Rs={paddingInlineEnd:"8"},Os=As({baseStyle:Ts({field:{...null==(as=Wa.baseStyle)?void 0:as.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:js.reference,[js.variable]:"colors.white",_dark:{[js.variable]:"colors.gray.700"},"> option, > optgroup":{bg:js.reference}},icon:{width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}}}),sizes:{lg:{...null==(ss=Wa.sizes)?void 0:ss.lg,field:{...null==(ls=Wa.sizes)?void 0:ls.lg.field,...Rs}},md:{...null==(cs=Wa.sizes)?void 0:cs.md,field:{...null==(us=Wa.sizes)?void 0:us.md.field,...Rs}},sm:{...null==(ds=Wa.sizes)?void 0:ds.sm,field:{...null==(ps=Wa.sizes)?void 0:ps.sm.field,...Rs}},xs:{...null==(fs=Wa.sizes)?void 0:fs.xs,field:{...null==(hs=Wa.sizes)?void 0:hs.xs.field,...Rs},icon:{insetEnd:"1"}}},variants:Wa.variants,defaultProps:Wa.defaultProps}),Ms=tn("skeleton-start-color"),Is=tn("skeleton-end-color"),Ns={baseStyle:{[Ms.variable]:"colors.gray.100",[Is.variable]:"colors.gray.400",_dark:{[Ms.variable]:"colors.gray.800",[Is.variable]:"colors.gray.600"},background:Ms.reference,borderColor:Is.reference,opacity:.7,borderRadius:"sm"}},Ds=tn("skip-link-bg"),zs={baseStyle:{borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Ds.variable]:"colors.white",_dark:{[Ds.variable]:"colors.gray.700"},bg:Ds.reference}}},{defineMultiStyleConfig:Bs,definePartsStyle:Fs}=Ln(Oo.keys),Ls=tn("slider-thumb-size"),$s=tn("slider-track-size"),Vs=tn("slider-bg"),Ws=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...ai({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},Hs=e=>({...ai({orientation:e.orientation,horizontal:{h:$s.reference},vertical:{w:$s.reference}}),overflow:"hidden",borderRadius:"sm",[Vs.variable]:"colors.gray.200",_dark:{[Vs.variable]:"colors.whiteAlpha.200"},_disabled:{[Vs.variable]:"colors.gray.300",_dark:{[Vs.variable]:"colors.whiteAlpha.300"}},bg:Vs.reference}),Us=e=>{const{orientation:t}=e;return{...ai({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:Ls.reference,h:Ls.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},qs=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Vs.variable]:`colors.${t}.500`,_dark:{[Vs.variable]:`colors.${t}.200`},bg:Vs.reference}},Xs=Bs({baseStyle:Fs((e=>({container:Ws(e),track:Hs(e),thumb:Us(e),filledTrack:qs(e)}))),sizes:{lg:Fs({container:{[Ls.variable]:"sizes.4",[$s.variable]:"sizes.1"}}),md:Fs({container:{[Ls.variable]:"sizes.3.5",[$s.variable]:"sizes.1"}}),sm:Fs({container:{[Ls.variable]:"sizes.2.5",[$s.variable]:"sizes.0.5"}})},defaultProps:{size:"md",colorScheme:"blue"}}),Ys=bi("spinner-size"),Gs={baseStyle:{width:[Ys.reference],height:[Ys.reference]},sizes:{xs:{[Ys.variable]:"sizes.3"},sm:{[Ys.variable]:"sizes.4"},md:{[Ys.variable]:"sizes.6"},lg:{[Ys.variable]:"sizes.8"},xl:{[Ys.variable]:"sizes.12"}},defaultProps:{size:"md"}},{defineMultiStyleConfig:Ks,definePartsStyle:Zs}=Ln(Mo.keys),Qs=Ks({baseStyle:Zs({container:{},label:{fontWeight:"medium"},helpText:{opacity:.8,marginBottom:"2"},number:{verticalAlign:"baseline",fontWeight:"semibold"},icon:{marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"}}),sizes:{md:Zs({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},defaultProps:{size:"md"}}),Js=tn("kbd-bg"),el={baseStyle:{[Js.variable]:"colors.gray.100",_dark:{[Js.variable]:"colors.whiteAlpha.100"},bg:Js.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}},tl={baseStyle:{transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}}},{defineMultiStyleConfig:rl,definePartsStyle:nl}=Ln(Co.keys),ol=rl({baseStyle:nl({icon:{marginEnd:"2",display:"inline",verticalAlign:"text-bottom"}})}),{defineMultiStyleConfig:il,definePartsStyle:al}=Ln(Eo.keys),sl=tn("menu-bg"),ll=tn("menu-shadow"),cl=il({baseStyle:al({button:{transitionProperty:"common",transitionDuration:"normal"},list:{[sl.variable]:"#fff",[ll.variable]:"shadows.sm",_dark:{[sl.variable]:"colors.gray.700",[ll.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:sl.reference,boxShadow:ll.reference},item:{py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[sl.variable]:"colors.gray.100",_dark:{[sl.variable]:"colors.whiteAlpha.100"}},_active:{[sl.variable]:"colors.gray.200",_dark:{[sl.variable]:"colors.whiteAlpha.200"}},_expanded:{[sl.variable]:"colors.gray.100",_dark:{[sl.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:sl.reference},groupTitle:{mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},icon:{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},command:{opacity:.6},divider:{border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6}})}),{defineMultiStyleConfig:ul,definePartsStyle:dl}=Ln(_o.keys),pl=tn("modal-bg"),fl=tn("modal-shadow"),hl={bg:"blackAlpha.600",zIndex:"modal"},ml=e=>{const{isCentered:t,scrollBehavior:r}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:"inside"===r?"hidden":"auto",overscrollBehaviorY:"none"}},vl=e=>{const{isCentered:t,scrollBehavior:r}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:"inside"===r?"calc(100% - 7.5rem)":void 0,[pl.variable]:"colors.white",[fl.variable]:"shadows.lg",_dark:{[pl.variable]:"colors.gray.700",[fl.variable]:"shadows.dark-lg"},bg:pl.reference,boxShadow:fl.reference}},gl={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},bl={position:"absolute",top:"2",insetEnd:"3"},yl=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:"inside"===t?"auto":void 0}},xl={px:"6",py:"4"};function wl(e){return dl("full"===e?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var kl=ul({baseStyle:dl((e=>({overlay:hl,dialogContainer:is(ml,e),dialog:is(vl,e),header:gl,closeButton:bl,body:is(yl,e),footer:xl}))),sizes:{xs:wl("xs"),sm:wl("sm"),md:wl("md"),lg:wl("lg"),xl:wl("xl"),"2xl":wl("2xl"),"3xl":wl("3xl"),"4xl":wl("4xl"),"5xl":wl("5xl"),"6xl":wl("6xl"),full:wl("full")},defaultProps:{size:"md"}}),{defineMultiStyleConfig:Sl,definePartsStyle:Cl}=Ln(Po.keys),El=bi("number-input-stepper-width"),_l=bi("number-input-input-padding"),Pl=hi(El).add("0.5rem").toString(),Al=bi("number-input-bg"),Tl=bi("number-input-color"),jl=bi("number-input-border-color"),Rl={[El.variable]:"sizes.6",[_l.variable]:Pl},Ol=e=>{var t,r;return null!=(r=null==(t=is(Wa.baseStyle,e))?void 0:t.field)?r:{}},Ml={width:El.reference},Il={borderStart:"1px solid",borderStartColor:jl.reference,color:Tl.reference,bg:Al.reference,[Tl.variable]:"colors.chakra-body-text",[jl.variable]:"colors.chakra-border-color",_dark:{[Tl.variable]:"colors.whiteAlpha.800",[jl.variable]:"colors.whiteAlpha.300"},_active:{[Al.variable]:"colors.gray.200",_dark:{[Al.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},Nl=Cl((e=>{var t;return{root:Rl,field:null!=(t=is(Ol,e))?t:{},stepperGroup:Ml,stepper:Il}}));function Dl(e){var t,r,n;const o=null==(t=Wa.sizes)?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},a=null!=(n=null==(r=o.field)?void 0:r.fontSize)?n:"md",s=Jn.fontSizes[a];return Cl({field:{...o.field,paddingInlineEnd:_l.reference,verticalAlign:"top"},stepper:{fontSize:hi(s).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var zl,Bl,Fl,Ll=Sl({baseStyle:Nl,sizes:{xs:Dl("xs"),sm:Dl("sm"),md:Dl("md"),lg:Dl("lg")},variants:Wa.variants,defaultProps:Wa.defaultProps}),$l={...null==(zl=Wa.baseStyle)?void 0:zl.field,textAlign:"center"},Vl={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},Wl={outline:e=>{var t,r,n;return null!=(n=null==(r=is(null==(t=Wa.variants)?void 0:t.outline,e))?void 0:r.field)?n:{}},flushed:e=>{var t,r,n;return null!=(n=null==(r=is(null==(t=Wa.variants)?void 0:t.flushed,e))?void 0:r.field)?n:{}},filled:e=>{var t,r,n;return null!=(n=null==(r=is(null==(t=Wa.variants)?void 0:t.filled,e))?void 0:r.field)?n:{}},unstyled:null!=(Fl=null==(Bl=Wa.variants)?void 0:Bl.unstyled.field)?Fl:{}},Hl={baseStyle:$l,sizes:Vl,variants:Wl,defaultProps:Wa.defaultProps},{defineMultiStyleConfig:Ul,definePartsStyle:ql}=Ln(Ao.keys),Xl=bi("popper-bg"),Yl=bi("popper-arrow-bg"),Gl=bi("popper-arrow-shadow-color"),Kl=Ul({baseStyle:ql({popper:{zIndex:10},content:{[Xl.variable]:"colors.white",bg:Xl.reference,[Yl.variable]:Xl.reference,[Gl.variable]:"colors.gray.200",_dark:{[Xl.variable]:"colors.gray.700",[Gl.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},header:{px:3,py:2,borderBottomWidth:"1px"},body:{px:3,py:2},footer:{px:3,py:2,borderTopWidth:"1px"},closeButton:{position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2}})}),{definePartsStyle:Zl,defineMultiStyleConfig:Ql}=Ln(yo.keys),Jl=tn("drawer-bg"),ec=tn("drawer-box-shadow");function tc(e){return Zl("full"===e?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var rc={bg:"blackAlpha.600",zIndex:"modal"},nc={display:"flex",zIndex:"modal",justifyContent:"center"},oc=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Jl.variable]:"colors.white",[ec.variable]:"shadows.lg",_dark:{[Jl.variable]:"colors.gray.700",[ec.variable]:"shadows.dark-lg"},bg:Jl.reference,boxShadow:ec.reference}},ic={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},ac={position:"absolute",top:"2",insetEnd:"3"},sc={px:"6",py:"2",flex:"1",overflow:"auto"},lc={px:"6",py:"4"},cc=Ql({baseStyle:Zl((e=>({overlay:rc,dialogContainer:nc,dialog:is(oc,e),header:ic,closeButton:ac,body:sc,footer:lc}))),sizes:{xs:tc("xs"),sm:tc("md"),md:tc("lg"),lg:tc("2xl"),xl:tc("4xl"),full:tc("full")},defaultProps:{size:"xs"}}),{definePartsStyle:uc,defineMultiStyleConfig:dc}=Ln(xo.keys),pc=dc({baseStyle:uc({preview:{borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},input:{borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},textarea:{borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}}})}),{definePartsStyle:fc,defineMultiStyleConfig:hc}=Ln(wo.keys),mc=tn("form-control-color"),vc=hc({baseStyle:fc({container:{width:"100%",position:"relative"},requiredIndicator:{marginStart:"1",[mc.variable]:"colors.red.500",_dark:{[mc.variable]:"colors.red.300"},color:mc.reference},helperText:{mt:"2",[mc.variable]:"colors.gray.600",_dark:{[mc.variable]:"colors.whiteAlpha.600"},color:mc.reference,lineHeight:"normal",fontSize:"sm"}})}),{definePartsStyle:gc,defineMultiStyleConfig:bc}=Ln(ko.keys),yc=tn("form-error-color"),xc=bc({baseStyle:gc({text:{[yc.variable]:"colors.red.500",_dark:{[yc.variable]:"colors.red.300"},color:yc.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},icon:{marginEnd:"0.5em",[yc.variable]:"colors.red.500",_dark:{[yc.variable]:"colors.red.300"},color:yc.reference}})}),wc={baseStyle:{fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}}},kc={baseStyle:{fontFamily:"heading",fontWeight:"bold"},sizes:{"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},defaultProps:{size:"xl"}},{defineMultiStyleConfig:Sc,definePartsStyle:Cc}=Ln(go.keys),Ec=tn("breadcrumb-link-decor"),_c=Sc({baseStyle:Cc({link:{transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:Ec.reference,[Ec.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[Ec.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}}})}),Pc=e=>{const{colorScheme:t,theme:r}=e;if("gray"===t)return{color:ii("gray.800","whiteAlpha.900")(e),_hover:{bg:ii("gray.100","whiteAlpha.200")(e)},_active:{bg:ii("gray.200","whiteAlpha.300")(e)}};const n=ri(`${t}.200`,.12)(r),o=ri(`${t}.200`,.24)(r);return{color:ii(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:ii(`${t}.50`,n)(e)},_active:{bg:ii(`${t}.100`,o)(e)}}},Ac=e=>{const{colorScheme:t}=e,r=ii("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:"gray"===t?r:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...is(Pc,e)}},Tc={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},jc=e=>{var t;const{colorScheme:r}=e;if("gray"===r){const t=ii("gray.100","whiteAlpha.200")(e);return{bg:t,color:ii("gray.800","whiteAlpha.900")(e),_hover:{bg:ii("gray.200","whiteAlpha.300")(e),_disabled:{bg:t}},_active:{bg:ii("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${r}.500`,color:o="white",hoverBg:i=`${r}.600`,activeBg:a=`${r}.700`}=null!=(t=Tc[r])?t:{},s=ii(n,`${r}.200`)(e);return{bg:s,color:ii(o,"gray.800")(e),_hover:{bg:ii(i,`${r}.300`)(e),_disabled:{bg:s}},_active:{bg:ii(a,`${r}.400`)(e)}}},Rc=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:ii(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:ii(`${t}.700`,`${t}.500`)(e)}}},Oc={baseStyle:{lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},variants:{ghost:Pc,outline:Ac,solid:jc,link:Rc,unstyled:{bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"}},sizes:{lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Mc,defineMultiStyleConfig:Ic}=Ln(Bo.keys),Nc=tn("card-bg"),Dc=tn("card-padding"),zc=tn("card-shadow"),Bc=tn("card-radius"),Fc=tn("card-border-width","0"),Lc=tn("card-border-color"),$c=Mc({container:{[Nc.variable]:"colors.chakra-body-bg",backgroundColor:Nc.reference,boxShadow:zc.reference,borderRadius:Bc.reference,color:"chakra-body-text",borderWidth:Fc.reference,borderColor:Lc.reference},body:{padding:Dc.reference,flex:"1 1 0%"},header:{padding:Dc.reference},footer:{padding:Dc.reference}}),Vc={sm:Mc({container:{[Bc.variable]:"radii.base",[Dc.variable]:"space.3"}}),md:Mc({container:{[Bc.variable]:"radii.md",[Dc.variable]:"space.5"}}),lg:Mc({container:{[Bc.variable]:"radii.xl",[Dc.variable]:"space.7"}})},Wc=Ic({baseStyle:$c,variants:{elevated:Mc({container:{[zc.variable]:"shadows.base",_dark:{[Nc.variable]:"colors.gray.700"}}}),outline:Mc({container:{[Fc.variable]:"1px",[Lc.variable]:"colors.chakra-border-color"}}),filled:Mc({container:{[Nc.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[Dc.variable]:0},header:{[Dc.variable]:0},footer:{[Dc.variable]:0}}},sizes:Vc,defaultProps:{variant:"elevated",size:"md"}}),Hc=bi("close-button-size"),Uc=bi("close-button-bg"),qc={baseStyle:{w:[Hc.reference],h:[Hc.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Uc.variable]:"colors.blackAlpha.100",_dark:{[Uc.variable]:"colors.whiteAlpha.100"}},_active:{[Uc.variable]:"colors.blackAlpha.200",_dark:{[Uc.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Uc.reference},sizes:{lg:{[Hc.variable]:"sizes.10",fontSize:"md"},md:{[Hc.variable]:"sizes.8",fontSize:"xs"},sm:{[Hc.variable]:"sizes.6",fontSize:"2xs"}},defaultProps:{size:"md"}},{variants:Xc,defaultProps:Yc}=ia,Gc={baseStyle:{fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:ta.bg.reference,color:ta.color.reference,boxShadow:ta.shadow.reference},variants:Xc,defaultProps:Yc},Kc={baseStyle:{w:"100%",mx:"auto",maxW:"prose",px:"4"}},Zc={baseStyle:{opacity:.6,borderColor:"inherit"},variants:{solid:{borderStyle:"solid"},dashed:{borderStyle:"dashed"}},defaultProps:{variant:"solid"}},{definePartsStyle:Qc,defineMultiStyleConfig:Jc}=Ln(ho.keys),eu=Jc({baseStyle:Qc({container:{borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},button:{transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},panel:{pt:"2",px:"4",pb:"5"},icon:{fontSize:"1.25em"}})}),{definePartsStyle:tu,defineMultiStyleConfig:ru}=Ln(mo.keys),nu=tn("alert-fg"),ou=tn("alert-bg"),iu=tu({container:{bg:ou.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:nu.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:nu.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function au(e){const{theme:t,colorScheme:r}=e;return{light:`colors.${r}.100`,dark:ri(`${r}.200`,.16)(t)}}var su=tu((e=>{const{colorScheme:t}=e,r=au(e);return{container:{[nu.variable]:`colors.${t}.600`,[ou.variable]:r.light,_dark:{[nu.variable]:`colors.${t}.200`,[ou.variable]:r.dark}}}})),lu=tu((e=>{const{colorScheme:t}=e,r=au(e);return{container:{[nu.variable]:`colors.${t}.600`,[ou.variable]:r.light,_dark:{[nu.variable]:`colors.${t}.200`,[ou.variable]:r.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:nu.reference}}})),cu=tu((e=>{const{colorScheme:t}=e,r=au(e);return{container:{[nu.variable]:`colors.${t}.600`,[ou.variable]:r.light,_dark:{[nu.variable]:`colors.${t}.200`,[ou.variable]:r.dark},pt:"2",borderTopWidth:"4px",borderTopColor:nu.reference}}})),uu=tu((e=>{const{colorScheme:t}=e;return{container:{[nu.variable]:"colors.white",[ou.variable]:`colors.${t}.600`,_dark:{[nu.variable]:"colors.gray.900",[ou.variable]:`colors.${t}.200`},color:nu.reference}}})),du=ru({baseStyle:iu,variants:{subtle:su,"left-accent":lu,"top-accent":cu,solid:uu},defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:pu,defineMultiStyleConfig:fu}=Ln(vo.keys),hu=tn("avatar-border-color"),mu=tn("avatar-bg"),vu=tn("avatar-font-size"),gu=tn("avatar-size"),bu={borderRadius:"full",border:"0.2em solid",borderColor:hu.reference,[hu.variable]:"white",_dark:{[hu.variable]:"colors.gray.800"}},yu={bg:mu.reference,fontSize:vu.reference,width:gu.reference,height:gu.reference,lineHeight:"1",[mu.variable]:"colors.gray.200",_dark:{[mu.variable]:"colors.whiteAlpha.400"}},xu=e=>{const{name:t,theme:r}=e,n=t?oi({string:t}):"colors.gray.400",o=(e=>t=>"dark"===ti(e)(t))(n)(r);let i="white";return o||(i="gray.800"),{bg:mu.reference,fontSize:vu.reference,color:i,borderColor:hu.reference,verticalAlign:"top",width:gu.reference,height:gu.reference,"&:not([data-loaded])":{[mu.variable]:n},[hu.variable]:"colors.white",_dark:{[hu.variable]:"colors.gray.800"}}},wu={fontSize:vu.reference,lineHeight:"1"};function ku(e){const t="100%"!==e?to[e]:void 0;return pu({container:{[gu.variable]:null!=t?t:e,[vu.variable]:`calc(${null!=t?t:e} / 2.5)`},excessLabel:{[gu.variable]:null!=t?t:e,[vu.variable]:`calc(${null!=t?t:e} / 2.5)`}})}var Su=fu({baseStyle:pu((e=>({badge:is(bu,e),excessLabel:is(yu,e),container:is(xu,e),label:wu}))),sizes:{"2xs":ku(4),xs:ku(6),sm:ku(8),md:ku(12),lg:ku(16),xl:ku(24),"2xl":ku(32),full:ku("100%")},defaultProps:{size:"md"}}),Cu=n("an",{semanticTokens:{colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},direction:"ltr",...ro,components:{Accordion:eu,Alert:du,Avatar:Su,Badge:ia,Breadcrumb:_c,Button:Oc,Checkbox:ks,CloseButton:qc,Code:Gc,Container:Kc,Divider:Zc,Drawer:cc,Editable:pc,Form:vc,FormError:xc,FormLabel:wc,Heading:kc,Input:Wa,Kbd:el,Link:tl,List:ol,Menu:cl,Modal:kl,NumberInput:Ll,PinInput:Hl,Popover:Kl,Progress:os,Radio:Ps,Select:Os,Skeleton:Ns,SkipLink:zs,Slider:Xs,Spinner:Gs,Stat:Qs,Switch:ji,Table:zi,Tabs:ea,Tag:ba,Textarea:qa,Tooltip:Ka,Card:Wc,Stepper:po},styles:{global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color"}}},config:{useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"}});function Eu(e){return"function"==typeof e}var _u;n("ao",(_u=Cu,function(...e){let t=[...e],r=e[e.length-1];var n;return Xt(n=r)&&Hn.every((e=>Object.prototype.hasOwnProperty.call(n,e)))&&t.length>1?t=t.slice(0,t.length-1):r=_u,function(...e){return t=>e.reduce(((e,t)=>t(e)),t)}(...t.map((e=>t=>Eu(e)?e(t):function(...e){return rr({},...e,Pu)}(t,e))))(r)}));function Pu(e,t,r,n){if((Eu(e)||Eu(t))&&Object.prototype.hasOwnProperty.call(n,r))return(...r)=>{const n=Eu(e)?e(...r):e,o=Eu(t)?t(...r):t;return rr({},n,o,Pu)}}function Au(e){var t,r;return null!=(r=e)&&"object"==typeof r&&"nodeType"in r&&r.nodeType===Node.ELEMENT_NODE&&null!=(t=e.ownerDocument)?t:document}function Tu(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}var ju=Tu();function Ru(e,t){const r={};return Object.keys(e).forEach((n=>{t.includes(n)||(r[n]=e[n])})),r}var Ou=n("J",(e=>{const t=new WeakMap;return(r,n,o,i)=>{if(void 0===r)return e(r,n,o);t.has(r)||t.set(r,new Map);const a=t.get(r);if(a.has(n))return a.get(n);const s=e(r,n,o,i);return a.set(n,s),s}})((function(e,t,r,n){const o="string"==typeof t?t.split("."):[t];for(n=0;n{const o=e[n];t(o,n,e)&&(r[n]=o)})),r}var Iu=n("L",(e=>Mu(e,(e=>null!=e))));function Nu(e){return Array.isArray(e)}function Du(e){const t=typeof e;return null!=e&&("object"===t||"function"===t)&&!Nu(e)}function zu(e,...t){return"function"==typeof e?e(...t):e}function Bu(...e){return function(t){e.some((e=>(null==e||e(t),null==t?void 0:t.defaultPrevented)))}}const Fu=1/60*1e3,Lu="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),$u="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout((()=>e(Lu())),Fu);let Vu=!0,Wu=!1,Hu=!1;const Uu={delta:0,timestamp:0},qu=["read","update","preRender","render","postRender"],Xu=qu.reduce(((e,t)=>(e[t]=function(e){let t=[],r=[],n=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(e,i=!1,s=!1)=>{const l=s&&o,c=l?t:r;return i&&a.add(e),-1===c.indexOf(e)&&(c.push(e),l&&o&&(n=t.length)),e},cancel:e=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1),a.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,r]=[r,t],r.length=0,n=t.length,n)for(let r=0;rWu=!0)),e)),{}),Yu=qu.reduce(((e,t)=>{const r=Xu[t];return e[t]=(e,t=!1,n=!1)=>(Wu||Qu(),r.schedule(e,t,n)),e}),{}),Gu=qu.reduce(((e,t)=>(e[t]=Xu[t].cancel,e)),{});qu.reduce(((e,t)=>(e[t]=()=>Xu[t].process(Uu),e)),{});const Ku=e=>Xu[e].process(Uu),Zu=e=>{Wu=!1,Uu.delta=Vu?Fu:Math.max(Math.min(e-Uu.timestamp,40),1),Uu.timestamp=e,Hu=!0,qu.forEach(Ku),Hu=!1,Wu&&(Vu=!1,$u(Zu))},Qu=()=>{Wu=!0,Vu=!0,Hu||$u(Zu)},Ju=()=>Uu;function ed(e,t,r=1,n=!0){const o=t-1;if(-1===e)return r>0?0:o;const i=e+r;return i<0?n?o:0:i>=t?n?0:e>t?t:e:i}var td="undefined"!=typeof Element,rd="function"==typeof Map,nd="function"==typeof Set,od="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function id(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var r,n,o,i;if(Array.isArray(e)){if((r=e.length)!=t.length)return!1;for(n=r;0!=n--;)if(!id(e[n],t[n]))return!1;return!0}if(rd&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!t.has(n.value[0]))return!1;for(i=e.entries();!(n=i.next()).done;)if(!id(n.value[1],t.get(n.value[0])))return!1;return!0}if(nd&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(od&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((r=e.length)!=t.length)return!1;for(n=r;0!=n--;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof t.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof t.toString)return e.toString()===t.toString();if((r=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;if(td&&e instanceof Element)return!1;for(n=r;0!=n--;)if(("_owner"!==o[n]&&"__v"!==o[n]&&"__o"!==o[n]||!e.$$typeof)&&!id(e[o[n]],t[o[n]]))return!1;return!0}return e!=e&&t!=t}var ad=function(e,t){try{return id(e,t)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const sd=l(ad);function ld(e,t={}){var r;const{styleConfig:n,...o}=t,{theme:a,colorMode:s}=Ut(),l=e?Ou(a,`components.${e}`):void 0,c=n||l,u=rr({theme:a,colorMode:s},null!=(r=null==c?void 0:c.defaultProps)?r:{},Iu(Ru(o,["children"]))),d=i.useRef({});if(c){const e=function(e){return t=>{var r;const{variant:n,size:o,theme:i}=t,a=Vn(i);return rr({},Gt(null!=(r=e.baseStyle)?r:{},t),a(e,"sizes",o,t),a(e,"variants",n,t))}}(c),t=e(u);sd(d.current,t)||(d.current=t)}return d.current}function cd(e,t={}){return ld(e,t)}function ud(e,t={}){return ld(e,t)}var dd=new Set([...Mn,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),pd=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function fd(e){return pd.has(e)||!dd.has(e)}function hd(e){const t=Object.assign({},e);for(let r in t)void 0===t[r]&&delete t[r];return t}var md,vd=/^((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|disableRemotePlayback|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)-.*))$/,gd=me((function(e){return vd.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),bd=function(e){return"theme"!==e},yd=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?gd:bd},xd=function(e,t,r){var n;if(t){var o=t.shouldForwardProp;n=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},wd=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return Ke(t,r,n),ut((function(){return Ze(t,r,n)})),null},kd=n("n",function e(t,r){var n,o,a=t.__emotion_real===t,s=a&&t.__emotion_base||t;void 0!==r&&(n=r.label,o=r.target);var l=xd(t,r,a),c=l||yd(s),u=!c("as");return function(){var d=arguments,p=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==n&&p.push("label:"+n+";"),null==d[0]||void 0===d[0].raw)p.push.apply(p,d);else{p.push(d[0][0]);for(var f=d.length,h=1;ht=>{const{theme:r,css:n,__css:o,sx:i,...a}=t,s=Mu(a,((e,t)=>Nn(t))),l=function(e,...t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");const r={...e};for(const n of t)if(null!=n)for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(e in r&&delete r[e],r[e]=n[e]);return r}({},o,zu(e,t),Iu(s),i),c=Fn(l)(t.theme);return n?[c,n]:c};function Ed(e,t){const{baseStyle:r,...n}=null!=t?t:{};n.shouldForwardProp||(n.shouldForwardProp=fd);const o=Cd({baseStyle:r}),i=Sd(e,n)(o);return u.forwardRef((function(e,t){const{colorMode:r,forced:n}=Bt();return u.createElement(i,{ref:t,"data-theme":n?r:void 0,...e})}))}var _d=n("c",function(){const e=new Map;return new Proxy(Ed,{apply:(e,t,r)=>Ed(...r),get:(t,r)=>(e.has(r)||e.set(r,Ed(r)),e.get(r))})}());function Pd(e){return i.forwardRef(e)}function Ad(e={}){const{strict:t=!0,errorMessage:r="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:n}=e,o=i.createContext(void 0);return o.displayName=n,[o.Provider,function e(){var n;const a=i.useContext(o);if(!a&&t){const t=new Error(r);throw t.name="ContextError",null==(n=Error.captureStackTrace)||n.call(Error,t,e),t}return a},o]}function Td(e){const{cssVarsRoot:t,theme:r,children:n}=e,o=i.useMemo((()=>Tn(r)),[r]);return y.jsxs(vt,{theme:o,children:[y.jsx(jd,{root:t}),n]})}function jd({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return y.jsx(gt,{styles:e=>({[t]:e.__cssVars})})}function Rd(){const{colorMode:e}=Bt();return y.jsx(gt,{styles:t=>{const r=zu(Ou(t,"styles.global"),{theme:t,colorMode:e});if(!r)return;return Fn(r)(t)}})}Ad({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});var Od=i.createContext({getDocument:()=>document,getWindow:()=>window});function Md(e){const{children:t,environment:r,disabled:n}=e,o=i.useRef(null),a=i.useMemo((()=>r||{getDocument:()=>{var e,t;return null!=(t=null==(e=o.current)?void 0:e.ownerDocument)?t:document},getWindow:()=>{var e,t;return null!=(t=null==(e=o.current)?void 0:e.ownerDocument.defaultView)?t:window}}),[r]),s=!n||!r;return y.jsxs(Od.Provider,{value:a,children:[t,s&&y.jsx("span",{id:"__chakra_env",hidden:!0,ref:o})]})}Od.displayName="EnvironmentContext",Md.displayName="EnvironmentProvider";var Id=e=>{const{children:t,colorModeManager:r,portalZIndex:n,resetScope:o,resetCSS:i=!0,theme:a={},environment:s,cssVarsRoot:l,disableEnvironment:c,disableGlobalStyle:u}=e,d=y.jsx(Md,{environment:s,disabled:c,children:t});return y.jsx(Td,{theme:a,cssVarsRoot:l,children:y.jsxs(Ht,{colorModeManager:r,options:a.config,children:[i?y.jsx(St,{scope:o}):y.jsx(kt,{}),!u&&y.jsx(Rd,{}),n?y.jsx(Pt,{zIndex:n,children:d}):d]})})},Nd=(e,t)=>e.find((e=>e.id===t));function Dd(e,t){const r=zd(e,t);return{position:r,index:r?e[r].findIndex((e=>e.id===t)):-1}}function zd(e,t){for(const[r,n]of Object.entries(e))if(Nd(n,t))return r}function Bd(e){return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:"top"===e||"bottom"===e?"0 auto":void 0,top:e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,bottom:e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,right:e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",left:e.includes("right")?void 0:"env(safe-area-inset-left, 0px)"}}function Fd(e,t=[]){const r=i.useRef(e);return i.useEffect((()=>{r.current=e})),i.useCallback(((...e)=>{var t;return null==(t=r.current)?void 0:t.call(r,...e)}),t)}function Ld(e,t){const r=i.useRef(!1),n=i.useRef(!1);i.useEffect((()=>{if(r.current&&n.current)return e();n.current=!0}),t),i.useEffect((()=>(r.current=!0,()=>{r.current=!1})),[])}const $d=i.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Vd=i.createContext({}),Wd=i.createContext(null),Hd="undefined"!=typeof document,Ud=Hd?i.useLayoutEffect:i.useEffect,qd=i.createContext({strict:!1}),Xd=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),Yd="data-"+Xd("framerAppearId");function Gd(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Kd(e){return"string"==typeof e||Array.isArray(e)}function Zd(e){return"object"==typeof e&&"function"==typeof e.start}const Qd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Jd=["initial",...Qd];function ep(e){return Zd(e.animate)||Jd.some((t=>Kd(e[t])))}function tp(e){return Boolean(ep(e)||e.variants)}function rp(e){const{initial:t,animate:r}=function(e,t){if(ep(e)){const{initial:t,animate:r}=e;return{initial:!1===t||Kd(t)?t:void 0,animate:Kd(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,i.useContext(Vd));return i.useMemo((()=>({initial:t,animate:r})),[np(t),np(r)])}function np(e){return Array.isArray(e)?e.join(" "):e}const op={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ip={};for(const e in op)ip[e]={isEnabled:t=>op[e].some((e=>!!t[e]))};const ap=i.createContext({}),sp=i.createContext({}),lp=Symbol.for("motionComponentSymbol");function cp({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:o}){e&&function(e){for(const t in e)ip[t]={...ip[t],...e[t]}}(e);const a=i.forwardRef((function(a,s){let l;const c={...i.useContext($d),...a,layoutId:up(a)},{isStatic:u}=c,d=rp(a),p=n(a,u);if(!u&&Hd){d.visualElement=function(e,t,r,n){const{visualElement:o}=i.useContext(Vd),a=i.useContext(qd),s=i.useContext(Wd),l=i.useContext($d).reducedMotion,c=i.useRef();n=n||a.renderer,!c.current&&n&&(c.current=n(e,{visualState:t,parent:o,props:r,presenceContext:s,blockInitialAnimation:!!s&&!1===s.initial,reducedMotionConfig:l}));const u=c.current;i.useInsertionEffect((()=>{u&&u.update(r,s)}));const d=i.useRef(Boolean(r[Yd]&&!window.HandoffComplete));return Ud((()=>{u&&(u.render(),d.current&&u.animationState&&u.animationState.animateChanges())})),i.useEffect((()=>{u&&(u.updateFeatures(),!d.current&&u.animationState&&u.animationState.animateChanges(),d.current&&(d.current=!1,window.HandoffComplete=!0))})),u}(o,p,c,t);const r=i.useContext(sp),n=i.useContext(qd).strict;d.visualElement&&(l=d.visualElement.loadFeatures(c,n,e,r))}return i.createElement(Vd.Provider,{value:d},l&&d.visualElement?i.createElement(l,{visualElement:d.visualElement,...c}):null,r(o,a,function(e,t,r){return i.useCallback((n=>{n&&e.mount&&e.mount(n),t&&(n?t.mount(n):t.unmount()),r&&("function"==typeof r?r(n):Gd(r)&&(r.current=n))}),[t])}(p,d.visualElement,s),p,u,d.visualElement))}));return a[lp]=o,a}function up({layoutId:e}){const t=i.useContext(ap).id;return t&&void 0!==e?t+"-"+e:e}function dp(e){function t(t,r={}){return cp(e(t,r))}if("undefined"==typeof Proxy)return t;const r=new Map;return new Proxy(t,{get:(e,n)=>(r.has(n)||r.set(n,t(n)),r.get(n))})}const pp=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function fp(e){return"string"==typeof e&&!e.includes("-")&&!!(pp.indexOf(e)>-1||/[A-Z]/.test(e))}const hp={};const mp=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vp=new Set(mp);function gp(e,{layout:t,layoutId:r}){return vp.has(e)||e.startsWith("origin")||(t||void 0!==r)&&(!!hp[e]||"opacity"===e)}const bp=e=>Boolean(e&&e.getVelocity),yp={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xp=mp.length;const wp=e=>t=>"string"==typeof t&&t.startsWith(e),kp=wp("--"),Sp=wp("var(--"),Cp=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Ep=(e,t,r)=>Math.min(Math.max(r,e),t),_p={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Pp={..._p,transform:e=>Ep(0,1,e)},Ap={..._p,default:1},Tp=e=>Math.round(1e5*e)/1e5,jp=/(-)?([\d]*\.?[\d])+/g,Rp=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Op=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Mp(e){return"string"==typeof e}const Ip=e=>({test:t=>Mp(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Np=Ip("deg"),Dp=Ip("%"),zp=Ip("px"),Bp=Ip("vh"),Fp=Ip("vw"),Lp={...Dp,parse:e=>Dp.parse(e)/100,transform:e=>Dp.transform(100*e)},$p={..._p,transform:Math.round},Vp={borderWidth:zp,borderTopWidth:zp,borderRightWidth:zp,borderBottomWidth:zp,borderLeftWidth:zp,borderRadius:zp,radius:zp,borderTopLeftRadius:zp,borderTopRightRadius:zp,borderBottomRightRadius:zp,borderBottomLeftRadius:zp,width:zp,maxWidth:zp,height:zp,maxHeight:zp,size:zp,top:zp,right:zp,bottom:zp,left:zp,padding:zp,paddingTop:zp,paddingRight:zp,paddingBottom:zp,paddingLeft:zp,margin:zp,marginTop:zp,marginRight:zp,marginBottom:zp,marginLeft:zp,rotate:Np,rotateX:Np,rotateY:Np,rotateZ:Np,scale:Ap,scaleX:Ap,scaleY:Ap,scaleZ:Ap,skew:Np,skewX:Np,skewY:Np,distance:zp,translateX:zp,translateY:zp,translateZ:zp,x:zp,y:zp,z:zp,perspective:zp,transformPerspective:zp,opacity:Pp,originX:Lp,originY:Lp,originZ:zp,zIndex:$p,fillOpacity:Pp,strokeOpacity:Pp,numOctaves:$p};function Wp(e,t,r,n){const{style:o,vars:i,transform:a,transformOrigin:s}=e;let l=!1,c=!1,u=!0;for(const d in t){const e=t[d];if(kp(d)){i[d]=e;continue}const r=Vp[d],n=Cp(e,r);if(vp.has(d)){if(l=!0,a[d]=n,!u)continue;e!==(r.default||0)&&(u=!1)}else d.startsWith("origin")?(c=!0,s[d]=n):o[d]=n}if(t.transform||(l||n?o.transform=function(e,{enableHardwareAcceleration:t=!0,allowTransformNone:r=!0},n,o){let i="";for(let a=0;a({style:{},transform:{},transformOrigin:{},vars:{}});function Up(e,t,r){for(const n in t)bp(t[n])||gp(n,r)||(e[n]=t[n])}function qp(e,t,r){const n={};return Up(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t,r){return i.useMemo((()=>{const n=Hp();return Wp(n,t,{enableHardwareAcceleration:!r},e),Object.assign({},n.vars,n.style)}),[t])}(e,t,r)),e.transformValues?e.transformValues(n):n}function Xp(e,t,r){const n={},o=qp(e,t,r);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}const Yp=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Gp(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||Yp.has(e)}let Kp=e=>!Gp(e);try{(Zp=require("@emotion/is-prop-valid").default)&&(Kp=e=>e.startsWith("on")?!Gp(e):Zp(e))}catch(mS){}var Zp;function Qp(e,t,r){return"string"==typeof e?e:zp.transform(t+r*e)}const Jp={offset:"stroke-dashoffset",array:"stroke-dasharray"},ef={offset:"strokeDashoffset",array:"strokeDasharray"};function tf(e,{attrX:t,attrY:r,attrScale:n,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d,p){if(Wp(e,c,u,p),d)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:m}=e;f.transform&&(m&&(h.transform=f.transform),delete f.transform),m&&(void 0!==o||void 0!==i||h.transform)&&(h.transformOrigin=function(e,t,r){return`${Qp(t,e.x,e.width)} ${Qp(r,e.y,e.height)}`}(m,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(f.x=t),void 0!==r&&(f.y=r),void 0!==n&&(f.scale=n),void 0!==a&&function(e,t,r=1,n=0,o=!0){e.pathLength=1;const i=o?Jp:ef;e[i.offset]=zp.transform(-n);const a=zp.transform(t),s=zp.transform(r);e[i.array]=`${a} ${s}`}(f,a,s,l,!1)}const rf=()=>({...Hp(),attrs:{}}),nf=e=>"string"==typeof e&&"svg"===e.toLowerCase();function of(e,t,r,n){const o=i.useMemo((()=>{const r=rf();return tf(r,t,{enableHardwareAcceleration:!1},nf(n),e.transformTemplate),{...r.attrs,style:{...r.style}}}),[t]);if(e.style){const t={};Up(t,e.style,e),o.style={...t,...o.style}}return o}function af(e=!1){return(t,r,n,{latestValues:o},a)=>{const s=(fp(t)?of:Xp)(r,o,a,t),l=function(e,t,r){const n={};for(const o in e)"values"===o&&"object"==typeof e.values||(Kp(o)||!0===r&&Gp(o)||!t&&!Gp(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}(r,"string"==typeof t,e),c={...l,...s,ref:n},{children:u}=r,d=i.useMemo((()=>bp(u)?u.get():u),[u]);return i.createElement(t,{...c,children:d})}}function sf(e,{style:t,vars:r},n,o){Object.assign(e.style,t,o&&o.getProjectionStyles(n));for(const i in r)e.style.setProperty(i,r[i])}const lf=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function cf(e,t,r,n){sf(e,t,void 0,n);for(const o in t.attrs)e.setAttribute(lf.has(o)?o:Xd(o),t.attrs[o])}function uf(e,t){const{style:r}=e,n={};for(const o in r)(bp(r[o])||t.style&&bp(t.style[o])||gp(o,e))&&(n[o]=r[o]);return n}function df(e,t){const r=uf(e,t);for(const n in e)if(bp(e[n])||bp(t[n])){r[-1!==mp.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]}return r}function pf(e,t,r,n={},o={}){return"function"==typeof t&&(t=t(void 0!==r?r:e.custom,n,o)),"string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t&&(t=t(void 0!==r?r:e.custom,n,o)),t}function ff(e){const t=i.useRef(null);return null===t.current&&(t.current=e()),t.current}const hf=e=>Array.isArray(e),mf=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),vf=e=>hf(e)?e[e.length-1]||0:e;function gf(e){const t=bp(e)?e.get():e;return mf(t)?t.toValue():t}const bf=e=>(t,r)=>{const n=i.useContext(Vd),o=i.useContext(Wd),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:r},n,o,i){const a={latestValues:yf(n,o,i,e),renderState:t()};return r&&(a.mount=e=>r(n,e,a)),a}(e,t,n,o);return r?a():ff(a)};function yf(e,t,r,n){const o={},i=n(e,{});for(const p in i)o[p]=gf(i[p]);let{initial:a,animate:s}=e;const l=ep(e),c=tp(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!r&&!1===r.initial;u=u||!1===a;const d=u?s:a;if(d&&"boolean"!=typeof d&&!Zd(d)){(Array.isArray(d)?d:[d]).forEach((t=>{const r=pf(e,t);if(!r)return;const{transitionEnd:n,transition:i,...a}=r;for(const e in a){let t=a[e];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(o[e]=t)}for(const e in n)o[e]=n[e]}))}return o}const xf=e=>e;class wf{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const t=this.order.indexOf(e);-1!==t&&(this.order.splice(t,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}const kf=["prepare","read","update","preRender","render","postRender"];const{schedule:Sf,cancel:Cf,state:Ef,steps:_f}=function(e,t){let r=!1,n=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=kf.reduce(((e,t)=>(e[t]=function(e){let t=new wf,r=new wf,n=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(e,i=!1,s=!1)=>{const l=s&&o,c=l?t:r;return i&&a.add(e),c.add(e)&&l&&o&&(n=t.order.length),e},cancel:e=>{r.remove(e),a.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,r]=[r,t],r.clear(),n=t.order.length,n)for(let r=0;rr=!0)),e)),{}),a=e=>i[e].process(o),s=()=>{const i=performance.now();r=!1,o.delta=n?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,kf.forEach(a),o.isProcessing=!1,r&&t&&(n=!1,e(s))},l=kf.reduce(((t,a)=>{const l=i[a];return t[a]=(t,i=!1,a=!1)=>(r||(r=!0,n=!0,o.isProcessing||e(s)),l.schedule(t,i,a)),t}),{});return{schedule:l,cancel:e=>kf.forEach((t=>i[t].cancel(e))),state:o,steps:i}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:xf,!0),Pf={useVisualState:bf({scrapeMotionValuesFromProps:df,createRenderState:rf,onMount:(e,t,{renderState:r,latestValues:n})=>{Sf.read((()=>{try{r.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(je){r.dimensions={x:0,y:0,width:0,height:0}}})),Sf.render((()=>{tf(r,n,{enableHardwareAcceleration:!1},nf(t.tagName),e.transformTemplate),cf(t,r)}))}})},Af={useVisualState:bf({scrapeMotionValuesFromProps:uf,createRenderState:Hp})};function Tf(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}const jf=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function Rf(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const Of=e=>t=>jf(t)&&e(t,Rf(t));function Mf(e,t,r,n){return Tf(e,t,Of(r),n)}const If=(e,t)=>r=>t(e(r)),Nf=(...e)=>e.reduce(If);function Df(e){let t=null;return()=>{const r=()=>{t=null};return null===t&&(t=e,r)}}const zf=Df("dragHorizontal"),Bf=Df("dragVertical");function Ff(e){let t=!1;if("y"===e)t=Bf();else if("x"===e)t=zf();else{const e=zf(),r=Bf();e&&r?t=()=>{e(),r()}:(e&&e(),r&&r())}return t}function Lf(){const e=Ff(!0);return!e||(e(),!1)}class $f{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Vf(e,t){const r="pointer"+(t?"enter":"leave"),n="onHover"+(t?"Start":"End");return Mf(e.current,r,((r,o)=>{if("touch"===r.type||Lf())return;const i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t),i[n]&&Sf.update((()=>i[n](r,o)))}),{passive:!e.getProps()[n]})}const Wf=(e,t)=>!!t&&(e===t||Wf(e,t.parentElement));function Hf(e,t){if(!t)return;const r=new PointerEvent("pointer"+e);t(r,Rf(r))}const Uf=new WeakMap,qf=new WeakMap,Xf=e=>{const t=Uf.get(e.target);t&&t(e)},Yf=e=>{e.forEach(Xf)};function Gf(e,t,r){const n=function({root:e,...t}){const r=e||document;qf.has(r)||qf.set(r,{});const n=qf.get(r),o=JSON.stringify(t);return n[o]||(n[o]=new IntersectionObserver(Yf,{root:e,...t})),n[o]}(t);return Uf.set(e,r),n.observe(e),()=>{Uf.delete(e),n.unobserve(e)}}const Kf={some:0,all:1};const Zf={inView:{Feature:class extends $f{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:r,amount:n="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:r,threshold:"number"==typeof n?n:Kf[n]};return Gf(this.node.current,i,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:r,onViewportLeave:n}=this.node.getProps(),i=t?r:n;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node,r=["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}(e,t));r&&this.startObserver()}unmount(){}}},tap:{Feature:class extends $f{constructor(){super(...arguments),this.removeStartListeners=xf,this.removeEndListeners=xf,this.removeAccessibleListeners=xf,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),n=Mf(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:r,onTapCancel:n}=this.node.getProps();Sf.update((()=>{Wf(this.node.current,e.target)?r&&r(e,t):n&&n(e,t)}))}),{passive:!(r.onTap||r.onPointerUp)}),o=Mf(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Nf(n,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=Tf(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=Tf(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&Hf("up",((e,t)=>{const{onTap:r}=this.node.getProps();r&&Sf.update((()=>r(e,t)))}))})),Hf("down",((e,t)=>{this.startPress(e,t)}))})),t=Tf(this.node.current,"blur",(()=>{this.isPressing&&Hf("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=Nf(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:r,whileTap:n}=this.node.getProps();n&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Sf.update((()=>r(e,t)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Lf()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Sf.update((()=>r(e,t)))}mount(){const e=this.node.getProps(),t=Mf(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),r=Tf(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Nf(t,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends $f{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(je){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Nf(Tf(this.node.current,"focus",(()=>this.onFocus())),Tf(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends $f{mount(){this.unmount=Nf(Vf(this.node,!0),Vf(this.node,!1))}unmount(){}}}};function Qf(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;nt[r]=e.get())),t}(e),function(e){const t={};return e.values.forEach(((e,r)=>t[r]=e.getVelocity())),t}(e))}let eh=xf;const th=e=>1e3*e,rh=e=>e/1e3,nh=!1,oh=e=>Array.isArray(e)&&"number"==typeof e[0];function ih(e){return Boolean(!e||"string"==typeof e&&sh[e]||oh(e)||Array.isArray(e)&&e.every(ih))}const ah=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,sh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ah([0,.65,.55,1]),circOut:ah([.55,0,1,.45]),backIn:ah([.31,.01,.66,-.59]),backOut:ah([.33,1.53,.69,.99])};function lh(e){if(e)return oh(e)?ah(e):Array.isArray(e)?e.map(lh):sh[e]}const ch=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,uh=1e-7,dh=12;function ph(e,t,r,n){if(e===t&&r===n)return xf;const o=t=>function(e,t,r,n,o){let i,a,s=0;do{a=t+(r-t)/2,i=ch(a,n,o)-e,i>0?r=a:t=a}while(Math.abs(i)>uh&&++s0===e||1===e?e:ch(o(e),t,n)}const fh=ph(.42,0,1,1),hh=ph(0,0,.58,1),mh=ph(.42,0,.58,1),vh=e=>Array.isArray(e)&&"number"!=typeof e[0],gh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,bh=e=>t=>1-e(1-t),yh=e=>1-Math.sin(Math.acos(e)),xh=bh(yh),wh=gh(yh),kh=ph(.33,1.53,.69,.99),Sh=bh(kh),Ch=gh(Sh),Eh={linear:xf,easeIn:fh,easeInOut:mh,easeOut:hh,circIn:yh,circInOut:wh,circOut:xh,backIn:Sh,backInOut:Ch,backOut:kh,anticipate:e=>(e*=2)<1?.5*Sh(e):.5*(2-Math.pow(2,-10*(e-1)))},_h=e=>{if(Array.isArray(e)){eh(4===e.length);const[t,r,n,o]=e;return ph(t,r,n,o)}return"string"==typeof e?(eh(void 0!==Eh[e]),Eh[e]):e},Ph=(e,t)=>r=>Boolean(Mp(r)&&Op.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),Ah=(e,t,r)=>n=>{if(!Mp(n))return n;const[o,i,a,s]=n.match(jp);return{[e]:parseFloat(o),[t]:parseFloat(i),[r]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},Th={..._p,transform:e=>Math.round((e=>Ep(0,255,e))(e))},jh={test:Ph("rgb","red"),parse:Ah("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Th.transform(e)+", "+Th.transform(t)+", "+Th.transform(r)+", "+Tp(Pp.transform(n))+")"};const Rh={test:Ph("#"),parse:function(e){let t="",r="",n="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}},transform:jh.transform},Oh={test:Ph("hsl","hue"),parse:Ah("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Dp.transform(Tp(t))+", "+Dp.transform(Tp(r))+", "+Tp(Pp.transform(n))+")"},Mh={test:e=>jh.test(e)||Rh.test(e)||Oh.test(e),parse:e=>jh.test(e)?jh.parse(e):Oh.test(e)?Oh.parse(e):Rh.parse(e),transform:e=>Mp(e)?e:e.hasOwnProperty("red")?jh.transform(e):Oh.transform(e)},Ih=(e,t,r)=>-r*e+r*t+e;function Nh(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}const Dh=(e,t,r)=>{const n=e*e;return Math.sqrt(Math.max(0,r*(t*t-n)+n))},zh=[Rh,jh,Oh];function Bh(e){const t=(e=>zh.find((t=>t.test(e))))(e);let r=t.parse(e);return t===Oh&&(r=function({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,r/=100;let o=0,i=0,a=0;if(t/=100){const n=r<.5?r*(1+t):r+t-r*t,s=2*r-n;o=Nh(s,n,e+1/3),i=Nh(s,n,e),a=Nh(s,n,e-1/3)}else o=i=a=r;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:n}}(r)),r}const Fh=(e,t)=>{const r=Bh(e),n=Bh(t),o={...r};return e=>(o.red=Dh(r.red,n.red,e),o.green=Dh(r.green,n.green,e),o.blue=Dh(r.blue,n.blue,e),o.alpha=Ih(r.alpha,n.alpha,e),jh.transform(o))};const Lh={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:xf},$h={regex:Rp,countKey:"Colors",token:"${c}",parse:Mh.parse},Vh={regex:jp,countKey:"Numbers",token:"${n}",parse:_p.parse};function Wh(e,{regex:t,countKey:r,token:n,parse:o}){const i=e.tokenised.match(t);i&&(e["num"+r]=i.length,e.tokenised=e.tokenised.replace(t,n),e.values.push(...i.map(o)))}function Hh(e){const t=e.toString(),r={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return r.value.includes("var(--")&&Wh(r,Lh),Wh(r,$h),Wh(r,Vh),r}function Uh(e){return Hh(e).values}function qh(e){const{values:t,numColors:r,numVars:n,tokenised:o}=Hh(e),i=t.length;return e=>{let t=o;for(let o=0;o"number"==typeof e?0:e;const Yh={test:function(e){var t,r;return isNaN(e)&&Mp(e)&&((null===(t=e.match(jp))||void 0===t?void 0:t.length)||0)+((null===(r=e.match(Rp))||void 0===r?void 0:r.length)||0)>0},parse:Uh,createTransformer:qh,getAnimatableNone:function(e){const t=Uh(e);return qh(e)(t.map(Xh))}},Gh=(e,t)=>r=>`${r>0?t:e}`;function Kh(e,t){return"number"==typeof e?r=>Ih(e,t,r):Mh.test(e)?Fh(e,t):e.startsWith("var(")?Gh(e,t):Jh(e,t)}const Zh=(e,t)=>{const r=[...e],n=r.length,o=e.map(((e,r)=>Kh(e,t[r])));return e=>{for(let t=0;t{const r={...e,...t},n={};for(const o in r)void 0!==e[o]&&void 0!==t[o]&&(n[o]=Kh(e[o],t[o]));return e=>{for(const t in n)r[t]=n[t](e);return r}},Jh=(e,t)=>{const r=Yh.createTransformer(t),n=Hh(e),o=Hh(t);return n.numVars===o.numVars&&n.numColors===o.numColors&&n.numNumbers>=o.numNumbers?Nf(Zh(n.values,o.values),r):Gh(e,t)},em=(e,t,r)=>{const n=t-e;return 0===n?1:(r-e)/n},tm=(e,t)=>r=>Ih(e,t,r);function rm(e,t,r){const n=[],o=r||function(e){return"number"==typeof e?tm:"string"==typeof e?Mh.test(e)?Fh:Jh:Array.isArray(e)?Zh:"object"==typeof e?Qh:tm}(e[0]),i=e.length-1;for(let a=0;at[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=rm(t,n,o),s=a.length,l=t=>{let r=0;if(s>1)for(;rl(Ep(e[0],e[i-1],t)):l}function om(e){const t=[0];return function(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const o=em(0,t,n);e.push(Ih(r,1,o))}}(t,e.length-1),t}function im({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const o=vh(n)?n.map(_h):_h(n),i={done:!1,value:t[0]},a=function(e,t){return e.map((e=>e*t))}(r&&r.length===t.length?r:om(t),e),s=nm(a,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map((()=>c||mh)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}function am(e,t){return t?e*(1e3/t):0}const sm=5;function lm(e,t,r){const n=Math.max(t-sm,0);return am(r-e(n),t-n)}const cm=.001,um=.01,dm=10,pm=.05,fm=1;function hm({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let o,i,a=1-t;a=Ep(pm,fm,a),e=Ep(um,dm,rh(e)),a<1?(o=t=>{const n=t*a,o=n*e,i=n-r,s=vm(t,a),l=Math.exp(-o);return cm-i/s*l},i=t=>{const n=t*a*e,i=n*r+r,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-n),c=vm(Math.pow(t,2),a);return(-o(t)+cm>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-r)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(r-t)));const s=function(e,t,r){let n=r;for(let o=1;ovoid 0!==e[t]))}function xm({keyframes:e,restDelta:t,restSpeed:r,...n}){const o=e[0],i=e[e.length-1],a={done:!1,value:o},{stiffness:s,damping:l,mass:c,velocity:u,duration:d,isResolvedFromDuration:p}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!ym(e,bm)&&ym(e,gm)){const r=hm(e);t={...t,...r,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}(n),f=u?-rh(u):0,h=l/(2*Math.sqrt(s*c)),m=i-o,v=rh(Math.sqrt(s/c)),g=Math.abs(m)<5;let b;if(r||(r=g?.01:2),t||(t=g?.005:.5),h<1){const e=vm(v,h);b=t=>{const r=Math.exp(-h*v*t);return i-r*((f+h*v*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===h)b=e=>i-Math.exp(-v*e)*(m+(f+v*m)*e);else{const e=v*Math.sqrt(h*h-1);b=t=>{const r=Math.exp(-h*v*t),n=Math.min(e*t,300);return i-r*((f+h*v*m)*Math.sinh(n)+e*m*Math.cosh(n))/e}}return{calculatedDuration:p&&d||null,next:e=>{const n=b(e);if(p)a.done=e>=d;else{let o=f;0!==e&&(o=h<1?lm(b,e,n):0);const s=Math.abs(o)<=r,l=Math.abs(i-n)<=t;a.done=s&&l}return a.value=a.done?i:n,a}}}function wm({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},f=e=>void 0===s?l:void 0===l||Math.abs(s-e)-h*Math.exp(-e/n),b=e=>v+g(e),y=e=>{const t=g(e),r=b(e);p.done=Math.abs(t)<=c,p.value=p.done?v:r};let x,w;const k=e=>{(e=>void 0!==s&&el)(p.value)&&(x=e,w=xm({keyframes:[p.value,f(p.value)],velocity:lm(b,e,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,y(e),k(e)),void 0!==x&&e>x?w.next(e-x):(!t&&y(e),p)}}}const km=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Sf.update(t,!0),stop:()=>Cf(t),now:()=>Ef.isProcessing?Ef.timestamp:performance.now()}},Sm=2e4;function Cm(e){let t=0;let r=e.next(t);for(;!r.done&&t=Sm?1/0:t}const Em={decay:wm,inertia:wm,tween:im,keyframes:im,spring:xm};function _m({autoplay:e=!0,delay:t=0,driver:r=km,keyframes:n,type:o="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:s="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:d,...p}){let f,h,m=1,v=!1;const g=()=>{h=new Promise((e=>{f=e}))};let b;g();const y=Em[o]||im;let x;y!==im&&"number"!=typeof n[0]&&(x=nm([0,100],n,{clamp:!1}),n=[0,100]);const w=y({...p,keyframes:n});let k;"mirror"===s&&(k=y({...p,keyframes:[...n].reverse(),velocity:-(p.velocity||0)}));let S="idle",C=null,E=null,_=null;null===w.calculatedDuration&&i&&(w.calculatedDuration=Cm(w));const{calculatedDuration:P}=w;let A=1/0,T=1/0;null!==P&&(A=P+a,T=A*(i+1)-a);let j=0;const R=e=>{if(null===E)return;m>0&&(E=Math.min(E,e)),m<0&&(E=Math.min(e-T/m,E)),j=null!==C?C:Math.round(e-E)*m;const r=j-t*(m>=0?1:-1),o=m>=0?r<0:r>T;j=Math.max(r,0),"finished"===S&&null===C&&(j=T);let l=j,c=w;if(i){const e=j/A;let t=Math.floor(e),r=e%1;!r&&e>=1&&(r=1),1===r&&t--,t=Math.min(t,i+1);const n=Boolean(t%2);n&&("reverse"===s?(r=1-r,a&&(r-=a/A)):"mirror"===s&&(c=k));let o=Ep(0,1,r);j>T&&(o="reverse"===s&&n?1:0),l=o*A}const u=o?{done:!1,value:n[0]}:c.next(l);x&&(u.value=x(u.value));let{done:p}=u;o||null===P||(p=m>=0?j>=T:j<=0);const f=null===C&&("finished"===S||"running"===S&&p);return d&&d(u.value),f&&I(),u},O=()=>{b&&b.stop(),b=void 0},M=()=>{S="idle",O(),f(),g(),E=_=null},I=()=>{S="finished",u&&u(),O(),f()},N=()=>{if(v)return;b||(b=r(R));const e=b.now();l&&l(),null!==C?E=e-C:E&&"finished"!==S||(E=e),"finished"===S&&g(),_=E,C=null,S="running",b.start()};e&&N();const D={then:(e,t)=>h.then(e,t),get time(){return rh(j)},set time(e){e=th(e),j=e,null===C&&b&&0!==m?E=b.now()-e/m:C=e},get duration(){const e=null===w.calculatedDuration?Cm(w):w.calculatedDuration;return rh(e)},get speed(){return m},set speed(e){e!==m&&b&&(m=e,D.time=rh(j))},get state(){return S},play:N,pause:()=>{S="paused",C=j},stop:()=>{v=!0,"idle"!==S&&(S="idle",c&&c(),M())},cancel:()=>{null!==_&&R(_),M()},complete:()=>{S="finished"},sample:e=>(E=0,R(e))};return D}const Pm=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),Am=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);function Tm(e,t,{onUpdate:r,onComplete:n,...o}){if(!(Pm()&&Am.has(t)&&!o.repeatDelay&&"mirror"!==o.repeatType&&0!==o.damping&&"inertia"!==o.type))return!1;let i,a,s=!1;const l=()=>{a=new Promise((e=>{i=e}))};l();let{keyframes:c,duration:u=300,ease:d,times:p}=o;if(((e,t)=>"spring"===t.type||"backgroundColor"===e||!ih(t.ease))(t,o)){const e=_m({...o,repeat:0,delay:0});let t={done:!1,value:c[0]};const r=[];let n=0;for(;!t.done&&n<2e4;)t=e.sample(n),r.push(t.value),n+=10;p=void 0,c=r,u=n-10,d="linear"}const f=function(e,t,r,{delay:n=0,duration:o,repeat:i=0,repeatType:a="loop",ease:s,times:l}={}){const c={[t]:r};l&&(c.offset=l);const u=lh(s);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:n,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"})}(e.owner.current,t,c,{...o,duration:u,ease:d,times:p}),h=()=>f.cancel(),m=()=>{Sf.update(h),i(),l()};f.onfinish=()=>{e.set(function(e,{repeat:t,repeatType:r="loop"}){return e[t&&"loop"!==r&&t%2==1?0:e.length-1]}(c,o)),n&&n(),m()};return{then:(e,t)=>a.then(e,t),attachTimeline:e=>(f.timeline=e,f.onfinish=null,xf),get time(){return rh(f.currentTime||0)},set time(e){f.currentTime=th(e)},get speed(){return f.playbackRate},set speed(e){f.playbackRate=e},get duration(){return rh(u)},play:()=>{s||(f.play(),Cf(h))},pause:()=>f.pause(),stop:()=>{if(s=!0,"idle"===f.playState)return;const{currentTime:t}=f;if(t){const r=_m({...o,autoplay:!1});e.setWithVelocity(r.sample(t-10).value,r.sample(t).value,10)}m()},complete:()=>f.finish(),cancel:m}}const jm={type:"spring",stiffness:500,damping:25,restSpeed:10},Rm={type:"keyframes",duration:.8},Om={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Mm=(e,{keyframes:t})=>t.length>2?Rm:vp.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:jm:Om,Im=(e,t)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Yh.test(t)&&"0"!==t||t.startsWith("url("))),Nm=new Set(["brightness","contrast","saturate","opacity"]);function Dm(e){const[t,r]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[n]=r.match(jp)||[];if(!n)return e;const o=r.replace(n,"");let i=Nm.has(t)?1:0;return n!==r&&(i*=100),t+"("+i+o+")"}const zm=/([a-z-]*)\(.*?\)/g,Bm={...Yh,getAnimatableNone:e=>{const t=e.match(zm);return t?t.map(Dm).join(" "):e}},Fm={...Vp,color:Mh,backgroundColor:Mh,outlineColor:Mh,fill:Mh,stroke:Mh,borderColor:Mh,borderTopColor:Mh,borderRightColor:Mh,borderBottomColor:Mh,borderLeftColor:Mh,filter:Bm,WebkitFilter:Bm},Lm=e=>Fm[e];function $m(e,t){let r=Lm(e);return r!==Bm&&(r=Yh),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const Vm=e=>/^0[^.\s]+$/.test(e);function Wm(e){return"number"==typeof e?0===e:null!==e?"none"===e||"0"===e||Vm(e):void 0}function Hm(e,t){return e[t]||e.default||e}const Um=(e,t,r,n={})=>o=>{const i=Hm(n,e)||{},a=i.delay||n.delay||0;let{elapsed:s=0}=n;s-=th(a);const l=function(e,t,r,n){const o=Im(t,r);let i;i=Array.isArray(r)?[...r]:[null,r];const a=void 0!==n.from?n.from:e.get();let s;const l=[];for(let c=0;c{t.set(e),i.onUpdate&&i.onUpdate(e)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}};if(function({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}(i)||(f={...f,...Mm(e,f)}),f.duration&&(f.duration=th(f.duration)),f.repeatDelay&&(f.repeatDelay=th(f.repeatDelay)),!d||!p||nh||!1===i.type)return function({keyframes:e,delay:t,onUpdate:r,onComplete:n}){const o=()=>(r&&r(e[e.length-1]),n&&n(),{time:0,speed:1,duration:0,play:xf,pause:xf,stop:xf,then:e=>(e(),Promise.resolve()),cancel:xf,complete:xf});return t?_m({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}(f);if(!n.isHandoff&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const r=Tm(t,e,f);if(r)return r}return _m(f)};function qm(e){return Boolean(bp(e)&&e.add)}const Xm=e=>/^\-?\d*\.?\d+$/.test(e);function Ym(e,t){-1===e.indexOf(t)&&e.push(t)}function Gm(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}class Km{constructor(){this.subscriptions=[]}add(e){return Ym(this.subscriptions,e),()=>Gm(this.subscriptions,e)}notify(e,t,r){const n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](e,t,r);else for(let o=0;o{this.prev=this.current,this.current=e;const{delta:r,timestamp:n}=Ef;this.lastUpdated!==n&&(this.timeDelta=r,this.lastUpdated=n,Sf.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Sf.postRender(this.velocityCheck),this.velocityCheck=({timestamp:e})=>{e!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(r=this.current,!isNaN(parseFloat(r))),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Km);const r=this.events[e].add(t);return"change"===e?()=>{r(),Sf.read((()=>{this.events.change.getSize()||this.stop()}))}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,r){this.set(t),this.prev=e,this.timeDelta=r}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?am(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qm(e,t){return new Zm(e,t)}const Jm=e=>t=>t.test(e),ev=[_p,zp,Dp,Np,Fp,Bp,{test:e=>"auto"===e,parse:e=>e}],tv=e=>ev.find(Jm(e)),rv=[...ev,Mh,Yh],nv=e=>rv.find(Jm(e));function ov(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Qm(r))}function iv(e,t){if(!t)return;return(t[e]||t.default||t).from}function av({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&!0!==t[r];return t[r]=!1,n}function sv(e,t){const r=e.get();if(!Array.isArray(t))return r!==t;for(let n=0;nl.remove(d)))),c.push(p)}return a&&Promise.all(c).then((()=>{a&&function(e,t){const r=Jf(e,t);let{transitionEnd:n={},transition:o={},...i}=r?e.makeTargetAnimatable(r,!1):{};i={...i,...n};for(const a in i)ov(e,a,vf(i[a]))}(e,a)})),c}function cv(e,t,r={}){const n=Jf(e,t,r.custom);let{transition:o=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(o=r.transitionOverride);const i=n?()=>Promise.all(lv(e,n,r)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(n=0)=>{const{delayChildren:i=0,staggerChildren:a,staggerDirection:s}=o;return function(e,t,r=0,n=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*n,l=1===o?(e=0)=>e*n:(e=0)=>s-e*n;return Array.from(e.variantChildren).sort(uv).forEach(((e,n)=>{e.notify("AnimationStart",t),a.push(cv(e,t,{...i,delay:r+l(n)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(a)}(e,t,i+n,a,s,r)}:()=>Promise.resolve(),{when:s}=o;if(s){const[e,t]="beforeChildren"===s?[i,a]:[a,i];return e().then((()=>t()))}return Promise.all([i(),a(r.delay)])}function uv(e,t){return e.sortNodePosition(t)}const dv=[...Qd].reverse(),pv=Qd.length;function fv(e){return t=>Promise.all(t.map((({animation:t,options:r})=>function(e,t,r={}){let n;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>cv(e,t,r)));n=Promise.all(o)}else if("string"==typeof t)n=cv(e,t,r);else{const o="function"==typeof t?Jf(e,t,r.custom):t;n=Promise.all(lv(e,o,r))}return n.then((()=>e.notify("AnimationComplete",t)))}(e,t,r))))}function hv(e){let t=fv(e);const r={animate:vv(!0),whileInView:vv(),whileHover:vv(),whileTap:vv(),whileDrag:vv(),whileFocus:vv(),exit:vv()};let n=!0;const o=(t,r)=>{const n=Jf(e,r);if(n){const{transition:e,transitionEnd:r,...o}=n;t={...t,...o,...r}}return t};function i(i,a){const s=e.getProps(),l=e.getVariantContext(!0)||{},c=[],u=new Set;let d={},p=1/0;for(let t=0;tp&&v;const w=Array.isArray(m)?m:[m];let k=w.reduce(o,{});!1===g&&(k={});const{prevResolvedValues:S={}}=h,C={...S,...k},E=e=>{x=!0,u.delete(e),h.needsAnimating[e]=!0};for(const e in C){const t=k[e],r=S[e];d.hasOwnProperty(e)||(t!==r?hf(t)&&hf(r)?!Qf(t,r)||y?E(e):h.protectedKeys[e]=!0:void 0!==t?E(e):u.add(e):void 0!==t&&u.has(e)?E(e):h.protectedKeys[e]=!0)}h.prevProp=m,h.prevResolvedValues=k,h.isActive&&(d={...d,...k}),n&&e.blockInitialAnimation&&(x=!1),x&&!b&&c.push(...w.map((e=>({animation:e,options:{type:f,...i}}))))}if(u.size){const t={};u.forEach((r=>{const n=e.getBaseTarget(r);void 0!==n&&(t[r]=n)})),c.push({animation:t})}let f=Boolean(c.length);return!n||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(f=!1),n=!1,f?t(c):Promise.resolve()}return{animateChanges:i,setActive:function(t,n,o){var a;if(r[t].isActive===n)return Promise.resolve();null===(a=e.variantChildren)||void 0===a||a.forEach((e=>{var r;return null===(r=e.animationState)||void 0===r?void 0:r.setActive(t,n)})),r[t].isActive=n;const s=i(o,t);for(const e in r)r[e].protectedKeys={};return s},setAnimateFunction:function(r){t=r(e)},getState:()=>r}}function mv(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Qf(t,e)}function vv(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let gv=0;const bv={animation:{Feature:class extends $f{constructor(e){super(e),e.animationState||(e.animationState=hv(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Zd(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends $f{constructor(){super(...arguments),this.id=gv++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const o=this.node.animationState.setActive("exit",!e,{custom:null!=r?r:this.node.getProps().custom});t&&!e&&o.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},yv=(e,t)=>Math.abs(e-t);class xv{constructor(e,t,{transformPagePoint:r,contextWindow:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Sv(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,r=function(e,t){const r=yv(e.x,t.x),n=yv(e.y,t.y);return Math.sqrt(r**2+n**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!r)return;const{point:n}=e,{timestamp:o}=Ef;this.history.push({...n,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=wv(t,this.transformPagePoint),Sf.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:r,onSessionEnd:n}=this.handlers,o=Sv("pointercancel"===e.type?this.lastMoveEventInfo:wv(t,this.transformPagePoint),this.history);this.startEvent&&r&&r(e,o),n&&n(e,o)},!jf(e))return;this.handlers=t,this.transformPagePoint=r,this.contextWindow=n||window;const o=wv(Rf(e),this.transformPagePoint),{point:i}=o,{timestamp:a}=Ef;this.history=[{...i,timestamp:a}];const{onSessionStart:s}=t;s&&s(e,Sv(o,this.history)),this.removeListeners=Nf(Mf(this.contextWindow,"pointermove",this.handlePointerMove),Mf(this.contextWindow,"pointerup",this.handlePointerUp),Mf(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Cf(this.updatePoint)}}function wv(e,t){return t?{point:t(e.point)}:e}function kv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Sv({point:e},t){return{point:e,delta:kv(e,Ev(t)),offset:kv(e,Cv(t)),velocity:_v(t,.1)}}function Cv(e){return e[0]}function Ev(e){return e[e.length-1]}function _v(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const o=Ev(e);for(;r>=0&&(n=e[r],!(o.timestamp-n.timestamp>th(t)));)r--;if(!n)return{x:0,y:0};const i=rh(o.timestamp-n.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Pv(e){return e.max-e.min}function Av(e,t=0,r=.01){return Math.abs(e-t)<=r}function Tv(e,t,r,n=.5){e.origin=n,e.originPoint=Ih(t.min,t.max,e.origin),e.scale=Pv(r)/Pv(t),(Av(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Ih(r.min,r.max,e.origin)-e.originPoint,(Av(e.translate)||isNaN(e.translate))&&(e.translate=0)}function jv(e,t,r,n){Tv(e.x,t.x,r.x,n?n.originX:void 0),Tv(e.y,t.y,r.y,n?n.originY:void 0)}function Rv(e,t,r){e.min=r.min+t.min,e.max=e.min+Pv(t)}function Ov(e,t,r){e.min=t.min-r.min,e.max=e.min+Pv(t)}function Mv(e,t,r){Ov(e.x,t.x,r.x),Ov(e.y,t.y,r.y)}function Iv(e,t,r){return{min:void 0!==t?e.min+t:void 0,max:void 0!==r?e.max+r-(e.max-e.min):void 0}}function Nv(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Lv=()=>({x:{min:0,max:0},y:{min:0,max:0}});function $v(e){return[e("x"),e("y")]}function Vv({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function Wv(e){return void 0===e||1===e}function Hv({scale:e,scaleX:t,scaleY:r}){return!Wv(e)||!Wv(t)||!Wv(r)}function Uv(e){return Hv(e)||qv(e)||e.z||e.rotate||e.rotateX||e.rotateY}function qv(e){return Xv(e.x)||Xv(e.y)}function Xv(e){return e&&"0%"!==e}function Yv(e,t,r){return r+t*(e-r)}function Gv(e,t,r,n,o){return void 0!==o&&(e=Yv(e,o,n)),Yv(e,r,n)+t}function Kv(e,t=0,r=1,n,o){e.min=Gv(e.min,t,r,n,o),e.max=Gv(e.max,t,r,n,o)}function Zv(e,{x:t,y:r}){Kv(e.x,t.translate,t.scale,t.originPoint),Kv(e.y,r.translate,r.scale,r.originPoint)}function Qv(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Jv(e,t){e.min=e.min+t,e.max=e.max+t}function eg(e,t,[r,n,o]){const i=void 0!==t[o]?t[o]:.5,a=Ih(e.min,e.max,i);Kv(e,t[r],t[n],a,t.scale)}const tg=["x","scaleX","originX"],rg=["y","scaleY","originY"];function ng(e,t){eg(e.x,t,tg),eg(e.y,t,rg)}function og(e,t){return Vv(function(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}(e.getBoundingClientRect(),t))}const ig=({current:e})=>e?e.ownerDocument.defaultView:null,ag=new WeakMap;class sg{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Lv(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;this.panSession=new xv(e,{onSessionStart:e=>{this.stopAnimation(),t&&this.snapToCursor(Rf(e,"page").point)},onStart:(e,t)=>{const{drag:r,dragPropagation:n,onDragStart:o}=this.getProps();if(r&&!n&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Ff(r),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),$v((e=>{let t=this.getAxisMotionValue(e).get()||0;if(Dp.test(t)){const{projection:r}=this.visualElement;if(r&&r.layout){const n=r.layout.layoutBox[e];if(n){t=Pv(n)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),o&&Sf.update((()=>o(e,t)),!1,!0);const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:r,dragDirectionLock:n,onDirectionLock:o,onDrag:i}=this.getProps();if(!r&&!this.openGlobalLock)return;const{offset:a}=t;if(n&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let r=null;Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x");return r}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t)},{transformPagePoint:this.visualElement.getTransformPagePoint(),contextWindow:ig(this.visualElement)})}stop(e,t){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:n}=t;this.startAnimation(n);const{onDragEnd:o}=this.getProps();o&&Sf.update((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,r){const{drag:n}=this.getProps();if(!r||!lg(e,n,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:r},n){return void 0!==t&&er&&(e=n?Ih(r,e,n.max):Math.min(e,r)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&Gd(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(e,{top:t,left:r,bottom:n,right:o}){return{x:Iv(e.x,r,o),y:Iv(e.y,t,n)}}(n.layoutBox,t),this.elastic=function(e=Dv){return!1===e?e=0:!0===e&&(e=Dv),{x:zv(e,"left","right"),y:zv(e,"top","bottom")}}(r),o!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&$v((e=>{this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const r={};return void 0!==t.min&&(r.min=t.min-e.min),void 0!==t.max&&(r.max=t.max-e.min),r}(n.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Gd(e))return!1;const r=e.current,{projection:n}=this.visualElement;if(!n||!n.layout)return!1;const o=function(e,t,r){const n=og(e,r),{scroll:o}=t;return o&&(Jv(n.x,o.offset.x),Jv(n.y,o.offset.y)),n}(r,n.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:Nv(e.x,t.x),y:Nv(e.y,t.y)}}(n.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=Vv(e))}return i}startAnimation(e){const{drag:t,dragMomentum:r,dragElastic:n,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=$v((a=>{if(!lg(a,t,this.currentDirection))return;let l=s[a]||{};i&&(l={min:0,max:0});const c=n?200:1e6,u=n?40:1e7,d={type:"inertia",velocity:r?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,d)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const r=this.getAxisMotionValue(e);return r.start(Um(e,r,0,t))}stopAnimation(){$v((e=>this.getAxisMotionValue(e).stop()))}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),r=this.visualElement.getProps(),n=r[t];return n||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){$v((t=>{const{drag:r}=this.getProps();if(!lg(t,r,this.currentDirection))return;const{projection:n}=this.visualElement,o=this.getAxisMotionValue(t);if(n&&n.layout){const{min:r,max:i}=n.layout.layoutBox[t];o.set(e[t]-Ih(r,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:r}=this.visualElement;if(!Gd(t)||!r||!this.constraints)return;this.stopAnimation();const n={x:0,y:0};$v((e=>{const t=this.getAxisMotionValue(e);if(t){const r=t.get();n[e]=function(e,t){let r=.5;const n=Pv(e),o=Pv(t);return o>n?r=em(t.min,t.max-n,e.min):n>o&&(r=em(e.min,e.max-o,t.min)),Ep(0,1,r)}({min:r,max:r},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),$v((t=>{if(!lg(t,e,null))return;const r=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];r.set(Ih(o,i,n[t]))}))}addListeners(){if(!this.visualElement.current)return;ag.set(this.visualElement,this);const e=Mf(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:r=!0}=this.getProps();t&&r&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Gd(e)&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,n=r.addEventListener("measure",t);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),t();const o=Tf(window,"resize",(()=>this.scalePositionWithinConstraints())),i=r.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&($v((t=>{const r=this.getAxisMotionValue(t);r&&(this.originPoint[t]+=e[t].translate,r.set(r.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),n(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:r=!1,dragPropagation:n=!1,dragConstraints:o=!1,dragElastic:i=Dv,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:r,dragPropagation:n,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function lg(e,t,r){return!(!0!==t&&t!==e||null!==r&&r!==e)}const cg=e=>(t,r)=>{e&&Sf.update((()=>e(t,r)))};function ug(){const e=i.useContext(Wd);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:r,register:n}=e,o=i.useId();i.useEffect((()=>n(o)),[]);return!t&&r?[!1,()=>r&&r(o)]:[!0]}function dg(){return null===(e=i.useContext(Wd))||e.isPresent;var e}const pg={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function fg(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const hg={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!zp.test(e))return e;e=parseFloat(e)}return`${fg(e,t.target.x)}% ${fg(e,t.target.y)}%`}},mg={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,o=Yh.parse(e);if(o.length>5)return n;const i=Yh.createTransformer(e),a="number"!=typeof o[0]?1:0,s=r.x.scale*t.x,l=r.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=Ih(s,l,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}};class vg extends u.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:r,layoutId:n}=this.props,{projection:o}=e;var i;i=bg,Object.assign(hp,i),o&&(t.group&&t.group.add(o),r&&r.register&&n&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),pg.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:r,drag:n,isPresent:o}=this.props,i=r.projection;return i?(i.isPresent=o,n||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||Sf.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:r}=this.props,{projection:n}=e;n&&(n.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(n),r&&r.deregister&&r.deregister(n))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function gg(e){const[t,r]=ug(),n=i.useContext(ap);return u.createElement(vg,{...e,layoutGroup:n,switchLayoutGroup:i.useContext(sp),isPresent:t,safeToRemove:r})}const bg={borderRadius:{...hg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:hg,borderTopRightRadius:hg,borderBottomLeftRadius:hg,borderBottomRightRadius:hg,boxShadow:mg},yg=["TopLeft","TopRight","BottomLeft","BottomRight"],xg=yg.length,wg=e=>"string"==typeof e?parseFloat(e):e,kg=e=>"number"==typeof e||zp.test(e);function Sg(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Cg=_g(0,.5,xh),Eg=_g(.5,.95,xf);function _g(e,t,r){return n=>nt?1:r(em(e,t,n))}function Pg(e,t){e.min=t.min,e.max=t.max}function Ag(e,t){Pg(e.x,t.x),Pg(e.y,t.y)}function Tg(e,t,r,n,o){return e=Yv(e-=t,1/r,n),void 0!==o&&(e=Yv(e,1/o,n)),e}function jg(e,t,[r,n,o],i,a){!function(e,t=0,r=1,n=.5,o,i=e,a=e){Dp.test(t)&&(t=parseFloat(t),t=Ih(a.min,a.max,t/100)-a.min);if("number"!=typeof t)return;let s=Ih(i.min,i.max,n);e===i&&(s-=t),e.min=Tg(e.min,t,r,s,o),e.max=Tg(e.max,t,r,s,o)}(e,t[r],t[n],t[o],t.scale,i,a)}const Rg=["x","scaleX","originX"],Og=["y","scaleY","originY"];function Mg(e,t,r,n){jg(e.x,t,Rg,r?r.x:void 0,n?n.x:void 0),jg(e.y,t,Og,r?r.y:void 0,n?n.y:void 0)}function Ig(e){return 0===e.translate&&1===e.scale}function Ng(e){return Ig(e.x)&&Ig(e.y)}function Dg(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function zg(e){return Pv(e.x)/Pv(e.y)}class Bg{constructor(){this.members=[]}add(e){Ym(this.members,e),e.scheduleRender()}remove(e){if(Gm(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let r;for(let n=t;n>=0;n--){const e=this.members[n];if(!1!==e.isPresent){r=e;break}}return!!r&&(this.promote(r),!0)}promote(e,t){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:n}=e.options;!1===n&&r.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:r}=e;t.onExitComplete&&t.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Fg(e,t,r){let n="";const o=e.x.translate/t.x,i=e.y.translate/t.y;if((o||i)&&(n=`translate3d(${o}px, ${i}px, 0) `),1===t.x&&1===t.y||(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{rotate:e,rotateX:t,rotateY:o}=r;e&&(n+=`rotate(${e}deg) `),t&&(n+=`rotateX(${t}deg) `),o&&(n+=`rotateY(${o}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return 1===a&&1===s||(n+=`scale(${a}, ${s})`),n||"none"}const Lg=(e,t)=>e.depth-t.depth;class $g{constructor(){this.children=[],this.isDirty=!1}add(e){Ym(this.children,e),this.isDirty=!0}remove(e){Gm(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Lg),this.isDirty=!1,this.children.forEach(e)}}const Vg=["","X","Y","Z"],Wg={visibility:"hidden"};let Hg=0;const Ug={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function qg({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:o}){return class{constructor(e={},r=(null==t?void 0:t())){this.id=Hg++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var e;this.projectionUpdateScheduled=!1,Ug.totalNodes=Ug.resolvedTargetDeltas=Ug.recalculatedProjection=0,this.nodes.forEach(Gg),this.nodes.forEach(rb),this.nodes.forEach(nb),this.nodes.forEach(Kg),e=Ug,window.MotionDebug&&window.MotionDebug.record(e)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0;for(let t=0;tthis.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,r&&r(),r=function(e,t){const r=performance.now(),n=({timestamp:o})=>{const i=o-r;i>=t&&(Cf(n),e(i-t))};return Sf.read(n,!0),()=>Cf(n)}(n,250),pg.hasAnimatedSinceResize&&(pg.hasAnimatedSinceResize=!1,this.nodes.forEach(tb))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:r,layout:n})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||cb,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!Dg(this.targetLayout,n)||r,c=!t&&r;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...Hm(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||tb(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Cf(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ob),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let o=0;othis.update())))}clearAllSnapshots(){this.nodes.forEach(Zg),this.sharedNodes.forEach(ib)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Sf.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Sf.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let r=0;r{const r=t/1e3;ab(i.x,e.x,r),ab(i.y,e.y,r),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mv(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,r,n){sb(e.x,t.x,r.x,n),sb(e.y,t.y,r.y,n)}(this.relativeTarget,this.relativeTargetOrigin,a,r),d&&function(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d=Lv()),Ag(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,r,n,o,i){o?(e.opacity=Ih(0,void 0!==r.opacity?r.opacity:1,Cg(n)),e.opacityExit=Ih(void 0!==t.opacity?t.opacity:1,0,Eg(n))):i&&(e.opacity=Ih(void 0!==t.opacity?t.opacity:1,void 0!==r.opacity?r.opacity:1,n));for(let a=0;a{pg.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,r){const n=bp(e)?e:Qm(e);return n.start(Um("",n,t,r)),n.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:r,layout:n,latestValues:o}=e;if(t&&r&&n){if(this!==e&&this.layout&&n&&fb(this.options.animationType,this.layout.layoutBox,n.layoutBox)){r=this.target||Lv();const t=Pv(this.layout.layoutBox.x);r.x.min=e.target.x.min,r.x.max=r.x.min+t;const n=Pv(this.layout.layoutBox.y);r.y.min=e.target.y.min,r.y.max=r.y.min+n}Ag(t,r),ng(t,o),jv(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Bg);this.sharedNodes.get(e).add(t);const r=t.options.initialPromotionConfig;t.promote({transition:r?r.transition:void 0,preserveFollowOpacity:r&&r.shouldPreserveFollowOpacity?r.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:r}={}){const n=this.getStack();n&&n.promote(this,r),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:r}=e;if((r.rotate||r.rotateX||r.rotateY||r.rotateZ)&&(t=!0),!t)return;const n={};for(let o=0;o{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Qg),this.root.sharedNodes.clear()}}}function Xg(e){e.updateLayout()}function Yg(e){var t;const r=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:n}=e.layout,{animationType:o}=e.options,i=r.source!==e.layout.source;"size"===o?$v((e=>{const n=i?r.measuredBox[e]:r.layoutBox[e],o=Pv(n);n.min=t[e].min,n.max=n.min+o})):fb(o,r.layoutBox,t)&&$v((n=>{const o=i?r.measuredBox[n]:r.layoutBox[n],a=Pv(t[n]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[n].max=e.relativeTarget[n].min+a)}));const a=Fv();jv(a,t,r.layoutBox);const s=Fv();i?jv(s,e.applyTransform(n,!0),r.measuredBox):jv(s,t,r.layoutBox);const l=!Ng(a);let c=!1;if(!e.resumeFrom){const n=e.getClosestProjectingParent();if(n&&!n.resumeFrom){const{snapshot:o,layout:i}=n;if(o&&i){const a=Lv();Mv(a,r.layoutBox,o.layoutBox);const s=Lv();Mv(s,t,i.layoutBox),Dg(a,s)||(c=!0),n.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=n)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:r,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Gg(e){Ug.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Kg(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Zg(e){e.clearSnapshot()}function Qg(e){e.clearMeasurements()}function Jg(e){e.isLayoutDirty=!1}function eb(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function tb(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function rb(e){e.resolveTargetDelta()}function nb(e){e.calcProjection()}function ob(e){e.resetRotation()}function ib(e){e.removeLeadSnapshot()}function ab(e,t,r){e.translate=Ih(t.translate,0,r),e.scale=Ih(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function sb(e,t,r,n){e.min=Ih(t.min,r.min,n),e.max=Ih(t.max,r.max,n)}function lb(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const cb={duration:.45,ease:[.4,0,.1,1]},ub=e=>"undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().includes(e),db=ub("applewebkit/")&&!ub("chrome/")?Math.round:xf;function pb(e){e.min=db(e.min),e.max=db(e.max)}function fb(e,t,r){return"position"===e||"preserve-aspect"===e&&!Av(zg(t),zg(r),.2)}const hb=qg({attachResizeListener:(e,t)=>Tf(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),mb={current:void 0},vb=qg({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!mb.current){const e=new hb({});e.mount(window),e.setOptions({layoutScroll:!0}),mb.current=e}return mb.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),gb={pan:{Feature:class extends $f{constructor(){super(...arguments),this.removePointerDownListener=xf}onPointerDown(e){this.session=new xv(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ig(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:r,onPanEnd:n}=this.node.getProps();return{onSessionStart:cg(e),onStart:cg(t),onMove:r,onEnd:(e,t)=>{delete this.session,n&&Sf.update((()=>n(e,t)))}}}mount(){this.removePointerDownListener=Mf(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends $f{constructor(e){super(e),this.removeGroupControls=xf,this.removeListeners=xf,this.controls=new sg(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xf}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:vb,MeasureLayout:gg}},bb=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function yb(e,t,r=1){const[n,o]=function(e){const t=bb.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]}(e);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const e=i.trim();return Xm(e)?parseFloat(e):e}return Sp(o)?yb(o,t,r+1):o}const xb=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),wb=e=>xb.has(e),kb=e=>e===_p||e===zp,Sb=(e,t)=>parseFloat(e.split(", ")[t]),Cb=(e,t)=>(r,{transform:n})=>{if("none"===n||!n)return 0;const o=n.match(/^matrix3d\((.+)\)$/);if(o)return Sb(o[1],t);{const t=n.match(/^matrix\((.+)\)$/);return t?Sb(t[1],e):0}},Eb=new Set(["x","y","z"]),_b=mp.filter((e=>!Eb.has(e)));const Pb={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Cb(4,13),y:Cb(5,14)};Pb.translateX=Pb.x,Pb.translateY=Pb.y;const Ab=(e,t,r={},n={})=>{t={...t},n={...n};const o=Object.keys(t).filter(wb);let i=[],a=!1;const s=[];if(o.forEach((o=>{const l=e.getValue(o);if(!e.hasValue(o))return;let c=r[o],u=tv(c);const d=t[o];let p;if(hf(d)){const e=d.length,t=null===d[0]?1:0;c=d[t],u=tv(c);for(let r=t;r{const n=e.getValue(r);void 0!==n&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))})),t.length&&e.render(),t}(e),a=!0),s.push(o),n[o]=void 0!==n[o]?n[o]:t[o],l.jump(d))})),s.length){const r=s.indexOf("height")>=0?window.pageYOffset:null,o=((e,t,r)=>{const n=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:a}=i,s={};"none"===a&&t.setStaticValue("display",e.display||"block"),r.forEach((e=>{s[e]=Pb[e](n,i)})),t.render();const l=t.measureViewportBox();return r.forEach((r=>{const n=t.getValue(r);n&&n.jump(s[r]),e[r]=Pb[r](l,i)})),e})(t,e,s);return i.length&&i.forEach((([t,r])=>{e.getValue(t).set(r)})),e.render(),Hd&&null!==r&&window.scrollTo({top:r}),{target:o,transitionEnd:n}}return{target:t,transitionEnd:n}};function Tb(e,t,r,n){return(e=>Object.keys(e).some(wb))(t)?Ab(e,t,r,n):{target:t,transitionEnd:n}}const jb=(e,t,r,n)=>{const o=function(e,{...t},r){const n=e.current;if(!(n instanceof Element))return{target:t,transitionEnd:r};r&&(r={...r}),e.values.forEach((e=>{const t=e.get();if(!Sp(t))return;const r=yb(t,n);r&&e.set(r)}));for(const o in t){const e=t[o];if(!Sp(e))continue;const i=yb(e,n);i&&(t[o]=i,r||(r={}),void 0===r[o]&&(r[o]=e))}return{target:t,transitionEnd:r}}(e,t,n);return Tb(e,t=o.target,r,n=o.transitionEnd)},Rb={current:null},Ob={current:!1};const Mb=new WeakMap,Ib=Object.keys(ip),Nb=Ib.length,Db=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],zb=Jd.length;class Bb{constructor({parent:e,props:t,presenceContext:r,reducedMotionConfig:n,visualState:o},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Sf.render(this.render,!1,!0);const{latestValues:a,renderState:s}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=s,this.parent=e,this.props=t,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=i,this.isControllingVariants=ep(t),this.isVariantNode=tp(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(t,{});for(const u in c){const e=c[u];void 0!==a[u]&&bp(e)&&(e.set(a[u],!1),qm(l)&&l.add(u))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,Mb.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),Ob.current||function(){if(Ob.current=!0,Hd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Rb.current=e.matches;e.addListener(t),t()}else Rb.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Rb.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Mb.delete(this.current),this.projection&&this.projection.unmount(),Cf(this.notifyUpdate),Cf(this.render),this.valueSubscriptions.forEach((e=>e())),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const r=vp.has(e),n=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Sf.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(()=>{n(),o()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures({children:e,...t},r,n,o){let i,a;for(let s=0;sthis.scheduleRender(),animationType:"string"==typeof r?r:"both",initialPromotionConfig:o,layoutScroll:s,layoutRoot:l})}return a}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Lv()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let r=0;rt.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return void 0===r&&void 0!==t&&(r=Qm(t,{owner:this}),this.addValue(e,r)),r}readValue(e){var t;return void 0===this.latestValues[e]&&this.current?null!==(t=this.getBaseTargetFromProps(this.props,e))&&void 0!==t?t:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e]}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:r}=this.props,n="string"==typeof r||"object"==typeof r?null===(t=pf(this.props,r))||void 0===t?void 0:t[e]:void 0;if(r&&void 0!==n)return n;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||bp(o)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new Km),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class Fb extends Bb{sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:r}){delete t[e],delete r[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...r},{transformValues:n},o){let i=function(e,t,r){const n={};for(const o in e){const e=iv(o,t);if(void 0!==e)n[o]=e;else{const e=r.getValue(o);e&&(n[o]=e.get())}}return n}(r,e||{},this);if(n&&(t&&(t=n(t)),r&&(r=n(r)),i&&(i=n(i))),o){!function(e,t,r){var n,o;const i=Object.keys(t).filter((t=>!e.hasValue(t))),a=i.length;if(a)for(let s=0;s{this.current&&(this.current.textContent=`${e}`)})))}renderInstance(e,t,r,n){sf(e,t,r,n)}}class $b extends Fb{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(vp.has(t)){const e=Lm(t);return e&&e.default||0}return t=lf.has(t)?t:Xd(t),e.getAttribute(t)}measureInstanceViewportBox(){return Lv()}scrapeMotionValuesFromProps(e,t){return df(e,t)}build(e,t,r,n){tf(e,t,r,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,r,n){cf(e,t,0,n)}mount(e){this.isSVGTag=nf(e.tagName),super.mount(e)}}const Vb=(e,t)=>fp(e)?new $b(t,{enableHardwareAcceleration:!1}):new Lb(t,{enableHardwareAcceleration:!0}),Wb={...bv,...Zf,...gb,...{layout:{ProjectionNode:vb,MeasureLayout:gg}}},Hb=dp(((e,t)=>function(e,{forwardMotionProps:t=!1},r,n){return{...fp(e)?Pf:Af,preloadedFeatures:r,useRender:af(t),createVisualElement:n,Component:e}}(e,t,Wb,Vb)));function Ub(){const e=i.useRef(!1);return Ud((()=>(e.current=!0,()=>{e.current=!1})),[]),e}class qb extends i.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Xb({children:e,isPresent:t}){const r=i.useId(),n=i.useRef(null),o=i.useRef({width:0,height:0,top:0,left:0});return i.useInsertionEffect((()=>{const{width:e,height:i,top:a,left:s}=o.current;if(t||!n.current||!e||!i)return;n.current.dataset.motionPopId=r;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${r}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${i}px !important;\n top: ${a}px !important;\n left: ${s}px !important;\n }\n `),()=>{document.head.removeChild(l)}}),[t]),i.createElement(qb,{isPresent:t,childRef:n,sizeRef:o},i.cloneElement(e,{ref:n}))}const Yb=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:o,presenceAffectsLayout:a,mode:s})=>{const l=ff(Gb),c=i.useId(),u=i.useMemo((()=>({id:c,initial:t,isPresent:r,custom:o,onExitComplete:e=>{l.set(e,!0);for(const t of l.values())if(!t)return;n&&n()},register:e=>(l.set(e,!1),()=>l.delete(e))})),a?void 0:[r]);return i.useMemo((()=>{l.forEach(((e,t)=>l.set(t,!1)))}),[r]),i.useEffect((()=>{!r&&!l.size&&n&&n()}),[r]),"popLayout"===s&&(e=i.createElement(Xb,{isPresent:r},e)),i.createElement(Wd.Provider,{value:u},e)};function Gb(){return new Map}const Kb=e=>e.key||"";const Zb=({children:e,custom:t,initial:r=!0,onExitComplete:n,exitBeforeEnter:o,presenceAffectsLayout:a=!0,mode:s="sync"})=>{const l=i.useContext(ap).forceRender||function(){const e=Ub(),[t,r]=i.useState(0),n=i.useCallback((()=>{e.current&&r(t+1)}),[t]);return[i.useCallback((()=>Sf.postRender(n)),[n]),t]}()[0],c=Ub(),u=function(e){const t=[];return i.Children.forEach(e,(e=>{i.isValidElement(e)&&t.push(e)})),t}(e);let d=u;const p=i.useRef(new Map).current,f=i.useRef(d),h=i.useRef(new Map).current,m=i.useRef(!0);var v;if(Ud((()=>{m.current=!1,function(e,t){e.forEach((e=>{const r=Kb(e);t.set(r,e)}))}(u,h),f.current=d})),v=()=>{m.current=!0,h.clear(),p.clear()},i.useEffect((()=>()=>v()),[]),m.current)return i.createElement(i.Fragment,null,d.map((e=>i.createElement(Yb,{key:Kb(e),isPresent:!0,initial:!!r&&void 0,presenceAffectsLayout:a,mode:s},e))));d=[...d];const g=f.current.map(Kb),b=u.map(Kb),y=g.length;for(let i=0;i{if(-1!==b.indexOf(r))return;const o=h.get(r);if(!o)return;const m=g.indexOf(r);let v=e;if(!v){const e=()=>{p.delete(r);const e=Array.from(h.keys()).filter((e=>!b.includes(e)));if(e.forEach((e=>h.delete(e))),f.current=u.filter((t=>{const n=Kb(t);return n===r||e.includes(n)})),!p.size){if(!1===c.current)return;l(),n&&n()}};v=i.createElement(Yb,{key:Kb(o),isPresent:!1,onExitComplete:e,custom:t,presenceAffectsLayout:a,mode:s},o),p.set(r,v)}d.splice(m,0,v)})),d=d.map((e=>{const t=e.key;return p.has(t)?e:i.createElement(Yb,{key:Kb(e),isPresent:!0,presenceAffectsLayout:a,mode:s},e)})),i.createElement(i.Fragment,null,p.size?d:d.map((e=>i.cloneElement(e))))};var Qb={initial:e=>{const{position:t}=e,r=["top","bottom"].includes(t)?"y":"x";let n=["top-right","bottom-right"].includes(t)?1:-1;return"bottom"===t&&(n=1),{opacity:0,[r]:24*n}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},Jb=i.memo((e=>{const{id:t,message:r,onCloseComplete:n,onRequestRemove:o,requestClose:a=!1,position:s="bottom",duration:l=5e3,containerStyle:c,motionVariants:u=Qb,toastSpacing:d="0.5rem"}=e,[p,f]=i.useState(l),h=dg();Ld((()=>{h||null==n||n()}),[h]),Ld((()=>{f(l)}),[l]);const m=()=>{h&&o()};i.useEffect((()=>{h&&a&&o()}),[h,a,o]),function(e,t){const r=Fd(e);i.useEffect((()=>{if(null==t)return;let e=null;return e=window.setTimeout((()=>{r()}),t),()=>{e&&window.clearTimeout(e)}}),[t,r])}(m,p);const v=i.useMemo((()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:d,...c})),[c,d]),g=i.useMemo((()=>function(e){let t="center";return e.includes("right")&&(t="flex-end"),e.includes("left")&&(t="flex-start"),{display:"flex",flexDirection:"column",alignItems:t}}(s)),[s]);return y.jsx(Hb.div,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:()=>f(null),onHoverEnd:()=>f(l),custom:{position:s},style:g,children:y.jsx(_d.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:v,children:Gt(r,{id:t,onClose:m})})})}));function ey(e,t){var r;const n=null!=e?e:"bottom",o={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return null!=(r=null==o?void 0:o[t])?r:n}Jb.displayName="ToastComponent";var ty={path:y.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[y.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),y.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),y.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ry=n("aE",Pd(((e,t)=>{const{as:r,viewBox:n,color:o="currentColor",focusable:i=!1,children:a,className:s,__css:l,...c}=e,u={ref:t,focusable:i,className:qt("chakra-icon",s),__css:{w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o,...l,...cd("Icon",e)}},d=null!=n?n:ty.viewBox;if(r&&"string"!=typeof r)return y.jsx(_d.svg,{as:r,...u,...c});const p=null!=a?a:ty.path;return y.jsx(_d.svg,{verticalAlign:"middle",viewBox:d,...u,...c,children:p})})));function ny(e){return y.jsx(ry,{viewBox:"0 0 24 24",...e,children:y.jsx("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}ry.displayName="Icon";var oy=yt({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),iy=n("S",Pd(((e,t)=>{const r=cd("Spinner",e),{label:n="Loading...",thickness:o="2px",speed:i="0.45s",emptyColor:a="transparent",className:s,...l}=Wn(e),c=qt("chakra-spinner",s),u={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:o,borderBottomColor:a,borderLeftColor:a,animation:`${oy} ${i} linear infinite`,...r};return y.jsx(_d.div,{ref:t,__css:u,className:c,...l,children:n&&y.jsx(_d.span,{srOnly:!0,children:n})})})));iy.displayName="Spinner";var[ay,sy]=Ct({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[ly,cy]=Ct({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),uy={info:{icon:function(e){return y.jsx(ry,{viewBox:"0 0 24 24",...e,children:y.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})},colorScheme:"blue"},warning:{icon:ny,colorScheme:"orange"},success:{icon:function(e){return y.jsx(ry,{viewBox:"0 0 24 24",...e,children:y.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})},colorScheme:"green"},error:{icon:ny,colorScheme:"red"},loading:{icon:iy,colorScheme:"blue"}};var dy=n("ab",Pd((function(e,t){const r=cy(),{status:n}=sy(),o={display:"inline",...r.description};return y.jsx(_d.div,{ref:t,"data-status":n,...e,className:qt("chakra-alert__desc",e.className),__css:o})})));function py(e){const{status:t}=sy(),r=function(e){return uy[e].icon}(t),n=cy(),o="loading"===t?n.spinner:n.icon;return y.jsx(_d.span,{display:"inherit","data-status":t,...e,className:qt("chakra-alert__icon",e.className),__css:o,children:e.children||y.jsx(r,{h:"100%",w:"100%"})})}dy.displayName="AlertDescription",py.displayName="AlertIcon";var fy=n("aa",Pd((function(e,t){const r=cy(),{status:n}=sy();return y.jsx(_d.div,{ref:t,"data-status":n,...e,className:qt("chakra-alert__title",e.className),__css:r.title})})));fy.displayName="AlertTitle";var hy=n("a8",Pd((function(e,t){var r;const{status:n="info",addRole:o=!0,...i}=Wn(e),a=null!=(r=e.colorScheme)?r:function(e){return uy[e].colorScheme}(n),s=ud("Alert",{...e,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return y.jsx(ay,{value:{status:n},children:y.jsx(ly,{value:s,children:y.jsx(_d.div,{"data-status":n,role:o?"alert":void 0,ref:t,...i,className:qt("chakra-alert",e.className),__css:l})})})})));function my(e){return y.jsx(ry,{focusable:"false","aria-hidden":!0,...e,children:y.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}hy.displayName="Alert";var vy=n("al",Pd((function(e,t){const r=cd("CloseButton",e),{children:n,isDisabled:o,__css:i,...a}=Wn(e);return y.jsx(_d.button,{type:"button","aria-label":"Close",ref:t,disabled:o,__css:{outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,...r,...i},...a,children:n||y.jsx(my,{width:"1em",height:"1em"})})})));vy.displayName="CloseButton";var gy=function(e){let t=e;const r=new Set,n=e=>{t=e(t),r.forEach((e=>e()))};return{getState:()=>t,subscribe:t=>(r.add(t),()=>{n((()=>e)),r.delete(t)}),removeToast:(e,t)=>{n((r=>({...r,[t]:r[t].filter((t=>t.id!=e))})))},notify:(e,t)=>{const r=function(e,t={}){var r,n;by+=1;const o=null!=(r=t.id)?r:by,i=null!=(n=t.position)?n:"bottom";return{id:o,message:e,position:i,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>gy.removeToast(String(o),i),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}(e,t),{position:o,id:i}=r;return n((e=>{var t,n;const i=o.includes("top")?[r,...null!=(t=e[o])?t:[]]:[...null!=(n=e[o])?n:[],r];return{...e,[o]:i}})),i},update:(e,t)=>{e&&n((r=>{const n={...r},{position:o,index:i}=Dd(n,e);return o&&-1!==i&&(n[o][i]={...n[o][i],...t,message:xy(t)}),n}))},closeAll:({positions:e}={})=>{n((t=>(null!=e?e:["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce(((e,r)=>(e[r]=t[r].map((e=>({...e,requestClose:!0}))),e)),{...t})))},close:e=>{n((t=>{const r=zd(t,e);return r?{...t,[r]:t[r].map((t=>t.id==e?{...t,requestClose:!0}:t))}:t}))},isActive:e=>Boolean(Dd(gy.getState(),e).position)}}({top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]});var by=0;var yy=e=>{const{status:t,variant:r="solid",id:n,title:o,isClosable:i,onClose:a,description:s,colorScheme:l,icon:c}=e,u=n?{root:`toast-${n}`,title:`toast-${n}-title`,description:`toast-${n}-description`}:void 0;return y.jsxs(hy,{addRole:!1,status:t,variant:r,id:null==u?void 0:u.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:l,children:[y.jsx(py,{children:c}),y.jsxs(_d.div,{flex:"1",maxWidth:"100%",children:[o&&y.jsx(fy,{id:null==u?void 0:u.title,children:o}),s&&y.jsx(dy,{id:null==u?void 0:u.description,display:"block",children:s})]}),i&&y.jsx(vy,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1})]})};function xy(e={}){const{render:t,toastComponent:r=yy}=e;return n=>"function"==typeof t?t({...n,...e}):y.jsx(r,{...n,...e})}var[wy,ky]=Ct({name:"ToastOptionsContext",strict:!1}),Sy=e=>{const t=i.useSyncExternalStore(gy.subscribe,gy.getState,gy.getState),{motionVariants:r,component:n=Jb,portalProps:o}=e,a=Object.keys(t).map((e=>{const o=t[e];return y.jsx("div",{role:"region","aria-live":"polite","aria-label":`Notifications-${e}`,id:`chakra-toast-manager-${e}`,style:Bd(e),children:y.jsx(Zb,{initial:!1,children:o.map((e=>y.jsx(n,{motionVariants:r,...e},e.id)))})},e)}));return y.jsx(Nt,{...o,children:a})};n("ap",(Cy=Cu,function({children:e,theme:t=Cy,toastOptions:r,...n}){return y.jsxs(Id,{theme:t,...n,children:[y.jsx(wy,{value:null==r?void 0:r.defaultOptions,children:e}),y.jsx(Sy,{...r})]})}));var Cy,Ey=Object.defineProperty,_y=(e,t,r)=>(((e,t,r)=>{t in e?Ey(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);function Py(e){return e.sort(((e,t)=>{const r=e.compareDocumentPosition(t);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0}))}function Ay(e,t,r){let n=e+1;return r&&n>=t&&(n=0),n}function Ty(e,t,r){let n=e-1;return r&&n<0&&(n=t),n}var jy="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,Ry=e=>e,Oy=class{constructor(){_y(this,"descendants",new Map),_y(this,"register",(e=>{var t;if(null!=e)return"object"==typeof(t=e)&&"nodeType"in t&&t.nodeType===Node.ELEMENT_NODE?this.registerNode(e):t=>{this.registerNode(t,e)}})),_y(this,"unregister",(e=>{this.descendants.delete(e);const t=Py(Array.from(this.descendants.keys()));this.assignIndex(t)})),_y(this,"destroy",(()=>{this.descendants.clear()})),_y(this,"assignIndex",(e=>{this.descendants.forEach((t=>{const r=e.indexOf(t.node);t.index=r,t.node.dataset.index=t.index.toString()}))})),_y(this,"count",(()=>this.descendants.size)),_y(this,"enabledCount",(()=>this.enabledValues().length)),_y(this,"values",(()=>Array.from(this.descendants.values()).sort(((e,t)=>e.index-t.index)))),_y(this,"enabledValues",(()=>this.values().filter((e=>!e.disabled)))),_y(this,"item",(e=>{if(0!==this.count())return this.values()[e]})),_y(this,"enabledItem",(e=>{if(0!==this.enabledCount())return this.enabledValues()[e]})),_y(this,"first",(()=>this.item(0))),_y(this,"firstEnabled",(()=>this.enabledItem(0))),_y(this,"last",(()=>this.item(this.descendants.size-1))),_y(this,"lastEnabled",(()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)})),_y(this,"indexOf",(e=>{var t,r;return e&&null!=(r=null==(t=this.descendants.get(e))?void 0:t.index)?r:-1})),_y(this,"enabledIndexOf",(e=>null==e?-1:this.enabledValues().findIndex((t=>t.node.isSameNode(e))))),_y(this,"next",((e,t=!0)=>{const r=Ay(e,this.count(),t);return this.item(r)})),_y(this,"nextEnabled",((e,t=!0)=>{const r=this.item(e);if(!r)return;const n=Ay(this.enabledIndexOf(r.node),this.enabledCount(),t);return this.enabledItem(n)})),_y(this,"prev",((e,t=!0)=>{const r=Ty(e,this.count()-1,t);return this.item(r)})),_y(this,"prevEnabled",((e,t=!0)=>{const r=this.item(e);if(!r)return;const n=Ty(this.enabledIndexOf(r.node),this.enabledCount()-1,t);return this.enabledItem(n)})),_y(this,"registerNode",((e,t)=>{if(!e||this.descendants.has(e))return;const r=Py(Array.from(this.descendants.keys()).concat(e));(null==t?void 0:t.disabled)&&(t.disabled=!!t.disabled);const n={node:e,index:-1,...t};this.descendants.set(e,n),this.assignIndex(r)}))}};function My(...e){return t=>{e.forEach((e=>{!function(e,t){if(null!=e)if("function"!=typeof e)try{e.current=t}catch(r){throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}else e(t)}(e,t)}))}}function Iy(...e){return i.useMemo((()=>My(...e)),e)}var[Ny,Dy]=Ct({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function zy(){return[Ry(Ny),()=>Ry(Dy()),()=>function(){const e=i.useRef(new Oy);return jy((()=>()=>e.current.destroy())),e.current}(),e=>function(e){const t=Dy(),[r,n]=i.useState(-1),o=i.useRef(null);jy((()=>()=>{o.current&&t.unregister(o.current)}),[]),jy((()=>{if(!o.current)return;const e=Number(o.current.dataset.index);r==e||Number.isNaN(e)||n(e)}));const a=Ry(e?t.register(e):t.register);return{descendants:t,index:r,enabledIndex:t.enabledIndexOf(o.current),register:My(a,o)}}(e)]}var[By,Fy]=Ct({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[Ly,$y]=Ct({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[Vy,Wy,Hy,Uy]=zy();function qy(e){const{value:t,defaultValue:r,onChange:n,shouldUpdate:o=((e,t)=>e!==t)}=e,a=Fd(n),s=Fd(o),[l,c]=i.useState(r),u=void 0!==t,d=u?t:l,p=Fd((e=>{const t="function"==typeof e?e(d):e;s(d,t)&&(u||c(t),a(t))}),[u,a,d,s]);return[d,p]}function Xy(e){const{onChange:t,defaultIndex:r,index:n,allowMultiple:o,allowToggle:a,...s}=e;!function(e){const t=e.index||e.defaultIndex;null!=t&&!Array.isArray(t)&&e.allowMultiple}(e),function(e){Yt({condition:!(!e.allowMultiple||!e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}(e);const l=Hy(),[c,u]=i.useState(-1);i.useEffect((()=>()=>{u(-1)}),[]);const[d,p]=qy({value:n,defaultValue:()=>o?null!=r?r:[]:null!=r?r:-1,onChange:t});return{index:d,setIndex:p,htmlProps:s,getAccordionItemProps:e=>{let t=!1;null!==e&&(t=Array.isArray(d)?d.includes(e):d===e);return{isOpen:t,onChange:t=>{if(null!==e)if(o&&Array.isArray(d)){const r=t?d.concat(e):d.filter((t=>t!==e));p(r)}else t?p(e):a&&p(-1)}}},focusedIndex:c,setFocusedIndex:u,descendants:l}}n("aX",Pd((function(e,t){const{getButtonProps:r}=$y(),n=r(e,t),o={display:"flex",alignItems:"center",width:"100%",outline:0,...Fy().button};return y.jsx(_d.button,{...n,className:qt("chakra-accordion__button",e.className),__css:o})}))).displayName="AccordionButton";var[Yy,Gy]=Ct({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Ky(e){const{isDisabled:t,isFocusable:r,id:n,...o}=e,{getAccordionItemProps:a,setFocusedIndex:s}=Gy(),l=i.useRef(null),c=i.useId(),u=null!=n?n:c,d=`accordion-button-${u}`,p=`accordion-panel-${u}`;!function(e){Yt({condition:!(!e.isFocusable||e.isDisabled),message:"Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well.\n "})}(e);const{register:f,index:h,descendants:m}=Uy({disabled:t&&!r}),{isOpen:v,onChange:g}=a(-1===h?null:h),b=i.useCallback((()=>{null==g||g(!v),s(h)}),[h,s,v,g]),y=i.useCallback((e=>{const t={ArrowDown:()=>{const e=m.nextEnabled(h);null==e||e.node.focus()},ArrowUp:()=>{const e=m.prevEnabled(h);null==e||e.node.focus()},Home:()=>{const e=m.firstEnabled();null==e||e.node.focus()},End:()=>{const e=m.lastEnabled();null==e||e.node.focus()}},r=t[e.key];r&&(e.preventDefault(),r(e))}),[m,h]),x=i.useCallback((()=>{s(h)}),[s,h]),w=i.useCallback((function(e={},r=null){return{...e,type:"button",ref:My(f,l,r),id:d,disabled:!!t,"aria-expanded":!!v,"aria-controls":p,onClick:Jt(e.onClick,b),onFocus:Jt(e.onFocus,x),onKeyDown:Jt(e.onKeyDown,y)}}),[d,t,v,b,x,y,p,f]),k=i.useCallback((function(e={},t=null){return{...e,ref:t,role:"region",id:p,"aria-labelledby":d,hidden:!v}}),[d,v,p]);return{isOpen:v,isDisabled:t,isFocusable:r,onOpen:()=>{null==g||g(!0)},onClose:()=>{null==g||g(!1)},getButtonProps:w,getPanelProps:k,htmlProps:o}}function Zy(e){const{isOpen:t,isDisabled:r}=$y(),{reduceMotion:n}=Gy(),o=qt("chakra-accordion__icon",e.className),i={opacity:r?.4:1,transform:t?"rotate(-180deg)":void 0,transition:n?void 0:"transform 0.2s",transformOrigin:"center",...Fy().icon};return y.jsx(ry,{viewBox:"0 0 24 24","aria-hidden":!0,className:o,__css:i,...e,children:y.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Zy.displayName="AccordionIcon",n("aW",Pd((function(e,t){const{children:r,className:n}=e,{htmlProps:o,...a}=Ky(e),s={...Fy().container,overflowAnchor:"none"},l=i.useMemo((()=>a),[a]);return y.jsx(Ly,{value:l,children:y.jsx(_d.div,{ref:t,...o,className:qt("chakra-accordion__item",n),__css:s,children:"function"==typeof r?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r})})}))).displayName="AccordionItem";var Qy={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Jy={enter:{duration:.2,ease:Qy.easeOut},exit:{duration:.1,ease:Qy.easeIn}},ex=(e,t)=>({...e,delay:"number"==typeof t?t:null==t?void 0:t.enter}),tx=(e,t)=>({...e,delay:"number"==typeof t?t:null==t?void 0:t.exit}),rx={exit:{height:{duration:.2,ease:Qy.ease},opacity:{duration:.3,ease:Qy.ease}},enter:{height:{duration:.3,ease:Qy.ease},opacity:{duration:.4,ease:Qy.ease}}},nx={exit:({animateOpacity:e,startingHeight:t,transition:r,transitionEnd:n,delay:o})=>{var i,a;return{...e&&{opacity:(a=t,null!=a&&parseInt(a.toString(),10)>0?1:0)},height:t,transitionEnd:null==n?void 0:n.exit,transition:null!=(i=null==r?void 0:r.exit)?i:tx(rx.exit,o)}},enter:({animateOpacity:e,endingHeight:t,transition:r,transitionEnd:n,delay:o})=>{var i;return{...e&&{opacity:1},height:t,transitionEnd:null==n?void 0:n.enter,transition:null!=(i=null==r?void 0:r.enter)?i:ex(rx.enter,o)}}},ox=i.forwardRef(((e,t)=>{const{in:r,unmountOnExit:n,animateOpacity:o=!0,startingHeight:a=0,endingHeight:s="auto",style:l,className:c,transition:u,transitionEnd:d,...p}=e,[f,h]=i.useState(!1);i.useEffect((()=>{const e=setTimeout((()=>{h(!0)}));return()=>clearTimeout(e)}),[]);const m=parseFloat(a.toString())>0,v={startingHeight:a,endingHeight:s,animateOpacity:o,transition:f?u:{enter:{duration:0}},transitionEnd:{enter:null==d?void 0:d.enter,exit:n?null==d?void 0:d.exit:{...null==d?void 0:d.exit,display:m?"block":"none"}}},g=!n||r,b=r||n?"enter":"exit";return y.jsx(Zb,{initial:!1,custom:v,children:g&&y.jsx(Hb.div,{ref:t,...p,className:qt("chakra-collapse",c),style:{overflow:"hidden",display:"block",...l},custom:v,variants:nx,initial:!!n&&"exit",animate:b,exit:"exit"})})}));ox.displayName="Collapse";var ix={enter:({transition:e,transitionEnd:t,delay:r}={})=>{var n;return{opacity:1,transition:null!=(n=null==e?void 0:e.enter)?n:ex(Jy.enter,r),transitionEnd:null==t?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:r}={})=>{var n;return{opacity:0,transition:null!=(n=null==e?void 0:e.exit)?n:tx(Jy.exit,r),transitionEnd:null==t?void 0:t.exit}}},ax={initial:"exit",animate:"enter",exit:"exit",variants:ix},sx=i.forwardRef((function(e,t){const{unmountOnExit:r,in:n,className:o,transition:i,transitionEnd:a,delay:s,...l}=e,c=n||r?"enter":"exit",u=!r||n&&r,d={transition:i,transitionEnd:a,delay:s};return y.jsx(Zb,{custom:d,children:u&&y.jsx(Hb.div,{ref:t,className:qt("chakra-fade",o),custom:d,...ax,animate:c,...l})})}));sx.displayName="Fade";var lx={exit:({reverse:e,initialScale:t,transition:r,transitionEnd:n,delay:o})=>{var i;return{opacity:0,...e?{scale:t,transitionEnd:null==n?void 0:n.exit}:{transitionEnd:{scale:t,...null==n?void 0:n.exit}},transition:null!=(i=null==r?void 0:r.exit)?i:tx(Jy.exit,o)}},enter:({transitionEnd:e,transition:t,delay:r})=>{var n;return{opacity:1,scale:1,transition:null!=(n=null==t?void 0:t.enter)?n:ex(Jy.enter,r),transitionEnd:null==e?void 0:e.enter}}},cx={initial:"exit",animate:"enter",exit:"exit",variants:lx},ux=i.forwardRef((function(e,t){const{unmountOnExit:r,in:n,reverse:o=!0,initialScale:i=.95,className:a,transition:s,transitionEnd:l,delay:c,...u}=e,d=!r||n&&r,p=n||r?"enter":"exit",f={initialScale:i,reverse:o,transition:s,transitionEnd:l,delay:c};return y.jsx(Zb,{custom:f,children:d&&y.jsx(Hb.div,{ref:t,className:qt("chakra-offset-slide",a),...cx,animate:p,custom:f,...u})})}));ux.displayName="ScaleFade";var dx={initial:({offsetX:e,offsetY:t,transition:r,transitionEnd:n,delay:o})=>{var i;return{opacity:0,x:e,y:t,transition:null!=(i=null==r?void 0:r.exit)?i:tx(Jy.exit,o),transitionEnd:null==n?void 0:n.exit}},enter:({transition:e,transitionEnd:t,delay:r})=>{var n;return{opacity:1,x:0,y:0,transition:null!=(n=null==e?void 0:e.enter)?n:ex(Jy.enter,r),transitionEnd:null==t?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:r,transitionEnd:n,reverse:o,delay:i})=>{var a;const s={x:t,y:e};return{opacity:0,transition:null!=(a=null==r?void 0:r.exit)?a:tx(Jy.exit,i),...o?{...s,transitionEnd:null==n?void 0:n.exit}:{transitionEnd:{...s,...null==n?void 0:n.exit}}}}},px={initial:"initial",animate:"enter",exit:"exit",variants:dx},fx=i.forwardRef((function(e,t){const{unmountOnExit:r,in:n,reverse:o=!0,className:i,offsetX:a=0,offsetY:s=8,transition:l,transitionEnd:c,delay:u,...d}=e,p=!r||n&&r,f=n||r?"enter":"exit",h={offsetX:a,offsetY:s,reverse:o,transition:l,transitionEnd:c,delay:u};return y.jsx(Zb,{custom:h,children:p&&y.jsx(Hb.div,{ref:t,className:qt("chakra-offset-slide",i),custom:h,...px,animate:f,...d})})}));fx.displayName="SlideFade";var hx=n("aZ",Pd((function(e,t){const{className:r,motionProps:n,...o}=e,{reduceMotion:i}=Gy(),{getPanelProps:a,isOpen:s}=$y(),l=a(o,t),c=qt("chakra-accordion__panel",r),u=Fy();i||delete l.hidden;const d=y.jsx(_d.div,{...l,__css:u.panel,className:c});return i?d:y.jsx(ox,{in:s,...n,children:d})})));hx.displayName="AccordionPanel";var mx=n("aV",Pd((function({children:e,reduceMotion:t,...r},n){const o=ud("Accordion",r),a=Wn(r),{htmlProps:s,descendants:l,...c}=Xy(a),u=i.useMemo((()=>({...c,reduceMotion:!!t})),[c,t]);return y.jsx(Vy,{value:l,children:y.jsx(Yy,{value:u,children:y.jsx(By,{value:o,children:y.jsx(_d.div,{ref:n,...s,className:qt("chakra-accordion",r.className),__css:o.root,children:e})})})})})));mx.displayName="Accordion";var[vx,gx]=Ct({name:"AvatarStylesContext",hookName:"useAvatarStyles",providerName:""});function bx(e){var t;const r=e.split(" "),n=null!=(t=r[0])?t:"",o=r.length>1?r[r.length-1]:"";return n&&o?`${n.charAt(0)}${o.charAt(0)}`:n.charAt(0)}function yx(e){const{name:t,getInitials:r,...n}=e,o=gx();return y.jsx(_d.div,{role:"img","aria-label":t,...n,__css:o.label,children:t?null==r?void 0:r(t):null})}yx.displayName="AvatarName";var xx=e=>y.jsxs(_d.svg,{viewBox:"0 0 128 128",color:"#fff",width:"100%",height:"100%",className:"chakra-avatar__svg",...e,children:[y.jsx("path",{fill:"currentColor",d:"M103,102.1388 C93.094,111.92 79.3504,118 64.1638,118 C48.8056,118 34.9294,111.768 25,101.7892 L25,95.2 C25,86.8096 31.981,80 40.6,80 L87.4,80 C96.019,80 103,86.8096 103,95.2 L103,102.1388 Z"}),y.jsx("path",{fill:"currentColor",d:"M63.9961647,24 C51.2938136,24 41,34.2938136 41,46.9961647 C41,59.7061864 51.2938136,70 63.9961647,70 C76.6985159,70 87,59.7061864 87,46.9961647 C87,34.2938136 76.6985159,24 63.9961647,24"})]}),wx=Pd((function(e,t){const{htmlWidth:r,htmlHeight:n,alt:o,...i}=e;return y.jsx("img",{width:r,height:n,ref:t,alt:o,...i})}));function kx(e){const{loading:t,src:r,srcSet:n,onLoad:o,onError:a,crossOrigin:s,sizes:l,ignoreFallback:c}=e,[u,d]=i.useState("pending");i.useEffect((()=>{d(r?"loading":"pending")}),[r]);const p=i.useRef(),f=i.useCallback((()=>{if(!r)return;h();const e=new Image;e.src=r,s&&(e.crossOrigin=s),n&&(e.srcset=n),l&&(e.sizes=l),t&&(e.loading=t),e.onload=e=>{h(),d("loaded"),null==o||o(e)},e.onerror=e=>{h(),d("failed"),null==a||a(e)},p.current=e}),[r,s,n,l,o,a,t]),h=()=>{p.current&&(p.current.onload=null,p.current.onerror=null,p.current=null)};return At((()=>{if(!c)return"loading"===u&&f(),()=>{h()}}),[u,f,c]),c?"loaded":u}wx.displayName="NativeImage";function Sx(e,t=[]){const r=Object.assign({},e);for(const n of t)n in r&&delete r[n];return r}function Cx(e){const{src:t,srcSet:r,onError:n,onLoad:o,getInitials:a,name:s,borderRadius:l,loading:c,iconLabel:u,icon:d=y.jsx(xx,{}),ignoreFallback:p,referrerPolicy:f,crossOrigin:h}=e,m=kx({src:t,onError:n,crossOrigin:h,ignoreFallback:p});return!t||!("loaded"===m)?s?y.jsx(yx,{className:"chakra-avatar__initials",getInitials:a,name:s}):i.cloneElement(d,{role:"img","aria-label":u}):y.jsx(_d.img,{src:t,srcSet:r,alt:s,onLoad:o,referrerPolicy:f,crossOrigin:null!=h?h:void 0,className:"chakra-avatar__img",loading:c,__css:{width:"100%",height:"100%",objectFit:"cover",borderRadius:l}})}n("av",Pd((function(e,t){const{fallbackSrc:r,fallback:n,src:o,srcSet:i,align:a,fit:s,loading:l,ignoreFallback:c,crossOrigin:u,fallbackStrategy:d="beforeLoadOrError",referrerPolicy:p,...f}=e,h=null!=l||c||!(void 0!==r||void 0!==n),m=((e,t)=>"loaded"!==e&&"beforeLoadOrError"===t||"failed"===e&&"onError"===t)(kx({...e,crossOrigin:u,ignoreFallback:h}),d),v={ref:t,objectFit:s,objectPosition:a,...h?f:Sx(f,["onError","onLoad"])};return m?n||y.jsx(_d.img,{as:wx,className:"chakra-image__placeholder",src:r,...v}):y.jsx(_d.img,{as:wx,src:o,srcSet:i,crossOrigin:u,loading:l,referrerPolicy:p,className:"chakra-image",...v})}))).displayName="Image",Cx.displayName="AvatarImage";var Ex={display:"inline-flex",alignItems:"center",justifyContent:"center",textAlign:"center",textTransform:"uppercase",fontWeight:"medium",position:"relative",flexShrink:0},_x=n("az",Pd(((e,t)=>{const r=ud("Avatar",e),[n,o]=i.useState(!1),{src:a,srcSet:s,name:l,showBorder:c,borderRadius:u="full",onError:d,onLoad:p,getInitials:f=bx,icon:h=y.jsx(xx,{}),iconLabel:m=" avatar",loading:v,children:g,borderColor:b,ignoreFallback:x,crossOrigin:w,referrerPolicy:k,...S}=Wn(e),C={borderRadius:u,borderWidth:c?"2px":void 0,...Ex,...r.container};return b&&(C.borderColor=b),y.jsx(_d.span,{ref:t,...S,className:qt("chakra-avatar",e.className),"data-loaded":Zt(n),__css:C,children:y.jsxs(vx,{value:r,children:[y.jsx(Cx,{src:a,srcSet:s,loading:v,onLoad:Jt(p,(()=>{o(!0)})),onError:d,getInitials:f,name:l,borderRadius:u,icon:h,iconLabel:m,ignoreFallback:x,crossOrigin:w,referrerPolicy:k}),g]})})})));function Px(e){return i.Children.toArray(e).filter((e=>i.isValidElement(e)))}_x.displayName="Avatar";var[Ax,Tx]=Ct({strict:!1,name:"ButtonGroupContext"}),jx={horizontal:{"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}},vertical:{"> *:first-of-type:not(:last-of-type)":{borderBottomRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderTopRadius:0}}},Rx={horizontal:e=>({"& > *:not(style) ~ *:not(style)":{marginStart:e}}),vertical:e=>({"& > *:not(style) ~ *:not(style)":{marginTop:e}})},Ox=n("N",Pd((function(e,t){const{size:r,colorScheme:n,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:c,orientation:u="horizontal",...d}=e,p=qt("chakra-button__group",a),f=i.useMemo((()=>({size:r,colorScheme:n,variant:o,isDisabled:c})),[r,n,o,c]);let h={display:"inline-flex",...l?jx[u]:Rx[u](s)};const m="vertical"===u;return y.jsx(Ax,{value:f,children:y.jsx(_d.div,{ref:t,role:"group",__css:h,className:p,"data-attached":l?"":void 0,"data-orientation":u,flexDir:m?"column":void 0,...d})})})));function Mx(e){const{children:t,className:r,...n}=e,o=i.isValidElement(t)?i.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,a=qt("chakra-button__icon",r);return y.jsx(_d.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...n,className:a,children:o})}function Ix(e){const{label:t,placement:r,spacing:n="0.5rem",children:o=y.jsx(iy,{color:"currentColor",width:"1em",height:"1em"}),className:a,__css:s,...l}=e,c=qt("chakra-button__spinner",a),u="start"===r?"marginEnd":"marginStart",d=i.useMemo((()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?n:0,fontSize:"1em",lineHeight:"normal",...s})),[s,t,u,n]);return y.jsx(_d.div,{className:c,...l,__css:d,children:o})}Ox.displayName="ButtonGroup",Mx.displayName="ButtonIcon",Ix.displayName="ButtonSpinner";var Nx=n("O",Pd(((e,t)=>{const r=Tx(),n=cd("Button",{...r,...e}),{isDisabled:o=(null==r?void 0:r.isDisabled),isLoading:a,isActive:s,children:l,leftIcon:c,rightIcon:u,loadingText:d,iconSpacing:p="0.5rem",type:f,spinner:h,spinnerPlacement:m="start",className:v,as:g,...b}=Wn(e),x=i.useMemo((()=>{const e={...null==n?void 0:n._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...n,...!!r&&{_focus:e}}}),[n,r]),{ref:w,type:k}=function(e){const[t,r]=i.useState(!e),n=i.useCallback((e=>{e&&r("BUTTON"===e.tagName)}),[]);return{ref:n,type:t?"button":void 0}}(g),S={rightIcon:u,leftIcon:c,iconSpacing:p,children:l};return y.jsxs(_d.button,{ref:Iy(t,w),as:g,type:null!=f?f:k,"data-active":Zt(s),"data-loading":Zt(a),__css:x,className:qt("chakra-button",v),...b,disabled:o||a,children:[a&&"start"===m&&y.jsx(Ix,{className:"chakra-button__spinner--start",label:d,placement:"start",spacing:p,children:h}),a?d||y.jsx(_d.span,{opacity:0,children:y.jsx(Dx,{...S})}):y.jsx(Dx,{...S}),a&&"end"===m&&y.jsx(Ix,{className:"chakra-button__spinner--end",label:d,placement:"end",spacing:p,children:h})]})})));function Dx(e){const{leftIcon:t,rightIcon:r,children:n,iconSpacing:o}=e;return y.jsxs(y.Fragment,{children:[t&&y.jsx(Mx,{marginEnd:o,children:t}),n,r&&y.jsx(Mx,{marginStart:o,children:r})]})}Nx.displayName="Button",n("af",Pd(((e,t)=>{const{icon:r,children:n,isRound:o,"aria-label":a,...s}=e,l=r||n,c=i.isValidElement(l)?i.cloneElement(l,{"aria-hidden":!0,focusable:!1}):null;return y.jsx(Nx,{padding:"0",borderRadius:o?"full":void 0,ref:t,"aria-label":a,...s,children:c})}))).displayName="IconButton";var[zx,Bx]=Ct({name:"CheckboxGroupContext",strict:!1});function Fx(e){return y.jsx(_d.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:y.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function Lx(e){return y.jsx(_d.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e,children:y.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function $x(e){const{isIndeterminate:t,isChecked:r,...n}=e,o=t?Lx:Fx;return r||t?y.jsx(_d.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:y.jsx(o,{...n})}):null}var[Vx,Wx]=Ct({name:"FormControlStylesContext",errorMessage:"useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),[Hx,Ux]=Ct({strict:!1,name:"FormControlContext"});var qx=n("ac",Pd((function(e,t){const r=ud("Form",e),n=Wn(e),{getRootProps:o,htmlProps:a,...s}=function(e){const{id:t,isRequired:r,isInvalid:n,isDisabled:o,isReadOnly:a,...s}=e,l=i.useId(),c=t||`field-${l}`,u=`${c}-label`,d=`${c}-feedback`,p=`${c}-helptext`,[f,h]=i.useState(!1),[m,v]=i.useState(!1),[g,b]=i.useState(!1),y=i.useCallback(((e={},t=null)=>({id:p,...e,ref:My(t,(e=>{e&&v(!0)}))})),[p]),x=i.useCallback(((e={},t=null)=>({...e,ref:t,"data-focus":Zt(g),"data-disabled":Zt(o),"data-invalid":Zt(n),"data-readonly":Zt(a),id:void 0!==e.id?e.id:u,htmlFor:void 0!==e.htmlFor?e.htmlFor:c})),[c,o,g,n,a,u]),w=i.useCallback(((e={},t=null)=>({id:d,...e,ref:My(t,(e=>{e&&h(!0)})),"aria-live":"polite"})),[d]),k=i.useCallback(((e={},t=null)=>({...e,...s,ref:t,role:"group","data-focus":Zt(g),"data-disabled":Zt(o),"data-invalid":Zt(n),"data-readonly":Zt(a)})),[s,o,g,n,a]),S=i.useCallback(((e={},t=null)=>({...e,ref:t,role:"presentation","aria-hidden":!0,children:e.children||"*"})),[]);return{isRequired:!!r,isInvalid:!!n,isReadOnly:!!a,isDisabled:!!o,isFocused:!!g,onFocus:()=>b(!0),onBlur:()=>b(!1),hasFeedbackText:f,setHasFeedbackText:h,hasHelpText:m,setHasHelpText:v,id:c,labelId:u,feedbackId:d,helpTextId:p,htmlProps:s,getHelpTextProps:y,getErrorMessageProps:w,getRootProps:k,getLabelProps:x,getRequiredIndicatorProps:S}}(n),l=qt("chakra-form-control",e.className);return y.jsx(Hx,{value:s,children:y.jsx(Vx,{value:r,children:y.jsx(_d.div,{...o({},t),className:l,__css:r.container})})})})));qx.displayName="FormControl";var Xx=Pd((function(e,t){const r=Ux(),n=Wx(),o=qt("chakra-form__helper-text",e.className);return y.jsx(_d.div,{...null==r?void 0:r.getHelpTextProps(e,t),__css:n.helperText,className:o})}));Xx.displayName="FormHelperText";var Yx=n("ad",Pd((function(e,t){var r;const n=cd("FormLabel",e),o=Wn(e),{className:i,children:a,requiredIndicator:s=y.jsx(Gx,{}),optionalIndicator:l=null,...c}=o,u=Ux(),d=null!=(r=null==u?void 0:u.getLabelProps(c,t))?r:{ref:t,...c};return y.jsxs(_d.label,{...d,className:qt("chakra-form__label",o.className),__css:{display:"block",textAlign:"start",...n},children:[a,(null==u?void 0:u.isRequired)?s:l]})})));Yx.displayName="FormLabel";var Gx=Pd((function(e,t){const r=Ux(),n=Wx();if(!(null==r?void 0:r.isRequired))return null;const o=qt("chakra-form__required-indicator",e.className);return y.jsx(_d.span,{...null==r?void 0:r.getRequiredIndicatorProps(e,t),__css:n.requiredIndicator,className:o})}));function Kx(e){const{isDisabled:t,isInvalid:r,isReadOnly:n,isRequired:o,...i}=Zx(e);return{...i,disabled:t,readOnly:n,required:o,"aria-invalid":Qt(r),"aria-required":Qt(o),"aria-readonly":Qt(n)}}function Zx(e){var t,r,n;const o=Ux(),{id:i,disabled:a,readOnly:s,required:l,isRequired:c,isInvalid:u,isReadOnly:d,isDisabled:p,onFocus:f,onBlur:h,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return(null==o?void 0:o.hasFeedbackText)&&(null==o?void 0:o.isInvalid)&&v.push(o.feedbackId),(null==o?void 0:o.hasHelpText)&&v.push(o.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:null!=i?i:null==o?void 0:o.id,isDisabled:null!=(t=null!=a?a:p)?t:null==o?void 0:o.isDisabled,isReadOnly:null!=(r=null!=s?s:d)?r:null==o?void 0:o.isReadOnly,isRequired:null!=(n=null!=l?l:c)?n:null==o?void 0:o.isRequired,isInvalid:null!=u?u:null==o?void 0:o.isInvalid,onFocus:Jt(null==o?void 0:o.onFocus,f),onBlur:Jt(null==o?void 0:o.onBlur,h)}}Gx.displayName="RequiredIndicator";var Qx={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Jx=()=>"undefined"!=typeof document,ew=!1,tw=null,rw=!1,nw=!1,ow=new Set;function iw(e,t){ow.forEach((r=>r(e,t)))}var aw="undefined"!=typeof window&&null!=window.navigator&&/^Mac/.test(window.navigator.platform);function sw(e){rw=!0,function(e){return!(e.metaKey||!aw&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(tw="keyboard",iw("keyboard",e))}function lw(e){if(tw="pointer","mousedown"===e.type||"pointerdown"===e.type){rw=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let r=!1;try{r=t.matches(":focus-visible")}catch{}if(r)return;iw("pointer",e)}}function cw(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||0===t.detail&&!t.pointerType)&&(rw=!0,tw="virtual")}function uw(e){e.target!==window&&e.target!==document&&(rw||nw||(tw="virtual",iw("virtual",e)),rw=!1,nw=!1)}function dw(){rw=!1,nw=!0}function pw(){return"pointer"!==tw}function fw(e){!function(){if(!Jx()||ew)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...t){rw=!0,e.apply(this,t)},document.addEventListener("keydown",sw,!0),document.addEventListener("keyup",sw,!0),document.addEventListener("click",cw,!0),window.addEventListener("focus",uw,!0),window.addEventListener("blur",dw,!1),"undefined"!=typeof PointerEvent?(document.addEventListener("pointerdown",lw,!0),document.addEventListener("pointermove",lw,!0),document.addEventListener("pointerup",lw,!0)):(document.addEventListener("mousedown",lw,!0),document.addEventListener("mousemove",lw,!0),document.addEventListener("mouseup",lw,!0)),ew=!0}(),e(pw());const t=()=>e(pw());return ow.add(t),()=>{ow.delete(t)}}function hw(e={}){const t=Zx(e),{isDisabled:r,isReadOnly:n,isRequired:o,isInvalid:a,id:s,onBlur:l,onFocus:c,"aria-describedby":u}=t,{defaultChecked:d,isChecked:p,isFocusable:f,onChange:h,isIndeterminate:m,name:v,value:g,tabIndex:b,"aria-label":y,"aria-labelledby":x,"aria-invalid":w,...k}=e,S=function(e,t=[]){const r=Object.assign({},e);for(const n of t)n in r&&delete r[n];return r}(k,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),C=Fd(h),E=Fd(l),_=Fd(c),[P,A]=i.useState(!1),[T,j]=i.useState(!1),[R,O]=i.useState(!1),[M,I]=i.useState(!1);i.useEffect((()=>fw(A)),[]);const N=i.useRef(null),[D,z]=i.useState(!0),[B,F]=i.useState(!!d),L=void 0!==p,$=L?p:B,V=i.useCallback((e=>{n||r?e.preventDefault():(L||F($?e.target.checked:!!m||e.target.checked),null==C||C(e))}),[n,r,$,L,m,C]);At((()=>{N.current&&(N.current.indeterminate=Boolean(m))}),[m]),Ld((()=>{r&&j(!1)}),[r,j]),At((()=>{const e=N.current;if(!(null==e?void 0:e.form))return;const t=()=>{F(!!d)};return e.form.addEventListener("reset",t),()=>{var r;return null==(r=e.form)?void 0:r.removeEventListener("reset",t)}}),[]);const W=r&&!f,H=i.useCallback((e=>{" "===e.key&&I(!0)}),[I]),U=i.useCallback((e=>{" "===e.key&&I(!1)}),[I]);At((()=>{if(!N.current)return;N.current.checked!==$&&F(N.current.checked)}),[N.current]);const q=i.useCallback(((e={},t=null)=>({...e,ref:t,"data-active":Zt(M),"data-hover":Zt(R),"data-checked":Zt($),"data-focus":Zt(T),"data-focus-visible":Zt(T&&P),"data-indeterminate":Zt(m),"data-disabled":Zt(r),"data-invalid":Zt(a),"data-readonly":Zt(n),"aria-hidden":!0,onMouseDown:Jt(e.onMouseDown,(e=>{T&&e.preventDefault(),I(!0)})),onMouseUp:Jt(e.onMouseUp,(()=>I(!1))),onMouseEnter:Jt(e.onMouseEnter,(()=>O(!0))),onMouseLeave:Jt(e.onMouseLeave,(()=>O(!1)))})),[M,$,r,T,P,R,m,a,n]),X=i.useCallback(((e={},t=null)=>({...e,ref:t,"data-active":Zt(M),"data-hover":Zt(R),"data-checked":Zt($),"data-focus":Zt(T),"data-focus-visible":Zt(T&&P),"data-indeterminate":Zt(m),"data-disabled":Zt(r),"data-invalid":Zt(a),"data-readonly":Zt(n)})),[M,$,r,T,P,R,m,a,n]),Y=i.useCallback(((e={},t=null)=>({...S,...e,ref:My(t,(e=>{e&&z("LABEL"===e.tagName)})),onClick:Jt(e.onClick,(()=>{var e;D||(null==(e=N.current)||e.click(),requestAnimationFrame((()=>{var e;null==(e=N.current)||e.focus({preventScroll:!0})})))})),"data-disabled":Zt(r),"data-checked":Zt($),"data-invalid":Zt(a)})),[S,r,$,a,D]),G=i.useCallback(((e={},t=null)=>({...e,ref:My(N,t),type:"checkbox",name:v,value:g,id:s,tabIndex:b,onChange:Jt(e.onChange,V),onBlur:Jt(e.onBlur,E,(()=>j(!1))),onFocus:Jt(e.onFocus,_,(()=>j(!0))),onKeyDown:Jt(e.onKeyDown,H),onKeyUp:Jt(e.onKeyUp,U),required:o,checked:$,disabled:W,readOnly:n,"aria-label":y,"aria-labelledby":x,"aria-invalid":w?Boolean(w):a,"aria-describedby":u,"aria-disabled":r,style:Qx})),[v,g,s,V,E,_,H,U,o,$,W,n,y,x,w,a,u,r,b]),K=i.useCallback(((e={},t=null)=>({...e,ref:t,onMouseDown:Jt(e.onMouseDown,mw),"data-disabled":Zt(r),"data-checked":Zt($),"data-invalid":Zt(a)})),[$,r,a]);return{state:{isInvalid:a,isFocused:T,isChecked:$,isActive:M,isHovered:R,isIndeterminate:m,isDisabled:r,isReadOnly:n,isRequired:o},getRootProps:Y,getCheckboxProps:q,getIndicatorProps:X,getInputProps:G,getLabelProps:K,htmlProps:S}}function mw(e){e.preventDefault(),e.stopPropagation()}var vw={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},gw={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},bw=yt({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),yw=yt({from:{opacity:0},to:{opacity:1}}),xw=yt({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),ww=n("aJ",Pd((function(e,t){const r=Bx(),n=ud("Checkbox",{...r,...e}),o=Wn(e),{spacing:a="0.5rem",className:s,children:l,iconColor:c,iconSize:u,icon:d=y.jsx($x,{}),isChecked:p,isDisabled:f=(null==r?void 0:r.isDisabled),onChange:h,inputProps:m,...v}=o;let g=p;(null==r?void 0:r.value)&&o.value&&(g=r.value.includes(o.value));let b=h;(null==r?void 0:r.onChange)&&o.value&&(b=er(r.onChange,h));const{state:x,getInputProps:w,getCheckboxProps:k,getLabelProps:S,getRootProps:C}=hw({...v,isDisabled:f,isChecked:g,onChange:b}),E=function(e){const[t,r]=i.useState(e),[n,o]=i.useState(!1);return e!==t&&(o(!0),r(e)),n}(x.isChecked),_=i.useMemo((()=>({animation:E?x.isIndeterminate?`${yw} 20ms linear, ${xw} 200ms linear`:`${bw} 200ms linear`:void 0,fontSize:u,color:c,...n.icon})),[c,u,E,x.isIndeterminate,n.icon]),P=i.cloneElement(d,{__css:_,isIndeterminate:x.isIndeterminate,isChecked:x.isChecked});return y.jsxs(_d.label,{__css:{...gw,...n.container},className:qt("chakra-checkbox",s),...C(),children:[y.jsx("input",{className:"chakra-checkbox__input",...w(m,t)}),y.jsx(_d.span,{__css:{...vw,...n.control},className:"chakra-checkbox__control",...k(),children:P}),l&&y.jsx(_d.span,{className:"chakra-checkbox__label",...S(),__css:{marginStart:a,...n.label},children:l})]})})));function kw(e,t){let r=function(e){const t=parseFloat(e);return"number"!=typeof t||Number.isNaN(t)?0:t}(e);const n=10**(null!=t?t:10);return r=Math.round(r*n)/n,t?r.toFixed(t):r.toString()}function Sw(e){if(!Number.isFinite(e))return 0;let t=1,r=0;for(;Math.round(e*t)/t!==e;)t*=10,r+=1;return r}function Cw(e,t,r){return 100*(e-t)/(r-t)}function Ew(e,t,r){return kw(Math.round((e-t)/r)*r+t,Sw(r))}function _w(e,t,r){return null==e?e:(r{const i="function"==typeof e?e():null!=e?e:document;if(r&&i)return i.addEventListener(t,o,n),()=>{i.removeEventListener(t,o,n)}}),[t,e,n,o,r]),()=>{const r="function"==typeof e?e():null!=e?e:document;null==r||r.removeEventListener(t,o,n)}}ww.displayName="Checkbox";var Rw=()=>"undefined"!=typeof window;var Ow=e=>Rw()&&e.test(function(){var e;const t=navigator.userAgentData;return null!=(e=null==t?void 0:t.platform)?e:navigator.platform}()),Mw=()=>Ow(/mac|iphone|ipad|ipod/i)&&(e=>Rw()&&e.test(navigator.vendor))(/apple/i);var Iw="data-focus-lock",Nw="data-focus-lock-disabled";function Dw(e,t){return r=null,n=function(t){return e.forEach((function(e){return function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}(e,t)}))},(o=i.useState((function(){return{value:r,callback:n,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=n,o.facade;var r,n,o}var zw={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Bw=function(){return Bw=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0})).sort(mk)},gk=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"].join(","),bk="".concat(gk,", [data-focus-guard]"),yk=function(e,t){return ek((e.shadowRoot||e).children).reduce((function(e,r){return e.concat(r.matches(t?bk:gk)?[r]:[],yk(r))}),[])},xk=function(e,t){return e.reduce((function(e,r){var n,o=yk(r,t),i=(n=[]).concat.apply(n,o.map((function(e){return function(e,t){var r;return e instanceof HTMLIFrameElement&&(null===(r=e.contentDocument)||void 0===r?void 0:r.body)?xk([e.contentDocument.body],t):[e]}(e,t)})));return e.concat(i,r.parentNode?ek(r.parentNode.querySelectorAll(gk)).filter((function(e){return e===r})):[])}),[])},wk=function(e,t){return ek(e).filter((function(e){return ak(t,e)})).filter((function(e){return function(e){return!((ck(e)||function(e){return"BUTTON"===e.tagName}(e))&&("hidden"===e.type||e.disabled))}(e)}))},kk=function(e,t){return void 0===t&&(t=new Map),ek(e).filter((function(e){return sk(t,e)}))},Sk=function(e,t,r){return vk(wk(xk(e,r),t),!0,r)},Ck=function(e,t){return vk(wk(xk(e),t),!1)},Ek=function(e,t){return wk((r=e.querySelectorAll("[".concat("data-autofocus-inside","]")),ek(r).map((function(e){return xk([e])})).reduce((function(e,t){return e.concat(t)}),[])),t);var r},_k=function(e,t){return e.shadowRoot?_k(e.shadowRoot,t):!(void 0===Object.getPrototypeOf(e).contains||!Object.getPrototypeOf(e).contains.call(e,t))||ek(e.children).some((function(e){var r;if(e instanceof HTMLIFrameElement){var n=null===(r=e.contentDocument)||void 0===r?void 0:r.body;return!!n&&_k(n,t)}return _k(e,t)}))},Pk=function(e){return e.parentNode?Pk(e.parentNode):e},Ak=function(e){return tk(e).filter(Boolean).reduce((function(e,t){var r=t.getAttribute(Iw);return e.push.apply(e,r?function(e){for(var t=new Set,r=e.length,n=0;n0&&t.add(o),(i&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(n)}return e.filter((function(e,r){return!t.has(r)}))}(ek(Pk(t).querySelectorAll("[".concat(Iw,'="').concat(r,'"]:not([').concat(Nw,'="disabled"])')))):[t]),e}),[])},Tk=function(e){if(void 0===e&&(e=document),e&&e.activeElement){var t=e.activeElement;return t.shadowRoot?Tk(t.shadowRoot):t instanceof HTMLIFrameElement&&function(e){try{return e()}catch(je){return}}((function(){return t.contentWindow.document}))?Tk(t.contentWindow.document):t}},jk=function(e,t){return void 0===t&&(t=Tk(rk(e).ownerDocument)),!(!t||t.dataset&&t.dataset.focusGuard)&&Ak(e).some((function(e){return _k(e,t)||function(e,t){return Boolean(ek(e.querySelectorAll("iframe")).some((function(e){return function(e,t){return e===t}(e,t)})))}(e,t)}))},Rk=function(e,t){return uk(e)&&e.name?function(e,t){return t.filter(uk).filter((function(t){return t.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e,t):e},Ok=function(e){return e[0]&&e.length>1?Rk(e[0],e):e[0]},Mk=function(e,t){return e.length>1?e.indexOf(Rk(e[t],e)):t},Ik="NEW_FOCUS",Nk=function(e,t,r,n){var o=e.length,i=e[0],a=e[o-1],s=pk(r);if(!(r&&e.indexOf(r)>=0)){var l,c,u=void 0!==r?t.indexOf(r):-1,d=n?t.indexOf(n):u,p=n?e.indexOf(n):-1,f=u-d,h=t.indexOf(i),m=t.indexOf(a),v=(l=t,c=new Set,l.forEach((function(e){return c.add(Rk(e,l))})),l.filter((function(e){return c.has(e)}))),g=(void 0!==r?v.indexOf(r):-1)-(n?v.indexOf(n):u),b=Mk(e,0),y=Mk(e,o-1);return-1===u||-1===p?Ik:!f&&p>=0?p:u<=h&&s&&Math.abs(f)>1?y:u>=m&&s&&Math.abs(f)>1?b:f&&Math.abs(g)>1?p:u<=h?y:u>m?b:f?Math.abs(f)>1?p:(o+p+f)%o:void 0}},Dk=function(e,t,r){var n,o=e.map((function(e){return e.node})),i=kk(o.filter((n=r,function(e){var t,r=null===(t=lk(e))||void 0===t?void 0:t.autofocus;return e.autofocus||void 0!==r&&"false"!==r||n.indexOf(e)>=0})));return i&&i.length?Ok(i):Ok(kk(t))},zk=function(e,t){return void 0===t&&(t=[]),t.push(e),e.parentNode&&zk(e.parentNode.host||e.parentNode,t),t},Bk=function(e,t){for(var r=zk(e),n=zk(t),o=0;o=0)return i}return!1},Fk=function(e,t,r){var n=tk(e),o=tk(t),i=n[0],a=!1;return o.filter(Boolean).forEach((function(e){a=Bk(a||e,e)||a,r.filter(Boolean).forEach((function(e){var t=Bk(i,e);t&&(a=!a||_k(t,a)?t:Bk(t,a))}))})),a},Lk=function(e,t){var r=Tk(tk(e).length>0?document:rk(e).ownerDocument),n=Ak(e).filter(fk),o=Fk(r||e,e,n),i=new Map,a=Ck(n,i),s=Sk(n,i).filter((function(e){var t=e.node;return fk(t)}));if(s[0]||(s=a)[0]){var l,c,u,d=Ck([o],i).map((function(e){return e.node})),p=(l=d,c=s,u=new Map,c.forEach((function(e){return u.set(e.node,e)})),l.map((function(e){return u.get(e)})).filter(hk)),f=p.map((function(e){return e.node})),h=Nk(f,d,r,t);if(h===Ik){var m=Dk(a,f,function(e,t){return e.reduce((function(e,r){return e.concat(Ek(r,t))}),[])}(n,i));return m?{node:m}:void console.warn("focus-lock: cannot find any node to move focus into")}return void 0===h?h:p[h]}},$k=0,Vk=!1,Wk=function(e,t,r){void 0===r&&(r={});var n,o,i=Lk(e,t);if(!Vk&&i){if($k>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Vk=!0,void setTimeout((function(){Vk=!1}),1);$k++,n=i.node,o=r.focusOptions,"focus"in n&&n.focus(o),"contentWindow"in n&&n.contentWindow&&n.contentWindow.focus(),$k--}};function Hk(e){setTimeout(e,1)}var Uk=function(){return document&&document.activeElement===document.body||function(e){void 0===e&&(e=document);var t=Tk(e);return!!t&&ek(e.querySelectorAll("[".concat("data-no-focus-lock","]"))).some((function(e){return _k(e,t)}))}()},qk=null,Xk=null,Yk=null,Gk=!1,Kk=function(){return!0};function Zk(e,t,r,n){var o=null,i=e;do{var a=n[i];if(a.guard)a.node.dataset.focusAutoGuard&&(o=a);else{if(!a.lockItem)break;if(i!==e)return;o=null}}while((i+=r)!==t);o&&(o.node.tabIndex=0)}var Qk=function(e){return e&&"current"in e?e.current:e},Jk=function e(t,r,n){return r&&(r.host===t&&(!r.activeElement||n.contains(r.activeElement))||r.parentNode&&e(t,r.parentNode,n))},eS=function(){var e,t,r,n,o,i,a,s=!1;if(qk){var l=qk,c=l.observed,u=l.persistentFocus,d=l.autoFocus,p=l.shards,f=l.crossFrame,h=l.focusOptions,m=c||Yk&&Yk.portaledElement,v=document&&document.activeElement;if(m){var g=[m].concat(p.map(Qk).filter(Boolean));if(v&&!function(e){return(qk.whiteList||Kk)(e)}(v)||(u||(f?Boolean(Gk):"meanwhile"===Gk)||!Uk()||!Xk&&d)&&(m&&!(jk(g)||v&&function(e,t){return t.some((function(t){return Jk(e,t,t)}))}(v,g)||(a=v,Yk&&Yk.portaledElement===a))&&(document&&!Xk&&v&&!d?(v.blur&&v.blur(),document.body.focus()):(s=Wk(g,Xk,{focusOptions:h}),Yk={})),Gk=!1,Xk=document&&document.activeElement),document){var b=document&&document.activeElement,y=(t=Ak(e=g).filter(fk),r=Fk(e,e,t),n=new Map,o=Sk([r],n,!0),i=Sk(t,n).filter((function(e){var t=e.node;return fk(t)})).map((function(e){return e.node})),o.map((function(e){var t=e.node;return{node:t,index:e.index,lockItem:i.indexOf(t)>=0,guard:pk(t)}}))),x=y.map((function(e){return e.node})).indexOf(b);x>-1&&(y.filter((function(e){var t=e.guard,r=e.node;return t&&r.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),Zk(x,y.length,1,y),Zk(x,-1,-1,y))}}}return s},tS=function(e){eS()&&e&&(e.stopPropagation(),e.preventDefault())},rS=function(){return Hk(eS)},nS=function(){Gk="just",Hk((function(){Gk="meanwhile"}))};Uw.assignSyncMedium((function(e){var t=e.target,r=e.currentTarget;r.contains(t)||(Yk={observerNode:r,portaledElement:t})})),qw.assignMedium(rS),Xw.assignMedium((function(e){return e({moveFocusInside:Wk,focusInside:jk})}));const oS=function(e,t){return function(r){var n,o=[];function a(){n=e(o.map((function(e){return e.props}))),t(n)}var s=function(e){function t(){return e.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Zw(e,t)}(t,e),t.peek=function(){return n};var i=t.prototype;return i.componentDidMount=function(){o.push(this),a()},i.componentDidUpdate=function(){a()},i.componentWillUnmount=function(){var e=o.indexOf(this);o.splice(e,1),a()},i.render=function(){return u.createElement(r,this.props)},t}(i.PureComponent);return function(e,t,r){(t=Jw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(s,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")"),s}}((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var t=e.slice(-1)[0];t&&!qk&&(document.addEventListener("focusin",tS),document.addEventListener("focusout",rS),window.addEventListener("blur",nS));var r=qk,n=r&&t&&t.id===r.id;qk=t,r&&!n&&(r.onDeactivation(),e.filter((function(e){return e.id===r.id})).length||r.returnFocus(!t)),t?(Xk=null,n&&r.observed===t.observed||t.onActivation(),eS(),Hk(eS)):(document.removeEventListener("focusin",tS),document.removeEventListener("focusout",rS),window.removeEventListener("blur",nS),Xk=null)}))((function(){return null}));var iS=i.forwardRef((function(e,t){return i.createElement(Kw,Ce({sideCar:oS,ref:t},e))})),aS=Kw.propTypes||{};function sS(e){return null!=e&&"object"==typeof e&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function lS(e){var t;if(!sS(e))return!1;return e instanceof(null!=(t=e.ownerDocument.defaultView)?t:window).HTMLElement}function cS(e){return sS(e)?e.ownerDocument:document}function uS(e){return["html","body","#document"].includes(e.localName)?e.ownerDocument.body:lS(e)&&function(e){const t=e.ownerDocument.defaultView||window,{overflow:r,overflowX:n,overflowY:o}=t.getComputedStyle(e);return/auto|scroll|overlay|hidden/.test(r+o+n)}(e)?e:uS(function(e){return"html"===e.localName?e:e.assignedSlot||e.parentElement||e.ownerDocument.documentElement}(e))}aS.sideCar,function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}}(aS,["sideCar"]),iS.propTypes={};var dS=e=>e.hasAttribute("tabindex"),pS=e=>dS(e)&&-1===e.tabIndex;function fS(e){return!(!e.parentElement||!fS(e.parentElement))||e.hidden}function hS(e){if(!lS(e)||fS(e)||function(e){return!0===Boolean(e.getAttribute("disabled"))||!0===Boolean(e.getAttribute("aria-disabled"))}(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():!!function(e){const t=e.getAttribute("contenteditable");return"false"!==t&&null!=t}(e)||dS(e)}var mS,vS=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"].join(),gS=e=>e.offsetWidth>0&&e.offsetHeight>0;function bS(e){const t=Array.from(e.querySelectorAll(vS));return t.unshift(e),t.filter((e=>hS(e)&&gS(e)))}var yS=null!=(mS=iS.default)?mS:iS,xS=n("F",(e=>{const{initialFocusRef:t,finalFocusRef:r,contentRef:n,restoreFocus:o,children:a,isDisabled:s,autoFocus:l,persistentFocus:c,lockFocusAcrossFrames:u}=e,d=i.useCallback((()=>{if(null==t?void 0:t.current)t.current.focus();else if(null==n?void 0:n.current){0===bS(n.current).length&&requestAnimationFrame((()=>{var e;null==(e=n.current)||e.focus()}))}}),[t,n]),p=i.useCallback((()=>{var e;null==(e=null==r?void 0:r.current)||e.focus()}),[r]),f=o&&!r;return y.jsx(yS,{crossFrame:u,persistentFocus:c,autoFocus:l,disabled:s,onActivation:d,onDeactivation:p,returnFocus:f,children:a})}));xS.displayName="FocusLock";var wS=ju?i.useLayoutEffect:i.useEffect;function kS(e,t=[]){const r=i.useRef(e);return wS((()=>{r.current=e})),i.useCallback(((...e)=>{var t;return null==(t=r.current)?void 0:t.call(r,...e)}),t)}function SS(e,t){var r;const n=e.target;if(n){if(!Au(n).contains(n))return!1}return!(null==(r=t.current)?void 0:r.contains(n))}n("z",((e,t)=>{const r=i.useRef(!1),n=i.useRef(!1);i.useEffect((()=>{if(r.current&&n.current)return e();n.current=!0}),t),i.useEffect((()=>(r.current=!0,()=>{r.current=!1})),[])}));var[CS,ES]=Ct({name:"InputGroupStylesContext",errorMessage:"useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),_S=n("I",Pd((function(e,t){const r=ud("Input",e),{children:n,className:o,...a}=Wn(e),s=qt("chakra-input__group",o),l={},c=Px(n),u=r.field;c.forEach((e=>{var t,n;r&&(u&&"InputLeftElement"===e.type.id&&(l.paddingStart=null!=(t=u.height)?t:u.h),u&&"InputRightElement"===e.type.id&&(l.paddingEnd=null!=(n=u.height)?n:u.h),"InputRightAddon"===e.type.id&&(l.borderEndRadius=0),"InputLeftAddon"===e.type.id&&(l.borderStartRadius=0))}));const d=c.map((t=>{var r,n;const o=hd({size:(null==(r=t.props)?void 0:r.size)||e.size,variant:(null==(n=t.props)?void 0:n.variant)||e.variant});return"Input"!==t.type.id?i.cloneElement(t,o):i.cloneElement(t,Object.assign(o,l,t.props))}));return y.jsx(_d.div,{className:s,ref:t,__css:{width:"100%",display:"flex",position:"relative",isolation:"isolate",...r.group},"data-group":!0,...a,children:y.jsx(CS,{value:r,children:d})})})));_S.displayName="InputGroup";var PS=_d("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),AS=Pd((function(e,t){var r,n;const{placement:o="left",...i}=e,a=ES(),s=a.field,l={["left"===o?"insetStart":"insetEnd"]:"0",width:null!=(r=null==s?void 0:s.height)?r:null==s?void 0:s.h,height:null!=(n=null==s?void 0:s.height)?n:null==s?void 0:s.h,fontSize:null==s?void 0:s.fontSize,...a.element};return y.jsx(PS,{ref:t,__css:l,...i})}));AS.id="InputElement",AS.displayName="InputElement";var TS=Pd((function(e,t){const{className:r,...n}=e,o=qt("chakra-input__left-element",r);return y.jsx(AS,{ref:t,placement:"left",className:o,...n})}));TS.id="InputLeftElement",TS.displayName="InputLeftElement";var jS=n("k",Pd((function(e,t){const{className:r,...n}=e,o=qt("chakra-input__right-element",r);return y.jsx(AS,{ref:t,placement:"right",className:o,...n})})));jS.id="InputRightElement",jS.displayName="InputRightElement";var RS=n("h",Pd((function(e,t){const{htmlSize:r,...n}=e,o=ud("Input",n),i=Kx(Wn(n)),a=qt("chakra-input",e.className);return y.jsx(_d.input,{size:r,...i,__css:o.field,ref:t,className:a})})));RS.displayName="Input",RS.id="Input";var OS=n("a7",Pd((function(e,t){const r=cd("Link",e),{className:n,isExternal:o,...i}=Wn(e);return y.jsx(_d.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:t,className:qt("chakra-link",n),...i,__css:r})})));OS.displayName="Link";var[MS,IS]=Ct({name:"ListStylesContext",errorMessage:"useListStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),NS=Pd((function(e,t){const r=ud("List",e),{children:n,styleType:o="none",stylePosition:i,spacing:a,...s}=Wn(e),l=Px(n),c=a?{"& > *:not(style) ~ *:not(style)":{mt:a}}:{};return y.jsx(MS,{value:r,children:y.jsx(_d.ul,{ref:t,listStyleType:o,listStylePosition:i,role:"list",__css:{...r.container,...c},...s,children:l})})}));NS.displayName="List",n("aC",Pd(((e,t)=>{const{as:r,...n}=e;return y.jsx(NS,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...n})}))).displayName="OrderedList",Pd((function(e,t){const{as:r,...n}=e;return y.jsx(NS,{ref:t,as:"ul",styleType:"initial",marginStart:"1em",...n})})).displayName="UnorderedList";var DS=n("aD",Pd((function(e,t){const r=IS();return y.jsx(_d.li,{ref:t,...e,__css:r.item})})));DS.displayName="ListItem";var zS=Pd((function(e,t){const r=IS();return y.jsx(ry,{ref:t,role:"presentation",...e,__css:r.icon})}));zS.displayName="ListIcon",n("a$",_d("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}})).displayName="Spacer";var BS=n("a4",Pd((function(e,t){const r=cd("Text",e),{className:n,align:o,decoration:i,casing:a,...s}=Wn(e),l=hd({textAlign:e.align,textDecoration:e.decoration,textTransform:e.casing});return y.jsx(_d.p,{ref:t,className:qt("chakra-text",e.className),...l,...s,__css:r})})));BS.displayName="Text";var FS=n("W",Pd((function(e,t){const{spacing:r="0.5rem",spacingX:n,spacingY:o,children:a,justify:s,direction:l,align:c,className:u,shouldWrapChildren:d,...p}=e,f=i.useMemo((()=>d?i.Children.map(a,((e,t)=>y.jsx(LS,{children:e},t))):a),[a,d]);return y.jsx(_d.div,{ref:t,className:qt("chakra-wrap",u),...p,children:y.jsx(_d.ul,{className:"chakra-wrap__list",__css:{display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:c,flexDirection:l,listStyleType:"none",gap:r,columnGap:n,rowGap:o,padding:"0"},children:f})})})));FS.displayName="Wrap";var LS=n("m",Pd((function(e,t){const{className:r,...n}=e;return y.jsx(_d.li,{ref:t,__css:{display:"flex",alignItems:"flex-start"},className:qt("chakra-wrap__listitem",r),...n})})));LS.displayName="WrapItem",n("aN",(e=>y.jsx(_d.div,{className:"chakra-stack__divider",...e,__css:{...e.__css,borderWidth:0,alignSelf:"stretch",borderColor:"inherit",width:"auto",height:"auto"}}))).displayName="StackDivider";var $S=e=>y.jsx(_d.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});$S.displayName="StackItem";var VS=n("aB",Pd(((e,t)=>{const{isInline:r,direction:n,align:o,justify:a,spacing:s="0.5rem",wrap:l,children:c,divider:u,className:d,shouldWrapChildren:p,...f}=e,h=r?"row":null!=n?n:"column",m=i.useMemo((()=>function(e){const{spacing:t,direction:r}=e,n={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":(o=r,i=e=>n[e],Array.isArray(o)?o.map((e=>null===e?null:i(e))):Xt(o)?Object.keys(o).reduce(((e,t)=>(e[t]=i(o[t]),e)),{}):null!=o?i(o):null)};var o,i}({spacing:s,direction:h})),[s,h]),v=!!u,g=!p&&!v,b=i.useMemo((()=>{const e=Px(c);return g?e:e.map(((t,r)=>{const n=void 0!==t.key?t.key:r,o=r+1===e.length,a=p?y.jsx($S,{children:t},n):t;if(!v)return a;const s=i.cloneElement(u,{__css:m}),l=o?null:s;return y.jsxs(i.Fragment,{children:[a,l]},n)}))}),[u,m,v,g,p,c]),x=qt("chakra-stack",d);return y.jsx(_d.div,{ref:t,display:"flex",alignItems:o,justifyContent:a,flexDirection:h,flexWrap:l,gap:v?void 0:s,className:x,...f,children:b})})));VS.displayName="Stack",n("ax",Pd(((e,t)=>y.jsx(VS,{align:"center",...e,direction:"column",ref:t})))).displayName="VStack",n("aK",Pd(((e,t)=>y.jsx(VS,{align:"center",...e,direction:"row",ref:t})))).displayName="HStack";var WS=n("aw",Pd((function(e,t){const r=cd("Heading",e),{className:n,...o}=Wn(e);return y.jsx(_d.h2,{ref:t,className:qt("chakra-heading",e.className),...o,__css:r})})));WS.displayName="Heading";var HS=n("B",_d("div"));HS.displayName="Box";var US=Pd((function(e,t){const{size:r,centerContent:n=!0,...o}=e,i=n?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return y.jsx(HS,{ref:t,boxSize:r,__css:{...i,flexShrink:0,flexGrow:0},...o})}));US.displayName="Square";var qS=Pd((function(e,t){const{size:r,...n}=e;return y.jsx(US,{size:r,ref:t,borderRadius:"9999px",...n})}));qS.displayName="Circle";var XS=n("aU",Pd((function(e,t){const r=cd("Kbd",e),{className:n,...o}=Wn(e);return y.jsx(_d.kbd,{ref:t,className:qt("chakra-kbd",n),...o,__css:{fontFamily:"mono",...r}})})));XS.displayName="Kbd";var YS=n("U",Pd((function(e,t){const r=cd("Badge",e),{className:n,...o}=Wn(e);return y.jsx(_d.span,{ref:t,className:qt("chakra-badge",e.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})})));YS.displayName="Badge",n("C",_d("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}})).displayName="Center";var GS={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pd((function(e,t){const{axis:r="both",...n}=e;return y.jsx(_d.div,{ref:t,__css:GS[r],...n,position:"absolute"})}));var KS=n("D",Pd((function(e,t){const{borderLeftWidth:r,borderBottomWidth:n,borderTopWidth:o,borderRightWidth:i,borderWidth:a,borderStyle:s,borderColor:l,...c}=cd("Divider",e),{className:u,orientation:d="horizontal",__css:p,...f}=Wn(e),h={vertical:{borderLeftWidth:r||i||a||"1px",height:"100%"},horizontal:{borderBottomWidth:n||o||a||"1px",width:"100%"}};return y.jsx(_d.hr,{ref:t,"aria-orientation":d,...f,__css:{...c,border:"0",borderColor:l,borderStyle:s,...h[d],...p},className:qt("chakra-divider",u)})})));KS.displayName="Divider";var ZS=n("g",Pd((function(e,t){const{direction:r,align:n,justify:o,wrap:i,basis:a,grow:s,shrink:l,...c}=e,u={display:"flex",flexDirection:r,alignItems:n,justifyContent:o,flexWrap:i,flexBasis:a,flexGrow:s,flexShrink:l};return y.jsx(_d.div,{ref:t,__css:u,...c})})));function QS(e={}){const{timeout:t=300,preventDefault:r=(()=>!0)}=e,[n,o]=i.useState([]),a=i.useRef(),s=()=>{a.current&&(clearTimeout(a.current),a.current=null)};return i.useEffect((()=>s),[]),function(e){return i=>{if("Backspace"===i.key){const e=[...n];return e.pop(),void o(e)}if(function(e){const{key:t}=e;return 1===t.length||t.length>1&&/[^a-zA-Z0-9]/.test(t)}(i)){const l=n.concat(i.key);r(i)&&(i.preventDefault(),i.stopPropagation()),o(l),e(l.join("")),s(),a.current=setTimeout((()=>{o([]),a.current=null}),t)}}}}function JS(e){const t=e.target,{tagName:r,isContentEditable:n}=t;return"INPUT"!==r&&"TEXTAREA"!==r&&!0!==n}function eC(e={}){const{ref:t,isDisabled:r,isFocusable:n,clickOnEnter:o=!0,clickOnSpace:a=!0,onMouseDown:s,onMouseUp:l,onClick:c,onKeyDown:u,onKeyUp:d,tabIndex:p,onMouseOver:f,onMouseLeave:h,...m}=e,[v,g]=i.useState(!0),[b,y]=i.useState(!1),x=function(){const e=i.useRef(new Map),t=e.current,r=i.useCallback(((t,r,n,o)=>{e.current.set(n,{type:r,el:t,options:o}),t.addEventListener(r,n,o)}),[]),n=i.useCallback(((t,r,n,o)=>{t.removeEventListener(r,n,o),e.current.delete(n)}),[]);return i.useEffect((()=>()=>{t.forEach(((e,t)=>{n(e.el,e.type,t,e.options)}))}),[n,t]),{add:r,remove:n}}(),w=v?p:p||0,k=r&&!n,S=i.useCallback((e=>{if(r)return e.stopPropagation(),void e.preventDefault();e.currentTarget.focus(),null==c||c(e)}),[r,c]),C=i.useCallback((e=>{b&&JS(e)&&(e.preventDefault(),e.stopPropagation(),y(!1),x.remove(document,"keyup",C,!1))}),[b,x]),E=i.useCallback((e=>{if(null==u||u(e),r||e.defaultPrevented||e.metaKey)return;if(!JS(e.nativeEvent)||v)return;const t=o&&"Enter"===e.key;if(a&&" "===e.key&&(e.preventDefault(),y(!0)),t){e.preventDefault();e.currentTarget.click()}x.add(document,"keyup",C,!1)}),[r,v,u,o,a,x,C]),_=i.useCallback((e=>{if(null==d||d(e),r||e.defaultPrevented||e.metaKey)return;if(!JS(e.nativeEvent)||v)return;if(a&&" "===e.key){e.preventDefault(),y(!1);e.currentTarget.click()}}),[a,v,r,d]),P=i.useCallback((e=>{0===e.button&&(y(!1),x.remove(document,"mouseup",P,!1))}),[x]),A=i.useCallback((e=>{if(0!==e.button)return;if(r)return e.stopPropagation(),void e.preventDefault();v||y(!0);e.currentTarget.focus({preventScroll:!0}),x.add(document,"mouseup",P,!1),null==s||s(e)}),[r,v,s,x,P]),T=i.useCallback((e=>{0===e.button&&(v||y(!1),null==l||l(e))}),[l,v]),j=i.useCallback((e=>{r?e.preventDefault():null==f||f(e)}),[r,f]),R=i.useCallback((e=>{b&&(e.preventDefault(),y(!1)),null==h||h(e)}),[b,h]),O=My(t,(e=>{e&&"BUTTON"!==e.tagName&&g(!1)}));return v?{...m,ref:O,type:"button","aria-disabled":k?void 0:r,disabled:k,onClick:S,onMouseDown:s,onMouseUp:l,onKeyUp:d,onKeyDown:u,onMouseOver:f,onMouseLeave:h}:{...m,ref:O,role:"button","data-active":Zt(b),"aria-disabled":r?"true":void 0,tabIndex:k?void 0:w,onClick:S,onMouseDown:A,onMouseUp:T,onKeyUp:_,onKeyDown:E,onMouseOver:j,onMouseLeave:R}}function tC(e){const t=e.current;if(!t)return!1;const r=function(e){return cS(e).activeElement}(t);return!!r&&(!t.contains(r)&&!(!((n=r)&&lS(n)&&hS(n))||pS(n)));var n}function rC(e,t){const{shouldFocus:r,visible:n,focusRef:o}=t,i=r&&!n;Ld((()=>{if(!i)return;if(tC(e))return;const t=(null==o?void 0:o.current)||e.current;let r;return t?(r=requestAnimationFrame((()=>{t.focus({preventScroll:!0})})),()=>{cancelAnimationFrame(r)}):void 0}),[i,e,o])}ZS.displayName="Flex";var nC={preventScroll:!0,shouldFocus:!1};var oC=(e,t)=>({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),iC={arrowShadowColor:oC("--popper-arrow-shadow-color"),arrowSize:oC("--popper-arrow-size","8px"),arrowSizeHalf:oC("--popper-arrow-size-half"),arrowBg:oC("--popper-arrow-bg"),transformOrigin:oC("--popper-transform-origin"),arrowOffset:oC("--popper-arrow-offset")};var aC={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},sC={scroll:!0,resize:!0};function lC(e){let t;return t="object"==typeof e?{enabled:!0,options:{...sC,...e}}:{enabled:e,options:sC},t}var cC={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},uC={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{dC(e)},effect:({state:e})=>()=>{dC(e)}},dC=e=>{var t;e.elements.popper.style.setProperty(iC.transformOrigin.var,(t=e.placement,aC[t]))},pC={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{fC(e)}},fC=e=>{var t;if(!e.placement)return;const r=hC(e.placement);if((null==(t=e.elements)?void 0:t.arrow)&&r){Object.assign(e.elements.arrow.style,{[r.property]:r.value,width:iC.arrowSize.varRef,height:iC.arrowSize.varRef,zIndex:-1});const t={[iC.arrowSizeHalf.var]:`calc(${iC.arrowSize.varRef} / 2 - 1px)`,[iC.arrowOffset.var]:`calc(${iC.arrowSizeHalf.varRef} * -1)`};for(const r in t)e.elements.arrow.style.setProperty(r,t[r])}},hC=e=>e.startsWith("top")?{property:"bottom",value:iC.arrowOffset.varRef}:e.startsWith("bottom")?{property:"top",value:iC.arrowOffset.varRef}:e.startsWith("left")?{property:"right",value:iC.arrowOffset.varRef}:e.startsWith("right")?{property:"left",value:iC.arrowOffset.varRef}:void 0,mC={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{vC(e)},effect:({state:e})=>()=>{vC(e)}},vC=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const r=(n=e.placement).includes("top")?"1px 1px 0px 0 var(--popper-arrow-shadow-color)":n.includes("bottom")?"-1px -1px 0px 0 var(--popper-arrow-shadow-color)":n.includes("right")?"-1px 1px 0px 0 var(--popper-arrow-shadow-color)":n.includes("left")?"1px -1px 0px 0 var(--popper-arrow-shadow-color)":void 0;var n;r&&t.style.setProperty("--popper-arrow-default-shadow",r),Object.assign(t.style,{transform:"rotate(45deg)",background:iC.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},gC={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},bC={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};var yC="top",xC="bottom",wC="right",kC="left",SC="auto",CC=[yC,xC,wC,kC],EC="start",_C="end",PC="clippingParents",AC="viewport",TC="popper",jC="reference",RC=CC.reduce((function(e,t){return e.concat([t+"-"+EC,t+"-"+_C])}),[]),OC=[].concat(CC,[SC]).reduce((function(e,t){return e.concat([t,t+"-"+EC,t+"-"+_C])}),[]),MC=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function IC(e){return e?(e.nodeName||"").toLowerCase():null}function NC(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function DC(e){return e instanceof NC(e).Element||e instanceof Element}function zC(e){return e instanceof NC(e).HTMLElement||e instanceof HTMLElement}function BC(e){return"undefined"!=typeof ShadowRoot&&(e instanceof NC(e).ShadowRoot||e instanceof ShadowRoot)}const FC={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];zC(o)&&IC(o)&&(Object.assign(o.style,r),Object.keys(n).forEach((function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce((function(e,t){return e[t]="",e}),{});zC(n)&&IC(n)&&(Object.assign(n.style,i),Object.keys(o).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]};function LC(e){return e.split("-")[0]}var $C=Math.max,VC=Math.min,WC=Math.round;function HC(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function UC(){return!/^((?!chrome|android).)*safari/i.test(HC())}function qC(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),o=1,i=1;t&&zC(e)&&(o=e.offsetWidth>0&&WC(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&WC(n.height)/e.offsetHeight||1);var a=(DC(e)?NC(e):window).visualViewport,s=!UC()&&r,l=(n.left+(s&&a?a.offsetLeft:0))/o,c=(n.top+(s&&a?a.offsetTop:0))/i,u=n.width/o,d=n.height/i;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function XC(e){var t=qC(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function YC(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&BC(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function GC(e){return NC(e).getComputedStyle(e)}function KC(e){return["table","td","th"].indexOf(IC(e))>=0}function ZC(e){return((DC(e)?e.ownerDocument:e.document)||window.document).documentElement}function QC(e){return"html"===IC(e)?e:e.assignedSlot||e.parentNode||(BC(e)?e.host:null)||ZC(e)}function JC(e){return zC(e)&&"fixed"!==GC(e).position?e.offsetParent:null}function eE(e){for(var t=NC(e),r=JC(e);r&&KC(r)&&"static"===GC(r).position;)r=JC(r);return r&&("html"===IC(r)||"body"===IC(r)&&"static"===GC(r).position)?t:r||function(e){var t=/firefox/i.test(HC());if(/Trident/i.test(HC())&&zC(e)&&"fixed"===GC(e).position)return null;var r=QC(e);for(BC(r)&&(r=r.host);zC(r)&&["html","body"].indexOf(IC(r))<0;){var n=GC(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}function tE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function rE(e,t,r){return $C(e,VC(t,r))}function nE(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function oE(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}const iE={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,o=e.options,i=r.elements.arrow,a=r.modifiersData.popperOffsets,s=LC(r.placement),l=tE(s),c=[kC,wC].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return nE("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:oE(e,CC))}(o.padding,r),d=XC(i),p="y"===l?yC:kC,f="y"===l?xC:wC,h=r.rects.reference[c]+r.rects.reference[l]-a[l]-r.rects.popper[c],m=a[l]-r.rects.reference[l],v=eE(i),g=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,b=h/2-m/2,y=u[p],x=g-d[c]-u[f],w=g/2-d[c]/2+b,k=rE(y,w,x),S=l;r.modifiersData[n]=((t={})[S]=k,t.centerOffset=k-w,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&YC(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function aE(e){return e.split("-")[1]}var sE={top:"auto",right:"auto",bottom:"auto",left:"auto"};function lE(e){var t,r=e.popper,n=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=a.x,f=void 0===p?0:p,h=a.y,m=void 0===h?0:h,v="function"==typeof u?u({x:f,y:m}):{x:f,y:m};f=v.x,m=v.y;var g=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),y=kC,x=yC,w=window;if(c){var k=eE(r),S="clientHeight",C="clientWidth";if(k===NC(r)&&"static"!==GC(k=ZC(r)).position&&"absolute"===s&&(S="scrollHeight",C="scrollWidth"),o===yC||(o===kC||o===wC)&&i===_C)x=xC,m-=(d&&k===w&&w.visualViewport?w.visualViewport.height:k[S])-n.height,m*=l?1:-1;if(o===kC||(o===yC||o===xC)&&i===_C)y=wC,f-=(d&&k===w&&w.visualViewport?w.visualViewport.width:k[C])-n.width,f*=l?1:-1}var E,_=Object.assign({position:s},c&&sE),P=!0===u?function(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:WC(r*o)/o||0,y:WC(n*o)/o||0}}({x:f,y:m},NC(r)):{x:f,y:m};return f=P.x,m=P.y,l?Object.assign({},_,((E={})[x]=b?"0":"",E[y]=g?"0":"",E.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",E)):Object.assign({},_,((t={})[x]=b?m+"px":"",t[y]=g?f+"px":"",t.transform="",t))}const cE={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=void 0===n||n,i=r.adaptive,a=void 0===i||i,s=r.roundOffsets,l=void 0===s||s,c={placement:LC(t.placement),variation:aE(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,lE(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,lE(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var uE={passive:!0};const dE={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,i=void 0===o||o,a=n.resize,s=void 0===a||a,l=NC(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",r.update,uE)})),s&&l.addEventListener("resize",r.update,uE),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",r.update,uE)})),s&&l.removeEventListener("resize",r.update,uE)}},data:{}};var pE={left:"right",right:"left",bottom:"top",top:"bottom"};function fE(e){return e.replace(/left|right|bottom|top/g,(function(e){return pE[e]}))}var hE={start:"end",end:"start"};function mE(e){return e.replace(/start|end/g,(function(e){return hE[e]}))}function vE(e){var t=NC(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function gE(e){return qC(ZC(e)).left+vE(e).scrollLeft}function bE(e){var t=GC(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function yE(e){return["html","body","#document"].indexOf(IC(e))>=0?e.ownerDocument.body:zC(e)&&bE(e)?e:yE(QC(e))}function xE(e,t){var r;void 0===t&&(t=[]);var n=yE(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),i=NC(n),a=o?[i].concat(i.visualViewport||[],bE(n)?n:[]):n,s=t.concat(a);return o?s:s.concat(xE(QC(a)))}function wE(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function kE(e,t,r){return t===AC?wE(function(e,t){var r=NC(e),n=ZC(e),o=r.visualViewport,i=n.clientWidth,a=n.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=UC();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+gE(e),y:l}}(e,r)):DC(t)?function(e,t){var r=qC(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}(t,r):wE(function(e){var t,r=ZC(e),n=vE(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=$C(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=$C(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+gE(e),l=-n.scrollTop;return"rtl"===GC(o||r).direction&&(s+=$C(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(ZC(e)))}function SE(e,t,r,n){var o="clippingParents"===t?function(e){var t=xE(QC(e)),r=["absolute","fixed"].indexOf(GC(e).position)>=0&&zC(e)?eE(e):e;return DC(r)?t.filter((function(e){return DC(e)&&YC(e,r)&&"body"!==IC(e)})):[]}(e):[].concat(t),i=[].concat(o,[r]),a=i[0],s=i.reduce((function(t,r){var o=kE(e,r,n);return t.top=$C(o.top,t.top),t.right=VC(o.right,t.right),t.bottom=VC(o.bottom,t.bottom),t.left=$C(o.left,t.left),t}),kE(e,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function CE(e){var t,r=e.reference,n=e.element,o=e.placement,i=o?LC(o):null,a=o?aE(o):null,s=r.x+r.width/2-n.width/2,l=r.y+r.height/2-n.height/2;switch(i){case yC:t={x:s,y:r.y-n.height};break;case xC:t={x:s,y:r.y+r.height};break;case wC:t={x:r.x+r.width,y:l};break;case kC:t={x:r.x-n.width,y:l};break;default:t={x:r.x,y:r.y}}var c=i?tE(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case EC:t[c]=t[c]-(r[u]/2-n[u]/2);break;case _C:t[c]=t[c]+(r[u]/2-n[u]/2)}}return t}function EE(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=void 0===n?e.placement:n,i=r.strategy,a=void 0===i?e.strategy:i,s=r.boundary,l=void 0===s?PC:s,c=r.rootBoundary,u=void 0===c?AC:c,d=r.elementContext,p=void 0===d?TC:d,f=r.altBoundary,h=void 0!==f&&f,m=r.padding,v=void 0===m?0:m,g=nE("number"!=typeof v?v:oE(v,CC)),b=p===TC?jC:TC,y=e.rects.popper,x=e.elements[h?b:p],w=SE(DC(x)?x:x.contextElement||ZC(e.elements.popper),l,u,a),k=qC(e.elements.reference),S=CE({reference:k,element:y,strategy:"absolute",placement:o}),C=wE(Object.assign({},y,S)),E=p===TC?C:k,_={top:w.top-E.top+g.top,bottom:E.bottom-w.bottom+g.bottom,left:w.left-E.left+g.left,right:E.right-w.right+g.right},P=e.modifiersData.offset;if(p===TC&&P){var A=P[o];Object.keys(_).forEach((function(e){var t=[wC,xC].indexOf(e)>=0?1:-1,r=[yC,xC].indexOf(e)>=0?"y":"x";_[e]+=A[r]*t}))}return _}function _E(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=r.boundary,i=r.rootBoundary,a=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,c=void 0===l?OC:l,u=aE(n),d=u?s?RC:RC.filter((function(e){return aE(e)===u})):CC,p=d.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=d);var f=p.reduce((function(t,r){return t[r]=EE(e,{placement:r,boundary:o,rootBoundary:i,padding:a})[LC(r)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}const PE={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,i=void 0===o||o,a=r.altAxis,s=void 0===a||a,l=r.fallbackPlacements,c=r.padding,u=r.boundary,d=r.rootBoundary,p=r.altBoundary,f=r.flipVariations,h=void 0===f||f,m=r.allowedAutoPlacements,v=t.options.placement,g=LC(v),b=l||(g===v||!h?[fE(v)]:function(e){if(LC(e)===SC)return[];var t=fE(e);return[mE(e),t,mE(t)]}(v)),y=[v].concat(b).reduce((function(e,r){return e.concat(LC(r)===SC?_E(t,{placement:r,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):r)}),[]),x=t.rects.reference,w=t.rects.popper,k=new Map,S=!0,C=y[0],E=0;E=0,j=T?"width":"height",R=EE(t,{placement:_,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),O=T?A?wC:kC:A?xC:yC;x[j]>w[j]&&(O=fE(O));var M=fE(O),I=[];if(i&&I.push(R[P]<=0),s&&I.push(R[O]<=0,R[M]<=0),I.every((function(e){return e}))){C=_,S=!1;break}k.set(_,I)}if(S)for(var N=function(e){var t=y.find((function(t){var r=k.get(t);if(r)return r.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},D=h?3:1;D>0;D--){if("break"===N(D))break}t.placement!==C&&(t.modifiersData[n]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function AE(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function TE(e){return[yC,wC,xC,kC].some((function(t){return e[t]>=0}))}const jE={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=EE(t,{elementContext:"reference"}),s=EE(t,{altBoundary:!0}),l=AE(a,n),c=AE(s,o,i),u=TE(l),d=TE(c);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};const RE={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,i=void 0===o?[0,0]:o,a=OC.reduce((function(e,r){return e[r]=function(e,t,r){var n=LC(e),o=[kC,yC].indexOf(n)>=0?-1:1,i="function"==typeof r?r(Object.assign({},t,{placement:e})):r,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[kC,wC].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}(r,t.rects,i),e}),{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=a}};const OE={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=CE({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};const ME={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,i=void 0===o||o,a=r.altAxis,s=void 0!==a&&a,l=r.boundary,c=r.rootBoundary,u=r.altBoundary,d=r.padding,p=r.tether,f=void 0===p||p,h=r.tetherOffset,m=void 0===h?0:h,v=EE(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),g=LC(t.placement),b=aE(t.placement),y=!b,x=tE(g),w="x"===x?"y":"x",k=t.modifiersData.popperOffsets,S=t.rects.reference,C=t.rects.popper,E="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,_="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,A={x:0,y:0};if(k){if(i){var T,j="y"===x?yC:kC,R="y"===x?xC:wC,O="y"===x?"height":"width",M=k[x],I=M+v[j],N=M-v[R],D=f?-C[O]/2:0,z=b===EC?S[O]:C[O],B=b===EC?-C[O]:-S[O],F=t.elements.arrow,L=f&&F?XC(F):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=$[j],W=$[R],H=rE(0,S[O],L[O]),U=y?S[O]/2-D-H-V-_.mainAxis:z-H-V-_.mainAxis,q=y?-S[O]/2+D+H+W+_.mainAxis:B+H+W+_.mainAxis,X=t.elements.arrow&&eE(t.elements.arrow),Y=X?"y"===x?X.clientTop||0:X.clientLeft||0:0,G=null!=(T=null==P?void 0:P[x])?T:0,K=M+q-G,Z=rE(f?VC(I,M+U-G-Y):I,M,f?$C(N,K):N);k[x]=Z,A[x]=Z-M}if(s){var Q,J="x"===x?yC:kC,ee="x"===x?xC:wC,te=k[w],re="y"===w?"height":"width",ne=te+v[J],oe=te-v[ee],ie=-1!==[yC,kC].indexOf(g),ae=null!=(Q=null==P?void 0:P[w])?Q:0,se=ie?ne:te-S[re]-C[re]-ae+_.altAxis,le=ie?te+S[re]+C[re]-ae-_.altAxis:oe,ce=f&&ie?function(e,t,r){var n=rE(e,t,r);return n>r?r:n}(se,te,le):rE(f?se:ne,te,f?le:oe);k[w]=ce,A[w]=ce-te}t.modifiersData[n]=A}},requiresIfExists:["offset"]};function IE(e,t,r){void 0===r&&(r=!1);var n=zC(t),o=zC(t)&&function(e){var t=e.getBoundingClientRect(),r=WC(t.width)/e.offsetWidth||1,n=WC(t.height)/e.offsetHeight||1;return 1!==r||1!==n}(t),i=ZC(t),a=qC(e,o,r),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&(("body"!==IC(t)||bE(i))&&(s=function(e){return e!==NC(e)&&zC(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:vE(e);var t}(t)),zC(t)?((l=qC(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=gE(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function NE(e){var t=new Map,r=new Set,n=[];function o(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!r.has(e)){var n=t.get(e);n&&o(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||o(e)})),n}var DE={placement:"bottom",modifiers:[],strategy:"absolute"};function zE(){for(var e=arguments.length,t=new Array(e),r=0;r{})),x=i.useCallback((()=>{var e;t&&m.current&&v.current&&(null==(e=y.current)||e.call(y),g.current=FE(m.current,v.current,{placement:b,modifiers:[mC,pC,uC,{...cC,enabled:!!f},{name:"eventListeners",...lC(s)},{name:"arrow",options:{padding:a}},{name:"offset",options:{offset:null!=l?l:[0,c]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!p,options:{boundary:d}},...null!=r?r:[]],strategy:o}),g.current.forceUpdate(),y.current=g.current.destroy)}),[b,t,r,f,s,a,l,c,u,p,d,o]);i.useEffect((()=>()=>{var e;m.current||v.current||(null==(e=g.current)||e.destroy(),g.current=null)}),[]);const w=i.useCallback((e=>{m.current=e,x()}),[x]),k=i.useCallback(((e={},t=null)=>({...e,ref:My(w,t)})),[w]),S=i.useCallback((e=>{v.current=e,x()}),[x]),C=i.useCallback(((e={},t=null)=>({...e,ref:My(S,t),style:{...e.style,position:o,minWidth:f?void 0:"max-content",inset:"0 auto auto 0"}})),[o,S,f]),E=i.useCallback(((e={},t=null)=>{const{size:r,shadowColor:n,bg:o,style:i,...a}=e;return{...a,ref:t,"data-popper-arrow":"",style:$E(e)}}),[]),_=i.useCallback(((e={},t=null)=>({...e,ref:t,"data-popper-arrow-inner":""})),[]);return{update(){var e;null==(e=g.current)||e.update()},forceUpdate(){var e;null==(e=g.current)||e.forceUpdate()},transformOrigin:iC.transformOrigin.varRef,referenceRef:w,popperRef:S,getPopperProps:C,getArrowProps:E,getArrowInnerProps:_,getReferenceProps:k}}function $E(e){const{size:t,shadowColor:r,bg:n,style:o}=e,i={...o,position:"absolute"};return t&&(i["--popper-arrow-size"]=t),r&&(i["--popper-arrow-shadow-color"]=r),n&&(i["--popper-arrow-bg"]=n),i}function VE(e={}){const{onClose:t,onOpen:r,isOpen:n,id:o}=e,a=Fd(r),s=Fd(t),[l,c]=i.useState(e.defaultIsOpen||!1),u=void 0!==n?n:l,d=void 0!==n,p=i.useId(),f=null!=o?o:`disclosure-${p}`,h=i.useCallback((()=>{d||c(!1),null==s||s()}),[d,s]),m=i.useCallback((()=>{d||c(!0),null==a||a()}),[d,a]),v=i.useCallback((()=>{u?h():m()}),[u,m,h]);return{isOpen:u,onOpen:m,onClose:h,onToggle:v,isControlled:d,getButtonProps:function(e={}){return{...e,"aria-expanded":u,"aria-controls":f,onClick(t){var r;null==(r=e.onClick)||r.call(e,t),v()}}},getDisclosureProps:function(e={}){return{...e,hidden:!u,id:f}}}}function WE(e,t){var r;const n=e.target;if(n){if(!HE(n).contains(n))return!1}return!(null==(r=t.current)?void 0:r.contains(n))}function HE(e){var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document}function UE(e){const{isOpen:t,ref:r}=e,[n,o]=i.useState(t),[a,s]=i.useState(!1);i.useEffect((()=>{a||(o(t),s(!0))}),[t,a,n]),jw((()=>r.current),"animationend",(()=>{o(t)}));return{present:!(!t&&!n),onComplete(){var e;const t=function(e){var t,r;return null!=(r=null==(t=cS(e))?void 0:t.defaultView)?r:window}(r.current),n=new t.CustomEvent("animationend",{bubbles:!0});null==(e=r.current)||e.dispatchEvent(n)}}}function qE(e){const{wasSelected:t,enabled:r,isSelected:n,mode:o="unmount"}=e;return!r||(!!n||!("keepMounted"!==o||!t))}var[XE,YE,GE,KE]=zy(),[ZE,QE]=Ct({strict:!1,name:"MenuContext"});function JE(e){var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document}function e_(e){return JE(e).activeElement===e}function t_(e={}){const{id:t,closeOnSelect:r=!0,closeOnBlur:n=!0,initialFocusRef:o,autoSelect:a=!0,isLazy:s,isOpen:l,defaultIsOpen:c,onClose:u,onOpen:d,placement:p="bottom-start",lazyBehavior:f="unmount",direction:h,computePositionOnMount:m=!1,...v}=e,g=i.useRef(null),b=i.useRef(null),y=GE(),x=i.useCallback((()=>{requestAnimationFrame((()=>{var e;null==(e=g.current)||e.focus({preventScroll:!1})}))}),[]),w=i.useCallback((()=>{const e=setTimeout((()=>{var e;if(o)null==(e=o.current)||e.focus();else{const e=y.firstEnabled();e&&j(e.index)}}));N.current.add(e)}),[y,o]),k=i.useCallback((()=>{const e=setTimeout((()=>{const e=y.lastEnabled();e&&j(e.index)}));N.current.add(e)}),[y]),S=i.useCallback((()=>{null==d||d(),a?w():x()}),[a,w,x,d]),{isOpen:C,onOpen:E,onClose:_,onToggle:P}=VE({isOpen:l,defaultIsOpen:c,onClose:u,onOpen:S});!function(e){const{ref:t,handler:r,enabled:n=!0}=e,o=Fd(r),a=i.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;i.useEffect((()=>{if(!n)return;const e=e=>{WE(e,t)&&(a.isPointerDown=!0)},i=e=>{a.ignoreEmulatedMouseEvents?a.ignoreEmulatedMouseEvents=!1:a.isPointerDown&&r&&WE(e,t)&&(a.isPointerDown=!1,o(e))},s=e=>{a.ignoreEmulatedMouseEvents=!0,r&&a.isPointerDown&&WE(e,t)&&(a.isPointerDown=!1,o(e))},l=HE(t.current);return l.addEventListener("mousedown",e,!0),l.addEventListener("mouseup",i,!0),l.addEventListener("touchstart",e,!0),l.addEventListener("touchend",s,!0),()=>{l.removeEventListener("mousedown",e,!0),l.removeEventListener("mouseup",i,!0),l.removeEventListener("touchstart",e,!0),l.removeEventListener("touchend",s,!0)}}),[r,t,o,a,n])}({enabled:C&&n,ref:g,handler:e=>{var t;(null==(t=b.current)?void 0:t.contains(e.target))||_()}});const A=LE({...v,enabled:C||m,placement:p,direction:h}),[T,j]=i.useState(-1);Ld((()=>{C||j(-1)}),[C]),rC(g,{focusRef:b,visible:C,shouldFocus:!0});const R=UE({isOpen:C,ref:g}),[O,M]=function(e,...t){const r=i.useId(),n=e||r;return i.useMemo((()=>t.map((e=>`${e}-${n}`))),[n,t])}(t,"menu-button","menu-list"),I=i.useCallback((()=>{E(),x()}),[E,x]),N=i.useRef(new Set([]));i.useEffect((()=>{const e=N.current;return()=>{e.forEach((e=>clearTimeout(e))),e.clear()}}),[]);const D=i.useCallback((()=>{E(),w()}),[w,E]),z=i.useCallback((()=>{E(),k()}),[E,k]),B=i.useCallback((()=>{var e,t;const r=JE(g.current),n=null==(e=g.current)?void 0:e.contains(r.activeElement);if(!(C&&!n))return;const o=null==(t=y.item(T))?void 0:t.node;null==o||o.focus({preventScroll:!0})}),[C,T,y]),F=i.useRef(null);return{openAndFocusMenu:I,openAndFocusFirstItem:D,openAndFocusLastItem:z,onTransitionEnd:B,unstable__animationState:R,descendants:y,popper:A,buttonId:O,menuId:M,forceUpdate:A.forceUpdate,orientation:"vertical",isOpen:C,onToggle:P,onOpen:E,onClose:_,menuRef:g,buttonRef:b,focusedIndex:T,closeOnSelect:r,closeOnBlur:n,autoSelect:a,setFocusedIndex:j,isLazy:s,lazyBehavior:f,initialFocusRef:o,rafId:F}}function r_(e){var t;return function(e){var t;if(!function(e){return null!=e&&"object"==typeof e&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}(e))return!1;const r=null!=(t=e.ownerDocument.defaultView)?t:window;return e instanceof r.HTMLElement}(e)&&!!(null==(t=null==e?void 0:e.getAttribute("role"))?void 0:t.startsWith("menuitem"))}var[n_,o_]=Ct({name:"MenuStylesContext",errorMessage:"useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),i_=n("aF",(e=>{const{children:t}=e,r=ud("Menu",e),n=Wn(e),{direction:o}=Dt(),{descendants:a,...s}=t_({...n,direction:o}),l=i.useMemo((()=>s),[s]),{isOpen:c,onClose:u,forceUpdate:d}=l;return y.jsx(XE,{value:a,children:y.jsx(ZE,{value:l,children:y.jsx(n_,{value:r,children:Gt(t,{isOpen:c,onClose:u,forceUpdate:d})})})})}));i_.displayName="Menu";var a_=Pd(((e,t)=>{const r=o_();return y.jsx(_d.span,{ref:t,...e,__css:r.command,className:"chakra-menu__command"})}));a_.displayName="MenuCommand";var s_=Pd(((e,t)=>{const{type:r,...n}=e,o=o_(),a=n.as||r?null!=r?r:void 0:"button",s=i.useMemo((()=>({textDecoration:"none",color:"inherit",userSelect:"none",display:"flex",width:"100%",alignItems:"center",textAlign:"start",flex:"0 0 auto",outline:0,...o.item})),[o.item]);return y.jsx(_d.button,{ref:t,type:a,...n,__css:s})})),l_=e=>{const{className:t,children:r,...n}=e,o=o_(),a=i.Children.only(r),s=i.isValidElement(a)?i.cloneElement(a,{focusable:"false","aria-hidden":!0,className:qt("chakra-menu__icon",a.props.className)}):null,l=qt("chakra-menu__icon-wrapper",t);return y.jsx(_d.span,{className:l,...n,__css:o.icon,children:s})};l_.displayName="MenuIcon";var c_=n("aI",Pd(((e,t)=>{const{icon:r,iconSpacing:n="0.75rem",command:o,commandSpacing:a="0.75rem",children:s,...l}=e,c=function(e={},t=null){const{onMouseEnter:r,onMouseMove:n,onMouseLeave:o,onClick:a,onFocus:s,isDisabled:l,isFocusable:c,closeOnSelect:u,type:d,...p}=e,f=QE(),{setFocusedIndex:h,focusedIndex:m,closeOnSelect:v,onClose:g,menuRef:b,isOpen:y,menuId:x,rafId:w}=f,k=i.useRef(null),S=`${x}-menuitem-${i.useId()}`,{index:C,register:E}=KE({disabled:l&&!c}),_=i.useCallback((e=>{null==r||r(e),l||h(C)}),[h,C,l,r]),P=i.useCallback((e=>{null==n||n(e),k.current&&!e_(k.current)&&_(e)}),[_,n]),A=i.useCallback((e=>{null==o||o(e),l||h(-1)}),[h,l,o]),T=i.useCallback((e=>{null==a||a(e),r_(e.currentTarget)&&(null!=u?u:v)&&g()}),[g,a,v,u]),j=i.useCallback((e=>{null==s||s(e),h(C)}),[h,s,C]),R=C===m,O=l&&!c;Ld((()=>{if(y)return R&&!O&&k.current?(w.current&&cancelAnimationFrame(w.current),w.current=requestAnimationFrame((()=>{var e;null==(e=k.current)||e.focus({preventScroll:!0}),w.current=null}))):b.current&&!e_(b.current)&&b.current.focus({preventScroll:!0}),()=>{w.current&&cancelAnimationFrame(w.current)}}),[R,O,b,y]);const M=eC({onClick:T,onFocus:j,onMouseEnter:_,onMouseMove:P,onMouseLeave:A,ref:My(E,k,t),isDisabled:l,isFocusable:c});return{...p,...M,type:null!=d?d:M.type,id:S,role:"menuitem",tabIndex:R?0:-1}}(l,t),u=r||o?y.jsx("span",{style:{pointerEvents:"none",flex:1},children:s}):s;return y.jsxs(s_,{...c,className:qt("chakra-menu__menuitem",c.className),children:[r&&y.jsx(l_,{fontSize:"0.8em",marginEnd:n,children:r}),u,o&&y.jsx(a_,{marginStart:a,children:o})]})})));c_.displayName="MenuItem";var u_={enter:{visibility:"visible",opacity:1,scale:1,transition:{duration:.2,ease:[.4,0,.2,1]}},exit:{transitionEnd:{visibility:"hidden"},opacity:0,scale:.8,transition:{duration:.1,easings:"easeOut"}}},d_=_d(Hb.div),p_=n("aH",Pd((function(e,t){var r,n;const{rootProps:o,motionProps:a,...s}=e,{isOpen:l,onTransitionEnd:c,unstable__animationState:u}=QE(),d=function(e={},t=null){const r=QE();if(!r)throw new Error("useMenuContext: context is undefined. Seems you forgot to wrap component within ");const{focusedIndex:n,setFocusedIndex:o,menuRef:a,isOpen:s,onClose:l,menuId:c,isLazy:u,lazyBehavior:d,unstable__animationState:p}=r,f=YE(),h=QS({preventDefault:e=>" "!==e.key&&r_(e.target)}),m=i.useCallback((e=>{if(!e.currentTarget.contains(e.target))return;const t=e.key,r={Tab:e=>e.preventDefault(),Escape:l,ArrowDown:()=>{const e=f.nextEnabled(n);e&&o(e.index)},ArrowUp:()=>{const e=f.prevEnabled(n);e&&o(e.index)}},i=r[t];if(i)return e.preventDefault(),void i(e);const a=h((e=>{const t=function(e,t,r,n){if(null==t)return n;if(!n)return e.find((e=>r(e).toLowerCase().startsWith(t.toLowerCase())));const o=e.filter((e=>r(e).toLowerCase().startsWith(t.toLowerCase())));if(o.length>0){let t;return o.includes(n)?(t=o.indexOf(n)+1,t===o.length&&(t=0),o[t]):(t=e.indexOf(o[0]),e[t])}return n}(f.values(),e,(e=>{var t,r;return null!=(r=null==(t=null==e?void 0:e.node)?void 0:t.textContent)?r:""}),f.item(n));if(t){const e=f.indexOf(t.node);o(e)}}));r_(e.target)&&a(e)}),[f,n,h,l,o]),v=i.useRef(!1);s&&(v.current=!0);const g=qE({wasSelected:v.current,enabled:u,mode:d,isSelected:p.present});return{...e,ref:My(a,t),children:g?e.children:null,tabIndex:-1,role:"menu",id:c,style:{...e.style,transformOrigin:"var(--popper-transform-origin)"},"aria-orientation":"vertical",onKeyDown:Jt(e.onKeyDown,m)}}(s,t),p=function(e={}){const{popper:t,isOpen:r}=QE();return t.getPopperProps({...e,style:{visibility:r?"visible":"hidden",...e.style}})}(o),f=o_();return y.jsx(_d.div,{...p,__css:{zIndex:null!=(n=e.zIndex)?n:null==(r=f.list)?void 0:r.zIndex},children:y.jsx(d_,{variants:u_,initial:!1,animate:l?"enter":"exit",__css:{outline:0,...f.list},...a,className:qt("chakra-menu__menu-list",d.className),...d,onUpdate:c,onAnimationComplete:er(u.onComplete,d.onAnimationComplete)})})})));p_.displayName="MenuList";var f_=Pd(((e,t)=>{const r=o_();return y.jsx(_d.button,{ref:t,...e,__css:{display:"inline-flex",appearance:"none",alignItems:"center",outline:0,...r.button}})})),h_=n("aG",Pd(((e,t)=>{const{children:r,as:n,...o}=e,a=function(e={},t=null){const r=QE(),{onToggle:n,popper:o,openAndFocusFirstItem:a,openAndFocusLastItem:s}=r,l=i.useCallback((e=>{const t=e.key,r={Enter:a,ArrowDown:a,ArrowUp:s}[t];r&&(e.preventDefault(),e.stopPropagation(),r(e))}),[a,s]);return{...e,ref:My(r.buttonRef,t,o.referenceRef),id:r.buttonId,"data-active":Zt(r.isOpen),"aria-expanded":r.isOpen,"aria-haspopup":"menu","aria-controls":r.menuId,onClick:Jt(e.onClick,n),onKeyDown:Jt(e.onKeyDown,l)}}(o,t),s=n||f_;return y.jsx(s,{...a,className:qt("chakra-menu__menu-button",e.className),children:y.jsx(_d.span,{__css:{pointerEvents:"none",flex:"1 1 auto",minW:0},children:e.children})})})));h_.displayName="MenuButton";var m_={slideInBottom:{...px,custom:{offsetY:16,reverse:!0}},slideInRight:{...px,custom:{offsetX:16,reverse:!0}},slideInTop:{...px,custom:{offsetY:-16,reverse:!0}},slideInLeft:{...px,custom:{offsetX:-16,reverse:!0}},scale:{...cx,custom:{initialScale:.95,reverse:!0}},none:{}},v_=_d(Hb.section),g_=e=>m_[e||"none"],b_=i.forwardRef(((e,t)=>{const{preset:r,motionProps:n=g_(r),...o}=e;return y.jsx(v_,{ref:t,...n,...o})}));b_.displayName="ModalTransition";var y_=Object.defineProperty,x_=(e,t,r)=>(((e,t,r)=>{t in e?y_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,t+"",r),r),w_=new class{constructor(){x_(this,"modals"),this.modals=new Map}add(e){return this.modals.set(e,this.modals.size+1),this.modals.size}remove(e){this.modals.delete(e)}isTopModal(e){return!!e&&this.modals.get(e)===this.modals.size}};function k_(e,t){const[r,n]=i.useState(0);return i.useEffect((()=>{const r=e.current;if(r){if(t){const e=w_.add(r);n(e)}return()=>{w_.remove(r),n(0)}}}),[t,e]),r}var S_=new WeakMap,C_=new WeakMap,E_={},__=0,P_=function(e){return e&&(e.host||P_(e.parentNode))},A_=function(e,t,r,n){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var r=P_(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);E_[r]||(E_[r]=new WeakMap);var i=E_[r],a=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else{var t=e.getAttribute(n),o=null!==t&&"false"!==t,l=(S_.get(e)||0)+1,c=(i.get(e)||0)+1;S_.set(e,l),i.set(e,c),a.push(e),1===l&&o&&C_.set(e,!0),1===c&&e.setAttribute(r,"true"),o||e.setAttribute(n,"true")}}))};return u(t),s.clear(),__++,function(){a.forEach((function(e){var t=S_.get(e)-1,o=i.get(e)-1;S_.set(e,t),i.set(e,o),t||(C_.has(e)||e.removeAttribute(n),C_.delete(e)),o||e.removeAttribute(r)})),--__||(S_=new WeakMap,S_=new WeakMap,C_=new WeakMap,E_={})}},T_=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),A_(n,o,r,"aria-hidden")):function(){return null}};function j_(e){const{isOpen:t,onClose:r,id:n,closeOnOverlayClick:o=!0,closeOnEsc:a=!0,useInert:s=!0,onOverlayClick:l,onEsc:c}=e,u=i.useRef(null),d=i.useRef(null),[p,f,h]=function(e,...t){const r=i.useId(),n=e||r;return i.useMemo((()=>t.map((e=>`${e}-${n}`))),[n,t])}(n,"chakra-modal","chakra-modal--header","chakra-modal--body");!function(e,t){const r=e.current;i.useEffect((()=>{if(e.current&&t)return T_(e.current)}),[t,e,r])}(u,t&&s);const m=k_(u,t),v=i.useRef(null),g=i.useCallback((e=>{v.current=e.target}),[]),b=i.useCallback((e=>{"Escape"===e.key&&(e.stopPropagation(),a&&(null==r||r()),null==c||c())}),[a,r,c]),[y,x]=i.useState(!1),[w,k]=i.useState(!1),S=i.useCallback(((e={},t=null)=>({role:"dialog",...e,ref:My(t,u),id:p,tabIndex:-1,"aria-modal":!0,"aria-labelledby":y?f:void 0,"aria-describedby":w?h:void 0,onClick:Jt(e.onClick,(e=>e.stopPropagation()))})),[h,w,p,f,y]),C=i.useCallback((e=>{e.stopPropagation(),v.current===e.target&&w_.isTopModal(u.current)&&(o&&(null==r||r()),null==l||l())}),[r,o,l]),E=i.useCallback(((e={},t=null)=>({...e,ref:My(t,d),onClick:Jt(e.onClick,C),onKeyDown:Jt(e.onKeyDown,b),onMouseDown:Jt(e.onMouseDown,g)})),[b,g,C]);return{isOpen:t,onClose:r,headerId:f,bodyId:h,setBodyMounted:k,setHeaderMounted:x,dialogRef:u,overlayRef:d,getDialogProps:S,getDialogContainerProps:E,index:m}}var[R_,O_]=Ct({name:"ModalStylesContext",errorMessage:"useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),[M_,I_]=Ct({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),N_=n("at",(e=>{const t={scrollBehavior:"outside",autoFocus:!0,trapFocus:!0,returnFocusOnClose:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale",lockFocusAcrossFrames:!0,...e},{portalProps:r,children:n,autoFocus:o,trapFocus:i,initialFocusRef:a,finalFocusRef:s,returnFocusOnClose:l,blockScrollOnMount:c,allowPinchZoom:u,preserveScrollBarGap:d,motionPreset:p,lockFocusAcrossFrames:f,onCloseComplete:h}=t,m=ud("Modal",t),v={...j_(t),autoFocus:o,trapFocus:i,initialFocusRef:a,finalFocusRef:s,returnFocusOnClose:l,blockScrollOnMount:c,allowPinchZoom:u,preserveScrollBarGap:d,motionPreset:p,lockFocusAcrossFrames:f};return y.jsx(M_,{value:v,children:y.jsx(R_,{value:m,children:y.jsx(Zb,{onExitComplete:h,children:v.isOpen&&y.jsx(Nt,{...r,children:n})})})})}));N_.displayName="Modal";var D_="right-scroll-bar-position",z_="width-before-scroll-bar",B_=Ww(),F_=function(){},L_=i.forwardRef((function(e,t){var r=i.useRef(null),n=i.useState({onScrollCapture:F_,onWheelCapture:F_,onTouchMoveCapture:F_}),o=n[0],a=n[1],s=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,p=e.shards,f=e.sideCar,h=e.noIsolation,m=e.inert,v=e.allowPinchZoom,g=e.as,b=void 0===g?"div":g,y=e.gapMode,x=Fw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,k=Dw([r,t]),S=Bw(Bw({},x),o);return i.createElement(i.Fragment,null,d&&i.createElement(w,{sideCar:B_,removeScrollBar:u,shards:p,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!v,lockRef:r,gapMode:y}),s?i.cloneElement(i.Children.only(l),Bw(Bw({},S),{ref:k})):i.createElement(b,Bw({},S,{className:c,ref:k}),l))}));L_.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},L_.classNames={fullWidth:z_,zeroRight:D_};function $_(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var V_=function(){var e=0,t=null;return{add:function(r){var n;0==e&&(t=$_())&&(!function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,r),n=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(n)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},W_=function(){var e,t=(e=V_(),function(t,r){i.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&r])});return function(e){var r=e.styles,n=e.dynamic;return t(r,n),null}},H_={left:0,top:0,right:0,gap:0},U_=function(e){return parseInt(e||"",10)||0},q_=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return H_;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[U_(r),U_(n),U_(o)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},X_=W_(),Y_=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(s,"px ").concat(n,";\n }\n body {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(D_," {\n right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(z_," {\n margin-right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(D_," .").concat(D_," {\n right: 0 ").concat(n,";\n }\n \n .").concat(z_," .").concat(z_," {\n margin-right: 0 ").concat(n,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},G_=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=void 0===n?"margin":n,a=i.useMemo((function(){return q_(o)}),[o]);return i.createElement(X_,{styles:Y_(a,!t,o,r?"":"!important")})},K_=!1;if("undefined"!=typeof window)try{var Z_=Object.defineProperty({},"passive",{get:function(){return K_=!0,!0}});window.addEventListener("test",Z_,Z_),window.removeEventListener("test",Z_,Z_)}catch(xT){K_=!1}var Q_=!!K_&&{passive:!1},J_=function(e,t){var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},eP=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),tP(e,n)){var o=rP(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},tP=function(e,t){return"v"===e?function(e){return J_(e,"overflowY")}(t):function(e){return J_(e,"overflowX")}(t)},rP=function(e,t){return"v"===e?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)},nP=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oP=function(e){return[e.deltaX,e.deltaY]},iP=function(e){return e&&"current"in e?e.current:e},aP=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},sP=0,lP=[];function cP(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const uP=(dP=function(e){var t=i.useRef([]),r=i.useRef([0,0]),n=i.useRef(),o=i.useState(sP++)[0],a=i.useState(W_)[0],s=i.useRef(e);i.useEffect((function(){s.current=e}),[e]),i.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;oMath.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var p=eP(d,u);if(!p)return!0;if(p?o=d:(o="v"===d?"h":"v",p=eP(d,u)),!p)return!1;if(!n.current&&"changedTouches"in e&&(l||c)&&(n.current=o),!o)return!0;var f=n.current||o;return function(e,t,r,n,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),c=!1,u=a>0,d=0,p=0;do{var f=rP(e,s),h=f[0],m=f[1]-f[2]-i*h;(h||m)&&tP(e,s)&&(d+=m,p+=h),s=s instanceof ShadowRoot?s.host:s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&Math.abs(d)<1||!u&&Math.abs(p)<1)&&(c=!0),c}(f,t,e,"h"===f?l:c)}),[]),c=i.useCallback((function(e){var r=e;if(lP.length&&lP[lP.length-1]===a){var n="deltaY"in r?oP(r):nP(r),o=t.current.filter((function(e){return e.name===r.type&&(e.target===r.target||r.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,n)}))[0];if(o&&o.should)r.cancelable&&r.preventDefault();else if(!o){var i=(s.current.shards||[]).map(iP).filter(Boolean).filter((function(e){return e.contains(r.target)}));(i.length>0?l(r,i[0]):!s.current.noIsolation)&&r.cancelable&&r.preventDefault()}}}),[]),u=i.useCallback((function(e,r,n,o){var i={name:e,delta:r,target:n,should:o,shadowParent:cP(n)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=i.useCallback((function(e){r.current=nP(e),n.current=void 0}),[]),p=i.useCallback((function(t){u(t.type,oP(t),t.target,l(t,e.lockRef.current))}),[]),f=i.useCallback((function(t){u(t.type,nP(t),t.target,l(t,e.lockRef.current))}),[]);i.useEffect((function(){return lP.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Q_),document.addEventListener("touchmove",c,Q_),document.addEventListener("touchstart",d,Q_),function(){lP=lP.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,Q_),document.removeEventListener("touchmove",c,Q_),document.removeEventListener("touchstart",d,Q_)}}),[]);var h=e.removeScrollBar,m=e.inert;return i.createElement(i.Fragment,null,m?i.createElement(a,{styles:aP(o)}):null,h?i.createElement(G_,{gapMode:e.gapMode}):null)},B_.useMedium(dP),Hw);var dP,pP=i.forwardRef((function(e,t){return i.createElement(L_,Bw({},e,{ref:t,sideCar:uP}))}));function fP(e){const{autoFocus:t,trapFocus:r,dialogRef:n,initialFocusRef:o,blockScrollOnMount:a,allowPinchZoom:s,finalFocusRef:l,returnFocusOnClose:c,preserveScrollBarGap:u,lockFocusAcrossFrames:d,isOpen:p}=I_(),[f,h]=ug();i.useEffect((()=>{!f&&h&&setTimeout(h)}),[f,h]);const m=k_(n,p);return y.jsx(xS,{autoFocus:t,isDisabled:!r,initialFocusRef:o,finalFocusRef:l,restoreFocus:c,contentRef:n,lockFocusAcrossFrames:d,children:y.jsx(pP,{removeScrollBar:!u,allowPinchZoom:s,enabled:1===m&&a,forwardProps:!0,children:e.children})})}pP.classNames=L_.classNames;var hP=n("au",Pd(((e,t)=>{const{className:r,children:n,containerProps:o,motionProps:i,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=I_(),c=s(a,t),u=l(o),d=qt("chakra-modal__content",r),p=O_(),f={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...p.dialog},h={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...p.dialogContainer},{motionPreset:m}=I_();return y.jsx(fP,{children:y.jsx(_d.div,{...u,className:"chakra-modal__content-container",tabIndex:-1,__css:h,children:y.jsx(b_,{preset:m,motionProps:i,className:d,...c,__css:f,children:n})})})})));hP.displayName="ModalContent";n("a0",Pd(((e,t)=>y.jsx(hP,{ref:t,role:"alertdialog",...e}))));n("a5",Pd(((e,t)=>{const{className:r,...n}=e,o=qt("chakra-modal__footer",r),i={display:"flex",alignItems:"center",justifyContent:"flex-end",...O_().footer};return y.jsx(_d.footer,{ref:t,...n,__css:i,className:o})}))).displayName="ModalFooter",n("a1",Pd(((e,t)=>{const{className:r,...n}=e,{headerId:o,setHeaderMounted:a}=I_();i.useEffect((()=>(a(!0),()=>a(!1))),[a]);const s=qt("chakra-modal__header",r),l={flex:0,...O_().header};return y.jsx(_d.header,{ref:t,className:s,id:o,...n,__css:l})}))).displayName="ModalHeader";var mP=_d(Hb.div);n("$",Pd(((e,t)=>{const{className:r,transition:n,motionProps:o,...i}=e,a=qt("chakra-modal__overlay",r),s={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...O_().overlay},{motionPreset:l}=I_(),c=o||("none"===l?{}:ax);return y.jsx(mP,{...c,__css:s,ref:t,className:a,...i})}))).displayName="ModalOverlay";var vP=n("a3",Pd(((e,t)=>{const{className:r,...n}=e,{bodyId:o,setBodyMounted:a}=I_();i.useEffect((()=>(a(!0),()=>a(!1))),[a]);const s=qt("chakra-modal__body",r),l=O_();return y.jsx(_d.div,{ref:t,className:s,id:o,...n,__css:l.body})})));vP.displayName="ModalBody";var gP=n("a2",Pd(((e,t)=>{const{onClick:r,className:n,...o}=e,{onClose:i}=I_(),a=qt("chakra-modal__close-btn",n),s=O_();return y.jsx(vy,{ref:t,__css:s.closeButton,className:a,onClick:Jt(r,(e=>{e.stopPropagation(),i()})),...o})})));gP.displayName="ModalCloseButton";var bP=e=>y.jsx(ry,{viewBox:"0 0 24 24",...e,children:y.jsx("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),yP=e=>y.jsx(ry,{viewBox:"0 0 24 24",...e,children:y.jsx("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function xP(e,t,r,n){i.useEffect((()=>{var o;if(!e.current||!n)return;const i=null!=(o=e.current.ownerDocument.defaultView)?o:window,a=Array.isArray(t)?t:[t],s=new i.MutationObserver((e=>{for(const t of e)"attributes"===t.type&&t.attributeName&&a.includes(t.attributeName)&&r(t)}));return s.observe(e.current,{attributes:!0,attributeFilter:a}),()=>s.disconnect()}))}var wP=50,kP=300;function SP(e,t){const[r,n]=i.useState(!1),[o,a]=i.useState(null),[s,l]=i.useState(!0),c=i.useRef(null),u=()=>clearTimeout(c.current);!function(e,t){const r=Fd(e);i.useEffect((()=>{let e=null;const n=()=>r();return null!==t&&(e=window.setInterval(n,t)),()=>{e&&window.clearInterval(e)}}),[t,r])}((()=>{"increment"===o&&e(),"decrement"===o&&t()}),r?wP:null);const d=i.useCallback((()=>{s&&e(),c.current=setTimeout((()=>{l(!1),n(!0),a("increment")}),kP)}),[e,s]),p=i.useCallback((()=>{s&&t(),c.current=setTimeout((()=>{l(!1),n(!0),a("decrement")}),kP)}),[t,s]),f=i.useCallback((()=>{l(!0),n(!1),u()}),[]);return i.useEffect((()=>()=>u()),[]),{up:d,down:p,stop:f,isSpinning:r}}var CP=/^[Ee0-9+\-.]$/;function EP(e){return CP.test(e)}function _P(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:r=!0,keepWithinRange:n=!0,min:o=Number.MIN_SAFE_INTEGER,max:a=Number.MAX_SAFE_INTEGER,step:s=1,isReadOnly:l,isDisabled:c,isRequired:u,isInvalid:d,pattern:p="[0-9]*(.[0-9]+)?",inputMode:f="decimal",allowMouseWheel:h,id:m,onChange:v,precision:g,name:b,"aria-describedby":y,"aria-label":x,"aria-labelledby":w,onFocus:k,onBlur:S,onInvalid:C,getAriaValueText:E,isValidCharacter:_,format:P,parse:A,...T}=e,j=Fd(k),R=Fd(S),O=Fd(C),M=Fd(null!=_?_:EP),I=Fd(E),N=function(e={}){const{onChange:t,precision:r,defaultValue:n,value:o,step:a=1,min:s=Number.MIN_SAFE_INTEGER,max:l=Number.MAX_SAFE_INTEGER,keepWithinRange:c=!0}=e,u=Fd(t),[d,p]=i.useState((()=>{var e;return null==n?"":null!=(e=Tw(n,a,r))?e:""})),f=void 0!==o,h=f?o:d,m=Aw(Pw(h),a),v=null!=r?r:m,g=i.useCallback((e=>{e!==h&&(f||p(e.toString()),null==u||u(e.toString(),Pw(e)))}),[u,f,h]),b=i.useCallback((e=>{let t=e;return c&&(t=_w(t,s,l)),kw(t,v)}),[v,c,l,s]),y=i.useCallback(((e=a)=>{let t;t=""===h?Pw(e):Pw(h)+e,t=b(t),g(t)}),[b,a,g,h]),x=i.useCallback(((e=a)=>{let t;t=""===h?Pw(-e):Pw(h)-e,t=b(t),g(t)}),[b,a,g,h]),w=i.useCallback((()=>{var e;let t;t=null==n?"":null!=(e=Tw(n,a,r))?e:s,g(t)}),[n,r,a,g,s]),k=i.useCallback((e=>{var t;const r=null!=(t=Tw(e,a,v))?t:s;g(r)}),[v,a,g,s]),S=Pw(h);return{isOutOfRange:S>l||Se.split("").filter(M).join("")),[M]),X=i.useCallback((e=>{var t;return null!=(t=null==A?void 0:A(e))?t:e}),[A]),Y=i.useCallback((e=>{var t;return(null!=(t=null==P?void 0:P(e))?t:e).toString()}),[P]);Ld((()=>{(N.valueAsNumber>a||N.valueAsNumber{if(!V.current)return;if(V.current.value!=N.value){const e=X(V.current.value);N.setValue(q(e))}}),[X,q]);const G=i.useCallback(((e=s)=>{$&&z(e)}),[z,$,s]),K=i.useCallback(((e=s)=>{$&&B(e)}),[B,$,s]),Z=SP(G,K);xP(H,"disabled",Z.stop,Z.isSpinning),xP(U,"disabled",Z.stop,Z.isSpinning);const Q=i.useCallback((e=>{if(e.nativeEvent.isComposing)return;const t=X(e.currentTarget.value);D(q(t)),W.current={start:e.currentTarget.selectionStart,end:e.currentTarget.selectionEnd}}),[D,q,X]),J=i.useCallback((e=>{var t,r,n;null==j||j(e),W.current&&(e.target.selectionStart=null!=(r=W.current.start)?r:null==(t=e.currentTarget.value)?void 0:t.length,e.currentTarget.selectionEnd=null!=(n=W.current.end)?n:e.currentTarget.selectionStart)}),[j]),ee=i.useCallback((e=>{if(e.nativeEvent.isComposing)return;(function(e,t){if(null==e.key)return!0;const r=e.ctrlKey||e.altKey||e.metaKey;return!(1===e.key.length&&!r)||t(e.key)})(e,M)||e.preventDefault();const t=te(e)*s,r={ArrowUp:()=>G(t),ArrowDown:()=>K(t),Home:()=>D(o),End:()=>D(a)}[e.key];r&&(e.preventDefault(),r(e))}),[M,s,G,K,D,o,a]),te=e=>{let t=1;return(e.metaKey||e.ctrlKey)&&(t=.1),e.shiftKey&&(t=10),t},re=i.useMemo((()=>{const e=null==I?void 0:I(N.value);if(null!=e)return e;const t=N.value.toString();return t||void 0}),[N.value,I]),ne=i.useCallback((()=>{let e=N.value;if(""===N.value)return;/^[eE]/.test(N.value.toString())?N.setValue(""):(N.valueAsNumbera&&(e=a),N.cast(e))}),[N,a,o]),oe=i.useCallback((()=>{L(!1),r&&ne()}),[r,L,ne]),ie=i.useCallback((()=>{t&&requestAnimationFrame((()=>{var e;null==(e=V.current)||e.focus()}))}),[t]),ae=i.useCallback((e=>{e.preventDefault(),Z.up(),ie()}),[ie,Z]),se=i.useCallback((e=>{e.preventDefault(),Z.down(),ie()}),[ie,Z]);jw((()=>V.current),"wheel",(e=>{var t,r;const n=(null!=(r=null==(t=V.current)?void 0:t.ownerDocument)?r:document).activeElement===V.current;if(!h||!n)return;e.preventDefault();const o=te(e)*s,i=Math.sign(e.deltaY);-1===i?G(o):1===i&&K(o)}),{passive:!1});const le=i.useCallback(((e={},t=null)=>{const r=c||n&&N.isAtMax;return{...e,ref:My(t,H),role:"button",tabIndex:-1,onPointerDown:Jt(e.onPointerDown,(e=>{0!==e.button||r||ae(e)})),onPointerLeave:Jt(e.onPointerLeave,Z.stop),onPointerUp:Jt(e.onPointerUp,Z.stop),disabled:r,"aria-disabled":Qt(r)}}),[N.isAtMax,n,ae,Z.stop,c]),ce=i.useCallback(((e={},t=null)=>{const r=c||n&&N.isAtMin;return{...e,ref:My(t,U),role:"button",tabIndex:-1,onPointerDown:Jt(e.onPointerDown,(e=>{0!==e.button||r||se(e)})),onPointerLeave:Jt(e.onPointerLeave,Z.stop),onPointerUp:Jt(e.onPointerUp,Z.stop),disabled:r,"aria-disabled":Qt(r)}}),[N.isAtMin,n,se,Z.stop,c]),ue=i.useCallback(((e={},t=null)=>{var r,n,i,s;return{name:b,inputMode:f,type:"text",pattern:p,"aria-labelledby":w,"aria-label":x,"aria-describedby":y,id:m,disabled:c,...e,readOnly:null!=(r=e.readOnly)?r:l,"aria-readonly":null!=(n=e.readOnly)?n:l,"aria-required":null!=(i=e.required)?i:u,required:null!=(s=e.required)?s:u,ref:My(V,t),value:Y(N.value),role:"spinbutton","aria-valuemin":o,"aria-valuemax":a,"aria-valuenow":Number.isNaN(N.valueAsNumber)?void 0:N.valueAsNumber,"aria-invalid":Qt(null!=d?d:N.isOutOfRange),"aria-valuetext":re,autoComplete:"off",autoCorrect:"off",onChange:Jt(e.onChange,Q),onKeyDown:Jt(e.onKeyDown,ee),onFocus:Jt(e.onFocus,J,(()=>L(!0))),onBlur:Jt(e.onBlur,R,oe)}}),[b,f,p,w,x,Y,y,m,c,u,l,d,N.value,N.valueAsNumber,N.isOutOfRange,o,a,re,Q,ee,J,R,oe]);return{value:Y(N.value),valueAsNumber:N.valueAsNumber,isFocused:F,isDisabled:c,isReadOnly:l,getIncrementButtonProps:le,getDecrementButtonProps:ce,getInputProps:ue,htmlProps:T}}var[PP,AP]=Ct({name:"NumberInputStylesContext",errorMessage:"useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),[TP,jP]=Ct({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),RP=n("b0",Pd((function(e,t){const r=ud("NumberInput",e),n=Zx(Wn(e)),{htmlProps:o,...a}=_P(n),s=i.useMemo((()=>a),[a]);return y.jsx(TP,{value:s,children:y.jsx(PP,{value:r,children:y.jsx(_d.div,{...o,ref:t,className:qt("chakra-numberinput",e.className),__css:{position:"relative",zIndex:0,...r.root}})})})})));RP.displayName="NumberInput";var OP=Pd((function(e,t){const r=AP();return y.jsx(_d.div,{"aria-hidden":!0,ref:t,...e,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})}));OP.displayName="NumberInputStepper";var MP=n("b1",Pd((function(e,t){const{getInputProps:r}=jP(),n=r(e,t),o=AP();return y.jsx(_d.input,{...n,className:qt("chakra-numberinput__field",e.className),__css:{width:"100%",...o.field}})})));MP.displayName="NumberInputField";var IP=_d("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),NP=Pd((function(e,t){var r;const n=AP(),{getDecrementButtonProps:o}=jP(),i=o(e,t);return y.jsx(IP,{...i,__css:n.stepper,children:null!=(r=e.children)?r:y.jsx(bP,{})})}));NP.displayName="NumberDecrementStepper";var DP=Pd((function(e,t){var r;const{getIncrementButtonProps:n}=jP(),o=n(e,t),i=AP();return y.jsx(IP,{...o,__css:i.stepper,children:null!=(r=e.children)?r:y.jsx(yP,{})})}));DP.displayName="NumberIncrementStepper";var[zP,BP]=Ct({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[FP,LP]=Ct({name:"PopoverStylesContext",errorMessage:"usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),$P=n("Y",Pd((function(e,t){const{getHeaderProps:r}=BP(),n=LP();return y.jsx(_d.header,{...r(e,t),className:qt("chakra-popover__header",e.className),__css:n.header})})));function VP(e){const t=i.Children.only(e.children),{getTriggerProps:r}=BP();return i.cloneElement(t,r(t.props,t.ref))}$P.displayName="PopoverHeader",VP.displayName="PopoverTrigger";var WP={click:"click",hover:"hover"};function HP(e={}){const{closeOnBlur:t=!0,closeOnEsc:r=!0,initialFocusRef:n,id:o,returnFocusOnClose:a=!0,autoFocus:s=!0,arrowSize:l,arrowShadowColor:c,trigger:u=WP.click,openDelay:d=200,closeDelay:p=200,isLazy:f,lazyBehavior:h="unmount",computePositionOnMount:m,...v}=e,{isOpen:g,onClose:b,onOpen:y,onToggle:x}=VE(e),w=i.useRef(null),k=i.useRef(null),S=i.useRef(null),C=i.useRef(!1),E=i.useRef(!1);g&&(E.current=!0);const[_,P]=i.useState(!1),[A,T]=i.useState(!1),j=i.useId(),R=null!=o?o:j,[O,M,I,N]=["popover-trigger","popover-content","popover-header","popover-body"].map((e=>`${e}-${R}`)),{referenceRef:D,getArrowProps:z,getPopperProps:B,getArrowInnerProps:F,forceUpdate:L}=LE({...v,enabled:g||!!m}),$=UE({isOpen:g,ref:S});!function(e){const{ref:t,elements:r,enabled:n}=e,o=()=>{var e,r;return null!=(r=null==(e=t.current)?void 0:e.ownerDocument)?r:document};jw(o,"pointerdown",(e=>{if(!Mw()||!n)return;const i=e.target,a=(null!=r?r:[t]).some((e=>{const t="current"in e?e.current:e;return(null==t?void 0:t.contains(i))||t===i}));o().activeElement!==i&&a&&(e.preventDefault(),i.focus())}))}({enabled:g,ref:k}),rC(S,{focusRef:k,visible:g,shouldFocus:a&&u===WP.click}),function(e,t=nC){const{focusRef:r,preventScroll:n,shouldFocus:o,visible:a}=t,s="current"in e?e.current:e,l=o&&a,c=i.useRef(l),u=i.useRef(a);At((()=>{!u.current&&a&&(c.current=l),u.current=a}),[a,l]);const d=i.useCallback((()=>{if(a&&s&&c.current&&(c.current=!1,!s.contains(document.activeElement)))if(null==r?void 0:r.current)requestAnimationFrame((()=>{var e;null==(e=r.current)||e.focus({preventScroll:n})}));else{const e=bS(s);e.length>0&&requestAnimationFrame((()=>{e[0].focus({preventScroll:n})}))}}),[a,n,s,r]);Ld((()=>{d()}),[d]),jw(s,"transitionend",d)}(S,{focusRef:n,visible:g,shouldFocus:s&&u===WP.click});const V=qE({wasSelected:E.current,enabled:f,mode:h,isSelected:$.present}),W=i.useCallback(((e={},n=null)=>{const o={...e,style:{...e.style,transformOrigin:iC.transformOrigin.varRef,[iC.arrowSize.var]:l?`${l}px`:void 0,[iC.arrowShadowColor.var]:c},ref:My(S,n),children:V?e.children:null,id:M,tabIndex:-1,role:"dialog",onKeyDown:Jt(e.onKeyDown,(e=>{r&&"Escape"===e.key&&b()})),onBlur:Jt(e.onBlur,(e=>{const r=qP(e),n=UP(S.current,r),o=UP(k.current,r);g&&t&&(!n&&!o)&&b()})),"aria-labelledby":_?I:void 0,"aria-describedby":A?N:void 0};return u===WP.hover&&(o.role="tooltip",o.onMouseEnter=Jt(e.onMouseEnter,(()=>{C.current=!0})),o.onMouseLeave=Jt(e.onMouseLeave,(e=>{null!==e.nativeEvent.relatedTarget&&(C.current=!1,setTimeout((()=>b()),p))}))),o}),[V,M,_,I,A,N,u,r,b,g,t,p,c,l]),H=i.useCallback(((e={},t=null)=>B({...e,style:{visibility:g?"visible":"hidden",...e.style}},t)),[g,B]),U=i.useCallback(((e,t=null)=>({...e,ref:My(t,w,D)})),[w,D]),q=i.useRef(),X=i.useRef(),Y=i.useCallback((e=>{null==w.current&&D(e)}),[D]),G=i.useCallback(((e={},r=null)=>{const n={...e,ref:My(k,r,Y),id:O,"aria-haspopup":"dialog","aria-expanded":g,"aria-controls":M};return u===WP.click&&(n.onClick=Jt(e.onClick,x)),u===WP.hover&&(n.onFocus=Jt(e.onFocus,(()=>{void 0===q.current&&y()})),n.onBlur=Jt(e.onBlur,(e=>{const r=qP(e),n=!UP(S.current,r);g&&t&&n&&b()})),n.onKeyDown=Jt(e.onKeyDown,(e=>{"Escape"===e.key&&b()})),n.onMouseEnter=Jt(e.onMouseEnter,(()=>{C.current=!0,q.current=window.setTimeout((()=>y()),d)})),n.onMouseLeave=Jt(e.onMouseLeave,(()=>{C.current=!1,q.current&&(clearTimeout(q.current),q.current=void 0),X.current=window.setTimeout((()=>{!1===C.current&&b()}),p)}))),n}),[O,g,M,u,Y,x,y,t,b,d,p]);i.useEffect((()=>()=>{q.current&&clearTimeout(q.current),X.current&&clearTimeout(X.current)}),[]);const K=i.useCallback(((e={},t=null)=>({...e,id:I,ref:My(t,(e=>{P(!!e)}))})),[I]),Z=i.useCallback(((e={},t=null)=>({...e,id:N,ref:My(t,(e=>{T(!!e)}))})),[N]);return{forceUpdate:L,isOpen:g,onAnimationComplete:$.onComplete,onClose:b,getAnchorProps:U,getArrowProps:z,getArrowInnerProps:F,getPopoverPositionerProps:H,getPopoverProps:W,getTriggerProps:G,getHeaderProps:K,getBodyProps:Z}}function UP(e,t){return e===t||(null==e?void 0:e.contains(t))}function qP(e){var t;const r=e.currentTarget.ownerDocument.activeElement;return null!=(t=e.relatedTarget)?t:r}function XP(e){const t=ud("Popover",e),{children:r,...n}=Wn(e),o=HP({...n,direction:Dt().direction});return y.jsx(zP,{value:o,children:y.jsx(FP,{value:t,children:Gt(r,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}function YP(e){const t=i.Children.only(e.children),{getAnchorProps:r}=BP();return i.cloneElement(t,r(t.props,t.ref))}XP.displayName="Popover",YP.displayName="PopoverAnchor";var GP=(e,t)=>t?`${e}.${t}, ${t}`:void 0;function KP(e){var t;const{bg:r,bgColor:n,backgroundColor:o,shadow:i,boxShadow:a,shadowColor:s}=e,{getArrowProps:l,getArrowInnerProps:c}=BP(),u=LP(),d=null!=(t=null!=r?r:n)?t:o,p=null!=i?i:a;return y.jsx(_d.div,{...l(),className:"chakra-popover__arrow-positioner",children:y.jsx(_d.div,{className:qt("chakra-popover__arrow",e.className),...c(e),__css:{"--popper-arrow-shadow-color":GP("colors",s),"--popper-arrow-bg":GP("colors",d),"--popper-arrow-shadow":GP("shadows",p),...u.arrow}})})}KP.displayName="PopoverArrow";var ZP=n("Z",Pd((function(e,t){const{getBodyProps:r}=BP(),n=LP();return y.jsx(_d.div,{...r(e,t),className:qt("chakra-popover__body",e.className),__css:n.body})})));ZP.displayName="PopoverBody";var QP=n("X",Pd((function(e,t){const{onClose:r}=BP(),n=LP();return y.jsx(vy,{size:"sm",onClick:r,className:qt("chakra-popover__close-btn",e.className),__css:n.closeButton,ref:t,...e})})));function JP(e){if(e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}QP.displayName="PopoverCloseButton";var eA={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},tA=_d(Hb.section),rA=Pd((function(e,t){const{variants:r=eA,...n}=e,{isOpen:o}=BP();return y.jsx(tA,{ref:t,variants:JP(r),initial:!1,animate:o?"enter":"exit",...n})}));rA.displayName="PopoverTransition";var nA=n("q",Pd((function(e,t){const{rootProps:r,motionProps:n,...o}=e,{getPopoverProps:i,getPopoverPositionerProps:a,onAnimationComplete:s}=BP(),l=LP(),c={position:"relative",display:"flex",flexDirection:"column",...l.content};return y.jsx(_d.div,{...a(r),__css:l.popper,className:"chakra-popover__popper",children:y.jsx(rA,{...n,...i(o,t),onAnimationComplete:er(s,o.onAnimationComplete),className:qt("chakra-popover__content",e.className),__css:c})})})));nA.displayName="PopoverContent";var oA=Pd((function(e,t){const{children:r,placeholder:n,className:o,...i}=e;return y.jsxs(_d.select,{...i,ref:t,className:qt("chakra-select",o),children:[n&&y.jsx("option",{value:"",children:n}),r]})}));oA.displayName="SelectField";var iA=n("ae",Pd(((e,t)=>{var r;const n=ud("Select",e),{rootProps:o,placeholder:i,icon:a,color:s,height:l,h:c,minH:u,minHeight:d,iconColor:p,iconSize:f,...h}=Wn(e),[m,v]=function(e,t){const r={},n={};for(const[o,i]of Object.entries(e))t.includes(o)?r[o]=i:n[o]=i;return[r,n]}(h,On),g=Kx(v),b={width:"100%",height:"fit-content",position:"relative",color:s},x={paddingEnd:"2rem",...n.field,_focus:{zIndex:"unset",...null==(r=n.field)?void 0:r._focus}};return y.jsxs(_d.div,{className:"chakra-select__wrapper",__css:b,...m,...o,children:[y.jsx(oA,{ref:t,height:null!=c?c:l,minH:null!=u?u:d,placeholder:i,...g,__css:x,children:e.children}),y.jsx(lA,{"data-disabled":Zt(g.disabled),...(p||s)&&{color:p||s},__css:n.icon,...f&&{fontSize:f},children:a})]})})));iA.displayName="Select";var aA=e=>y.jsx("svg",{viewBox:"0 0 24 24",...e,children:y.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),sA=_d("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),lA=e=>{const{children:t=y.jsx(aA,{}),...r}=e,n=i.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return y.jsx(sA,{...r,className:"chakra-select__icon-wrapper",children:i.isValidElement(t)?n:null})};lA.displayName="SelectIcon";var cA=e=>e?"":void 0,uA=e=>!!e||void 0,dA=(...e)=>e.filter(Boolean).join(" ");function pA(...e){return function(t){e.some((e=>(null==e||e(t),null==t?void 0:t.defaultPrevented)))}}function fA(e){const{orientation:t,vertical:r,horizontal:n}=e;return"vertical"===t?r:n}var hA={width:0,height:0},mA=e=>e||hA;function vA(e){const t=function(e){var t;return null!=(t=e.view)?t:window}(e);return void 0!==t.PointerEvent&&e instanceof t.PointerEvent?!("mouse"!==e.pointerType):e instanceof t.MouseEvent}function gA(e){return!!e.touches}function bA(e,t="page"){return gA(e)?function(e,t="page"){const r=e.touches[0]||e.changedTouches[0];return{x:r[`${t}X`],y:r[`${t}Y`]}}(e,t):function(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}(e,t)}function yA(e,t=!1){function r(t){e(t,{point:bA(t)})}const n=t?function(e){return t=>{const r=vA(t);(!r||r&&0===t.button)&&e(t)}}(r):r;return n}function xA(e,t,r,n){return function(e,t,r,n){return e.addEventListener(t,r,n),()=>{e.removeEventListener(t,r,n)}}(e,t,yA(r,"pointerdown"===t),n)}var wA=Object.defineProperty,kA=(e,t,r)=>(((e,t,r)=>{t in e?wA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r),SA=class{constructor(e,t,r){var n;if(kA(this,"history",[]),kA(this,"startEvent",null),kA(this,"lastEvent",null),kA(this,"lastEventInfo",null),kA(this,"handlers",{}),kA(this,"removeListeners",(()=>{})),kA(this,"threshold",3),kA(this,"win"),kA(this,"updatePoint",(()=>{if(!this.lastEvent||!this.lastEventInfo)return;const e=EA(this.lastEventInfo,this.history),t=null!==this.startEvent,r=function(e,t){if("number"==typeof e&&"number"==typeof t)return AA(e,t);if(TA(e)&&TA(t)){const r=AA(e.x,t.x),n=AA(e.y,t.y);return Math.sqrt(r**2+n**2)}return 0}(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!r)return;const{timestamp:n}=Ju();this.history.push({...e.point,timestamp:n});const{onStart:o,onMove:i}=this.handlers;t||(null==o||o(this.lastEvent,e),this.startEvent=this.lastEvent),null==i||i(this.lastEvent,e)})),kA(this,"onPointerMove",((e,t)=>{this.lastEvent=e,this.lastEventInfo=t,Yu.update(this.updatePoint,!0)})),kA(this,"onPointerUp",((e,t)=>{const r=EA(t,this.history),{onEnd:n,onSessionEnd:o}=this.handlers;null==o||o(e,r),this.end(),n&&this.startEvent&&(null==n||n(e,r))})),this.win=null!=(n=e.view)?n:window,function(e){return gA(e)&&e.touches.length>1}(e))return;this.handlers=t,r&&(this.threshold=r),e.stopPropagation(),e.preventDefault();const o={point:bA(e)},{timestamp:i}=Ju();this.history=[{...o.point,timestamp:i}];const{onSessionStart:a}=t;null==a||a(e,EA(o,this.history)),this.removeListeners=function(...e){return t=>e.reduce(((e,t)=>t(e)),t)}(xA(this.win,"pointermove",this.onPointerMove),xA(this.win,"pointerup",this.onPointerUp),xA(this.win,"pointercancel",this.onPointerUp))}updateHandlers(e){this.handlers=e}end(){var e;null==(e=this.removeListeners)||e.call(this),Gu.update(this.updatePoint)}};function CA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function EA(e,t){return{point:e.point,delta:CA(e.point,t[t.length-1]),offset:CA(e.point,t[0]),velocity:PA(t,.1)}}var _A=e=>1e3*e;function PA(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const o=e[e.length-1];for(;r>=0&&(n=e[r],!(o.timestamp-n.timestamp>_A(t)));)r--;if(!n)return{x:0,y:0};const i=(o.timestamp-n.timestamp)/1e3;if(0===i)return{x:0,y:0};const a={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function AA(e,t){return Math.abs(e-t)}function TA(e){return"x"in e&&"y"in e}function jA(e){const t=i.useRef(null);return t.current=e,t}var RA=Boolean(null==globalThis?void 0:globalThis.document)?i.useLayoutEffect:i.useEffect;function OA({getNodes:e,observeMutation:t=!0}){const[r,n]=i.useState([]),[o,a]=i.useState(0);return RA((()=>{const r=e(),o=r.map(((e,t)=>function(e,t){var r;if(!e)return void t(void 0);t({width:e.offsetWidth,height:e.offsetHeight});const n=new(null!==(r=e.ownerDocument.defaultView)&&void 0!==r?r:window).ResizeObserver((r=>{if(!Array.isArray(r)||!r.length)return;const[n]=r;let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;t({width:o,height:i})}));return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}(e,(e=>{n((r=>[...r.slice(0,t),e,...r.slice(t+1)]))}))));if(t){const e=r[0];o.push(function(e,t){var r,n;if(!e||!e.parentElement)return;const o=new(null!=(n=null==(r=e.ownerDocument)?void 0:r.defaultView)?n:window).MutationObserver((()=>{t()}));return o.observe(e.parentElement,{childList:!0}),()=>{o.disconnect()}}(e,(()=>{a((e=>e+1))})))}return()=>{o.forEach((e=>{null==e||e()}))}}),[o]),r}function MA(e){var t;const{min:r=0,max:n=100,onChange:o,value:a,defaultValue:s,isReversed:l,direction:c="ltr",orientation:u="horizontal",id:d,isDisabled:p,isReadOnly:f,onChangeStart:h,onChangeEnd:m,step:v=1,getAriaValueText:g,"aria-valuetext":b,"aria-label":y,"aria-labelledby":x,name:w,focusThumbOnChange:k=!0,...S}=e,C=Fd(h),E=Fd(m),_=Fd(g),P=function(e){const{isReversed:t,direction:r,orientation:n}=e;return"ltr"===r||"vertical"===n?t:!t}({isReversed:l,direction:c,orientation:u}),[A,T]=qy({value:a,defaultValue:null!=s?s:NA(r,n),onChange:o}),[j,R]=i.useState(!1),[O,M]=i.useState(!1),I=!(p||f),N=(n-r)/10,D=v||(n-r)/100,z=_w(A,r,n),B=Cw(P?n-z+r:z,r,n),F="vertical"===u,L=jA({min:r,max:n,step:v,isDisabled:p,value:z,isInteractive:I,isReversed:P,isVertical:F,eventSource:null,focusThumbOnChange:k,orientation:u}),$=i.useRef(null),V=i.useRef(null),W=i.useRef(null),H=i.useId(),U=null!=d?d:H,[q,X]=[`slider-thumb-${U}`,`slider-track-${U}`],Y=i.useCallback((e=>{var t,r;if(!$.current)return;const n=L.current;n.eventSource="pointer";const o=$.current.getBoundingClientRect(),{clientX:i,clientY:a}=null!=(r=null==(t=e.touches)?void 0:t[0])?r:e;let s=(F?o.bottom-a:i-o.left)/(F?o.height:o.width);P&&(s=1-s);let l=function(e,t,r){return(r-t)*e+t}(s,n.min,n.max);return n.step&&(l=parseFloat(Ew(l,n.min,n.step))),l=_w(l,n.min,n.max),l}),[F,P,L]),G=i.useCallback((e=>{const t=L.current;t.isInteractive&&(e=_w(e=parseFloat(Ew(e,t.min,D)),t.min,t.max),T(e))}),[D,T,L]),K=i.useMemo((()=>({stepUp(e=D){G(P?z-e:z+e)},stepDown(e=D){G(P?z+e:z-e)},reset(){G(s||0)},stepTo(e){G(e)}})),[G,P,z,D,s]),Z=i.useCallback((e=>{const t=L.current,r={ArrowRight:()=>K.stepUp(),ArrowUp:()=>K.stepUp(),ArrowLeft:()=>K.stepDown(),ArrowDown:()=>K.stepDown(),PageUp:()=>K.stepUp(N),PageDown:()=>K.stepDown(N),Home:()=>G(t.min),End:()=>G(t.max)}[e.key];r&&(e.preventDefault(),e.stopPropagation(),r(e),t.eventSource="keyboard")}),[K,G,N,L]),Q=null!=(t=null==_?void 0:_(z))?t:b,J=function(e){const[t]=OA({observeMutation:!1,getNodes(){var t;return["object"==typeof(t=e)&&null!==t&&"current"in t?e.current:e]}});return t}(V),{getThumbStyle:ee,rootStyle:te,trackStyle:re,innerTrackStyle:ne}=i.useMemo((()=>{const e=L.current,t=null!=J?J:{width:0,height:0};return function(e){const{orientation:t,thumbPercents:r,thumbRects:n,isReversed:o}=e,i="vertical"===t?n.reduce(((e,t)=>mA(e).height>mA(t).height?e:t),hA):n.reduce(((e,t)=>mA(e).width>mA(t).width?e:t),hA),a={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...fA({orientation:t,vertical:i?{paddingLeft:i.width/2,paddingRight:i.width/2}:{},horizontal:i?{paddingTop:i.height/2,paddingBottom:i.height/2}:{}})},s={position:"absolute",...fA({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},l=1===r.length,c=[0,o?100-r[0]:r[0]],u=l?c:r;let d=u[0];!l&&o&&(d=100-d);const p=Math.abs(u[u.length-1]-u[0]);return{trackStyle:s,innerTrackStyle:{...s,...fA({orientation:t,vertical:o?{height:`${p}%`,top:`${d}%`}:{height:`${p}%`,bottom:`${d}%`},horizontal:o?{width:`${p}%`,right:`${d}%`}:{width:`${p}%`,left:`${d}%`}})},rootStyle:a,getThumbStyle:e=>{var o;const i=null!=(o=n[e])?o:hA;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...fA({orientation:t,vertical:{bottom:`calc(${r[e]}% - ${i.height/2}px)`},horizontal:{left:`calc(${r[e]}% - ${i.width/2}px)`}})}}}}({isReversed:P,orientation:e.orientation,thumbRects:[t],thumbPercents:[B]})}),[P,J,B,L]),oe=i.useCallback((()=>{L.current.focusThumbOnChange&&setTimeout((()=>{var e;return null==(e=V.current)?void 0:e.focus()}))}),[L]);function ie(e){const t=Y(e);null!=t&&t!==L.current.value&&T(t)}Ld((()=>{const e=L.current;oe(),"keyboard"===e.eventSource&&(null==E||E(e.value))}),[z,E]),function(e,t){const{onPan:r,onPanStart:n,onPanEnd:o,onPanSessionStart:a,onPanSessionEnd:s,threshold:l}=t,c=Boolean(r||n||o||a||s),u=i.useRef(null),d=jA({onSessionStart:a,onSessionEnd:s,onStart:n,onMove:r,onEnd(e,t){u.current=null,null==o||o(e,t)}});i.useEffect((()=>{var e;null==(e=u.current)||e.updateHandlers(d.current)})),i.useEffect((()=>{const t=e.current;if(t&&c)return xA(t,"pointerdown",(function(e){u.current=new SA(e,d.current,l)}))}),[e,c,d,l]),i.useEffect((()=>()=>{var e;null==(e=u.current)||e.end(),u.current=null}),[])}(W,{onPanSessionStart(e){const t=L.current;t.isInteractive&&(R(!0),oe(),ie(e),null==C||C(t.value))},onPanSessionEnd(){const e=L.current;e.isInteractive&&(R(!1),null==E||E(e.value))},onPan(e){L.current.isInteractive&&ie(e)}});const ae=i.useCallback(((e={},t=null)=>({...e,...S,ref:My(t,W),tabIndex:-1,"aria-disabled":uA(p),"data-focused":cA(O),style:{...e.style,...te}})),[S,p,O,te]),se=i.useCallback(((e={},t=null)=>({...e,ref:My(t,$),id:X,"data-disabled":cA(p),style:{...e.style,...re}})),[p,X,re]),le=i.useCallback(((e={},t=null)=>({...e,ref:t,style:{...e.style,...ne}})),[ne]),ce=i.useCallback(((e={},t=null)=>({...e,ref:My(t,V),role:"slider",tabIndex:I?0:void 0,id:q,"data-active":cA(j),"aria-valuetext":Q,"aria-valuemin":r,"aria-valuemax":n,"aria-valuenow":z,"aria-orientation":u,"aria-disabled":uA(p),"aria-readonly":uA(f),"aria-label":y,"aria-labelledby":y?void 0:x,style:{...e.style,...ee(0)},onKeyDown:pA(e.onKeyDown,Z),onFocus:pA(e.onFocus,(()=>M(!0))),onBlur:pA(e.onBlur,(()=>M(!1)))})),[I,q,j,Q,r,n,z,u,p,f,y,x,ee,Z]),ue=i.useCallback(((e,t=null)=>{const o=!(e.valuen),i=z>=e.value,a=Cw(e.value,r,n),s={position:"absolute",pointerEvents:"none",...IA({orientation:u,vertical:{bottom:P?100-a+"%":`${a}%`},horizontal:{left:P?100-a+"%":`${a}%`}})};return{...e,ref:t,role:"presentation","aria-hidden":!0,"data-disabled":cA(p),"data-invalid":cA(!o),"data-highlighted":cA(i),style:{...e.style,...s}}}),[p,P,n,r,u,z]),de=i.useCallback(((e={},t=null)=>({...e,ref:t,type:"hidden",value:z,name:w})),[w,z]);return{state:{value:z,isFocused:O,isDragging:j},actions:K,getRootProps:ae,getTrackProps:se,getInnerTrackProps:le,getThumbProps:ce,getMarkerProps:ue,getInputProps:de}}function IA(e){const{orientation:t,vertical:r,horizontal:n}=e;return"vertical"===t?r:n}function NA(e,t){return t"}),[BA,FA]=Ct({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),LA=n("ag",Pd(((e,t)=>{var r;const n={...e,orientation:null!=(r=null==e?void 0:e.orientation)?r:"horizontal"},o=ud("Slider",n),i=Wn(n),{direction:a}=Dt();i.direction=a;const{getInputProps:s,getRootProps:l,...c}=MA(i),u=l(),d=s({},t);return y.jsx(DA,{value:c,children:y.jsx(BA,{value:o,children:y.jsxs(_d.div,{...u,className:dA("chakra-slider",n.className),__css:o.container,children:[n.children,y.jsx("input",{...d})]})})})})));LA.displayName="Slider";var $A=n("aj",Pd(((e,t)=>{const{getThumbProps:r}=zA(),n=FA(),o=r(e,t);return y.jsx(_d.div,{...o,className:dA("chakra-slider__thumb",e.className),__css:n.thumb})})));$A.displayName="SliderThumb";var VA=n("ah",Pd(((e,t)=>{const{getTrackProps:r}=zA(),n=FA(),o=r(e,t);return y.jsx(_d.div,{...o,className:dA("chakra-slider__track",e.className),__css:n.track})})));VA.displayName="SliderTrack";var WA=n("ai",Pd(((e,t)=>{const{getInnerTrackProps:r}=zA(),n=FA(),o=r(e,t);return y.jsx(_d.div,{...o,className:dA("chakra-slider__filled-track",e.className),__css:n.filledTrack})})));WA.displayName="SliderFilledTrack";var HA=Pd(((e,t)=>{const{getMarkerProps:r}=zA(),n=FA(),o=r(e,t);return y.jsx(_d.div,{...o,className:dA("chakra-slider__marker",e.className),__css:n.mark})}));HA.displayName="SliderMark";var UA=n("ak",Pd((function(e,t){const r=ud("Switch",e),{spacing:n="0.5rem",children:o,...a}=Wn(e),{getIndicatorProps:s,getInputProps:l,getCheckboxProps:c,getRootProps:u,getLabelProps:d}=hw(a),p=i.useMemo((()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container})),[r.container]),f=i.useMemo((()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track})),[r.track]),h=i.useMemo((()=>({userSelect:"none",marginStart:n,...r.label})),[n,r.label]);return y.jsxs(_d.label,{...u(),className:qt("chakra-switch",e.className),__css:p,children:[y.jsx("input",{className:"chakra-switch__input",...l({},t)}),y.jsx(_d.span,{...c(),className:"chakra-switch__track",__css:f,children:y.jsx(_d.span,{__css:r.thumb,className:"chakra-switch__thumb",...s()})}),o&&y.jsx(_d.span,{className:"chakra-switch__label",...d(),__css:h,children:o})]})})));UA.displayName="Switch";var[qA,XA]=Ct({name:"TableStylesContext",errorMessage:"useTableStyles returned is 'undefined'. Seems you forgot to wrap the components in \"
\" "}),YA=n("aO",Pd(((e,t)=>{const r=ud("Table",e),{className:n,layout:o,...i}=Wn(e);return y.jsx(qA,{value:r,children:y.jsx(_d.table,{ref:t,__css:{tableLayout:o,...r.table},className:qt("chakra-table",n),...i})})})));YA.displayName="Table";n("aP",Pd(((e,t)=>{const r=XA();return y.jsx(_d.thead,{...e,ref:t,__css:r.thead})}))),n("aQ",Pd(((e,t)=>{const r=XA();return y.jsx(_d.tr,{...e,ref:t,__css:r.tr})}))),n("aS",Pd(((e,t)=>{const r=XA();return y.jsx(_d.tbody,{...e,ref:t,__css:r.tbody})}))),n("aT",Pd((({isNumeric:e,...t},r)=>{const n=XA();return y.jsx(_d.td,{...t,ref:r,__css:n.td,"data-is-numeric":e})}))),n("aR",Pd((({isNumeric:e,...t},r)=>{const n=XA();return y.jsx(_d.th,{...t,ref:r,__css:n.th,"data-is-numeric":e})})));var[GA,KA]=Ct({name:"TagStylesContext",errorMessage:"useTagStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),ZA=n("ay",Pd(((e,t)=>{const r=ud("Tag",e),n=Wn(e),o={display:"inline-flex",verticalAlign:"top",alignItems:"center",maxWidth:"100%",...r.container};return y.jsx(GA,{value:r,children:y.jsx(_d.span,{ref:t,...n,__css:o})})})));ZA.displayName="Tag";var QA=n("aA",Pd(((e,t)=>{const r=KA();return y.jsx(_d.span,{ref:t,noOfLines:1,...e,__css:r.label})})));QA.displayName="TagLabel",Pd(((e,t)=>y.jsx(ry,{ref:t,verticalAlign:"top",marginEnd:"0.5rem",...e}))).displayName="TagLeftIcon",Pd(((e,t)=>y.jsx(ry,{ref:t,verticalAlign:"top",marginStart:"0.5rem",...e}))).displayName="TagRightIcon";var JA=e=>y.jsx(ry,{verticalAlign:"inherit",viewBox:"0 0 512 512",...e,children:y.jsx("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})});JA.displayName="TagCloseIcon";var eT=Pd(((e,t)=>{const{isDisabled:r,children:n,...o}=e,i={display:"flex",alignItems:"center",justifyContent:"center",outline:"0",...KA().closeButton};return y.jsx(_d.button,{ref:t,"aria-label":"close",...o,type:"button",disabled:r,__css:i,children:n||y.jsx(JA,{})})}));eT.displayName="TagCloseButton";var tT=["h","minH","height","minHeight"],rT=n("Q",Pd(((e,t)=>{const r=cd("Textarea",e),{className:n,rows:o,...i}=Wn(e),a=Kx(i),s=o?function(e,t=[]){const r=Object.assign({},e);for(const n of t)n in r&&delete r[n];return r}(r,tT):r;return y.jsx(_d.textarea,{ref:t,rows:o,...a,className:qt("chakra-textarea",n),__css:s})})));rT.displayName="Textarea";var nT={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}},oT=e=>{var t;return(null==(t=e.current)?void 0:t.ownerDocument)||document},iT=e=>{var t,r;return(null==(r=null==(t=e.current)?void 0:t.ownerDocument)?void 0:r.defaultView)||window};function aT(e={}){const{openDelay:t=0,closeDelay:r=0,closeOnClick:n=!0,closeOnMouseDown:o,closeOnScroll:a,closeOnPointerDown:s=o,closeOnEsc:l=!0,onOpen:c,onClose:u,placement:d,id:p,isOpen:f,defaultIsOpen:h,arrowSize:m=10,arrowShadowColor:v,arrowPadding:g,modifiers:b,isDisabled:y,gutter:x,offset:w,direction:k,...S}=e,{isOpen:C,onOpen:E,onClose:_}=VE({isOpen:f,defaultIsOpen:h,onOpen:c,onClose:u}),{referenceRef:P,getPopperProps:A,getArrowInnerProps:T,getArrowProps:j}=LE({enabled:C,placement:d,arrowPadding:g,modifiers:b,gutter:x,offset:w,direction:k}),R=i.useId(),O=`tooltip-${null!=p?p:R}`,M=i.useRef(null),I=i.useRef(),N=i.useCallback((()=>{I.current&&(clearTimeout(I.current),I.current=void 0)}),[]),D=i.useRef(),z=i.useCallback((()=>{D.current&&(clearTimeout(D.current),D.current=void 0)}),[]),B=i.useCallback((()=>{z(),_()}),[_,z]),F=function(e,t){return i.useEffect((()=>{const r=oT(e);return r.addEventListener(sT,t),()=>r.removeEventListener(sT,t)}),[t,e]),()=>{const t=oT(e),r=iT(e);t.dispatchEvent(new r.CustomEvent(sT))}}(M,B),L=i.useCallback((()=>{if(!y&&!I.current){C&&F();const e=iT(M);I.current=e.setTimeout(E,t)}}),[F,y,C,E,t]),$=i.useCallback((()=>{N();const e=iT(M);D.current=e.setTimeout(B,r)}),[r,B,N]),V=i.useCallback((()=>{C&&n&&$()}),[n,$,C]),W=i.useCallback((()=>{C&&s&&$()}),[s,$,C]),H=i.useCallback((e=>{C&&"Escape"===e.key&&$()}),[C,$]);jw((()=>oT(M)),"keydown",l?H:void 0),jw((()=>{if(!a)return null;const e=M.current;if(!e)return null;const t=uS(e);return"body"===t.localName?iT(M):t}),"scroll",(()=>{C&&a&&B()}),{passive:!0,capture:!0}),i.useEffect((()=>{y&&(N(),C&&_())}),[y,C,_,N]),i.useEffect((()=>()=>{N(),z()}),[N,z]),jw((()=>M.current),"pointerleave",$);const U=i.useCallback(((e={},t=null)=>{const r={...e,ref:My(M,t,P),onPointerEnter:Jt(e.onPointerEnter,(e=>{"touch"!==e.pointerType&&L()})),onClick:Jt(e.onClick,V),onPointerDown:Jt(e.onPointerDown,W),onFocus:Jt(e.onFocus,L),onBlur:Jt(e.onBlur,$),"aria-describedby":C?O:void 0};return r}),[L,$,W,C,O,V,P]),q=i.useCallback(((e={},t=null)=>A({...e,style:{...e.style,[iC.arrowSize.var]:m?`${m}px`:void 0,[iC.arrowShadowColor.var]:v}},t)),[A,m,v]),X=i.useCallback(((e={},t=null)=>{const r={...e.style,position:"relative",transformOrigin:iC.transformOrigin.varRef};return{ref:t,...S,...e,id:O,role:"tooltip",style:r}}),[S,O]);return{isOpen:C,show:L,hide:$,getTriggerProps:U,getTooltipProps:X,getTooltipPositionerProps:q,getArrowProps:j,getArrowInnerProps:T}}var sT="chakra-ui:close-tooltip";var lT=_d(Hb.div),cT=n("aM",Pd(((e,t)=>{var r,n;const o=cd("Tooltip",e),a=Wn(e),s=Dt(),{children:l,label:c,shouldWrapChildren:u,"aria-label":d,hasArrow:p,bg:f,portalProps:h,background:m,backgroundColor:v,bgColor:g,motionProps:b,...x}=a,w=null!=(n=null!=(r=null!=m?m:v)?r:f)?n:g;if(w){o.bg=w;const e=function(e,t,r){var n,o,i;return null!=(i=null==(o=null==(n=e.__cssMap)?void 0:n[`${t}.${r}`])?void 0:o.varRef)?i:r}(s,"colors",w);o[iC.arrowBg.var]=e}const k=aT({...x,direction:s.direction});let S;if("string"==typeof l||u)S=y.jsx(_d.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps(),children:l});else{const e=i.Children.only(l);S=i.cloneElement(e,k.getTriggerProps(e.props,e.ref))}const C=!!d,E=k.getTooltipProps({},t),_=C?function(e,t=[]){const r=Object.assign({},e);for(const n of t)n in r&&delete r[n];return r}(E,["role","id"]):E,P=function(e,t){const r={};for(const n of t)n in e&&(r[n]=e[n]);return r}(E,["role","id"]);return c?y.jsxs(y.Fragment,{children:[S,y.jsx(Zb,{children:k.isOpen&&y.jsx(Nt,{...h,children:y.jsx(_d.div,{...k.getTooltipPositionerProps(),__css:{zIndex:o.zIndex,pointerEvents:"none"},children:y.jsxs(lT,{variants:nT,initial:"exit",animate:"enter",exit:"exit",...b,..._,__css:o,children:[c,C&&y.jsx(_d.span,{srOnly:!0,...P,children:d}),p&&y.jsx(_d.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:y.jsx(_d.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:o.bg}})})]})})})})]}):y.jsx(y.Fragment,{children:l})})));cT.displayName="Tooltip";var uT={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},dT=n("a_",u.createContext&&u.createContext(uT)),pT=["attr","size","title"];function fT(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function hT(){return hT=Object.assign?Object.assign.bind():function(e){for(var t=1;tu.createElement(e.tag,vT({key:t},e.attr),bT(e.child))))}function yT(e){var t=t=>{var r,{attr:n,size:o,title:i}=e,a=fT(e,pT),s=o||t.size||"1em";return t.className&&(r=t.className),e.className&&(r=(r?r+" ":"")+e.className),u.createElement("svg",hT({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,a,{className:r,style:vT(vT({color:e.color||t.color},t.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),i&&u.createElement("title",null,i),e.children)};return void 0!==dT?u.createElement(dT.Consumer,null,(e=>t(e))):t(uT)}}}}))}(); diff --git a/assets/chakra-xNcrfRXW.js b/assets/chakra-xNcrfRXW.js deleted file mode 100644 index f5c55908..00000000 --- a/assets/chakra-xNcrfRXW.js +++ /dev/null @@ -1,16 +0,0 @@ -var Fu=Object.freeze,fy=Object.defineProperty;var Ss=(e,t)=>Fu(fy(e,"raw",{value:Fu(t||e.slice())}));import{r as f,R as Nu,a as Nh,g as jh,c as fa,b as At}from"./react-D-_si4LB.js";var Bh={exports:{}},ki={};/** - * @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 hy=f,py=Symbol.for("react.element"),my=Symbol.for("react.fragment"),gy=Object.prototype.hasOwnProperty,vy=hy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,by={key:!0,ref:!0,__self:!0,__source:!0};function zh(e,t,n){var r,o={},a=null,i=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)gy.call(t,r)&&!by.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:py,type:e,key:a,ref:i,props:o,_owner:vy.current}}ki.Fragment=my;ki.jsx=zh;ki.jsxs=zh;Bh.exports=ki;var b=Bh.exports;function yy(e){if(e.sheet)return e.sheet;for(var t=0;t0?et(Ur,--pt):0,Fr--,qe===10&&(Fr=1,_i--),qe}function vt(){return qe=pt2||_o(qe)>3?"":" "}function Ry(e,t){for(;--t&&vt()&&!(qe<48||qe>102||qe>57&&qe<65||qe>70&&qe<97););return Wo(e,Ma()+(t<6&&qt()==32&&vt()==32))}function bl(e){for(;vt();)switch(qe){case e:return pt;case 34:case 39:e!==34&&e!==39&&bl(qe);break;case 40:e===41&&bl(e);break;case 92:vt();break}return pt}function My(e,t){for(;vt()&&e+qe!==57;)if(e+qe===84&&qt()===47)break;return"/*"+Wo(t,pt-1)+"*"+Pi(e===47?e:vt())}function Oy(e){for(;!_o(qt());)vt();return Wo(e,pt)}function Dy(e){return Gh(Da("",null,null,null,[""],e=Uh(e),0,[0],e))}function Da(e,t,n,r,o,a,i,s,l){for(var c=0,u=0,d=i,h=0,p=0,g=0,m=1,v=1,S=1,x=0,w="",k=o,T=a,E=r,_=w;v;)switch(g=x,x=vt()){case 40:if(g!=108&&et(_,d-1)==58){vl(_+=we(Oa(x),"&","&\f"),"&\f")!=-1&&(S=-1);break}case 34:case 39:case 91:_+=Oa(x);break;case 9:case 10:case 13:case 32:_+=Iy(g);break;case 92:_+=Ry(Ma()-1,7);continue;case 47:switch(qt()){case 42:case 47:ha(Fy(My(vt(),Ma()),t,n),l);break;default:_+="/"}break;case 123*m:s[c++]=Wt(_)*S;case 125*m:case 59:case 0:switch(x){case 0:case 125:v=0;case 59+u:S==-1&&(_=we(_,/\f/g,"")),p>0&&Wt(_)-d&&ha(p>32?Bu(_+";",r,n,d-1):Bu(we(_," ","")+";",r,n,d-2),l);break;case 59:_+=";";default:if(ha(E=ju(_,t,n,c,u,o,s,w,k=[],T=[],d),a),x===123)if(u===0)Da(_,t,E,E,k,a,d,s,T);else switch(h===99&&et(_,3)===110?100:h){case 100:case 108:case 109:case 115:Da(e,E,E,r&&ha(ju(e,E,E,0,0,o,s,w,o,k=[],d),T),o,T,d,s,r?k:T);break;default:Da(_,E,E,E,[""],T,0,s,T)}}c=u=p=0,m=S=1,w=_="",d=i;break;case 58:d=1+Wt(_),p=g;default:if(m<1){if(x==123)--m;else if(x==125&&m++==0&&$y()==125)continue}switch(_+=Pi(x),x*m){case 38:S=u>0?1:(_+="\f",-1);break;case 44:s[c++]=(Wt(_)-1)*S,S=1;break;case 64:qt()===45&&(_+=Oa(vt())),h=qt(),u=d=Wt(w=_+=Oy(Ma())),x++;break;case 45:g===45&&Wt(_)==2&&(m=0)}}return a}function ju(e,t,n,r,o,a,i,s,l,c,u){for(var d=o-1,h=o===0?a:[""],p=uc(h),g=0,m=0,v=0;g0?h[S]+" "+x:we(x,/&\f/g,h[S])))&&(l[v++]=w);return Ti(e,t,n,o===0?lc:s,l,c,u)}function Fy(e,t,n){return Ti(e,t,n,Lh,Pi(Ay()),Po(e,2,-2),0)}function Bu(e,t,n,r){return Ti(e,t,n,cc,Po(e,0,r),Po(e,r+1,-1),r)}function _r(e,t){for(var n="",r=uc(e),o=0;o6)switch(et(e,t+1)){case 109:if(et(e,t+4)!==45)break;case 102:return we(e,/(.+:)(.+)-([^]+)/,"$1"+Se+"$2-$3$1"+ti+(et(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~vl(e,"stretch")?Kh(we(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(et(e,t+1)!==115)break;case 6444:switch(et(e,Wt(e)-3-(~vl(e,"!important")&&10))){case 107:return we(e,":",":"+Se)+e;case 101:return we(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Se+(et(e,14)===45?"inline-":"")+"box$3$1"+Se+"$2$3$1"+ot+"$2box$3")+e}break;case 5936:switch(et(e,t+11)){case 114:return Se+e+ot+we(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Se+e+ot+we(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Se+e+ot+we(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Se+e+ot+e+e}return e}var Uy=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case cc:t.return=Kh(t.value,t.length);break;case Vh:return _r([Zr(t,{value:we(t.value,"@","@"+Se)})],o);case lc:if(t.length)return Ey(t.props,function(a){switch(Ty(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return _r([Zr(t,{props:[we(a,/:(read-\w+)/,":"+ti+"$1")]})],o);case"::placeholder":return _r([Zr(t,{props:[we(a,/:(plac\w+)/,":"+Se+"input-$1")]}),Zr(t,{props:[we(a,/:(plac\w+)/,":"+ti+"$1")]}),Zr(t,{props:[we(a,/:(plac\w+)/,ot+"input-$1")]})],o)}return""})}},Gy=[Uy],qy=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var v=m.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var o=t.stylisPlugins||Gy,a={},i,s=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var v=m.getAttribute("data-emotion").split(" "),S=1;S=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var a0={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},i0=/[A-Z]|^ms/g,s0=/_EMO_([^_]+?)_([^]*?)_EMO_/g,tp=function(t){return t.charCodeAt(1)===45},Vu=function(t){return t!=null&&typeof t!="boolean"},ws=qh(function(e){return tp(e)?e:e.replace(i0,"-$&").toLowerCase()}),Wu=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(s0,function(r,o,a){return Ht={name:o,styles:a,next:Ht},o})}return a0[t]!==1&&!tp(t)&&typeof n=="number"&&n!==0?n+"px":n};function To(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Ht={name:n.name,styles:n.styles,next:Ht},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Ht={name:r.name,styles:r.styles,next:Ht},r=r.next;var o=n.styles+";";return o}return l0(e,t,n)}case"function":{if(e!==void 0){var a=Ht,i=n(e);return Ht=a,To(e,t,i)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function l0(e,t,n){var r="";if(Array.isArray(n))for(var o=0;ob.jsx(ji,{styles:ip}),Fh,g0=({scope:e=""})=>b.jsx(ji,{styles:ap(Fh||(Fh=Ss(['\n html {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n font-family: system-ui, sans-serif;\n -webkit-font-smoothing: antialiased;\n text-rendering: optimizeLegibility;\n -moz-osx-font-smoothing: grayscale;\n touch-action: manipulation;\n }\n\n body {\n position: relative;\n min-height: 100%;\n margin: 0;\n font-feature-settings: "kern";\n }\n\n '," :where(*, *::before, *::after) {\n border-width: 0;\n border-style: solid;\n box-sizing: border-box;\n word-wrap: break-word;\n }\n\n main {\n display: block;\n }\n\n "," hr {\n border-top-width: 1px;\n box-sizing: content-box;\n height: 0;\n overflow: visible;\n }\n\n "," :where(pre, code, kbd,samp) {\n font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;\n font-size: 1em;\n }\n\n "," a {\n background-color: transparent;\n color: inherit;\n text-decoration: inherit;\n }\n\n "," abbr[title] {\n border-bottom: none;\n text-decoration: underline;\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n\n "," :where(b, strong) {\n font-weight: bold;\n }\n\n "," small {\n font-size: 80%;\n }\n\n "," :where(sub,sup) {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n\n "," sub {\n bottom: -0.25em;\n }\n\n "," sup {\n top: -0.5em;\n }\n\n "," img {\n border-style: none;\n }\n\n "," :where(button, input, optgroup, select, textarea) {\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n }\n\n "," :where(button, input) {\n overflow: visible;\n }\n\n "," :where(button, select) {\n text-transform: none;\n }\n\n ",' :where(\n button::-moz-focus-inner,\n [type="button"]::-moz-focus-inner,\n [type="reset"]::-moz-focus-inner,\n [type="submit"]::-moz-focus-inner\n ) {\n border-style: none;\n padding: 0;\n }\n\n '," fieldset {\n padding: 0.35em 0.75em 0.625em;\n }\n\n "," legend {\n box-sizing: border-box;\n color: inherit;\n display: table;\n max-width: 100%;\n padding: 0;\n white-space: normal;\n }\n\n "," progress {\n vertical-align: baseline;\n }\n\n "," textarea {\n overflow: auto;\n }\n\n ",' :where([type="checkbox"], [type="radio"]) {\n box-sizing: border-box;\n padding: 0;\n }\n\n ',' input[type="number"]::-webkit-inner-spin-button,\n ',' input[type="number"]::-webkit-outer-spin-button {\n -webkit-appearance: none !important;\n }\n\n ',' input[type="number"] {\n -moz-appearance: textfield;\n }\n\n ',' input[type="search"] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n }\n\n ',' input[type="search"]::-webkit-search-decoration {\n -webkit-appearance: none !important;\n }\n\n '," ::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n }\n\n "," details {\n display: block;\n }\n\n "," summary {\n display: list-item;\n }\n\n template {\n display: none;\n }\n\n [hidden] {\n display: none !important;\n }\n\n "," :where(\n blockquote,\n dl,\n dd,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n hr,\n figure,\n p,\n pre\n ) {\n margin: 0;\n }\n\n "," button {\n background: transparent;\n padding: 0;\n }\n\n "," fieldset {\n margin: 0;\n padding: 0;\n }\n\n "," :where(ol, ul) {\n margin: 0;\n padding: 0;\n }\n\n "," textarea {\n resize: vertical;\n }\n\n ",' :where(button, [role="button"]) {\n cursor: pointer;\n }\n\n '," button::-moz-focus-inner {\n border: 0 !important;\n }\n\n "," table {\n border-collapse: collapse;\n }\n\n "," :where(h1, h2, h3, h4, h5, h6) {\n font-size: inherit;\n font-weight: inherit;\n }\n\n "," :where(button, input, optgroup, select, textarea) {\n padding: 0;\n line-height: inherit;\n color: inherit;\n }\n\n "," :where(img, svg, video, canvas, audio, iframe, embed, object) {\n display: block;\n }\n\n "," :where(img, video) {\n max-width: 100%;\n height: auto;\n }\n\n [data-js-focus-visible]\n :focus:not([data-focus-visible-added]):not(\n [data-focus-visible-disabled]\n ) {\n outline: none;\n box-shadow: none;\n }\n\n "," select::-ms-expand {\n display: none;\n }\n\n ","\n "])),e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,ip)});function v0(e,t){return"".concat(e," returned `undefined`. Seems you forgot to wrap component within ").concat(t)}function Te(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:i}=e,s=f.createContext(i);s.displayName=t;function l(){var c;const u=f.useContext(s);if(!u&&n){const d=new Error(a!=null?a:v0(r,o));throw d.name="ContextError",(c=Error.captureStackTrace)==null||c.call(Error,d,l),d}return u}return[s.Provider,l,s]}var[b0,y0]=Te({strict:!1,name:"PortalManagerContext"});function sp(e){const{children:t,zIndex:n}=e;return b.jsx(b0,{value:{zIndex:n},children:t})}sp.displayName="PortalManager";var Kt=globalThis!=null&&globalThis.document?f.useLayoutEffect:f.useEffect,[lp,x0]=Te({strict:!1,name:"PortalContext"}),mc="chakra-portal",S0=".chakra-portal",w0=e=>b.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),C0=e=>{const{appendToParentPortal:t,children:n}=e,[r,o]=f.useState(null),a=f.useRef(null),[,i]=f.useState({});f.useEffect(()=>i({}),[]);const s=x0(),l=y0();Kt(()=>{if(!r)return;const u=r.ownerDocument,d=t&&s!=null?s:u.body;if(!d)return;a.current=u.createElement("div"),a.current.className=mc,d.appendChild(a.current),i({});const h=a.current;return()=>{d.contains(h)&&d.removeChild(h)}},[r]);const c=l!=null&&l.zIndex?b.jsx(w0,{zIndex:l==null?void 0:l.zIndex,children:n}):n;return a.current?Nh.createPortal(b.jsx(lp,{value:a.current,children:c}),a.current):b.jsx("span",{ref:u=>{u&&o(u)}})},k0=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,o=n.current,a=o!=null?o:typeof window<"u"?document.body:void 0,i=f.useMemo(()=>{const l=o==null?void 0:o.ownerDocument.createElement("div");return l&&(l.className=mc),l},[o]),[,s]=f.useState({});return Kt(()=>s({}),[]),Kt(()=>{if(!(!i||!a))return a.appendChild(i),()=>{a.removeChild(i)}},[i,a]),a&&i?Nh.createPortal(b.jsx(lp,{value:r?i:null,children:t}),i):null};function Gr(e){const t={appendToParentPortal:!0,...e},{containerRef:n,...r}=t;return n?b.jsx(k0,{containerRef:n,...r}):b.jsx(C0,{...r})}Gr.className=mc;Gr.selector=S0;Gr.displayName="Portal";function Ho(){const e=f.useContext(Eo);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}var gc=f.createContext({});gc.displayName="ColorModeContext";function zi(){const e=f.useContext(gc);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}function nj(e,t){const{colorMode:n}=zi();return n==="dark"?t:e}var pa={light:"chakra-ui-light",dark:"chakra-ui-dark"};function P0(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const o=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,o==null||o()},setClassName(r){document.body.classList.add(r?pa.dark:pa.light),document.body.classList.remove(r?pa.light:pa.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){var o;return((o=n.query().matches)!=null?o:r==="dark")?"dark":"light"},addListener(r){const o=n.query(),a=i=>{r(i.matches?"dark":"light")};return typeof o.addListener=="function"?o.addListener(a):o.addEventListener("change",a),()=>{typeof o.removeListener=="function"?o.removeListener(a):o.removeEventListener("change",a)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var _0="chakra-ui-color-mode";function T0(e){return{ssr:!1,type:"localStorage",get(t){if(!(globalThis!=null&&globalThis.document))return t;let n;try{n=localStorage.getItem(e)||t}catch(r){}return n||t},set(t){try{localStorage.setItem(e,t)}catch(n){}}}}var E0=T0(_0),Gu=()=>{};function qu(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function cp(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:o,disableTransitionOnChange:a}={},colorModeManager:i=E0}=e,s=o==="dark"?"dark":"light",[l,c]=f.useState(()=>qu(i,s)),[u,d]=f.useState(()=>qu(i)),{getSystemTheme:h,setClassName:p,setDataset:g,addListener:m}=f.useMemo(()=>P0({preventTransition:a}),[a]),v=o==="system"&&!l?u:l,S=f.useCallback(k=>{const T=k==="system"?h():k;c(T),p(T==="dark"),g(T),i.set(T)},[i,h,p,g]);Kt(()=>{o==="system"&&d(h())},[]),f.useEffect(()=>{const k=i.get();if(k){S(k);return}if(o==="system"){S("system");return}S(s)},[i,s,o,S]);const x=f.useCallback(()=>{S(v==="dark"?"light":"dark")},[v,S]);f.useEffect(()=>{if(r)return m(S)},[r,m,S]);const w=f.useMemo(()=>({colorMode:t!=null?t:v,toggleColorMode:t?Gu:x,setColorMode:t?Gu:S,forced:t!==void 0}),[v,x,S,t]);return b.jsx(gc.Provider,{value:w,children:n})}cp.displayName="ColorModeProvider";function up(){const e=zi(),t=Ho();return{...e,theme:t}}var G=(...e)=>e.filter(Boolean).join(" ");function $t(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}var dp=e=>{};function Tt(e,...t){return A0(e)?e(...t):e}var A0=e=>typeof e=="function",le=e=>e?"":void 0,Tr=e=>e?!0:void 0;function J(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function vc(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}var ni={exports:{}};ni.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",o=800,a=16,i=9007199254740991,s="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",h="[object Error]",p="[object Function]",g="[object GeneratorFunction]",m="[object Map]",v="[object Number]",S="[object Null]",x="[object Object]",w="[object Proxy]",k="[object RegExp]",T="[object Set]",E="[object String]",_="[object Undefined]",I="[object WeakMap]",R="[object ArrayBuffer]",A="[object DataView]",O="[object Float32Array]",Y="[object Float64Array]",q="[object Int8Array]",K="[object Int16Array]",X="[object Int32Array]",U="[object Uint8Array]",M="[object Uint8ClampedArray]",B="[object Uint16Array]",re="[object Uint32Array]",oe=/[\\^$.*+?()[\]{}|]/g,te=/^\[object .+?Constructor\]$/,ve=/^(?:0|[1-9]\d*)$/,L={};L[O]=L[Y]=L[q]=L[K]=L[X]=L[U]=L[M]=L[B]=L[re]=!0,L[s]=L[l]=L[R]=L[u]=L[A]=L[d]=L[h]=L[p]=L[m]=L[v]=L[x]=L[k]=L[T]=L[E]=L[I]=!1;var V=typeof fa=="object"&&fa&&fa.Object===Object&&fa,W=typeof self=="object"&&self&&self.Object===Object&&self,ie=V||W||Function("return this")(),he=t&&!t.nodeType&&t,ce=he&&!0&&e&&!e.nodeType&&e,me=ce&&ce.exports===he,Pe=me&&V.process,be=function(){try{var y=ce&&ce.require&&ce.require("util").types;return y||Pe&&Pe.binding&&Pe.binding("util")}catch(P){}}(),ae=be&&be.isTypedArray;function Ae(y,P,$){switch($.length){case 0:return y.call(P);case 1:return y.call(P,$[0]);case 2:return y.call(P,$[0],$[1]);case 3:return y.call(P,$[0],$[1],$[2])}return y.apply(P,$)}function ge(y,P){for(var $=-1,H=Array(y);++$-1}function wb(y,P){var $=this.__data__,H=la($,y);return H<0?(++this.size,$.push([y,P])):$[H][1]=P,this}rn.prototype.clear=bb,rn.prototype.delete=yb,rn.prototype.get=xb,rn.prototype.has=Sb,rn.prototype.set=wb;function or(y){var P=-1,$=y==null?0:y.length;for(this.clear();++P<$;){var H=y[P];this.set(H[0],H[1])}}function Cb(){this.size=0,this.__data__={hash:new On,map:new(sa||rn),string:new On}}function kb(y){var P=ua(this,y).delete(y);return this.size-=P?1:0,P}function Pb(y){return ua(this,y).get(y)}function _b(y){return ua(this,y).has(y)}function Tb(y,P){var $=ua(this,y),H=$.size;return $.set(y,P),this.size+=$.size==H?0:1,this}or.prototype.clear=Cb,or.prototype.delete=kb,or.prototype.get=Pb,or.prototype.has=_b,or.prototype.set=Tb;function ar(y){var P=this.__data__=new rn(y);this.size=P.size}function Eb(){this.__data__=new rn,this.size=0}function Ab(y){var P=this.__data__,$=P.delete(y);return this.size=P.size,$}function $b(y){return this.__data__.get(y)}function Ib(y){return this.__data__.has(y)}function Rb(y,P){var $=this.__data__;if($ instanceof rn){var H=$.__data__;if(!sa||H.length1?$[pe-1]:void 0,Ne=pe>2?$[2]:void 0;for($e=y.length>3&&typeof $e=="function"?(pe--,$e):void 0,Ne&&Zb($[0],$[1],Ne)&&($e=pe<3?void 0:$e,pe=1),P=Object(P);++H-1&&y%1==0&&y0){if(++P>=o)return arguments[0]}else P=0;return y.apply(void 0,arguments)}}function ay(y){if(y!=null){try{return rt.call(y)}catch(P){}try{return y+""}catch(P){}}return""}function da(y,P){return y===P||y!==y&&P!==P}var ms=_u(function(){return arguments}())?_u:function(y){return Xr(y)&&Ze.call(y,"callee")&&!ne.call(y,"callee")},gs=Array.isArray;function vs(y){return y!=null&&Iu(y.length)&&!bs(y)}function iy(y){return Xr(y)&&vs(y)}var $u=Kr||dy;function bs(y){if(!Dn(y))return!1;var P=ca(y);return P==p||P==g||P==c||P==w}function Iu(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=i}function Dn(y){var P=typeof y;return y!=null&&(P=="object"||P=="function")}function Xr(y){return y!=null&&typeof y=="object"}function sy(y){if(!Xr(y)||ca(y)!=x)return!1;var P=Qe(y);if(P===null)return!0;var $=Ze.call(P,"constructor")&&P.constructor;return typeof $=="function"&&$ instanceof $&&rt.call($)==bn}var Ru=ae?j(ae):Nb;function ly(y){return Gb(y,Mu(y))}function Mu(y){return vs(y)?Mb(y):jb(y)}var cy=qb(function(y,P,$,H){Tu(y,P,$,H)});function uy(y){return function(){return y}}function Ou(y){return y}function dy(){return!1}e.exports=cy})(ni,ni.exports);var $0=ni.exports;const Et=jh($0);var I0=e=>/!(important)?$/.test(e),Ku=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,R0=(e,t)=>n=>{const r=String(t),o=I0(r),a=Ku(r),i=e?"".concat(e,".").concat(a):a;let s=$t(n.__cssMap)&&i in n.__cssMap?n.__cssMap[i].varRef:t;return s=Ku(s),o?"".concat(s," !important"):s};function bc(e){const{scale:t,transform:n,compose:r}=e;return(a,i)=>{var s;const l=R0(t,a)(i);let c=(s=n==null?void 0:n(l,i))!=null?s:l;return r&&(c=r(c,i)),c}}var ma=(...e)=>t=>e.reduce((n,r)=>r(n),t);function kt(e,t){return n=>{const r={property:n,scale:e};return r.transform=bc({scale:e,transform:t}),r}}var M0=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function O0(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:M0(t),transform:n?bc({scale:n,compose:r}):r}}var fp=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function D0(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...fp].join(" ")}function F0(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...fp].join(" ")}var N0={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},j0={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function B0(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var z0={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},yl={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},L0=new Set(Object.values(yl)),xl=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),V0=e=>e.trim();function W0(e,t){if(e==null||xl.has(e))return e;if(!(Sl(e)||xl.has(e)))return"url('".concat(e,"')");const o=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),a=o==null?void 0:o[1],i=o==null?void 0:o[2];if(!a||!i)return e;const s=a.includes("-gradient")?a:"".concat(a,"-gradient"),[l,...c]=i.split(",").map(V0).filter(Boolean);if((c==null?void 0:c.length)===0)return e;const u=l in yl?yl[l]:l;c.unshift(u);const d=c.map(h=>{if(L0.has(h))return h;const p=h.indexOf(" "),[g,m]=p!==-1?[h.substr(0,p),h.substr(p+1)]:[h],v=Sl(m)?m:m&&m.split(" "),S="colors.".concat(g),x=S in t.__cssMap?t.__cssMap[S].varRef:g;return v?[x,...Array.isArray(v)?v:[v]].join(" "):x});return"".concat(s,"(").concat(d.join(", "),")")}var Sl=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),H0=(e,t)=>W0(e,t!=null?t:{});function U0(e){return/^var\(--.+\)$/.test(e)}var G0=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},zt=e=>t=>"".concat(e,"(").concat(t,")"),fe={filter(e){return e!=="auto"?e:N0},backdropFilter(e){return e!=="auto"?e:j0},ring(e){return B0(fe.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?D0():e==="auto-gpu"?F0():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=G0(e);return t||typeof e=="number"?"".concat(e,"px"):e},fraction(e){return typeof e!="number"||e>1?e:"".concat(e*100,"%")},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(U0(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?"".concat(e,"deg"):e},gradient:H0,blur:zt("blur"),opacity:zt("opacity"),brightness:zt("brightness"),contrast:zt("contrast"),dropShadow:zt("drop-shadow"),grayscale:zt("grayscale"),hueRotate:e=>zt("hue-rotate")(fe.degree(e)),invert:zt("invert"),saturate:zt("saturate"),sepia:zt("sepia"),bgImage(e){return e==null||Sl(e)||xl.has(e)?e:"url(".concat(e,")")},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;const{space:n,divide:r}=(t=z0[e])!=null?t:{},o={flexDirection:e};return n&&(o[n]=1),r&&(o[r]=1),o}},C={borderWidths:kt("borderWidths"),borderStyles:kt("borderStyles"),colors:kt("colors"),borders:kt("borders"),gradients:kt("gradients",fe.gradient),radii:kt("radii",fe.px),space:kt("space",ma(fe.vh,fe.px)),spaceT:kt("space",ma(fe.vh,fe.px)),degreeT(e){return{property:e,transform:fe.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:bc({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:kt("sizes",ma(fe.vh,fe.px)),sizesT:kt("sizes",ma(fe.vh,fe.fraction)),shadows:kt("shadows"),logical:O0,blur:kt("blur",fe.blur)},Fa={background:C.colors("background"),backgroundColor:C.colors("backgroundColor"),backgroundImage:C.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:fe.bgClip},bgSize:C.prop("backgroundSize"),bgPosition:C.prop("backgroundPosition"),bg:C.colors("background"),bgColor:C.colors("backgroundColor"),bgPos:C.prop("backgroundPosition"),bgRepeat:C.prop("backgroundRepeat"),bgAttachment:C.prop("backgroundAttachment"),bgGradient:C.gradients("backgroundImage"),bgClip:{transform:fe.bgClip}};Object.assign(Fa,{bgImage:Fa.backgroundImage,bgImg:Fa.backgroundImage});var xe={border:C.borders("border"),borderWidth:C.borderWidths("borderWidth"),borderStyle:C.borderStyles("borderStyle"),borderColor:C.colors("borderColor"),borderRadius:C.radii("borderRadius"),borderTop:C.borders("borderTop"),borderBlockStart:C.borders("borderBlockStart"),borderTopLeftRadius:C.radii("borderTopLeftRadius"),borderStartStartRadius:C.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:C.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:C.radii("borderTopRightRadius"),borderStartEndRadius:C.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:C.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:C.borders("borderRight"),borderInlineEnd:C.borders("borderInlineEnd"),borderBottom:C.borders("borderBottom"),borderBlockEnd:C.borders("borderBlockEnd"),borderBottomLeftRadius:C.radii("borderBottomLeftRadius"),borderBottomRightRadius:C.radii("borderBottomRightRadius"),borderLeft:C.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:C.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:C.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:C.borders(["borderLeft","borderRight"]),borderInline:C.borders("borderInline"),borderY:C.borders(["borderTop","borderBottom"]),borderBlock:C.borders("borderBlock"),borderTopWidth:C.borderWidths("borderTopWidth"),borderBlockStartWidth:C.borderWidths("borderBlockStartWidth"),borderTopColor:C.colors("borderTopColor"),borderBlockStartColor:C.colors("borderBlockStartColor"),borderTopStyle:C.borderStyles("borderTopStyle"),borderBlockStartStyle:C.borderStyles("borderBlockStartStyle"),borderBottomWidth:C.borderWidths("borderBottomWidth"),borderBlockEndWidth:C.borderWidths("borderBlockEndWidth"),borderBottomColor:C.colors("borderBottomColor"),borderBlockEndColor:C.colors("borderBlockEndColor"),borderBottomStyle:C.borderStyles("borderBottomStyle"),borderBlockEndStyle:C.borderStyles("borderBlockEndStyle"),borderLeftWidth:C.borderWidths("borderLeftWidth"),borderInlineStartWidth:C.borderWidths("borderInlineStartWidth"),borderLeftColor:C.colors("borderLeftColor"),borderInlineStartColor:C.colors("borderInlineStartColor"),borderLeftStyle:C.borderStyles("borderLeftStyle"),borderInlineStartStyle:C.borderStyles("borderInlineStartStyle"),borderRightWidth:C.borderWidths("borderRightWidth"),borderInlineEndWidth:C.borderWidths("borderInlineEndWidth"),borderRightColor:C.colors("borderRightColor"),borderInlineEndColor:C.colors("borderInlineEndColor"),borderRightStyle:C.borderStyles("borderRightStyle"),borderInlineEndStyle:C.borderStyles("borderInlineEndStyle"),borderTopRadius:C.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:C.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:C.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:C.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(xe,{rounded:xe.borderRadius,roundedTop:xe.borderTopRadius,roundedTopLeft:xe.borderTopLeftRadius,roundedTopRight:xe.borderTopRightRadius,roundedTopStart:xe.borderStartStartRadius,roundedTopEnd:xe.borderStartEndRadius,roundedBottom:xe.borderBottomRadius,roundedBottomLeft:xe.borderBottomLeftRadius,roundedBottomRight:xe.borderBottomRightRadius,roundedBottomStart:xe.borderEndStartRadius,roundedBottomEnd:xe.borderEndEndRadius,roundedLeft:xe.borderLeftRadius,roundedRight:xe.borderRightRadius,roundedStart:xe.borderInlineStartRadius,roundedEnd:xe.borderInlineEndRadius,borderStart:xe.borderInlineStart,borderEnd:xe.borderInlineEnd,borderTopStartRadius:xe.borderStartStartRadius,borderTopEndRadius:xe.borderStartEndRadius,borderBottomStartRadius:xe.borderEndStartRadius,borderBottomEndRadius:xe.borderEndEndRadius,borderStartRadius:xe.borderInlineStartRadius,borderEndRadius:xe.borderInlineEndRadius,borderStartWidth:xe.borderInlineStartWidth,borderEndWidth:xe.borderInlineEndWidth,borderStartColor:xe.borderInlineStartColor,borderEndColor:xe.borderInlineEndColor,borderStartStyle:xe.borderInlineStartStyle,borderEndStyle:xe.borderInlineEndStyle});var q0={color:C.colors("color"),textColor:C.colors("color"),fill:C.colors("fill"),stroke:C.colors("stroke")},wl={boxShadow:C.shadows("boxShadow"),mixBlendMode:!0,blendMode:C.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:C.prop("backgroundBlendMode"),opacity:!0};Object.assign(wl,{shadow:wl.boxShadow});var K0={filter:{transform:fe.filter},blur:C.blur("--chakra-blur"),brightness:C.propT("--chakra-brightness",fe.brightness),contrast:C.propT("--chakra-contrast",fe.contrast),hueRotate:C.propT("--chakra-hue-rotate",fe.hueRotate),invert:C.propT("--chakra-invert",fe.invert),saturate:C.propT("--chakra-saturate",fe.saturate),dropShadow:C.propT("--chakra-drop-shadow",fe.dropShadow),backdropFilter:{transform:fe.backdropFilter},backdropBlur:C.blur("--chakra-backdrop-blur"),backdropBrightness:C.propT("--chakra-backdrop-brightness",fe.brightness),backdropContrast:C.propT("--chakra-backdrop-contrast",fe.contrast),backdropHueRotate:C.propT("--chakra-backdrop-hue-rotate",fe.hueRotate),backdropInvert:C.propT("--chakra-backdrop-invert",fe.invert),backdropSaturate:C.propT("--chakra-backdrop-saturate",fe.saturate)},ri={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:fe.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:C.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:C.space("gap"),rowGap:C.space("rowGap"),columnGap:C.space("columnGap")};Object.assign(ri,{flexDir:ri.flexDirection});var hp={gridGap:C.space("gridGap"),gridColumnGap:C.space("gridColumnGap"),gridRowGap:C.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},X0={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:fe.outline},outlineOffset:!0,outlineColor:C.colors("outlineColor")},_t={width:C.sizesT("width"),inlineSize:C.sizesT("inlineSize"),height:C.sizes("height"),blockSize:C.sizes("blockSize"),boxSize:C.sizes(["width","height"]),minWidth:C.sizes("minWidth"),minInlineSize:C.sizes("minInlineSize"),minHeight:C.sizes("minHeight"),minBlockSize:C.sizes("minBlockSize"),maxWidth:C.sizes("maxWidth"),maxInlineSize:C.sizes("maxInlineSize"),maxHeight:C.sizes("maxHeight"),maxBlockSize:C.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var n,r,o;const a=(o=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r.minW)!=null?o:e;return{["@media screen and (min-width: ".concat(a,")")]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var n,r,o;const a=(o=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r._minW)!=null?o:e;return{["@media screen and (max-width: ".concat(a,")")]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:C.propT("float",fe.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(_t,{w:_t.width,h:_t.height,minW:_t.minWidth,maxW:_t.maxWidth,minH:_t.minHeight,maxH:_t.maxHeight,overscroll:_t.overscrollBehavior,overscrollX:_t.overscrollBehaviorX,overscrollY:_t.overscrollBehaviorY});var Y0={listStyleType:!0,listStylePosition:!0,listStylePos:C.prop("listStylePosition"),listStyleImage:!0,listStyleImg:C.prop("listStyleImage")};function Z0(e,t,n,r){const o=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,o,a,i)=>{if(typeof r>"u")return e(r,o,a);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(o))return s.get(o);const l=e(r,o,a,i);return s.set(o,l),l}},J0=Q0(Z0),ex={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},tx={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Cs=(e,t,n)=>{const r={},o=J0(e,t,{});for(const a in o)a in n&&n[a]!=null||(r[a]=o[a]);return r},nx={srOnly:{transform(e){return e===!0?ex:e==="focusable"?tx:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>Cs(t,"layerStyles.".concat(e),n)},textStyle:{processResult:!0,transform:(e,t,n)=>Cs(t,"textStyles.".concat(e),n)},apply:{processResult:!0,transform:(e,t,n)=>Cs(t,e,n)}},ho={position:!0,pos:C.prop("position"),zIndex:C.prop("zIndex","zIndices"),inset:C.spaceT("inset"),insetX:C.spaceT(["left","right"]),insetInline:C.spaceT("insetInline"),insetY:C.spaceT(["top","bottom"]),insetBlock:C.spaceT("insetBlock"),top:C.spaceT("top"),insetBlockStart:C.spaceT("insetBlockStart"),bottom:C.spaceT("bottom"),insetBlockEnd:C.spaceT("insetBlockEnd"),left:C.spaceT("left"),insetInlineStart:C.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:C.spaceT("right"),insetInlineEnd:C.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(ho,{insetStart:ho.insetInlineStart,insetEnd:ho.insetInlineEnd});var rx={ring:{transform:fe.ring},ringColor:C.colors("--chakra-ring-color"),ringOffset:C.prop("--chakra-ring-offset-width"),ringOffsetColor:C.colors("--chakra-ring-offset-color"),ringInset:C.prop("--chakra-ring-inset")},Fe={margin:C.spaceT("margin"),marginTop:C.spaceT("marginTop"),marginBlockStart:C.spaceT("marginBlockStart"),marginRight:C.spaceT("marginRight"),marginInlineEnd:C.spaceT("marginInlineEnd"),marginBottom:C.spaceT("marginBottom"),marginBlockEnd:C.spaceT("marginBlockEnd"),marginLeft:C.spaceT("marginLeft"),marginInlineStart:C.spaceT("marginInlineStart"),marginX:C.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:C.spaceT("marginInline"),marginY:C.spaceT(["marginTop","marginBottom"]),marginBlock:C.spaceT("marginBlock"),padding:C.space("padding"),paddingTop:C.space("paddingTop"),paddingBlockStart:C.space("paddingBlockStart"),paddingRight:C.space("paddingRight"),paddingBottom:C.space("paddingBottom"),paddingBlockEnd:C.space("paddingBlockEnd"),paddingLeft:C.space("paddingLeft"),paddingInlineStart:C.space("paddingInlineStart"),paddingInlineEnd:C.space("paddingInlineEnd"),paddingX:C.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:C.space("paddingInline"),paddingY:C.space(["paddingTop","paddingBottom"]),paddingBlock:C.space("paddingBlock")};Object.assign(Fe,{m:Fe.margin,mt:Fe.marginTop,mr:Fe.marginRight,me:Fe.marginInlineEnd,marginEnd:Fe.marginInlineEnd,mb:Fe.marginBottom,ml:Fe.marginLeft,ms:Fe.marginInlineStart,marginStart:Fe.marginInlineStart,mx:Fe.marginX,my:Fe.marginY,p:Fe.padding,pt:Fe.paddingTop,py:Fe.paddingY,px:Fe.paddingX,pb:Fe.paddingBottom,pl:Fe.paddingLeft,ps:Fe.paddingInlineStart,paddingStart:Fe.paddingInlineStart,pr:Fe.paddingRight,pe:Fe.paddingInlineEnd,paddingEnd:Fe.paddingInlineEnd});var ox={textDecorationColor:C.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:C.shadows("textShadow")},ax={clipPath:!0,transform:C.propT("transform",fe.transform),transformOrigin:!0,translateX:C.spaceT("--chakra-translate-x"),translateY:C.spaceT("--chakra-translate-y"),skewX:C.degreeT("--chakra-skew-x"),skewY:C.degreeT("--chakra-skew-y"),scaleX:C.prop("--chakra-scale-x"),scaleY:C.prop("--chakra-scale-y"),scale:C.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:C.degreeT("--chakra-rotate")},ix={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:C.prop("transitionDuration","transition.duration"),transitionProperty:C.prop("transitionProperty","transition.property"),transitionTimingFunction:C.prop("transitionTimingFunction","transition.easing")},sx={fontFamily:C.prop("fontFamily","fonts"),fontSize:C.prop("fontSize","fontSizes",fe.px),fontWeight:C.prop("fontWeight","fontWeights"),lineHeight:C.prop("lineHeight","lineHeights"),letterSpacing:C.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(e===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},lx={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:C.spaceT("scrollMargin"),scrollMarginTop:C.spaceT("scrollMarginTop"),scrollMarginBottom:C.spaceT("scrollMarginBottom"),scrollMarginLeft:C.spaceT("scrollMarginLeft"),scrollMarginRight:C.spaceT("scrollMarginRight"),scrollMarginX:C.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:C.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:C.spaceT("scrollPadding"),scrollPaddingTop:C.spaceT("scrollPaddingTop"),scrollPaddingBottom:C.spaceT("scrollPaddingBottom"),scrollPaddingLeft:C.spaceT("scrollPaddingLeft"),scrollPaddingRight:C.spaceT("scrollPaddingRight"),scrollPaddingX:C.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:C.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function pp(e){return $t(e)&&e.reference?e.reference:String(e)}var Li=(e,...t)=>t.map(pp).join(" ".concat(e," ")).replace(/calc/g,""),Xu=(...e)=>"calc(".concat(Li("+",...e),")"),Yu=(...e)=>"calc(".concat(Li("-",...e),")"),Cl=(...e)=>"calc(".concat(Li("*",...e),")"),Zu=(...e)=>"calc(".concat(Li("/",...e),")"),Qu=e=>{const t=pp(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):"-".concat(t):Cl(t,-1)},zn=Object.assign(e=>({add:(...t)=>zn(Xu(e,...t)),subtract:(...t)=>zn(Yu(e,...t)),multiply:(...t)=>zn(Cl(e,...t)),divide:(...t)=>zn(Zu(e,...t)),negate:()=>zn(Qu(e)),toString:()=>e.toString()}),{add:Xu,subtract:Yu,multiply:Cl,divide:Zu,negate:Qu});function cx(e,t="-"){return e.replace(/\s+/g,t)}function ux(e){const t=cx(e.toString());return fx(dx(t))}function dx(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function fx(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function hx(e,t=""){return[t,e].filter(Boolean).join("-")}function px(e,t){return"var(".concat(e).concat(t?", ".concat(t):"",")")}function mx(e,t=""){return ux("--".concat(hx(e,t)))}function Q(e,t,n){const r=mx(e,n);return{variable:r,reference:px(r,t)}}function gx(e,t){const n={};for(const r of t){if(Array.isArray(r)){const[o,a]=r;n[o]=Q("".concat(e,"-").concat(o),a);continue}n[r]=Q("".concat(e,"-").concat(r))}return n}function vx(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function bx(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function kl(e){if(e==null)return e;const{unitless:t}=bx(e);return t||typeof e=="number"?"".concat(e,"px"):e}var mp=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,yc=e=>Object.fromEntries(Object.entries(e).sort(mp));function Ju(e){const t=yc(e);return Object.assign(Object.values(t),t)}function yx(e){const t=Object.keys(yc(e));return new Set(t)}function ed(e){var t;if(!e)return e;e=(t=kl(e))!=null?t:e;const n=-.02;return typeof e=="number"?"".concat(e+n):e.replace(/(\d+\.?\d*)/u,r=>"".concat(parseFloat(r)+n))}function oo(e,t){const n=["@media screen"];return e&&n.push("and","(min-width: ".concat(kl(e),")")),t&&n.push("and","(max-width: ".concat(kl(t),")")),n.join(" ")}function xx(e){var t;if(!e)return null;e.base=(t=e.base)!=null?t:"0px";const n=Ju(e),r=Object.entries(e).sort(mp).map(([i,s],l,c)=>{var u;let[,d]=(u=c[l+1])!=null?u:[];return d=parseFloat(d)>0?ed(d):void 0,{_minW:ed(s),breakpoint:i,minW:s,maxW:d,maxWQuery:oo(null,d),minWQuery:oo(s),minMaxQuery:oo(s,d)}}),o=yx(e),a=Array.from(o.values());return{keys:o,normalized:n,isResponsive(i){const s=Object.keys(i);return s.length>0&&s.every(l=>o.has(l))},asObject:yc(e),asArray:Ju(e),details:r,get(i){return r.find(s=>s.breakpoint===i)},media:[null,...n.map(i=>oo(i)).slice(1)],toArrayValue(i){if(!$t(i))throw new Error("toArrayValue: value must be an object");const s=a.map(l=>{var c;return(c=i[l])!=null?c:null});for(;vx(s)===null;)s.pop();return s},toObjectValue(i){if(!Array.isArray(i))throw new Error("toObjectValue: value must be an array");return i.reduce((s,l,c)=>{const u=a[c];return u!=null&&l!=null&&(s[u]=l),s},{})}}}var Je={hover:(e,t)=>"".concat(e,":hover ").concat(t,", ").concat(e,"[data-hover] ").concat(t),focus:(e,t)=>"".concat(e,":focus ").concat(t,", ").concat(e,"[data-focus] ").concat(t),focusVisible:(e,t)=>"".concat(e,":focus-visible ").concat(t),focusWithin:(e,t)=>"".concat(e,":focus-within ").concat(t),active:(e,t)=>"".concat(e,":active ").concat(t,", ").concat(e,"[data-active] ").concat(t),disabled:(e,t)=>"".concat(e,":disabled ").concat(t,", ").concat(e,"[data-disabled] ").concat(t),invalid:(e,t)=>"".concat(e,":invalid ").concat(t,", ").concat(e,"[data-invalid] ").concat(t),checked:(e,t)=>"".concat(e,":checked ").concat(t,", ").concat(e,"[data-checked] ").concat(t),indeterminate:(e,t)=>"".concat(e,":indeterminate ").concat(t,", ").concat(e,"[aria-checked=mixed] ").concat(t,", ").concat(e,"[data-indeterminate] ").concat(t),readOnly:(e,t)=>"".concat(e,":read-only ").concat(t,", ").concat(e,"[readonly] ").concat(t,", ").concat(e,"[data-read-only] ").concat(t),expanded:(e,t)=>"".concat(e,":read-only ").concat(t,", ").concat(e,"[aria-expanded=true] ").concat(t,", ").concat(e,"[data-expanded] ").concat(t),placeholderShown:(e,t)=>"".concat(e,":placeholder-shown ").concat(t)},xn=e=>gp(t=>e(t,"&"),"[role=group]","[data-group]",".group"),on=e=>gp(t=>e(t,"~ &"),"[data-peer]",".peer"),gp=(e,...t)=>t.map(e).join(", "),Vi={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:xn(Je.hover),_peerHover:on(Je.hover),_groupFocus:xn(Je.focus),_peerFocus:on(Je.focus),_groupFocusVisible:xn(Je.focusVisible),_peerFocusVisible:on(Je.focusVisible),_groupActive:xn(Je.active),_peerActive:on(Je.active),_groupDisabled:xn(Je.disabled),_peerDisabled:on(Je.disabled),_groupInvalid:xn(Je.invalid),_peerInvalid:on(Je.invalid),_groupChecked:xn(Je.checked),_peerChecked:on(Je.checked),_groupFocusWithin:xn(Je.focusWithin),_peerFocusWithin:on(Je.focusWithin),_peerPlaceholderShown:on(Je.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},vp=Object.keys(Vi);function td(e,t){return Q(String(e).replace(/\./g,"-"),void 0,t)}function Sx(e,t){let n={};const r={};for(const[o,a]of Object.entries(e)){const{isSemantic:i,value:s}=a,{variable:l,reference:c}=td(o,t==null?void 0:t.cssVarPrefix);if(!i){if(o.startsWith("space")){const h=o.split("."),[p,...g]=h,m="".concat(p,".-").concat(g.join(".")),v=zn.negate(s),S=zn.negate(c);r[m]={value:v,var:l,varRef:S}}n[l]=s,r[o]={value:s,var:l,varRef:c};continue}const u=h=>{const g=[String(o).split(".")[0],h].join(".");if(!e[g])return h;const{reference:v}=td(g,t==null?void 0:t.cssVarPrefix);return v},d=$t(s)?s:{default:s};n=Et(n,Object.entries(d).reduce((h,[p,g])=>{var m,v;if(!g)return h;const S=u("".concat(g));if(p==="default")return h[l]=S,h;const x=(v=(m=Vi)==null?void 0:m[p])!=null?v:p;return h[x]={[l]:S},h},{})),r[o]={value:c,var:l,varRef:c}}return{cssVars:n,cssMap:r}}function wx(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Cx(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function kx(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}function nd(e,t,n={}){const{stop:r,getKey:o}=n;function a(i,s=[]){var l;if(kx(i)||Array.isArray(i)){const c={};for(const[u,d]of Object.entries(i)){const h=(l=o==null?void 0:o(u))!=null?l:u,p=[...s,h];if(r!=null&&r(i,p))return t(i,s);c[h]=a(d,p)}return c}return t(i,s)}return a(e)}var Px=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function _x(e){return Cx(e,Px)}function Tx(e){return e.semanticTokens}function Ex(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...o}=e;return o}var Ax=e=>vp.includes(e)||e==="default";function $x({tokens:e,semanticTokens:t}){const n={};return nd(e,(r,o)=>{r!=null&&(n[o.join(".")]={isSemantic:!1,value:r})}),nd(t,(r,o)=>{r!=null&&(n[o.join(".")]={isSemantic:!0,value:r})},{stop:r=>Object.keys(r).every(Ax)}),n}function Ix(e){var t;const n=Ex(e),r=_x(n),o=Tx(n),a=$x({tokens:r,semanticTokens:o}),i=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=Sx(a,{cssVarPrefix:i});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:xx(n.breakpoints)}),n}var xc=Et({},Fa,xe,q0,ri,_t,K0,rx,X0,hp,nx,ho,wl,Fe,lx,sx,ox,ax,Y0,ix),Rx=Object.assign({},Fe,_t,ri,hp,ho),Mx=Object.keys(Rx),Ox=[...Object.keys(xc),...vp],Dx={...xc,...Vi},Fx=e=>e in Dx,Nx=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:o}=t.__breakpoints,a={};for(const i in e){let s=Tt(e[i],t);if(s==null)continue;if(s=$t(s)&&n(s)?r(s):s,!Array.isArray(s)){a[i]=s;continue}const l=s.slice(0,o.length).length;for(let c=0;ce.startsWith("--")&&typeof t=="string"&&!Bx(t),Lx=(e,t)=>{var n,r;if(t==null)return t;const o=l=>{var c,u;return(u=(c=e.__cssMap)==null?void 0:c[l])==null?void 0:u.varRef},a=l=>{var c;return(c=o(l))!=null?c:l},[i,s]=jx(t);return t=(r=(n=o(i))!=null?n:a(s))!=null?r:a(t),t};function Vx(e){const{configs:t={},pseudos:n={},theme:r}=e,o=(a,i=!1)=>{var s,l,c;const u=Tt(a,r),d=Nx(u)(r);let h={};for(let p in d){const g=d[p];let m=Tt(g,r);p in n&&(p=n[p]),zx(p,m)&&(m=Lx(r,m));let v=t[p];if(v===!0&&(v={property:p}),$t(m)){h[p]=(s=h[p])!=null?s:{},h[p]=Et({},h[p],o(m,!0));continue}let S=(c=(l=v==null?void 0:v.transform)==null?void 0:l.call(v,m,r,u))!=null?c:m;S=v!=null&&v.processResult?o(S,!0):S;const x=Tt(v==null?void 0:v.property,r);if(!i&&(v!=null&&v.static)){const w=Tt(v.static,r);h=Et({},h,w)}if(x&&Array.isArray(x)){for(const w of x)h[w]=S;continue}if(x){x==="&"&&$t(S)?h=Et({},h,S):h[x]=S;continue}if($t(S)){h=Et({},h,S);continue}h[p]=S}return h};return o}var bp=e=>t=>Vx({theme:t,pseudos:Vi,configs:xc})(e);function Me(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function Wx(e,t){if(Array.isArray(e))return e;if($t(e))return t(e);if(e!=null)return[e]}function Hx(e,t){for(let n=t+1;n{Et(c,{[w]:h?x[w]:{[S]:x[w]}})});continue}if(!p){h?Et(c,x):c[S]=x;continue}c[S]=x}}return c}}function Gx(e){return t=>{var n;const{variant:r,size:o,theme:a}=t,i=Ux(a);return Et({},Tt((n=e.baseStyle)!=null?n:{},t),i(e,"sizes",o,t),i(e,"variants",r,t))}}function qx(e,t,n){var r,o,a;return(a=(o=(r=e.__cssMap)==null?void 0:r["".concat(t,".").concat(n)])==null?void 0:o.varRef)!=null?a:n}function Ee(e){return wx(e,["styleConfig","size","variant","colorScheme"])}var Kx=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function Xx(e){return $t(e)?Kx.every(t=>Object.prototype.hasOwnProperty.call(e,t)):!1}var Yx={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},Zx={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},Qx={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Jx={property:Yx,easing:Zx,duration:Qx},eS=Jx,tS={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},nS=tS,rS={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},oS=rS,aS={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},iS=aS,sS={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},lS=sS,cS={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},uS=cS,dS={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},fS=dS,hS={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},pS=hS,mS={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},yp=mS,xp={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},gS={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},vS={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},bS={...xp,...gS,container:vS},Sp=bS,yS={breakpoints:iS,zIndices:nS,radii:uS,blur:pS,colors:lS,...yp,sizes:Sp,shadows:fS,space:xp,borders:oS,transition:eS},{defineMultiStyleConfig:xS,definePartsStyle:ao}=Me(["stepper","step","title","description","indicator","separator","icon","number"]),an=Q("stepper-indicator-size"),pr=Q("stepper-icon-size"),mr=Q("stepper-title-font-size"),io=Q("stepper-description-font-size"),Qr=Q("stepper-accent-color"),SS=ao(({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[Qr.variable]:"colors.".concat(e,".500"),_dark:{[Qr.variable]:"colors.".concat(e,".200")}},title:{fontSize:mr.reference,fontWeight:"medium"},description:{fontSize:io.reference,color:"chakra-subtle-text"},number:{fontSize:mr.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:pr.reference,height:pr.reference},indicator:{flexShrink:0,borderRadius:"full",width:an.reference,height:an.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:Qr.reference},"&[data-status=complete]":{bg:Qr.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:Qr.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:"calc(100% - ".concat(an.reference," - 8px)"),top:"calc(".concat(an.reference," + 4px)"),insetStart:"calc(".concat(an.reference," / 2 - 1px)")}}})),wS=xS({baseStyle:SS,sizes:{xs:ao({stepper:{[an.variable]:"sizes.4",[pr.variable]:"sizes.3",[mr.variable]:"fontSizes.xs",[io.variable]:"fontSizes.xs"}}),sm:ao({stepper:{[an.variable]:"sizes.6",[pr.variable]:"sizes.4",[mr.variable]:"fontSizes.sm",[io.variable]:"fontSizes.xs"}}),md:ao({stepper:{[an.variable]:"sizes.8",[pr.variable]:"sizes.5",[mr.variable]:"fontSizes.md",[io.variable]:"fontSizes.sm"}}),lg:ao({stepper:{[an.variable]:"sizes.10",[pr.variable]:"sizes.6",[mr.variable]:"fontSizes.lg",[io.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}});function ke(e,t={}){let n=!1;function r(){if(!n){n=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function o(...u){r();for(const d of u)t[d]=l(d);return ke(e,t)}function a(...u){for(const d of u)d in t||(t[d]=l(d));return ke(e,t)}function i(){return Object.fromEntries(Object.entries(t).map(([d,h])=>[d,h.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([d,h])=>[d,h.className]))}function l(u){const h=(["container","root"].includes(u!=null?u:"")?[e]:[e,u]).filter(Boolean).join("__"),p="chakra-".concat(h);return{className:p,selector:".".concat(p),toString:()=>u}}return{parts:o,toPart:l,extend:a,selectors:i,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var CS=ke("accordion").parts("root","container","button","panel").extend("icon"),kS=ke("alert").parts("title","description","container").extend("icon","spinner"),PS=ke("avatar").parts("label","badge","container").extend("excessLabel","group"),_S=ke("breadcrumb").parts("link","item","container").extend("separator");ke("button").parts();var TS=ke("checkbox").parts("control","icon","container").extend("label");ke("progress").parts("track","filledTrack").extend("label");var ES=ke("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),AS=ke("editable").parts("preview","input","textarea"),$S=ke("form").parts("container","requiredIndicator","helperText"),IS=ke("formError").parts("text","icon"),RS=ke("input").parts("addon","field","element","group"),MS=ke("list").parts("container","item","icon"),OS=ke("menu").parts("button","list","item").extend("groupTitle","icon","command","divider"),DS=ke("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),FS=ke("numberinput").parts("root","field","stepperGroup","stepper");ke("pininput").parts("field");var NS=ke("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),jS=ke("progress").parts("label","filledTrack","track"),BS=ke("radio").parts("container","control","label"),zS=ke("select").parts("field","icon"),LS=ke("slider").parts("container","track","thumb","filledTrack","mark"),VS=ke("stat").parts("container","label","helpText","number","icon"),WS=ke("switch").parts("container","track","thumb","label"),HS=ke("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),US=ke("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),GS=ke("tag").parts("container","label","closeButton"),qS=ke("card").parts("container","header","body","footer");ke("stepper").parts("stepper","step","title","description","indicator","separator","icon","number");function Vn(e,t,n){return Math.min(Math.max(e,n),t)}class KS extends Error{constructor(t){super('Failed to parse color: "'.concat(t,'"'))}}var so=KS;function Sc(e){if(typeof e!="string")throw new so(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=n1.test(e)?ZS(e):e;const n=QS.exec(t);if(n){const i=Array.from(n).slice(1);return[...i.slice(0,3).map(s=>parseInt(Ao(s,2),16)),parseInt(Ao(i[3]||"f",2),16)/255]}const r=JS.exec(t);if(r){const i=Array.from(r).slice(1);return[...i.slice(0,3).map(s=>parseInt(s,16)),parseInt(i[3]||"ff",16)/255]}const o=e1.exec(t);if(o){const i=Array.from(o).slice(1);return[...i.slice(0,3).map(s=>parseInt(s,10)),parseFloat(i[3]||"1")]}const a=t1.exec(t);if(a){const[i,s,l,c]=Array.from(a).slice(1).map(parseFloat);if(Vn(0,100,s)!==s)throw new so(e);if(Vn(0,100,l)!==l)throw new so(e);return[...r1(i,s,l),Number.isNaN(c)?1:c]}throw new so(e)}function XS(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0)%2341}const rd=e=>parseInt(e.replace(/_/g,""),36),YS="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const n=rd(t.substring(0,3)),r=rd(t.substring(3)).toString(16);let o="";for(let a=0;a<6-r.length;a++)o+="0";return e[n]="".concat(o).concat(r),e},{});function ZS(e){const t=e.toLowerCase().trim(),n=YS[XS(t)];if(!n)throw new so(e);return"#".concat(n)}const Ao=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),QS=new RegExp("^#".concat(Ao("([a-f0-9])",3),"([a-f0-9])?$"),"i"),JS=new RegExp("^#".concat(Ao("([a-f0-9]{2})",3),"([a-f0-9]{2})?$"),"i"),e1=new RegExp("^rgba?\\(\\s*(\\d+)\\s*".concat(Ao(",\\s*(\\d+)\\s*",2),"(?:,\\s*([\\d.]+))?\\s*\\)$"),"i"),t1=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,n1=/^[a-z]+$/i,od=e=>Math.round(e*255),r1=(e,t,n)=>{let r=n/100;if(t===0)return[r,r,r].map(od);const o=(e%360+360)%360/60,a=(1-Math.abs(2*r-1))*(t/100),i=a*(1-Math.abs(o%2-1));let s=0,l=0,c=0;o>=0&&o<1?(s=a,l=i):o>=1&&o<2?(s=i,l=a):o>=2&&o<3?(l=a,c=i):o>=3&&o<4?(l=i,c=a):o>=4&&o<5?(s=i,c=a):o>=5&&o<6&&(s=a,c=i);const u=r-a/2,d=s+u,h=l+u,p=c+u;return[d,h,p].map(od)};function o1(e,t,n,r){return"rgba(".concat(Vn(0,255,e).toFixed(),", ").concat(Vn(0,255,t).toFixed(),", ").concat(Vn(0,255,n).toFixed(),", ").concat(parseFloat(Vn(0,1,r).toFixed(3)),")")}function a1(e,t){const[n,r,o,a]=Sc(e);return o1(n,r,o,a-t)}function i1(e){const[t,n,r,o]=Sc(e);let a=i=>{const s=Vn(0,255,i).toString(16);return s.length===1?"0".concat(s):s};return"#".concat(a(t)).concat(a(n)).concat(a(r)).concat(o<1?a(Math.round(o*255)):"")}function s1(e,t,n,r,o){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,st=(e,t,n)=>{const r=s1(e,"colors.".concat(t),t);try{return i1(r),r}catch(o){return n!=null?n:"#000000"}},c1=e=>{const[t,n,r]=Sc(e);return(t*299+n*587+r*114)/1e3},u1=e=>t=>{const n=st(t,e);return c1(n)<128?"dark":"light"},d1=e=>t=>u1(e)(t)==="dark",Nr=(e,t)=>n=>{const r=st(n,e);return a1(r,1-t)};function ad(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:"linear-gradient(\n 45deg,\n ".concat(t," 25%,\n transparent 25%,\n transparent 50%,\n ").concat(t," 50%,\n ").concat(t," 75%,\n transparent 75%,\n transparent\n )"),backgroundSize:"".concat(e," ").concat(e)}}var f1=()=>"#".concat(Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0"));function h1(e){const t=f1();return!e||l1(e)?t:e.string&&e.colors?m1(e.string,e.colors):e.string&&!e.colors?p1(e.string):e.colors&&!e.string?g1(e.colors):t}function p1(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+="00".concat(o.toString(16)).substr(-2)}return n}function m1(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function wc(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function wp(e){return $t(e)&&e.reference?e.reference:String(e)}var Wi=(e,...t)=>t.map(wp).join(" ".concat(e," ")).replace(/calc/g,""),id=(...e)=>"calc(".concat(Wi("+",...e),")"),sd=(...e)=>"calc(".concat(Wi("-",...e),")"),Pl=(...e)=>"calc(".concat(Wi("*",...e),")"),ld=(...e)=>"calc(".concat(Wi("/",...e),")"),cd=e=>{const t=wp(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):"-".concat(t):Pl(t,-1)},sn=Object.assign(e=>({add:(...t)=>sn(id(e,...t)),subtract:(...t)=>sn(sd(e,...t)),multiply:(...t)=>sn(Pl(e,...t)),divide:(...t)=>sn(ld(e,...t)),negate:()=>sn(cd(e)),toString:()=>e.toString()}),{add:id,subtract:sd,multiply:Pl,divide:ld,negate:cd});function v1(e){return!Number.isInteger(parseFloat(e.toString()))}function b1(e,t="-"){return e.replace(/\s+/g,t)}function Cp(e){const t=b1(e.toString());return t.includes("\\.")?e:v1(e)?t.replace(".","\\."):e}function y1(e,t=""){return[t,Cp(e)].filter(Boolean).join("-")}function x1(e,t){return"var(".concat(Cp(e)).concat(t?", ".concat(t):"",")")}function S1(e,t=""){return"--".concat(y1(e,t))}function Xe(e,t){const n=S1(e,void 0);return{variable:n,reference:x1(n,w1(void 0))}}function w1(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{defineMultiStyleConfig:C1,definePartsStyle:Na}=Me(WS.keys),po=Xe("switch-track-width"),Hn=Xe("switch-track-height"),ks=Xe("switch-track-diff"),k1=sn.subtract(po,Hn),_l=Xe("switch-thumb-x"),Jr=Xe("switch-bg"),P1=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[po.reference],height:[Hn.reference],transitionProperty:"common",transitionDuration:"fast",[Jr.variable]:"colors.gray.300",_dark:{[Jr.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Jr.variable]:"colors.".concat(t,".500"),_dark:{[Jr.variable]:"colors.".concat(t,".200")}},bg:Jr.reference}},_1={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[Hn.reference],height:[Hn.reference],_checked:{transform:"translateX(".concat(_l.reference,")")}},T1=Na(e=>({container:{[ks.variable]:k1,[_l.variable]:ks.reference,_rtl:{[_l.variable]:sn(ks).negate().toString()}},track:P1(e),thumb:_1})),E1={sm:Na({container:{[po.variable]:"1.375rem",[Hn.variable]:"sizes.3"}}),md:Na({container:{[po.variable]:"1.875rem",[Hn.variable]:"sizes.4"}}),lg:Na({container:{[po.variable]:"2.875rem",[Hn.variable]:"sizes.6"}})},A1=C1({baseStyle:T1,sizes:E1,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:$1,definePartsStyle:Er}=Me(HS.keys),I1=Er({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),oi={"&[data-is-numeric=true]":{textAlign:"end"}},R1=Er(e=>{const{colorScheme:t}=e;return{th:{color:Z("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Z("".concat(t,".100"),"".concat(t,".700"))(e),...oi},td:{borderBottom:"1px",borderColor:Z("".concat(t,".100"),"".concat(t,".700"))(e),...oi},caption:{color:Z("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),M1=Er(e=>{const{colorScheme:t}=e;return{th:{color:Z("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Z("".concat(t,".100"),"".concat(t,".700"))(e),...oi},td:{borderBottom:"1px",borderColor:Z("".concat(t,".100"),"".concat(t,".700"))(e),...oi},caption:{color:Z("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Z("".concat(t,".100"),"".concat(t,".700"))(e)},td:{background:Z("".concat(t,".100"),"".concat(t,".700"))(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),O1={simple:R1,striped:M1,unstyled:{}},D1={sm:Er({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:Er({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:Er({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},F1=$1({baseStyle:I1,variants:O1,sizes:D1,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),dt=Q("tabs-color"),jt=Q("tabs-bg"),ga=Q("tabs-border-color"),{defineMultiStyleConfig:N1,definePartsStyle:Xt}=Me(US.keys),j1=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},B1=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},z1=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},L1={p:4},V1=Xt(e=>({root:j1(e),tab:B1(e),tablist:z1(e),tabpanel:L1})),W1={sm:Xt({tab:{py:1,px:4,fontSize:"sm"}}),md:Xt({tab:{fontSize:"md",py:2,px:4}}),lg:Xt({tab:{fontSize:"lg",py:3,px:4}})},H1=Xt(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",o=r?"borderStart":"borderBottom",a=r?"marginStart":"marginBottom";return{tablist:{[o]:"2px solid",borderColor:"inherit"},tab:{[o]:"2px solid",borderColor:"transparent",[a]:"-2px",_selected:{[dt.variable]:"colors.".concat(t,".600"),_dark:{[dt.variable]:"colors.".concat(t,".300")},borderColor:"currentColor"},_active:{[jt.variable]:"colors.gray.200",_dark:{[jt.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:dt.reference,bg:jt.reference}}}),U1=Xt(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[ga.variable]:"transparent",_selected:{[dt.variable]:"colors.".concat(t,".600"),[ga.variable]:"colors.white",_dark:{[dt.variable]:"colors.".concat(t,".300"),[ga.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:ga.reference},color:dt.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),G1=Xt(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[jt.variable]:"colors.gray.50",_dark:{[jt.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[jt.variable]:"colors.white",[dt.variable]:"colors.".concat(t,".600"),_dark:{[jt.variable]:"colors.gray.800",[dt.variable]:"colors.".concat(t,".300")},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:dt.reference,bg:jt.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),q1=Xt(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:st(n,"".concat(t,".700")),bg:st(n,"".concat(t,".100"))}}}}),K1=Xt(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[dt.variable]:"colors.gray.600",_dark:{[dt.variable]:"inherit"},_selected:{[dt.variable]:"colors.white",[jt.variable]:"colors.".concat(t,".600"),_dark:{[dt.variable]:"colors.gray.800",[jt.variable]:"colors.".concat(t,".300")}},color:dt.reference,bg:jt.reference}}}),X1=Xt({}),Y1={line:H1,enclosed:U1,"enclosed-colored":G1,"soft-rounded":q1,"solid-rounded":K1,unstyled:X1},Z1=N1({baseStyle:V1,sizes:W1,variants:Y1,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),Ue=gx("badge",["bg","color","shadow"]),Q1={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:Ue.bg.reference,color:Ue.color.reference,boxShadow:Ue.shadow.reference},J1=e=>{const{colorScheme:t,theme:n}=e,r=Nr("".concat(t,".500"),.6)(n);return{[Ue.bg.variable]:"colors.".concat(t,".500"),[Ue.color.variable]:"colors.white",_dark:{[Ue.bg.variable]:r,[Ue.color.variable]:"colors.whiteAlpha.800"}}},ew=e=>{const{colorScheme:t,theme:n}=e,r=Nr("".concat(t,".200"),.16)(n);return{[Ue.bg.variable]:"colors.".concat(t,".100"),[Ue.color.variable]:"colors.".concat(t,".800"),_dark:{[Ue.bg.variable]:r,[Ue.color.variable]:"colors.".concat(t,".200")}}},tw=e=>{const{colorScheme:t,theme:n}=e,r=Nr("".concat(t,".200"),.8)(n);return{[Ue.color.variable]:"colors.".concat(t,".500"),_dark:{[Ue.color.variable]:r},[Ue.shadow.variable]:"inset 0 0 0px 1px ".concat(Ue.color.reference)}},nw={solid:J1,subtle:ew,outline:tw},mo={baseStyle:Q1,variants:nw,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:rw,definePartsStyle:Un}=Me(GS.keys),ud=Q("tag-bg"),dd=Q("tag-color"),Ps=Q("tag-shadow"),ja=Q("tag-min-height"),Ba=Q("tag-min-width"),za=Q("tag-font-size"),La=Q("tag-padding-inline"),ow={fontWeight:"medium",lineHeight:1.2,outline:0,[dd.variable]:Ue.color.reference,[ud.variable]:Ue.bg.reference,[Ps.variable]:Ue.shadow.reference,color:dd.reference,bg:ud.reference,boxShadow:Ps.reference,borderRadius:"md",minH:ja.reference,minW:Ba.reference,fontSize:za.reference,px:La.reference,_focusVisible:{[Ps.variable]:"shadows.outline"}},aw={lineHeight:1.2,overflow:"visible"},iw={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},sw=Un({container:ow,label:aw,closeButton:iw}),lw={sm:Un({container:{[ja.variable]:"sizes.5",[Ba.variable]:"sizes.5",[za.variable]:"fontSizes.xs",[La.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Un({container:{[ja.variable]:"sizes.6",[Ba.variable]:"sizes.6",[za.variable]:"fontSizes.sm",[La.variable]:"space.2"}}),lg:Un({container:{[ja.variable]:"sizes.8",[Ba.variable]:"sizes.8",[za.variable]:"fontSizes.md",[La.variable]:"space.3"}})},cw={subtle:Un(e=>{var t;return{container:(t=mo.variants)==null?void 0:t.subtle(e)}}),solid:Un(e=>{var t;return{container:(t=mo.variants)==null?void 0:t.solid(e)}}),outline:Un(e=>{var t;return{container:(t=mo.variants)==null?void 0:t.outline(e)}})},uw=rw({variants:cw,baseStyle:sw,sizes:lw,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:ln,defineMultiStyleConfig:dw}=Me(RS.keys),gr=Q("input-height"),vr=Q("input-font-size"),br=Q("input-padding"),yr=Q("input-border-radius"),fw=ln({addon:{height:gr.reference,fontSize:vr.reference,px:br.reference,borderRadius:yr.reference},field:{width:"100%",height:gr.reference,fontSize:vr.reference,px:br.reference,borderRadius:yr.reference,minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Sn={lg:{[vr.variable]:"fontSizes.lg",[br.variable]:"space.4",[yr.variable]:"radii.md",[gr.variable]:"sizes.12"},md:{[vr.variable]:"fontSizes.md",[br.variable]:"space.4",[yr.variable]:"radii.md",[gr.variable]:"sizes.10"},sm:{[vr.variable]:"fontSizes.sm",[br.variable]:"space.3",[yr.variable]:"radii.sm",[gr.variable]:"sizes.8"},xs:{[vr.variable]:"fontSizes.xs",[br.variable]:"space.2",[yr.variable]:"radii.sm",[gr.variable]:"sizes.6"}},hw={lg:ln({field:Sn.lg,group:Sn.lg}),md:ln({field:Sn.md,group:Sn.md}),sm:ln({field:Sn.sm,group:Sn.sm}),xs:ln({field:Sn.xs,group:Sn.xs})};function Cc(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Z("blue.500","blue.300")(e),errorBorderColor:n||Z("red.500","red.300")(e)}}var pw=ln(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=Cc(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Z("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:st(t,r),boxShadow:"0 0 0 1px ".concat(st(t,r))},_focusVisible:{zIndex:1,borderColor:st(t,n),boxShadow:"0 0 0 1px ".concat(st(t,n))}},addon:{border:"1px solid",borderColor:Z("inherit","whiteAlpha.50")(e),bg:Z("gray.100","whiteAlpha.300")(e)}}}),mw=ln(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=Cc(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Z("gray.100","whiteAlpha.50")(e),_hover:{bg:Z("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:st(t,r)},_focusVisible:{bg:"transparent",borderColor:st(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Z("gray.100","whiteAlpha.50")(e)}}}),gw=ln(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=Cc(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:st(t,r),boxShadow:"0px 1px 0px 0px ".concat(st(t,r))},_focusVisible:{borderColor:st(t,n),boxShadow:"0px 1px 0px 0px ".concat(st(t,n))}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),vw=ln({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),bw={outline:pw,filled:mw,flushed:gw,unstyled:vw},Ce=dw({baseStyle:fw,sizes:hw,variants:bw,defaultProps:{size:"md",variant:"outline"}}),fd,yw={...(fd=Ce.baseStyle)==null?void 0:fd.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},hd,pd,xw={outline:e=>{var t,n;return(n=(t=Ce.variants)==null?void 0:t.outline(e).field)!=null?n:{}},flushed:e=>{var t,n;return(n=(t=Ce.variants)==null?void 0:t.flushed(e).field)!=null?n:{}},filled:e=>{var t,n;return(n=(t=Ce.variants)==null?void 0:t.filled(e).field)!=null?n:{}},unstyled:(pd=(hd=Ce.variants)==null?void 0:hd.unstyled.field)!=null?pd:{}},md,gd,vd,bd,yd,xd,Sd,wd,Sw={xs:(gd=(md=Ce.sizes)==null?void 0:md.xs.field)!=null?gd:{},sm:(bd=(vd=Ce.sizes)==null?void 0:vd.sm.field)!=null?bd:{},md:(xd=(yd=Ce.sizes)==null?void 0:yd.md.field)!=null?xd:{},lg:(wd=(Sd=Ce.sizes)==null?void 0:Sd.lg.field)!=null?wd:{}},ww={baseStyle:yw,sizes:Sw,variants:xw,defaultProps:{size:"md",variant:"outline"}},va=Xe("tooltip-bg"),_s=Xe("tooltip-fg"),Cw=Xe("popper-arrow-bg"),kw={bg:va.reference,color:_s.reference,[va.variable]:"colors.gray.700",[_s.variable]:"colors.whiteAlpha.900",_dark:{[va.variable]:"colors.gray.300",[_s.variable]:"colors.gray.900"},[Cw.variable]:va.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},Pw={baseStyle:kw},{defineMultiStyleConfig:_w,definePartsStyle:lo}=Me(jS.keys),Tw=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:o}=e,a=Z(ad(),ad("1rem","rgba(0,0,0,0.1)"))(e),i=Z("".concat(t,".500"),"".concat(t,".200"))(e),s="linear-gradient(\n to right,\n transparent 0%,\n ".concat(st(n,i)," 50%,\n transparent 100%\n )");return{...!r&&o&&a,...r?{bgImage:s}:{bgColor:i}}},Ew={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Aw=e=>({bg:Z("gray.100","whiteAlpha.300")(e)}),$w=e=>({transitionProperty:"common",transitionDuration:"slow",...Tw(e)}),Iw=lo(e=>({label:Ew,filledTrack:$w(e),track:Aw(e)})),Rw={xs:lo({track:{h:"1"}}),sm:lo({track:{h:"2"}}),md:lo({track:{h:"3"}}),lg:lo({track:{h:"4"}})},Mw=_w({sizes:Rw,baseStyle:Iw,defaultProps:{size:"md",colorScheme:"blue"}}),Ow=e=>typeof e=="function";function lt(e,...t){return Ow(e)?e(...t):e}var{definePartsStyle:Va,defineMultiStyleConfig:Dw}=Me(TS.keys),go=Q("checkbox-size"),Fw=e=>{const{colorScheme:t}=e;return{w:go.reference,h:go.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Z("".concat(t,".500"),"".concat(t,".200"))(e),borderColor:Z("".concat(t,".500"),"".concat(t,".200"))(e),color:Z("white","gray.900")(e),_hover:{bg:Z("".concat(t,".600"),"".concat(t,".300"))(e),borderColor:Z("".concat(t,".600"),"".concat(t,".300"))(e)},_disabled:{borderColor:Z("gray.200","transparent")(e),bg:Z("gray.200","whiteAlpha.300")(e),color:Z("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Z("".concat(t,".500"),"".concat(t,".200"))(e),borderColor:Z("".concat(t,".500"),"".concat(t,".200"))(e),color:Z("white","gray.900")(e)},_disabled:{bg:Z("gray.100","whiteAlpha.100")(e),borderColor:Z("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Z("red.500","red.300")(e)}}},Nw={_disabled:{cursor:"not-allowed"}},jw={userSelect:"none",_disabled:{opacity:.4}},Bw={transitionProperty:"transform",transitionDuration:"normal"},zw=Va(e=>({icon:Bw,container:Nw,control:lt(Fw,e),label:jw})),Lw={sm:Va({control:{[go.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:Va({control:{[go.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:Va({control:{[go.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},ai=Dw({baseStyle:zw,sizes:Lw,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Vw,definePartsStyle:Wa}=Me(BS.keys),Ww=e=>{var t;const n=(t=lt(ai.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n==null?void 0:n._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},Hw=Wa(e=>{var t,n,r,o;return{label:(n=(t=ai).baseStyle)==null?void 0:n.call(t,e).label,container:(o=(r=ai).baseStyle)==null?void 0:o.call(r,e).container,control:Ww(e)}}),Uw={md:Wa({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:Wa({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:Wa({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},Gw=Vw({baseStyle:Hw,sizes:Uw,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:qw,definePartsStyle:Kw}=Me(zS.keys),ba=Q("select-bg"),Cd,Xw={...(Cd=Ce.baseStyle)==null?void 0:Cd.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:ba.reference,[ba.variable]:"colors.white",_dark:{[ba.variable]:"colors.gray.700"},"> option, > optgroup":{bg:ba.reference}},Yw={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Zw=Kw({field:Xw,icon:Yw}),ya={paddingInlineEnd:"8"},kd,Pd,_d,Td,Ed,Ad,$d,Id,Qw={lg:{...(kd=Ce.sizes)==null?void 0:kd.lg,field:{...(Pd=Ce.sizes)==null?void 0:Pd.lg.field,...ya}},md:{...(_d=Ce.sizes)==null?void 0:_d.md,field:{...(Td=Ce.sizes)==null?void 0:Td.md.field,...ya}},sm:{...(Ed=Ce.sizes)==null?void 0:Ed.sm,field:{...(Ad=Ce.sizes)==null?void 0:Ad.sm.field,...ya}},xs:{...($d=Ce.sizes)==null?void 0:$d.xs,field:{...(Id=Ce.sizes)==null?void 0:Id.xs.field,...ya},icon:{insetEnd:"1"}}},Jw=qw({baseStyle:Zw,sizes:Qw,variants:Ce.variants,defaultProps:Ce.defaultProps}),Ts=Q("skeleton-start-color"),Es=Q("skeleton-end-color"),eC={[Ts.variable]:"colors.gray.100",[Es.variable]:"colors.gray.400",_dark:{[Ts.variable]:"colors.gray.800",[Es.variable]:"colors.gray.600"},background:Ts.reference,borderColor:Es.reference,opacity:.7,borderRadius:"sm"},tC={baseStyle:eC},As=Q("skip-link-bg"),nC={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[As.variable]:"colors.white",_dark:{[As.variable]:"colors.gray.700"},bg:As.reference}},rC={baseStyle:nC},{defineMultiStyleConfig:oC,definePartsStyle:Hi}=Me(LS.keys),$o=Q("slider-thumb-size"),Io=Q("slider-track-size"),_n=Q("slider-bg"),aC=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...wc({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},iC=e=>({...wc({orientation:e.orientation,horizontal:{h:Io.reference},vertical:{w:Io.reference}}),overflow:"hidden",borderRadius:"sm",[_n.variable]:"colors.gray.200",_dark:{[_n.variable]:"colors.whiteAlpha.200"},_disabled:{[_n.variable]:"colors.gray.300",_dark:{[_n.variable]:"colors.whiteAlpha.300"}},bg:_n.reference}),sC=e=>{const{orientation:t}=e;return{...wc({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:$o.reference,h:$o.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},lC=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[_n.variable]:"colors.".concat(t,".500"),_dark:{[_n.variable]:"colors.".concat(t,".200")},bg:_n.reference}},cC=Hi(e=>({container:aC(e),track:iC(e),thumb:sC(e),filledTrack:lC(e)})),uC=Hi({container:{[$o.variable]:"sizes.4",[Io.variable]:"sizes.1"}}),dC=Hi({container:{[$o.variable]:"sizes.3.5",[Io.variable]:"sizes.1"}}),fC=Hi({container:{[$o.variable]:"sizes.2.5",[Io.variable]:"sizes.0.5"}}),hC={lg:uC,md:dC,sm:fC},pC=oC({baseStyle:cC,sizes:hC,defaultProps:{size:"md",colorScheme:"blue"}}),Ln=Xe("spinner-size"),mC={width:[Ln.reference],height:[Ln.reference]},gC={xs:{[Ln.variable]:"sizes.3"},sm:{[Ln.variable]:"sizes.4"},md:{[Ln.variable]:"sizes.6"},lg:{[Ln.variable]:"sizes.8"},xl:{[Ln.variable]:"sizes.12"}},vC={baseStyle:mC,sizes:gC,defaultProps:{size:"md"}},{defineMultiStyleConfig:bC,definePartsStyle:kp}=Me(VS.keys),yC={fontWeight:"medium"},xC={opacity:.8,marginBottom:"2"},SC={verticalAlign:"baseline",fontWeight:"semibold"},wC={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},CC=kp({container:{},label:yC,helpText:xC,number:SC,icon:wC}),kC={md:kp({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},PC=bC({baseStyle:CC,sizes:kC,defaultProps:{size:"md"}}),$s=Q("kbd-bg"),_C={[$s.variable]:"colors.gray.100",_dark:{[$s.variable]:"colors.whiteAlpha.100"},bg:$s.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},TC={baseStyle:_C},EC={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},AC={baseStyle:EC},{defineMultiStyleConfig:$C,definePartsStyle:IC}=Me(MS.keys),RC={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},MC=IC({icon:RC}),OC=$C({baseStyle:MC}),{defineMultiStyleConfig:DC,definePartsStyle:FC}=Me(OS.keys),Vt=Q("menu-bg"),Is=Q("menu-shadow"),NC={[Vt.variable]:"#fff",[Is.variable]:"shadows.sm",_dark:{[Vt.variable]:"colors.gray.700",[Is.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:Vt.reference,boxShadow:Is.reference},jC={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[Vt.variable]:"colors.gray.100",_dark:{[Vt.variable]:"colors.whiteAlpha.100"}},_active:{[Vt.variable]:"colors.gray.200",_dark:{[Vt.variable]:"colors.whiteAlpha.200"}},_expanded:{[Vt.variable]:"colors.gray.100",_dark:{[Vt.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:Vt.reference},BC={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},zC={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},LC={opacity:.6},VC={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},WC={transitionProperty:"common",transitionDuration:"normal"},HC=FC({button:WC,list:NC,item:jC,groupTitle:BC,icon:zC,command:LC,divider:VC}),UC=DC({baseStyle:HC}),{defineMultiStyleConfig:GC,definePartsStyle:Tl}=Me(DS.keys),Rs=Q("modal-bg"),Ms=Q("modal-shadow"),qC={bg:"blackAlpha.600",zIndex:"modal"},KC=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}},XC=e=>{const{isCentered:t,scrollBehavior:n}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:n==="inside"?"calc(100% - 7.5rem)":void 0,[Rs.variable]:"colors.white",[Ms.variable]:"shadows.lg",_dark:{[Rs.variable]:"colors.gray.700",[Ms.variable]:"shadows.dark-lg"},bg:Rs.reference,boxShadow:Ms.reference}},YC={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},ZC={position:"absolute",top:"2",insetEnd:"3"},QC=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},JC={px:"6",py:"4"},ek=Tl(e=>({overlay:qC,dialogContainer:lt(KC,e),dialog:lt(XC,e),header:YC,closeButton:ZC,body:lt(QC,e),footer:JC}));function Ft(e){return Tl(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var tk={xs:Ft("xs"),sm:Ft("sm"),md:Ft("md"),lg:Ft("lg"),xl:Ft("xl"),"2xl":Ft("2xl"),"3xl":Ft("3xl"),"4xl":Ft("4xl"),"5xl":Ft("5xl"),"6xl":Ft("6xl"),full:Ft("full")},nk=GC({baseStyle:ek,sizes:tk,defaultProps:{size:"md"}}),{defineMultiStyleConfig:rk,definePartsStyle:Pp}=Me(FS.keys),kc=Xe("number-input-stepper-width"),_p=Xe("number-input-input-padding"),ok=sn(kc).add("0.5rem").toString(),Os=Xe("number-input-bg"),Ds=Xe("number-input-color"),Fs=Xe("number-input-border-color"),ak={[kc.variable]:"sizes.6",[_p.variable]:ok},ik=e=>{var t,n;return(n=(t=lt(Ce.baseStyle,e))==null?void 0:t.field)!=null?n:{}},sk={width:kc.reference},lk={borderStart:"1px solid",borderStartColor:Fs.reference,color:Ds.reference,bg:Os.reference,[Ds.variable]:"colors.chakra-body-text",[Fs.variable]:"colors.chakra-border-color",_dark:{[Ds.variable]:"colors.whiteAlpha.800",[Fs.variable]:"colors.whiteAlpha.300"},_active:{[Os.variable]:"colors.gray.200",_dark:{[Os.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},ck=Pp(e=>{var t;return{root:ak,field:(t=lt(ik,e))!=null?t:{},stepperGroup:sk,stepper:lk}});function xa(e){var t,n,r;const o=(t=Ce.sizes)==null?void 0:t[e],a={lg:"md",md:"md",sm:"sm",xs:"sm"},i=(r=(n=o.field)==null?void 0:n.fontSize)!=null?r:"md",s=yp.fontSizes[i];return Pp({field:{...o.field,paddingInlineEnd:_p.reference,verticalAlign:"top"},stepper:{fontSize:sn(s).multiply(.75).toString(),_first:{borderTopEndRadius:a[e]},_last:{borderBottomEndRadius:a[e],mt:"-1px",borderTopWidth:1}}})}var uk={xs:xa("xs"),sm:xa("sm"),md:xa("md"),lg:xa("lg")},dk=rk({baseStyle:ck,sizes:uk,variants:Ce.variants,defaultProps:Ce.defaultProps}),Rd,fk={...(Rd=Ce.baseStyle)==null?void 0:Rd.field,textAlign:"center"},hk={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},Md,Od,pk={outline:e=>{var t,n,r;return(r=(n=lt((t=Ce.variants)==null?void 0:t.outline,e))==null?void 0:n.field)!=null?r:{}},flushed:e=>{var t,n,r;return(r=(n=lt((t=Ce.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)!=null?r:{}},filled:e=>{var t,n,r;return(r=(n=lt((t=Ce.variants)==null?void 0:t.filled,e))==null?void 0:n.field)!=null?r:{}},unstyled:(Od=(Md=Ce.variants)==null?void 0:Md.unstyled.field)!=null?Od:{}},mk={baseStyle:fk,sizes:hk,variants:pk,defaultProps:Ce.defaultProps},{defineMultiStyleConfig:gk,definePartsStyle:vk}=Me(NS.keys),Sa=Xe("popper-bg"),bk=Xe("popper-arrow-bg"),Dd=Xe("popper-arrow-shadow-color"),yk={zIndex:10},xk={[Sa.variable]:"colors.white",bg:Sa.reference,[bk.variable]:Sa.reference,[Dd.variable]:"colors.gray.200",_dark:{[Sa.variable]:"colors.gray.700",[Dd.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},Sk={px:3,py:2,borderBottomWidth:"1px"},wk={px:3,py:2},Ck={px:3,py:2,borderTopWidth:"1px"},kk={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Pk=vk({popper:yk,content:xk,header:Sk,body:wk,footer:Ck,closeButton:kk}),_k=gk({baseStyle:Pk}),{definePartsStyle:El,defineMultiStyleConfig:Tk}=Me(ES.keys),Ns=Q("drawer-bg"),js=Q("drawer-box-shadow");function ir(e){return El(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Ek={bg:"blackAlpha.600",zIndex:"modal"},Ak={display:"flex",zIndex:"modal",justifyContent:"center"},$k=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[Ns.variable]:"colors.white",[js.variable]:"shadows.lg",_dark:{[Ns.variable]:"colors.gray.700",[js.variable]:"shadows.dark-lg"},bg:Ns.reference,boxShadow:js.reference}},Ik={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Rk={position:"absolute",top:"2",insetEnd:"3"},Mk={px:"6",py:"2",flex:"1",overflow:"auto"},Ok={px:"6",py:"4"},Dk=El(e=>({overlay:Ek,dialogContainer:Ak,dialog:lt($k,e),header:Ik,closeButton:Rk,body:Mk,footer:Ok})),Fk={xs:ir("xs"),sm:ir("md"),md:ir("lg"),lg:ir("2xl"),xl:ir("4xl"),full:ir("full")},Nk=Tk({baseStyle:Dk,sizes:Fk,defaultProps:{size:"xs"}}),{definePartsStyle:jk,defineMultiStyleConfig:Bk}=Me(AS.keys),zk={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Lk={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Vk={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Wk=jk({preview:zk,input:Lk,textarea:Vk}),Hk=Bk({baseStyle:Wk}),{definePartsStyle:Uk,defineMultiStyleConfig:Gk}=Me($S.keys),Ar=Q("form-control-color"),qk={marginStart:"1",[Ar.variable]:"colors.red.500",_dark:{[Ar.variable]:"colors.red.300"},color:Ar.reference},Kk={mt:"2",[Ar.variable]:"colors.gray.600",_dark:{[Ar.variable]:"colors.whiteAlpha.600"},color:Ar.reference,lineHeight:"normal",fontSize:"sm"},Xk=Uk({container:{width:"100%",position:"relative"},requiredIndicator:qk,helperText:Kk}),Yk=Gk({baseStyle:Xk}),{definePartsStyle:Zk,defineMultiStyleConfig:Qk}=Me(IS.keys),$r=Q("form-error-color"),Jk={[$r.variable]:"colors.red.500",_dark:{[$r.variable]:"colors.red.300"},color:$r.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},eP={marginEnd:"0.5em",[$r.variable]:"colors.red.500",_dark:{[$r.variable]:"colors.red.300"},color:$r.reference},tP=Zk({text:Jk,icon:eP}),nP=Qk({baseStyle:tP}),rP={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},oP={baseStyle:rP},aP={fontFamily:"heading",fontWeight:"bold"},iP={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},sP={baseStyle:aP,sizes:iP,defaultProps:{size:"xl"}},{defineMultiStyleConfig:lP,definePartsStyle:cP}=Me(_S.keys),Bs=Q("breadcrumb-link-decor"),uP={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:Bs.reference,[Bs.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[Bs.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}},dP=cP({link:uP}),fP=lP({baseStyle:dP}),hP={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},Tp=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Z("gray.800","whiteAlpha.900")(e),_hover:{bg:Z("gray.100","whiteAlpha.200")(e)},_active:{bg:Z("gray.200","whiteAlpha.300")(e)}};const r=Nr("".concat(t,".200"),.12)(n),o=Nr("".concat(t,".200"),.24)(n);return{color:Z("".concat(t,".600"),"".concat(t,".200"))(e),bg:"transparent",_hover:{bg:Z("".concat(t,".50"),r)(e)},_active:{bg:Z("".concat(t,".100"),o)(e)}}},pP=e=>{const{colorScheme:t}=e,n=Z("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...lt(Tp,e)}},mP={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},gP=e=>{var t;const{colorScheme:n}=e;if(n==="gray"){const l=Z("gray.100","whiteAlpha.200")(e);return{bg:l,color:Z("gray.800","whiteAlpha.900")(e),_hover:{bg:Z("gray.200","whiteAlpha.300")(e),_disabled:{bg:l}},_active:{bg:Z("gray.300","whiteAlpha.400")(e)}}}const{bg:r="".concat(n,".500"),color:o="white",hoverBg:a="".concat(n,".600"),activeBg:i="".concat(n,".700")}=(t=mP[n])!=null?t:{},s=Z(r,"".concat(n,".200"))(e);return{bg:s,color:Z(o,"gray.800")(e),_hover:{bg:Z(a,"".concat(n,".300"))(e),_disabled:{bg:s}},_active:{bg:Z(i,"".concat(n,".400"))(e)}}},vP=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Z("".concat(t,".500"),"".concat(t,".200"))(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Z("".concat(t,".700"),"".concat(t,".500"))(e)}}},bP={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},yP={ghost:Tp,outline:pP,solid:gP,link:vP,unstyled:bP},xP={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},SP={baseStyle:hP,variants:yP,sizes:xP,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Gn,defineMultiStyleConfig:wP}=Me(qS.keys),ii=Q("card-bg"),un=Q("card-padding"),Ep=Q("card-shadow"),Ha=Q("card-radius"),Ap=Q("card-border-width","0"),$p=Q("card-border-color"),CP=Gn({container:{[ii.variable]:"colors.chakra-body-bg",backgroundColor:ii.reference,boxShadow:Ep.reference,borderRadius:Ha.reference,color:"chakra-body-text",borderWidth:Ap.reference,borderColor:$p.reference},body:{padding:un.reference,flex:"1 1 0%"},header:{padding:un.reference},footer:{padding:un.reference}}),kP={sm:Gn({container:{[Ha.variable]:"radii.base",[un.variable]:"space.3"}}),md:Gn({container:{[Ha.variable]:"radii.md",[un.variable]:"space.5"}}),lg:Gn({container:{[Ha.variable]:"radii.xl",[un.variable]:"space.7"}})},PP={elevated:Gn({container:{[Ep.variable]:"shadows.base",_dark:{[ii.variable]:"colors.gray.700"}}}),outline:Gn({container:{[Ap.variable]:"1px",[$p.variable]:"colors.chakra-border-color"}}),filled:Gn({container:{[ii.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[un.variable]:0},header:{[un.variable]:0},footer:{[un.variable]:0}}},_P=wP({baseStyle:CP,variants:PP,sizes:kP,defaultProps:{variant:"elevated",size:"md"}}),vo=Xe("close-button-size"),eo=Xe("close-button-bg"),TP={w:[vo.reference],h:[vo.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[eo.variable]:"colors.blackAlpha.100",_dark:{[eo.variable]:"colors.whiteAlpha.100"}},_active:{[eo.variable]:"colors.blackAlpha.200",_dark:{[eo.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:eo.reference},EP={lg:{[vo.variable]:"sizes.10",fontSize:"md"},md:{[vo.variable]:"sizes.8",fontSize:"xs"},sm:{[vo.variable]:"sizes.6",fontSize:"2xs"}},AP={baseStyle:TP,sizes:EP,defaultProps:{size:"md"}},{variants:$P,defaultProps:IP}=mo,RP={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:Ue.bg.reference,color:Ue.color.reference,boxShadow:Ue.shadow.reference},MP={baseStyle:RP,variants:$P,defaultProps:IP},OP={w:"100%",mx:"auto",maxW:"prose",px:"4"},DP={baseStyle:OP},FP={opacity:.6,borderColor:"inherit"},NP={borderStyle:"solid"},jP={borderStyle:"dashed"},BP={solid:NP,dashed:jP},zP={baseStyle:FP,variants:BP,defaultProps:{variant:"solid"}},{definePartsStyle:LP,defineMultiStyleConfig:VP}=Me(CS.keys),WP={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},HP={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},UP={pt:"2",px:"4",pb:"5"},GP={fontSize:"1.25em"},qP=LP({container:WP,button:HP,panel:UP,icon:GP}),KP=VP({baseStyle:qP}),{definePartsStyle:Uo,defineMultiStyleConfig:XP}=Me(kS.keys),bt=Q("alert-fg"),pn=Q("alert-bg"),YP=Uo({container:{bg:pn.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:bt.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:bt.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function Pc(e){const{theme:t,colorScheme:n}=e,r=Nr("".concat(n,".200"),.16)(t);return{light:"colors.".concat(n,".100"),dark:r}}var ZP=Uo(e=>{const{colorScheme:t}=e,n=Pc(e);return{container:{[bt.variable]:"colors.".concat(t,".600"),[pn.variable]:n.light,_dark:{[bt.variable]:"colors.".concat(t,".200"),[pn.variable]:n.dark}}}}),QP=Uo(e=>{const{colorScheme:t}=e,n=Pc(e);return{container:{[bt.variable]:"colors.".concat(t,".600"),[pn.variable]:n.light,_dark:{[bt.variable]:"colors.".concat(t,".200"),[pn.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:bt.reference}}}),JP=Uo(e=>{const{colorScheme:t}=e,n=Pc(e);return{container:{[bt.variable]:"colors.".concat(t,".600"),[pn.variable]:n.light,_dark:{[bt.variable]:"colors.".concat(t,".200"),[pn.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:bt.reference}}}),e_=Uo(e=>{const{colorScheme:t}=e;return{container:{[bt.variable]:"colors.white",[pn.variable]:"colors.".concat(t,".600"),_dark:{[bt.variable]:"colors.gray.900",[pn.variable]:"colors.".concat(t,".200")},color:bt.reference}}}),t_={subtle:ZP,"left-accent":QP,"top-accent":JP,solid:e_},n_=XP({baseStyle:YP,variants:t_,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:Ip,defineMultiStyleConfig:r_}=Me(PS.keys),Ir=Q("avatar-border-color"),bo=Q("avatar-bg"),Ro=Q("avatar-font-size"),jr=Q("avatar-size"),o_={borderRadius:"full",border:"0.2em solid",borderColor:Ir.reference,[Ir.variable]:"white",_dark:{[Ir.variable]:"colors.gray.800"}},a_={bg:bo.reference,fontSize:Ro.reference,width:jr.reference,height:jr.reference,lineHeight:"1",[bo.variable]:"colors.gray.200",_dark:{[bo.variable]:"colors.whiteAlpha.400"}},i_=e=>{const{name:t,theme:n}=e,r=t?h1({string:t}):"colors.gray.400",o=d1(r)(n);let a="white";return o||(a="gray.800"),{bg:bo.reference,fontSize:Ro.reference,color:a,borderColor:Ir.reference,verticalAlign:"top",width:jr.reference,height:jr.reference,"&:not([data-loaded])":{[bo.variable]:r},[Ir.variable]:"colors.white",_dark:{[Ir.variable]:"colors.gray.800"}}},s_={fontSize:Ro.reference,lineHeight:"1"},l_=Ip(e=>({badge:lt(o_,e),excessLabel:lt(a_,e),container:lt(i_,e),label:s_}));function wn(e){const t=e!=="100%"?Sp[e]:void 0;return Ip({container:{[jr.variable]:t!=null?t:e,[Ro.variable]:"calc(".concat(t!=null?t:e," / 2.5)")},excessLabel:{[jr.variable]:t!=null?t:e,[Ro.variable]:"calc(".concat(t!=null?t:e," / 2.5)")}})}var c_={"2xs":wn(4),xs:wn(6),sm:wn(8),md:wn(12),lg:wn(16),xl:wn(24),"2xl":wn(32),full:wn("100%")},u_=r_({baseStyle:l_,sizes:c_,defaultProps:{size:"md"}}),d_={Accordion:KP,Alert:n_,Avatar:u_,Badge:mo,Breadcrumb:fP,Button:SP,Checkbox:ai,CloseButton:AP,Code:MP,Container:DP,Divider:zP,Drawer:Nk,Editable:Hk,Form:Yk,FormError:nP,FormLabel:oP,Heading:sP,Input:Ce,Kbd:TC,Link:AC,List:OC,Menu:UC,Modal:nk,NumberInput:dk,PinInput:mk,Popover:_k,Progress:Mw,Radio:Gw,Select:Jw,Skeleton:tC,SkipLink:rC,Slider:pC,Spinner:vC,Stat:PC,Switch:A1,Table:F1,Tabs:Z1,Tag:uw,Textarea:ww,Tooltip:Pw,Card:_P,Stepper:wS},f_={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},h_={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color"}}},p_="ltr",m_={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},Rp={semanticTokens:f_,direction:p_,...yS,components:d_,styles:h_,config:m_};function co(e){return typeof e=="function"}function g_(...e){return t=>e.reduce((n,r)=>r(n),t)}var v_=e=>function(...n){let r=[...n],o=n[n.length-1];return Xx(o)&&r.length>1?r=r.slice(0,r.length-1):o=e,g_(...r.map(a=>i=>co(a)?a(i):b_(i,a)))(o)},rj=v_(Rp);function b_(...e){return Et({},...e,Mp)}function Mp(e,t,n,r){if((co(e)||co(t))&&Object.prototype.hasOwnProperty.call(r,n))return(...o)=>{const a=co(e)?e(...o):e,i=co(t)?t(...o):t;return Et({},a,i,Mp)}}function y_(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Op(e){var t;return y_(e)&&(t=e.ownerDocument)!=null?t:document}function x_(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var S_=x_();function w_(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function oj(e,t){const n={};return t.forEach(r=>{r in e&&(n[r]=e[r])}),n}function C_(e,t,n,r){const o=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,o,a,i)=>{if(typeof r>"u")return e(r,o,a);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(o))return s.get(o);const l=e(r,o,a,i);return s.set(o,l),l}},Dp=k_(C_);function Fp(e,t){const n={};return Object.keys(e).forEach(r=>{const o=e[r];t(o,r,e)&&(n[r]=o)}),n}var Np=e=>Fp(e,t=>t!=null);function _c(e){return Array.isArray(e)}function P_(e){return _c(e)&&e.length===0}function __(e){return typeof e=="function"}function aj(e){return typeof e<"u"&&e!==void 0}function ij(e){return typeof e>"u"||e===void 0}function jp(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!_c(e)}function T_(e){return jp(e)&&Object.keys(e).length===0}function sj(e){return _c(e)?P_(e):jp(e)?T_(e):e==null||e===""}function Tc(e,...t){return __(e)?e(...t):e}function E_(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}const Bp=1/60*1e3,A_=typeof performance<"u"?()=>performance.now():()=>Date.now(),zp=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(A_()),Bp);function $_(e){let t=[],n=[],r=0,o=!1,a=!1;const i=new WeakSet,s={schedule:(l,c=!1,u=!1)=>{const d=u&&o,h=d?t:n;return c&&i.add(l),h.indexOf(l)===-1&&(h.push(l),d&&o&&(r=t.length)),l},cancel:l=>{const c=n.indexOf(l);c!==-1&&n.splice(c,1),i.delete(l)},process:l=>{if(o){a=!0;return}if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let c=0;c(e[t]=$_(()=>Mo=!0),e),{}),R_=Go.reduce((e,t)=>{const n=Ui[t];return e[t]=(r,o=!1,a=!1)=>(Mo||D_(),n.schedule(r,o,a)),e},{}),M_=Go.reduce((e,t)=>(e[t]=Ui[t].cancel,e),{});Go.reduce((e,t)=>(e[t]=()=>Ui[t].process(Rr),e),{});const O_=e=>Ui[e].process(Rr),Lp=e=>{Mo=!1,Rr.delta=Al?Bp:Math.max(Math.min(e-Rr.timestamp,I_),1),Rr.timestamp=e,$l=!0,Go.forEach(O_),$l=!1,Mo&&(Al=!1,zp(Lp))},D_=()=>{Mo=!0,Al=!0,$l||zp(Lp)},Fd=()=>Rr;function lj(e){return e!=null&&e.length?e[0]:void 0}function cj(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function uj(e,t,n=!0){const r=F_(e,t.length,n);return t[r]}function dj(e,t,n=!0){const r=Vp(e,t.length,1,n);return t[r]}function Vp(e,t,n=1,r=!0){const o=t-1;if(e===-1)return n>0?0:o;const a=e+n;return a<0?r?o:0:a>=t?r?0:e>t?t:e:a}function F_(e,t,n=!0){return Vp(e,t,-1,n)}var N_=typeof Element<"u",j_=typeof Map=="function",B_=typeof Set=="function",z_=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Ua(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,o;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Ua(e[r],t[r]))return!1;return!0}var a;if(j_&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(r=a.next()).done;)if(!t.has(r.value[0]))return!1;for(a=e.entries();!(r=a.next()).done;)if(!Ua(r.value[1],t.get(r.value[0])))return!1;return!0}if(B_&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(r=a.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(z_&&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(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if(N_&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((o[r]==="_owner"||o[r]==="__v"||o[r]==="__o")&&e.$$typeof)&&!Ua(e[o[r]],t[o[r]]))return!1;return!0}return e!==e&&t!==t}var L_=function(t,n){try{return Ua(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 V_=jh(L_);function Wp(e,t={}){var n;const{styleConfig:r,...o}=t,{theme:a,colorMode:i}=up(),s=e?Dp(a,"components.".concat(e)):void 0,l=r||s,c=Et({theme:a,colorMode:i},(n=l==null?void 0:l.defaultProps)!=null?n:{},Np(w_(o,["children"]))),u=f.useRef({});if(l){const h=Gx(l)(c);V_(u.current,h)||(u.current=h)}return u.current}function wt(e,t={}){return Wp(e,t)}function tt(e,t={}){return Wp(e,t)}var W_=new Set([...Ox,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),H_=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function U_(e){return H_.has(e)||!W_.has(e)}function G_(e,...t){if(e==null)throw new TypeError("Cannot convert undefined or null to object");const n={...e};for(const r of t)if(r!=null)for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&(o in n&&delete n[o],n[o]=r[o]);return n}function Hp(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var q_=/^((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|disableRemotePlayback|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)-.*))$/,K_=qh(function(e){return q_.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),X_=K_,Y_=function(t){return t!=="theme"},Nd=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?X_:Y_},jd=function(t,n,r){var o;if(n){var a=n.shouldForwardProp;o=t.__emotion_forwardProp&&a?function(i){return t.__emotion_forwardProp(i)&&a(i)}:a}return typeof o!="function"&&r&&(o=t.__emotion_forwardProp),o},Z_=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return Jh(n,r,o),u0(function(){return ep(n,r,o)}),null},Q_=function e(t,n){var r=t.__emotion_real===t,o=r&&t.__emotion_base||t,a,i;n!==void 0&&(a=n.label,i=n.target);var s=jd(t,n,r),l=s||Nd(o),c=!l("as");return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&d.push("label:"+a+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{d.push(u[0][0]);for(var h=u.length,p=1;pt=>{const{theme:n,css:r,__css:o,sx:a,...i}=t,s=Fp(i,(d,h)=>Fx(h)),l=Tc(e,t),c=G_({},o,l,Np(s),a),u=bp(c)(t.theme);return r?[u,r]:u};function zs(e,t){const{baseStyle:n,...r}=t!=null?t:{};r.shouldForwardProp||(r.shouldForwardProp=U_);const o=tT({baseStyle:n}),a=eT(e,r)(o);return At.forwardRef(function(l,c){const{colorMode:u,forced:d}=zi();return At.createElement(a,{ref:c,"data-theme":d?u:void 0,...l})})}function nT(){const e=new Map;return new Proxy(zs,{apply(t,n,r){return zs(...r)},get(t,n){return e.has(n)||e.set(n,zs(n)),e.get(n)}})}var D=nT();function F(e){return f.forwardRef(e)}function rT(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,o=f.createContext(void 0);o.displayName=r;function a(){var i;const s=f.useContext(o);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(i=Error.captureStackTrace)==null||i.call(Error,l,a),l}return s}return[o.Provider,a,o]}function oT(e){const{cssVarsRoot:t,theme:n,children:r}=e,o=f.useMemo(()=>Ix(n),[n]);return b.jsxs(h0,{theme:o,children:[b.jsx(aT,{root:t}),r]})}function aT({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return b.jsx(ji,{styles:n=>({[t]:n.__cssVars})})}rT({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function iT(){const{colorMode:e}=zi();return b.jsx(ji,{styles:t=>{const n=Dp(t,"styles.global"),r=Tc(n,{theme:t,colorMode:e});return r?bp(r)(t):void 0}})}var Up=f.createContext({getDocument(){return document},getWindow(){return window}});Up.displayName="EnvironmentContext";function Gp(e){const{children:t,environment:n,disabled:r}=e,o=f.useRef(null),a=f.useMemo(()=>n||{getDocument:()=>{var s,l;return(l=(s=o.current)==null?void 0:s.ownerDocument)!=null?l:document},getWindow:()=>{var s,l;return(l=(s=o.current)==null?void 0:s.ownerDocument.defaultView)!=null?l:window}},[n]),i=!r||!n;return b.jsxs(Up.Provider,{value:a,children:[t,i&&b.jsx("span",{id:"__chakra_env",hidden:!0,ref:o})]})}Gp.displayName="EnvironmentProvider";var sT=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetScope:o,resetCSS:a=!0,theme:i={},environment:s,cssVarsRoot:l,disableEnvironment:c,disableGlobalStyle:u}=e,d=b.jsx(Gp,{environment:s,disabled:c,children:t});return b.jsx(oT,{theme:i,cssVarsRoot:l,children:b.jsxs(cp,{colorModeManager:n,options:i.config,children:[a?b.jsx(g0,{scope:o}):b.jsx(m0,{}),!u&&b.jsx(iT,{}),r?b.jsx(sp,{zIndex:r,children:d}):d]})})},lT=(e,t)=>e.find(n=>n.id===t);function zd(e,t){const n=qp(e,t),r=n?e[n].findIndex(o=>o.id===t):-1;return{position:n,index:r}}function qp(e,t){for(const[n,r]of Object.entries(e))if(lT(r,t))return n}function cT(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function uT(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,o=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,a=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",i=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:o,right:a,left:i}}function We(e,t=[]){const n=f.useRef(e);return f.useEffect(()=>{n.current=e}),f.useCallback((...r)=>{var o;return(o=n.current)==null?void 0:o.call(n,...r)},t)}function dT(e,t){const n=We(e);f.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function mn(e,t){const n=f.useRef(!1),r=f.useRef(!1);f.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),f.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}const Kp=f.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Gi=f.createContext({}),qo=f.createContext(null),qi=typeof document<"u",Ec=qi?f.useLayoutEffect:f.useEffect,Xp=f.createContext({strict:!1}),Ac=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),fT="framerAppearId",Yp="data-"+Ac(fT);function hT(e,t,n,r){const{visualElement:o}=f.useContext(Gi),a=f.useContext(Xp),i=f.useContext(qo),s=f.useContext(Kp).reducedMotion,l=f.useRef();r=r||a.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceContext:i,blockInitialAnimation:i?i.initial===!1:!1,reducedMotionConfig:s}));const c=l.current;f.useInsertionEffect(()=>{c&&c.update(n,i)});const u=f.useRef(!!(n[Yp]&&!window.HandoffComplete));return Ec(()=>{c&&(c.render(),u.current&&c.animationState&&c.animationState.animateChanges())}),f.useEffect(()=>{c&&(c.updateFeatures(),!u.current&&c.animationState&&c.animationState.animateChanges(),u.current&&(u.current=!1,window.HandoffComplete=!0))}),c}function xr(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function pT(e,t,n){return f.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):xr(n)&&(n.current=r))},[t])}function Oo(e){return typeof e=="string"||Array.isArray(e)}function Ki(e){return typeof e=="object"&&typeof e.start=="function"}const $c=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ic=["initial",...$c];function Xi(e){return Ki(e.animate)||Ic.some(t=>Oo(e[t]))}function Zp(e){return!!(Xi(e)||e.variants)}function mT(e,t){if(Xi(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Oo(n)?n:void 0,animate:Oo(r)?r:void 0}}return e.inherit!==!1?t:{}}function gT(e){const{initial:t,animate:n}=mT(e,f.useContext(Gi));return f.useMemo(()=>({initial:t,animate:n}),[Ld(t),Ld(n)])}function Ld(e){return Array.isArray(e)?e.join(" "):e}const Vd={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Do={};for(const e in Vd)Do[e]={isEnabled:t=>Vd[e].some(n=>!!t[n])};function vT(e){for(const t in e)Do[t]={...Do[t],...e[t]}}const Rc=f.createContext({}),Qp=f.createContext({}),bT=Symbol.for("motionComponentSymbol");function yT({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&vT(e);function a(s,l){let c;const u={...f.useContext(Kp),...s,layoutId:xT(s)},{isStatic:d}=u,h=gT(s),p=r(s,d);if(!d&&qi){h.visualElement=hT(o,p,u,t);const g=f.useContext(Qp),m=f.useContext(Xp).strict;h.visualElement&&(c=h.visualElement.loadFeatures(u,m,e,g))}return f.createElement(Gi.Provider,{value:h},c&&h.visualElement?f.createElement(c,{visualElement:h.visualElement,...u}):null,n(o,s,pT(p,h.visualElement,l),p,d,h.visualElement))}const i=f.forwardRef(a);return i[bT]=o,i}function xT({layoutId:e}){const t=f.useContext(Rc).id;return t&&e!==void 0?t+"-"+e:e}function ST(e){function t(r,o={}){return yT(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const wT=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Mc(e){return typeof e!="string"||e.includes("-")?!1:!!(wT.indexOf(e)>-1||/[A-Z]/.test(e))}const li={};function CT(e){Object.assign(li,e)}const Ko=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],tr=new Set(Ko);function Jp(e,{layout:t,layoutId:n}){return tr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!li[e]||e==="opacity")}const mt=e=>!!(e&&e.getVelocity),kT={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},PT=Ko.length;function _T(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let a="";for(let i=0;it=>typeof t=="string"&&t.startsWith(e),tm=em("--"),Il=em("var(--"),TT=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,ET=(e,t)=>t&&typeof e=="number"?t.transform(e):e,En=(e,t,n)=>Math.min(Math.max(n,e),t),nr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},yo={...nr,transform:e=>En(0,1,e)},wa={...nr,default:1},xo=e=>Math.round(e*1e5)/1e5,Yi=/(-)?([\d]*\.?[\d])+/g,nm=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,AT=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Xo(e){return typeof e=="string"}const Yo=e=>({test:t=>Xo(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>"".concat(t).concat(e)}),Cn=Yo("deg"),Yt=Yo("%"),ee=Yo("px"),$T=Yo("vh"),IT=Yo("vw"),Wd={...Yt,parse:e=>Yt.parse(e)/100,transform:e=>Yt.transform(e*100)},Hd={...nr,transform:Math.round},rm={borderWidth:ee,borderTopWidth:ee,borderRightWidth:ee,borderBottomWidth:ee,borderLeftWidth:ee,borderRadius:ee,radius:ee,borderTopLeftRadius:ee,borderTopRightRadius:ee,borderBottomRightRadius:ee,borderBottomLeftRadius:ee,width:ee,maxWidth:ee,height:ee,maxHeight:ee,size:ee,top:ee,right:ee,bottom:ee,left:ee,padding:ee,paddingTop:ee,paddingRight:ee,paddingBottom:ee,paddingLeft:ee,margin:ee,marginTop:ee,marginRight:ee,marginBottom:ee,marginLeft:ee,rotate:Cn,rotateX:Cn,rotateY:Cn,rotateZ:Cn,scale:wa,scaleX:wa,scaleY:wa,scaleZ:wa,skew:Cn,skewX:Cn,skewY:Cn,distance:ee,translateX:ee,translateY:ee,translateZ:ee,x:ee,y:ee,z:ee,perspective:ee,transformPerspective:ee,opacity:yo,originX:Wd,originY:Wd,originZ:ee,zIndex:Hd,fillOpacity:yo,strokeOpacity:yo,numOctaves:Hd};function Oc(e,t,n,r){const{style:o,vars:a,transform:i,transformOrigin:s}=e;let l=!1,c=!1,u=!0;for(const d in t){const h=t[d];if(tm(d)){a[d]=h;continue}const p=rm[d],g=ET(h,p);if(tr.has(d)){if(l=!0,i[d]=g,!u)continue;h!==(p.default||0)&&(u=!1)}else d.startsWith("origin")?(c=!0,s[d]=g):o[d]=g}if(t.transform||(l||r?o.transform=_T(e.transform,n,u,r):o.transform&&(o.transform="none")),c){const{originX:d="50%",originY:h="50%",originZ:p=0}=s;o.transformOrigin="".concat(d," ").concat(h," ").concat(p)}}const Dc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function om(e,t,n){for(const r in t)!mt(t[r])&&!Jp(r,n)&&(e[r]=t[r])}function RT({transformTemplate:e},t,n){return f.useMemo(()=>{const r=Dc();return Oc(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function MT(e,t,n){const r=e.style||{},o={};return om(o,r,e),Object.assign(o,RT(e,t,n)),e.transformValues?e.transformValues(o):o}function OT(e,t,n){const r={},o=MT(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":"pan-".concat(e.drag==="x"?"y":"x")),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const DT=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function ci(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||DT.has(e)}let am=e=>!ci(e);function FT(e){e&&(am=t=>t.startsWith("on")?!ci(t):e(t))}try{FT(require("@emotion/is-prop-valid").default)}catch(e){}function NT(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(am(o)||n===!0&&ci(o)||!t&&!ci(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Ud(e,t,n){return typeof e=="string"?e:ee.transform(t+n*e)}function jT(e,t,n){const r=Ud(t,e.x,e.width),o=Ud(n,e.y,e.height);return"".concat(r," ").concat(o)}const BT={offset:"stroke-dashoffset",array:"stroke-dasharray"},zT={offset:"strokeDashoffset",array:"strokeDasharray"};function LT(e,t,n=1,r=0,o=!0){e.pathLength=1;const a=o?BT:zT;e[a.offset]=ee.transform(-r);const i=ee.transform(t),s=ee.transform(n);e[a.array]="".concat(i," ").concat(s)}function Fc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:a,pathLength:i,pathSpacing:s=1,pathOffset:l=0,...c},u,d,h){if(Oc(e,c,u,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:g,dimensions:m}=e;p.transform&&(m&&(g.transform=p.transform),delete p.transform),m&&(o!==void 0||a!==void 0||g.transform)&&(g.transformOrigin=jT(m,o!==void 0?o:.5,a!==void 0?a:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),i!==void 0&<(p,i,s,l,!1)}const im=()=>({...Dc(),attrs:{}}),Nc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function VT(e,t,n,r){const o=f.useMemo(()=>{const a=im();return Fc(a,t,{enableHardwareAcceleration:!1},Nc(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};om(a,e.style,e),o.style={...a,...o.style}}return o}function WT(e=!1){return(n,r,o,{latestValues:a},i)=>{const l=(Mc(n)?VT:OT)(r,a,i,n),u={...NT(r,typeof n=="string",e),...l,ref:o},{children:d}=r,h=f.useMemo(()=>mt(d)?d.get():d,[d]);return f.createElement(n,{...u,children:h})}}function sm(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const lm=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function cm(e,t,n,r){sm(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(lm.has(o)?o:Ac(o),t.attrs[o])}function jc(e,t){const{style:n}=e,r={};for(const o in n)(mt(n[o])||t.style&&mt(t.style[o])||Jp(o,e))&&(r[o]=n[o]);return r}function um(e,t){const n=jc(e,t);for(const r in e)if(mt(e[r])||mt(t[r])){const o=Ko.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[o]=e[r]}return n}function Bc(e,t,n,r={},o={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),t}function dm(e){const t=f.useRef(null);return t.current===null&&(t.current=e()),t.current}const ui=e=>Array.isArray(e),HT=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),UT=e=>ui(e)?e[e.length-1]||0:e;function Ga(e){const t=mt(e)?e.get():e;return HT(t)?t.toValue():t}function GT({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,a){const i={latestValues:qT(r,o,a,e),renderState:t()};return n&&(i.mount=s=>n(r,s,i)),i}const fm=e=>(t,n)=>{const r=f.useContext(Gi),o=f.useContext(qo),a=()=>GT(e,t,r,o);return n?a():dm(a)};function qT(e,t,n,r){const o={},a=r(e,{});for(const h in a)o[h]=Ga(a[h]);let{initial:i,animate:s}=e;const l=Xi(e),c=Zp(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?s:i;return d&&typeof d!="boolean"&&!Ki(d)&&(Array.isArray(d)?d:[d]).forEach(p=>{const g=Bc(e,p);if(!g)return;const{transitionEnd:m,transition:v,...S}=g;for(const x in S){let w=S[x];if(Array.isArray(w)){const k=u?w.length-1:0;w=w[k]}w!==null&&(o[x]=w)}for(const x in m)o[x]=m[x]}),o}const He=e=>e;class Gd{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function KT(e){let t=new Gd,n=new Gd,r=0,o=!1,a=!1;const i=new WeakSet,s={schedule:(l,c=!1,u=!1)=>{const d=u&&o,h=d?t:n;return c&&i.add(l),h.add(l)&&d&&o&&(r=t.order.length),l},cancel:l=>{n.remove(l),i.delete(l)},process:l=>{if(o){a=!0;return}if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let c=0;c(d[h]=KT(()=>n=!0),d),{}),i=d=>a[d].process(o),s=()=>{const d=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(d-o.timestamp,XT),1),o.timestamp=d,o.isProcessing=!0,Ca.forEach(i),o.isProcessing=!1,n&&t&&(r=!1,e(s))},l=()=>{n=!0,r=!0,o.isProcessing||e(s)};return{schedule:Ca.reduce((d,h)=>{const p=a[h];return d[h]=(g,m=!1,v=!1)=>(n||l(),p.schedule(g,m,v)),d},{}),cancel:d=>Ca.forEach(h=>a[h].cancel(d)),state:o,steps:a}}const{schedule:Re,cancel:gn,state:at,steps:Ls}=YT(typeof requestAnimationFrame<"u"?requestAnimationFrame:He,!0),ZT={useVisualState:fm({scrapeMotionValuesFromProps:um,createRenderState:im,onMount:(e,t,{renderState:n,latestValues:r})=>{Re.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch(o){n.dimensions={x:0,y:0,width:0,height:0}}}),Re.render(()=>{Fc(n,r,{enableHardwareAcceleration:!1},Nc(t.tagName),e.transformTemplate),cm(t,n)})}})},QT={useVisualState:fm({scrapeMotionValuesFromProps:jc,createRenderState:Dc})};function JT(e,{forwardMotionProps:t=!1},n,r){return{...Mc(e)?ZT:QT,preloadedFeatures:n,useRender:WT(t),createVisualElement:r,Component:e}}function cn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const hm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Zi(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const eE=e=>t=>hm(t)&&e(t,Zi(t));function dn(e,t,n,r){return cn(e,t,eE(n),r)}const tE=(e,t)=>n=>t(e(n)),Tn=(...e)=>e.reduce(tE);function pm(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const qd=pm("dragHorizontal"),Kd=pm("dragVertical");function mm(e){let t=!1;if(e==="y")t=Kd();else if(e==="x")t=qd();else{const n=qd(),r=Kd();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function gm(){const e=mm(!0);return e?(e(),!1):!0}class $n{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Xd(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),o=(a,i)=>{if(a.type==="touch"||gm())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t),s[r]&&Re.update(()=>s[r](a,i))};return dn(e.current,n,o,{passive:!e.getProps()[r]})}class nE extends $n{mount(){this.unmount=Tn(Xd(this.node,!0),Xd(this.node,!1))}unmount(){}}class rE extends $n{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(n){t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Tn(cn(this.node.current,"focus",()=>this.onFocus()),cn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const vm=(e,t)=>t?e===t?!0:vm(e,t.parentElement):!1;function Vs(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Zi(n))}class oE extends $n{constructor(){super(...arguments),this.removeStartListeners=He,this.removeEndListeners=He,this.removeAccessibleListeners=He,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),a=dn(window,"pointerup",(s,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u}=this.node.getProps();Re.update(()=>{vm(this.node.current,s.target)?c&&c(s,l):u&&u(s,l)})},{passive:!(r.onTap||r.onPointerUp)}),i=dn(window,"pointercancel",(s,l)=>this.cancelPress(s,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Tn(a,i),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=a=>{if(a.key!=="Enter"||this.isPressing)return;const i=s=>{s.key!=="Enter"||!this.checkPressEnd()||Vs("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&Re.update(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=cn(this.node.current,"keyup",i),Vs("down",(s,l)=>{this.startPress(s,l)})},n=cn(this.node.current,"keydown",t),r=()=>{this.isPressing&&Vs("cancel",(a,i)=>this.cancelPress(a,i))},o=cn(this.node.current,"blur",r);this.removeAccessibleListeners=Tn(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Re.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!gm()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Re.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=dn(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=cn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Tn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Rl=new WeakMap,Ws=new WeakMap,aE=e=>{const t=Rl.get(e.target);t&&t(e)},iE=e=>{e.forEach(aE)};function sE({root:e,...t}){const n=e||document;Ws.has(n)||Ws.set(n,{});const r=Ws.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(iE,{root:e,...t})),r[o]}function lE(e,t,n){const r=sE(t);return Rl.set(e,n),r.observe(e),()=>{Rl.delete(e),r.unobserve(e)}}const cE={some:0,all:1};class uE extends $n{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:a}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:cE[o]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,a&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=c?u:d;h&&h(l)};return lE(this.node.current,i,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(dE(t,n))&&this.startObserver()}unmount(){}}function dE({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const fE={inView:{Feature:uE},tap:{Feature:oE},focus:{Feature:rE},hover:{Feature:nE}};function bm(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[r]=n.get()),t}function pE(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Qi(e,t,n){const r=e.getProps();return Bc(r,t,n!==void 0?n:r.custom,hE(e),pE(e))}let di=He;const qn=e=>e*1e3,fn=e=>e/1e3,mE={current:!1},ym=e=>Array.isArray(e)&&typeof e[0]=="number";function xm(e){return!!(!e||typeof e=="string"&&Sm[e]||ym(e)||Array.isArray(e)&&e.every(xm))}const uo=([e,t,n,r])=>"cubic-bezier(".concat(e,", ").concat(t,", ").concat(n,", ").concat(r,")"),Sm={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:uo([0,.65,.55,1]),circOut:uo([.55,0,1,.45]),backIn:uo([.31,.01,.66,-.59]),backOut:uo([.33,1.53,.69,.99])};function wm(e){if(e)return ym(e)?uo(e):Array.isArray(e)?e.map(wm):Sm[e]}function gE(e,t,n,{delay:r=0,duration:o,repeat:a=0,repeatType:i="loop",ease:s,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=wm(s);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:a+1,direction:i==="reverse"?"alternate":"normal"})}function vE(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const Cm=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,bE=1e-7,yE=12;function xE(e,t,n,r,o){let a,i,s=0;do i=t+(n-t)/2,a=Cm(i,r,o)-e,a>0?n=i:t=i;while(Math.abs(a)>bE&&++sxE(a,0,1,e,n);return a=>a===0||a===1?a:Cm(o(a),t,r)}const SE=Zo(.42,0,1,1),wE=Zo(0,0,.58,1),km=Zo(.42,0,.58,1),CE=e=>Array.isArray(e)&&typeof e[0]!="number",Pm=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,_m=e=>t=>1-e(1-t),zc=e=>1-Math.sin(Math.acos(e)),Tm=_m(zc),kE=Pm(zc),Em=Zo(.33,1.53,.69,.99),Lc=_m(Em),PE=Pm(Lc),_E=e=>(e*=2)<1?.5*Lc(e):.5*(2-Math.pow(2,-10*(e-1))),Yd={linear:He,easeIn:SE,easeInOut:km,easeOut:wE,circIn:zc,circInOut:kE,circOut:Tm,backIn:Lc,backInOut:PE,backOut:Em,anticipate:_E},Zd=e=>{if(Array.isArray(e)){di(e.length===4);const[t,n,r,o]=e;return Zo(t,n,r,o)}else if(typeof e=="string")return di(Yd[e]!==void 0),Yd[e];return e},Vc=(e,t)=>n=>!!(Xo(n)&&AT.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Am=(e,t,n)=>r=>{if(!Xo(r))return r;const[o,a,i,s]=r.match(Yi);return{[e]:parseFloat(o),[t]:parseFloat(a),[n]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}},TE=e=>En(0,255,e),Hs={...nr,transform:e=>Math.round(TE(e))},Wn={test:Vc("rgb","red"),parse:Am("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Hs.transform(e)+", "+Hs.transform(t)+", "+Hs.transform(n)+", "+xo(yo.transform(r))+")"};function EE(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Ml={test:Vc("#"),parse:EE,transform:Wn.transform},Sr={test:Vc("hsl","hue"),parse:Am("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Yt.transform(xo(t))+", "+Yt.transform(xo(n))+", "+xo(yo.transform(r))+")"},it={test:e=>Wn.test(e)||Ml.test(e)||Sr.test(e),parse:e=>Wn.test(e)?Wn.parse(e):Sr.test(e)?Sr.parse(e):Ml.parse(e),transform:e=>Xo(e)?e:e.hasOwnProperty("red")?Wn.transform(e):Sr.transform(e)},Be=(e,t,n)=>-n*e+n*t+e;function Us(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 AE({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,a=0,i=0;if(!t)o=a=i=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;o=Us(l,s,e+1/3),a=Us(l,s,e),i=Us(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:r}}const Gs=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},$E=[Ml,Wn,Sr],IE=e=>$E.find(t=>t.test(e));function Qd(e){const t=IE(e);let n=t.parse(e);return t===Sr&&(n=AE(n)),n}const $m=(e,t)=>{const n=Qd(e),r=Qd(t),o={...n};return a=>(o.red=Gs(n.red,r.red,a),o.green=Gs(n.green,r.green,a),o.blue=Gs(n.blue,r.blue,a),o.alpha=Be(n.alpha,r.alpha,a),Wn.transform(o))};function RE(e){var t,n;return isNaN(e)&&Xo(e)&&(((t=e.match(Yi))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(nm))===null||n===void 0?void 0:n.length)||0)>0}const Im={regex:TT,countKey:"Vars",token:"${v}",parse:He},Rm={regex:nm,countKey:"Colors",token:"${c}",parse:it.parse},Mm={regex:Yi,countKey:"Numbers",token:"${n}",parse:nr.parse};function qs(e,{regex:t,countKey:n,token:r,parse:o}){const a=e.tokenised.match(t);a&&(e["num"+n]=a.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...a.map(o)))}function fi(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&qs(n,Im),qs(n,Rm),qs(n,Mm),n}function Om(e){return fi(e).values}function Dm(e){const{values:t,numColors:n,numVars:r,tokenised:o}=fi(e),a=t.length;return i=>{let s=o;for(let l=0;ltypeof e=="number"?0:e;function OE(e){const t=Om(e);return Dm(e)(t.map(ME))}const An={test:RE,parse:Om,createTransformer:Dm,getAnimatableNone:OE},Fm=(e,t)=>n=>"".concat(n>0?t:e);function Nm(e,t){return typeof e=="number"?n=>Be(e,t,n):it.test(e)?$m(e,t):e.startsWith("var(")?Fm(e,t):Bm(e,t)}const jm=(e,t)=>{const n=[...e],r=n.length,o=e.map((a,i)=>Nm(a,t[i]));return a=>{for(let i=0;i{const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Nm(e[o],t[o]));return o=>{for(const a in r)n[a]=r[a](o);return n}},Bm=(e,t)=>{const n=An.createTransformer(t),r=fi(e),o=fi(t);return r.numVars===o.numVars&&r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?Tn(jm(r.values,o.values),n):Fm(e,t)},Fo=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Jd=(e,t)=>n=>Be(e,t,n);function FE(e){return typeof e=="number"?Jd:typeof e=="string"?it.test(e)?$m:Bm:Array.isArray(e)?jm:typeof e=="object"?DE:Jd}function NE(e,t,n){const r=[],o=n||FE(e[0]),a=e.length-1;for(let i=0;it[0];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=NE(t,r,o),s=i.length,l=c=>{let u=0;if(s>1)for(;ul(En(e[0],e[a-1],c)):l}function jE(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Fo(0,t,r);e.push(Be(n,1,o))}}function BE(e){const t=[0];return jE(t,e.length-1),t}function zE(e,t){return e.map(n=>n*t)}function LE(e,t){return e.map(()=>t||km).splice(0,e.length-1)}function hi({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=CE(r)?r.map(Zd):Zd(r),a={done:!1,value:t[0]},i=zE(n&&n.length===t.length?n:BE(t),e),s=zm(i,t,{ease:Array.isArray(o)?o:LE(t,o)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}function Lm(e,t){return t?e*(1e3/t):0}const VE=5;function Vm(e,t,n){const r=Math.max(t-VE,0);return Lm(n-e(r),t-r)}const ef=.001,WE=.01,HE=10,UE=.05,GE=1;function qE({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,a,i=1-t;i=En(UE,GE,i),e=En(WE,HE,fn(e)),i<1?(o=c=>{const u=c*i,d=u*e,h=u-n,p=Ol(c,i),g=Math.exp(-d);return ef-h/p*g},a=c=>{const d=c*i*e,h=d*n+n,p=Math.pow(i,2)*Math.pow(c,2)*e,g=Math.exp(-d),m=Ol(Math.pow(c,2),i);return(-o(c)+ef>0?-1:1)*((h-p)*g)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},a=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=XE(o,a,s);if(e=qn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const KE=12;function XE(e,t,n){let r=n;for(let o=1;oe[n]!==void 0)}function QE(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!tf(e,ZE)&&tf(e,YE)){const n=qE(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function Wm({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],a=e[e.length-1],i={done:!1,value:o},{stiffness:s,damping:l,mass:c,velocity:u,duration:d,isResolvedFromDuration:h}=QE(r),p=u?-fn(u):0,g=l/(2*Math.sqrt(s*c)),m=a-o,v=fn(Math.sqrt(s/c)),S=Math.abs(m)<5;n||(n=S?.01:2),t||(t=S?.005:.5);let x;if(g<1){const w=Ol(v,g);x=k=>{const T=Math.exp(-g*v*k);return a-T*((p+g*v*m)/w*Math.sin(w*k)+m*Math.cos(w*k))}}else if(g===1)x=w=>a-Math.exp(-v*w)*(m+(p+v*m)*w);else{const w=v*Math.sqrt(g*g-1);x=k=>{const T=Math.exp(-g*v*k),E=Math.min(w*k,300);return a-T*((p+g*v*m)*Math.sinh(E)+w*m*Math.cosh(E))/w}}return{calculatedDuration:h&&d||null,next:w=>{const k=x(w);if(h)i.done=w>=d;else{let T=p;w!==0&&(g<1?T=Vm(x,w,k):T=0);const E=Math.abs(T)<=n,_=Math.abs(a-k)<=t;i.done=E&&_}return i.value=i.done?a:k,i}}}function nf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},p=I=>s!==void 0&&Il,g=I=>s===void 0?l:l===void 0||Math.abs(s-I)-m*Math.exp(-I/r),w=I=>S+x(I),k=I=>{const R=x(I),A=w(I);h.done=Math.abs(R)<=c,h.value=h.done?S:A};let T,E;const _=I=>{p(h.value)&&(T=I,E=Wm({keyframes:[h.value,g(h.value)],velocity:Vm(w,I,h.value),damping:o,stiffness:a,restDelta:c,restSpeed:u}))};return _(0),{calculatedDuration:null,next:I=>{let R=!1;return!E&&T===void 0&&(R=!0,k(I),_(I)),T!==void 0&&I>T?E.next(I-T):(!R&&k(I),h)}}}const JE=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Re.update(t,!0),stop:()=>gn(t),now:()=>at.isProcessing?at.timestamp:performance.now()}},rf=2e4;function of(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=rf?1/0:t}const eA={decay:nf,inertia:nf,tween:hi,keyframes:hi,spring:Wm};function pi({autoplay:e=!0,delay:t=0,driver:n=JE,keyframes:r,type:o="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:s="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:d,...h}){let p=1,g=!1,m,v;const S=()=>{v=new Promise(te=>{m=te})};S();let x;const w=eA[o]||hi;let k;w!==hi&&typeof r[0]!="number"&&(k=zm([0,100],r,{clamp:!1}),r=[0,100]);const T=w({...h,keyframes:r});let E;s==="mirror"&&(E=w({...h,keyframes:[...r].reverse(),velocity:-(h.velocity||0)}));let _="idle",I=null,R=null,A=null;T.calculatedDuration===null&&a&&(T.calculatedDuration=of(T));const{calculatedDuration:O}=T;let Y=1/0,q=1/0;O!==null&&(Y=O+i,q=Y*(a+1)-i);let K=0;const X=te=>{if(R===null)return;p>0&&(R=Math.min(R,te)),p<0&&(R=Math.min(te-q/p,R)),I!==null?K=I:K=Math.round(te-R)*p;const ve=K-t*(p>=0?1:-1),L=p>=0?ve<0:ve>q;K=Math.max(ve,0),_==="finished"&&I===null&&(K=q);let V=K,W=T;if(a){const me=K/Y;let Pe=Math.floor(me),be=me%1;!be&&me>=1&&(be=1),be===1&&Pe--,Pe=Math.min(Pe,a+1);const ae=!!(Pe%2);ae&&(s==="reverse"?(be=1-be,i&&(be-=i/Y)):s==="mirror"&&(W=E));let Ae=En(0,1,be);K>q&&(Ae=s==="reverse"&&ae?1:0),V=Ae*Y}const ie=L?{done:!1,value:r[0]}:W.next(V);k&&(ie.value=k(ie.value));let{done:he}=ie;!L&&O!==null&&(he=p>=0?K>=q:K<=0);const ce=I===null&&(_==="finished"||_==="running"&&he);return d&&d(ie.value),ce&&B(),ie},U=()=>{x&&x.stop(),x=void 0},M=()=>{_="idle",U(),m(),S(),R=A=null},B=()=>{_="finished",u&&u(),U(),m()},re=()=>{if(g)return;x||(x=n(X));const te=x.now();l&&l(),I!==null?R=te-I:(!R||_==="finished")&&(R=te),_==="finished"&&S(),A=R,I=null,_="running",x.start()};e&&re();const oe={then(te,ve){return v.then(te,ve)},get time(){return fn(K)},set time(te){te=qn(te),K=te,I!==null||!x||p===0?I=te:R=x.now()-te/p},get duration(){const te=T.calculatedDuration===null?of(T):T.calculatedDuration;return fn(te)},get speed(){return p},set speed(te){te===p||!x||(p=te,oe.time=fn(K))},get state(){return _},play:re,pause:()=>{_="paused",I=K},stop:()=>{g=!0,_!=="idle"&&(_="idle",c&&c(),M())},cancel:()=>{A!==null&&X(A),M()},complete:()=>{_="finished"},sample:te=>(R=0,X(te))};return oe}function tA(e){let t;return()=>(t===void 0&&(t=e()),t)}const nA=tA(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),rA=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),ka=10,oA=2e4,aA=(e,t)=>t.type==="spring"||e==="backgroundColor"||!xm(t.ease);function iA(e,t,{onUpdate:n,onComplete:r,...o}){if(!(nA()&&rA.has(t)&&!o.repeatDelay&&o.repeatType!=="mirror"&&o.damping!==0&&o.type!=="inertia"))return!1;let i=!1,s,l;const c=()=>{l=new Promise(x=>{s=x})};c();let{keyframes:u,duration:d=300,ease:h,times:p}=o;if(aA(t,o)){const x=pi({...o,repeat:0,delay:0});let w={done:!1,value:u[0]};const k=[];let T=0;for(;!w.done&&Tg.cancel(),v=()=>{Re.update(m),s(),c()};return g.onfinish=()=>{e.set(vE(u,o)),r&&r(),v()},{then(x,w){return l.then(x,w)},attachTimeline(x){return g.timeline=x,g.onfinish=null,He},get time(){return fn(g.currentTime||0)},set time(x){g.currentTime=qn(x)},get speed(){return g.playbackRate},set speed(x){g.playbackRate=x},get duration(){return fn(d)},play:()=>{i||(g.play(),gn(m))},pause:()=>g.pause(),stop:()=>{if(i=!0,g.playState==="idle")return;const{currentTime:x}=g;if(x){const w=pi({...o,autoplay:!1});e.setWithVelocity(w.sample(x-ka).value,w.sample(x).value,ka)}v()},complete:()=>g.finish(),cancel:v}}function sA({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:He,pause:He,stop:He,then:a=>(a(),Promise.resolve()),cancel:He,complete:He});return t?pi({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}const lA={type:"spring",stiffness:500,damping:25,restSpeed:10},cA=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),uA={type:"keyframes",duration:.8},dA={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},fA=(e,{keyframes:t})=>t.length>2?uA:tr.has(e)?e.startsWith("scale")?cA(t[1]):lA:dA,Dl=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(An.test(t)||t==="0")&&!t.startsWith("url(")),hA=new Set(["brightness","contrast","saturate","opacity"]);function pA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Yi)||[];if(!r)return e;const o=n.replace(r,"");let a=hA.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+o+")"}const mA=/([a-z-]*)\(.*?\)/g,Fl={...An,getAnimatableNone:e=>{const t=e.match(mA);return t?t.map(pA).join(" "):e}},gA={...rm,color:it,backgroundColor:it,outlineColor:it,fill:it,stroke:it,borderColor:it,borderTopColor:it,borderRightColor:it,borderBottomColor:it,borderLeftColor:it,filter:Fl,WebkitFilter:Fl},Wc=e=>gA[e];function Hm(e,t){let n=Wc(e);return n!==Fl&&(n=An),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Um=e=>/^0[^.\s]+$/.test(e);function vA(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Um(e)}function bA(e,t,n,r){const o=Dl(t,n);let a;Array.isArray(n)?a=[...n]:a=[null,n];const i=r.from!==void 0?r.from:e.get();let s;const l=[];for(let c=0;co=>{const a=Hc(r,e)||{},i=a.delay||r.delay||0;let{elapsed:s=0}=r;s=s-qn(i);const l=bA(t,e,n,a),c=l[0],u=l[l.length-1],d=Dl(e,c),h=Dl(e,u);let p={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...a,delay:-s,onUpdate:g=>{t.set(g),a.onUpdate&&a.onUpdate(g)},onComplete:()=>{o(),a.onComplete&&a.onComplete()}};if(yA(a)||(p={...p,...fA(e,p)}),p.duration&&(p.duration=qn(p.duration)),p.repeatDelay&&(p.repeatDelay=qn(p.repeatDelay)),!d||!h||mE.current||a.type===!1)return sA(p);if(!r.isHandoff&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const g=iA(t,e,p);if(g)return g}return pi(p)};function mi(e){return!!(mt(e)&&e.add)}const Gm=e=>/^\-?\d*\.?\d+$/.test(e);function Gc(e,t){e.indexOf(t)===-1&&e.push(t)}function qc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Kc{constructor(){this.subscriptions=[]}add(t){return Gc(this.subscriptions,t),()=>qc(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let a=0;a!isNaN(parseFloat(e));class SA{constructor(t,n={}){this.version="10.16.16",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,o=!0)=>{this.prev=this.current,this.current=r;const{delta:a,timestamp:i}=at;this.lastUpdated!==i&&(this.timeDelta=a,this.lastUpdated=i,Re.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Re.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=xA(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Kc);const r=this.events[t].add(n);return t==="change"?()=>{r(),Re.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Lm(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Br(e,t){return new SA(e,t)}const qm=e=>t=>t.test(e),wA={test:e=>e==="auto",parse:e=>e},Km=[nr,ee,Yt,Cn,IT,$T,wA],to=e=>Km.find(qm(e)),CA=[...Km,it,An],kA=e=>CA.find(qm(e));function PA(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Br(n))}function _A(e,t){const n=Qi(e,t);let{transitionEnd:r={},transition:o={},...a}=n?e.makeTargetAnimatable(n,!1):{};a={...a,...r};for(const i in a){const s=UT(a[i]);PA(e,i,s)}}function TA(e,t,n){var r,o;const a=Object.keys(t).filter(s=>!e.hasValue(s)),i=a.length;if(i)for(let s=0;sl.remove(d))),c.push(v)}return i&&Promise.all(c).then(()=>{i&&_A(e,i)}),c}function Nl(e,t,n={}){const r=Qi(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const a=r?()=>Promise.all(Xm(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return RA(e,t,c+l,u,d,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[l,c]=s==="beforeChildren"?[a,i]:[i,a];return l().then(()=>c())}else return Promise.all([a(),i(n.delay)])}function RA(e,t,n=0,r=0,o=1,a){const i=[],s=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>s-c*r;return Array.from(e.variantChildren).sort(MA).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(Nl(c,t,{...a,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function MA(e,t){return e.sortNodePosition(t)}function OA(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(a=>Nl(e,a,n));r=Promise.all(o)}else if(typeof t=="string")r=Nl(e,t,n);else{const o=typeof t=="function"?Qi(e,t,n.custom):t;r=Promise.all(Xm(e,o,n))}return r.then(()=>e.notify("AnimationComplete",t))}const DA=[...$c].reverse(),FA=$c.length;function NA(e){return t=>Promise.all(t.map(({animation:n,options:r})=>OA(e,n,r)))}function jA(e){let t=NA(e);const n=zA();let r=!0;const o=(l,c)=>{const u=Qi(e,c);if(u){const{transition:d,transitionEnd:h,...p}=u;l={...l,...p,...h}}return l};function a(l){t=l(e)}function i(l,c){const u=e.getProps(),d=e.getVariantContext(!0)||{},h=[],p=new Set;let g={},m=1/0;for(let S=0;Sm&&T;const A=Array.isArray(k)?k:[k];let O=A.reduce(o,{});E===!1&&(O={});const{prevResolvedValues:Y={}}=w,q={...Y,...O},K=X=>{R=!0,p.delete(X),w.needsAnimating[X]=!0};for(const X in q){const U=O[X],M=Y[X];g.hasOwnProperty(X)||(U!==M?ui(U)&&ui(M)?!bm(U,M)||I?K(X):w.protectedKeys[X]=!0:U!==void 0?K(X):p.add(X):U!==void 0&&p.has(X)?K(X):w.protectedKeys[X]=!0)}w.prevProp=k,w.prevResolvedValues=O,w.isActive&&(g={...g,...O}),r&&e.blockInitialAnimation&&(R=!1),R&&!_&&h.push(...A.map(X=>({animation:X,options:{type:x,...l}})))}if(p.size){const S={};p.forEach(x=>{const w=e.getBaseTarget(x);w!==void 0&&(S[x]=w)}),h.push({animation:S})}let v=!!h.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(h):Promise.resolve()}function s(l,c,u){var d;if(n[l].isActive===c)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(p=>{var g;return(g=p.animationState)===null||g===void 0?void 0:g.setActive(l,c)}),n[l].isActive=c;const h=i(u,l);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:i,setActive:s,setAnimateFunction:a,getState:()=>n}}function BA(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!bm(t,e):!1}function Fn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zA(){return{animate:Fn(!0),whileInView:Fn(),whileHover:Fn(),whileTap:Fn(),whileDrag:Fn(),whileFocus:Fn(),exit:Fn()}}class LA extends $n{constructor(t){super(t),t.animationState||(t.animationState=jA(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Ki(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let VA=0;class WA extends $n{constructor(){super(...arguments),this.id=VA++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const a=this.node.animationState.setActive("exit",!t,{custom:r!=null?r:this.node.getProps().custom});n&&!t&&a.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const HA={animation:{Feature:LA},exit:{Feature:WA}},af=(e,t)=>Math.abs(e-t);function UA(e,t){const n=af(e.x,t.x),r=af(e.y,t.y);return Math.sqrt(n**2+r**2)}class Ym{constructor(t,n,{transformPagePoint:r,contextWindow:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Xs(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=UA(u.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=u,{timestamp:g}=at;this.history.push({...p,timestamp:g});const{onStart:m,onMove:v}=this.handlers;d||(m&&m(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,u)},this.handlePointerMove=(u,d)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Ks(d,this.transformPagePoint),Re.update(this.updatePoint,!0)},this.handlePointerUp=(u,d)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:h,onSessionEnd:p}=this.handlers,g=Xs(u.type==="pointercancel"?this.lastMoveEventInfo:Ks(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(u,g),p&&p(u,g)},!hm(t))return;this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const a=Zi(t),i=Ks(a,this.transformPagePoint),{point:s}=i,{timestamp:l}=at;this.history=[{...s,timestamp:l}];const{onSessionStart:c}=n;c&&c(t,Xs(i,this.history)),this.removeListeners=Tn(dn(this.contextWindow,"pointermove",this.handlePointerMove),dn(this.contextWindow,"pointerup",this.handlePointerUp),dn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),gn(this.updatePoint)}}function Ks(e,t){return t?{point:t(e.point)}:e}function sf(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Xs({point:e},t){return{point:e,delta:sf(e,Zm(t)),offset:sf(e,GA(t)),velocity:qA(t,.1)}}function GA(e){return e[0]}function Zm(e){return e[e.length-1]}function qA(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Zm(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>qn(t)));)n--;if(!r)return{x:0,y:0};const a=fn(o.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const i={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function yt(e){return e.max-e.min}function jl(e,t=0,n=.01){return Math.abs(e-t)<=n}function lf(e,t,n,r=.5){e.origin=r,e.originPoint=Be(t.min,t.max,e.origin),e.scale=yt(n)/yt(t),(jl(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Be(n.min,n.max,e.origin)-e.originPoint,(jl(e.translate)||isNaN(e.translate))&&(e.translate=0)}function So(e,t,n,r){lf(e.x,t.x,n.x,r?r.originX:void 0),lf(e.y,t.y,n.y,r?r.originY:void 0)}function cf(e,t,n){e.min=n.min+t.min,e.max=e.min+yt(t)}function KA(e,t,n){cf(e.x,t.x,n.x),cf(e.y,t.y,n.y)}function uf(e,t,n){e.min=t.min-n.min,e.max=e.min+yt(t)}function wo(e,t,n){uf(e.x,t.x,n.x),uf(e.y,t.y,n.y)}function XA(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Be(n,e,r.max):Math.min(e,n)),e}function df(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function YA(e,{top:t,left:n,bottom:r,right:o}){return{x:df(e.x,n,o),y:df(e.y,t,r)}}function ff(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Fo(t.min,t.max-r,e.min):r>o&&(n=Fo(e.min,e.max-o,t.min)),En(0,1,n)}function JA(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Bl=.35;function e$(e=Bl){return e===!1?e=0:e===!0&&(e=Bl),{x:hf(e,"left","right"),y:hf(e,"top","bottom")}}function hf(e,t,n){return{min:pf(e,t),max:pf(e,n)}}function pf(e,t){return typeof e=="number"?e:e[t]||0}const mf=()=>({translate:0,scale:1,origin:0,originPoint:0}),wr=()=>({x:mf(),y:mf()}),gf=()=>({min:0,max:0}),Ge=()=>({x:gf(),y:gf()});function Lt(e){return[e("x"),e("y")]}function Qm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function t$({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function n$(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ys(e){return e===void 0||e===1}function zl({scale:e,scaleX:t,scaleY:n}){return!Ys(e)||!Ys(t)||!Ys(n)}function Nn(e){return zl(e)||Jm(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Jm(e){return vf(e.x)||vf(e.y)}function vf(e){return e&&e!=="0%"}function gi(e,t,n){const r=e-n,o=t*r;return n+o}function bf(e,t,n,r,o){return o!==void 0&&(e=gi(e,o,r)),gi(e,n,r)+t}function Ll(e,t=0,n=1,r,o){e.min=bf(e.min,t,n,r,o),e.max=bf(e.max,t,n,r,o)}function eg(e,{x:t,y:n}){Ll(e.x,t.translate,t.scale,t.originPoint),Ll(e.y,n.translate,n.scale,n.originPoint)}function r$(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let a,i;for(let s=0;s1.0000000000001||e<.999999999999?e:1}function Pn(e,t){e.min=e.min+t,e.max=e.max+t}function xf(e,t,[n,r,o]){const a=t[o]!==void 0?t[o]:.5,i=Be(e.min,e.max,a);Ll(e,t[n],t[r],i,t.scale)}const o$=["x","scaleX","originX"],a$=["y","scaleY","originY"];function Cr(e,t){xf(e.x,t,o$),xf(e.y,t,a$)}function tg(e,t){return Qm(n$(e.getBoundingClientRect(),t))}function i$(e,t,n){const r=tg(e,n),{scroll:o}=t;return o&&(Pn(r.x,o.offset.x),Pn(r.y,o.offset.y)),r}const ng=({current:e})=>e?e.ownerDocument.defaultView:null,s$=new WeakMap;class l${constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ge(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=l=>{this.stopAnimation(),n&&this.snapToCursor(Zi(l,"page").point)},a=(l,c)=>{const{drag:u,dragPropagation:d,onDragStart:h}=this.getProps();if(u&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=mm(u),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Lt(g=>{let m=this.getAxisMotionValue(g).get()||0;if(Yt.test(m)){const{projection:v}=this.visualElement;if(v&&v.layout){const S=v.layout.layoutBox[g];S&&(m=yt(S)*(parseFloat(m)/100))}}this.originPoint[g]=m}),h&&Re.update(()=>h(l,c),!1,!0);const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},i=(l,c)=>{const{dragPropagation:u,dragDirectionLock:d,onDirectionLock:h,onDrag:p}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:g}=c;if(d&&this.currentDirection===null){this.currentDirection=c$(g),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",c.point,g),this.updateAxis("y",c.point,g),this.visualElement.render(),p&&p(l,c)},s=(l,c)=>this.stop(l,c);this.panSession=new Ym(t,{onSessionStart:o,onStart:a,onMove:i,onSessionEnd:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),contextWindow:ng(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&Re.update(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Pa(t,o,this.currentDirection))return;const a=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=XA(i,this.constraints[t],this.elastic[t])),a.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,a=this.constraints;n&&xr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=YA(o.layoutBox,n):this.constraints=!1,this.elastic=e$(r),a!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Lt(i=>{this.getAxisMotionValue(i)&&(this.constraints[i]=JA(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!xr(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const a=i$(r,o.root,this.visualElement.getTransformPagePoint());let i=ZA(o.layout.layoutBox,a);if(n){const s=n(t$(i));this.hasMutatedConstraints=!!s,s&&(i=Qm(s))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=Lt(u=>{if(!Pa(u,n,this.currentDirection))return;let d=l[u]||{};i&&(d={min:0,max:0});const h=o?200:1e6,p=o?40:1e7,g={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(u,g)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Uc(t,r,0,n))}stopAnimation(){Lt(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Lt(n=>{const{drag:r}=this.getProps();if(!Pa(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,a=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:s}=o.layout.layoutBox[n];a.set(t[n]-Be(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!xr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Lt(i=>{const s=this.getAxisMotionValue(i);if(s){const l=s.get();o[i]=QA({min:l,max:l},this.constraints[i])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Lt(i=>{if(!Pa(i,t,null))return;const s=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];s.set(Be(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;s$.set(this.visualElement,this);const t=this.visualElement.current,n=dn(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();xr(l)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),r();const i=cn(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Lt(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),a(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:a=!1,dragElastic:i=Bl,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:a,dragElastic:i,dragMomentum:s}}}function Pa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function c$(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class u$ extends $n{constructor(t){super(t),this.removeGroupControls=He,this.removeListeners=He,this.controls=new l$(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||He}unmount(){this.removeGroupControls(),this.removeListeners()}}const Sf=e=>(t,n)=>{e&&Re.update(()=>e(t,n))};class d$ extends $n{constructor(){super(...arguments),this.removePointerDownListener=He}onPointerDown(t){this.session=new Ym(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ng(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Sf(t),onStart:Sf(n),onMove:r,onEnd:(a,i)=>{delete this.session,o&&Re.update(()=>o(a,i))}}}mount(){this.removePointerDownListener=dn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function rg(){const e=f.useContext(qo);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=f.useId();return f.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}function f$(){return h$(f.useContext(qo))}function h$(e){return e===null?!0:e.isPresent}const qa={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function wf(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const no={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ee.test(e))e=parseFloat(e);else return e;const n=wf(e,t.target.x),r=wf(e,t.target.y);return"".concat(n,"% ").concat(r,"%")}},p$={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=An.parse(e);if(o.length>5)return r;const a=An.createTransformer(e),i=typeof o[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=s,o[1+i]/=l;const c=Be(s,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),a(o)}};class m$ extends At.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:a}=t;CT(g$),a&&(n.group&&n.group.add(a),r&&r.register&&o&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),qa.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:a}=this.props,i=r.projection;return i&&(i.isPresent=a,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?i.promote():i.relegate()||Re.postRender(()=>{const s=i.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function og(e){const[t,n]=rg(),r=f.useContext(Rc);return At.createElement(m$,{...e,layoutGroup:r,switchLayoutGroup:f.useContext(Qp),isPresent:t,safeToRemove:n})}const g$={borderRadius:{...no,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:no,borderTopRightRadius:no,borderBottomLeftRadius:no,borderBottomRightRadius:no,boxShadow:p$},ag=["TopLeft","TopRight","BottomLeft","BottomRight"],v$=ag.length,Cf=e=>typeof e=="string"?parseFloat(e):e,kf=e=>typeof e=="number"||ee.test(e);function b$(e,t,n,r,o,a){o?(e.opacity=Be(0,n.opacity!==void 0?n.opacity:1,y$(r)),e.opacityExit=Be(t.opacity!==void 0?t.opacity:1,0,x$(r))):a&&(e.opacity=Be(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;irt?1:n(Fo(e,t,r))}function _f(e,t){e.min=t.min,e.max=t.max}function Pt(e,t){_f(e.x,t.x),_f(e.y,t.y)}function Tf(e,t,n,r,o){return e-=t,e=gi(e,1/n,r),o!==void 0&&(e=gi(e,1/o,r)),e}function S$(e,t=0,n=1,r=.5,o,a=e,i=e){if(Yt.test(t)&&(t=parseFloat(t),t=Be(i.min,i.max,t/100)-i.min),typeof t!="number")return;let s=Be(a.min,a.max,r);e===a&&(s-=t),e.min=Tf(e.min,t,n,s,o),e.max=Tf(e.max,t,n,s,o)}function Ef(e,t,[n,r,o],a,i){S$(e,t[n],t[r],t[o],t.scale,a,i)}const w$=["x","scaleX","originX"],C$=["y","scaleY","originY"];function Af(e,t,n,r){Ef(e.x,t,w$,n?n.x:void 0,r?r.x:void 0),Ef(e.y,t,C$,n?n.y:void 0,r?r.y:void 0)}function $f(e){return e.translate===0&&e.scale===1}function sg(e){return $f(e.x)&&$f(e.y)}function k$(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function lg(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function If(e){return yt(e.x)/yt(e.y)}class P${constructor(){this.members=[]}add(t){Gc(this.members,t),t.scheduleRender()}remove(t){if(qc(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const a=this.members[o];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Rf(e,t,n){let r="";const o=e.x.translate/t.x,a=e.y.translate/t.y;if((o||a)&&(r="translate3d(".concat(o,"px, ").concat(a,"px, 0) ")),(t.x!==1||t.y!==1)&&(r+="scale(".concat(1/t.x,", ").concat(1/t.y,") ")),n){const{rotate:l,rotateX:c,rotateY:u}=n;l&&(r+="rotate(".concat(l,"deg) ")),c&&(r+="rotateX(".concat(c,"deg) ")),u&&(r+="rotateY(".concat(u,"deg) "))}const i=e.x.scale*t.x,s=e.y.scale*t.y;return(i!==1||s!==1)&&(r+="scale(".concat(i,", ").concat(s,")")),r||"none"}const _$=(e,t)=>e.depth-t.depth;class T${constructor(){this.children=[],this.isDirty=!1}add(t){Gc(this.children,t),this.isDirty=!0}remove(t){qc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(_$),this.isDirty=!1,this.children.forEach(t)}}function E$(e,t){const n=performance.now(),r=({timestamp:o})=>{const a=o-n;a>=t&&(gn(r),e(a-t))};return Re.read(r,!0),()=>gn(r)}function A$(e){window.MotionDebug&&window.MotionDebug.record(e)}function $$(e){return e instanceof SVGElement&&e.tagName!=="svg"}function I$(e,t,n){const r=mt(e)?e:Br(e);return r.start(Uc("",r,t,n)),r.animation}const Mf=["","X","Y","Z"],R$={visibility:"hidden"},Of=1e3;let M$=0;const jn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function cg({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},s=t==null?void 0:t()){this.id=M$++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,jn.totalNodes=jn.resolvedTargetDeltas=jn.recalculatedProjection=0,this.nodes.forEach(F$),this.nodes.forEach(L$),this.nodes.forEach(V$),this.nodes.forEach(N$),A$(jn)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=E$(h,250),qa.hasAnimatedSinceResize&&(qa.hasAnimatedSinceResize=!1,this.nodes.forEach(Ff))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||q$,{onLayoutAnimationStart:v,onLayoutAnimationComplete:S}=u.getProps(),x=!this.targetLayout||!lg(this.targetLayout,g)||p,w=!h&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const k={...Hc(m,"layout"),onPlay:v,onComplete:S};(u.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else h||Ff(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,gn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(W$),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;uthis.update()))}clearAllSnapshots(){this.nodes.forEach(j$),this.sharedNodes.forEach(H$)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Re.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Re.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const T=k/1e3;Nf(d.x,i.x,T),Nf(d.y,i.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wo(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),U$(this.relativeTarget,this.relativeTargetOrigin,h,T),w&&k$(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Ge()),Pt(w,this.relativeTarget)),m&&(this.animationValues=u,b$(u,c,this.latestValues,T,x,S)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(gn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Re.update(()=>{qa.hasAnimatedSinceResize=!0,this.currentAnimation=I$(0,Of,{...i,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Of),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:u}=i;if(!(!s||!l||!c)){if(this!==i&&this.layout&&c&&ug(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ge();const d=yt(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const h=yt(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+h}Pt(s,l),Cr(s,u),So(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new P$),this.sharedNodes.get(i).add(s);const c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:s}=this.options;return s?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:s}=this.options;return s?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetRotation(){const{visualElement:i}=this.options;if(!i)return;let s=!1;const{latestValues:l}=i;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const c={};for(let u=0;u{var s;return(s=i.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(Df),this.root.sharedNodes.clear()}}}function O$(e){e.updateLayout()}function D$(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:a}=e.options,i=n.source!==e.layout.source;a==="size"?Lt(d=>{const h=i?n.measuredBox[d]:n.layoutBox[d],p=yt(h);h.min=r[d].min,h.max=h.min+p}):ug(a,n.layoutBox,r)&&Lt(d=>{const h=i?n.measuredBox[d]:n.layoutBox[d],p=yt(r[d]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const s=wr();So(s,r,n.layoutBox);const l=wr();i?So(l,e.applyTransform(o,!0),n.measuredBox):So(l,r,n.layoutBox);const c=!sg(s);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:p}=d;if(h&&p){const g=Ge();wo(g,n.layoutBox,h.layoutBox);const m=Ge();wo(m,r,p.layoutBox),lg(g,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function F$(e){jn.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function N$(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function j$(e){e.clearSnapshot()}function Df(e){e.clearMeasurements()}function B$(e){e.isLayoutDirty=!1}function z$(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ff(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function L$(e){e.resolveTargetDelta()}function V$(e){e.calcProjection()}function W$(e){e.resetRotation()}function H$(e){e.removeLeadSnapshot()}function Nf(e,t,n){e.translate=Be(t.translate,0,n),e.scale=Be(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function jf(e,t,n,r){e.min=Be(t.min,n.min,r),e.max=Be(t.max,n.max,r)}function U$(e,t,n,r){jf(e.x,t.x,n.x,r),jf(e.y,t.y,n.y,r)}function G$(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const q$={duration:.45,ease:[.4,0,.1,1]},Bf=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),zf=Bf("applewebkit/")&&!Bf("chrome/")?Math.round:He;function Lf(e){e.min=zf(e.min),e.max=zf(e.max)}function K$(e){Lf(e.x),Lf(e.y)}function ug(e,t,n){return e==="position"||e==="preserve-aspect"&&!jl(If(t),If(n),.2)}const X$=cg({attachResizeListener:(e,t)=>cn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Zs={current:void 0},dg=cg({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Zs.current){const e=new X$({});e.mount(window),e.setOptions({layoutScroll:!0}),Zs.current=e}return Zs.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Y$={pan:{Feature:d$},drag:{Feature:u$,ProjectionNode:dg,MeasureLayout:og}},Z$=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Q$(e){const t=Z$.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function Vl(e,t,n=1){const[r,o]=Q$(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const i=a.trim();return Gm(i)?parseFloat(i):i}else return Il(o)?Vl(o,t,n+1):o}function J$(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(o=>{const a=o.get();if(!Il(a))return;const i=Vl(a,r);i&&o.set(i)});for(const o in t){const a=t[o];if(!Il(a))continue;const i=Vl(a,r);i&&(t[o]=i,n||(n={}),n[o]===void 0&&(n[o]=a))}return{target:t,transitionEnd:n}}const e2=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),fg=e=>e2.has(e),t2=e=>Object.keys(e).some(fg),Vf=e=>e===nr||e===ee,Wf=(e,t)=>parseFloat(e.split(", ")[t]),Hf=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return Wf(o[1],t);{const a=r.match(/^matrix\((.+)\)$/);return a?Wf(a[1],e):0}},n2=new Set(["x","y","z"]),r2=Ko.filter(e=>!n2.has(e));function o2(e){const t=[];return r2.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const zr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Hf(4,13),y:Hf(5,14)};zr.translateX=zr.x;zr.translateY=zr.y;const a2=(e,t,n)=>{const r=t.measureViewportBox(),o=t.current,a=getComputedStyle(o),{display:i}=a,s={};i==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(c=>{s[c]=zr[c](r,a)}),t.render();const l=t.measureViewportBox();return n.forEach(c=>{const u=t.getValue(c);u&&u.jump(s[c]),e[c]=zr[c](l,a)}),e},i2=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(fg);let a=[],i=!1;const s=[];if(o.forEach(l=>{const c=e.getValue(l);if(!e.hasValue(l))return;let u=n[l],d=to(u);const h=t[l];let p;if(ui(h)){const g=h.length,m=h[0]===null?1:0;u=h[m],d=to(u);for(let v=m;v=0?window.pageYOffset:null,c=a2(t,e,s);return a.length&&a.forEach(([u,d])=>{e.getValue(u).set(d)}),e.render(),qi&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:r}}else return{target:t,transitionEnd:r}};function s2(e,t,n,r){return t2(t)?i2(e,t,n,r):{target:t,transitionEnd:r}}const l2=(e,t,n,r)=>{const o=J$(e,t,r);return t=o.target,r=o.transitionEnd,s2(e,t,n,r)},Wl={current:null},hg={current:!1};function c2(){if(hg.current=!0,!!qi)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Wl.current=e.matches;e.addListener(t),t()}else Wl.current=!1}function u2(e,t,n){const{willChange:r}=t;for(const o in t){const a=t[o],i=n[o];if(mt(a))e.addValue(o,a),mi(r)&&r.add(o);else if(mt(i))e.addValue(o,Br(a,{owner:e})),mi(r)&&r.remove(o);else if(i!==a)if(e.hasValue(o)){const s=e.getValue(o);!s.hasAnimated&&s.set(a)}else{const s=e.getStaticValue(o);e.addValue(o,Br(s!==void 0?s:a,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const Uf=new WeakMap,pg=Object.keys(Do),d2=pg.length,Gf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],f2=Ic.length;class h2{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,visualState:a},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Re.render(this.render,!1,!0);const{latestValues:s,renderState:l}=a;this.latestValues=s,this.baseTarget={...s},this.initialValues=n.initial?{...s}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=i,this.isControllingVariants=Xi(n),this.isVariantNode=Zp(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(n,{});for(const d in u){const h=u[d];s[d]!==void 0&&mt(h)&&(h.set(s[d],!1),mi(c)&&c.add(d))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,Uf.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),hg.current||c2(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Wl.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Uf.delete(this.current),this.projection&&this.projection.unmount(),gn(this.notifyUpdate),gn(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=tr.has(t),o=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Re.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),a()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,o,a){let i,s;for(let l=0;lthis.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:a,layoutScroll:h,layoutRoot:p})}return s}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ge()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Br(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,o=typeof r=="string"||typeof r=="object"?(n=Bc(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&o!==void 0)return o;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!mt(a)?a:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Kc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class mg extends h2{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:o},a){let i=AA(r,t||{},this);if(o&&(n&&(n=o(n)),r&&(r=o(r)),i&&(i=o(i))),a){TA(this,r,i);const s=l2(this,r,i,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function p2(e){return window.getComputedStyle(e)}class m2 extends mg{readValueFromInstance(t,n){if(tr.has(n)){const r=Wc(n);return r&&r.default||0}else{const r=p2(t),o=(tm(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return tg(t,n)}build(t,n,r,o){Oc(t,n,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,n){return jc(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;mt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent="".concat(n))}))}renderInstance(t,n,r,o){sm(t,n,r,o)}}class g2 extends mg{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(tr.has(n)){const r=Wc(n);return r&&r.default||0}return n=lm.has(n)?n:Ac(n),t.getAttribute(n)}measureInstanceViewportBox(){return Ge()}scrapeMotionValuesFromProps(t,n){return um(t,n)}build(t,n,r,o){Fc(t,n,r,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,r,o){cm(t,n,r,o)}mount(t){this.isSVGTag=Nc(t.tagName),super.mount(t)}}const v2=(e,t)=>Mc(e)?new g2(t,{enableHardwareAcceleration:!1}):new m2(t,{enableHardwareAcceleration:!0}),b2={layout:{ProjectionNode:dg,MeasureLayout:og}},y2={...HA,...fE,...Y$,...b2},Jt=ST((e,t)=>JT(e,t,y2,v2));function gg(){const e=f.useRef(!1);return Ec(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function x2(){const e=gg(),[t,n]=f.useState(0),r=f.useCallback(()=>{e.current&&n(t+1)},[t]);return[f.useCallback(()=>Re.postRender(r),[r]),t]}class S2 extends f.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function w2({children:e,isPresent:t}){const n=f.useId(),r=f.useRef(null),o=f.useRef({width:0,height:0,top:0,left:0});return f.useInsertionEffect(()=>{const{width:a,height:i,top:s,left:l}=o.current;if(t||!r.current||!a||!i)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule('\n [data-motion-pop-id="'.concat(n,'"] {\n position: absolute !important;\n width: ').concat(a,"px !important;\n height: ").concat(i,"px !important;\n top: ").concat(s,"px !important;\n left: ").concat(l,"px !important;\n }\n ")),()=>{document.head.removeChild(c)}},[t]),f.createElement(S2,{isPresent:t,childRef:r,sizeRef:o},f.cloneElement(e,{ref:r}))}const Qs=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:a,mode:i})=>{const s=dm(C2),l=f.useId(),c=f.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u=>{s.set(u,!0);for(const d of s.values())if(!d)return;r&&r()},register:u=>(s.set(u,!1),()=>s.delete(u))}),a?void 0:[n]);return f.useMemo(()=>{s.forEach((u,d)=>s.set(d,!1))},[n]),f.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),i==="popLayout"&&(e=f.createElement(w2,{isPresent:n},e)),f.createElement(qo.Provider,{value:c},e)};function C2(){return new Map}function k2(e){return f.useEffect(()=>()=>e(),[])}const Bn=e=>e.key||"";function P2(e,t){e.forEach(n=>{const r=Bn(n);t.set(r,n)})}function _2(e){const t=[];return f.Children.forEach(e,n=>{f.isValidElement(n)&&t.push(n)}),t}const rr=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:a=!0,mode:i="sync"})=>{const s=f.useContext(Rc).forceRender||x2()[0],l=gg(),c=_2(e);let u=c;const d=f.useRef(new Map).current,h=f.useRef(u),p=f.useRef(new Map).current,g=f.useRef(!0);if(Ec(()=>{g.current=!1,P2(c,p),h.current=u}),k2(()=>{g.current=!0,p.clear(),d.clear()}),g.current)return f.createElement(f.Fragment,null,u.map(x=>f.createElement(Qs,{key:Bn(x),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:a,mode:i},x)));u=[...u];const m=h.current.map(Bn),v=c.map(Bn),S=m.length;for(let x=0;x{if(v.indexOf(w)!==-1)return;const k=p.get(w);if(!k)return;const T=m.indexOf(w);let E=x;if(!E){const _=()=>{d.delete(w);const I=Array.from(p.keys()).filter(R=>!v.includes(R));if(I.forEach(R=>p.delete(R)),h.current=c.filter(R=>{const A=Bn(R);return A===w||I.includes(A)}),!d.size){if(l.current===!1)return;s(),r&&r()}};E=f.createElement(Qs,{key:Bn(k),isPresent:!1,onExitComplete:_,custom:t,presenceAffectsLayout:a,mode:i},k),d.set(w,E)}u.splice(T,0,E)}),u=u.map(x=>{const w=x.key;return d.has(w)?x:f.createElement(Qs,{key:Bn(x),isPresent:!0,presenceAffectsLayout:a,mode:i},x)}),f.createElement(f.Fragment,null,d.size?u:u.map(x=>f.cloneElement(x)))};var T2={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},vg=f.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:o,requestClose:a=!1,position:i="bottom",duration:s=5e3,containerStyle:l,motionVariants:c=T2,toastSpacing:u="0.5rem"}=e,[d,h]=f.useState(s),p=f$();mn(()=>{p||r==null||r()},[p]),mn(()=>{h(s)},[s]);const g=()=>h(null),m=()=>h(s),v=()=>{p&&o()};f.useEffect(()=>{p&&a&&o()},[p,a,o]),dT(v,d);const S=f.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:u,...l}),[l,u]),x=f.useMemo(()=>cT(i),[i]);return b.jsx(Jt.div,{layout:!0,className:"chakra-toast",variants:c,initial:"initial",animate:"animate",exit:"exit",onHoverStart:g,onHoverEnd:m,custom:{position:i},style:x,children:b.jsx(D.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:S,children:Tt(n,{id:t,onClose:v})})})});vg.displayName="ToastComponent";function E2(e,t){var n;const r=e!=null?e:"bottom",a={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[r];return(n=a==null?void 0:a[t])!=null?n:r}var qf={path:b.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[b.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),b.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),b.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Ot=F((e,t)=>{const{as:n,viewBox:r,color:o="currentColor",focusable:a=!1,children:i,className:s,__css:l,...c}=e,u=G("chakra-icon",s),d=wt("Icon",e),h={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o,...l,...d},p={ref:t,focusable:a,className:u,__css:h},g=r!=null?r:qf.viewBox;if(n&&typeof n!="string")return b.jsx(D.svg,{as:n,...p,...c});const m=i!=null?i:qf.path;return b.jsx(D.svg,{verticalAlign:"middle",viewBox:g,...p,...c,children:m})});Ot.displayName="Icon";function A2(e){return b.jsx(Ot,{viewBox:"0 0 24 24",...e,children:b.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function $2(e){return b.jsx(Ot,{viewBox:"0 0 24 24",...e,children:b.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function Kf(e){return b.jsx(Ot,{viewBox:"0 0 24 24",...e,children:b.jsx("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var I2=Bi({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Xc=F((e,t)=>{const n=wt("Spinner",e),{label:r="Loading...",thickness:o="2px",speed:a="0.45s",emptyColor:i="transparent",className:s,...l}=Ee(e),c=G("chakra-spinner",s),u={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:o,borderBottomColor:i,borderLeftColor:i,animation:"".concat(I2," ").concat(a," linear infinite"),...n};return b.jsx(D.div,{ref:t,__css:u,className:c,...l,children:r&&b.jsx(D.span,{srOnly:!0,children:r})})});Xc.displayName="Spinner";var[R2,Yc]=Te({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[M2,Zc]=Te({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),bg={info:{icon:$2,colorScheme:"blue"},warning:{icon:Kf,colorScheme:"orange"},success:{icon:A2,colorScheme:"green"},error:{icon:Kf,colorScheme:"red"},loading:{icon:Xc,colorScheme:"blue"}};function O2(e){return bg[e].colorScheme}function D2(e){return bg[e].icon}var yg=F(function(t,n){const r=Zc(),{status:o}=Yc(),a={display:"inline",...r.description};return b.jsx(D.div,{ref:n,"data-status":o,...t,className:G("chakra-alert__desc",t.className),__css:a})});yg.displayName="AlertDescription";function xg(e){const{status:t}=Yc(),n=D2(t),r=Zc(),o=t==="loading"?r.spinner:r.icon;return b.jsx(D.span,{display:"inherit","data-status":t,...e,className:G("chakra-alert__icon",e.className),__css:o,children:e.children||b.jsx(n,{h:"100%",w:"100%"})})}xg.displayName="AlertIcon";var Sg=F(function(t,n){const r=Zc(),{status:o}=Yc();return b.jsx(D.div,{ref:n,"data-status":o,...t,className:G("chakra-alert__title",t.className),__css:r.title})});Sg.displayName="AlertTitle";var wg=F(function(t,n){var r;const{status:o="info",addRole:a=!0,...i}=Ee(t),s=(r=t.colorScheme)!=null?r:O2(o),l=tt("Alert",{...t,colorScheme:s}),c={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...l.container};return b.jsx(R2,{value:{status:o},children:b.jsx(M2,{value:l,children:b.jsx(D.div,{"data-status":o,role:a?"alert":void 0,ref:n,...i,className:G("chakra-alert",t.className),__css:c})})})});wg.displayName="Alert";function F2(e){return b.jsx(Ot,{focusable:"false","aria-hidden":!0,...e,children:b.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var Ji=F(function(t,n){const r=wt("CloseButton",t),{children:o,isDisabled:a,__css:i,...s}=Ee(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return b.jsx(D.button,{type:"button","aria-label":"Close",ref:n,disabled:a,__css:{...l,...r,...i},...s,children:o||b.jsx(F2,{width:"1em",height:"1em"})})});Ji.displayName="CloseButton";var N2={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Ut=j2(N2);function j2(e){let t=e;const n=new Set,r=o=>{t=o(t),n.forEach(a=>a())};return{getState:()=>t,subscribe:o=>(n.add(o),()=>{r(()=>e),n.delete(o)}),removeToast:(o,a)=>{r(i=>({...i,[a]:i[a].filter(s=>s.id!=o)}))},notify:(o,a)=>{const i=B2(o,a),{position:s,id:l}=i;return r(c=>{var u,d;const p=s.includes("top")?[i,...(u=c[s])!=null?u:[]]:[...(d=c[s])!=null?d:[],i];return{...c,[s]:p}}),l},update:(o,a)=>{o&&r(i=>{const s={...i},{position:l,index:c}=zd(s,o);return l&&c!==-1&&(s[l][c]={...s[l][c],...a,message:Cg(a)}),s})},closeAll:({positions:o}={})=>{r(a=>{const i=["bottom","bottom-right","bottom-left","top","top-left","top-right"];return(o!=null?o:i).reduce((l,c)=>(l[c]=a[c].map(u=>({...u,requestClose:!0})),l),{...a})})},close:o=>{r(a=>{const i=qp(a,o);return i?{...a,[i]:a[i].map(s=>s.id==o?{...s,requestClose:!0}:s)}:a})},isActive:o=>!!zd(Ut.getState(),o).position}}var Xf=0;function B2(e,t={}){var n,r;Xf+=1;const o=(n=t.id)!=null?n:Xf,a=(r=t.position)!=null?r:"bottom";return{id:o,message:e,position:a,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Ut.removeToast(String(o),a),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var z2=e=>{const{status:t,variant:n="solid",id:r,title:o,isClosable:a,onClose:i,description:s,colorScheme:l,icon:c}=e,u=r?{root:"toast-".concat(r),title:"toast-".concat(r,"-title"),description:"toast-".concat(r,"-description")}:void 0;return b.jsxs(wg,{addRole:!1,status:t,variant:n,id:u==null?void 0:u.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:l,children:[b.jsx(xg,{children:c}),b.jsxs(D.div,{flex:"1",maxWidth:"100%",children:[o&&b.jsx(Sg,{id:u==null?void 0:u.title,children:o}),s&&b.jsx(yg,{id:u==null?void 0:u.description,display:"block",children:s})]}),a&&b.jsx(Ji,{size:"sm",onClick:i,position:"absolute",insetEnd:1,top:1})]})};function Cg(e={}){const{render:t,toastComponent:n=z2}=e;return o=>typeof t=="function"?t({...o,...e}):b.jsx(n,{...o,...e})}function L2(e,t){const n=o=>{var a;return{...t,...o,position:E2((a=o==null?void 0:o.position)!=null?a:t==null?void 0:t.position,e)}},r=o=>{const a=n(o),i=Cg(a);return Ut.notify(i,a)};return r.update=(o,a)=>{Ut.update(o,n(a))},r.promise=(o,a)=>{const i=r({...a.loading,status:"loading",duration:null});o.then(s=>r.update(i,{status:"success",duration:5e3,...Tt(a.success,s)})).catch(s=>r.update(i,{status:"error",duration:5e3,...Tt(a.error,s)}))},r.closeAll=Ut.closeAll,r.close=Ut.close,r.isActive=Ut.isActive,r}var[V2,W2]=Te({name:"ToastOptionsContext",strict:!1}),H2=e=>{const t=f.useSyncExternalStore(Ut.subscribe,Ut.getState,Ut.getState),{motionVariants:n,component:r=vg,portalProps:o}=e,i=Object.keys(t).map(s=>{const l=t[s];return b.jsx("div",{role:"region","aria-live":"polite","aria-label":"Notifications-".concat(s),id:"chakra-toast-manager-".concat(s),style:uT(s),children:b.jsx(rr,{initial:!1,children:l.map(c=>b.jsx(r,{motionVariants:n,...c},c.id))})},s)});return b.jsx(Gr,{...o,children:i})};function hj(e){const{theme:t}=up(),n=W2();return f.useMemo(()=>L2(t.direction,{...n,...e}),[e,t.direction,n])}var U2=e=>function({children:n,theme:r=e,toastOptions:o,...a}){return b.jsxs(sT,{theme:r,...a,children:[b.jsx(V2,{value:o==null?void 0:o.defaultOptions,children:n}),b.jsx(H2,{...o})]})},pj=U2(Rp),G2=Object.defineProperty,q2=(e,t,n)=>t in e?G2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Le=(e,t,n)=>(q2(e,typeof t!="symbol"?t+"":t,n),n);function Yf(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var K2=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function Zf(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function Qf(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Hl=typeof window<"u"?f.useLayoutEffect:f.useEffect,vi=e=>e,X2=class{constructor(){Le(this,"descendants",new Map),Le(this,"register",e=>{if(e!=null)return K2(e)?this.registerNode(e):t=>{this.registerNode(t,e)}}),Le(this,"unregister",e=>{this.descendants.delete(e);const t=Yf(Array.from(this.descendants.keys()));this.assignIndex(t)}),Le(this,"destroy",()=>{this.descendants.clear()}),Le(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})}),Le(this,"count",()=>this.descendants.size),Le(this,"enabledCount",()=>this.enabledValues().length),Le(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index)),Le(this,"enabledValues",()=>this.values().filter(e=>!e.disabled)),Le(this,"item",e=>{if(this.count()!==0)return this.values()[e]}),Le(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]}),Le(this,"first",()=>this.item(0)),Le(this,"firstEnabled",()=>this.enabledItem(0)),Le(this,"last",()=>this.item(this.descendants.size-1)),Le(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)}),Le(this,"indexOf",e=>{var t,n;return e&&(n=(t=this.descendants.get(e))==null?void 0:t.index)!=null?n:-1}),Le(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e))),Le(this,"next",(e,t=!0)=>{const n=Zf(e,this.count(),t);return this.item(n)}),Le(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),o=Zf(r,this.enabledCount(),t);return this.enabledItem(o)}),Le(this,"prev",(e,t=!0)=>{const n=Qf(e,this.count()-1,t);return this.item(n)}),Le(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),o=Qf(r,this.enabledCount()-1,t);return this.enabledItem(o)}),Le(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=Yf(n);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const o={node:e,index:-1,...t};this.descendants.set(e,o),this.assignIndex(r)})}};function Y2(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch(n){throw new Error("Cannot assign value '".concat(t,"' to ref '").concat(e,"'"))}}}function Ie(...e){return t=>{e.forEach(n=>{Y2(n,t)})}}function Z2(...e){return f.useMemo(()=>Ie(...e),e)}function Q2(){const e=f.useRef(new X2);return Hl(()=>()=>e.current.destroy()),e.current}var[J2,kg]=Te({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function eI(e){const t=kg(),[n,r]=f.useState(-1),o=f.useRef(null);Hl(()=>()=>{o.current&&t.unregister(o.current)},[]),Hl(()=>{if(!o.current)return;const i=Number(o.current.dataset.index);n!=i&&!Number.isNaN(i)&&r(i)});const a=vi(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(o.current),register:Ie(a,o)}}function Pg(){return[vi(J2),()=>vi(kg()),()=>Q2(),o=>eI(o)]}var[tI,es]=Te({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[nI,Qc]=Te({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[rI,mj,oI,aI]=Pg(),iI=F(function(t,n){const{getButtonProps:r}=Qc(),o=r(t,n),i={display:"flex",alignItems:"center",width:"100%",outline:0,...es().button};return b.jsx(D.button,{...o,className:G("chakra-accordion__button",t.className),__css:i})});iI.displayName="AccordionButton";function _g(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:o=(h,p)=>h!==p}=e,a=We(r),i=We(o),[s,l]=f.useState(n),c=t!==void 0,u=c?t:s,d=We(h=>{const g=typeof h=="function"?h(u):h;i(u,g)&&(c||l(g),a(g))},[c,a,u,i]);return[u,d]}function sI(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:o,allowToggle:a,...i}=e;uI(e),dI(e);const s=oI(),[l,c]=f.useState(-1);f.useEffect(()=>()=>{c(-1)},[]);const[u,d]=_g({value:r,defaultValue(){return o?n!=null?n:[]:n!=null?n:-1},onChange:t});return{index:u,setIndex:d,htmlProps:i,getAccordionItemProps:p=>{let g=!1;return p!==null&&(g=Array.isArray(u)?u.includes(p):u===p),{isOpen:g,onChange:v=>{if(p!==null)if(o&&Array.isArray(u)){const S=v?u.concat(p):u.filter(x=>x!==p);d(S)}else v?d(p):a&&d(-1)}}},focusedIndex:l,setFocusedIndex:c,descendants:s}}var[lI,Jc]=Te({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function cI(e){const{isDisabled:t,isFocusable:n,id:r,...o}=e,{getAccordionItemProps:a,setFocusedIndex:i}=Jc(),s=f.useRef(null),l=f.useId(),c=r!=null?r:l,u="accordion-button-".concat(c),d="accordion-panel-".concat(c);fI(e);const{register:h,index:p,descendants:g}=aI({disabled:t&&!n}),{isOpen:m,onChange:v}=a(p===-1?null:p),S=()=>{v==null||v(!0)},x=()=>{v==null||v(!1)},w=f.useCallback(()=>{v==null||v(!m),i(p)},[p,i,m,v]),k=f.useCallback(I=>{const A={ArrowDown:()=>{const O=g.nextEnabled(p);O==null||O.node.focus()},ArrowUp:()=>{const O=g.prevEnabled(p);O==null||O.node.focus()},Home:()=>{const O=g.firstEnabled();O==null||O.node.focus()},End:()=>{const O=g.lastEnabled();O==null||O.node.focus()}}[I.key];A&&(I.preventDefault(),A(I))},[g,p]),T=f.useCallback(()=>{i(p)},[i,p]),E=f.useCallback(function(R={},A=null){return{...R,type:"button",ref:Ie(h,s,A),id:u,disabled:!!t,"aria-expanded":!!m,"aria-controls":d,onClick:J(R.onClick,w),onFocus:J(R.onFocus,T),onKeyDown:J(R.onKeyDown,k)}},[u,t,m,w,T,k,d,h]),_=f.useCallback(function(R={},A=null){return{...R,ref:A,role:"region",id:d,"aria-labelledby":u,hidden:!m}},[u,m,d]);return{isOpen:m,isDisabled:t,isFocusable:n,onOpen:S,onClose:x,getButtonProps:E,getPanelProps:_,htmlProps:o}}function uI(e){const t=e.index||e.defaultIndex;t!=null&&!Array.isArray(t)&&e.allowMultiple}function dI(e){dp({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function fI(e){dp({condition:!!(e.isFocusable&&!e.isDisabled),message:"Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well.\n "})}function hI(e){const{isOpen:t,isDisabled:n}=Qc(),{reduceMotion:r}=Jc(),o=G("chakra-accordion__icon",e.className),a=es(),i={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...a.icon};return b.jsx(Ot,{viewBox:"0 0 24 24","aria-hidden":!0,className:o,__css:i,...e,children:b.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}hI.displayName="AccordionIcon";var pI=F(function(t,n){const{children:r,className:o}=t,{htmlProps:a,...i}=cI(t),l={...es().container,overflowAnchor:"none"},c=f.useMemo(()=>i,[i]);return b.jsx(nI,{value:c,children:b.jsx(D.div,{ref:n,...a,className:G("chakra-accordion__item",o),__css:l,children:typeof r=="function"?r({isExpanded:!!i.isOpen,isDisabled:!!i.isDisabled}):r})})});pI.displayName="AccordionItem";var kr={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Kn={enter:{duration:.2,ease:kr.easeOut},exit:{duration:.1,ease:kr.easeIn}},hn={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},mI=e=>e!=null&&parseInt(e.toString(),10)>0,Jf={exit:{height:{duration:.2,ease:kr.ease},opacity:{duration:.3,ease:kr.ease}},enter:{height:{duration:.3,ease:kr.ease},opacity:{duration:.4,ease:kr.ease}}},gI={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var a;return{...e&&{opacity:mI(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(a=n==null?void 0:n.exit)!=null?a:hn.exit(Jf.exit,o)}},enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:o})=>{var a;return{...e&&{opacity:1},height:t,transitionEnd:r==null?void 0:r.enter,transition:(a=n==null?void 0:n.enter)!=null?a:hn.enter(Jf.enter,o)}}},Tg=f.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:o=!0,startingHeight:a=0,endingHeight:i="auto",style:s,className:l,transition:c,transitionEnd:u,...d}=e,[h,p]=f.useState(!1);f.useEffect(()=>{const x=setTimeout(()=>{p(!0)});return()=>clearTimeout(x)},[]);const g=parseFloat(a.toString())>0,m={startingHeight:a,endingHeight:i,animateOpacity:o,transition:h?c:{enter:{duration:0}},transitionEnd:{enter:u==null?void 0:u.enter,exit:r?u==null?void 0:u.exit:{...u==null?void 0:u.exit,display:g?"block":"none"}}},v=r?n:!0,S=n||r?"enter":"exit";return b.jsx(rr,{initial:!1,custom:m,children:v&&b.jsx(Jt.div,{ref:t,...d,className:G("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:m,variants:gI,initial:r?"exit":!1,animate:S,exit:"exit"})})});Tg.displayName="Collapse";var vI={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:hn.enter(Kn.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:0,transition:(r=e==null?void 0:e.exit)!=null?r:hn.exit(Kn.exit,n),transitionEnd:t==null?void 0:t.exit}}},Eg={initial:"exit",animate:"enter",exit:"exit",variants:vI},bI=f.forwardRef(function(t,n){const{unmountOnExit:r,in:o,className:a,transition:i,transitionEnd:s,delay:l,...c}=t,u=o||r?"enter":"exit",d=r?o&&r:!0,h={transition:i,transitionEnd:s,delay:l};return b.jsx(rr,{custom:h,children:d&&b.jsx(Jt.div,{ref:n,className:G("chakra-fade",a),custom:h,...Eg,animate:u,...c})})});bI.displayName="Fade";var yI={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:o})=>{var a;return{opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(a=n==null?void 0:n.exit)!=null?a:hn.exit(Kn.exit,o)}},enter:({transitionEnd:e,transition:t,delay:n})=>{var r;return{opacity:1,scale:1,transition:(r=t==null?void 0:t.enter)!=null?r:hn.enter(Kn.enter,n),transitionEnd:e==null?void 0:e.enter}}},Ag={initial:"exit",animate:"enter",exit:"exit",variants:yI},xI=f.forwardRef(function(t,n){const{unmountOnExit:r,in:o,reverse:a=!0,initialScale:i=.95,className:s,transition:l,transitionEnd:c,delay:u,...d}=t,h=r?o&&r:!0,p=o||r?"enter":"exit",g={initialScale:i,reverse:a,transition:l,transitionEnd:c,delay:u};return b.jsx(rr,{custom:g,children:h&&b.jsx(Jt.div,{ref:n,className:G("chakra-offset-slide",s),...Ag,animate:p,custom:g,...d})})});xI.displayName="ScaleFade";var SI={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:o})=>{var a;return{opacity:0,x:e,y:t,transition:(a=n==null?void 0:n.exit)!=null?a:hn.exit(Kn.exit,o),transitionEnd:r==null?void 0:r.exit}},enter:({transition:e,transitionEnd:t,delay:n})=>{var r;return{opacity:1,x:0,y:0,transition:(r=e==null?void 0:e.enter)!=null?r:hn.enter(Kn.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:o,delay:a})=>{var i;const s={x:t,y:e};return{opacity:0,transition:(i=n==null?void 0:n.exit)!=null?i:hn.exit(Kn.exit,a),...o?{...s,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...s,...r==null?void 0:r.exit}}}}},fo={initial:"initial",animate:"enter",exit:"exit",variants:SI},wI=f.forwardRef(function(t,n){const{unmountOnExit:r,in:o,reverse:a=!0,className:i,offsetX:s=0,offsetY:l=8,transition:c,transitionEnd:u,delay:d,...h}=t,p=r?o&&r:!0,g=o||r?"enter":"exit",m={offsetX:s,offsetY:l,reverse:a,transition:c,transitionEnd:u,delay:d};return b.jsx(rr,{custom:m,children:p&&b.jsx(Jt.div,{ref:n,className:G("chakra-offset-slide",i),custom:m,...fo,animate:g,...h})})});wI.displayName="SlideFade";var CI=F(function(t,n){const{className:r,motionProps:o,...a}=t,{reduceMotion:i}=Jc(),{getPanelProps:s,isOpen:l}=Qc(),c=s(a,n),u=G("chakra-accordion__panel",r),d=es();i||delete c.hidden;const h=b.jsx(D.div,{...c,__css:d.panel,className:u});return i?h:b.jsx(Tg,{in:l,...o,children:h})});CI.displayName="AccordionPanel";var kI=F(function({children:t,reduceMotion:n,...r},o){const a=tt("Accordion",r),i=Ee(r),{htmlProps:s,descendants:l,...c}=sI(i),u=f.useMemo(()=>({...c,reduceMotion:!!n}),[c,n]);return b.jsx(rI,{value:l,children:b.jsx(lI,{value:u,children:b.jsx(tI,{value:a,children:b.jsx(D.div,{ref:o,...s,className:G("chakra-accordion",r.className),__css:a.root,children:t})})})})});kI.displayName="Accordion";var[PI,_I]=Te({name:"AvatarStylesContext",hookName:"useAvatarStyles",providerName:""});function TI(e){var t;const n=e.split(" "),r=(t=n[0])!=null?t:"",o=n.length>1?n[n.length-1]:"";return r&&o?"".concat(r.charAt(0)).concat(o.charAt(0)):r.charAt(0)}function $g(e){const{name:t,getInitials:n,...r}=e,o=_I();return b.jsx(D.div,{role:"img","aria-label":t,...r,__css:o.label,children:t?n==null?void 0:n(t):null})}$g.displayName="AvatarName";var Ig=e=>b.jsxs(D.svg,{viewBox:"0 0 128 128",color:"#fff",width:"100%",height:"100%",className:"chakra-avatar__svg",...e,children:[b.jsx("path",{fill:"currentColor",d:"M103,102.1388 C93.094,111.92 79.3504,118 64.1638,118 C48.8056,118 34.9294,111.768 25,101.7892 L25,95.2 C25,86.8096 31.981,80 40.6,80 L87.4,80 C96.019,80 103,86.8096 103,95.2 L103,102.1388 Z"}),b.jsx("path",{fill:"currentColor",d:"M63.9961647,24 C51.2938136,24 41,34.2938136 41,46.9961647 C41,59.7061864 51.2938136,70 63.9961647,70 C76.6985159,70 87,59.7061864 87,46.9961647 C87,34.2938136 76.6985159,24 63.9961647,24"})]}),Ul=F(function(t,n){const{htmlWidth:r,htmlHeight:o,alt:a,...i}=t;return b.jsx("img",{width:r,height:o,ref:n,alt:a,...i})});Ul.displayName="NativeImage";function Rg(e){const{loading:t,src:n,srcSet:r,onLoad:o,onError:a,crossOrigin:i,sizes:s,ignoreFallback:l}=e,[c,u]=f.useState("pending");f.useEffect(()=>{u(n?"loading":"pending")},[n]);const d=f.useRef(),h=f.useCallback(()=>{if(!n)return;p();const g=new Image;g.src=n,i&&(g.crossOrigin=i),r&&(g.srcset=r),s&&(g.sizes=s),t&&(g.loading=t),g.onload=m=>{p(),u("loaded"),o==null||o(m)},g.onerror=m=>{p(),u("failed"),a==null||a(m)},d.current=g},[n,i,r,s,o,a,t]),p=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)};return Kt(()=>{if(!l)return c==="loading"&&h(),()=>{p()}},[c,h,l]),l?"loaded":c}var EI=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError";function AI(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var $I=F(function(t,n){const{fallbackSrc:r,fallback:o,src:a,srcSet:i,align:s,fit:l,loading:c,ignoreFallback:u,crossOrigin:d,fallbackStrategy:h="beforeLoadOrError",referrerPolicy:p,...g}=t,m=r!==void 0||o!==void 0,v=c!=null||u||!m,S=Rg({...t,crossOrigin:d,ignoreFallback:v}),x=EI(S,h),w={ref:n,objectFit:l,objectPosition:s,...v?g:AI(g,["onError","onLoad"])};return x?o||b.jsx(D.img,{as:Ul,className:"chakra-image__placeholder",src:r,...w}):b.jsx(D.img,{as:Ul,src:a,srcSet:i,crossOrigin:d,loading:c,referrerPolicy:p,className:"chakra-image",...w})});$I.displayName="Image";function Mg(e){const{src:t,srcSet:n,onError:r,onLoad:o,getInitials:a,name:i,borderRadius:s,loading:l,iconLabel:c,icon:u=b.jsx(Ig,{}),ignoreFallback:d,referrerPolicy:h,crossOrigin:p}=e,m=Rg({src:t,onError:r,crossOrigin:p,ignoreFallback:d})==="loaded";return!t||!m?i?b.jsx($g,{className:"chakra-avatar__initials",getInitials:a,name:i}):f.cloneElement(u,{role:"img","aria-label":c}):b.jsx(D.img,{src:t,srcSet:n,alt:i,onLoad:o,referrerPolicy:h,crossOrigin:p!=null?p:void 0,className:"chakra-avatar__img",loading:l,__css:{width:"100%",height:"100%",objectFit:"cover",borderRadius:s}})}Mg.displayName="AvatarImage";var II={display:"inline-flex",alignItems:"center",justifyContent:"center",textAlign:"center",textTransform:"uppercase",fontWeight:"medium",position:"relative",flexShrink:0},RI=F((e,t)=>{const n=tt("Avatar",e),[r,o]=f.useState(!1),{src:a,srcSet:i,name:s,showBorder:l,borderRadius:c="full",onError:u,onLoad:d,getInitials:h=TI,icon:p=b.jsx(Ig,{}),iconLabel:g=" avatar",loading:m,children:v,borderColor:S,ignoreFallback:x,crossOrigin:w,referrerPolicy:k,...T}=Ee(e),E={borderRadius:c,borderWidth:l?"2px":void 0,...II,...n.container};return S&&(E.borderColor=S),b.jsx(D.span,{ref:t,...T,className:G("chakra-avatar",e.className),"data-loaded":le(r),__css:E,children:b.jsxs(PI,{value:n,children:[b.jsx(Mg,{src:a,srcSet:i,loading:m,onLoad:J(d,()=>{o(!0)}),onError:u,getInitials:h,name:s,borderRadius:c,icon:p,iconLabel:g,ignoreFallback:x,crossOrigin:w,referrerPolicy:k}),v]})})});RI.displayName="Avatar";function eu(e){return f.Children.toArray(e).filter(t=>f.isValidElement(t))}var[MI,OI]=Te({strict:!1,name:"ButtonGroupContext"}),DI={horizontal:{"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}},vertical:{"> *:first-of-type:not(:last-of-type)":{borderBottomRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderTopRadius:0}}},FI={horizontal:e=>({"& > *:not(style) ~ *:not(style)":{marginStart:e}}),vertical:e=>({"& > *:not(style) ~ *:not(style)":{marginTop:e}})},NI=F(function(t,n){const{size:r,colorScheme:o,variant:a,className:i,spacing:s="0.5rem",isAttached:l,isDisabled:c,orientation:u="horizontal",...d}=t,h=G("chakra-button__group",i),p=f.useMemo(()=>({size:r,colorScheme:o,variant:a,isDisabled:c}),[r,o,a,c]);let g={display:"inline-flex",...l?DI[u]:FI[u](s)};const m=u==="vertical";return b.jsx(MI,{value:p,children:b.jsx(D.div,{ref:n,role:"group",__css:g,className:h,"data-attached":l?"":void 0,"data-orientation":u,flexDir:m?"column":void 0,...d})})});NI.displayName="ButtonGroup";function jI(e){const[t,n]=f.useState(!e);return{ref:f.useCallback(a=>{a&&n(a.tagName==="BUTTON")},[]),type:t?"button":void 0}}function Gl(e){const{children:t,className:n,...r}=e,o=f.isValidElement(t)?f.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,a=G("chakra-button__icon",n);return b.jsx(D.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:a,children:o})}Gl.displayName="ButtonIcon";function ql(e){const{label:t,placement:n,spacing:r="0.5rem",children:o=b.jsx(Xc,{color:"currentColor",width:"1em",height:"1em"}),className:a,__css:i,...s}=e,l=G("chakra-button__spinner",a),c=n==="start"?"marginEnd":"marginStart",u=f.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[c]:t?r:0,fontSize:"1em",lineHeight:"normal",...i}),[i,t,c,r]);return b.jsx(D.div,{className:l,...s,__css:u,children:o})}ql.displayName="ButtonSpinner";var Og=F((e,t)=>{const n=OI(),r=wt("Button",{...n,...e}),{isDisabled:o=n==null?void 0:n.isDisabled,isLoading:a,isActive:i,children:s,leftIcon:l,rightIcon:c,loadingText:u,iconSpacing:d="0.5rem",type:h,spinner:p,spinnerPlacement:g="start",className:m,as:v,...S}=Ee(e),x=f.useMemo(()=>{const E={...r==null?void 0:r._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:E}}},[r,n]),{ref:w,type:k}=jI(v),T={rightIcon:c,leftIcon:l,iconSpacing:d,children:s};return b.jsxs(D.button,{ref:Z2(t,w),as:v,type:h!=null?h:k,"data-active":le(i),"data-loading":le(a),__css:x,className:G("chakra-button",m),...S,disabled:o||a,children:[a&&g==="start"&&b.jsx(ql,{className:"chakra-button__spinner--start",label:u,placement:"start",spacing:d,children:p}),a?u||b.jsx(D.span,{opacity:0,children:b.jsx(eh,{...T})}):b.jsx(eh,{...T}),a&&g==="end"&&b.jsx(ql,{className:"chakra-button__spinner--end",label:u,placement:"end",spacing:d,children:p})]})});Og.displayName="Button";function eh(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:o}=e;return b.jsxs(b.Fragment,{children:[t&&b.jsx(Gl,{marginEnd:o,children:t}),r,n&&b.jsx(Gl,{marginStart:o,children:n})]})}var BI=F((e,t)=>{const{icon:n,children:r,isRound:o,"aria-label":a,...i}=e,s=n||r,l=f.isValidElement(s)?f.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return b.jsx(Og,{padding:"0",borderRadius:o?"full":void 0,ref:t,"aria-label":a,...i,children:l})});BI.displayName="IconButton";var[gj,zI]=Te({name:"CheckboxGroupContext",strict:!1});function LI(e){const[t,n]=f.useState(e),[r,o]=f.useState(!1);return e!==t&&(o(!0),n(e)),r}function VI(e){return b.jsx(D.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:b.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function WI(e){return b.jsx(D.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e,children:b.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function HI(e){const{isIndeterminate:t,isChecked:n,...r}=e,o=t?WI:VI;return n||t?b.jsx(D.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:b.jsx(o,{...r})}):null}var[UI,Dg]=Te({name:"FormControlStylesContext",errorMessage:"useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),[GI,ts]=Te({strict:!1,name:"FormControlContext"});function qI(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:o,isReadOnly:a,...i}=e,s=f.useId(),l=t||"field-".concat(s),c="".concat(l,"-label"),u="".concat(l,"-feedback"),d="".concat(l,"-helptext"),[h,p]=f.useState(!1),[g,m]=f.useState(!1),[v,S]=f.useState(!1),x=f.useCallback((_={},I=null)=>({id:d,..._,ref:Ie(I,R=>{R&&m(!0)})}),[d]),w=f.useCallback((_={},I=null)=>({..._,ref:I,"data-focus":le(v),"data-disabled":le(o),"data-invalid":le(r),"data-readonly":le(a),id:_.id!==void 0?_.id:c,htmlFor:_.htmlFor!==void 0?_.htmlFor:l}),[l,o,v,r,a,c]),k=f.useCallback((_={},I=null)=>({id:u,..._,ref:Ie(I,R=>{R&&p(!0)}),"aria-live":"polite"}),[u]),T=f.useCallback((_={},I=null)=>({..._,...i,ref:I,role:"group","data-focus":le(v),"data-disabled":le(o),"data-invalid":le(r),"data-readonly":le(a)}),[i,o,v,r,a]),E=f.useCallback((_={},I=null)=>({..._,ref:I,role:"presentation","aria-hidden":!0,children:_.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!a,isDisabled:!!o,isFocused:!!v,onFocus:()=>S(!0),onBlur:()=>S(!1),hasFeedbackText:h,setHasFeedbackText:p,hasHelpText:g,setHasHelpText:m,id:l,labelId:c,feedbackId:u,helpTextId:d,htmlProps:i,getHelpTextProps:x,getErrorMessageProps:k,getRootProps:T,getLabelProps:w,getRequiredIndicatorProps:E}}var KI=F(function(t,n){const r=tt("Form",t),o=Ee(t),{getRootProps:a,htmlProps:i,...s}=qI(o),l=G("chakra-form-control",t.className);return b.jsx(GI,{value:s,children:b.jsx(UI,{value:r,children:b.jsx(D.div,{...a({},n),className:l,__css:r.container})})})});KI.displayName="FormControl";var XI=F(function(t,n){const r=ts(),o=Dg(),a=G("chakra-form__helper-text",t.className);return b.jsx(D.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:o.helperText,className:a})});XI.displayName="FormHelperText";var YI=F(function(t,n){var r;const o=wt("FormLabel",t),a=Ee(t),{className:i,children:s,requiredIndicator:l=b.jsx(Fg,{}),optionalIndicator:c=null,...u}=a,d=ts(),h=(r=d==null?void 0:d.getLabelProps(u,n))!=null?r:{ref:n,...u};return b.jsxs(D.label,{...h,className:G("chakra-form__label",a.className),__css:{display:"block",textAlign:"start",...o},children:[s,d!=null&&d.isRequired?l:c]})});YI.displayName="FormLabel";var Fg=F(function(t,n){const r=ts(),o=Dg();if(!(r!=null&&r.isRequired))return null;const a=G("chakra-form__required-indicator",t.className);return b.jsx(D.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:o.requiredIndicator,className:a})});Fg.displayName="RequiredIndicator";function tu(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:o,...a}=nu(e);return{...a,disabled:t,readOnly:r,required:o,"aria-invalid":Tr(n),"aria-required":Tr(o),"aria-readonly":Tr(r)}}function nu(e){var t,n,r;const o=ts(),{id:a,disabled:i,readOnly:s,required:l,isRequired:c,isInvalid:u,isReadOnly:d,isDisabled:h,onFocus:p,onBlur:g,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return o!=null&&o.hasFeedbackText&&(o!=null&&o.isInvalid)&&v.push(o.feedbackId),o!=null&&o.hasHelpText&&v.push(o.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:a!=null?a:o==null?void 0:o.id,isDisabled:(t=i!=null?i:h)!=null?t:o==null?void 0:o.isDisabled,isReadOnly:(n=s!=null?s:d)!=null?n:o==null?void 0:o.isReadOnly,isRequired:(r=l!=null?l:c)!=null?r:o==null?void 0:o.isRequired,isInvalid:u!=null?u:o==null?void 0:o.isInvalid,onFocus:J(o==null?void 0:o.onFocus,p),onBlur:J(o==null?void 0:o.onBlur,g)}}var ZI={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},QI=()=>typeof document<"u",th=!1,Qo=null,Qn=!1,Kl=!1,Xl=new Set;function ru(e,t){Xl.forEach(n=>n(e,t))}var JI=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function eR(e){return!(e.metaKey||!JI&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function nh(e){Qn=!0,eR(e)&&(Qo="keyboard",ru("keyboard",e))}function sr(e){if(Qo="pointer",e.type==="mousedown"||e.type==="pointerdown"){Qn=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let n=!1;try{n=t.matches(":focus-visible")}catch(r){}if(n)return;ru("pointer",e)}}function tR(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function nR(e){tR(e)&&(Qn=!0,Qo="virtual")}function rR(e){e.target===window||e.target===document||(!Qn&&!Kl&&(Qo="virtual",ru("virtual",e)),Qn=!1,Kl=!1)}function oR(){Qn=!1,Kl=!0}function rh(){return Qo!=="pointer"}function aR(){if(!QI()||th)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){Qn=!0,e.apply(this,n)},document.addEventListener("keydown",nh,!0),document.addEventListener("keyup",nh,!0),document.addEventListener("click",nR,!0),window.addEventListener("focus",rR,!0),window.addEventListener("blur",oR,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",sr,!0),document.addEventListener("pointermove",sr,!0),document.addEventListener("pointerup",sr,!0)):(document.addEventListener("mousedown",sr,!0),document.addEventListener("mousemove",sr,!0),document.addEventListener("mouseup",sr,!0)),th=!0}function iR(e){aR(),e(rh());const t=()=>e(rh());return Xl.add(t),()=>{Xl.delete(t)}}function sR(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ng(e={}){const t=nu(e),{isDisabled:n,isReadOnly:r,isRequired:o,isInvalid:a,id:i,onBlur:s,onFocus:l,"aria-describedby":c}=t,{defaultChecked:u,isChecked:d,isFocusable:h,onChange:p,isIndeterminate:g,name:m,value:v,tabIndex:S=void 0,"aria-label":x,"aria-labelledby":w,"aria-invalid":k,...T}=e,E=sR(T,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),_=We(p),I=We(s),R=We(l),[A,O]=f.useState(!1),[Y,q]=f.useState(!1),[K,X]=f.useState(!1),[U,M]=f.useState(!1);f.useEffect(()=>iR(O),[]);const B=f.useRef(null),[re,oe]=f.useState(!0),[te,ve]=f.useState(!!u),L=d!==void 0,V=L?d:te,W=f.useCallback(j=>{if(r||n){j.preventDefault();return}L||ve(V?j.target.checked:g?!0:j.target.checked),_==null||_(j)},[r,n,V,L,g,_]);Kt(()=>{B.current&&(B.current.indeterminate=!!g)},[g]),mn(()=>{n&&q(!1)},[n,q]),Kt(()=>{const j=B.current;if(!(j!=null&&j.form))return;const de=()=>{ve(!!u)};return j.form.addEventListener("reset",de),()=>{var se;return(se=j.form)==null?void 0:se.removeEventListener("reset",de)}},[]);const ie=n&&!h,he=f.useCallback(j=>{j.key===" "&&M(!0)},[M]),ce=f.useCallback(j=>{j.key===" "&&M(!1)},[M]);Kt(()=>{if(!B.current)return;B.current.checked!==V&&ve(B.current.checked)},[B.current]);const me=f.useCallback((j={},de=null)=>{const se=Oe=>{Y&&Oe.preventDefault(),M(!0)};return{...j,ref:de,"data-active":le(U),"data-hover":le(K),"data-checked":le(V),"data-focus":le(Y),"data-focus-visible":le(Y&&A),"data-indeterminate":le(g),"data-disabled":le(n),"data-invalid":le(a),"data-readonly":le(r),"aria-hidden":!0,onMouseDown:J(j.onMouseDown,se),onMouseUp:J(j.onMouseUp,()=>M(!1)),onMouseEnter:J(j.onMouseEnter,()=>X(!0)),onMouseLeave:J(j.onMouseLeave,()=>X(!1))}},[U,V,n,Y,A,K,g,a,r]),Pe=f.useCallback((j={},de=null)=>({...j,ref:de,"data-active":le(U),"data-hover":le(K),"data-checked":le(V),"data-focus":le(Y),"data-focus-visible":le(Y&&A),"data-indeterminate":le(g),"data-disabled":le(n),"data-invalid":le(a),"data-readonly":le(r)}),[U,V,n,Y,A,K,g,a,r]),be=f.useCallback((j={},de=null)=>({...E,...j,ref:Ie(de,se=>{se&&oe(se.tagName==="LABEL")}),onClick:J(j.onClick,()=>{var se;re||((se=B.current)==null||se.click(),requestAnimationFrame(()=>{var Oe;(Oe=B.current)==null||Oe.focus({preventScroll:!0})}))}),"data-disabled":le(n),"data-checked":le(V),"data-invalid":le(a)}),[E,n,V,a,re]),ae=f.useCallback((j={},de=null)=>({...j,ref:Ie(B,de),type:"checkbox",name:m,value:v,id:i,tabIndex:S,onChange:J(j.onChange,W),onBlur:J(j.onBlur,I,()=>q(!1)),onFocus:J(j.onFocus,R,()=>q(!0)),onKeyDown:J(j.onKeyDown,he),onKeyUp:J(j.onKeyUp,ce),required:o,checked:V,disabled:ie,readOnly:r,"aria-label":x,"aria-labelledby":w,"aria-invalid":k?!!k:a,"aria-describedby":c,"aria-disabled":n,style:ZI}),[m,v,i,W,I,R,he,ce,o,V,ie,r,x,w,k,a,c,n,S]),Ae=f.useCallback((j={},de=null)=>({...j,ref:de,onMouseDown:J(j.onMouseDown,lR),"data-disabled":le(n),"data-checked":le(V),"data-invalid":le(a)}),[V,n,a]);return{state:{isInvalid:a,isFocused:Y,isChecked:V,isActive:U,isHovered:K,isIndeterminate:g,isDisabled:n,isReadOnly:r,isRequired:o},getRootProps:be,getCheckboxProps:me,getIndicatorProps:Pe,getInputProps:ae,getLabelProps:Ae,htmlProps:E}}function lR(e){e.preventDefault(),e.stopPropagation()}var cR={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},uR={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},dR=Bi({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),fR=Bi({from:{opacity:0},to:{opacity:1}}),hR=Bi({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),pR=F(function(t,n){const r=zI(),o={...r,...t},a=tt("Checkbox",o),i=Ee(t),{spacing:s="0.5rem",className:l,children:c,iconColor:u,iconSize:d,icon:h=b.jsx(HI,{}),isChecked:p,isDisabled:g=r==null?void 0:r.isDisabled,onChange:m,inputProps:v,...S}=i;let x=p;r!=null&&r.value&&i.value&&(x=r.value.includes(i.value));let w=m;r!=null&&r.onChange&&i.value&&(w=vc(r.onChange,m));const{state:k,getInputProps:T,getCheckboxProps:E,getLabelProps:_,getRootProps:I}=Ng({...S,isDisabled:g,isChecked:x,onChange:w}),R=LI(k.isChecked),A=f.useMemo(()=>({animation:R?k.isIndeterminate?"".concat(fR," 20ms linear, ").concat(hR," 200ms linear"):"".concat(dR," 200ms linear"):void 0,fontSize:d,color:u,...a.icon}),[u,d,R,k.isIndeterminate,a.icon]),O=f.cloneElement(h,{__css:A,isIndeterminate:k.isIndeterminate,isChecked:k.isChecked});return b.jsxs(D.label,{__css:{...uR,...a.container},className:G("chakra-checkbox",l),...I(),children:[b.jsx("input",{className:"chakra-checkbox__input",...T(v,n)}),b.jsx(D.span,{__css:{...cR,...a.control},className:"chakra-checkbox__control",...E(),children:O}),c&&b.jsx(D.span,{className:"chakra-checkbox__label",..._(),__css:{marginStart:s,...a.label},children:c})]})});pR.displayName="Checkbox";function mR(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function ou(e,t){let n=mR(e);const r=10**(t!=null?t:10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function Yl(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function oh(e,t,n){return(e-t)*100/(n-t)}function gR(e,t,n){return(n-t)*e+t}function ah(e,t,n){const r=Math.round((e-t)/n)*n+t,o=Yl(n);return ou(r,o)}function Ka(e,t,n){return e==null?e:(n{var A;return r==null?"":(A=Js(r,a,n))!=null?A:""}),h=typeof o<"u",p=h?o:u,g=jg(kn(p),a),m=n!=null?n:g,v=f.useCallback(A=>{A!==p&&(h||d(A.toString()),c==null||c(A.toString(),kn(A)))},[c,h,p]),S=f.useCallback(A=>{let O=A;return l&&(O=Ka(O,i,s)),ou(O,m)},[m,l,s,i]),x=f.useCallback((A=a)=>{let O;p===""?O=kn(A):O=kn(p)+A,O=S(O),v(O)},[S,a,v,p]),w=f.useCallback((A=a)=>{let O;p===""?O=kn(-A):O=kn(p)-A,O=S(O),v(O)},[S,a,v,p]),k=f.useCallback(()=>{var A;let O;r==null?O="":O=(A=Js(r,a,n))!=null?A:i,v(O)},[r,n,a,v,i]),T=f.useCallback(A=>{var O;const Y=(O=Js(A,a,m))!=null?O:i;v(Y)},[m,a,v,i]),E=kn(p);return{isOutOfRange:E>s||E{const a=typeof e=="function"?e():e!=null?e:document;if(!(!n||!a))return a.addEventListener(t,o,r),()=>{a.removeEventListener(t,o,r)}},[t,e,r,o,n]),()=>{const a=typeof e=="function"?e():e!=null?e:document;a==null||a.removeEventListener(t,o,r)}}function bR(e){return"current"in e}var Bg=()=>typeof window<"u";function yR(){var e;const t=navigator.userAgentData;return(e=t==null?void 0:t.platform)!=null?e:navigator.platform}var xR=e=>Bg()&&e.test(navigator.vendor),SR=e=>Bg()&&e.test(yR()),wR=()=>SR(/mac|iphone|ipad|ipod/i),CR=()=>wR()&&xR(/apple/i);function kR(e){const{ref:t,elements:n,enabled:r}=e,o=()=>{var a,i;return(i=(a=t.current)==null?void 0:a.ownerDocument)!=null?i:document};Xn(o,"pointerdown",a=>{if(!CR()||!r)return;const i=a.target,l=(n!=null?n:[t]).some(c=>{const u=bR(c)?c.current:c;return(u==null?void 0:u.contains(i))||u===i});o().activeElement!==i&&l&&(a.preventDefault(),i.focus())})}function PR(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Zl="data-focus-lock",zg="data-focus-lock-disabled",_R="data-no-focus-lock",TR="data-autofocus-inside",ER="data-no-autofocus";function AR(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $R(e,t){var n=f.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function Lg(e,t){return $R(null,function(n){return e.forEach(function(r){return AR(r,n)})})}var el={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Gt=function(){return Gt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r=0}).sort(KR)},XR=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],su=XR.join(","),YR="".concat(su,", [data-focus-guard]"),ov=function(e,t){return en((e.shadowRoot||e).children).reduce(function(n,r){return n.concat(r.matches(t?YR:su)?[r]:[],ov(r))},[])},ZR=function(e,t){var n;return e instanceof HTMLIFrameElement&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?rs([e.contentDocument.body],t):[e]},rs=function(e,t){return e.reduce(function(n,r){var o,a=ov(r,t),i=(o=[]).concat.apply(o,a.map(function(s){return ZR(s,t)}));return n.concat(i,r.parentNode?en(r.parentNode.querySelectorAll(su)).filter(function(s){return s===r}):[])},[])},QR=function(e){var t=e.querySelectorAll("[".concat(TR,"]"));return en(t).map(function(n){return rs([n])}).reduce(function(n,r){return n.concat(r)},[])},lu=function(e,t){return en(e).filter(function(n){return Qg(t,n)}).filter(function(n){return UR(n)})},ih=function(e,t){return t===void 0&&(t=new Map),en(e).filter(function(n){return Jg(t,n)})},Jl=function(e,t,n){return rv(lu(rs(e,n),t),!0,n)},sh=function(e,t){return rv(lu(rs(e),t),!1)},JR=function(e,t){return lu(QR(e),t)},Mr=function(e,t){return e.shadowRoot?Mr(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:en(e.children).some(function(n){var r;if(n instanceof HTMLIFrameElement){var o=(r=n.contentDocument)===null||r===void 0?void 0:r.body;return o?Mr(o,t):!1}return Mr(n,t)})},eM=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(o),(a&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(i,s){return!t.has(s)})},av=function(e){return e.parentNode?av(e.parentNode):e},cu=function(e){var t=bi(e);return t.filter(Boolean).reduce(function(n,r){var o=r.getAttribute(Zl);return n.push.apply(n,o?eM(en(av(r).querySelectorAll("[".concat(Zl,'="').concat(o,'"]:not([').concat(zg,'="disabled"])')))):[r]),n},[])},tM=function(e){try{return e()}catch(t){return}},jo=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?jo(t.shadowRoot):t instanceof HTMLIFrameElement&&tM(function(){return t.contentWindow.document})?jo(t.contentWindow.document):t}},nM=function(e,t){return e===t},rM=function(e,t){return!!en(e.querySelectorAll("iframe")).some(function(n){return nM(n,t)})},iv=function(e,t){return t===void 0&&(t=jo(Xg(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:cu(e).some(function(n){return Mr(n,t)||rM(n,t)})},oM=function(e){e===void 0&&(e=document);var t=jo(e);return t?en(e.querySelectorAll("[".concat(_R,"]"))).some(function(n){return Mr(n,t)}):!1},aM=function(e,t){return t.filter(nv).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},uu=function(e,t){return nv(e)&&e.name?aM(e,t):e},iM=function(e){var t=new Set;return e.forEach(function(n){return t.add(uu(n,e))}),e.filter(function(n){return t.has(n)})},lh=function(e){return e[0]&&e.length>1?uu(e[0],e):e[0]},ch=function(e,t){return e.length>1?e.indexOf(uu(e[t],e)):t},sv="NEW_FOCUS",sM=function(e,t,n,r){var o=e.length,a=e[0],i=e[o-1],s=iu(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,c=r?t.indexOf(r):l,u=r?e.indexOf(r):-1,d=l-c,h=t.indexOf(a),p=t.indexOf(i),g=iM(t),m=n!==void 0?g.indexOf(n):-1,v=m-(r?g.indexOf(r):l),S=ch(e,0),x=ch(e,o-1);if(l===-1||u===-1)return sv;if(!d&&u>=0)return u;if(l<=h&&s&&Math.abs(d)>1)return x;if(l>=p&&s&&Math.abs(d)>1)return S;if(d&&Math.abs(v)>1)return u;if(l<=h)return x;if(l>p)return S;if(d)return Math.abs(d)>1?u:(o+u+d)%o}},lM=function(e){return function(t){var n,r=(n=ev(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},cM=function(e,t,n){var r=e.map(function(a){var i=a.node;return i}),o=ih(r.filter(lM(n)));return o&&o.length?lh(o):lh(ih(t))},ec=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&ec(e.parentNode.host||e.parentNode,t),t},tl=function(e,t){for(var n=ec(e),r=ec(t),o=0;o=0)return a}return!1},lv=function(e,t,n){var r=bi(e),o=bi(t),a=r[0],i=!1;return o.filter(Boolean).forEach(function(s){i=tl(i||s,s)||i,n.filter(Boolean).forEach(function(l){var c=tl(a,l);c&&(!i||Mr(c,i)?i=c:i=tl(c,i))})}),i},uM=function(e,t){return e.reduce(function(n,r){return n.concat(JR(r,t))},[])},dM=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(qR)},fM=function(e,t){var n=jo(bi(e).length>0?document:Xg(e).ownerDocument),r=cu(e).filter(yi),o=lv(n||e,e,r),a=new Map,i=sh(r,a),s=Jl(r,a).filter(function(p){var g=p.node;return yi(g)});if(!(!s[0]&&(s=i,!s[0]))){var l=sh([o],a).map(function(p){var g=p.node;return g}),c=dM(l,s),u=c.map(function(p){var g=p.node;return g}),d=sM(u,l,n,t);if(d===sv){var h=cM(i,u,uM(r,a));if(h)return{node:h};console.warn("focus-lock: cannot find any node to move focus into");return}return d===void 0?d:c[d]}},hM=function(e){var t=cu(e).filter(yi),n=lv(e,e,t),r=new Map,o=Jl([n],r,!0),a=Jl(t,r).filter(function(i){var s=i.node;return yi(s)}).map(function(i){var s=i.node;return s});return o.map(function(i){var s=i.node,l=i.index;return{node:s,index:l,lockItem:a.indexOf(s)>=0,guard:iu(s)}})},pM=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},nl=0,rl=!1,cv=function(e,t,n){n===void 0&&(n={});var r=fM(e,t);if(!rl&&r){if(nl>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),rl=!0,setTimeout(function(){rl=!1},1);return}nl++,pM(r.node,n.focusOptions),nl--}};function du(e){setTimeout(e,1)}var mM=function(){return document&&document.activeElement===document.body},gM=function(){return mM()||oM()},Or=null,Pr=null,Dr=null,Bo=!1,vM=function(){return!0},bM=function(t){return(Or.whiteList||vM)(t)},yM=function(t,n){Dr={observerNode:t,portaledElement:n}},xM=function(t){return Dr&&Dr.portaledElement===t};function uh(e,t,n,r){var o=null,a=e;do{var i=r[a];if(i.guard)i.node.dataset.focusAutoGuard&&(o=i);else if(i.lockItem){if(a!==e)return;o=null}else break}while((a+=n)!==t);o&&(o.node.tabIndex=0)}var SM=function(t){return t&&"current"in t?t.current:t},wM=function(t){return t?!!Bo:Bo==="meanwhile"},CM=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},kM=function(t,n){return n.some(function(r){return CM(t,r,r)})},xi=function(){var t=!1;if(Or){var n=Or,r=n.observed,o=n.persistentFocus,a=n.autoFocus,i=n.shards,s=n.crossFrame,l=n.focusOptions,c=r||Dr&&Dr.portaledElement,u=document&&document.activeElement;if(c){var d=[c].concat(i.map(SM).filter(Boolean));if((!u||bM(u))&&(o||wM(s)||!gM()||!Pr&&a)&&(c&&!(iv(d)||u&&kM(u,d)||xM(u))&&(document&&!Pr&&u&&!a?(u.blur&&u.blur(),document.body.focus()):(t=cv(d,Pr,{focusOptions:l}),Dr={})),Bo=!1,Pr=document&&document.activeElement),document){var h=document&&document.activeElement,p=hM(d),g=p.map(function(m){var v=m.node;return v}).indexOf(h);g>-1&&(p.filter(function(m){var v=m.guard,S=m.node;return v&&S.dataset.focusAutoGuard}).forEach(function(m){var v=m.node;return v.removeAttribute("tabIndex")}),uh(g,p.length,1,p),uh(g,-1,-1,p))}}}return t},uv=function(t){xi()&&t&&(t.stopPropagation(),t.preventDefault())},fu=function(){return du(xi)},PM=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||yM(r,n)},_M=function(){return null},dv=function(){Bo="just",du(function(){Bo="meanwhile"})},TM=function(){document.addEventListener("focusin",uv),document.addEventListener("focusout",fu),window.addEventListener("blur",dv)},EM=function(){document.removeEventListener("focusin",uv),document.removeEventListener("focusout",fu),window.removeEventListener("blur",dv)};function AM(e){return e.filter(function(t){var n=t.disabled;return!n})}function $M(e){var t=e.slice(-1)[0];t&&!Or&&TM();var n=Or,r=n&&t&&t.id===n.id;Or=t,n&&!r&&(n.onDeactivation(),e.filter(function(o){var a=o.id;return a===n.id}).length||n.returnFocus(!t)),t?(Pr=null,(!r||n.observed!==t.observed)&&t.onActivation(),xi(),du(xi)):(EM(),Pr=null)}qg.assignSyncMedium(PM);Kg.assignMedium(fu);MR.assignMedium(function(e){return e({moveFocusInside:cv,focusInside:iv})});const IM=zR(AM,$M)(_M);var tc=f.forwardRef(function(t,n){return f.createElement(ns,Zn({sideCar:IM,ref:n},t))}),fv=ns.propTypes||{};fv.sideCar;PR(fv,["sideCar"]);tc.propTypes={};function hv(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function hu(e){var t;if(!hv(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function RM(e){var t,n;return(n=(t=pv(e))==null?void 0:t.defaultView)!=null?n:window}function pv(e){return hv(e)?e.ownerDocument:document}function MM(e){return pv(e).activeElement}function OM(e){const t=e.ownerDocument.defaultView||window,{overflow:n,overflowX:r,overflowY:o}=t.getComputedStyle(e);return/auto|scroll|overlay|hidden/.test(n+o+r)}function DM(e){return e.localName==="html"?e:e.assignedSlot||e.parentElement||e.ownerDocument.documentElement}function mv(e){return["html","body","#document"].includes(e.localName)?e.ownerDocument.body:hu(e)&&OM(e)?e:mv(DM(e))}var gv=e=>e.hasAttribute("tabindex"),FM=e=>gv(e)&&e.tabIndex===-1;function NM(e){return!!e.getAttribute("disabled")||!!e.getAttribute("aria-disabled")}function vv(e){return e.parentElement&&vv(e.parentElement)?!0:e.hidden}function jM(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function bv(e){if(!hu(e)||vv(e)||NM(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():jM(e)?!0:gv(e)}function BM(e){return e?hu(e)&&bv(e)&&!FM(e):!1}var zM=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],LM=zM.join(),VM=e=>e.offsetWidth>0&&e.offsetHeight>0;function yv(e){const t=Array.from(e.querySelectorAll(LM));return t.unshift(e),t.filter(n=>bv(n)&&VM(n))}var dh,WM=(dh=tc.default)!=null?dh:tc,xv=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:o,children:a,isDisabled:i,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:c}=e,u=f.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&yv(r.current).length===0&&requestAnimationFrame(()=>{var g;(g=r.current)==null||g.focus()})},[t,r]),d=f.useCallback(()=>{var p;(p=n==null?void 0:n.current)==null||p.focus()},[n]),h=o&&!n;return b.jsx(WM,{crossFrame:c,persistentFocus:l,autoFocus:s,disabled:i,onActivation:u,onDeactivation:d,returnFocus:h,children:a})};xv.displayName="FocusLock";var HM=S_?f.useLayoutEffect:f.useEffect;function zo(e,t=[]){const n=f.useRef(e);return HM(()=>{n.current=e}),f.useCallback((...r)=>{var o;return(o=n.current)==null?void 0:o.call(n,...r)},t)}function UM(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch(n){throw new Error("Cannot assign value '".concat(t,"' to ref '").concat(e,"'"))}}}function vj(...e){return f.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{n&&UM(n,t)})},e)}function bj(e){const{ref:t,handler:n,enabled:r=!0}=e,o=zo(n),i=f.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;f.useEffect(()=>{if(!r)return;const s=d=>{ol(d,t)&&(i.isPointerDown=!0)},l=d=>{if(i.ignoreEmulatedMouseEvents){i.ignoreEmulatedMouseEvents=!1;return}i.isPointerDown&&n&&ol(d,t)&&(i.isPointerDown=!1,o(d))},c=d=>{i.ignoreEmulatedMouseEvents=!0,n&&i.isPointerDown&&ol(d,t)&&(i.isPointerDown=!1,o(d))},u=Op(t.current);return u.addEventListener("mousedown",s,!0),u.addEventListener("mouseup",l,!0),u.addEventListener("touchstart",s,!0),u.addEventListener("touchend",c,!0),()=>{u.removeEventListener("mousedown",s,!0),u.removeEventListener("mouseup",l,!0),u.removeEventListener("touchstart",s,!0),u.removeEventListener("touchend",c,!0)}},[n,t,o,i,r])}function ol(e,t){var n;const r=e.target;return r&&!Op(r).contains(r)?!1:!((n=t.current)!=null&&n.contains(r))}function GM(e,t){const n=f.useId();return f.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function qM(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function yj(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:o=(h,p)=>h!==p}=e,a=zo(r),i=zo(o),[s,l]=f.useState(n),c=t!==void 0,u=c?t:s,d=f.useCallback(h=>{const p=Tc(h,u);i(u,p)&&(c||l(p),a(p))},[c,a,u,i]);return[u,d]}function xj(e={}){const{onClose:t,onOpen:n,isOpen:r,id:o}=e,a=zo(n),i=zo(t),[s,l]=f.useState(e.defaultIsOpen||!1),[c,u]=qM(r,s),d=GM(o,"disclosure"),h=f.useCallback(()=>{c||l(!1),i==null||i()},[c,i]),p=f.useCallback(()=>{c||l(!0),a==null||a()},[c,a]),g=f.useCallback(()=>{(u?h:p)()},[u,p,h]);return{isOpen:!!u,onOpen:p,onClose:h,onToggle:g,isControlled:c,getButtonProps:(m={})=>({...m,"aria-expanded":u,"aria-controls":d,onClick:E_(m.onClick,g)}),getDisclosureProps:(m={})=>({...m,hidden:!u,id:d})}}var Sj=(e,t)=>{const n=f.useRef(!1),r=f.useRef(!1);f.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),f.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])},[KM,XM]=Te({name:"InputGroupStylesContext",errorMessage:"useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),YM=F(function(t,n){const r=tt("Input",t),{children:o,className:a,...i}=Ee(t),s=G("chakra-input__group",a),l={},c=eu(o),u=r.field;c.forEach(h=>{var p,g;r&&(u&&h.type.id==="InputLeftElement"&&(l.paddingStart=(p=u.height)!=null?p:u.h),u&&h.type.id==="InputRightElement"&&(l.paddingEnd=(g=u.height)!=null?g:u.h),h.type.id==="InputRightAddon"&&(l.borderEndRadius=0),h.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const d=c.map(h=>{var p,g;const m=Hp({size:((p=h.props)==null?void 0:p.size)||t.size,variant:((g=h.props)==null?void 0:g.variant)||t.variant});return h.type.id!=="Input"?f.cloneElement(h,m):f.cloneElement(h,Object.assign(m,l,h.props))});return b.jsx(D.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative",isolation:"isolate",...r.group},"data-group":!0,...i,children:b.jsx(KM,{value:r,children:d})})});YM.displayName="InputGroup";var ZM=D("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),os=F(function(t,n){var r,o;const{placement:a="left",...i}=t,s=XM(),l=s.field,u={[a==="left"?"insetStart":"insetEnd"]:"0",width:(r=l==null?void 0:l.height)!=null?r:l==null?void 0:l.h,height:(o=l==null?void 0:l.height)!=null?o:l==null?void 0:l.h,fontSize:l==null?void 0:l.fontSize,...s.element};return b.jsx(ZM,{ref:n,__css:u,...i})});os.id="InputElement";os.displayName="InputElement";var Sv=F(function(t,n){const{className:r,...o}=t,a=G("chakra-input__left-element",r);return b.jsx(os,{ref:n,placement:"left",className:a,...o})});Sv.id="InputLeftElement";Sv.displayName="InputLeftElement";var wv=F(function(t,n){const{className:r,...o}=t,a=G("chakra-input__right-element",r);return b.jsx(os,{ref:n,placement:"right",className:a,...o})});wv.id="InputRightElement";wv.displayName="InputRightElement";var Cv=F(function(t,n){const{htmlSize:r,...o}=t,a=tt("Input",o),i=Ee(o),s=tu(i),l=G("chakra-input",t.className);return b.jsx(D.input,{size:r,...s,__css:a.field,ref:n,className:l})});Cv.displayName="Input";Cv.id="Input";var QM=F(function(t,n){const r=wt("Link",t),{className:o,isExternal:a,...i}=Ee(t);return b.jsx(D.a,{target:a?"_blank":void 0,rel:a?"noopener":void 0,ref:n,className:G("chakra-link",o),...i,__css:r})});QM.displayName="Link";var[JM,kv]=Te({name:"ListStylesContext",errorMessage:"useListStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),pu=F(function(t,n){const r=tt("List",t),{children:o,styleType:a="none",stylePosition:i,spacing:s,...l}=Ee(t),c=eu(o),d=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return b.jsx(JM,{value:r,children:b.jsx(D.ul,{ref:n,listStyleType:a,listStylePosition:i,role:"list",__css:{...r.container,...d},...l,children:c})})});pu.displayName="List";var eO=F((e,t)=>{const{as:n,...r}=e;return b.jsx(pu,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});eO.displayName="OrderedList";var tO=F(function(t,n){const{as:r,...o}=t;return b.jsx(pu,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...o})});tO.displayName="UnorderedList";var nO=F(function(t,n){const r=kv();return b.jsx(D.li,{ref:n,...t,__css:r.item})});nO.displayName="ListItem";var rO=F(function(t,n){const r=kv();return b.jsx(Ot,{ref:n,role:"presentation",...t,__css:r.icon})});rO.displayName="ListIcon";function oO(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):$t(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var aO=D("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});aO.displayName="Spacer";var iO=F(function(t,n){const r=wt("Text",t),{className:o,align:a,decoration:i,casing:s,...l}=Ee(t),c=Hp({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return b.jsx(D.p,{ref:n,className:G("chakra-text",t.className),...c,...l,__css:r})});iO.displayName="Text";var sO=F(function(t,n){const{spacing:r="0.5rem",spacingX:o,spacingY:a,children:i,justify:s,direction:l,align:c,className:u,shouldWrapChildren:d,...h}=t,p=f.useMemo(()=>d?f.Children.map(i,(g,m)=>b.jsx(Pv,{children:g},m)):i,[i,d]);return b.jsx(D.div,{ref:n,className:G("chakra-wrap",u),...h,children:b.jsx(D.ul,{className:"chakra-wrap__list",__css:{display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:c,flexDirection:l,listStyleType:"none",gap:r,columnGap:o,rowGap:a,padding:"0"},children:p})})});sO.displayName="Wrap";var Pv=F(function(t,n){const{className:r,...o}=t;return b.jsx(D.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:G("chakra-wrap__listitem",r),...o})});Pv.displayName="WrapItem";var lO=e=>b.jsx(D.div,{className:"chakra-stack__divider",...e,__css:{...e.__css,borderWidth:0,alignSelf:"stretch",borderColor:"inherit",width:"auto",height:"auto"}});lO.displayName="StackDivider";var _v=e=>b.jsx(D.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});_v.displayName="StackItem";function cO(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":oO(n,o=>r[o])}}var mu=F((e,t)=>{const{isInline:n,direction:r,align:o,justify:a,spacing:i="0.5rem",wrap:s,children:l,divider:c,className:u,shouldWrapChildren:d,...h}=e,p=n?"row":r!=null?r:"column",g=f.useMemo(()=>cO({spacing:i,direction:p}),[i,p]),m=!!c,v=!d&&!m,S=f.useMemo(()=>{const w=eu(l);return v?w:w.map((k,T)=>{const E=typeof k.key<"u"?k.key:T,_=T+1===w.length,R=d?b.jsx(_v,{children:k},E):k;if(!m)return R;const A=f.cloneElement(c,{__css:g}),O=_?null:A;return b.jsxs(f.Fragment,{children:[R,O]},E)})},[c,g,m,v,d,l]),x=G("chakra-stack",u);return b.jsx(D.div,{ref:t,display:"flex",alignItems:o,justifyContent:a,flexDirection:p,flexWrap:s,gap:m?void 0:i,className:x,...h,children:S})});mu.displayName="Stack";var uO=F((e,t)=>b.jsx(mu,{align:"center",...e,direction:"column",ref:t}));uO.displayName="VStack";var dO=F((e,t)=>b.jsx(mu,{align:"center",...e,direction:"row",ref:t}));dO.displayName="HStack";var fO=F(function(t,n){const r=wt("Heading",t),{className:o,...a}=Ee(t);return b.jsx(D.h2,{ref:n,className:G("chakra-heading",t.className),...a,__css:r})});fO.displayName="Heading";var Tv=D("div");Tv.displayName="Box";var Ev=F(function(t,n){const{size:r,centerContent:o=!0,...a}=t,i=o?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return b.jsx(Tv,{ref:n,boxSize:r,__css:{...i,flexShrink:0,flexGrow:0},...a})});Ev.displayName="Square";var hO=F(function(t,n){const{size:r,...o}=t;return b.jsx(Ev,{size:r,ref:n,borderRadius:"9999px",...o})});hO.displayName="Circle";var pO=F(function(t,n){const r=wt("Kbd",t),{className:o,...a}=Ee(t);return b.jsx(D.kbd,{ref:n,className:G("chakra-kbd",o),...a,__css:{fontFamily:"mono",...r}})});pO.displayName="Kbd";var mO=F(function(t,n){const r=wt("Badge",t),{className:o,...a}=Ee(t);return b.jsx(D.span,{ref:n,className:G("chakra-badge",t.className),...a,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});mO.displayName="Badge";var gO=D("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});gO.displayName="Center";var vO={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};F(function(t,n){const{axis:r="both",...o}=t;return b.jsx(D.div,{ref:n,__css:vO[r],...o,position:"absolute"})});var bO=F(function(t,n){const{borderLeftWidth:r,borderBottomWidth:o,borderTopWidth:a,borderRightWidth:i,borderWidth:s,borderStyle:l,borderColor:c,...u}=wt("Divider",t),{className:d,orientation:h="horizontal",__css:p,...g}=Ee(t),m={vertical:{borderLeftWidth:r||i||s||"1px",height:"100%"},horizontal:{borderBottomWidth:o||a||s||"1px",width:"100%"}};return b.jsx(D.hr,{ref:n,"aria-orientation":h,...g,__css:{...u,border:"0",borderColor:c,borderStyle:l,...m[h],...p},className:G("chakra-divider",d)})});bO.displayName="Divider";var yO=F(function(t,n){const{direction:r,align:o,justify:a,wrap:i,basis:s,grow:l,shrink:c,...u}=t,d={display:"flex",flexDirection:r,alignItems:o,justifyContent:a,flexWrap:i,flexBasis:s,flexGrow:l,flexShrink:c};return b.jsx(D.div,{ref:n,__css:d,...u})});yO.displayName="Flex";function xO(e){const{key:t}=e;return t.length===1||t.length>1&&/[^a-zA-Z0-9]/.test(t)}function SO(e={}){const{timeout:t=300,preventDefault:n=()=>!0}=e,[r,o]=f.useState([]),a=f.useRef(),i=()=>{a.current&&(clearTimeout(a.current),a.current=null)},s=()=>{i(),a.current=setTimeout(()=>{o([]),a.current=null},t)};f.useEffect(()=>i,[]);function l(c){return u=>{if(u.key==="Backspace"){const d=[...r];d.pop(),o(d);return}if(xO(u)){const d=r.concat(u.key);n(u)&&(u.preventDefault(),u.stopPropagation()),o(d),c(d.join("")),s()}}}return l}function wO(e,t,n,r){if(t==null)return r;if(!r)return e.find(i=>n(i).toLowerCase().startsWith(t.toLowerCase()));const o=e.filter(a=>n(a).toLowerCase().startsWith(t.toLowerCase()));if(o.length>0){let a;return o.includes(r)?(a=o.indexOf(r)+1,a===o.length&&(a=0),o[a]):(a=e.indexOf(o[0]),e[a])}return r}function CO(){const e=f.useRef(new Map),t=e.current,n=f.useCallback((o,a,i,s)=>{e.current.set(i,{type:a,el:o,options:s}),o.addEventListener(a,i,s)},[]),r=f.useCallback((o,a,i,s)=>{o.removeEventListener(a,i,s),e.current.delete(i)},[]);return f.useEffect(()=>()=>{t.forEach((o,a)=>{r(o.el,o.type,a,o.options)})},[r,t]),{add:n,remove:r}}function al(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function kO(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:o=!0,clickOnSpace:a=!0,onMouseDown:i,onMouseUp:s,onClick:l,onKeyDown:c,onKeyUp:u,tabIndex:d,onMouseOver:h,onMouseLeave:p,...g}=e,[m,v]=f.useState(!0),[S,x]=f.useState(!1),w=CO(),k=M=>{M&&M.tagName!=="BUTTON"&&v(!1)},T=m?d:d||0,E=n&&!r,_=f.useCallback(M=>{if(n){M.stopPropagation(),M.preventDefault();return}M.currentTarget.focus(),l==null||l(M)},[n,l]),I=f.useCallback(M=>{S&&al(M)&&(M.preventDefault(),M.stopPropagation(),x(!1),w.remove(document,"keyup",I,!1))},[S,w]),R=f.useCallback(M=>{if(c==null||c(M),n||M.defaultPrevented||M.metaKey||!al(M.nativeEvent)||m)return;const B=o&&M.key==="Enter";a&&M.key===" "&&(M.preventDefault(),x(!0)),B&&(M.preventDefault(),M.currentTarget.click()),w.add(document,"keyup",I,!1)},[n,m,c,o,a,w,I]),A=f.useCallback(M=>{if(u==null||u(M),n||M.defaultPrevented||M.metaKey||!al(M.nativeEvent)||m)return;a&&M.key===" "&&(M.preventDefault(),x(!1),M.currentTarget.click())},[a,m,n,u]),O=f.useCallback(M=>{M.button===0&&(x(!1),w.remove(document,"mouseup",O,!1))},[w]),Y=f.useCallback(M=>{if(M.button!==0)return;if(n){M.stopPropagation(),M.preventDefault();return}m||x(!0),M.currentTarget.focus({preventScroll:!0}),w.add(document,"mouseup",O,!1),i==null||i(M)},[n,m,i,w,O]),q=f.useCallback(M=>{M.button===0&&(m||x(!1),s==null||s(M))},[s,m]),K=f.useCallback(M=>{if(n){M.preventDefault();return}h==null||h(M)},[n,h]),X=f.useCallback(M=>{S&&(M.preventDefault(),x(!1)),p==null||p(M)},[S,p]),U=Ie(t,k);return m?{...g,ref:U,type:"button","aria-disabled":E?void 0:n,disabled:E,onClick:_,onMouseDown:i,onMouseUp:s,onKeyUp:u,onKeyDown:c,onMouseOver:h,onMouseLeave:p}:{...g,ref:U,role:"button","data-active":le(S),"aria-disabled":n?"true":void 0,tabIndex:E?void 0:T,onClick:_,onMouseDown:Y,onMouseUp:q,onKeyUp:A,onKeyDown:R,onMouseOver:K,onMouseLeave:X}}function PO(e){const t=e.current;if(!t)return!1;const n=MM(t);return!n||t.contains(n)?!1:!!BM(n)}function Av(e,t){const{shouldFocus:n,visible:r,focusRef:o}=t,a=n&&!r;mn(()=>{if(!a||PO(e))return;const i=(o==null?void 0:o.current)||e.current;let s;if(i)return s=requestAnimationFrame(()=>{i.focus({preventScroll:!0})}),()=>{cancelAnimationFrame(s)}},[a,e,o])}var _O={preventScroll:!0,shouldFocus:!1};function TO(e,t=_O){const{focusRef:n,preventScroll:r,shouldFocus:o,visible:a}=t,i=EO(e)?e.current:e,s=o&&a,l=f.useRef(s),c=f.useRef(a);Kt(()=>{!c.current&&a&&(l.current=s),c.current=a},[a,s]);const u=f.useCallback(()=>{if(!(!a||!i||!l.current)&&(l.current=!1,!i.contains(document.activeElement)))if(n!=null&&n.current)requestAnimationFrame(()=>{var d;(d=n.current)==null||d.focus({preventScroll:r})});else{const d=yv(i);d.length>0&&requestAnimationFrame(()=>{d[0].focus({preventScroll:r})})}},[a,r,i,n]);mn(()=>{u()},[u]),Xn(i,"transitionend",u)}function EO(e){return"current"in e}var lr=(e,t)=>({var:e,varRef:t?"var(".concat(e,", ").concat(t,")"):"var(".concat(e,")")}),Ke={arrowShadowColor:lr("--popper-arrow-shadow-color"),arrowSize:lr("--popper-arrow-size","8px"),arrowSizeHalf:lr("--popper-arrow-size-half"),arrowBg:lr("--popper-arrow-bg"),transformOrigin:lr("--popper-transform-origin"),arrowOffset:lr("--popper-arrow-offset")};function AO(e){if(e.includes("top"))return"1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 0px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 0px 0 var(--popper-arrow-shadow-color)"}var $O={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},IO=e=>$O[e],fh={scroll:!0,resize:!0};function RO(e){let t;return typeof e=="object"?t={enabled:!0,options:{...fh,...e}}:t={enabled:e,options:fh},t}var MO={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width="".concat(e.rects.reference.width,"px")},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width="".concat(t.offsetWidth,"px")}},OO={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{hh(e)},effect:({state:e})=>()=>{hh(e)}},hh=e=>{e.elements.popper.style.setProperty(Ke.transformOrigin.var,IO(e.placement))},DO={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{FO(e)}},FO=e=>{var t;if(!e.placement)return;const n=NO(e.placement);if((t=e.elements)!=null&&t.arrow&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Ke.arrowSize.varRef,height:Ke.arrowSize.varRef,zIndex:-1});const r={[Ke.arrowSizeHalf.var]:"calc(".concat(Ke.arrowSize.varRef," / 2 - 1px)"),[Ke.arrowOffset.var]:"calc(".concat(Ke.arrowSizeHalf.varRef," * -1)")};for(const o in r)e.elements.arrow.style.setProperty(o,r[o])}},NO=e=>{if(e.startsWith("top"))return{property:"bottom",value:Ke.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Ke.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Ke.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Ke.arrowOffset.varRef}},jO={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{ph(e)},effect:({state:e})=>()=>{ph(e)}},ph=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const n=AO(e.placement);n&&t.style.setProperty("--popper-arrow-default-shadow",n),Object.assign(t.style,{transform:"rotate(45deg)",background:Ke.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},BO={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},zO={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function LO(e,t="ltr"){var n,r;const o=((n=BO[e])==null?void 0:n[t])||e;return t==="ltr"?o:(r=zO[e])!=null?r:o}var ft="top",Rt="bottom",Mt="right",ht="left",gu="auto",Jo=[ft,Rt,Mt,ht],Lr="start",Lo="end",VO="clippingParents",$v="viewport",ro="popper",WO="reference",mh=Jo.reduce(function(e,t){return e.concat([t+"-"+Lr,t+"-"+Lo])},[]),Iv=[].concat(Jo,[gu]).reduce(function(e,t){return e.concat([t,t+"-"+Lr,t+"-"+Lo])},[]),HO="beforeRead",UO="read",GO="afterRead",qO="beforeMain",KO="main",XO="afterMain",YO="beforeWrite",ZO="write",QO="afterWrite",JO=[HO,UO,GO,qO,KO,XO,YO,ZO,QO];function Qt(e){return e?(e.nodeName||"").toLowerCase():null}function xt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jn(e){var t=xt(e).Element;return e instanceof t||e instanceof Element}function It(e){var t=xt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function vu(e){if(typeof ShadowRoot>"u")return!1;var t=xt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function eD(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},a=t.elements[n];!It(a)||!Qt(a)||(Object.assign(a.style,r),Object.keys(o).forEach(function(i){var s=o[i];s===!1?a.removeAttribute(i):a.setAttribute(i,s===!0?"":s)}))})}function tD(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],a=t.attributes[r]||{},i=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=i.reduce(function(l,c){return l[c]="",l},{});!It(o)||!Qt(o)||(Object.assign(o.style,s),Object.keys(a).forEach(function(l){o.removeAttribute(l)}))})}}const nD={name:"applyStyles",enabled:!0,phase:"write",fn:eD,effect:tD,requires:["computeStyles"]};function Zt(e){return e.split("-")[0]}var Yn=Math.max,Si=Math.min,Vr=Math.round;function nc(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Rv(){return!/^((?!chrome|android).)*safari/i.test(nc())}function Wr(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,a=1;t&&It(e)&&(o=e.offsetWidth>0&&Vr(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Vr(r.height)/e.offsetHeight||1);var i=Jn(e)?xt(e):window,s=i.visualViewport,l=!Rv()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/o,u=(r.top+(l&&s?s.offsetTop:0))/a,d=r.width/o,h=r.height/a;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function bu(e){var t=Wr(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Mv(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&vu(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function vn(e){return xt(e).getComputedStyle(e)}function rD(e){return["table","td","th"].indexOf(Qt(e))>=0}function In(e){return((Jn(e)?e.ownerDocument:e.document)||window.document).documentElement}function as(e){return Qt(e)==="html"?e:e.assignedSlot||e.parentNode||(vu(e)?e.host:null)||In(e)}function gh(e){return!It(e)||vn(e).position==="fixed"?null:e.offsetParent}function oD(e){var t=/firefox/i.test(nc()),n=/Trident/i.test(nc());if(n&&It(e)){var r=vn(e);if(r.position==="fixed")return null}var o=as(e);for(vu(o)&&(o=o.host);It(o)&&["html","body"].indexOf(Qt(o))<0;){var a=vn(o);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return o;o=o.parentNode}return null}function ea(e){for(var t=xt(e),n=gh(e);n&&rD(n)&&vn(n).position==="static";)n=gh(n);return n&&(Qt(n)==="html"||Qt(n)==="body"&&vn(n).position==="static")?t:n||oD(e)||t}function yu(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Co(e,t,n){return Yn(e,Si(t,n))}function aD(e,t,n){var r=Co(e,t,n);return r>n?n:r}function Ov(){return{top:0,right:0,bottom:0,left:0}}function Dv(e){return Object.assign({},Ov(),e)}function Fv(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var iD=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Dv(typeof t!="number"?t:Fv(t,Jo))};function sD(e){var t,n=e.state,r=e.name,o=e.options,a=n.elements.arrow,i=n.modifiersData.popperOffsets,s=Zt(n.placement),l=yu(s),c=[ht,Mt].indexOf(s)>=0,u=c?"height":"width";if(!(!a||!i)){var d=iD(o.padding,n),h=bu(a),p=l==="y"?ft:ht,g=l==="y"?Rt:Mt,m=n.rects.reference[u]+n.rects.reference[l]-i[l]-n.rects.popper[u],v=i[l]-n.rects.reference[l],S=ea(a),x=S?l==="y"?S.clientHeight||0:S.clientWidth||0:0,w=m/2-v/2,k=d[p],T=x-h[u]-d[g],E=x/2-h[u]/2+w,_=Co(k,E,T),I=l;n.modifiersData[r]=(t={},t[I]=_,t.centerOffset=_-E,t)}}function lD(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Mv(t.elements.popper,o)&&(t.elements.arrow=o))}const cD={name:"arrow",enabled:!0,phase:"main",fn:sD,effect:lD,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Hr(e){return e.split("-")[1]}var uD={top:"auto",right:"auto",bottom:"auto",left:"auto"};function dD(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Vr(n*o)/o||0,y:Vr(r*o)/o||0}}function vh(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.variation,i=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,h=i.x,p=h===void 0?0:h,g=i.y,m=g===void 0?0:g,v=typeof u=="function"?u({x:p,y:m}):{x:p,y:m};p=v.x,m=v.y;var S=i.hasOwnProperty("x"),x=i.hasOwnProperty("y"),w=ht,k=ft,T=window;if(c){var E=ea(n),_="clientHeight",I="clientWidth";if(E===xt(n)&&(E=In(n),vn(E).position!=="static"&&s==="absolute"&&(_="scrollHeight",I="scrollWidth")),E=E,o===ft||(o===ht||o===Mt)&&a===Lo){k=Rt;var R=d&&E===T&&T.visualViewport?T.visualViewport.height:E[_];m-=R-r.height,m*=l?1:-1}if(o===ht||(o===ft||o===Rt)&&a===Lo){w=Mt;var A=d&&E===T&&T.visualViewport?T.visualViewport.width:E[I];p-=A-r.width,p*=l?1:-1}}var O=Object.assign({position:s},c&&uD),Y=u===!0?dD({x:p,y:m},xt(n)):{x:p,y:m};if(p=Y.x,m=Y.y,l){var q;return Object.assign({},O,(q={},q[k]=x?"0":"",q[w]=S?"0":"",q.transform=(T.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",q))}return Object.assign({},O,(t={},t[k]=x?m+"px":"",t[w]=S?p+"px":"",t.transform="",t))}function fD(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,a=n.adaptive,i=a===void 0?!0:a,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:Zt(t.placement),variation:Hr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,vh(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,vh(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const hD={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:fD,data:{}};var _a={passive:!0};function pD(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,a=o===void 0?!0:o,i=r.resize,s=i===void 0?!0:i,l=xt(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(u){u.addEventListener("scroll",n.update,_a)}),s&&l.addEventListener("resize",n.update,_a),function(){a&&c.forEach(function(u){u.removeEventListener("scroll",n.update,_a)}),s&&l.removeEventListener("resize",n.update,_a)}}const mD={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:pD,data:{}};var gD={left:"right",right:"left",bottom:"top",top:"bottom"};function Xa(e){return e.replace(/left|right|bottom|top/g,function(t){return gD[t]})}var vD={start:"end",end:"start"};function bh(e){return e.replace(/start|end/g,function(t){return vD[t]})}function xu(e){var t=xt(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Su(e){return Wr(In(e)).left+xu(e).scrollLeft}function bD(e,t){var n=xt(e),r=In(e),o=n.visualViewport,a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;var c=Rv();(c||!c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s+Su(e),y:l}}function yD(e){var t,n=In(e),r=xu(e),o=(t=e.ownerDocument)==null?void 0:t.body,a=Yn(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=Yn(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Su(e),l=-r.scrollTop;return vn(o||n).direction==="rtl"&&(s+=Yn(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:s,y:l}}function wu(e){var t=vn(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Nv(e){return["html","body","#document"].indexOf(Qt(e))>=0?e.ownerDocument.body:It(e)&&wu(e)?e:Nv(as(e))}function ko(e,t){var n;t===void 0&&(t=[]);var r=Nv(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),a=xt(r),i=o?[a].concat(a.visualViewport||[],wu(r)?r:[]):r,s=t.concat(i);return o?s:s.concat(ko(as(i)))}function rc(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function xD(e,t){var n=Wr(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function yh(e,t,n){return t===$v?rc(bD(e,n)):Jn(t)?xD(t,n):rc(yD(In(e)))}function SD(e){var t=ko(as(e)),n=["absolute","fixed"].indexOf(vn(e).position)>=0,r=n&&It(e)?ea(e):e;return Jn(r)?t.filter(function(o){return Jn(o)&&Mv(o,r)&&Qt(o)!=="body"}):[]}function wD(e,t,n,r){var o=t==="clippingParents"?SD(e):[].concat(t),a=[].concat(o,[n]),i=a[0],s=a.reduce(function(l,c){var u=yh(e,c,r);return l.top=Yn(u.top,l.top),l.right=Si(u.right,l.right),l.bottom=Si(u.bottom,l.bottom),l.left=Yn(u.left,l.left),l},yh(e,i,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function jv(e){var t=e.reference,n=e.element,r=e.placement,o=r?Zt(r):null,a=r?Hr(r):null,i=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(o){case ft:l={x:i,y:t.y-n.height};break;case Rt:l={x:i,y:t.y+t.height};break;case Mt:l={x:t.x+t.width,y:s};break;case ht:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=o?yu(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(a){case Lr:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Lo:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Vo(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,a=n.strategy,i=a===void 0?e.strategy:a,s=n.boundary,l=s===void 0?VO:s,c=n.rootBoundary,u=c===void 0?$v:c,d=n.elementContext,h=d===void 0?ro:d,p=n.altBoundary,g=p===void 0?!1:p,m=n.padding,v=m===void 0?0:m,S=Dv(typeof v!="number"?v:Fv(v,Jo)),x=h===ro?WO:ro,w=e.rects.popper,k=e.elements[g?x:h],T=wD(Jn(k)?k:k.contextElement||In(e.elements.popper),l,u,i),E=Wr(e.elements.reference),_=jv({reference:E,element:w,strategy:"absolute",placement:o}),I=rc(Object.assign({},w,_)),R=h===ro?I:E,A={top:T.top-R.top+S.top,bottom:R.bottom-T.bottom+S.bottom,left:T.left-R.left+S.left,right:R.right-T.right+S.right},O=e.modifiersData.offset;if(h===ro&&O){var Y=O[o];Object.keys(A).forEach(function(q){var K=[Mt,Rt].indexOf(q)>=0?1:-1,X=[ft,Rt].indexOf(q)>=0?"y":"x";A[q]+=Y[X]*K})}return A}function CD(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,a=n.rootBoundary,i=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?Iv:l,u=Hr(r),d=u?s?mh:mh.filter(function(g){return Hr(g)===u}):Jo,h=d.filter(function(g){return c.indexOf(g)>=0});h.length===0&&(h=d);var p=h.reduce(function(g,m){return g[m]=Vo(e,{placement:m,boundary:o,rootBoundary:a,padding:i})[Zt(m)],g},{});return Object.keys(p).sort(function(g,m){return p[g]-p[m]})}function kD(e){if(Zt(e)===gu)return[];var t=Xa(e);return[bh(e),t,bh(t)]}function PD(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,a=o===void 0?!0:o,i=n.altAxis,s=i===void 0?!0:i,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,g=p===void 0?!0:p,m=n.allowedAutoPlacements,v=t.options.placement,S=Zt(v),x=S===v,w=l||(x||!g?[Xa(v)]:kD(v)),k=[v].concat(w).reduce(function(V,W){return V.concat(Zt(W)===gu?CD(t,{placement:W,boundary:u,rootBoundary:d,padding:c,flipVariations:g,allowedAutoPlacements:m}):W)},[]),T=t.rects.reference,E=t.rects.popper,_=new Map,I=!0,R=k[0],A=0;A=0,X=K?"width":"height",U=Vo(t,{placement:O,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),M=K?q?Mt:ht:q?Rt:ft;T[X]>E[X]&&(M=Xa(M));var B=Xa(M),re=[];if(a&&re.push(U[Y]<=0),s&&re.push(U[M]<=0,U[B]<=0),re.every(function(V){return V})){R=O,I=!1;break}_.set(O,re)}if(I)for(var oe=g?3:1,te=function(W){var ie=k.find(function(he){var ce=_.get(he);if(ce)return ce.slice(0,W).every(function(me){return me})});if(ie)return R=ie,"break"},ve=oe;ve>0;ve--){var L=te(ve);if(L==="break")break}t.placement!==R&&(t.modifiersData[r]._skip=!0,t.placement=R,t.reset=!0)}}const _D={name:"flip",enabled:!0,phase:"main",fn:PD,requiresIfExists:["offset"],data:{_skip:!1}};function xh(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Sh(e){return[ft,Mt,Rt,ht].some(function(t){return e[t]>=0})}function TD(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=Vo(t,{elementContext:"reference"}),s=Vo(t,{altBoundary:!0}),l=xh(i,r),c=xh(s,o,a),u=Sh(l),d=Sh(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const ED={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:TD};function AD(e,t,n){var r=Zt(e),o=[ht,ft].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=a[0],s=a[1];return i=i||0,s=(s||0)*o,[ht,Mt].indexOf(r)>=0?{x:s,y:i}:{x:i,y:s}}function $D(e){var t=e.state,n=e.options,r=e.name,o=n.offset,a=o===void 0?[0,0]:o,i=Iv.reduce(function(u,d){return u[d]=AD(d,t.rects,a),u},{}),s=i[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=i}const ID={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:$D};function RD(e){var t=e.state,n=e.name;t.modifiersData[n]=jv({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const MD={name:"popperOffsets",enabled:!0,phase:"read",fn:RD,data:{}};function OD(e){return e==="x"?"y":"x"}function DD(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,a=o===void 0?!0:o,i=n.altAxis,s=i===void 0?!1:i,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,p=h===void 0?!0:h,g=n.tetherOffset,m=g===void 0?0:g,v=Vo(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),S=Zt(t.placement),x=Hr(t.placement),w=!x,k=yu(S),T=OD(k),E=t.modifiersData.popperOffsets,_=t.rects.reference,I=t.rects.popper,R=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,A=typeof R=="number"?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,Y={x:0,y:0};if(E){if(a){var q,K=k==="y"?ft:ht,X=k==="y"?Rt:Mt,U=k==="y"?"height":"width",M=E[k],B=M+v[K],re=M-v[X],oe=p?-I[U]/2:0,te=x===Lr?_[U]:I[U],ve=x===Lr?-I[U]:-_[U],L=t.elements.arrow,V=p&&L?bu(L):{width:0,height:0},W=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Ov(),ie=W[K],he=W[X],ce=Co(0,_[U],V[U]),me=w?_[U]/2-oe-ce-ie-A.mainAxis:te-ce-ie-A.mainAxis,Pe=w?-_[U]/2+oe+ce+he+A.mainAxis:ve+ce+he+A.mainAxis,be=t.elements.arrow&&ea(t.elements.arrow),ae=be?k==="y"?be.clientTop||0:be.clientLeft||0:0,Ae=(q=O==null?void 0:O[k])!=null?q:0,ge=M+me-Ae-ae,j=M+Pe-Ae,de=Co(p?Si(B,ge):B,M,p?Yn(re,j):re);E[k]=de,Y[k]=de-M}if(s){var se,Oe=k==="x"?ft:ht,ct=k==="x"?Rt:Mt,ze=E[T],nt=T==="y"?"height":"width",rt=ze+v[Oe],Ze=ze-v[ct],Ct=[ft,ht].indexOf(S)!==-1,tn=(se=O==null?void 0:O[T])!=null?se:0,bn=Ct?rt:ze-_[nt]-I[nt]-tn+A.altAxis,yn=Ct?ze+_[nt]+I[nt]-tn-A.altAxis:Ze,N=p&&Ct?aD(bn,ze,yn):Co(p?bn:rt,ze,p?yn:Ze);E[T]=N,Y[T]=N-ze}t.modifiersData[r]=Y}}const FD={name:"preventOverflow",enabled:!0,phase:"main",fn:DD,requiresIfExists:["offset"]};function ND(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function jD(e){return e===xt(e)||!It(e)?xu(e):ND(e)}function BD(e){var t=e.getBoundingClientRect(),n=Vr(t.width)/e.offsetWidth||1,r=Vr(t.height)/e.offsetHeight||1;return n!==1||r!==1}function zD(e,t,n){n===void 0&&(n=!1);var r=It(t),o=It(t)&&BD(t),a=In(t),i=Wr(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Qt(t)!=="body"||wu(a))&&(s=jD(t)),It(t)?(l=Wr(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=Su(a))),{x:i.left+s.scrollLeft-l.x,y:i.top+s.scrollTop-l.y,width:i.width,height:i.height}}function LD(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function o(a){n.add(a.name);var i=[].concat(a.requires||[],a.requiresIfExists||[]);i.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&o(l)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||o(a)}),r}function VD(e){var t=LD(e);return JO.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function WD(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function HD(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var wh={placement:"bottom",modifiers:[],strategy:"absolute"};function Ch(){for(var e=arguments.length,t=new Array(e),n=0;n{}),w=f.useCallback(()=>{var A;!t||!g.current||!m.current||((A=x.current)==null||A.call(x),v.current=qD(g.current,m.current,{placement:S,modifiers:[jO,DO,OO,{...MO,enabled:!!h},{name:"eventListeners",...RO(i)},{name:"arrow",options:{padding:a}},{name:"offset",options:{offset:s!=null?s:[0,l]}},{name:"flip",enabled:!!c,options:{padding:8}},{name:"preventOverflow",enabled:!!d,options:{boundary:u}},...n!=null?n:[]],strategy:o}),v.current.forceUpdate(),x.current=v.current.destroy)},[S,t,n,h,i,a,s,l,c,d,u,o]);f.useEffect(()=>()=>{var A;!g.current&&!m.current&&((A=v.current)==null||A.destroy(),v.current=null)},[]);const k=f.useCallback(A=>{g.current=A,w()},[w]),T=f.useCallback((A={},O=null)=>({...A,ref:Ie(k,O)}),[k]),E=f.useCallback(A=>{m.current=A,w()},[w]),_=f.useCallback((A={},O=null)=>({...A,ref:Ie(E,O),style:{...A.style,position:o,minWidth:h?void 0:"max-content",inset:"0 auto auto 0"}}),[o,E,h]),I=f.useCallback((A={},O=null)=>{const{size:Y,shadowColor:q,bg:K,style:X,...U}=A;return{...U,ref:O,"data-popper-arrow":"",style:KD(A)}},[]),R=f.useCallback((A={},O=null)=>({...A,ref:O,"data-popper-arrow-inner":""}),[]);return{update(){var A;(A=v.current)==null||A.update()},forceUpdate(){var A;(A=v.current)==null||A.forceUpdate()},transformOrigin:Ke.transformOrigin.varRef,referenceRef:k,popperRef:E,getPopperProps:_,getArrowProps:I,getArrowInnerProps:R,getReferenceProps:T}}function KD(e){const{size:t,shadowColor:n,bg:r,style:o}=e,a={...o,position:"absolute"};return t&&(a["--popper-arrow-size"]=t),n&&(a["--popper-arrow-shadow-color"]=n),r&&(a["--popper-arrow-bg"]=r),a}function ku(e={}){const{onClose:t,onOpen:n,isOpen:r,id:o}=e,a=We(n),i=We(t),[s,l]=f.useState(e.defaultIsOpen||!1),c=r!==void 0?r:s,u=r!==void 0,d=f.useId(),h=o!=null?o:"disclosure-".concat(d),p=f.useCallback(()=>{u||l(!1),i==null||i()},[u,i]),g=f.useCallback(()=>{u||l(!0),a==null||a()},[u,a]),m=f.useCallback(()=>{c?p():g()},[c,g,p]);function v(x={}){return{...x,"aria-expanded":c,"aria-controls":h,onClick(w){var k;(k=x.onClick)==null||k.call(x,w),m()}}}function S(x={}){return{...x,hidden:!c,id:h}}return{isOpen:c,onOpen:g,onClose:p,onToggle:m,isControlled:u,getButtonProps:v,getDisclosureProps:S}}function XD(e){const{ref:t,handler:n,enabled:r=!0}=e,o=We(n),i=f.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;f.useEffect(()=>{if(!r)return;const s=d=>{il(d,t)&&(i.isPointerDown=!0)},l=d=>{if(i.ignoreEmulatedMouseEvents){i.ignoreEmulatedMouseEvents=!1;return}i.isPointerDown&&n&&il(d,t)&&(i.isPointerDown=!1,o(d))},c=d=>{i.ignoreEmulatedMouseEvents=!0,n&&i.isPointerDown&&il(d,t)&&(i.isPointerDown=!1,o(d))},u=Bv(t.current);return u.addEventListener("mousedown",s,!0),u.addEventListener("mouseup",l,!0),u.addEventListener("touchstart",s,!0),u.addEventListener("touchend",c,!0),()=>{u.removeEventListener("mousedown",s,!0),u.removeEventListener("mouseup",l,!0),u.removeEventListener("touchstart",s,!0),u.removeEventListener("touchend",c,!0)}},[n,t,o,i,r])}function il(e,t){var n;const r=e.target;return r&&!Bv(r).contains(r)?!1:!((n=t.current)!=null&&n.contains(r))}function Bv(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function zv(e){const{isOpen:t,ref:n}=e,[r,o]=f.useState(t),[a,i]=f.useState(!1);return f.useEffect(()=>{a||(o(t),i(!0))},[t,a,r]),Xn(()=>n.current,"animationend",()=>{o(t)}),{present:!(t?!1:!r),onComplete(){var l;const c=RM(n.current),u=new c.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(u)}}}function Lv(e){const{wasSelected:t,enabled:n,isSelected:r,mode:o="unmount"}=e;return!!(!n||r||o==="keepMounted"&&t)}var[YD,ZD,QD,JD]=Pg(),[e5,ta]=Te({strict:!1,name:"MenuContext"});function t5(e,...t){const n=f.useId(),r=e||n;return f.useMemo(()=>t.map(o=>"".concat(o,"-").concat(r)),[r,t])}function Vv(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function kh(e){return Vv(e).activeElement===e}function n5(e={}){const{id:t,closeOnSelect:n=!0,closeOnBlur:r=!0,initialFocusRef:o,autoSelect:a=!0,isLazy:i,isOpen:s,defaultIsOpen:l,onClose:c,onOpen:u,placement:d="bottom-start",lazyBehavior:h="unmount",direction:p,computePositionOnMount:g=!1,...m}=e,v=f.useRef(null),S=f.useRef(null),x=QD(),w=f.useCallback(()=>{requestAnimationFrame(()=>{var L;(L=v.current)==null||L.focus({preventScroll:!1})})},[]),k=f.useCallback(()=>{const L=setTimeout(()=>{var V;if(o)(V=o.current)==null||V.focus();else{const W=x.firstEnabled();W&&q(W.index)}});B.current.add(L)},[x,o]),T=f.useCallback(()=>{const L=setTimeout(()=>{const V=x.lastEnabled();V&&q(V.index)});B.current.add(L)},[x]),E=f.useCallback(()=>{u==null||u(),a?k():w()},[a,k,w,u]),{isOpen:_,onOpen:I,onClose:R,onToggle:A}=ku({isOpen:s,defaultIsOpen:l,onClose:c,onOpen:E});XD({enabled:_&&r,ref:v,handler:L=>{var V;(V=S.current)!=null&&V.contains(L.target)||R()}});const O=Cu({...m,enabled:_||g,placement:d,direction:p}),[Y,q]=f.useState(-1);mn(()=>{_||q(-1)},[_]),Av(v,{focusRef:S,visible:_,shouldFocus:!0});const K=zv({isOpen:_,ref:v}),[X,U]=t5(t,"menu-button","menu-list"),M=f.useCallback(()=>{I(),w()},[I,w]),B=f.useRef(new Set([]));f.useEffect(()=>{const L=B.current;return()=>{L.forEach(V=>clearTimeout(V)),L.clear()}},[]);const re=f.useCallback(()=>{I(),k()},[k,I]),oe=f.useCallback(()=>{I(),T()},[I,T]),te=f.useCallback(()=>{var L,V;const W=Vv(v.current),ie=(L=v.current)==null?void 0:L.contains(W.activeElement);if(!(_&&!ie))return;const ce=(V=x.item(Y))==null?void 0:V.node;ce==null||ce.focus({preventScroll:!0})},[_,Y,x]),ve=f.useRef(null);return{openAndFocusMenu:M,openAndFocusFirstItem:re,openAndFocusLastItem:oe,onTransitionEnd:te,unstable__animationState:K,descendants:x,popper:O,buttonId:X,menuId:U,forceUpdate:O.forceUpdate,orientation:"vertical",isOpen:_,onToggle:A,onOpen:I,onClose:R,menuRef:v,buttonRef:S,focusedIndex:Y,closeOnSelect:n,closeOnBlur:r,autoSelect:a,setFocusedIndex:q,isLazy:i,lazyBehavior:h,initialFocusRef:o,rafId:ve}}function r5(e={},t=null){const n=ta(),{onToggle:r,popper:o,openAndFocusFirstItem:a,openAndFocusLastItem:i}=n,s=f.useCallback(l=>{const c=l.key,d={Enter:a,ArrowDown:a,ArrowUp:i}[c];d&&(l.preventDefault(),l.stopPropagation(),d(l))},[a,i]);return{...e,ref:Ie(n.buttonRef,t,o.referenceRef),id:n.buttonId,"data-active":le(n.isOpen),"aria-expanded":n.isOpen,"aria-haspopup":"menu","aria-controls":n.menuId,onClick:J(e.onClick,r),onKeyDown:J(e.onKeyDown,s)}}function oc(e){var t;return s5(e)&&!!((t=e==null?void 0:e.getAttribute("role"))!=null&&t.startsWith("menuitem"))}function o5(e={},t=null){const n=ta();if(!n)throw new Error("useMenuContext: context is undefined. Seems you forgot to wrap component within ");const{focusedIndex:r,setFocusedIndex:o,menuRef:a,isOpen:i,onClose:s,menuId:l,isLazy:c,lazyBehavior:u,unstable__animationState:d}=n,h=ZD(),p=SO({preventDefault:S=>S.key!==" "&&oc(S.target)}),g=f.useCallback(S=>{if(!S.currentTarget.contains(S.target))return;const x=S.key,k={Tab:E=>E.preventDefault(),Escape:s,ArrowDown:()=>{const E=h.nextEnabled(r);E&&o(E.index)},ArrowUp:()=>{const E=h.prevEnabled(r);E&&o(E.index)}}[x];if(k){S.preventDefault(),k(S);return}const T=p(E=>{const _=wO(h.values(),E,I=>{var R,A;return(A=(R=I==null?void 0:I.node)==null?void 0:R.textContent)!=null?A:""},h.item(r));if(_){const I=h.indexOf(_.node);o(I)}});oc(S.target)&&T(S)},[h,r,p,s,o]),m=f.useRef(!1);i&&(m.current=!0);const v=Lv({wasSelected:m.current,enabled:c,mode:u,isSelected:d.present});return{...e,ref:Ie(a,t),children:v?e.children:null,tabIndex:-1,role:"menu",id:l,style:{...e.style,transformOrigin:"var(--popper-transform-origin)"},"aria-orientation":"vertical",onKeyDown:J(e.onKeyDown,g)}}function a5(e={}){const{popper:t,isOpen:n}=ta();return t.getPopperProps({...e,style:{visibility:n?"visible":"hidden",...e.style}})}function i5(e={},t=null){const{onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onClick:a,onFocus:i,isDisabled:s,isFocusable:l,closeOnSelect:c,type:u,...d}=e,h=ta(),{setFocusedIndex:p,focusedIndex:g,closeOnSelect:m,onClose:v,menuRef:S,isOpen:x,menuId:w,rafId:k}=h,T=f.useRef(null),E="".concat(w,"-menuitem-").concat(f.useId()),{index:_,register:I}=JD({disabled:s&&!l}),R=f.useCallback(M=>{n==null||n(M),!s&&p(_)},[p,_,s,n]),A=f.useCallback(M=>{r==null||r(M),T.current&&!kh(T.current)&&R(M)},[R,r]),O=f.useCallback(M=>{o==null||o(M),!s&&p(-1)},[p,s,o]),Y=f.useCallback(M=>{a==null||a(M),oc(M.currentTarget)&&(c!=null?c:m)&&v()},[v,a,m,c]),q=f.useCallback(M=>{i==null||i(M),p(_)},[p,i,_]),K=_===g,X=s&&!l;mn(()=>{if(x)return K&&!X&&T.current?(k.current&&cancelAnimationFrame(k.current),k.current=requestAnimationFrame(()=>{var M;(M=T.current)==null||M.focus({preventScroll:!0}),k.current=null})):S.current&&!kh(S.current)&&S.current.focus({preventScroll:!0}),()=>{k.current&&cancelAnimationFrame(k.current)}},[K,X,S,x]);const U=kO({onClick:Y,onFocus:q,onMouseEnter:R,onMouseMove:A,onMouseLeave:O,ref:Ie(I,T,t),isDisabled:s,isFocusable:l});return{...d,...U,type:u!=null?u:U.type,id:E,role:"menuitem",tabIndex:K?0:-1}}function s5(e){var t;if(!l5(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function l5(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}var[c5,na]=Te({name:"MenuStylesContext",errorMessage:"useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),u5=e=>{const{children:t}=e,n=tt("Menu",e),r=Ee(e),{direction:o}=Ho(),{descendants:a,...i}=n5({...r,direction:o}),s=f.useMemo(()=>i,[i]),{isOpen:l,onClose:c,forceUpdate:u}=s;return b.jsx(YD,{value:a,children:b.jsx(e5,{value:s,children:b.jsx(c5,{value:n,children:Tt(t,{isOpen:l,onClose:c,forceUpdate:u})})})})};u5.displayName="Menu";var Wv=F((e,t)=>{const n=na();return b.jsx(D.span,{ref:t,...e,__css:n.command,className:"chakra-menu__command"})});Wv.displayName="MenuCommand";var d5=F((e,t)=>{const{type:n,...r}=e,o=na(),a=r.as||n?n!=null?n:void 0:"button",i=f.useMemo(()=>({textDecoration:"none",color:"inherit",userSelect:"none",display:"flex",width:"100%",alignItems:"center",textAlign:"start",flex:"0 0 auto",outline:0,...o.item}),[o.item]);return b.jsx(D.button,{ref:t,type:a,...r,__css:i})}),Hv=e=>{const{className:t,children:n,...r}=e,o=na(),a=f.Children.only(n),i=f.isValidElement(a)?f.cloneElement(a,{focusable:"false","aria-hidden":!0,className:G("chakra-menu__icon",a.props.className)}):null,s=G("chakra-menu__icon-wrapper",t);return b.jsx(D.span,{className:s,...r,__css:o.icon,children:i})};Hv.displayName="MenuIcon";var f5=F((e,t)=>{const{icon:n,iconSpacing:r="0.75rem",command:o,commandSpacing:a="0.75rem",children:i,...s}=e,l=i5(s,t),u=n||o?b.jsx("span",{style:{pointerEvents:"none",flex:1},children:i}):i;return b.jsxs(d5,{...l,className:G("chakra-menu__menuitem",l.className),children:[n&&b.jsx(Hv,{fontSize:"0.8em",marginEnd:r,children:n}),u,o&&b.jsx(Wv,{marginStart:a,children:o})]})});f5.displayName="MenuItem";var h5={enter:{visibility:"visible",opacity:1,scale:1,transition:{duration:.2,ease:[.4,0,.2,1]}},exit:{transitionEnd:{visibility:"hidden"},opacity:0,scale:.8,transition:{duration:.1,easings:"easeOut"}}},p5=D(Jt.div),m5=F(function(t,n){var r,o;const{rootProps:a,motionProps:i,...s}=t,{isOpen:l,onTransitionEnd:c,unstable__animationState:u}=ta(),d=o5(s,n),h=a5(a),p=na();return b.jsx(D.div,{...h,__css:{zIndex:(o=t.zIndex)!=null?o:(r=p.list)==null?void 0:r.zIndex},children:b.jsx(p5,{variants:h5,initial:!1,animate:l?"enter":"exit",__css:{outline:0,...p.list},...i,className:G("chakra-menu__menu-list",d.className),...d,onUpdate:c,onAnimationComplete:vc(u.onComplete,d.onAnimationComplete)})})});m5.displayName="MenuList";var g5=F((e,t)=>{const n=na();return b.jsx(D.button,{ref:t,...e,__css:{display:"inline-flex",appearance:"none",alignItems:"center",outline:0,...n.button}})}),v5=F((e,t)=>{const{children:n,as:r,...o}=e,a=r5(o,t),i=r||g5;return b.jsx(i,{...a,className:G("chakra-menu__menu-button",e.className),children:b.jsx(D.span,{__css:{pointerEvents:"none",flex:"1 1 auto",minW:0},children:e.children})})});v5.displayName="MenuButton";var b5={slideInBottom:{...fo,custom:{offsetY:16,reverse:!0}},slideInRight:{...fo,custom:{offsetX:16,reverse:!0}},slideInTop:{...fo,custom:{offsetY:-16,reverse:!0}},slideInLeft:{...fo,custom:{offsetX:-16,reverse:!0}},scale:{...Ag,custom:{initialScale:.95,reverse:!0}},none:{}},y5=D(Jt.section),x5=e=>b5[e||"none"],Uv=f.forwardRef((e,t)=>{const{preset:n,motionProps:r=x5(n),...o}=e;return b.jsx(y5,{ref:t,...r,...o})});Uv.displayName="ModalTransition";var S5=Object.defineProperty,w5=(e,t,n)=>t in e?S5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,C5=(e,t,n)=>(w5(e,t+"",n),n),k5=class{constructor(){C5(this,"modals"),this.modals=new Map}add(e){return this.modals.set(e,this.modals.size+1),this.modals.size}remove(e){this.modals.delete(e)}isTopModal(e){return e?this.modals.get(e)===this.modals.size:!1}},ac=new k5;function Gv(e,t){const[n,r]=f.useState(0);return f.useEffect(()=>{const o=e.current;if(o){if(t){const a=ac.add(o);r(a)}return()=>{ac.remove(o),r(0)}}},[t,e]),n}var P5=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},cr=new WeakMap,Ta=new WeakMap,Ea={},sl=0,qv=function(e){return e&&(e.host||qv(e.parentNode))},_5=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=qv(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})},T5=function(e,t,n,r){var o=_5(t,Array.isArray(e)?e:[e]);Ea[n]||(Ea[n]=new WeakMap);var a=Ea[n],i=[],s=new Set,l=new Set(o),c=function(d){!d||s.has(d)||(s.add(d),c(d.parentNode))};o.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(s.has(h))u(h);else{var p=h.getAttribute(r),g=p!==null&&p!=="false",m=(cr.get(h)||0)+1,v=(a.get(h)||0)+1;cr.set(h,m),a.set(h,v),i.push(h),m===1&&g&&Ta.set(h,!0),v===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}})};return u(t),s.clear(),sl++,function(){i.forEach(function(d){var h=cr.get(d)-1,p=a.get(d)-1;cr.set(d,h),a.set(d,p),h||(Ta.has(d)||d.removeAttribute(r),Ta.delete(d)),p||d.removeAttribute(n)}),sl--,sl||(cr=new WeakMap,cr=new WeakMap,Ta=new WeakMap,Ea={})}},E5=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=P5(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),T5(r,o,n,"aria-hidden")):function(){return null}};function A5(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:o=!0,closeOnEsc:a=!0,useInert:i=!0,onOverlayClick:s,onEsc:l}=e,c=f.useRef(null),u=f.useRef(null),[d,h,p]=I5(r,"chakra-modal","chakra-modal--header","chakra-modal--body");$5(c,t&&i);const g=Gv(c,t),m=f.useRef(null),v=f.useCallback(R=>{m.current=R.target},[]),S=f.useCallback(R=>{R.key==="Escape"&&(R.stopPropagation(),a&&(n==null||n()),l==null||l())},[a,n,l]),[x,w]=f.useState(!1),[k,T]=f.useState(!1),E=f.useCallback((R={},A=null)=>({role:"dialog",...R,ref:Ie(A,c),id:d,tabIndex:-1,"aria-modal":!0,"aria-labelledby":x?h:void 0,"aria-describedby":k?p:void 0,onClick:J(R.onClick,O=>O.stopPropagation())}),[p,k,d,h,x]),_=f.useCallback(R=>{R.stopPropagation(),m.current===R.target&&ac.isTopModal(c.current)&&(o&&(n==null||n()),s==null||s())},[n,o,s]),I=f.useCallback((R={},A=null)=>({...R,ref:Ie(A,u),onClick:J(R.onClick,_),onKeyDown:J(R.onKeyDown,S),onMouseDown:J(R.onMouseDown,v)}),[S,v,_]);return{isOpen:t,onClose:n,headerId:h,bodyId:p,setBodyMounted:T,setHeaderMounted:w,dialogRef:c,overlayRef:u,getDialogProps:E,getDialogContainerProps:I,index:g}}function $5(e,t){const n=e.current;f.useEffect(()=>{if(!(!e.current||!t))return E5(e.current)},[t,e,n])}function I5(e,...t){const n=f.useId(),r=e||n;return f.useMemo(()=>t.map(o=>"".concat(o,"-").concat(r)),[r,t])}var[R5,qr]=Te({name:"ModalStylesContext",errorMessage:"useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),[M5,er]=Te({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),Kv=e=>{const t={scrollBehavior:"outside",autoFocus:!0,trapFocus:!0,returnFocusOnClose:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale",lockFocusAcrossFrames:!0,...e},{portalProps:n,children:r,autoFocus:o,trapFocus:a,initialFocusRef:i,finalFocusRef:s,returnFocusOnClose:l,blockScrollOnMount:c,allowPinchZoom:u,preserveScrollBarGap:d,motionPreset:h,lockFocusAcrossFrames:p,onCloseComplete:g}=t,m=tt("Modal",t),S={...A5(t),autoFocus:o,trapFocus:a,initialFocusRef:i,finalFocusRef:s,returnFocusOnClose:l,blockScrollOnMount:c,allowPinchZoom:u,preserveScrollBarGap:d,motionPreset:h,lockFocusAcrossFrames:p};return b.jsx(M5,{value:S,children:b.jsx(R5,{value:m,children:b.jsx(rr,{onExitComplete:g,children:S.isOpen&&b.jsx(Gr,{...n,children:r})})})})};Kv.displayName="Modal";var Ya="right-scroll-bar-position",Za="width-before-scroll-bar",O5="with-scroll-bars-hidden",D5="--removed-body-scroll-bar-size",Xv=Ug(),ll=function(){},is=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:ll,onWheelCapture:ll,onTouchMoveCapture:ll}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,h=e.sideCar,p=e.noIsolation,g=e.inert,m=e.allowPinchZoom,v=e.as,S=v===void 0?"div":v,x=e.gapMode,w=Vg(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=h,T=Lg([n,t]),E=Gt(Gt({},w),o);return f.createElement(f.Fragment,null,u&&f.createElement(k,{sideCar:Xv,removeScrollBar:c,shards:d,noIsolation:p,inert:g,setCallbacks:a,allowPinchZoom:!!m,lockRef:n,gapMode:x}),i?f.cloneElement(f.Children.only(s),Gt(Gt({},E),{ref:T})):f.createElement(S,Gt({},E,{className:l,ref:T}),s))});is.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};is.classNames={fullWidth:Za,zeroRight:Ya};var F5=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function N5(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=F5();return t&&e.setAttribute("nonce",t),e}function j5(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function B5(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var z5=function(){var e=0,t=null;return{add:function(n){e==0&&(t=N5())&&(j5(t,n),B5(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},L5=function(){var e=z5();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Yv=function(){var e=L5(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},V5={left:0,top:0,right:0,gap:0},cl=function(e){return parseInt(e||"",10)||0},W5=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[cl(n),cl(r),cl(o)]},H5=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return V5;var t=W5(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])}},U5=Yv(),G5=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return n===void 0&&(n="margin"),"\n .".concat(O5," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),n==="margin"&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Ya," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Za," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Ya," .").concat(Ya," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Za," .").concat(Za," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat(D5,": ").concat(s,"px;\n }\n")},q5=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,a=f.useMemo(function(){return H5(o)},[o]);return f.createElement(U5,{styles:G5(a,!t,o,n?"":"!important")})},ic=!1;if(typeof window<"u")try{var Aa=Object.defineProperty({},"passive",{get:function(){return ic=!0,!0}});window.addEventListener("test",Aa,Aa),window.removeEventListener("test",Aa,Aa)}catch(e){ic=!1}var ur=ic?{passive:!1}:!1,K5=function(e){return e.tagName==="TEXTAREA"},Zv=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!K5(e)&&n[t]==="visible")},X5=function(e){return Zv(e,"overflowY")},Y5=function(e){return Zv(e,"overflowX")},Ph=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Qv(e,r);if(o){var a=Jv(e,r),i=a[1],s=a[2];if(i>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Z5=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Q5=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Qv=function(e,t){return e==="v"?X5(t):Y5(t)},Jv=function(e,t){return e==="v"?Z5(t):Q5(t)},J5=function(e,t){return e==="h"&&t==="rtl"?-1:1},eF=function(e,t,n,r,o){var a=J5(e,window.getComputedStyle(t).direction),i=a*r,s=n.target,l=t.contains(s),c=!1,u=i>0,d=0,h=0;do{var p=Jv(e,s),g=p[0],m=p[1],v=p[2],S=m-v-a*g;(g||S)&&Qv(e,s)&&(d+=S,h+=g),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&Math.abs(d)<1||!u&&Math.abs(h)<1)&&(c=!0),c},$a=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_h=function(e){return[e.deltaX,e.deltaY]},Th=function(e){return e&&"current"in e?e.current:e},tF=function(e,t){return e[0]===t[0]&&e[1]===t[1]},nF=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},rF=0,dr=[];function oF(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(rF++)[0],a=f.useState(Yv)[0],i=f.useRef(e);f.useEffect(function(){i.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=IR([e.lockRef.current],(e.shards||[]).map(Th),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=f.useCallback(function(m,v){if("touches"in m&&m.touches.length===2)return!i.current.allowPinchZoom;var S=$a(m),x=n.current,w="deltaX"in m?m.deltaX:x[0]-S[0],k="deltaY"in m?m.deltaY:x[1]-S[1],T,E=m.target,_=Math.abs(w)>Math.abs(k)?"h":"v";if("touches"in m&&_==="h"&&E.type==="range")return!1;var I=Ph(_,E);if(!I)return!0;if(I?T=_:(T=_==="v"?"h":"v",I=Ph(_,E)),!I)return!1;if(!r.current&&"changedTouches"in m&&(w||k)&&(r.current=T),!T)return!0;var R=r.current||T;return eF(R,v,m,R==="h"?w:k)},[]),l=f.useCallback(function(m){var v=m;if(!(!dr.length||dr[dr.length-1]!==a)){var S="deltaY"in v?_h(v):$a(v),x=t.current.filter(function(T){return T.name===v.type&&(T.target===v.target||v.target===T.shadowParent)&&tF(T.delta,S)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}if(!x){var w=(i.current.shards||[]).map(Th).filter(Boolean).filter(function(T){return T.contains(v.target)}),k=w.length>0?s(v,w[0]):!i.current.noIsolation;k&&v.cancelable&&v.preventDefault()}}},[]),c=f.useCallback(function(m,v,S,x){var w={name:m,delta:v,target:S,should:x,shadowParent:aF(S)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(k){return k!==w})},1)},[]),u=f.useCallback(function(m){n.current=$a(m),r.current=void 0},[]),d=f.useCallback(function(m){c(m.type,_h(m),m.target,s(m,e.lockRef.current))},[]),h=f.useCallback(function(m){c(m.type,$a(m),m.target,s(m,e.lockRef.current))},[]);f.useEffect(function(){return dr.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,ur),document.addEventListener("touchmove",l,ur),document.addEventListener("touchstart",u,ur),function(){dr=dr.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,ur),document.removeEventListener("touchmove",l,ur),document.removeEventListener("touchstart",u,ur)}},[]);var p=e.removeScrollBar,g=e.inert;return f.createElement(f.Fragment,null,g?f.createElement(a,{styles:nF(o)}):null,p?f.createElement(q5,{gapMode:e.gapMode}):null)}function aF(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const iF=RR(Xv,oF);var eb=f.forwardRef(function(e,t){return f.createElement(is,Gt({},e,{ref:t,sideCar:iF}))});eb.classNames=is.classNames;function sF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:a,allowPinchZoom:i,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:c,lockFocusAcrossFrames:u,isOpen:d}=er(),[h,p]=rg();f.useEffect(()=>{!h&&p&&setTimeout(p)},[h,p]);const g=Gv(r,d);return b.jsx(xv,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:u,children:b.jsx(eb,{removeScrollBar:!c,allowPinchZoom:i,enabled:g===1&&a,forwardProps:!0,children:e.children})})}var tb=F((e,t)=>{const{className:n,children:r,containerProps:o,motionProps:a,...i}=e,{getDialogProps:s,getDialogContainerProps:l}=er(),c=s(i,t),u=l(o),d=G("chakra-modal__content",n),h=qr(),p={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...h.dialog},g={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...h.dialogContainer},{motionPreset:m}=er();return b.jsx(sF,{children:b.jsx(D.div,{...u,className:"chakra-modal__content-container",tabIndex:-1,__css:g,children:b.jsx(Uv,{preset:m,motionProps:a,className:d,...c,__css:p,children:r})})})});tb.displayName="ModalContent";function wj(e){const{leastDestructiveRef:t,...n}=e;return b.jsx(Kv,{...n,initialFocusRef:t})}var Cj=F((e,t)=>b.jsx(tb,{ref:t,role:"alertdialog",...e})),lF=F((e,t)=>{const{className:n,...r}=e,o=G("chakra-modal__footer",n),i={display:"flex",alignItems:"center",justifyContent:"flex-end",...qr().footer};return b.jsx(D.footer,{ref:t,...r,__css:i,className:o})});lF.displayName="ModalFooter";var cF=F((e,t)=>{const{className:n,...r}=e,{headerId:o,setHeaderMounted:a}=er();f.useEffect(()=>(a(!0),()=>a(!1)),[a]);const i=G("chakra-modal__header",n),l={flex:0,...qr().header};return b.jsx(D.header,{ref:t,className:i,id:o,...r,__css:l})});cF.displayName="ModalHeader";var uF=D(Jt.div),dF=F((e,t)=>{const{className:n,transition:r,motionProps:o,...a}=e,i=G("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...qr().overlay},{motionPreset:c}=er(),d=o||(c==="none"?{}:Eg);return b.jsx(uF,{...d,__css:l,ref:t,className:i,...a})});dF.displayName="ModalOverlay";var fF=F((e,t)=>{const{className:n,...r}=e,{bodyId:o,setBodyMounted:a}=er();f.useEffect(()=>(a(!0),()=>a(!1)),[a]);const i=G("chakra-modal__body",n),s=qr();return b.jsx(D.div,{ref:t,className:i,id:o,...r,__css:s.body})});fF.displayName="ModalBody";var hF=F((e,t)=>{const{onClick:n,className:r,...o}=e,{onClose:a}=er(),i=G("chakra-modal__close-btn",r),s=qr();return b.jsx(Ji,{ref:t,__css:s.closeButton,className:i,onClick:J(n,l=>{l.stopPropagation(),a()}),...o})});hF.displayName="ModalCloseButton";var pF=e=>b.jsx(Ot,{viewBox:"0 0 24 24",...e,children:b.jsx("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),mF=e=>b.jsx(Ot,{viewBox:"0 0 24 24",...e,children:b.jsx("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function Eh(e,t,n,r){f.useEffect(()=>{var o;if(!e.current||!r)return;const a=(o=e.current.ownerDocument.defaultView)!=null?o:window,i=Array.isArray(t)?t:[t],s=new a.MutationObserver(l=>{for(const c of l)c.type==="attributes"&&c.attributeName&&i.includes(c.attributeName)&&n(c)});return s.observe(e.current,{attributes:!0,attributeFilter:i}),()=>s.disconnect()})}function gF(e,t){const n=We(e);f.useEffect(()=>{let r=null;const o=()=>n();return t!==null&&(r=window.setInterval(o,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var vF=50,Ah=300;function bF(e,t){const[n,r]=f.useState(!1),[o,a]=f.useState(null),[i,s]=f.useState(!0),l=f.useRef(null),c=()=>clearTimeout(l.current);gF(()=>{o==="increment"&&e(),o==="decrement"&&t()},n?vF:null);const u=f.useCallback(()=>{i&&e(),l.current=setTimeout(()=>{s(!1),r(!0),a("increment")},Ah)},[e,i]),d=f.useCallback(()=>{i&&t(),l.current=setTimeout(()=>{s(!1),r(!0),a("decrement")},Ah)},[t,i]),h=f.useCallback(()=>{s(!0),r(!1),c()},[]);return f.useEffect(()=>()=>c(),[]),{up:u,down:d,stop:h,isSpinning:n}}var yF=/^[Ee0-9+\-.]$/;function xF(e){return yF.test(e)}function SF(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function wF(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:o=Number.MIN_SAFE_INTEGER,max:a=Number.MAX_SAFE_INTEGER,step:i=1,isReadOnly:s,isDisabled:l,isRequired:c,isInvalid:u,pattern:d="[0-9]*(.[0-9]+)?",inputMode:h="decimal",allowMouseWheel:p,id:g,onChange:m,precision:v,name:S,"aria-describedby":x,"aria-label":w,"aria-labelledby":k,onFocus:T,onBlur:E,onInvalid:_,getAriaValueText:I,isValidCharacter:R,format:A,parse:O,...Y}=e,q=We(T),K=We(E),X=We(_),U=We(R!=null?R:xF),M=We(I),B=vR(e),{update:re,increment:oe,decrement:te}=B,[ve,L]=f.useState(!1),V=!(s||l),W=f.useRef(null),ie=f.useRef(null),he=f.useRef(null),ce=f.useRef(null),me=f.useCallback(N=>N.split("").filter(U).join(""),[U]),Pe=f.useCallback(N=>{var ue;return(ue=O==null?void 0:O(N))!=null?ue:N},[O]),be=f.useCallback(N=>{var ue;return((ue=A==null?void 0:A(N))!=null?ue:N).toString()},[A]);mn(()=>{(B.valueAsNumber>a||B.valueAsNumber{if(!W.current)return;if(W.current.value!=B.value){const ue=Pe(W.current.value);B.setValue(me(ue))}},[Pe,me]);const ae=f.useCallback((N=i)=>{V&&oe(N)},[oe,V,i]),Ae=f.useCallback((N=i)=>{V&&te(N)},[te,V,i]),ge=bF(ae,Ae);Eh(he,"disabled",ge.stop,ge.isSpinning),Eh(ce,"disabled",ge.stop,ge.isSpinning);const j=f.useCallback(N=>{if(N.nativeEvent.isComposing)return;const De=Pe(N.currentTarget.value);re(me(De)),ie.current={start:N.currentTarget.selectionStart,end:N.currentTarget.selectionEnd}},[re,me,Pe]),de=f.useCallback(N=>{var ue,De,Qe;q==null||q(N),ie.current&&(N.target.selectionStart=(De=ie.current.start)!=null?De:(ue=N.currentTarget.value)==null?void 0:ue.length,N.currentTarget.selectionEnd=(Qe=ie.current.end)!=null?Qe:N.currentTarget.selectionStart)},[q]),se=f.useCallback(N=>{if(N.nativeEvent.isComposing)return;SF(N,U)||N.preventDefault();const ue=Oe(N)*i,De=N.key,z={ArrowUp:()=>ae(ue),ArrowDown:()=>Ae(ue),Home:()=>re(o),End:()=>re(a)}[De];z&&(N.preventDefault(),z(N))},[U,i,ae,Ae,re,o,a]),Oe=N=>{let ue=1;return(N.metaKey||N.ctrlKey)&&(ue=.1),N.shiftKey&&(ue=10),ue},ct=f.useMemo(()=>{const N=M==null?void 0:M(B.value);if(N!=null)return N;const ue=B.value.toString();return ue||void 0},[B.value,M]),ze=f.useCallback(()=>{let N=B.value;if(B.value==="")return;/^[eE]/.test(B.value.toString())?B.setValue(""):(B.valueAsNumbera&&(N=a),B.cast(N))},[B,a,o]),nt=f.useCallback(()=>{L(!1),n&&ze()},[n,L,ze]),rt=f.useCallback(()=>{t&&requestAnimationFrame(()=>{var N;(N=W.current)==null||N.focus()})},[t]),Ze=f.useCallback(N=>{N.preventDefault(),ge.up(),rt()},[rt,ge]),Ct=f.useCallback(N=>{N.preventDefault(),ge.down(),rt()},[rt,ge]);Xn(()=>W.current,"wheel",N=>{var ue,De;const z=((De=(ue=W.current)==null?void 0:ue.ownerDocument)!=null?De:document).activeElement===W.current;if(!p||!z)return;N.preventDefault();const ne=Oe(N)*i,Bt=Math.sign(N.deltaY);Bt===-1?ae(ne):Bt===1&&Ae(ne)},{passive:!1});const tn=f.useCallback((N={},ue=null)=>{const De=l||r&&B.isAtMax;return{...N,ref:Ie(ue,he),role:"button",tabIndex:-1,onPointerDown:J(N.onPointerDown,Qe=>{Qe.button!==0||De||Ze(Qe)}),onPointerLeave:J(N.onPointerLeave,ge.stop),onPointerUp:J(N.onPointerUp,ge.stop),disabled:De,"aria-disabled":Tr(De)}},[B.isAtMax,r,Ze,ge.stop,l]),bn=f.useCallback((N={},ue=null)=>{const De=l||r&&B.isAtMin;return{...N,ref:Ie(ue,ce),role:"button",tabIndex:-1,onPointerDown:J(N.onPointerDown,Qe=>{Qe.button!==0||De||Ct(Qe)}),onPointerLeave:J(N.onPointerLeave,ge.stop),onPointerUp:J(N.onPointerUp,ge.stop),disabled:De,"aria-disabled":Tr(De)}},[B.isAtMin,r,Ct,ge.stop,l]),yn=f.useCallback((N={},ue=null)=>{var De,Qe,z,ne;return{name:S,inputMode:h,type:"text",pattern:d,"aria-labelledby":k,"aria-label":w,"aria-describedby":x,id:g,disabled:l,...N,readOnly:(De=N.readOnly)!=null?De:s,"aria-readonly":(Qe=N.readOnly)!=null?Qe:s,"aria-required":(z=N.required)!=null?z:c,required:(ne=N.required)!=null?ne:c,ref:Ie(W,ue),value:be(B.value),role:"spinbutton","aria-valuemin":o,"aria-valuemax":a,"aria-valuenow":Number.isNaN(B.valueAsNumber)?void 0:B.valueAsNumber,"aria-invalid":Tr(u!=null?u:B.isOutOfRange),"aria-valuetext":ct,autoComplete:"off",autoCorrect:"off",onChange:J(N.onChange,j),onKeyDown:J(N.onKeyDown,se),onFocus:J(N.onFocus,de,()=>L(!0)),onBlur:J(N.onBlur,K,nt)}},[S,h,d,k,w,be,x,g,l,c,s,u,B.value,B.valueAsNumber,B.isOutOfRange,o,a,ct,j,se,de,K,nt]);return{value:be(B.value),valueAsNumber:B.valueAsNumber,isFocused:ve,isDisabled:l,isReadOnly:s,getIncrementButtonProps:tn,getDecrementButtonProps:bn,getInputProps:yn,htmlProps:Y}}var[CF,ss]=Te({name:"NumberInputStylesContext",errorMessage:"useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),[kF,Pu]=Te({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),PF=F(function(t,n){const r=tt("NumberInput",t),o=Ee(t),a=nu(o),{htmlProps:i,...s}=wF(a),l=f.useMemo(()=>s,[s]);return b.jsx(kF,{value:l,children:b.jsx(CF,{value:r,children:b.jsx(D.div,{...i,ref:n,className:G("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})})})});PF.displayName="NumberInput";var _F=F(function(t,n){const r=ss();return b.jsx(D.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});_F.displayName="NumberInputStepper";var TF=F(function(t,n){const{getInputProps:r}=Pu(),o=r(t,n),a=ss();return b.jsx(D.input,{...o,className:G("chakra-numberinput__field",t.className),__css:{width:"100%",...a.field}})});TF.displayName="NumberInputField";var nb=D("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),EF=F(function(t,n){var r;const o=ss(),{getDecrementButtonProps:a}=Pu(),i=a(t,n);return b.jsx(nb,{...i,__css:o.stepper,children:(r=t.children)!=null?r:b.jsx(pF,{})})});EF.displayName="NumberDecrementStepper";var AF=F(function(t,n){var r;const{getIncrementButtonProps:o}=Pu(),a=o(t,n),i=ss();return b.jsx(nb,{...a,__css:i.stepper,children:(r=t.children)!=null?r:b.jsx(mF,{})})});AF.displayName="NumberIncrementStepper";var[$F,Rn]=Te({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[IF,ra]=Te({name:"PopoverStylesContext",errorMessage:"usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),RF=F(function(t,n){const{getHeaderProps:r}=Rn(),o=ra();return b.jsx(D.header,{...r(t,n),className:G("chakra-popover__header",t.className),__css:o.header})});RF.displayName="PopoverHeader";function MF(e){const t=f.Children.only(e.children),{getTriggerProps:n}=Rn();return f.cloneElement(t,n(t.props,t.ref))}MF.displayName="PopoverTrigger";var fr={click:"click",hover:"hover"};function OF(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:o,returnFocusOnClose:a=!0,autoFocus:i=!0,arrowSize:s,arrowShadowColor:l,trigger:c=fr.click,openDelay:u=200,closeDelay:d=200,isLazy:h,lazyBehavior:p="unmount",computePositionOnMount:g,...m}=e,{isOpen:v,onClose:S,onOpen:x,onToggle:w}=ku(e),k=f.useRef(null),T=f.useRef(null),E=f.useRef(null),_=f.useRef(!1),I=f.useRef(!1);v&&(I.current=!0);const[R,A]=f.useState(!1),[O,Y]=f.useState(!1),q=f.useId(),K=o!=null?o:q,[X,U,M,B]=["popover-trigger","popover-content","popover-header","popover-body"].map(j=>"".concat(j,"-").concat(K)),{referenceRef:re,getArrowProps:oe,getPopperProps:te,getArrowInnerProps:ve,forceUpdate:L}=Cu({...m,enabled:v||!!g}),V=zv({isOpen:v,ref:E});kR({enabled:v,ref:T}),Av(E,{focusRef:T,visible:v,shouldFocus:a&&c===fr.click}),TO(E,{focusRef:r,visible:v,shouldFocus:i&&c===fr.click});const W=Lv({wasSelected:I.current,enabled:h,mode:p,isSelected:V.present}),ie=f.useCallback((j={},de=null)=>{const se={...j,style:{...j.style,transformOrigin:Ke.transformOrigin.varRef,[Ke.arrowSize.var]:s?"".concat(s,"px"):void 0,[Ke.arrowShadowColor.var]:l},ref:Ie(E,de),children:W?j.children:null,id:U,tabIndex:-1,role:"dialog",onKeyDown:J(j.onKeyDown,Oe=>{n&&Oe.key==="Escape"&&S()}),onBlur:J(j.onBlur,Oe=>{const ct=$h(Oe),ze=ul(E.current,ct),nt=ul(T.current,ct);v&&t&&(!ze&&!nt)&&S()}),"aria-labelledby":R?M:void 0,"aria-describedby":O?B:void 0};return c===fr.hover&&(se.role="tooltip",se.onMouseEnter=J(j.onMouseEnter,()=>{_.current=!0}),se.onMouseLeave=J(j.onMouseLeave,Oe=>{Oe.nativeEvent.relatedTarget!==null&&(_.current=!1,setTimeout(()=>S(),d))})),se},[W,U,R,M,O,B,c,n,S,v,t,d,l,s]),he=f.useCallback((j={},de=null)=>te({...j,style:{visibility:v?"visible":"hidden",...j.style}},de),[v,te]),ce=f.useCallback((j,de=null)=>({...j,ref:Ie(de,k,re)}),[k,re]),me=f.useRef(),Pe=f.useRef(),be=f.useCallback(j=>{k.current==null&&re(j)},[re]),ae=f.useCallback((j={},de=null)=>{const se={...j,ref:Ie(T,de,be),id:X,"aria-haspopup":"dialog","aria-expanded":v,"aria-controls":U};return c===fr.click&&(se.onClick=J(j.onClick,w)),c===fr.hover&&(se.onFocus=J(j.onFocus,()=>{me.current===void 0&&x()}),se.onBlur=J(j.onBlur,Oe=>{const ct=$h(Oe),ze=!ul(E.current,ct);v&&t&&ze&&S()}),se.onKeyDown=J(j.onKeyDown,Oe=>{Oe.key==="Escape"&&S()}),se.onMouseEnter=J(j.onMouseEnter,()=>{_.current=!0,me.current=window.setTimeout(()=>x(),u)}),se.onMouseLeave=J(j.onMouseLeave,()=>{_.current=!1,me.current&&(clearTimeout(me.current),me.current=void 0),Pe.current=window.setTimeout(()=>{_.current===!1&&S()},d)})),se},[X,v,U,c,be,w,x,t,S,u,d]);f.useEffect(()=>()=>{me.current&&clearTimeout(me.current),Pe.current&&clearTimeout(Pe.current)},[]);const Ae=f.useCallback((j={},de=null)=>({...j,id:M,ref:Ie(de,se=>{A(!!se)})}),[M]),ge=f.useCallback((j={},de=null)=>({...j,id:B,ref:Ie(de,se=>{Y(!!se)})}),[B]);return{forceUpdate:L,isOpen:v,onAnimationComplete:V.onComplete,onClose:S,getAnchorProps:ce,getArrowProps:oe,getArrowInnerProps:ve,getPopoverPositionerProps:he,getPopoverProps:ie,getTriggerProps:ae,getHeaderProps:Ae,getBodyProps:ge}}function ul(e,t){return e===t||(e==null?void 0:e.contains(t))}function $h(e){var t;const n=e.currentTarget.ownerDocument.activeElement;return(t=e.relatedTarget)!=null?t:n}function DF(e){const t=tt("Popover",e),{children:n,...r}=Ee(e),o=Ho(),a=OF({...r,direction:o.direction});return b.jsx($F,{value:a,children:b.jsx(IF,{value:t,children:Tt(n,{isOpen:a.isOpen,onClose:a.onClose,forceUpdate:a.forceUpdate})})})}DF.displayName="Popover";function FF(e){const t=f.Children.only(e.children),{getAnchorProps:n}=Rn();return f.cloneElement(t,n(t.props,t.ref))}FF.displayName="PopoverAnchor";var dl=(e,t)=>t?"".concat(e,".").concat(t,", ").concat(t):void 0;function NF(e){var t;const{bg:n,bgColor:r,backgroundColor:o,shadow:a,boxShadow:i,shadowColor:s}=e,{getArrowProps:l,getArrowInnerProps:c}=Rn(),u=ra(),d=(t=n!=null?n:r)!=null?t:o,h=a!=null?a:i;return b.jsx(D.div,{...l(),className:"chakra-popover__arrow-positioner",children:b.jsx(D.div,{className:G("chakra-popover__arrow",e.className),...c(e),__css:{"--popper-arrow-shadow-color":dl("colors",s),"--popper-arrow-bg":dl("colors",d),"--popper-arrow-shadow":dl("shadows",h),...u.arrow}})})}NF.displayName="PopoverArrow";var jF=F(function(t,n){const{getBodyProps:r}=Rn(),o=ra();return b.jsx(D.div,{...r(t,n),className:G("chakra-popover__body",t.className),__css:o.body})});jF.displayName="PopoverBody";var BF=F(function(t,n){const{onClose:r}=Rn(),o=ra();return b.jsx(Ji,{size:"sm",onClick:r,className:G("chakra-popover__close-btn",t.className),__css:o.closeButton,ref:n,...t})});BF.displayName="PopoverCloseButton";function zF(e){if(e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var LF={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},VF=D(Jt.section),rb=F(function(t,n){const{variants:r=LF,...o}=t,{isOpen:a}=Rn();return b.jsx(VF,{ref:n,variants:zF(r),initial:!1,animate:a?"enter":"exit",...o})});rb.displayName="PopoverTransition";var WF=F(function(t,n){const{rootProps:r,motionProps:o,...a}=t,{getPopoverProps:i,getPopoverPositionerProps:s,onAnimationComplete:l}=Rn(),c=ra(),u={position:"relative",display:"flex",flexDirection:"column",...c.content};return b.jsx(D.div,{...s(r),__css:c.popper,className:"chakra-popover__popper",children:b.jsx(rb,{...o,...i(a,n),onAnimationComplete:vc(l,a.onAnimationComplete),className:G("chakra-popover__content",t.className),__css:u})})});WF.displayName="PopoverContent";var ob=F(function(t,n){const{children:r,placeholder:o,className:a,...i}=t;return b.jsxs(D.select,{...i,ref:n,className:G("chakra-select",a),children:[o&&b.jsx("option",{value:"",children:o}),r]})});ob.displayName="SelectField";function HF(e,t){const n={},r={};for(const[o,a]of Object.entries(e))t.includes(o)?n[o]=a:r[o]=a;return[n,r]}var UF=F((e,t)=>{var n;const r=tt("Select",e),{rootProps:o,placeholder:a,icon:i,color:s,height:l,h:c,minH:u,minHeight:d,iconColor:h,iconSize:p,...g}=Ee(e),[m,v]=HF(g,Mx),S=tu(v),x={width:"100%",height:"fit-content",position:"relative",color:s},w={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return b.jsxs(D.div,{className:"chakra-select__wrapper",__css:x,...m,...o,children:[b.jsx(ob,{ref:t,height:c!=null?c:l,minH:u!=null?u:d,placeholder:a,...S,__css:w,children:e.children}),b.jsx(ab,{"data-disabled":le(S.disabled),...(h||s)&&{color:h||s},__css:r.icon,...p&&{fontSize:p},children:i})]})});UF.displayName="Select";var GF=e=>b.jsx("svg",{viewBox:"0 0 24 24",...e,children:b.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),qF=D("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),ab=e=>{const{children:t=b.jsx(GF,{}),...n}=e,r=f.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return b.jsx(qF,{...n,className:"chakra-select__icon-wrapper",children:f.isValidElement(t)?r:null})};ab.displayName="SelectIcon";var hr=e=>e?"":void 0,fl=e=>e?!0:void 0,oa=(...e)=>e.filter(Boolean).join(" ");function hl(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function Ia(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var Qa={width:0,height:0},Ra=e=>e||Qa;function KF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:o}=e,a=m=>{var v;const S=(v=r[m])!=null?v:Qa;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...Ia({orientation:t,vertical:{bottom:"calc(".concat(n[m],"% - ").concat(S.height/2,"px)")},horizontal:{left:"calc(".concat(n[m],"% - ").concat(S.width/2,"px)")}})}},i=t==="vertical"?r.reduce((m,v)=>Ra(m).height>Ra(v).height?m:v,Qa):r.reduce((m,v)=>Ra(m).width>Ra(v).width?m:v,Qa),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...Ia({orientation:t,vertical:i?{paddingLeft:i.width/2,paddingRight:i.width/2}:{},horizontal:i?{paddingTop:i.height/2,paddingBottom:i.height/2}:{}})},l={position:"absolute",...Ia({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},c=n.length===1,u=[0,o?100-n[0]:n[0]],d=c?u:n;let h=d[0];!c&&o&&(h=100-h);const p=Math.abs(d[d.length-1]-d[0]),g={...l,...Ia({orientation:t,vertical:o?{height:"".concat(p,"%"),top:"".concat(h,"%")}:{height:"".concat(p,"%"),bottom:"".concat(h,"%")},horizontal:o?{width:"".concat(p,"%"),right:"".concat(h,"%")}:{width:"".concat(p,"%"),left:"".concat(h,"%")}})};return{trackStyle:l,innerTrackStyle:g,rootStyle:s,getThumbStyle:a}}function XF(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function YF(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ZF(e){const t=JF(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function ib(e){return!!e.touches}function QF(e){return ib(e)&&e.touches.length>1}function JF(e){var t;return(t=e.view)!=null?t:window}function eN(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n["".concat(t,"X")],y:n["".concat(t,"Y")]}}function tN(e,t="page"){return{x:e["".concat(t,"X")],y:e["".concat(t,"Y")]}}function sb(e,t="page"){return ib(e)?eN(e,t):tN(e,t)}function nN(e){return t=>{const n=ZF(t);(!n||n&&t.button===0)&&e(t)}}function rN(e,t=!1){function n(o){e(o,{point:sb(o)})}return t?nN(n):n}function Ja(e,t,n,r){return YF(e,t,rN(n,t==="pointerdown"),r)}var oN=Object.defineProperty,aN=(e,t,n)=>t in e?oN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nt=(e,t,n)=>(aN(e,typeof t!="symbol"?t+"":t,n),n),iN=class{constructor(e,t,n){Nt(this,"history",[]),Nt(this,"startEvent",null),Nt(this,"lastEvent",null),Nt(this,"lastEventInfo",null),Nt(this,"handlers",{}),Nt(this,"removeListeners",()=>{}),Nt(this,"threshold",3),Nt(this,"win"),Nt(this,"updatePoint",()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const s=pl(this.lastEventInfo,this.history),l=this.startEvent!==null,c=uN(s.offset,{x:0,y:0})>=this.threshold;if(!l&&!c)return;const{timestamp:u}=Fd();this.history.push({...s.point,timestamp:u});const{onStart:d,onMove:h}=this.handlers;l||(d==null||d(this.lastEvent,s),this.startEvent=this.lastEvent),h==null||h(this.lastEvent,s)}),Nt(this,"onPointerMove",(s,l)=>{this.lastEvent=s,this.lastEventInfo=l,R_.update(this.updatePoint,!0)}),Nt(this,"onPointerUp",(s,l)=>{const c=pl(l,this.history),{onEnd:u,onSessionEnd:d}=this.handlers;d==null||d(s,c),this.end(),!(!u||!this.startEvent)&&(u==null||u(s,c))});var r;if(this.win=(r=e.view)!=null?r:window,QF(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const o={point:sb(e)},{timestamp:a}=Fd();this.history=[{...o.point,timestamp:a}];const{onSessionStart:i}=t;i==null||i(e,pl(o,this.history)),this.removeListeners=cN(Ja(this.win,"pointermove",this.onPointerMove),Ja(this.win,"pointerup",this.onPointerUp),Ja(this.win,"pointercancel",this.onPointerUp))}updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),M_.update(this.updatePoint)}};function Ih(e,t){return{x:e.x-t.x,y:e.y-t.y}}function pl(e,t){return{point:e.point,delta:Ih(e.point,t[t.length-1]),offset:Ih(e.point,t[0]),velocity:lN(t,.1)}}var sN=e=>e*1e3;function lN(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=e[e.length-1];for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>sN(t)));)n--;if(!r)return{x:0,y:0};const a=(o.timestamp-r.timestamp)/1e3;if(a===0)return{x:0,y:0};const i={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function cN(...e){return t=>e.reduce((n,r)=>r(n),t)}function ml(e,t){return Math.abs(e-t)}function Rh(e){return"x"in e&&"y"in e}function uN(e,t){if(typeof e=="number"&&typeof t=="number")return ml(e,t);if(Rh(e)&&Rh(t)){const n=ml(e.x,t.x),r=ml(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function lb(e){const t=f.useRef(null);return t.current=e,t}function dN(e,t){const{onPan:n,onPanStart:r,onPanEnd:o,onPanSessionStart:a,onPanSessionEnd:i,threshold:s}=t,l=!!(n||r||o||a||i),c=f.useRef(null),u=lb({onSessionStart:a,onSessionEnd:i,onStart:r,onMove:n,onEnd(d,h){c.current=null,o==null||o(d,h)}});f.useEffect(()=>{var d;(d=c.current)==null||d.updateHandlers(u.current)}),f.useEffect(()=>{const d=e.current;if(!d||!l)return;function h(p){c.current=new iN(p,u.current,s)}return Ja(d,"pointerdown",h)},[e,l,u,s]),f.useEffect(()=>()=>{var d;(d=c.current)==null||d.end(),c.current=null},[])}function fN(e,t){var o;if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=(o=e.ownerDocument.defaultView)!=null?o:window,r=new n.ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const[i]=a;let s,l;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,l=u.blockSize}else s=e.offsetWidth,l=e.offsetHeight;t({width:s,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var hN=globalThis!=null&&globalThis.document?f.useLayoutEffect:f.useEffect;function pN(e,t){var n,r;if(!e||!e.parentElement)return;const o=(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window,a=new o.MutationObserver(()=>{t()});return a.observe(e.parentElement,{childList:!0}),()=>{a.disconnect()}}function mN({getNodes:e,observeMutation:t=!0}){const[n,r]=f.useState([]),[o,a]=f.useState(0);return hN(()=>{const i=e(),s=i.map((l,c)=>fN(l,u=>{r(d=>[...d.slice(0,c),u,...d.slice(c+1)])}));if(t){const l=i[0];s.push(pN(l,()=>{a(c=>c+1)}))}return()=>{s.forEach(l=>{l==null||l()})}},[o]),n}function gN(e){return typeof e=="object"&&e!==null&&"current"in e}function vN(e){const[t]=mN({observeMutation:!1,getNodes(){return[gN(e)?e.current:e]}});return t}function bN(e){var t;const{min:n=0,max:r=100,onChange:o,value:a,defaultValue:i,isReversed:s,direction:l="ltr",orientation:c="horizontal",id:u,isDisabled:d,isReadOnly:h,onChangeStart:p,onChangeEnd:g,step:m=1,getAriaValueText:v,"aria-valuetext":S,"aria-label":x,"aria-labelledby":w,name:k,focusThumbOnChange:T=!0,...E}=e,_=We(p),I=We(g),R=We(v),A=XF({isReversed:s,direction:l,orientation:c}),[O,Y]=_g({value:a,defaultValue:i!=null?i:xN(n,r),onChange:o}),[q,K]=f.useState(!1),[X,U]=f.useState(!1),M=!(d||h),B=(r-n)/10,re=m||(r-n)/100,oe=Ka(O,n,r),te=r-oe+n,L=oh(A?te:oe,n,r),V=c==="vertical",W=lb({min:n,max:r,step:m,isDisabled:d,value:oe,isInteractive:M,isReversed:A,isVertical:V,eventSource:null,focusThumbOnChange:T,orientation:c}),ie=f.useRef(null),he=f.useRef(null),ce=f.useRef(null),me=f.useId(),Pe=u!=null?u:me,[be,ae]=["slider-thumb-".concat(Pe),"slider-track-".concat(Pe)],Ae=f.useCallback(z=>{var ne,Bt;if(!ie.current)return;const Ve=W.current;Ve.eventSource="pointer";const ut=ie.current.getBoundingClientRect(),{clientX:Kr,clientY:ia}=(Bt=(ne=z.touches)==null?void 0:ne[0])!=null?Bt:z,us=V?ut.bottom-ia:Kr-ut.left,sa=V?ut.height:ut.width;let nn=us/sa;A&&(nn=1-nn);let Mn=gR(nn,Ve.min,Ve.max);return Ve.step&&(Mn=parseFloat(ah(Mn,Ve.min,Ve.step))),Mn=Ka(Mn,Ve.min,Ve.max),Mn},[V,A,W]),ge=f.useCallback(z=>{const ne=W.current;ne.isInteractive&&(z=parseFloat(ah(z,ne.min,re)),z=Ka(z,ne.min,ne.max),Y(z))},[re,Y,W]),j=f.useMemo(()=>({stepUp(z=re){const ne=A?oe-z:oe+z;ge(ne)},stepDown(z=re){const ne=A?oe+z:oe-z;ge(ne)},reset(){ge(i||0)},stepTo(z){ge(z)}}),[ge,A,oe,re,i]),de=f.useCallback(z=>{const ne=W.current,Ve={ArrowRight:()=>j.stepUp(),ArrowUp:()=>j.stepUp(),ArrowLeft:()=>j.stepDown(),ArrowDown:()=>j.stepDown(),PageUp:()=>j.stepUp(B),PageDown:()=>j.stepDown(B),Home:()=>ge(ne.min),End:()=>ge(ne.max)}[z.key];Ve&&(z.preventDefault(),z.stopPropagation(),Ve(z),ne.eventSource="keyboard")},[j,ge,B,W]),se=(t=R==null?void 0:R(oe))!=null?t:S,Oe=vN(he),{getThumbStyle:ct,rootStyle:ze,trackStyle:nt,innerTrackStyle:rt}=f.useMemo(()=>{const z=W.current,ne=Oe!=null?Oe:{width:0,height:0};return KF({isReversed:A,orientation:z.orientation,thumbRects:[ne],thumbPercents:[L]})},[A,Oe,L,W]),Ze=f.useCallback(()=>{W.current.focusThumbOnChange&&setTimeout(()=>{var ne;return(ne=he.current)==null?void 0:ne.focus()})},[W]);mn(()=>{const z=W.current;Ze(),z.eventSource==="keyboard"&&(I==null||I(z.value))},[oe,I]);function Ct(z){const ne=Ae(z);ne!=null&&ne!==W.current.value&&Y(ne)}dN(ce,{onPanSessionStart(z){const ne=W.current;ne.isInteractive&&(K(!0),Ze(),Ct(z),_==null||_(ne.value))},onPanSessionEnd(){const z=W.current;z.isInteractive&&(K(!1),I==null||I(z.value))},onPan(z){W.current.isInteractive&&Ct(z)}});const tn=f.useCallback((z={},ne=null)=>({...z,...E,ref:Ie(ne,ce),tabIndex:-1,"aria-disabled":fl(d),"data-focused":hr(X),style:{...z.style,...ze}}),[E,d,X,ze]),bn=f.useCallback((z={},ne=null)=>({...z,ref:Ie(ne,ie),id:ae,"data-disabled":hr(d),style:{...z.style,...nt}}),[d,ae,nt]),yn=f.useCallback((z={},ne=null)=>({...z,ref:ne,style:{...z.style,...rt}}),[rt]),N=f.useCallback((z={},ne=null)=>({...z,ref:Ie(ne,he),role:"slider",tabIndex:M?0:void 0,id:be,"data-active":hr(q),"aria-valuetext":se,"aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":oe,"aria-orientation":c,"aria-disabled":fl(d),"aria-readonly":fl(h),"aria-label":x,"aria-labelledby":x?void 0:w,style:{...z.style,...ct(0)},onKeyDown:hl(z.onKeyDown,de),onFocus:hl(z.onFocus,()=>U(!0)),onBlur:hl(z.onBlur,()=>U(!1))}),[M,be,q,se,n,r,oe,c,d,h,x,w,ct,de]),ue=f.useCallback((z,ne=null)=>{const Bt=!(z.valuer),Ve=oe>=z.value,ut=oh(z.value,n,r),Kr={position:"absolute",pointerEvents:"none",...yN({orientation:c,vertical:{bottom:A?"".concat(100-ut,"%"):"".concat(ut,"%")},horizontal:{left:A?"".concat(100-ut,"%"):"".concat(ut,"%")}})};return{...z,ref:ne,role:"presentation","aria-hidden":!0,"data-disabled":hr(d),"data-invalid":hr(!Bt),"data-highlighted":hr(Ve),style:{...z.style,...Kr}}},[d,A,r,n,c,oe]),De=f.useCallback((z={},ne=null)=>({...z,ref:ne,type:"hidden",value:oe,name:k}),[k,oe]);return{state:{value:oe,isFocused:X,isDragging:q},actions:j,getRootProps:tn,getTrackProps:bn,getInnerTrackProps:yn,getThumbProps:N,getMarkerProps:ue,getInputProps:De}}function yN(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function xN(e,t){return t"}),[wN,cs]=Te({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),CN=F((e,t)=>{var n;const r={...e,orientation:(n=e==null?void 0:e.orientation)!=null?n:"horizontal"},o=tt("Slider",r),a=Ee(r),{direction:i}=Ho();a.direction=i;const{getInputProps:s,getRootProps:l,...c}=bN(a),u=l(),d=s({},t);return b.jsx(SN,{value:c,children:b.jsx(wN,{value:o,children:b.jsxs(D.div,{...u,className:oa("chakra-slider",r.className),__css:o.container,children:[r.children,b.jsx("input",{...d})]})})})});CN.displayName="Slider";var kN=F((e,t)=>{const{getThumbProps:n}=ls(),r=cs(),o=n(e,t);return b.jsx(D.div,{...o,className:oa("chakra-slider__thumb",e.className),__css:r.thumb})});kN.displayName="SliderThumb";var PN=F((e,t)=>{const{getTrackProps:n}=ls(),r=cs(),o=n(e,t);return b.jsx(D.div,{...o,className:oa("chakra-slider__track",e.className),__css:r.track})});PN.displayName="SliderTrack";var _N=F((e,t)=>{const{getInnerTrackProps:n}=ls(),r=cs(),o=n(e,t);return b.jsx(D.div,{...o,className:oa("chakra-slider__filled-track",e.className),__css:r.filledTrack})});_N.displayName="SliderFilledTrack";var TN=F((e,t)=>{const{getMarkerProps:n}=ls(),r=cs(),o=n(e,t);return b.jsx(D.div,{...o,className:oa("chakra-slider__marker",e.className),__css:r.mark})});TN.displayName="SliderMark";var EN=F(function(t,n){const r=tt("Switch",t),{spacing:o="0.5rem",children:a,...i}=Ee(t),{getIndicatorProps:s,getInputProps:l,getCheckboxProps:c,getRootProps:u,getLabelProps:d}=Ng(i),h=f.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),p=f.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),g=f.useMemo(()=>({userSelect:"none",marginStart:o,...r.label}),[o,r.label]);return b.jsxs(D.label,{...u(),className:G("chakra-switch",t.className),__css:h,children:[b.jsx("input",{className:"chakra-switch__input",...l({},n)}),b.jsx(D.span,{...c(),className:"chakra-switch__track",__css:p,children:b.jsx(D.span,{__css:r.thumb,className:"chakra-switch__thumb",...s()})}),a&&b.jsx(D.span,{className:"chakra-switch__label",...d(),__css:g,children:a})]})});EN.displayName="Switch";var[AN,aa]=Te({name:"TableStylesContext",errorMessage:"useTableStyles returned is 'undefined'. Seems you forgot to wrap the components in \"
\" "}),$N=F((e,t)=>{const n=tt("Table",e),{className:r,layout:o,...a}=Ee(e);return b.jsx(AN,{value:n,children:b.jsx(D.table,{ref:t,__css:{tableLayout:o,...n.table},className:G("chakra-table",r),...a})})});$N.displayName="Table";var kj=F((e,t)=>{const n=aa();return b.jsx(D.thead,{...e,ref:t,__css:n.thead})}),Pj=F((e,t)=>{const n=aa();return b.jsx(D.tr,{...e,ref:t,__css:n.tr})}),_j=F((e,t)=>{const n=aa();return b.jsx(D.tbody,{...e,ref:t,__css:n.tbody})}),Tj=F(({isNumeric:e,...t},n)=>{const r=aa();return b.jsx(D.td,{...t,ref:n,__css:r.td,"data-is-numeric":e})}),Ej=F(({isNumeric:e,...t},n)=>{const r=aa();return b.jsx(D.th,{...t,ref:n,__css:r.th,"data-is-numeric":e})}),[IN,cb]=Te({name:"TagStylesContext",errorMessage:"useTagStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),RN=F((e,t)=>{const n=tt("Tag",e),r=Ee(e),o={display:"inline-flex",verticalAlign:"top",alignItems:"center",maxWidth:"100%",...n.container};return b.jsx(IN,{value:n,children:b.jsx(D.span,{ref:t,...r,__css:o})})});RN.displayName="Tag";var MN=F((e,t)=>{const n=cb();return b.jsx(D.span,{ref:t,noOfLines:1,...e,__css:n.label})});MN.displayName="TagLabel";var ON=F((e,t)=>b.jsx(Ot,{ref:t,verticalAlign:"top",marginEnd:"0.5rem",...e}));ON.displayName="TagLeftIcon";var DN=F((e,t)=>b.jsx(Ot,{ref:t,verticalAlign:"top",marginStart:"0.5rem",...e}));DN.displayName="TagRightIcon";var ub=e=>b.jsx(Ot,{verticalAlign:"inherit",viewBox:"0 0 512 512",...e,children:b.jsx("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})});ub.displayName="TagCloseIcon";var FN=F((e,t)=>{const{isDisabled:n,children:r,...o}=e,i={display:"flex",alignItems:"center",justifyContent:"center",outline:"0",...cb().closeButton};return b.jsx(D.button,{ref:t,"aria-label":"close",...o,type:"button",disabled:n,__css:i,children:r||b.jsx(ub,{})})});FN.displayName="TagCloseButton";function NN(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var jN=["h","minH","height","minHeight"],BN=F((e,t)=>{const n=wt("Textarea",e),{className:r,rows:o,...a}=Ee(e),i=tu(a),s=o?NN(n,jN):n;return b.jsx(D.textarea,{ref:t,rows:o,...i,className:G("chakra-textarea",r),__css:s})});BN.displayName="Textarea";var zN={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}},sc=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},ei=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function LN(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:o,closeOnScroll:a,closeOnPointerDown:i=o,closeOnEsc:s=!0,onOpen:l,onClose:c,placement:u,id:d,isOpen:h,defaultIsOpen:p,arrowSize:g=10,arrowShadowColor:m,arrowPadding:v,modifiers:S,isDisabled:x,gutter:w,offset:k,direction:T,...E}=e,{isOpen:_,onOpen:I,onClose:R}=ku({isOpen:h,defaultIsOpen:p,onOpen:l,onClose:c}),{referenceRef:A,getPopperProps:O,getArrowInnerProps:Y,getArrowProps:q}=Cu({enabled:_,placement:u,arrowPadding:v,modifiers:S,gutter:w,offset:k,direction:T}),K=f.useId(),X=d!=null?d:K,U="tooltip-".concat(X),M=f.useRef(null),B=f.useRef(),re=f.useCallback(()=>{B.current&&(clearTimeout(B.current),B.current=void 0)},[]),oe=f.useRef(),te=f.useCallback(()=>{oe.current&&(clearTimeout(oe.current),oe.current=void 0)},[]),ve=f.useCallback(()=>{te(),R()},[R,te]),L=VN(M,ve),V=f.useCallback(()=>{if(!x&&!B.current){_&&L();const ae=ei(M);B.current=ae.setTimeout(I,t)}},[L,x,_,I,t]),W=f.useCallback(()=>{re();const ae=ei(M);oe.current=ae.setTimeout(ve,n)},[n,ve,re]),ie=f.useCallback(()=>{_&&r&&W()},[r,W,_]),he=f.useCallback(()=>{_&&i&&W()},[i,W,_]),ce=f.useCallback(ae=>{_&&ae.key==="Escape"&&W()},[_,W]);Xn(()=>sc(M),"keydown",s?ce:void 0),Xn(()=>{if(!a)return null;const ae=M.current;if(!ae)return null;const Ae=mv(ae);return Ae.localName==="body"?ei(M):Ae},"scroll",()=>{_&&a&&ve()},{passive:!0,capture:!0}),f.useEffect(()=>{x&&(re(),_&&R())},[x,_,R,re]),f.useEffect(()=>()=>{re(),te()},[re,te]),Xn(()=>M.current,"pointerleave",W);const me=f.useCallback((ae={},Ae=null)=>({...ae,ref:Ie(M,Ae,A),onPointerEnter:J(ae.onPointerEnter,j=>{j.pointerType!=="touch"&&V()}),onClick:J(ae.onClick,ie),onPointerDown:J(ae.onPointerDown,he),onFocus:J(ae.onFocus,V),onBlur:J(ae.onBlur,W),"aria-describedby":_?U:void 0}),[V,W,he,_,U,ie,A]),Pe=f.useCallback((ae={},Ae=null)=>O({...ae,style:{...ae.style,[Ke.arrowSize.var]:g?"".concat(g,"px"):void 0,[Ke.arrowShadowColor.var]:m}},Ae),[O,g,m]),be=f.useCallback((ae={},Ae=null)=>{const ge={...ae.style,position:"relative",transformOrigin:Ke.transformOrigin.varRef};return{ref:Ae,...E,...ae,id:U,role:"tooltip",style:ge}},[E,U]);return{isOpen:_,show:V,hide:W,getTriggerProps:me,getTooltipProps:be,getTooltipPositionerProps:Pe,getArrowProps:q,getArrowInnerProps:Y}}var gl="chakra-ui:close-tooltip";function VN(e,t){return f.useEffect(()=>{const n=sc(e);return n.addEventListener(gl,t),()=>n.removeEventListener(gl,t)},[t,e]),()=>{const n=sc(e),r=ei(e);n.dispatchEvent(new r.CustomEvent(gl))}}function WN(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function HN(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var UN=D(Jt.div),GN=F((e,t)=>{var n,r;const o=wt("Tooltip",e),a=Ee(e),i=Ho(),{children:s,label:l,shouldWrapChildren:c,"aria-label":u,hasArrow:d,bg:h,portalProps:p,background:g,backgroundColor:m,bgColor:v,motionProps:S,...x}=a,w=(r=(n=g!=null?g:m)!=null?n:h)!=null?r:v;if(w){o.bg=w;const O=qx(i,"colors",w);o[Ke.arrowBg.var]=O}const k=LN({...x,direction:i.direction}),T=typeof s=="string"||c;let E;if(T)E=b.jsx(D.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps(),children:s});else{const O=f.Children.only(s);E=f.cloneElement(O,k.getTriggerProps(O.props,O.ref))}const _=!!u,I=k.getTooltipProps({},t),R=_?WN(I,["role","id"]):I,A=HN(I,["role","id"]);return l?b.jsxs(b.Fragment,{children:[E,b.jsx(rr,{children:k.isOpen&&b.jsx(Gr,{...p,children:b.jsx(D.div,{...k.getTooltipPositionerProps(),__css:{zIndex:o.zIndex,pointerEvents:"none"},children:b.jsxs(UN,{variants:zN,initial:"exit",animate:"enter",exit:"exit",...S,...R,__css:o,children:[l,_&&b.jsx(D.span,{srOnly:!0,...A,children:u}),d&&b.jsx(D.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:b.jsx(D.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:o.bg}})})]})})})})]}):b.jsx(b.Fragment,{children:s})});GN.displayName="Tooltip";var db={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Mh=At.createContext&&At.createContext(db),qN=["attr","size","title"];function KN(e,t){if(e==null)return{};var n=XN(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XN(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function wi(){return wi=Object.assign?Object.assign.bind():function(e){for(var t=1;tAt.createElement(t.tag,Ci({key:n},t.attr),fb(t.child)))}function Aj(e){return t=>At.createElement(JN,wi({attr:Ci({},e.attr)},t),fb(e.child))}function JN(e){var t=n=>{var{attr:r,size:o,title:a}=e,i=KN(e,qN),s=o||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),At.createElement("svg",wi({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,i,{className:l,style:Ci(Ci({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),a&&At.createElement("title",null,a),e.children)};return Mh!==void 0?At.createElement(Mh.Consumer,null,n=>t(n)):t(db)}export{dF as $,sj as A,Tv as B,gO as C,bO as D,jp as E,xv as F,oj as G,aj as H,YM as I,Dp as J,Et as K,Np as L,Fp as M,NI as N,Og as O,Gr as P,BN as Q,MF as R,Xc as S,Eo as T,mO as U,NF as V,sO as W,BF as X,RF as Y,jF as Z,wj as _,bj as a,aO as a$,Cj as a0,cF as a1,hF as a2,fF as a3,iO as a4,lF as a5,nj as a6,QM as a7,wg as a8,xg as a9,MN as aA,mu as aB,eO as aC,nO as aD,Ot as aE,u5 as aF,v5 as aG,m5 as aH,f5 as aI,pR as aJ,dO as aK,hj as aL,GN as aM,lO as aN,$N as aO,kj as aP,Pj as aQ,Ej as aR,_j as aS,Tj as aT,pO as aU,kI as aV,pI as aW,iI as aX,hI as aY,CI as aZ,Mh as a_,Sg as aa,yg as ab,KI as ac,YI as ad,UF as ae,BI as af,CN as ag,PN as ah,_N as ai,kN as aj,EN as ak,Ji as al,st as am,Rp as an,rj as ao,pj as ap,zi as aq,Ho as ar,Aj as as,Kv as at,tb as au,$I as av,fO as aw,uO as ax,RN as ay,RI as az,rT as b,PF as b0,TF as b1,D as c,DF as d,vj as e,F as f,yO as g,Cv as h,ij as i,b as j,wv as k,tt as l,Pv as m,si as n,w_ as o,FF as p,WF as q,Tc as r,xj as s,yj as t,wt as u,dj as v,uj as w,lj as x,cj as y,Sj as z}; diff --git a/assets/change-type-modal-BN8Wot4j.js b/assets/change-type-modal-BN8Wot4j.js deleted file mode 100644 index b2f89bfc..00000000 --- a/assets/change-type-modal-BN8Wot4j.js +++ /dev/null @@ -1 +0,0 @@ -import{j as c,at as Se,$ as Ce,au as Ae,a1 as Te,a4 as $,a2 as xe,a3 as je,aV as Ee,aW as Oe,aX as Le,B as ve,aY as Ie,aZ as Ne,a5 as Pe,O as J,aM as Be}from"./chakra-xNcrfRXW.js";import{S as b,aL as K,au as A,l as ne,k as ae,m as we,L as S,o as oe,c as Re,d as W,q as F,t as ee,v as te,C as Me,M as We,Q as ke,R as ze,V as Ze,W as _e,i as De}from"./index-BiHghyID.js";import{u as Xe,b as r}from"./react-D-_si4LB.js";import{s as C,e as Ye}from"./master-manager-BoebmmSV.js";const se=[b.ShmetroBasic2020,b.LondonTubeBasic,b.ShanghaiSuburbanRailway],qe=(n,s,o)=>{const i=n.getNodeAttribute(s,"type"),a=structuredClone(n.getNodeAttribute(s,i).names);for(let l=0;la.length?a.push("Stn"):a.pop();const e={...C[o].defaultAttrs,names:a};(!Object.values(se).includes(i)||!Object.values(se).includes(o))&&(e.nameOffsetX=n.getNodeAttribute(s,i).nameOffsetX,e.nameOffsetY=n.getNodeAttribute(s,i).nameOffsetY),K.includes(o)&&K.includes(i)&&(e.color=structuredClone(n.getNodeAttribute(s,i).color)),n.removeNodeAttribute(s,i),n.mergeNodeAttributes(s,{type:o,[o]:e})},He=(n,s,o,i)=>i.filter(a=>s==="any"||n.getNodeAttribute(a,"type")===s).forEach(a=>{qe(n,a,o)}),Ue=(n,s,o,i)=>{const a=n.getEdgeAttribute(s,"type"),e=n.getEdgeAttribute(s,"style");if(A[e].metadata.supportLinePathType.includes(o)){const l=structuredClone(ne[o].defaultAttrs);let d=-1;if(i&&o!==ae.Simple){const[u,f]=n.extremities(s),T=l.startFrom;d=we(n,o,u,f,T)}n.setEdgeAttribute(s,"parallelIndex",d),n.removeEdgeAttribute(s,a),n.mergeEdgeAttributes(s,{type:o,[o]:l})}},Ve=(n,s,o,i,a)=>i.filter(e=>s==="any"||n.getEdgeAttribute(e,"type")===s).forEach(e=>{Ue(n,e,o,a)}),Ge=(n,s,o,i)=>{const a=n.getEdgeAttribute(s,"type"),e=n.getEdgeAttribute(s,"style");if(A[o].metadata.supportLinePathType.includes(a)){const l=n.getEdgeAttribute(s,"zIndex"),d=n.getEdgeAttribute(s,e);n.removeEdgeAttribute(s,e);const u=structuredClone(A[o].defaultAttrs);S.includes(e)&&S.includes(o)?u.color=d.color:S.includes(o)&&i&&(u.color=i),n.mergeEdgeAttributes(s,{style:o,[o]:u}),o===oe.River?n.setEdgeAttribute(s,"zIndex",-5):n.setEdgeAttribute(s,"zIndex",l!=null?l:0)}},Qe=(n,s,o,i,a)=>a.filter(e=>s==="any"||n.getEdgeAttribute(e,"style")===s).forEach(e=>{Ge(n,e,o,i)}),$e=(n,s,o,i)=>i.filter(a=>S.includes(n.getEdgeAttribute(a,"style"))).forEach(a=>{const e=n.getEdgeAttributes(a),l=e[e.style].color;(s==="any"||l[0]==s[0]&&l[1]==s[1]&&l[2]==s[2]&&l[3]==s[3])&&n.mergeEdgeAttributes(a,{[e.style]:{color:o}})}),Je=(n,s,o,i,a)=>{[...i,...a].forEach(e=>{const l=n.getNodeAttributes(e).type,d=n.getNodeAttribute(e,l);if(d.color!==void 0){const u=d.color;(s==="any"||u[0]==s[0]&&u[1]==s[1]&&u[2]==s[2]&&u[3]==s[3])&&(d.color=o)}n.mergeNodeAttributes(e,{[l]:d})})},Ke=(n,s,o,i,a)=>{[...s,...o].forEach(e=>{n.setNodeAttribute(e,"zIndex",a)}),i.forEach(e=>{n.setEdgeAttribute(e,"zIndex",a)})},nt=n=>{const{isOpen:s,onClose:o,isSelect:i,filter:a}=n,{t:e}=Xe(),l=Re(),{selected:d,theme:u,paletteAppClip:{output:f}}=W(t=>t.runtime),{preference:{autoParallel:T}}=W(t=>t.app),{activeSubscriptions:k}=W(t=>t.account),ie=r.useCallback(()=>{l(F()),l(ee()),l(te(p.current.export()))},[l,F,ee,te]),p=r.useRef(window.graph),z={any:e("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(ne).map(([t,h])=>[t,e(h.metadata.displayName).toString()]))},Z={any:e("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(A).map(([t,h])=>[t,e(h.metadata.displayName).toString()]))},_={any:e("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(C).map(([t,h])=>[t,e(h.metadata.displayName).toString()]))},x={id:"any",theme:[Me.Other,"other","#ffffff",We.black],value:e("header.settings.procedures.changeType.any")},[j,D]=r.useState(!1),[X,Y]=r.useState(0),[E,q]=r.useState(!1),[O,le]=r.useState("any"),[L,ce]=r.useState(b.ShmetroBasic),[v,H]=r.useState(!1),[I,re]=r.useState("any"),[N,de]=r.useState(oe.SingleColor),[P,U]=r.useState(!1),[B,ue]=r.useState("any"),[w,he]=r.useState(ae.Diagonal),[R,V]=r.useState(!1),[m,G]=r.useState(x),[M,pe]=r.useState(u),[ge,Q]=r.useState(!1);r.useEffect(()=>{ge&&f&&(pe(f),Q(!1))},[f==null?void 0:f.toString()]);const[fe,ye]=r.useState([]),me=[{id:"changeZIndex",title:e("header.settings.procedures.changeZIndex"),onClose:()=>D(!j),field:[{type:"select",label:e("panel.details.info.zIndex"),value:X,options:Object.fromEntries(Array.from({length:11},(t,h)=>[h-5,(h-5).toString()])),onChange:t=>Y(Number(t))}]},{id:"changeStationType",title:e("header.settings.procedures.changeStationType.title"),onClose:()=>q(!E),field:[{type:"select",label:e("header.settings.procedures.changeStationType.changeFrom"),options:_,value:O,disabledOptions:[L],onChange:t=>le(t)},{type:"select",label:e("header.settings.procedures.changeStationType.changeTo"),options:_,value:L,disabledOptions:["any",O],onChange:t=>ce(t)}]},{id:"changeLineStyleType",title:e("header.settings.procedures.changeLineStyleType.title"),onClose:()=>H(!v),field:[{type:"select",label:e("header.settings.procedures.changeLineStyleType.changeFrom"),options:Z,value:I,disabledOptions:[N],onChange:t=>re(t)},{type:"select",label:e("header.settings.procedures.changeLineStyleType.changeTo"),options:Z,value:N,disabledOptions:["any",I],onChange:t=>de(t)}]},{id:"changeLinePathType",title:e("header.settings.procedures.changeLinePathType.title"),onClose:()=>U(!P),field:[{type:"select",label:e("header.settings.procedures.changeLinePathType.changeFrom"),options:z,value:B,disabledOptions:[w],onChange:t=>ue(t)},{type:"select",label:e("header.settings.procedures.changeLinePathType.changeTo"),options:z,value:w,disabledOptions:["any","simple",B],onChange:t=>he(t)}]},{id:"changeColor",title:e("header.settings.procedures.changeColor.title"),onClose:()=>V(!R),field:[{type:"custom",label:e("header.settings.procedures.changeColor.changeFrom"),component:c.jsx(ke,{data:fe,displayHandler:t=>c.jsx(ze,{name:t.value,fg:t.theme[3],bg:t.theme[2],title:t.theme[1],sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}}),filter:(t,h)=>h.id.toLowerCase().includes(t.toLowerCase())||Object.values(h.id).some(y=>y.toLowerCase().includes(t.toLowerCase())),value:m.value,onChange:t=>G(t)})},{type:"custom",label:e("header.settings.procedures.changeColor.changeTo"),component:c.jsx(Ze,{theme:M,onClick:()=>{Q(!0),l(_e(u))}})}]}];r.useEffect(()=>{s&&(D(!1),q(!1),H(!1),U(!1),V(!1),Y(0),ye([x,...Ye(p.current,i?[...d].filter(t=>t.startsWith("stn")||t.startsWith("misc_node")):p.current.nodes(),i?[...d].filter(t=>t.startsWith("line")):p.current.edges()).map(t=>({id:t.toString(),theme:t,value:t[1]==="other"?t[2]:t[1]}))]),G(x))},[s]);const be=()=>{const t=a!=null&&a.includes("station")?[...d].filter(g=>g.startsWith("stn")):i?[]:p.current.filterNodes(g=>g.startsWith("stn")),h=a!=null&&a.includes("misc-node")?[...d].filter(g=>g.startsWith("misc_node")):i?[]:p.current.filterNodes(g=>g.startsWith("misc_node")),y=i?[...d].filter(g=>g.startsWith("line")):p.current.edges();(!a||a.includes("station"))&&E&&He(p.current,O,L,t),(!a||a.includes("line"))&&v&&Qe(p.current,I,N,u,y),(!a||a.includes("line"))&&P&&Ve(p.current,B,w,y,T),R&&((!a||a.includes("line"))&&$e(p.current,m.id==="any"?"any":m.theme,M,y),(!a||a.includes("misc-node")||a.includes("station"))&&Je(p.current,m.id==="any"?"any":m.theme,M,t,h)),j&&Ke(p.current,t,h,y,X),ie(),o()};return c.jsxs(Se,{isOpen:s,onClose:o,size:"md",scrollBehavior:"inside",children:[c.jsx(Ce,{}),c.jsxs(Ae,{children:[c.jsxs(Te,{children:[c.jsx($,{as:"b",fontSize:"xl",children:e(i?"panel.details.multipleSelection.change":"header.settings.procedures.changeType.title")}),c.jsx(xe,{})]}),c.jsx(je,{children:c.jsx(Ee,{allowMultiple:!0,children:me.map(t=>c.jsxs(Oe,{children:[c.jsxs(Le,{onClick:t.onClose,children:[c.jsx(ve,{as:"span",flex:"1",textAlign:"left",children:c.jsx($,{as:"b",fontSize:"md",children:t.title})}),c.jsx(Ie,{})]}),c.jsx(Ne,{pb:4,children:c.jsx(De,{fields:t.field,minW:270})})]},t.id))})}),c.jsxs(Pe,{children:[c.jsx(J,{colorScheme:"blue",variant:"outline",mr:"1",onClick:o,children:e("cancel")}),c.jsx(Be,{label:e("header.settings.pro"),isOpen:!k.RMP_CLOUD,children:c.jsx(J,{colorScheme:"red",mr:"1",onClick:be,isDisabled:!k.RMP_CLOUD||!j&&!E&&!v&&!P&&!R,children:e("apply")})})]})]})]})};export{nt as C,Ge as a,qe as b,Ue as c}; diff --git a/assets/change-type-modal-Cu7YVLn7.js b/assets/change-type-modal-Cu7YVLn7.js new file mode 100644 index 00000000..bfea389e --- /dev/null +++ b/assets/change-type-modal-Cu7YVLn7.js @@ -0,0 +1 @@ +import{j as c,ag as Se,M as Ce,ah as xe,J as Ae,N as Q,K as Te,L as je,aG as Ee,aH as Le,aI as Oe,B as Ie,aJ as ve,aK as Ne,O as Pe,t as V,ax as Be}from"./chakra-BF_mGyXb.js";import{L as b,S,aL as $,au as x,o as ne,k as ae,m as we,l as oe,c as Re,d as W,q as F,t as ee,v as te,C as Me,M as We,Q as ke,R as ze,V as _e,W as De,i as Ze}from"./index-CsgTWcmq.js";import{u as He,b as r}from"./react-0YWW4C_I.js";import{s as C,e as qe}from"./master-manager-DW7JCfNm.js";const se=[S.ShmetroBasic2020,S.LondonTubeBasic,S.ShanghaiSuburbanRailway],Ge=(n,s,o)=>{const i=n.getNodeAttribute(s,"type"),a=structuredClone(n.getNodeAttribute(s,i).names);for(let l=0;la.length?a.push("Stn"):a.pop();const e={...C[o].defaultAttrs,names:a};(!Object.values(se).includes(i)||!Object.values(se).includes(o))&&(e.nameOffsetX=n.getNodeAttribute(s,i).nameOffsetX,e.nameOffsetY=n.getNodeAttribute(s,i).nameOffsetY),$.includes(o)&&$.includes(i)&&(e.color=structuredClone(n.getNodeAttribute(s,i).color)),n.removeNodeAttribute(s,i),n.mergeNodeAttributes(s,{type:o,[o]:e})},Je=(n,s,o,i)=>i.filter(a=>s==="any"||n.getNodeAttribute(a,"type")===s).forEach(a=>{Ge(n,a,o)}),Ke=(n,s,o,i)=>{const a=n.getEdgeAttribute(s,"type"),e=n.getEdgeAttribute(s,"style");if(x[e].metadata.supportLinePathType.includes(o)){const l=structuredClone(ne[o].defaultAttrs);let d=-1;if(i&&o!==ae.Simple){const[u,f]=n.extremities(s),A=l.startFrom;d=we(n,o,u,f,A)}n.setEdgeAttribute(s,"parallelIndex",d),n.removeEdgeAttribute(s,a),n.mergeEdgeAttributes(s,{type:o,[o]:l})}},Ue=(n,s,o,i,a)=>i.filter(e=>s==="any"||n.getEdgeAttribute(e,"type")===s).forEach(e=>{Ke(n,e,o,a)}),Xe=(n,s,o,i)=>{const a=n.getEdgeAttribute(s,"type"),e=n.getEdgeAttribute(s,"style");if(x[o].metadata.supportLinePathType.includes(a)){const l=n.getEdgeAttribute(s,"zIndex"),d=n.getEdgeAttribute(s,e);n.removeEdgeAttribute(s,e);const u=structuredClone(x[o].defaultAttrs);b.includes(e)&&b.includes(o)?u.color=d.color:b.includes(o)&&i&&(u.color=i),n.mergeEdgeAttributes(s,{style:o,[o]:u}),o===oe.River?n.setEdgeAttribute(s,"zIndex",-5):n.setEdgeAttribute(s,"zIndex",l!=null?l:0)}},Ye=(n,s,o,i,a)=>a.filter(e=>s==="any"||n.getEdgeAttribute(e,"style")===s).forEach(e=>{Xe(n,e,o,i)}),Qe=(n,s,o,i)=>i.filter(a=>b.includes(n.getEdgeAttribute(a,"style"))).forEach(a=>{const e=n.getEdgeAttributes(a),l=e[e.style].color;(s==="any"||l[0]==s[0]&&l[1]==s[1]&&l[2]==s[2]&&l[3]==s[3])&&n.mergeEdgeAttributes(a,{[e.style]:{color:o}})}),Ve=(n,s,o,i,a)=>{[...i,...a].forEach(e=>{const l=n.getNodeAttributes(e).type,d=n.getNodeAttribute(e,l);if(d.color!==void 0){const u=d.color;(s==="any"||u[0]==s[0]&&u[1]==s[1]&&u[2]==s[2]&&u[3]==s[3])&&(d.color=o)}n.mergeNodeAttributes(e,{[l]:d})})},$e=(n,s,o,i,a)=>{[...s,...o].forEach(e=>{n.setNodeAttribute(e,"zIndex",a)}),i.forEach(e=>{n.setEdgeAttribute(e,"zIndex",a)})},nt=n=>{const{isOpen:s,onClose:o,isSelect:i,filter:a}=n,{t:e}=He(),l=Re(),{selected:d,theme:u,paletteAppClip:{output:f}}=W(t=>t.runtime),{preference:{autoParallel:A}}=W(t=>t.app),{activeSubscriptions:k}=W(t=>t.account),ie=r.useCallback(()=>{l(F()),l(ee()),l(te(p.current.export()))},[l,F,ee,te]),p=r.useRef(window.graph),z={any:e("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(ne).map(([t,h])=>[t,e(h.metadata.displayName).toString()]))},_={any:e("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(x).map(([t,h])=>[t,e(h.metadata.displayName).toString()]))},D={any:e("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(C).map(([t,h])=>[t,e(h.metadata.displayName).toString()]))},T={id:"any",theme:[Me.Other,"other","#ffffff",We.black],value:e("header.settings.procedures.changeType.any")},[j,Z]=r.useState(!1),[H,q]=r.useState(0),[E,G]=r.useState(!1),[L,le]=r.useState("any"),[O,ce]=r.useState(S.ShmetroBasic),[I,J]=r.useState(!1),[v,re]=r.useState("any"),[N,de]=r.useState(oe.SingleColor),[P,K]=r.useState(!1),[B,ue]=r.useState("any"),[w,he]=r.useState(ae.Diagonal),[R,U]=r.useState(!1),[m,X]=r.useState(T),[M,pe]=r.useState(u),[ge,Y]=r.useState(!1);r.useEffect(()=>{ge&&f&&(pe(f),Y(!1))},[f==null?void 0:f.toString()]);const[fe,ye]=r.useState([]),me=[{id:"changeZIndex",title:e("header.settings.procedures.changeZIndex"),onClose:()=>Z(!j),field:[{type:"select",label:e("panel.details.info.zIndex"),value:H,options:Object.fromEntries(Array.from({length:11},(t,h)=>[h-5,(h-5).toString()])),onChange:t=>q(Number(t))}]},{id:"changeStationType",title:e("header.settings.procedures.changeStationType.title"),onClose:()=>G(!E),field:[{type:"select",label:e("header.settings.procedures.changeStationType.changeFrom"),options:D,value:L,disabledOptions:[O],onChange:t=>le(t)},{type:"select",label:e("header.settings.procedures.changeStationType.changeTo"),options:D,value:O,disabledOptions:["any",L],onChange:t=>ce(t)}]},{id:"changeLineStyleType",title:e("header.settings.procedures.changeLineStyleType.title"),onClose:()=>J(!I),field:[{type:"select",label:e("header.settings.procedures.changeLineStyleType.changeFrom"),options:_,value:v,disabledOptions:[N],onChange:t=>re(t)},{type:"select",label:e("header.settings.procedures.changeLineStyleType.changeTo"),options:_,value:N,disabledOptions:["any",v],onChange:t=>de(t)}]},{id:"changeLinePathType",title:e("header.settings.procedures.changeLinePathType.title"),onClose:()=>K(!P),field:[{type:"select",label:e("header.settings.procedures.changeLinePathType.changeFrom"),options:z,value:B,disabledOptions:[w],onChange:t=>ue(t)},{type:"select",label:e("header.settings.procedures.changeLinePathType.changeTo"),options:z,value:w,disabledOptions:["any","simple",B],onChange:t=>he(t)}]},{id:"changeColor",title:e("header.settings.procedures.changeColor.title"),onClose:()=>U(!R),field:[{type:"custom",label:e("header.settings.procedures.changeColor.changeFrom"),component:c.jsx(ke,{data:fe,displayHandler:t=>c.jsx(ze,{name:t.value,fg:t.theme[3],bg:t.theme[2],title:t.theme[1],sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}}),filter:(t,h)=>h.id.toLowerCase().includes(t.toLowerCase())||Object.values(h.id).some(y=>y.toLowerCase().includes(t.toLowerCase())),value:m.value,onChange:t=>X(t)})},{type:"custom",label:e("header.settings.procedures.changeColor.changeTo"),component:c.jsx(_e,{theme:M,onClick:()=>{Y(!0),l(De(u))}})}]}];r.useEffect(()=>{s&&(Z(!1),G(!1),J(!1),K(!1),U(!1),q(0),ye([T,...qe(p.current,i?[...d].filter(t=>t.startsWith("stn")||t.startsWith("misc_node")):p.current.nodes(),i?[...d].filter(t=>t.startsWith("line")):p.current.edges()).map(t=>({id:t.toString(),theme:t,value:t[1]==="other"?t[2]:t[1]}))]),X(T))},[s]);const be=()=>{const t=a!=null&&a.includes("station")?[...d].filter(g=>g.startsWith("stn")):i?[]:p.current.filterNodes(g=>g.startsWith("stn")),h=a!=null&&a.includes("misc-node")?[...d].filter(g=>g.startsWith("misc_node")):i?[]:p.current.filterNodes(g=>g.startsWith("misc_node")),y=i?[...d].filter(g=>g.startsWith("line")):p.current.edges();(!a||a.includes("station"))&&E&&Je(p.current,L,O,t),(!a||a.includes("line"))&&I&&Ye(p.current,v,N,u,y),(!a||a.includes("line"))&&P&&Ue(p.current,B,w,y,A),R&&((!a||a.includes("line"))&&Qe(p.current,m.id==="any"?"any":m.theme,M,y),(!a||a.includes("misc-node")||a.includes("station"))&&Ve(p.current,m.id==="any"?"any":m.theme,M,t,h)),j&&$e(p.current,t,h,y,H),ie(),o()};return c.jsxs(Se,{isOpen:s,onClose:o,size:"md",scrollBehavior:"inside",children:[c.jsx(Ce,{}),c.jsxs(xe,{children:[c.jsxs(Ae,{children:[c.jsx(Q,{as:"b",fontSize:"xl",children:e(i?"panel.details.multipleSelection.change":"header.settings.procedures.changeType.title")}),c.jsx(Te,{})]}),c.jsx(je,{children:c.jsx(Ee,{allowMultiple:!0,children:me.map(t=>c.jsxs(Le,{children:[c.jsxs(Oe,{onClick:t.onClose,children:[c.jsx(Ie,{as:"span",flex:"1",textAlign:"left",children:c.jsx(Q,{as:"b",fontSize:"md",children:t.title})}),c.jsx(ve,{})]}),c.jsx(Ne,{pb:4,children:c.jsx(Ze,{fields:t.field,minW:270})})]},t.id))})}),c.jsxs(Pe,{children:[c.jsx(V,{colorScheme:"blue",variant:"outline",mr:"1",onClick:o,children:e("cancel")}),c.jsx(Be,{label:e("header.settings.pro"),isOpen:!k.RMP_CLOUD,children:c.jsx(V,{colorScheme:"red",mr:"1",onClick:be,isDisabled:!k.RMP_CLOUD||!j&&!E&&!I&&!P&&!R,children:e("apply")})})]})]})]})};export{nt as C,Xe as a,Ge as b,Ke as c}; diff --git a/assets/change-type-modal-legacy-Bi8yFeWH.js b/assets/change-type-modal-legacy-Bi8yFeWH.js deleted file mode 100644 index 6e8b7cf9..00000000 --- a/assets/change-type-modal-legacy-Bi8yFeWH.js +++ /dev/null @@ -1 +0,0 @@ -System.register(["./chakra-legacy-DsJcG_7N.js","./index-legacy-CKg3D7KT.js","./react-legacy-S3BmMPiz.js","./master-manager-legacy-DmddqoRb.js"],(function(e,t){"use strict";var s,n,a,r,i,l,o,c,d,u,g,h,p,y,m,b,f,S,x,A,C,j,E,v,O,T,L,N,W,w,k,z,I,P,M,R,B,F,_,D,X;return{setters:[e=>{s=e.j,n=e.at,a=e.$,r=e.au,i=e.a1,l=e.a4,o=e.a2,c=e.a3,d=e.aV,u=e.aW,g=e.aX,h=e.B,p=e.aY,y=e.aZ,m=e.a5,b=e.O,f=e.aM},e=>{S=e.S,x=e.aL,A=e.au,C=e.l,j=e.k,E=e.m,v=e.L,O=e.o,T=e.c,L=e.d,N=e.q,W=e.t,w=e.v,k=e.C,z=e.M,I=e.Q,P=e.R,M=e.V,R=e.W,B=e.i},e=>{F=e.u,_=e.b},e=>{D=e.s,X=e.e}],execute:function(){const t=[S.ShmetroBasic2020,S.LondonTubeBasic,S.ShanghaiSuburbanRailway],Y=e("b",((e,s,n)=>{const a=e.getNodeAttribute(s,"type"),r=structuredClone(e.getNodeAttribute(s,a).names);for(let t=0;tr.length?r.push("Stn"):r.pop();const i={...D[n].defaultAttrs,names:r};Object.values(t).includes(a)&&Object.values(t).includes(n)||(i.nameOffsetX=e.getNodeAttribute(s,a).nameOffsetX,i.nameOffsetY=e.getNodeAttribute(s,a).nameOffsetY),x.includes(n)&&x.includes(a)&&(i.color=structuredClone(e.getNodeAttribute(s,a).color)),e.removeNodeAttribute(s,a),e.mergeNodeAttributes(s,{type:n,[n]:i})})),Z=e("c",((e,t,s,n)=>{const a=e.getEdgeAttribute(t,"type"),r=e.getEdgeAttribute(t,"style");if(A[r].metadata.supportLinePathType.includes(s)){const r=structuredClone(C[s].defaultAttrs);let i=-1;if(n&&s!==j.Simple){const[n,a]=e.extremities(t),l=r.startFrom;i=E(e,s,n,a,l)}e.setEdgeAttribute(t,"parallelIndex",i),e.removeEdgeAttribute(t,a),e.mergeEdgeAttributes(t,{type:s,[s]:r})}})),U=e("a",((e,t,s,n)=>{const a=e.getEdgeAttribute(t,"type"),r=e.getEdgeAttribute(t,"style");if(A[s].metadata.supportLinePathType.includes(a)){const a=e.getEdgeAttribute(t,"zIndex"),i=e.getEdgeAttribute(t,r);e.removeEdgeAttribute(t,r);const l=structuredClone(A[s].defaultAttrs);v.includes(r)&&v.includes(s)?l.color=i.color:v.includes(s)&&n&&(l.color=n),e.mergeEdgeAttributes(t,{style:s,[s]:l}),s===O.River?e.setEdgeAttribute(t,"zIndex",-5):e.setEdgeAttribute(t,"zIndex",null!=a?a:0)}}));e("C",(e=>{const{isOpen:t,onClose:x,isSelect:E,filter:V}=e,{t:q}=F(),H=T(),{selected:Q,theme:$,paletteAppClip:{output:G}}=L((e=>e.runtime)),{preference:{autoParallel:J}}=L((e=>e.app)),{activeSubscriptions:K}=L((e=>e.account)),ee=_.useCallback((()=>{H(N()),H(W()),H(w(te.current.export()))}),[H,N,W,w]),te=_.useRef(window.graph),se={any:q("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(C).map((([e,t])=>[e,q(t.metadata.displayName).toString()])))},ne={any:q("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(A).map((([e,t])=>[e,q(t.metadata.displayName).toString()])))},ae={any:q("header.settings.procedures.changeType.any"),...Object.fromEntries(Object.entries(D).map((([e,t])=>[e,q(t.metadata.displayName).toString()])))},re={id:"any",theme:[k.Other,"other","#ffffff",z.black],value:q("header.settings.procedures.changeType.any")},[ie,le]=_.useState(!1),[oe,ce]=_.useState(0),[de,ue]=_.useState(!1),[ge,he]=_.useState("any"),[pe,ye]=_.useState(S.ShmetroBasic),[me,be]=_.useState(!1),[fe,Se]=_.useState("any"),[xe,Ae]=_.useState(O.SingleColor),[Ce,je]=_.useState(!1),[Ee,ve]=_.useState("any"),[Oe,Te]=_.useState(j.Diagonal),[Le,Ne]=_.useState(!1),[We,we]=_.useState(re),[ke,ze]=_.useState($),[Ie,Pe]=_.useState(!1);_.useEffect((()=>{Ie&&G&&(ze(G),Pe(!1))}),[null==G?void 0:G.toString()]);const[Me,Re]=_.useState([]),Be=[{id:"changeZIndex",title:q("header.settings.procedures.changeZIndex"),onClose:()=>le(!ie),field:[{type:"select",label:q("panel.details.info.zIndex"),value:oe,options:Object.fromEntries(Array.from({length:11},((e,t)=>[t-5,(t-5).toString()]))),onChange:e=>ce(Number(e))}]},{id:"changeStationType",title:q("header.settings.procedures.changeStationType.title"),onClose:()=>ue(!de),field:[{type:"select",label:q("header.settings.procedures.changeStationType.changeFrom"),options:ae,value:ge,disabledOptions:[pe],onChange:e=>he(e)},{type:"select",label:q("header.settings.procedures.changeStationType.changeTo"),options:ae,value:pe,disabledOptions:["any",ge],onChange:e=>ye(e)}]},{id:"changeLineStyleType",title:q("header.settings.procedures.changeLineStyleType.title"),onClose:()=>be(!me),field:[{type:"select",label:q("header.settings.procedures.changeLineStyleType.changeFrom"),options:ne,value:fe,disabledOptions:[xe],onChange:e=>Se(e)},{type:"select",label:q("header.settings.procedures.changeLineStyleType.changeTo"),options:ne,value:xe,disabledOptions:["any",fe],onChange:e=>Ae(e)}]},{id:"changeLinePathType",title:q("header.settings.procedures.changeLinePathType.title"),onClose:()=>je(!Ce),field:[{type:"select",label:q("header.settings.procedures.changeLinePathType.changeFrom"),options:se,value:Ee,disabledOptions:[Oe],onChange:e=>ve(e)},{type:"select",label:q("header.settings.procedures.changeLinePathType.changeTo"),options:se,value:Oe,disabledOptions:["any","simple",Ee],onChange:e=>Te(e)}]},{id:"changeColor",title:q("header.settings.procedures.changeColor.title"),onClose:()=>Ne(!Le),field:[{type:"custom",label:q("header.settings.procedures.changeColor.changeFrom"),component:s.jsx(I,{data:Me,displayHandler:e=>s.jsx(P,{name:e.value,fg:e.theme[3],bg:e.theme[2],title:e.theme[1],sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}}),filter:(e,t)=>t.id.toLowerCase().includes(e.toLowerCase())||Object.values(t.id).some((t=>t.toLowerCase().includes(e.toLowerCase()))),value:We.value,onChange:e=>we(e)})},{type:"custom",label:q("header.settings.procedures.changeColor.changeTo"),component:s.jsx(M,{theme:ke,onClick:()=>{Pe(!0),H(R($))}})}]}];return _.useEffect((()=>{t&&(le(!1),ue(!1),be(!1),je(!1),Ne(!1),ce(0),Re([re,...X(te.current,E?[...Q].filter((e=>e.startsWith("stn")||e.startsWith("misc_node"))):te.current.nodes(),E?[...Q].filter((e=>e.startsWith("line"))):te.current.edges()).map((e=>({id:e.toString(),theme:e,value:"other"===e[1]?e[2]:e[1]})))]),we(re))}),[t]),s.jsxs(n,{isOpen:t,onClose:x,size:"md",scrollBehavior:"inside",children:[s.jsx(a,{}),s.jsxs(r,{children:[s.jsxs(i,{children:[s.jsx(l,{as:"b",fontSize:"xl",children:q(E?"panel.details.multipleSelection.change":"header.settings.procedures.changeType.title")}),s.jsx(o,{})]}),s.jsx(c,{children:s.jsx(d,{allowMultiple:!0,children:Be.map((e=>s.jsxs(u,{children:[s.jsxs(g,{onClick:e.onClose,children:[s.jsx(h,{as:"span",flex:"1",textAlign:"left",children:s.jsx(l,{as:"b",fontSize:"md",children:e.title})}),s.jsx(p,{})]}),s.jsx(y,{pb:4,children:s.jsx(B,{fields:e.field,minW:270})})]},e.id)))})}),s.jsxs(m,{children:[s.jsx(b,{colorScheme:"blue",variant:"outline",mr:"1",onClick:x,children:q("cancel")}),s.jsx(f,{label:q("header.settings.pro"),isOpen:!K.RMP_CLOUD,children:s.jsx(b,{colorScheme:"red",mr:"1",onClick:()=>{const e=null!=V&&V.includes("station")?[...Q].filter((e=>e.startsWith("stn"))):E?[]:te.current.filterNodes((e=>e.startsWith("stn"))),t=null!=V&&V.includes("misc-node")?[...Q].filter((e=>e.startsWith("misc_node"))):E?[]:te.current.filterNodes((e=>e.startsWith("misc_node"))),s=E?[...Q].filter((e=>e.startsWith("line"))):te.current.edges();V&&!V.includes("station")||!de||((e,t,s,n)=>{n.filter((s=>"any"===t||e.getNodeAttribute(s,"type")===t)).forEach((t=>{Y(e,t,s)}))})(te.current,ge,pe,e),V&&!V.includes("line")||!me||((e,t,s,n,a)=>{a.filter((s=>"any"===t||e.getEdgeAttribute(s,"style")===t)).forEach((t=>{U(e,t,s,n)}))})(te.current,fe,xe,$,s),V&&!V.includes("line")||!Ce||((e,t,s,n,a)=>{n.filter((s=>"any"===t||e.getEdgeAttribute(s,"type")===t)).forEach((t=>{Z(e,t,s,a)}))})(te.current,Ee,Oe,s,J),Le&&(V&&!V.includes("line")||((e,t,s,n)=>{n.filter((t=>v.includes(e.getEdgeAttribute(t,"style")))).forEach((n=>{const a=e.getEdgeAttributes(n),r=a[a.style].color;("any"===t||r[0]==t[0]&&r[1]==t[1]&&r[2]==t[2]&&r[3]==t[3])&&e.mergeEdgeAttributes(n,{[a.style]:{color:s}})}))})(te.current,"any"===We.id?"any":We.theme,ke,s),(!V||V.includes("misc-node")||V.includes("station"))&&((e,t,s,n,a)=>{[...n,...a].forEach((n=>{const a=e.getNodeAttributes(n).type,r=e.getNodeAttribute(n,a);if(void 0!==r.color){const e=r.color;("any"===t||e[0]==t[0]&&e[1]==t[1]&&e[2]==t[2]&&e[3]==t[3])&&(r.color=s)}e.mergeNodeAttributes(n,{[a]:r})}))})(te.current,"any"===We.id?"any":We.theme,ke,e,t)),ie&&((e,t,s,n,a)=>{[...t,...s].forEach((t=>{e.setNodeAttribute(t,"zIndex",a)})),n.forEach((t=>{e.setEdgeAttribute(t,"zIndex",a)}))})(te.current,e,t,s,oe),ee(),x()},isDisabled:!(K.RMP_CLOUD&&(ie||de||me||Ce||Le)),children:q("apply")})})]})]})]})}))}}})); diff --git a/assets/change-type-modal-legacy-CZZrhFpb.js b/assets/change-type-modal-legacy-CZZrhFpb.js new file mode 100644 index 00000000..d451aca1 --- /dev/null +++ b/assets/change-type-modal-legacy-CZZrhFpb.js @@ -0,0 +1 @@ +!function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r{r=e.j,s=e.ag,i=e.M,a=e.ah,o=e.J,l=e.N,c=e.K,d=e.L,u=e.aG,g=e.aH,p=e.aI,h=e.B,y=e.aJ,b=e.aK,f=e.O,m=e.t,j=e.ax},e=>{S=e.L,O=e.S,v=e.aL,x=e.au,A=e.o,C=e.k,E=e.m,T=e.l,L=e.c,N=e.d,P=e.q,w=e.t,k=e.v,I=e.C,W=e.M,z=e.Q,D=e.R,M=e.V,R=e.W,B=e.i},e=>{F=e.u,_=e.b},e=>{H=e.s,J=e.e}],execute:function(){const n=[O.ShmetroBasic2020,O.LondonTubeBasic,O.ShanghaiSuburbanRailway],K=e("b",((e,r,s)=>{const i=e.getNodeAttribute(r,"type"),a=structuredClone(e.getNodeAttribute(r,i).names);for(let t=0;ta.length?a.push("Stn"):a.pop();const o=t(t({},H[s].defaultAttrs),{},{names:a});Object.values(n).includes(i)&&Object.values(n).includes(s)||(o.nameOffsetX=e.getNodeAttribute(r,i).nameOffsetX,o.nameOffsetY=e.getNodeAttribute(r,i).nameOffsetY),v.includes(s)&&v.includes(i)&&(o.color=structuredClone(e.getNodeAttribute(r,i).color)),e.removeNodeAttribute(r,i),e.mergeNodeAttributes(r,{type:s,[s]:o})})),U=e("c",((e,t,n,r)=>{const s=e.getEdgeAttribute(t,"type"),i=e.getEdgeAttribute(t,"style");if(x[i].metadata.supportLinePathType.includes(n)){const i=structuredClone(A[n].defaultAttrs);let a=-1;if(r&&n!==C.Simple){const[r,s]=e.extremities(t),o=i.startFrom;a=E(e,n,r,s,o)}e.setEdgeAttribute(t,"parallelIndex",a),e.removeEdgeAttribute(t,s),e.mergeEdgeAttributes(t,{type:n,[n]:i})}})),X=e("a",((e,t,n,r)=>{const s=e.getEdgeAttribute(t,"type"),i=e.getEdgeAttribute(t,"style");if(x[n].metadata.supportLinePathType.includes(s)){const s=e.getEdgeAttribute(t,"zIndex"),a=e.getEdgeAttribute(t,i);e.removeEdgeAttribute(t,i);const o=structuredClone(x[n].defaultAttrs);S.includes(i)&&S.includes(n)?o.color=a.color:S.includes(n)&&r&&(o.color=r),e.mergeEdgeAttributes(t,{style:n,[n]:o}),n===T.River?e.setEdgeAttribute(t,"zIndex",-5):e.setEdgeAttribute(t,"zIndex",null!=s?s:0)}}));e("C",(e=>{const{isOpen:n,onClose:v,isSelect:E,filter:Y}=e,{t:Z}=F(),q=L(),{selected:G,theme:Q,paletteAppClip:{output:V}}=N((e=>e.runtime)),{preference:{autoParallel:$}}=N((e=>e.app)),{activeSubscriptions:ee}=N((e=>e.account)),te=_.useCallback((()=>{q(P()),q(w()),q(k(ne.current.export()))}),[q,P,w,k]),ne=_.useRef(window.graph),re=t({any:Z("header.settings.procedures.changeType.any")},Object.fromEntries(Object.entries(A).map((([e,t])=>[e,Z(t.metadata.displayName).toString()])))),se=t({any:Z("header.settings.procedures.changeType.any")},Object.fromEntries(Object.entries(x).map((([e,t])=>[e,Z(t.metadata.displayName).toString()])))),ie=t({any:Z("header.settings.procedures.changeType.any")},Object.fromEntries(Object.entries(H).map((([e,t])=>[e,Z(t.metadata.displayName).toString()])))),ae={id:"any",theme:[I.Other,"other","#ffffff",W.black],value:Z("header.settings.procedures.changeType.any")},[oe,le]=_.useState(!1),[ce,de]=_.useState(0),[ue,ge]=_.useState(!1),[pe,he]=_.useState("any"),[ye,be]=_.useState(O.ShmetroBasic),[fe,me]=_.useState(!1),[je,Se]=_.useState("any"),[Oe,ve]=_.useState(T.SingleColor),[xe,Ae]=_.useState(!1),[Ce,Ee]=_.useState("any"),[Te,Le]=_.useState(C.Diagonal),[Ne,Pe]=_.useState(!1),[we,ke]=_.useState(ae),[Ie,We]=_.useState(Q),[ze,De]=_.useState(!1);_.useEffect((()=>{ze&&V&&(We(V),De(!1))}),[null==V?void 0:V.toString()]);const[Me,Re]=_.useState([]),Be=[{id:"changeZIndex",title:Z("header.settings.procedures.changeZIndex"),onClose:()=>le(!oe),field:[{type:"select",label:Z("panel.details.info.zIndex"),value:ce,options:Object.fromEntries(Array.from({length:11},((e,t)=>[t-5,(t-5).toString()]))),onChange:e=>de(Number(e))}]},{id:"changeStationType",title:Z("header.settings.procedures.changeStationType.title"),onClose:()=>ge(!ue),field:[{type:"select",label:Z("header.settings.procedures.changeStationType.changeFrom"),options:ie,value:pe,disabledOptions:[ye],onChange:e=>he(e)},{type:"select",label:Z("header.settings.procedures.changeStationType.changeTo"),options:ie,value:ye,disabledOptions:["any",pe],onChange:e=>be(e)}]},{id:"changeLineStyleType",title:Z("header.settings.procedures.changeLineStyleType.title"),onClose:()=>me(!fe),field:[{type:"select",label:Z("header.settings.procedures.changeLineStyleType.changeFrom"),options:se,value:je,disabledOptions:[Oe],onChange:e=>Se(e)},{type:"select",label:Z("header.settings.procedures.changeLineStyleType.changeTo"),options:se,value:Oe,disabledOptions:["any",je],onChange:e=>ve(e)}]},{id:"changeLinePathType",title:Z("header.settings.procedures.changeLinePathType.title"),onClose:()=>Ae(!xe),field:[{type:"select",label:Z("header.settings.procedures.changeLinePathType.changeFrom"),options:re,value:Ce,disabledOptions:[Te],onChange:e=>Ee(e)},{type:"select",label:Z("header.settings.procedures.changeLinePathType.changeTo"),options:re,value:Te,disabledOptions:["any","simple",Ce],onChange:e=>Le(e)}]},{id:"changeColor",title:Z("header.settings.procedures.changeColor.title"),onClose:()=>Pe(!Ne),field:[{type:"custom",label:Z("header.settings.procedures.changeColor.changeFrom"),component:r.jsx(z,{data:Me,displayHandler:e=>r.jsx(D,{name:e.value,fg:e.theme[3],bg:e.theme[2],title:e.theme[1],sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}}),filter:(e,t)=>t.id.toLowerCase().includes(e.toLowerCase())||Object.values(t.id).some((t=>t.toLowerCase().includes(e.toLowerCase()))),value:we.value,onChange:e=>ke(e)})},{type:"custom",label:Z("header.settings.procedures.changeColor.changeTo"),component:r.jsx(M,{theme:Ie,onClick:()=>{De(!0),q(R(Q))}})}]}];_.useEffect((()=>{n&&(le(!1),ge(!1),me(!1),Ae(!1),Pe(!1),de(0),Re([ae,...J(ne.current,E?[...G].filter((e=>e.startsWith("stn")||e.startsWith("misc_node"))):ne.current.nodes(),E?[...G].filter((e=>e.startsWith("line"))):ne.current.edges()).map((e=>({id:e.toString(),theme:e,value:"other"===e[1]?e[2]:e[1]})))]),ke(ae))}),[n]);return r.jsxs(s,{isOpen:n,onClose:v,size:"md",scrollBehavior:"inside",children:[r.jsx(i,{}),r.jsxs(a,{children:[r.jsxs(o,{children:[r.jsx(l,{as:"b",fontSize:"xl",children:Z(E?"panel.details.multipleSelection.change":"header.settings.procedures.changeType.title")}),r.jsx(c,{})]}),r.jsx(d,{children:r.jsx(u,{allowMultiple:!0,children:Be.map((e=>r.jsxs(g,{children:[r.jsxs(p,{onClick:e.onClose,children:[r.jsx(h,{as:"span",flex:"1",textAlign:"left",children:r.jsx(l,{as:"b",fontSize:"md",children:e.title})}),r.jsx(y,{})]}),r.jsx(b,{pb:4,children:r.jsx(B,{fields:e.field,minW:270})})]},e.id)))})}),r.jsxs(f,{children:[r.jsx(m,{colorScheme:"blue",variant:"outline",mr:"1",onClick:v,children:Z("cancel")}),r.jsx(j,{label:Z("header.settings.pro"),isOpen:!ee.RMP_CLOUD,children:r.jsx(m,{colorScheme:"red",mr:"1",onClick:()=>{const e=null!=Y&&Y.includes("station")?[...G].filter((e=>e.startsWith("stn"))):E?[]:ne.current.filterNodes((e=>e.startsWith("stn"))),t=null!=Y&&Y.includes("misc-node")?[...G].filter((e=>e.startsWith("misc_node"))):E?[]:ne.current.filterNodes((e=>e.startsWith("misc_node"))),n=E?[...G].filter((e=>e.startsWith("line"))):ne.current.edges();Y&&!Y.includes("station")||!ue||((e,t,n,r)=>{r.filter((n=>"any"===t||e.getNodeAttribute(n,"type")===t)).forEach((t=>{K(e,t,n)}))})(ne.current,pe,ye,e),Y&&!Y.includes("line")||!fe||((e,t,n,r,s)=>{s.filter((n=>"any"===t||e.getEdgeAttribute(n,"style")===t)).forEach((t=>{X(e,t,n,r)}))})(ne.current,je,Oe,Q,n),Y&&!Y.includes("line")||!xe||((e,t,n,r,s)=>{r.filter((n=>"any"===t||e.getEdgeAttribute(n,"type")===t)).forEach((t=>{U(e,t,n,s)}))})(ne.current,Ce,Te,n,$),Ne&&(Y&&!Y.includes("line")||((e,t,n,r)=>{r.filter((t=>S.includes(e.getEdgeAttribute(t,"style")))).forEach((r=>{const s=e.getEdgeAttributes(r),i=s[s.style].color;("any"===t||i[0]==t[0]&&i[1]==t[1]&&i[2]==t[2]&&i[3]==t[3])&&e.mergeEdgeAttributes(r,{[s.style]:{color:n}})}))})(ne.current,"any"===we.id?"any":we.theme,Ie,n),(!Y||Y.includes("misc-node")||Y.includes("station"))&&((e,t,n,r,s)=>{[...r,...s].forEach((r=>{const s=e.getNodeAttributes(r).type,i=e.getNodeAttribute(r,s);if(void 0!==i.color){const e=i.color;("any"===t||e[0]==t[0]&&e[1]==t[1]&&e[2]==t[2]&&e[3]==t[3])&&(i.color=n)}e.mergeNodeAttributes(r,{[s]:i})}))})(ne.current,"any"===we.id?"any":we.theme,Ie,e,t)),oe&&((e,t,n,r,s)=>{[...t,...n].forEach((t=>{e.setNodeAttribute(t,"zIndex",s)})),r.forEach((t=>{e.setEdgeAttribute(t,"zIndex",s)}))})(ne.current,e,t,n,ce),te(),v()},isDisabled:!(ee.RMP_CLOUD&&(oe||ue||fe||xe||Ne)),children:Z("apply")})})]})]})]})}))}}}))}(); diff --git a/assets/clipboard-yBOl3IpM.js b/assets/clipboard-Bcs6EvZd.js similarity index 83% rename from assets/clipboard-yBOl3IpM.js rename to assets/clipboard-Bcs6EvZd.js index e15d41e2..963b3da5 100644 --- a/assets/clipboard-yBOl3IpM.js +++ b/assets/clipboard-Bcs6EvZd.js @@ -1 +1 @@ -import{b as g}from"./react-D-_si4LB.js";import{n as O,av as j}from"./index-BiHghyID.js";const I=typeof window<"u"?g.useInsertionEffect||g.useLayoutEffect:()=>{};function x(s){const r=g.useRef(S);I(()=>{r.current=s},[s]);const o=g.useRef(null);return o.current||(o.current=function(){return r.current.apply(this,arguments)}),o.current}function S(){throw new Error("INVALID_USEEVENT_INVOCATION: the callback from useEvent cannot be invoked before the component has mounted.")}const k=(s,r)=>{const o={},u={};let[l,E]=[0,0],d=0;r.forEach(c=>{if(s.hasNode(c)){const n=c,i=s.getNodeAttributes(n);o[n]=i,l+=i.x,E+=i.y,d++}else if(s.hasEdge(c)){const n=c,[i,h]=s.extremities(n);u[n]={attr:s.getEdgeAttributes(n),source:i,target:h}}});const b={app:"rmp",version:1,nodesWithAttrs:o,edgesWithAttrs:u,avgX:l/d,avgY:E/d};return JSON.stringify(b)},R=(s,r,o,u,l,E)=>{const{nodesWithAttrs:d,edgesWithAttrs:b,version:c}=JSON.parse(s);if(c!==1)throw Error("Unrecognized version: ".concat(c));const n={};Object.keys(d).filter(e=>r.hasNode(e)).forEach(e=>{const t=O(10);if(e.startsWith("stn_"))n[e]="stn_".concat(t);else if(e.startsWith("misc_node_"))n[e]="misc_node_".concat(t);else throw Error("Unrecognized node id: ".concat(e))}),Object.keys(b).filter(e=>r.hasEdge(e)).forEach(e=>n[e]="line_".concat(O(10)));const i=Object.entries(n).reduce((e,[t,a])=>e.replaceAll(t,a),s),{nodesWithAttrs:h,edgesWithAttrs:N,avgX:p,avgY:v}=JSON.parse(i),m=o?Object.fromEntries(Object.entries(h).filter(([e,t])=>t.type!==j.Master)):h,f=o?Object.fromEntries(Object.entries(N).filter(([e,{source:t,target:a}])=>t in m&&a in m)):N;if(u)for(const e in f)f[e].attr.parallelIndex>=0&&(f[e].attr.parallelIndex=-1);const[y,A]=[l-p,E-v];return Object.entries(m).forEach(([e,t])=>{t.x+=y,t.y+=A,r.addNode(e,t)}),Object.entries(f).forEach(([e,{attr:t,source:a,target:_}])=>r.addDirectedEdgeWithKey(e,a,_,t)),{nodes:new Set(Object.keys(m)),edges:new Set(Object.keys(f))}};export{k as e,R as i,x as u}; +import{b as g}from"./react-0YWW4C_I.js";import{n as O,aB as j}from"./index-CsgTWcmq.js";const I=typeof window<"u"?g.useInsertionEffect||g.useLayoutEffect:()=>{};function x(s){const r=g.useRef(S);I(()=>{r.current=s},[s]);const o=g.useRef(null);return o.current||(o.current=function(){return r.current.apply(this,arguments)}),o.current}function S(){throw new Error("INVALID_USEEVENT_INVOCATION: the callback from useEvent cannot be invoked before the component has mounted.")}const k=(s,r)=>{const o={},u={};let[l,E]=[0,0],d=0;r.forEach(c=>{if(s.hasNode(c)){const n=c,i=s.getNodeAttributes(n);o[n]=i,l+=i.x,E+=i.y,d++}else if(s.hasEdge(c)){const n=c,[i,h]=s.extremities(n);u[n]={attr:s.getEdgeAttributes(n),source:i,target:h}}});const b={app:"rmp",version:1,nodesWithAttrs:o,edgesWithAttrs:u,avgX:l/d,avgY:E/d};return JSON.stringify(b)},R=(s,r,o,u,l,E)=>{const{nodesWithAttrs:d,edgesWithAttrs:b,version:c}=JSON.parse(s);if(c!==1)throw Error("Unrecognized version: ".concat(c));const n={};Object.keys(d).filter(e=>r.hasNode(e)).forEach(e=>{const t=O(10);if(e.startsWith("stn_"))n[e]="stn_".concat(t);else if(e.startsWith("misc_node_"))n[e]="misc_node_".concat(t);else throw Error("Unrecognized node id: ".concat(e))}),Object.keys(b).filter(e=>r.hasEdge(e)).forEach(e=>n[e]="line_".concat(O(10)));const i=Object.entries(n).reduce((e,[t,a])=>e.replaceAll(t,a),s),{nodesWithAttrs:h,edgesWithAttrs:N,avgX:p,avgY:y}=JSON.parse(i),m=o?Object.fromEntries(Object.entries(h).filter(([e,t])=>t.type!==j.Master)):h,f=o?Object.fromEntries(Object.entries(N).filter(([e,{source:t,target:a}])=>t in m&&a in m)):N;if(u)for(const e in f)f[e].attr.parallelIndex>=0&&(f[e].attr.parallelIndex=-1);const[A,v]=[l-p,E-y];return Object.entries(m).forEach(([e,t])=>{t.x+=A,t.y+=v,r.addNode(e,t)}),Object.entries(f).forEach(([e,{attr:t,source:a,target:_}])=>r.addDirectedEdgeWithKey(e,a,_,t)),{nodes:new Set(Object.keys(m)),edges:new Set(Object.keys(f))}};export{k as e,R as i,x as u}; diff --git a/assets/clipboard-legacy-Dddlt6N0.js b/assets/clipboard-legacy-BTcL0Trl.js similarity index 90% rename from assets/clipboard-legacy-Dddlt6N0.js rename to assets/clipboard-legacy-BTcL0Trl.js index b675db30..0a241914 100644 --- a/assets/clipboard-legacy-Dddlt6N0.js +++ b/assets/clipboard-legacy-BTcL0Trl.js @@ -1 +1 @@ -System.register(["./react-legacy-S3BmMPiz.js","./index-legacy-CKg3D7KT.js"],(function(e,t){"use strict";var r,n,s;return{setters:[e=>{r=e.b},e=>{n=e.n,s=e.av}],execute:function(){e("u",(function(e){const n=r.useRef(o);t((()=>{n.current=e}),[e]);const s=r.useRef(null);return s.current||(s.current=function(){return n.current.apply(this,arguments)}),s.current}));const t="undefined"!=typeof window?r.useInsertionEffect||r.useLayoutEffect:()=>{};function o(){throw new Error("INVALID_USEEVENT_INVOCATION: the callback from useEvent cannot be invoked before the component has mounted.")}e("e",((e,t)=>{const r={},n={};let[s,o]=[0,0],c=0;t.forEach((t=>{if(e.hasNode(t)){const n=t,i=e.getNodeAttributes(n);r[n]=i,s+=i.x,o+=i.y,c++}else if(e.hasEdge(t)){const r=t,[s,o]=e.extremities(r);n[r]={attr:e.getEdgeAttributes(r),source:s,target:o}}}));const i={app:"rmp",version:1,nodesWithAttrs:r,edgesWithAttrs:n,avgX:s/c,avgY:o/c};return JSON.stringify(i)})),e("i",((e,t,r,o,c,i)=>{const{nodesWithAttrs:a,edgesWithAttrs:d,version:f}=JSON.parse(e);if(1!==f)throw Error(`Unrecognized version: ${f}`);const u={};Object.keys(a).filter((e=>t.hasNode(e))).forEach((e=>{const t=n(10);if(e.startsWith("stn_"))u[e]=`stn_${t}`;else{if(!e.startsWith("misc_node_"))throw Error(`Unrecognized node id: ${e}`);u[e]=`misc_node_${t}`}})),Object.keys(d).filter((e=>t.hasEdge(e))).forEach((e=>u[e]=`line_${n(10)}`));const h=Object.entries(u).reduce(((e,[t,r])=>e.replaceAll(t,r)),e),{nodesWithAttrs:l,edgesWithAttrs:g,avgX:E,avgY:b}=JSON.parse(h),O=r?Object.fromEntries(Object.entries(l).filter((([e,t])=>t.type!==s.Master))):l,y=r?Object.fromEntries(Object.entries(g).filter((([e,{source:t,target:r}])=>t in O&&r in O))):g;if(o)for(const n in y)y[n].attr.parallelIndex>=0&&(y[n].attr.parallelIndex=-1);const[j,p]=[c-E,i-b];return Object.entries(O).forEach((([e,r])=>{r.x+=j,r.y+=p,t.addNode(e,r)})),Object.entries(y).forEach((([e,{attr:r,source:n,target:s}])=>t.addDirectedEdgeWithKey(e,n,s,r))),{nodes:new Set(Object.keys(O)),edges:new Set(Object.keys(y))}}))}}})); +System.register(["./react-legacy-CczY7eHI.js","./index-legacy-CP4zwhgZ.js"],(function(e,t){"use strict";var r,n,s;return{setters:[e=>{r=e.b},e=>{n=e.n,s=e.aB}],execute:function(){e("u",(function(e){const n=r.useRef(o);t((()=>{n.current=e}),[e]);const s=r.useRef(null);return s.current||(s.current=function(){return n.current.apply(this,arguments)}),s.current}));const t="undefined"!=typeof window?r.useInsertionEffect||r.useLayoutEffect:()=>{};function o(){throw new Error("INVALID_USEEVENT_INVOCATION: the callback from useEvent cannot be invoked before the component has mounted.")}e("e",((e,t)=>{const r={},n={};let[s,o]=[0,0],c=0;t.forEach((t=>{if(e.hasNode(t)){const n=t,i=e.getNodeAttributes(n);r[n]=i,s+=i.x,o+=i.y,c++}else if(e.hasEdge(t)){const r=t,[s,o]=e.extremities(r);n[r]={attr:e.getEdgeAttributes(r),source:s,target:o}}}));const i={app:"rmp",version:1,nodesWithAttrs:r,edgesWithAttrs:n,avgX:s/c,avgY:o/c};return JSON.stringify(i)})),e("i",((e,t,r,o,c,i)=>{const{nodesWithAttrs:a,edgesWithAttrs:d,version:f}=JSON.parse(e);if(1!==f)throw Error(`Unrecognized version: ${f}`);const u={};Object.keys(a).filter((e=>t.hasNode(e))).forEach((e=>{const t=n(10);if(e.startsWith("stn_"))u[e]=`stn_${t}`;else{if(!e.startsWith("misc_node_"))throw Error(`Unrecognized node id: ${e}`);u[e]=`misc_node_${t}`}})),Object.keys(d).filter((e=>t.hasEdge(e))).forEach((e=>u[e]=`line_${n(10)}`));const h=Object.entries(u).reduce(((e,[t,r])=>e.replaceAll(t,r)),e),{nodesWithAttrs:l,edgesWithAttrs:g,avgX:E,avgY:b}=JSON.parse(h),O=r?Object.fromEntries(Object.entries(l).filter((([e,t])=>t.type!==s.Master))):l,y=r?Object.fromEntries(Object.entries(g).filter((([e,{source:t,target:r}])=>t in O&&r in O))):g;if(o)for(const n in y)y[n].attr.parallelIndex>=0&&(y[n].attr.parallelIndex=-1);const[j,p]=[c-E,i-b];return Object.entries(O).forEach((([e,r])=>{r.x+=j,r.y+=p,t.addNode(e,r)})),Object.entries(y).forEach((([e,{attr:r,source:n,target:s}])=>t.addDirectedEdgeWithKey(e,n,s,r))),{nodes:new Set(Object.keys(O)),edges:new Set(Object.keys(y))}}))}}})); diff --git a/assets/details-BjKL7_V5.js b/assets/details-BjKL7_V5.js new file mode 100644 index 00000000..626700f9 --- /dev/null +++ b/assets/details-BjKL7_V5.js @@ -0,0 +1 @@ +import{j as e,B as W,aj as O,ak as re,av as B,t as C,ax as le,x as oe,D as ce,G as K,M as Z,H as Q,J as Y,L as ee,O as te,N as F}from"./chakra-BF_mGyXb.js";import{c as L,d as A,aE as de,T as ue,aF as pe,ay as he,t as E,v as w,o as I,au as z,k as ne,l as ge,P as H,aG as U,q as v,S as me,$ as fe,a0 as xe,i as G,m as se,y as D,az as X,aD as ye,aH as be,aI as Se,aJ as je,aK as we,aB as Ae,n as $}from"./index-CsgTWcmq.js";import{u as P,b as d}from"./react-0YWW4C_I.js";import{u as J,e as Ne}from"./clipboard-Bcs6EvZd.js";import{s as V}from"./master-manager-DW7JCfNm.js";import{C as Ce,c as Ee,a as Te,b as ve}from"./change-type-modal-Cu7YVLn7.js";import{LearnHowToAdd as Le}from"./tools-D91kC9Kf.js";import{m as Pe}from"./misc-nodes-DWMfnp13.js";function Re(){const{t:n}=P(),r=L(),{selected:o}=A(s=>s.runtime),p=d.useRef(window.graph),u=s=>{if(p.current.hasNode(s)){const l=p.current.getNodeAttributes(s),m=l.type;return s.startsWith("stn")?l[m].names.join("/"):m}else if(p.current.hasEdge(s)){const[l,m]=p.current.extremities(s),c=p.current.getSourceAttributes(s),f=p.current.getTargetAttributes(s),S=c.type,g=f.type;return(l.startsWith("stn")?c[S].names[0]:S)+" - "+(m.startsWith("stn")?f[g].names[0]:g)}},[a,t]=d.useState([]);d.useEffect(()=>{t(["station","misc-node","line"])},[o]);const[i,b]=d.useState(!1);return e.jsxs(W,{children:[e.jsxs(O,{as:"h5",size:"sm",children:[n("panel.details.multipleSelection.selected")," ",o.size]}),e.jsxs(re,{m:"var(--chakra-space-1)",children:[e.jsxs(B,{w:"100%",children:[e.jsx(O,{as:"h5",size:"xs",w:"100%",children:n("panel.details.multipleSelection.show")}),e.jsx(de,{selections:[{label:n("panel.details.multipleSelection.station"),value:"station"},{label:n("panel.details.multipleSelection.miscNode"),value:"misc-node"},{label:n("panel.details.multipleSelection.edge"),value:"line"}],defaultValue:a,multiSelect:!0,onChange:s=>t(s)})]}),a.length!==0&&e.jsxs(e.Fragment,{children:[e.jsxs(C,{width:"100%",size:"sm",onClick:()=>b(!0),children:[n("panel.details.multipleSelection.change"),e.jsx(le,{label:n("header.settings.pro"),children:e.jsx(oe,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",children:"PRO"})})]}),e.jsx(ce,{})]}),[...o].filter(s=>a.includes("station")||!s.startsWith("stn")).filter(s=>a.includes("misc-node")||!s.startsWith("misc")).filter(s=>a.includes("line")||!s.startsWith("line")).map(s=>{var l;return e.jsxs(B,{width:"100%",children:[e.jsx(C,{width:"100%",size:"sm",variant:"solid",onClick:()=>r(ue(new Set([s]))),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"ruby",children:(l=u(s))==null?void 0:l.replaceAll("\n","⏎")}),e.jsx(C,{size:"sm",onClick:()=>r(he(s)),children:e.jsx(pe,{})})]},s)})]}),e.jsx(Ce,{isOpen:i,onClose:()=>b(!1),isSelect:!0,filter:a})]})}function ke(){const{t:n}=P(),r=L(),o=d.useCallback(()=>{r(E()),r(w(i.current.export()))},[r,E,w]),{preference:{autoParallel:p}}=A(j=>j.app),{selected:u,theme:a}=A(j=>j.runtime),[t]=u,i=d.useRef(window.graph),[b,s]=d.useState(!1),l=d.useRef(null),m=Object.fromEntries(Object.entries(I).map(([j,_])=>[j,n(_.metadata.displayName).toString()])),[c,f]=d.useState(i.current.getEdgeAttribute(t,"type")),[S,g]=d.useState(void 0),h=Object.fromEntries(Object.entries(z).map(([j,_])=>[j,n(_.metadata.displayName).toString()])),[x,y]=d.useState(i.current.getEdgeAttribute(t,"style")),[N,T]=d.useState(void 0);d.useEffect(()=>{f(i.current.getEdgeAttribute(t,"type")),y(i.current.getEdgeAttribute(t,"style"))},[t]);const R=Object.values(ne).filter(j=>!z[x].metadata.supportLinePathType.includes(j)),k=Object.values(ge).filter(j=>!z[j].metadata.supportLinePathType.includes(c)),ae=()=>{S&&(Ee(i.current,t,S,p),f(i.current.getEdgeAttribute(t,"type")),o())},ie=()=>{N&&(Te(i.current,t,N,a),y(i.current.getEdgeAttribute(t,"style")),o())},M=j=>{j&&(S?(ae(),g(void 0)):N&&(ie(),T(void 0))),s(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(H,{label:n("panel.details.info.linePathType"),minW:"276",children:e.jsx(U,{options:m,disabledOptions:R,defaultValue:c,value:c,onChange:({target:{value:j}})=>{g(j),s(!0)}})}),e.jsx(H,{label:n("panel.details.info.lineStyleType"),minW:"276",children:e.jsx(U,{options:h,disabledOptions:k,defaultValue:x,value:x,onChange:({target:{value:j}})=>{T(j),s(!0)}})}),e.jsx(Le,{type:"line",expand:!0}),e.jsx(K,{isOpen:b,leastDestructiveRef:l,onClose:()=>M(!1),children:e.jsx(Z,{children:e.jsxs(Q,{children:[e.jsx(Y,{children:n("warning")}),e.jsx(ee,{children:n("panel.details.changeLineTypeContent")}),e.jsxs(te,{children:[e.jsx(C,{ref:l,onClick:()=>M(!1),children:n("cancel")}),e.jsx(C,{ml:"2",colorScheme:"red",onClick:()=>M(!0),children:n("panel.details.changeType")})]})]})})})]})}function ze(){const{t:n}=P(),r=L(),o=d.useCallback(()=>{r(v()),r(w(t.current.export()))},[r,v,w]),{selected:p,refresh:{nodes:u}}=A(x=>x.runtime),[a]=p,t=d.useRef(window.graph),[i,b]=d.useState(!1),s=d.useRef(null),[l,m]=d.useState(void 0),[c,f]=d.useState(me.ShmetroBasic);d.useEffect(()=>{if(a!=null&&a.startsWith("stn")){const x=t.current.getNodeAttribute(a,"type");f(x)}},[u,p]);const S=Object.fromEntries(Object.entries(V).map(([x,y])=>[x,n(y.metadata.displayName).toString()])),g=()=>{l&&(ve(t.current,a,l),o())},h=x=>{x&&g(),m(void 0),b(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(H,{label:n("panel.details.info.stationType"),minW:"276",children:e.jsx(U,{options:S,disabledOptions:[c],value:c,onChange:({target:{value:x}})=>{m(x),b(!0)}})}),e.jsx(K,{isOpen:i,leastDestructiveRef:s,onClose:()=>h(!1),children:e.jsx(Z,{children:e.jsxs(Q,{children:[e.jsx(Y,{children:n("warning")}),e.jsx(ee,{children:n("panel.details.changeStationTypeContent")}),e.jsxs(te,{children:[e.jsx(C,{ref:s,onClick:()=>h(!1),children:n("cancel")}),e.jsx(C,{ml:"2",colorScheme:"red",onClick:()=>h(!0),children:n("panel.details.changeType")})]})]})})})]})}function Oe(){const{t:n}=P(),r=L(),o=d.useCallback(()=>{r(v()),r(E()),r(w(i.current.export()))},[r,v,E,w]),{activeSubscriptions:p}=A(c=>c.account),{selected:u,parallelLinesCount:a}=A(c=>c.runtime),[t]=u,i=d.useRef(window.graph),b=c=>{const f=Math.min(Math.max(c,-10),10);i.current.hasNode(t)&&i.current.setNodeAttribute(t,"zIndex",f),i.current.hasEdge(t)&&i.current.setEdgeAttribute(t,"zIndex",f),o()},s=(c,f)=>{let S=-1;if(c){const g=i.current.getEdgeAttributes(t),[h,x]=i.current.extremities(t);S=se(i.current,g.type,h,x,f)}l(S)},l=c=>{i.current.setEdgeAttribute(t,"parallelIndex",c),r(E()),r(w(i.current.export()))},m=[];if(u.size!==0)if(u.size===1){if(m.push({type:"input",label:n("panel.details.info.id"),value:t,minW:276}),m.push({type:"select",label:n("panel.details.info.zIndex"),value:t?i.current.hasNode(t)?i.current.getNodeAttribute(t,"zIndex"):i.current.hasEdge(t)?i.current.getEdgeAttribute(t,"zIndex"):0:0,options:Object.fromEntries(Array.from({length:21},(c,f)=>[f-10,(f-10).toString()])),onChange:c=>b(Number(c))}),i.current.hasEdge(t)){const c=i.current.getEdgeAttributes(t),{parallelIndex:f,type:S}=c,g=p.RMP_CLOUD?fe:xe,h=a>g&&f<0||S===ne.Simple,x=a>g&&f>=0;m.push({type:"switch",label:n("panel.details.info.parallel"),isDisabled:h,isChecked:f>=0,onChange:y=>s(y,c[c.type].startFrom),oneLine:!0,minW:276}),f>=0&&m.push({type:"input",label:n("panel.details.info.parallelIndex"),variant:"number",isDisabled:x,value:c.parallelIndex.toString(),onChange:y=>l(Number(y)),minW:276})}}else u.size>1&&m.push({type:"input",label:n("panel.details.info.type"),value:n("panel.details.multipleSelection.title"),minW:276});return e.jsxs(W,{p:1,children:[e.jsx(O,{as:"h5",size:"sm",children:n("panel.details.info.title")}),e.jsx(G,{fields:m,minW:130}),u.size===1&&t.startsWith("stn")&&i.current.hasNode(t)&&i.current.getNodeAttribute(t,"type")in V&&e.jsx(ze,{}),u.size===1&&t.startsWith("line")&&i.current.hasEdge(t)&&i.current.getEdgeAttribute(t,"type")in I&&i.current.getEdgeAttribute(t,"style")in z&&e.jsx(ke,{}),u.size>1&&e.jsx(Re,{})]})}function We(){const{t:n}=P(),r=L(),{selected:o}=A(h=>h.runtime),[p]=o,u=d.useRef(window.graph),[a,t]=d.useState("undefined"),[i,b]=d.useState("undefined"),[s,l]=d.useState("undefined"),[m,c]=d.useState("undefined");d.useEffect(()=>{var h,x,y,N;if(p!=null&&p.startsWith("line")){const[T,R]=u.current.extremities(p);if(t(T),b(R),T.startsWith("stn")){const k=u.current.getNodeAttribute(T,"type");l((x=(h=u.current.getNodeAttribute(T,k))==null?void 0:h.names.at(0))!=null?x:"undefined")}if(R.startsWith("stn")){const k=u.current.getNodeAttribute(R,"type");c((N=(y=u.current.getNodeAttribute(R,k))==null?void 0:y.names.at(0))!=null?N:"undefined")}}},[o]);const f=J(()=>{r(D()),r(X(a))}),S=J(()=>{r(D()),r(X(i))}),g=[{type:"custom",label:n("panel.details.lineExtremities.source"),component:e.jsx(C,{ml:"auto",size:"sm",variant:"link",onClick:f,children:a}),oneLine:!0,minW:"full"},{type:"input",label:n("panel.details.lineExtremities.sourceName"),value:s,minW:"full"},{type:"custom",label:n("panel.details.lineExtremities.target"),component:e.jsx(C,{ml:"auto",size:"sm",variant:"link",onClick:S,children:i}),oneLine:!0,minW:"full"},{type:"input",label:n("panel.details.lineExtremities.targetName"),value:m,minW:"full"}];return e.jsxs(W,{p:1,children:[e.jsx(O,{as:"h5",size:"sm",children:n("panel.details.lineExtremities.title")}),e.jsx(G,{fields:g,minW:130})]})}function Ie(){const{t:n}=P(),r=L(),o=d.useCallback(()=>{r(v()),r(E()),r(w(t.current.export()))},[r,v,E,w]),{selected:p,refresh:{nodes:u}}=A(l=>l.runtime),[a]=p,t=d.useRef(window.graph),[i,b]=d.useState({x:0,y:0});d.useEffect(()=>{if(a!=null&&a.startsWith("stn")||a!=null&&a.startsWith("misc_node_")){const l=t.current.getNodeAttribute(a,"x"),m=t.current.getNodeAttribute(a,"y");b({x:l,y:m})}},[u,p]);const s=[{type:"input",label:n("panel.details.nodePosition.pos.x"),value:i.x.toString(),validator:l=>!Number.isNaN(l),onChange:l=>{t.current.mergeNodeAttributes(a,{x:Number(l)}),o()}},{type:"input",label:n("panel.details.nodePosition.pos.y"),value:i.y.toString(),validator:l=>!Number.isNaN(l),onChange:l=>{t.current.mergeNodeAttributes(a,{y:Number(l)}),o()}}];return e.jsxs(W,{p:1,children:[e.jsx(O,{as:"h5",size:"sm",children:n("panel.details.nodePosition.title")}),e.jsx(G,{fields:s,minW:130})]})}const q={...V,...Pe},De=()=>{var b;const n=L(),{selected:r}=A(s=>s.runtime),{t:o}=P(),[p]=r,u=window.graph.getNodeAttribute(p,"type"),a=u in q&&q[u].attrsComponent,t=(b=window.graph.getNodeAttribute(p,u))!=null?b:{},i=(s,l)=>{const m=window.graph.getNodeAttribute(s,"type");window.graph.mergeNodeAttributes(s,{[m]:l}),n(v()),n(w(window.graph.export()))};return a?e.jsx(a,{id:p,attrs:t,handleAttrsUpdate:i}):e.jsx(F,{fontSize:"xs",m:"var(--chakra-space-1)",children:o("panel.details.unknown.error",{category:o("panel.details.unknown.node")})})},Me=()=>{var h,x;const n=L(),{preference:{autoParallel:r}}=A(y=>y.app),{selected:o}=A(y=>y.runtime),{t:p}=P(),[u]=o,{type:a,style:t,parallelIndex:i,reconcileId:b}=window.graph.getEdgeAttributes(u),s=(h=window.graph.getEdgeAttribute(u,a))!=null?h:{},l=a in I&&I[a].attrsComponent,m=(x=window.graph.getEdgeAttribute(u,t))!=null?x:{},c=t in z&&z[t].attrsComponent,f=(y,N)=>{let T=-1;if(r){const[R,k]=window.graph.extremities(y);T=se(window.graph,a,R,k,N)}window.graph.setEdgeAttribute(y,"parallelIndex",T)},S=(y,N)=>{window.graph.mergeEdgeAttributes(y,{[a]:N}),n(E()),n(w(window.graph.export()))},g=(y,N)=>{window.graph.mergeEdgeAttributes(y,{[t]:N}),n(E()),n(w(window.graph.export()))};return e.jsxs(e.Fragment,{children:[l?e.jsx(l,{id:u,attrs:s,recalculateParallelIndex:f,handleAttrsUpdate:S,parallelIndex:i}):e.jsx(F,{fontSize:"xs",m:"var(--chakra-space-1)",children:p("panel.details.unknown.error",{category:p("panel.details.unknown.linePath")})}),c?e.jsx(c,{id:u,attrs:m,handleAttrsUpdate:g,reconcileId:b}):e.jsx(F,{fontSize:"xs",m:"var(--chakra-space-1)",children:p("panel.details.unknown.error",{category:p("panel.details.unknown.lineStyle")})})]})},$e=()=>{const{t:n}=P(),r=L(),o=d.useRef(window.graph),p=d.useCallback(()=>{r(v()),r(E()),r(w(o.current.export()))},[r,v,E,w]),{activeSubscriptions:u}=A(g=>g.account),{selected:a,mode:t,active:i,masterNodesCount:b}=A(g=>g.runtime),[s]=a,l=!u.RMP_CLOUD&&b+1>ye,m=()=>r(D()),c=g=>{const h=structuredClone(o.current.getNodeAttributes(g));h.x+=50,h.y+=50;const x=g.startsWith("stn")?"stn_".concat($(10)):"misc_node_".concat($(10));o.current.addNode(x,h),r(v()),r(w(o.current.export()))},f=g=>{const h=Ne(o.current,g);navigator.clipboard.writeText(h)},S=g=>{r(D()),g.forEach(h=>{o.current.hasNode(h)?o.current.dropNode(h):o.current.hasEdge(h)&&o.current.dropEdge(h)}),p()};return e.jsxs(be,{isOpen:a.size>0&&!t.startsWith("line")&&!i,width:300,header:"Dummy header",alwaysOverlay:!0,children:[e.jsx(Se,{onClose:m,children:n("panel.details.header")}),e.jsxs(je,{children:[e.jsx(Oe,{}),a.size===1&&o.current.hasNode(s)&&e.jsx(Ie,{}),a.size===1&&o.current.hasEdge(s)&&e.jsx(We,{}),a.size===1&&e.jsxs(W,{p:1,children:[e.jsx(O,{as:"h5",size:"sm",children:n("panel.details.specificAttrsTitle")}),window.graph.hasNode(s)&&e.jsx(De,{}),window.graph.hasEdge(s)&&e.jsx(Me,{})]})]}),e.jsx(we,{children:e.jsxs(B,{children:[a.size===1&&o.current.hasNode(s)&&e.jsx(C,{size:"sm",variant:"outline",onClick:()=>c(s),isDisabled:o.current.getNodeAttributes(s).type===Ae.Master&&l,children:n("panel.details.footer.duplicate")}),e.jsx(C,{size:"sm",variant:"outline",onClick:()=>f(a),children:n("panel.details.footer.copy")}),e.jsx(C,{size:"sm",variant:"outline",onClick:()=>S(a),children:n("panel.details.footer.remove")})]})})]})};export{$e as default}; diff --git a/assets/details-Dqiw1DIF.js b/assets/details-Dqiw1DIF.js deleted file mode 100644 index cc2c9159..00000000 --- a/assets/details-Dqiw1DIF.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e,B as W,aw as O,ax as re,aK as B,O as N,aM as le,U as oe,D as ce,_ as J,$ as Z,a0 as Q,a1 as Y,a3 as ee,a5 as te,a4 as F}from"./chakra-xNcrfRXW.js";import{c as P,d as A,aE as de,T as ue,az as pe,aF as he,t as E,v as w,l as I,au as z,k as ne,o as ge,P as U,aG as H,q as v,S as me,$ as fe,a0 as xe,i as V,m as se,y as D,aA as G,aD as ye,aH as be,aI as Se,aJ as je,aK as we,av as Ae,n as X}from"./index-BiHghyID.js";import{u as L,b as d}from"./react-D-_si4LB.js";import{u as K,e as Ce}from"./clipboard-yBOl3IpM.js";import{s as $}from"./master-manager-BoebmmSV.js";import{C as Ne,c as Ee,a as Te,b as ve}from"./change-type-modal-BN8Wot4j.js";import{LearnHowToAdd as Pe}from"./tools-DZ01x_ln.js";import{m as Le}from"./misc-nodes-3nt-Fm8T.js";function Re(){const{t:n}=L(),r=P(),{selected:o}=A(s=>s.runtime),p=d.useRef(window.graph),u=s=>{if(p.current.hasNode(s)){const l=p.current.getNodeAttributes(s),m=l.type;return s.startsWith("stn")?l[m].names.join("/"):m}else if(p.current.hasEdge(s)){const[l,m]=p.current.extremities(s),c=p.current.getSourceAttributes(s),f=p.current.getTargetAttributes(s),S=c.type,g=f.type;return(l.startsWith("stn")?c[S].names[0]:S)+" - "+(m.startsWith("stn")?f[g].names[0]:g)}},[a,t]=d.useState([]);d.useEffect(()=>{t(["station","misc-node","line"])},[o]);const[i,b]=d.useState(!1);return e.jsxs(W,{children:[e.jsxs(O,{as:"h5",size:"sm",children:[n("panel.details.multipleSelection.selected")," ",o.size]}),e.jsxs(re,{m:"var(--chakra-space-1)",children:[e.jsxs(B,{w:"100%",children:[e.jsx(O,{as:"h5",size:"xs",w:"100%",children:n("panel.details.multipleSelection.show")}),e.jsx(de,{selections:[{label:n("panel.details.multipleSelection.station"),value:"station"},{label:n("panel.details.multipleSelection.miscNode"),value:"misc-node"},{label:n("panel.details.multipleSelection.edge"),value:"line"}],defaultValue:a,multiSelect:!0,onChange:s=>t(s)})]}),a.length!==0&&e.jsxs(e.Fragment,{children:[e.jsxs(N,{width:"100%",size:"sm",onClick:()=>b(!0),children:[n("panel.details.multipleSelection.change"),e.jsx(le,{label:n("header.settings.pro"),children:e.jsx(oe,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",children:"PRO"})})]}),e.jsx(ce,{})]}),[...o].filter(s=>a.includes("station")||!s.startsWith("stn")).filter(s=>a.includes("misc-node")||!s.startsWith("misc")).filter(s=>a.includes("line")||!s.startsWith("line")).map(s=>{var l;return e.jsxs(B,{width:"100%",children:[e.jsx(N,{width:"100%",size:"sm",variant:"solid",onClick:()=>r(ue(new Set([s]))),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"ruby",children:(l=u(s))==null?void 0:l.replaceAll("\n","⏎")}),e.jsx(N,{size:"sm",onClick:()=>r(pe(s)),children:e.jsx(he,{})})]},s)})]}),e.jsx(Ne,{isOpen:i,onClose:()=>b(!1),isSelect:!0,filter:a})]})}function ke(){const{t:n}=L(),r=P(),o=d.useCallback(()=>{r(E()),r(w(i.current.export()))},[r,E,w]),{preference:{autoParallel:p}}=A(j=>j.app),{selected:u,theme:a}=A(j=>j.runtime),[t]=u,i=d.useRef(window.graph),[b,s]=d.useState(!1),l=d.useRef(null),m=Object.fromEntries(Object.entries(I).map(([j,_])=>[j,n(_.metadata.displayName).toString()])),[c,f]=d.useState(i.current.getEdgeAttribute(t,"type")),[S,g]=d.useState(void 0),h=Object.fromEntries(Object.entries(z).map(([j,_])=>[j,n(_.metadata.displayName).toString()])),[x,y]=d.useState(i.current.getEdgeAttribute(t,"style")),[C,T]=d.useState(void 0);d.useEffect(()=>{f(i.current.getEdgeAttribute(t,"type")),y(i.current.getEdgeAttribute(t,"style"))},[t]);const R=Object.values(ne).filter(j=>!z[x].metadata.supportLinePathType.includes(j)),k=Object.values(ge).filter(j=>!z[j].metadata.supportLinePathType.includes(c)),ae=()=>{S&&(Ee(i.current,t,S,p),f(i.current.getEdgeAttribute(t,"type")),o())},ie=()=>{C&&(Te(i.current,t,C,a),y(i.current.getEdgeAttribute(t,"style")),o())},M=j=>{j&&(S?(ae(),g(void 0)):C&&(ie(),T(void 0))),s(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(U,{label:n("panel.details.info.linePathType"),minW:"276",children:e.jsx(H,{options:m,disabledOptions:R,defaultValue:c,value:c,onChange:({target:{value:j}})=>{g(j),s(!0)}})}),e.jsx(U,{label:n("panel.details.info.lineStyleType"),minW:"276",children:e.jsx(H,{options:h,disabledOptions:k,defaultValue:x,value:x,onChange:({target:{value:j}})=>{T(j),s(!0)}})}),e.jsx(Pe,{type:"line",expand:!0}),e.jsx(J,{isOpen:b,leastDestructiveRef:l,onClose:()=>M(!1),children:e.jsx(Z,{children:e.jsxs(Q,{children:[e.jsx(Y,{children:n("warning")}),e.jsx(ee,{children:n("panel.details.changeLineTypeContent")}),e.jsxs(te,{children:[e.jsx(N,{ref:l,onClick:()=>M(!1),children:n("cancel")}),e.jsx(N,{ml:"2",colorScheme:"red",onClick:()=>M(!0),children:n("panel.details.changeType")})]})]})})})]})}function ze(){const{t:n}=L(),r=P(),o=d.useCallback(()=>{r(v()),r(w(t.current.export()))},[r,v,w]),{selected:p,refresh:{nodes:u}}=A(x=>x.runtime),[a]=p,t=d.useRef(window.graph),[i,b]=d.useState(!1),s=d.useRef(null),[l,m]=d.useState(void 0),[c,f]=d.useState(me.ShmetroBasic);d.useEffect(()=>{if(a!=null&&a.startsWith("stn")){const x=t.current.getNodeAttribute(a,"type");f(x)}},[u,p]);const S=Object.fromEntries(Object.entries($).map(([x,y])=>[x,n(y.metadata.displayName).toString()])),g=()=>{l&&(ve(t.current,a,l),o())},h=x=>{x&&g(),m(void 0),b(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(U,{label:n("panel.details.info.stationType"),minW:"276",children:e.jsx(H,{options:S,disabledOptions:[c],value:c,onChange:({target:{value:x}})=>{m(x),b(!0)}})}),e.jsx(J,{isOpen:i,leastDestructiveRef:s,onClose:()=>h(!1),children:e.jsx(Z,{children:e.jsxs(Q,{children:[e.jsx(Y,{children:n("warning")}),e.jsx(ee,{children:n("panel.details.changeStationTypeContent")}),e.jsxs(te,{children:[e.jsx(N,{ref:s,onClick:()=>h(!1),children:n("cancel")}),e.jsx(N,{ml:"2",colorScheme:"red",onClick:()=>h(!0),children:n("panel.details.changeType")})]})]})})})]})}function Oe(){const{t:n}=L(),r=P(),o=d.useCallback(()=>{r(v()),r(E()),r(w(i.current.export()))},[r,v,E,w]),{activeSubscriptions:p}=A(c=>c.account),{selected:u,parallelLinesCount:a}=A(c=>c.runtime),[t]=u,i=d.useRef(window.graph),b=c=>{const f=Math.min(Math.max(c,-10),10);i.current.hasNode(t)&&i.current.setNodeAttribute(t,"zIndex",f),i.current.hasEdge(t)&&i.current.setEdgeAttribute(t,"zIndex",f),o()},s=(c,f)=>{let S=-1;if(c){const g=i.current.getEdgeAttributes(t),[h,x]=i.current.extremities(t);S=se(i.current,g.type,h,x,f)}l(S)},l=c=>{i.current.setEdgeAttribute(t,"parallelIndex",c),r(E()),r(w(i.current.export()))},m=[];if(u.size!==0)if(u.size===1){if(m.push({type:"input",label:n("panel.details.info.id"),value:t,minW:276}),m.push({type:"select",label:n("panel.details.info.zIndex"),value:t?i.current.hasNode(t)?i.current.getNodeAttribute(t,"zIndex"):i.current.hasEdge(t)?i.current.getEdgeAttribute(t,"zIndex"):0:0,options:Object.fromEntries(Array.from({length:21},(c,f)=>[f-10,(f-10).toString()])),onChange:c=>b(Number(c))}),i.current.hasEdge(t)){const c=i.current.getEdgeAttributes(t),{parallelIndex:f,type:S}=c,g=p.RMP_CLOUD?fe:xe,h=a>g&&f<0||S===ne.Simple,x=a>g&&f>=0;m.push({type:"switch",label:n("panel.details.info.parallel"),isDisabled:h,isChecked:f>=0,onChange:y=>s(y,c[c.type].startFrom),oneLine:!0,minW:276}),f>=0&&m.push({type:"input",label:n("panel.details.info.parallelIndex"),variant:"number",isDisabled:x,value:c.parallelIndex.toString(),onChange:y=>l(Number(y)),minW:276})}}else u.size>1&&m.push({type:"input",label:n("panel.details.info.type"),value:n("panel.details.multipleSelection.title"),minW:276});return e.jsxs(W,{p:1,children:[e.jsx(O,{as:"h5",size:"sm",children:n("panel.details.info.title")}),e.jsx(V,{fields:m,minW:130}),u.size===1&&t.startsWith("stn")&&i.current.hasNode(t)&&i.current.getNodeAttribute(t,"type")in $&&e.jsx(ze,{}),u.size===1&&t.startsWith("line")&&i.current.hasEdge(t)&&i.current.getEdgeAttribute(t,"type")in I&&i.current.getEdgeAttribute(t,"style")in z&&e.jsx(ke,{}),u.size>1&&e.jsx(Re,{})]})}function We(){const{t:n}=L(),r=P(),{selected:o}=A(h=>h.runtime),[p]=o,u=d.useRef(window.graph),[a,t]=d.useState("undefined"),[i,b]=d.useState("undefined"),[s,l]=d.useState("undefined"),[m,c]=d.useState("undefined");d.useEffect(()=>{var h,x,y,C;if(p!=null&&p.startsWith("line")){const[T,R]=u.current.extremities(p);if(t(T),b(R),T.startsWith("stn")){const k=u.current.getNodeAttribute(T,"type");l((x=(h=u.current.getNodeAttribute(T,k))==null?void 0:h.names.at(0))!=null?x:"undefined")}if(R.startsWith("stn")){const k=u.current.getNodeAttribute(R,"type");c((C=(y=u.current.getNodeAttribute(R,k))==null?void 0:y.names.at(0))!=null?C:"undefined")}}},[o]);const f=K(()=>{r(D()),r(G(a))}),S=K(()=>{r(D()),r(G(i))}),g=[{type:"custom",label:n("panel.details.lineExtremities.source"),component:e.jsx(N,{ml:"auto",size:"sm",variant:"link",onClick:f,children:a}),oneLine:!0,minW:"full"},{type:"input",label:n("panel.details.lineExtremities.sourceName"),value:s,minW:"full"},{type:"custom",label:n("panel.details.lineExtremities.target"),component:e.jsx(N,{ml:"auto",size:"sm",variant:"link",onClick:S,children:i}),oneLine:!0,minW:"full"},{type:"input",label:n("panel.details.lineExtremities.targetName"),value:m,minW:"full"}];return e.jsxs(W,{p:1,children:[e.jsx(O,{as:"h5",size:"sm",children:n("panel.details.lineExtremities.title")}),e.jsx(V,{fields:g,minW:130})]})}function Ie(){const{t:n}=L(),r=P(),o=d.useCallback(()=>{r(v()),r(E()),r(w(t.current.export()))},[r,v,E,w]),{selected:p,refresh:{nodes:u}}=A(l=>l.runtime),[a]=p,t=d.useRef(window.graph),[i,b]=d.useState({x:0,y:0});d.useEffect(()=>{if(a!=null&&a.startsWith("stn")||a!=null&&a.startsWith("misc_node_")){const l=t.current.getNodeAttribute(a,"x"),m=t.current.getNodeAttribute(a,"y");b({x:l,y:m})}},[u,p]);const s=[{type:"input",label:n("panel.details.nodePosition.pos.x"),value:i.x.toString(),validator:l=>!Number.isNaN(l),onChange:l=>{t.current.mergeNodeAttributes(a,{x:Number(l)}),o()}},{type:"input",label:n("panel.details.nodePosition.pos.y"),value:i.y.toString(),validator:l=>!Number.isNaN(l),onChange:l=>{t.current.mergeNodeAttributes(a,{y:Number(l)}),o()}}];return e.jsxs(W,{p:1,children:[e.jsx(O,{as:"h5",size:"sm",children:n("panel.details.nodePosition.title")}),e.jsx(V,{fields:s,minW:130})]})}const q={...$,...Le},De=()=>{var b;const n=P(),{selected:r}=A(s=>s.runtime),{t:o}=L(),[p]=r,u=window.graph.getNodeAttribute(p,"type"),a=u in q&&q[u].attrsComponent,t=(b=window.graph.getNodeAttribute(p,u))!=null?b:{},i=(s,l)=>{const m=window.graph.getNodeAttribute(s,"type");window.graph.mergeNodeAttributes(s,{[m]:l}),n(v()),n(w(window.graph.export()))};return a?e.jsx(a,{id:p,attrs:t,handleAttrsUpdate:i}):e.jsx(F,{fontSize:"xs",m:"var(--chakra-space-1)",children:o("panel.details.unknown.error",{category:o("panel.details.unknown.node")})})},Me=()=>{var h,x;const n=P(),{preference:{autoParallel:r}}=A(y=>y.app),{selected:o}=A(y=>y.runtime),{t:p}=L(),[u]=o,{type:a,style:t,parallelIndex:i,reconcileId:b}=window.graph.getEdgeAttributes(u),s=(h=window.graph.getEdgeAttribute(u,a))!=null?h:{},l=a in I&&I[a].attrsComponent,m=(x=window.graph.getEdgeAttribute(u,t))!=null?x:{},c=t in z&&z[t].attrsComponent,f=(y,C)=>{let T=-1;if(r){const[R,k]=window.graph.extremities(y);T=se(window.graph,a,R,k,C)}window.graph.setEdgeAttribute(y,"parallelIndex",T)},S=(y,C)=>{window.graph.mergeEdgeAttributes(y,{[a]:C}),n(E()),n(w(window.graph.export()))},g=(y,C)=>{window.graph.mergeEdgeAttributes(y,{[t]:C}),n(E()),n(w(window.graph.export()))};return e.jsxs(e.Fragment,{children:[l?e.jsx(l,{id:u,attrs:s,recalculateParallelIndex:f,handleAttrsUpdate:S,parallelIndex:i}):e.jsx(F,{fontSize:"xs",m:"var(--chakra-space-1)",children:p("panel.details.unknown.error",{category:p("panel.details.unknown.linePath")})}),c?e.jsx(c,{id:u,attrs:m,handleAttrsUpdate:g,reconcileId:b}):e.jsx(F,{fontSize:"xs",m:"var(--chakra-space-1)",children:p("panel.details.unknown.error",{category:p("panel.details.unknown.lineStyle")})})]})},Xe=()=>{const{t:n}=L(),r=P(),o=d.useRef(window.graph),p=d.useCallback(()=>{r(v()),r(E()),r(w(o.current.export()))},[r,v,E,w]),{activeSubscriptions:u}=A(g=>g.account),{selected:a,mode:t,active:i,masterNodesCount:b}=A(g=>g.runtime),[s]=a,l=!u.RMP_CLOUD&&b+1>ye,m=()=>r(D()),c=g=>{const h=structuredClone(o.current.getNodeAttributes(g));h.x+=50,h.y+=50;const x=g.startsWith("stn")?"stn_".concat(X(10)):"misc_node_".concat(X(10));o.current.addNode(x,h),r(v()),r(w(o.current.export()))},f=g=>{const h=Ce(o.current,g);navigator.clipboard.writeText(h)},S=g=>{r(D()),g.forEach(h=>{o.current.hasNode(h)?o.current.dropNode(h):o.current.hasEdge(h)&&o.current.dropEdge(h)}),p()};return e.jsxs(be,{isOpen:a.size>0&&!t.startsWith("line")&&!i,width:300,header:"Dummy header",alwaysOverlay:!0,children:[e.jsx(Se,{onClose:m,children:n("panel.details.header")}),e.jsxs(je,{children:[e.jsx(Oe,{}),a.size===1&&o.current.hasNode(s)&&e.jsx(Ie,{}),a.size===1&&o.current.hasEdge(s)&&e.jsx(We,{}),a.size===1&&e.jsxs(W,{p:1,children:[e.jsx(O,{as:"h5",size:"sm",children:n("panel.details.specificAttrsTitle")}),window.graph.hasNode(s)&&e.jsx(De,{}),window.graph.hasEdge(s)&&e.jsx(Me,{})]})]}),e.jsx(we,{children:e.jsxs(B,{children:[a.size===1&&o.current.hasNode(s)&&e.jsx(N,{size:"sm",variant:"outline",onClick:()=>c(s),isDisabled:o.current.getNodeAttributes(s).type===Ae.Master&&l,children:n("panel.details.footer.duplicate")}),e.jsx(N,{size:"sm",variant:"outline",onClick:()=>f(a),children:n("panel.details.footer.copy")}),e.jsx(N,{size:"sm",variant:"outline",onClick:()=>S(a),children:n("panel.details.footer.remove")})]})})]})};export{Xe as default}; diff --git a/assets/details-legacy-BmTVwGJQ.js b/assets/details-legacy-BmTVwGJQ.js new file mode 100644 index 00000000..1939f489 --- /dev/null +++ b/assets/details-legacy-BmTVwGJQ.js @@ -0,0 +1 @@ +!function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r{r=e.j,i=e.B,s=e.aj,a=e.ak,l=e.av,o=e.t,c=e.ax,d=e.x,u=e.D,p=e.G,h=e.M,g=e.H,m=e.J,x=e.L,f=e.O,b=e.N},e=>{j=e.c,y=e.d,v=e.aE,w=e.T,S=e.aF,N=e.ay,A=e.t,E=e.v,C=e.o,O=e.au,k=e.k,z=e.l,W=e.P,P=e.aG,I=e.q,T=e.S,D=e.$,R=e.a0,L=e.i,_=e.m,F=e.y,M=e.az,U=e.aD,B=e.aH,H=e.aI,V=e.aJ,$=e.aK,G=e.aB,J=e.n},e=>{q=e.u,K=e.b},e=>{Q=e.u,X=e.e},e=>{Y=e.s},e=>{Z=e.C,ee=e.c,te=e.a,ne=e.b},e=>{re=e.LearnHowToAdd},e=>{ie=e.m}],execute:function(){function n(){const{t:e}=q(),t=j(),{selected:n}=y((e=>e.runtime)),p=K.useRef(window.graph),h=e=>{if(p.current.hasNode(e)){const t=p.current.getNodeAttributes(e),n=t.type;return e.startsWith("stn")?t[n].names.join("/"):n}if(p.current.hasEdge(e)){const[t,n]=p.current.extremities(e),r=p.current.getSourceAttributes(e),i=p.current.getTargetAttributes(e),s=r.type,a=i.type;return(t.startsWith("stn")?r[s].names[0]:s)+" - "+(n.startsWith("stn")?i[a].names[0]:a)}},[g,m]=K.useState([]);K.useEffect((()=>{m(["station","misc-node","line"])}),[n]);const[x,f]=K.useState(!1);return r.jsxs(i,{children:[r.jsxs(s,{as:"h5",size:"sm",children:[e("panel.details.multipleSelection.selected")," ",n.size]}),r.jsxs(a,{m:"var(--chakra-space-1)",children:[r.jsxs(l,{w:"100%",children:[r.jsx(s,{as:"h5",size:"xs",w:"100%",children:e("panel.details.multipleSelection.show")}),r.jsx(v,{selections:[{label:e("panel.details.multipleSelection.station"),value:"station"},{label:e("panel.details.multipleSelection.miscNode"),value:"misc-node"},{label:e("panel.details.multipleSelection.edge"),value:"line"}],defaultValue:g,multiSelect:!0,onChange:e=>m(e)})]}),0!==g.length&&r.jsxs(r.Fragment,{children:[r.jsxs(o,{width:"100%",size:"sm",onClick:()=>f(!0),children:[e("panel.details.multipleSelection.change"),r.jsx(c,{label:e("header.settings.pro"),children:r.jsx(d,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",children:"PRO"})})]}),r.jsx(u,{})]}),[...n].filter((e=>g.includes("station")||!e.startsWith("stn"))).filter((e=>g.includes("misc-node")||!e.startsWith("misc"))).filter((e=>g.includes("line")||!e.startsWith("line"))).map((e=>{var n;return r.jsxs(l,{width:"100%",children:[r.jsx(o,{width:"100%",size:"sm",variant:"solid",onClick:()=>t(w(new Set([e]))),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"ruby",children:null===(n=h(e))||void 0===n?void 0:n.replaceAll("\n","⏎")}),r.jsx(o,{size:"sm",onClick:()=>t(N(e)),children:r.jsx(S,{})})]},e)}))]}),r.jsx(Z,{isOpen:x,onClose:()=>f(!1),isSelect:!0,filter:g})]})}function se(){const{t:e}=q(),t=j(),n=K.useCallback((()=>{t(A()),t(E(c.current.export()))}),[t,A,E]),{preference:{autoParallel:i}}=y((e=>e.app)),{selected:s,theme:a}=y((e=>e.runtime)),[l]=s,c=K.useRef(window.graph),[d,u]=K.useState(!1),b=K.useRef(null),v=Object.fromEntries(Object.entries(C).map((([t,n])=>[t,e(n.metadata.displayName).toString()]))),[w,S]=K.useState(c.current.getEdgeAttribute(l,"type")),[N,I]=K.useState(void 0),T=Object.fromEntries(Object.entries(O).map((([t,n])=>[t,e(n.metadata.displayName).toString()]))),[D,R]=K.useState(c.current.getEdgeAttribute(l,"style")),[L,_]=K.useState(void 0);K.useEffect((()=>{S(c.current.getEdgeAttribute(l,"type")),R(c.current.getEdgeAttribute(l,"style"))}),[l]);const F=Object.values(k).filter((e=>!O[D].metadata.supportLinePathType.includes(e))),M=Object.values(z).filter((e=>!O[e].metadata.supportLinePathType.includes(w))),U=e=>{e&&(N?(N&&(ee(c.current,l,N,i),S(c.current.getEdgeAttribute(l,"type")),n()),I(void 0)):L&&(L&&(te(c.current,l,L,a),R(c.current.getEdgeAttribute(l,"style")),n()),_(void 0))),u(!1)};return r.jsxs(r.Fragment,{children:[r.jsx(W,{label:e("panel.details.info.linePathType"),minW:"276",children:r.jsx(P,{options:v,disabledOptions:F,defaultValue:w,value:w,onChange:({target:{value:e}})=>{I(e),u(!0)}})}),r.jsx(W,{label:e("panel.details.info.lineStyleType"),minW:"276",children:r.jsx(P,{options:T,disabledOptions:M,defaultValue:D,value:D,onChange:({target:{value:e}})=>{_(e),u(!0)}})}),r.jsx(re,{type:"line",expand:!0}),r.jsx(p,{isOpen:d,leastDestructiveRef:b,onClose:()=>U(!1),children:r.jsx(h,{children:r.jsxs(g,{children:[r.jsx(m,{children:e("warning")}),r.jsx(x,{children:e("panel.details.changeLineTypeContent")}),r.jsxs(f,{children:[r.jsx(o,{ref:b,onClick:()=>U(!1),children:e("cancel")}),r.jsx(o,{ml:"2",colorScheme:"red",onClick:()=>U(!0),children:e("panel.details.changeType")})]})]})})})]})}function ae(){const{t:e}=q(),t=j(),n=K.useCallback((()=>{t(I()),t(E(l.current.export()))}),[t,I,E]),{selected:i,refresh:{nodes:s}}=y((e=>e.runtime)),[a]=i,l=K.useRef(window.graph),[c,d]=K.useState(!1),u=K.useRef(null),[b,v]=K.useState(void 0),[w,S]=K.useState(T.ShmetroBasic);K.useEffect((()=>{if(null!=a&&a.startsWith("stn")){const e=l.current.getNodeAttribute(a,"type");S(e)}}),[s,i]);const N=Object.fromEntries(Object.entries(Y).map((([t,n])=>[t,e(n.metadata.displayName).toString()]))),A=e=>{e&&b&&(ne(l.current,a,b),n()),v(void 0),d(!1)};return r.jsxs(r.Fragment,{children:[r.jsx(W,{label:e("panel.details.info.stationType"),minW:"276",children:r.jsx(P,{options:N,disabledOptions:[w],value:w,onChange:({target:{value:e}})=>{v(e),d(!0)}})}),r.jsx(p,{isOpen:c,leastDestructiveRef:u,onClose:()=>A(!1),children:r.jsx(h,{children:r.jsxs(g,{children:[r.jsx(m,{children:e("warning")}),r.jsx(x,{children:e("panel.details.changeStationTypeContent")}),r.jsxs(f,{children:[r.jsx(o,{ref:u,onClick:()=>A(!1),children:e("cancel")}),r.jsx(o,{ml:"2",colorScheme:"red",onClick:()=>A(!0),children:e("panel.details.changeType")})]})]})})})]})}function le(){const{t:e}=q(),t=j(),a=K.useCallback((()=>{t(I()),t(A()),t(E(u.current.export()))}),[t,I,A,E]),{activeSubscriptions:l}=y((e=>e.account)),{selected:o,parallelLinesCount:c}=y((e=>e.runtime)),[d]=o,u=K.useRef(window.graph),p=e=>{u.current.setEdgeAttribute(d,"parallelIndex",e),t(A()),t(E(u.current.export()))},h=[];if(0===o.size);else if(1===o.size){if(h.push({type:"input",label:e("panel.details.info.id"),value:d,minW:276}),h.push({type:"select",label:e("panel.details.info.zIndex"),value:d?u.current.hasNode(d)?u.current.getNodeAttribute(d,"zIndex"):u.current.hasEdge(d)?u.current.getEdgeAttribute(d,"zIndex"):0:0,options:Object.fromEntries(Array.from({length:21},((e,t)=>[t-10,(t-10).toString()]))),onChange:e=>(e=>{const t=Math.min(Math.max(e,-10),10);u.current.hasNode(d)&&u.current.setNodeAttribute(d,"zIndex",t),u.current.hasEdge(d)&&u.current.setEdgeAttribute(d,"zIndex",t),a()})(Number(e))}),u.current.hasEdge(d)){const t=u.current.getEdgeAttributes(d),{parallelIndex:n,type:r}=t,i=l.RMP_CLOUD?D:R,s=c>i&&n<0||r===k.Simple,a=c>i&&n>=0;h.push({type:"switch",label:e("panel.details.info.parallel"),isDisabled:s,isChecked:n>=0,onChange:e=>((e,t)=>{let n=-1;if(e){const e=u.current.getEdgeAttributes(d),[r,i]=u.current.extremities(d);n=_(u.current,e.type,r,i,t)}p(n)})(e,t[t.type].startFrom),oneLine:!0,minW:276}),n>=0&&h.push({type:"input",label:e("panel.details.info.parallelIndex"),variant:"number",isDisabled:a,value:t.parallelIndex.toString(),onChange:e=>p(Number(e)),minW:276})}}else o.size>1&&h.push({type:"input",label:e("panel.details.info.type"),value:e("panel.details.multipleSelection.title"),minW:276});return r.jsxs(i,{p:1,children:[r.jsx(s,{as:"h5",size:"sm",children:e("panel.details.info.title")}),r.jsx(L,{fields:h,minW:130}),1===o.size&&d.startsWith("stn")&&u.current.hasNode(d)&&u.current.getNodeAttribute(d,"type")in Y&&r.jsx(ae,{}),1===o.size&&d.startsWith("line")&&u.current.hasEdge(d)&&u.current.getEdgeAttribute(d,"type")in C&&u.current.getEdgeAttribute(d,"style")in O&&r.jsx(se,{}),o.size>1&&r.jsx(n,{})]})}function oe(){const{t:e}=q(),t=j(),{selected:n}=y((e=>e.runtime)),[a]=n,l=K.useRef(window.graph),[c,d]=K.useState("undefined"),[u,p]=K.useState("undefined"),[h,g]=K.useState("undefined"),[m,x]=K.useState("undefined");K.useEffect((()=>{if(null!=a&&a.startsWith("line")){const[i,s]=l.current.extremities(a);if(d(i),p(s),i.startsWith("stn")){var e,t;const n=l.current.getNodeAttribute(i,"type");g(null!==(e=null===(t=l.current.getNodeAttribute(i,n))||void 0===t?void 0:t.names.at(0))&&void 0!==e?e:"undefined")}if(s.startsWith("stn")){var n,r;const e=l.current.getNodeAttribute(s,"type");x(null!==(n=null===(r=l.current.getNodeAttribute(s,e))||void 0===r?void 0:r.names.at(0))&&void 0!==n?n:"undefined")}}}),[n]);const f=Q((()=>{t(F()),t(M(c))})),b=Q((()=>{t(F()),t(M(u))})),v=[{type:"custom",label:e("panel.details.lineExtremities.source"),component:r.jsx(o,{ml:"auto",size:"sm",variant:"link",onClick:f,children:c}),oneLine:!0,minW:"full"},{type:"input",label:e("panel.details.lineExtremities.sourceName"),value:h,minW:"full"},{type:"custom",label:e("panel.details.lineExtremities.target"),component:r.jsx(o,{ml:"auto",size:"sm",variant:"link",onClick:b,children:u}),oneLine:!0,minW:"full"},{type:"input",label:e("panel.details.lineExtremities.targetName"),value:m,minW:"full"}];return r.jsxs(i,{p:1,children:[r.jsx(s,{as:"h5",size:"sm",children:e("panel.details.lineExtremities.title")}),r.jsx(L,{fields:v,minW:130})]})}function ce(){const{t:e}=q(),t=j(),n=K.useCallback((()=>{t(I()),t(A()),t(E(c.current.export()))}),[t,I,A,E]),{selected:a,refresh:{nodes:l}}=y((e=>e.runtime)),[o]=a,c=K.useRef(window.graph),[d,u]=K.useState({x:0,y:0});K.useEffect((()=>{if(null!=o&&o.startsWith("stn")||null!=o&&o.startsWith("misc_node_")){const e=c.current.getNodeAttribute(o,"x"),t=c.current.getNodeAttribute(o,"y");u({x:e,y:t})}}),[l,a]);const p=[{type:"input",label:e("panel.details.nodePosition.pos.x"),value:d.x.toString(),validator:e=>!Number.isNaN(e),onChange:e=>{c.current.mergeNodeAttributes(o,{x:Number(e)}),n()}},{type:"input",label:e("panel.details.nodePosition.pos.y"),value:d.y.toString(),validator:e=>!Number.isNaN(e),onChange:e=>{c.current.mergeNodeAttributes(o,{y:Number(e)}),n()}}];return r.jsxs(i,{p:1,children:[r.jsx(s,{as:"h5",size:"sm",children:e("panel.details.nodePosition.title")}),r.jsx(L,{fields:p,minW:130})]})}const de=t(t({},Y),ie),ue=()=>{var e;const t=j(),{selected:n}=y((e=>e.runtime)),{t:i}=q(),[s]=n,a=window.graph.getNodeAttribute(s,"type"),l=a in de&&de[a].attrsComponent,o=null!==(e=window.graph.getNodeAttribute(s,a))&&void 0!==e?e:{};return l?r.jsx(l,{id:s,attrs:o,handleAttrsUpdate:(e,n)=>{const r=window.graph.getNodeAttribute(e,"type");window.graph.mergeNodeAttributes(e,{[r]:n}),t(I()),t(E(window.graph.export()))}}):r.jsx(b,{fontSize:"xs",m:"var(--chakra-space-1)",children:i("panel.details.unknown.error",{category:i("panel.details.unknown.node")})})},pe=()=>{var e,t;const n=j(),{preference:{autoParallel:i}}=y((e=>e.app)),{selected:s}=y((e=>e.runtime)),{t:a}=q(),[l]=s,{type:o,style:c,parallelIndex:d,reconcileId:u}=window.graph.getEdgeAttributes(l),p=null!==(e=window.graph.getEdgeAttribute(l,o))&&void 0!==e?e:{},h=o in C&&C[o].attrsComponent,g=null!==(t=window.graph.getEdgeAttribute(l,c))&&void 0!==t?t:{},m=c in O&&O[c].attrsComponent;return r.jsxs(r.Fragment,{children:[h?r.jsx(h,{id:l,attrs:p,recalculateParallelIndex:(e,t)=>{let n=-1;if(i){const[r,i]=window.graph.extremities(e);n=_(window.graph,o,r,i,t)}window.graph.setEdgeAttribute(e,"parallelIndex",n)},handleAttrsUpdate:(e,t)=>{window.graph.mergeEdgeAttributes(e,{[o]:t}),n(A()),n(E(window.graph.export()))},parallelIndex:d}):r.jsx(b,{fontSize:"xs",m:"var(--chakra-space-1)",children:a("panel.details.unknown.error",{category:a("panel.details.unknown.linePath")})}),m?r.jsx(m,{id:l,attrs:g,handleAttrsUpdate:(e,t)=>{window.graph.mergeEdgeAttributes(e,{[c]:t}),n(A()),n(E(window.graph.export()))},reconcileId:u}):r.jsx(b,{fontSize:"xs",m:"var(--chakra-space-1)",children:a("panel.details.unknown.error",{category:a("panel.details.unknown.lineStyle")})})]})};e("default",(()=>{const{t:e}=q(),t=j(),n=K.useRef(window.graph),a=K.useCallback((()=>{t(I()),t(A()),t(E(n.current.export()))}),[t,I,A,E]),{activeSubscriptions:c}=y((e=>e.account)),{selected:d,mode:u,active:p,masterNodesCount:h}=y((e=>e.runtime)),[g]=d,m=!c.RMP_CLOUD&&h+1>U;return r.jsxs(B,{isOpen:d.size>0&&!u.startsWith("line")&&!p,width:300,header:"Dummy header",alwaysOverlay:!0,children:[r.jsx(H,{onClose:()=>t(F()),children:e("panel.details.header")}),r.jsxs(V,{children:[r.jsx(le,{}),1===d.size&&n.current.hasNode(g)&&r.jsx(ce,{}),1===d.size&&n.current.hasEdge(g)&&r.jsx(oe,{}),1===d.size&&r.jsxs(i,{p:1,children:[r.jsx(s,{as:"h5",size:"sm",children:e("panel.details.specificAttrsTitle")}),window.graph.hasNode(g)&&r.jsx(ue,{}),window.graph.hasEdge(g)&&r.jsx(pe,{})]})]}),r.jsx($,{children:r.jsxs(l,{children:[1===d.size&&n.current.hasNode(g)&&r.jsx(o,{size:"sm",variant:"outline",onClick:()=>(e=>{const r=structuredClone(n.current.getNodeAttributes(e));r.x+=50,r.y+=50;const i=e.startsWith("stn")?`stn_${J(10)}`:`misc_node_${J(10)}`;n.current.addNode(i,r),t(I()),t(E(n.current.export()))})(g),isDisabled:n.current.getNodeAttributes(g).type===G.Master&&m,children:e("panel.details.footer.duplicate")}),r.jsx(o,{size:"sm",variant:"outline",onClick:()=>(e=>{const t=X(n.current,e);navigator.clipboard.writeText(t)})(d),children:e("panel.details.footer.copy")}),r.jsx(o,{size:"sm",variant:"outline",onClick:()=>{return e=d,t(F()),e.forEach((e=>{n.current.hasNode(e)?n.current.dropNode(e):n.current.hasEdge(e)&&n.current.dropEdge(e)})),void a();var e},children:e("panel.details.footer.remove")})]})})]})}))}}}))}(); diff --git a/assets/details-legacy-C-XI805-.js b/assets/details-legacy-C-XI805-.js deleted file mode 100644 index 00eb5071..00000000 --- a/assets/details-legacy-C-XI805-.js +++ /dev/null @@ -1 +0,0 @@ -System.register(["./chakra-legacy-DsJcG_7N.js","./index-legacy-CKg3D7KT.js","./react-legacy-S3BmMPiz.js","./clipboard-legacy-Dddlt6N0.js","./master-manager-legacy-DmddqoRb.js","./change-type-modal-legacy-Bi8yFeWH.js","./tools-legacy-vh8FZzIz.js","./misc-nodes-legacy-ClIinVYX.js"],(function(e,t){"use strict";var n,i,s,r,a,l,d,o,c,u,p,h,g,m,x,f,b,j,y,w,v,A,S,N,E,C,z,k,W,O,I,P,R,T,D,L,_,F,M,U,$,V,B,H,K,q,G,J,Q,X,Y,Z,ee,te,ne,ie;return{setters:[e=>{n=e.j,i=e.B,s=e.aw,r=e.ax,a=e.aK,l=e.O,d=e.aM,o=e.U,c=e.D,u=e._,p=e.$,h=e.a0,g=e.a1,m=e.a3,x=e.a5,f=e.a4},e=>{b=e.c,j=e.d,y=e.aE,w=e.T,v=e.az,A=e.aF,S=e.t,N=e.v,E=e.l,C=e.au,z=e.k,k=e.o,W=e.P,O=e.aG,I=e.q,P=e.S,R=e.$,T=e.a0,D=e.i,L=e.m,_=e.y,F=e.aA,M=e.aD,U=e.aH,$=e.aI,V=e.aJ,B=e.aK,H=e.av,K=e.n},e=>{q=e.u,G=e.b},e=>{J=e.u,Q=e.e},e=>{X=e.s},e=>{Y=e.C,Z=e.c,ee=e.a,te=e.b},e=>{ne=e.LearnHowToAdd},e=>{ie=e.m}],execute:function(){function t(){const{t:e}=q(),t=b(),{selected:u}=j((e=>e.runtime)),p=G.useRef(window.graph),h=e=>{if(p.current.hasNode(e)){const t=p.current.getNodeAttributes(e),n=t.type;return e.startsWith("stn")?t[n].names.join("/"):n}if(p.current.hasEdge(e)){const[t,n]=p.current.extremities(e),i=p.current.getSourceAttributes(e),s=p.current.getTargetAttributes(e),r=i.type,a=s.type;return(t.startsWith("stn")?i[r].names[0]:r)+" - "+(n.startsWith("stn")?s[a].names[0]:a)}},[g,m]=G.useState([]);G.useEffect((()=>{m(["station","misc-node","line"])}),[u]);const[x,f]=G.useState(!1);return n.jsxs(i,{children:[n.jsxs(s,{as:"h5",size:"sm",children:[e("panel.details.multipleSelection.selected")," ",u.size]}),n.jsxs(r,{m:"var(--chakra-space-1)",children:[n.jsxs(a,{w:"100%",children:[n.jsx(s,{as:"h5",size:"xs",w:"100%",children:e("panel.details.multipleSelection.show")}),n.jsx(y,{selections:[{label:e("panel.details.multipleSelection.station"),value:"station"},{label:e("panel.details.multipleSelection.miscNode"),value:"misc-node"},{label:e("panel.details.multipleSelection.edge"),value:"line"}],defaultValue:g,multiSelect:!0,onChange:e=>m(e)})]}),0!==g.length&&n.jsxs(n.Fragment,{children:[n.jsxs(l,{width:"100%",size:"sm",onClick:()=>f(!0),children:[e("panel.details.multipleSelection.change"),n.jsx(d,{label:e("header.settings.pro"),children:n.jsx(o,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",children:"PRO"})})]}),n.jsx(c,{})]}),[...u].filter((e=>g.includes("station")||!e.startsWith("stn"))).filter((e=>g.includes("misc-node")||!e.startsWith("misc"))).filter((e=>g.includes("line")||!e.startsWith("line"))).map((e=>{var i;return n.jsxs(a,{width:"100%",children:[n.jsx(l,{width:"100%",size:"sm",variant:"solid",onClick:()=>t(w(new Set([e]))),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"ruby",children:null===(i=h(e))||void 0===i?void 0:i.replaceAll("\n","⏎")}),n.jsx(l,{size:"sm",onClick:()=>t(v(e)),children:n.jsx(A,{})})]},e)}))]}),n.jsx(Y,{isOpen:x,onClose:()=>f(!1),isSelect:!0,filter:g})]})}function se(){const{t:e}=q(),t=b(),i=G.useCallback((()=>{t(S()),t(N(o.current.export()))}),[t,S,N]),{preference:{autoParallel:s}}=j((e=>e.app)),{selected:r,theme:a}=j((e=>e.runtime)),[d]=r,o=G.useRef(window.graph),[c,f]=G.useState(!1),y=G.useRef(null),w=Object.fromEntries(Object.entries(E).map((([t,n])=>[t,e(n.metadata.displayName).toString()]))),[v,A]=G.useState(o.current.getEdgeAttribute(d,"type")),[I,P]=G.useState(void 0),R=Object.fromEntries(Object.entries(C).map((([t,n])=>[t,e(n.metadata.displayName).toString()]))),[T,D]=G.useState(o.current.getEdgeAttribute(d,"style")),[L,_]=G.useState(void 0);G.useEffect((()=>{A(o.current.getEdgeAttribute(d,"type")),D(o.current.getEdgeAttribute(d,"style"))}),[d]);const F=Object.values(z).filter((e=>!C[T].metadata.supportLinePathType.includes(e))),M=Object.values(k).filter((e=>!C[e].metadata.supportLinePathType.includes(v))),U=e=>{e&&(I?(I&&(Z(o.current,d,I,s),A(o.current.getEdgeAttribute(d,"type")),i()),P(void 0)):L&&(L&&(ee(o.current,d,L,a),D(o.current.getEdgeAttribute(d,"style")),i()),_(void 0))),f(!1)};return n.jsxs(n.Fragment,{children:[n.jsx(W,{label:e("panel.details.info.linePathType"),minW:"276",children:n.jsx(O,{options:w,disabledOptions:F,defaultValue:v,value:v,onChange:({target:{value:e}})=>{P(e),f(!0)}})}),n.jsx(W,{label:e("panel.details.info.lineStyleType"),minW:"276",children:n.jsx(O,{options:R,disabledOptions:M,defaultValue:T,value:T,onChange:({target:{value:e}})=>{_(e),f(!0)}})}),n.jsx(ne,{type:"line",expand:!0}),n.jsx(u,{isOpen:c,leastDestructiveRef:y,onClose:()=>U(!1),children:n.jsx(p,{children:n.jsxs(h,{children:[n.jsx(g,{children:e("warning")}),n.jsx(m,{children:e("panel.details.changeLineTypeContent")}),n.jsxs(x,{children:[n.jsx(l,{ref:y,onClick:()=>U(!1),children:e("cancel")}),n.jsx(l,{ml:"2",colorScheme:"red",onClick:()=>U(!0),children:e("panel.details.changeType")})]})]})})})]})}function re(){const{t:e}=q(),t=b(),i=G.useCallback((()=>{t(I()),t(N(d.current.export()))}),[t,I,N]),{selected:s,refresh:{nodes:r}}=j((e=>e.runtime)),[a]=s,d=G.useRef(window.graph),[o,c]=G.useState(!1),f=G.useRef(null),[y,w]=G.useState(void 0),[v,A]=G.useState(P.ShmetroBasic);G.useEffect((()=>{if(null!=a&&a.startsWith("stn")){const e=d.current.getNodeAttribute(a,"type");A(e)}}),[r,s]);const S=Object.fromEntries(Object.entries(X).map((([t,n])=>[t,e(n.metadata.displayName).toString()]))),E=e=>{e&&y&&(te(d.current,a,y),i()),w(void 0),c(!1)};return n.jsxs(n.Fragment,{children:[n.jsx(W,{label:e("panel.details.info.stationType"),minW:"276",children:n.jsx(O,{options:S,disabledOptions:[v],value:v,onChange:({target:{value:e}})=>{w(e),c(!0)}})}),n.jsx(u,{isOpen:o,leastDestructiveRef:f,onClose:()=>E(!1),children:n.jsx(p,{children:n.jsxs(h,{children:[n.jsx(g,{children:e("warning")}),n.jsx(m,{children:e("panel.details.changeStationTypeContent")}),n.jsxs(x,{children:[n.jsx(l,{ref:f,onClick:()=>E(!1),children:e("cancel")}),n.jsx(l,{ml:"2",colorScheme:"red",onClick:()=>E(!0),children:e("panel.details.changeType")})]})]})})})]})}function ae(){const{t:e}=q(),r=b(),a=G.useCallback((()=>{r(I()),r(S()),r(N(u.current.export()))}),[r,I,S,N]),{activeSubscriptions:l}=j((e=>e.account)),{selected:d,parallelLinesCount:o}=j((e=>e.runtime)),[c]=d,u=G.useRef(window.graph),p=e=>{u.current.setEdgeAttribute(c,"parallelIndex",e),r(S()),r(N(u.current.export()))},h=[];if(0===d.size);else if(1===d.size){if(h.push({type:"input",label:e("panel.details.info.id"),value:c,minW:276}),h.push({type:"select",label:e("panel.details.info.zIndex"),value:c?u.current.hasNode(c)?u.current.getNodeAttribute(c,"zIndex"):u.current.hasEdge(c)?u.current.getEdgeAttribute(c,"zIndex"):0:0,options:Object.fromEntries(Array.from({length:21},((e,t)=>[t-10,(t-10).toString()]))),onChange:e=>(e=>{const t=Math.min(Math.max(e,-10),10);u.current.hasNode(c)&&u.current.setNodeAttribute(c,"zIndex",t),u.current.hasEdge(c)&&u.current.setEdgeAttribute(c,"zIndex",t),a()})(Number(e))}),u.current.hasEdge(c)){const t=u.current.getEdgeAttributes(c),{parallelIndex:n,type:i}=t,s=l.RMP_CLOUD?R:T,r=o>s&&n<0||i===z.Simple,a=o>s&&n>=0;h.push({type:"switch",label:e("panel.details.info.parallel"),isDisabled:r,isChecked:n>=0,onChange:e=>((e,t)=>{let n=-1;if(e){const e=u.current.getEdgeAttributes(c),[i,s]=u.current.extremities(c);n=L(u.current,e.type,i,s,t)}p(n)})(e,t[t.type].startFrom),oneLine:!0,minW:276}),n>=0&&h.push({type:"input",label:e("panel.details.info.parallelIndex"),variant:"number",isDisabled:a,value:t.parallelIndex.toString(),onChange:e=>p(Number(e)),minW:276})}}else d.size>1&&h.push({type:"input",label:e("panel.details.info.type"),value:e("panel.details.multipleSelection.title"),minW:276});return n.jsxs(i,{p:1,children:[n.jsx(s,{as:"h5",size:"sm",children:e("panel.details.info.title")}),n.jsx(D,{fields:h,minW:130}),1===d.size&&c.startsWith("stn")&&u.current.hasNode(c)&&u.current.getNodeAttribute(c,"type")in X&&n.jsx(re,{}),1===d.size&&c.startsWith("line")&&u.current.hasEdge(c)&&u.current.getEdgeAttribute(c,"type")in E&&u.current.getEdgeAttribute(c,"style")in C&&n.jsx(se,{}),d.size>1&&n.jsx(t,{})]})}function le(){const{t:e}=q(),t=b(),{selected:r}=j((e=>e.runtime)),[a]=r,d=G.useRef(window.graph),[o,c]=G.useState("undefined"),[u,p]=G.useState("undefined"),[h,g]=G.useState("undefined"),[m,x]=G.useState("undefined");G.useEffect((()=>{if(null!=a&&a.startsWith("line")){const[s,r]=d.current.extremities(a);if(c(s),p(r),s.startsWith("stn")){var e,t;const n=d.current.getNodeAttribute(s,"type");g(null!==(e=null===(t=d.current.getNodeAttribute(s,n))||void 0===t?void 0:t.names.at(0))&&void 0!==e?e:"undefined")}if(r.startsWith("stn")){var n,i;const e=d.current.getNodeAttribute(r,"type");x(null!==(n=null===(i=d.current.getNodeAttribute(r,e))||void 0===i?void 0:i.names.at(0))&&void 0!==n?n:"undefined")}}}),[r]);const f=J((()=>{t(_()),t(F(o))})),y=J((()=>{t(_()),t(F(u))})),w=[{type:"custom",label:e("panel.details.lineExtremities.source"),component:n.jsx(l,{ml:"auto",size:"sm",variant:"link",onClick:f,children:o}),oneLine:!0,minW:"full"},{type:"input",label:e("panel.details.lineExtremities.sourceName"),value:h,minW:"full"},{type:"custom",label:e("panel.details.lineExtremities.target"),component:n.jsx(l,{ml:"auto",size:"sm",variant:"link",onClick:y,children:u}),oneLine:!0,minW:"full"},{type:"input",label:e("panel.details.lineExtremities.targetName"),value:m,minW:"full"}];return n.jsxs(i,{p:1,children:[n.jsx(s,{as:"h5",size:"sm",children:e("panel.details.lineExtremities.title")}),n.jsx(D,{fields:w,minW:130})]})}function de(){const{t:e}=q(),t=b(),r=G.useCallback((()=>{t(I()),t(S()),t(N(o.current.export()))}),[t,I,S,N]),{selected:a,refresh:{nodes:l}}=j((e=>e.runtime)),[d]=a,o=G.useRef(window.graph),[c,u]=G.useState({x:0,y:0});G.useEffect((()=>{if(null!=d&&d.startsWith("stn")||null!=d&&d.startsWith("misc_node_")){const e=o.current.getNodeAttribute(d,"x"),t=o.current.getNodeAttribute(d,"y");u({x:e,y:t})}}),[l,a]);const p=[{type:"input",label:e("panel.details.nodePosition.pos.x"),value:c.x.toString(),validator:e=>!Number.isNaN(e),onChange:e=>{o.current.mergeNodeAttributes(d,{x:Number(e)}),r()}},{type:"input",label:e("panel.details.nodePosition.pos.y"),value:c.y.toString(),validator:e=>!Number.isNaN(e),onChange:e=>{o.current.mergeNodeAttributes(d,{y:Number(e)}),r()}}];return n.jsxs(i,{p:1,children:[n.jsx(s,{as:"h5",size:"sm",children:e("panel.details.nodePosition.title")}),n.jsx(D,{fields:p,minW:130})]})}const oe={...X,...ie},ce=()=>{var e;const t=b(),{selected:i}=j((e=>e.runtime)),{t:s}=q(),[r]=i,a=window.graph.getNodeAttribute(r,"type"),l=a in oe&&oe[a].attrsComponent,d=null!==(e=window.graph.getNodeAttribute(r,a))&&void 0!==e?e:{};return l?n.jsx(l,{id:r,attrs:d,handleAttrsUpdate:(e,n)=>{const i=window.graph.getNodeAttribute(e,"type");window.graph.mergeNodeAttributes(e,{[i]:n}),t(I()),t(N(window.graph.export()))}}):n.jsx(f,{fontSize:"xs",m:"var(--chakra-space-1)",children:s("panel.details.unknown.error",{category:s("panel.details.unknown.node")})})},ue=()=>{var e,t;const i=b(),{preference:{autoParallel:s}}=j((e=>e.app)),{selected:r}=j((e=>e.runtime)),{t:a}=q(),[l]=r,{type:d,style:o,parallelIndex:c,reconcileId:u}=window.graph.getEdgeAttributes(l),p=null!==(e=window.graph.getEdgeAttribute(l,d))&&void 0!==e?e:{},h=d in E&&E[d].attrsComponent,g=null!==(t=window.graph.getEdgeAttribute(l,o))&&void 0!==t?t:{},m=o in C&&C[o].attrsComponent;return n.jsxs(n.Fragment,{children:[h?n.jsx(h,{id:l,attrs:p,recalculateParallelIndex:(e,t)=>{let n=-1;if(s){const[i,s]=window.graph.extremities(e);n=L(window.graph,d,i,s,t)}window.graph.setEdgeAttribute(e,"parallelIndex",n)},handleAttrsUpdate:(e,t)=>{window.graph.mergeEdgeAttributes(e,{[d]:t}),i(S()),i(N(window.graph.export()))},parallelIndex:c}):n.jsx(f,{fontSize:"xs",m:"var(--chakra-space-1)",children:a("panel.details.unknown.error",{category:a("panel.details.unknown.linePath")})}),m?n.jsx(m,{id:l,attrs:g,handleAttrsUpdate:(e,t)=>{window.graph.mergeEdgeAttributes(e,{[o]:t}),i(S()),i(N(window.graph.export()))},reconcileId:u}):n.jsx(f,{fontSize:"xs",m:"var(--chakra-space-1)",children:a("panel.details.unknown.error",{category:a("panel.details.unknown.lineStyle")})})]})};e("default",(()=>{const{t:e}=q(),t=b(),r=G.useRef(window.graph),d=G.useCallback((()=>{t(I()),t(S()),t(N(r.current.export()))}),[t,I,S,N]),{activeSubscriptions:o}=j((e=>e.account)),{selected:c,mode:u,active:p,masterNodesCount:h}=j((e=>e.runtime)),[g]=c,m=!o.RMP_CLOUD&&h+1>M;return n.jsxs(U,{isOpen:c.size>0&&!u.startsWith("line")&&!p,width:300,header:"Dummy header",alwaysOverlay:!0,children:[n.jsx($,{onClose:()=>t(_()),children:e("panel.details.header")}),n.jsxs(V,{children:[n.jsx(ae,{}),1===c.size&&r.current.hasNode(g)&&n.jsx(de,{}),1===c.size&&r.current.hasEdge(g)&&n.jsx(le,{}),1===c.size&&n.jsxs(i,{p:1,children:[n.jsx(s,{as:"h5",size:"sm",children:e("panel.details.specificAttrsTitle")}),window.graph.hasNode(g)&&n.jsx(ce,{}),window.graph.hasEdge(g)&&n.jsx(ue,{})]})]}),n.jsx(B,{children:n.jsxs(a,{children:[1===c.size&&r.current.hasNode(g)&&n.jsx(l,{size:"sm",variant:"outline",onClick:()=>(e=>{const n=structuredClone(r.current.getNodeAttributes(e));n.x+=50,n.y+=50;const i=e.startsWith("stn")?`stn_${K(10)}`:`misc_node_${K(10)}`;r.current.addNode(i,n),t(I()),t(N(r.current.export()))})(g),isDisabled:r.current.getNodeAttributes(g).type===H.Master&&m,children:e("panel.details.footer.duplicate")}),n.jsx(l,{size:"sm",variant:"outline",onClick:()=>(e=>{const t=Q(r.current,e);navigator.clipboard.writeText(t)})(c),children:e("panel.details.footer.copy")}),n.jsx(l,{size:"sm",variant:"outline",onClick:()=>{return e=c,t(_()),e.forEach((e=>{r.current.hasNode(e)?r.current.dropNode(e):r.current.hasEdge(e)&&r.current.dropEdge(e)})),void d();var e},children:e("panel.details.footer.remove")})]})})]})}))}}})); diff --git a/assets/index-BiHghyID.js b/assets/index-BiHghyID.js deleted file mode 100644 index f470c19d..00000000 --- a/assets/index-BiHghyID.js +++ /dev/null @@ -1,10 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/page-header-BpUv6R7o.js","assets/chakra-xNcrfRXW.js","assets/react-D-_si4LB.js","assets/master-manager-BoebmmSV.js","assets/change-type-modal-BN8Wot4j.js","assets/tools-DZ01x_ln.js","assets/misc-nodes-3nt-Fm8T.js","assets/svg-wrapper-Xiw4OObF.js","assets/clipboard-yBOl3IpM.js","assets/details-Dqiw1DIF.js","assets/rmg-palette-app-clip-BKLlM3Ws.js"])))=>i.map(i=>d[i]); -import{u as ht,a as Gu,j as f,P as Uu,c as Lr,F as Wu,b as Vu,f as Vt,n as Yo,r as be,d as Va,e as Xn,i as _r,o as ui,g as ut,B as Hu,D as Zo,I as Ju,h as Ha,k as Ku,S as Ja,l as qu,W as Yu,m as Zu,p as Qu,q as Ka,C as Xu,s as ec,t as tc,v as nc,w as rc,x as ic,y as Oi,z as oc,A as qa,E as ac,G as sc,H as Ya,J as lc,K as uc,L as Za,M as cc,T as dc,N as hc,O as dn,Q as pc,R as fc,U as Qa,V as gc,X as mc,Y as yc,Z as bc,_ as vc,$ as wc,a0 as xc,a1 as Sc,a2 as Nc,a3 as _c,a4 as At,a5 as Rc,a6 as Xa,a7 as Fn,a8 as uo,a9 as co,aa as kc,ab as Cc,ac as Ac,ad as Tc,ae as Ec,af as Or,ag as Lc,ah as Oc,ai as jc,aj as Mc,ak as Pc,al as $c,am as zn,an as Ic,ao as Dc,ap as Bc,aq as zc,ar as Fc,as as H}from"./chakra-xNcrfRXW.js";import{g as ho,a as Gc,r as $,b as P,d as ci,u as fe,i as Uc,o as Qo,e as es,f as ts,h as Wc,j as Vc,k as Hc,l as Jc,m as Kc,P as qc,I as Yc}from"./react-D-_si4LB.js";function Sx(){import.meta.url,import("_").catch(()=>1),async function*(){}().next()}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function r(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(o){if(o.ep)return;o.ep=!0;const a=r(o);fetch(o.href,a)}})();var Zc=function(n,e,r,i){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function l(d){try{c(i.next(d))}catch(h){s(h)}}function u(d){try{c(i.throw(d))}catch(h){s(h)}}function c(d){d.done?a(d.value):o(d.value).then(l,u)}c((i=i.apply(n,e||[])).next())})};const ns=n=>new Promise(e=>{setTimeout(e,n,"Timeout after ".concat(n/1e3," seconds"))}),Qc=n=>new Promise(e=>{const r=new FileReader;r.onloadend=()=>e(r.result),r.readAsDataURL(n)}),Xc=n=>{let e,r=!1;return i=>Zc(void 0,void 0,void 0,function*(){return e&&(r||!i)?e:(e=n(),r=!0,e.then(o=>(r=!1,o)).catch(o=>{throw e=null,o}))})},po=n=>{let e=0;for(let r=0;r{const e=(n&16777215).toString(16).toUpperCase();return"#"+"00000".substring(0,6-e.length)+e};var Lt;(function(n){n.DEV="DEV",n.UAT="UAT",n.PRD="PRD"})(Lt||(Lt={}));const rs="rmg-runtime__language",is="rmg-runtime__colourMode",jr="rmg-runtime__allowAnalytics",er="rmg-unknown",ed="railmapgen.github.io",td="rmg-home";let Mr=er,os=fo(po(er));const nd=n=>{Mr=n,os=fo(po(n))},dr=()=>"[".concat(Mr,"]"),hr=()=>os,mt=(n,e,r)=>(...i)=>{typeof i[0]=="string"?n("%c".concat(e(),"%c ").concat(i[0]),"color: ".concat(r()),"",...i.slice(1)):n("%c".concat(e(),"%c"),"color: ".concat(r()),"",...i)},rd={debug:mt(console.debug,dr,hr),info:mt(console.info,dr,hr),warn:mt(console.warn,dr,hr),error:mt(console.error,dr,hr)},Cn=()=>Mr===er?"[runtime]":"[runtime@".concat(Mr,"]"),id=fo(po("runtime")),An=()=>id,me={setup:nd,logger:rd,debug:mt(console.debug,Cn,An),info:mt(console.info,Cn,An),warn:mt(console.warn,Cn,An),error:mt(console.error,Cn,An),group:mt(console.group,Cn,An),groupEnd:console.groupEnd};var as=function(n,e,r,i){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function l(d){try{c(i.next(d))}catch(h){s(h)}}function u(d){try{c(i.throw(d))}catch(h){s(h)}}function c(d){d.done?a(d.value):o(d.value).then(l,u)}c((i=i.apply(n,e||[])).next())})};let go,di,mo,yo,bo;const ss=()=>{go=!1,di=er,mo="unknown",yo=Lt.PRD,bo="unknown"},od=()=>as(void 0,void 0,void 0,function*(){const n=window.location.pathname.split("/")[1],e=n?"/".concat(n,"/info.json"):"/info.json",r=yield fetch(e);if(r.ok){const i=yield r.json();me.info("Received info.json",i),di=i.component,mo=i.version,yo=i.environment,bo=i.instance}else throw new Error("Failed to fetch config from ".concat(e))}),ad=()=>as(void 0,void 0,void 0,function*(){try{me.group("Loading config...");const n=yield Promise.race([od(),ns(10*1e3)]);n?me.error("❌ Failed to load config.",n):(go=!0,me.info("✅ Config loaded!"))}catch(n){me.error("❌ Failed to load config.",n)}finally{me.groupEnd()}}),sd=()=>go,ld=()=>ls()?td:di,ud=()=>mo,cd=()=>yo,dd=()=>bo,ls=()=>di===ed;ss();const Le={loadWithTimeout:ad,isInitialised:sd,getComponent:ld,getVersion:ud,getEnvironment:cd,getInstance:dd,isRMT:ls,_resetConfig:ss};window.dataLayer=window.dataLayer||[];const hd=()=>{const n=document.createElement("script");n.async=!0,n.src="https://www.googletagmanager.com/gtag/js?id=G-2HP8Y4MRRQ",document.head.append(n)};function Ui(...n){if(Le.getEnvironment()!==Lt.DEV)return window.dataLayer.push(arguments);me.info("Not going to send event in DEV environment",n)}const pd=(n,e={})=>{Ui("event",n,e)},fd=()=>{hd(),Ui("js",new Date),Ui("config","G-2HP8Y4MRRQ",{appName:Le.getComponent(),version:Le.getVersion(),environment:Le.getEnvironment(),instance:Le.getInstance()})},Pr={init:fd,customEvent:pd},gd="rmg-runtime-channel",Rr={};let Gn;try{Gn=new BroadcastChannel(gd),Gn.onmessage=n=>{var e;const{event:r,data:i,frameId:o}=n.data;(e=Rr[r])===null||e===void 0||e.forEach(a=>a(i,o))}}catch(n){me.warn("Failed to initiate broadcast channel. Some features may be unavailable.",n)}const md=(n,e)=>{var r;me.debug("Broadcasting event ".concat(n," with data"),e),Gn==null||Gn.postMessage({event:n,data:e,frameId:(r=window.frameElement)===null||r===void 0?void 0:r.id})},yd=(n,e)=>{var r;n in Rr?(r=Rr[n])===null||r===void 0||r.push(e):Rr[n]=[e]},Se={postEvent:md,onMessage:yd},us="TOGGLE_NAV_MENU",cs="OPEN_APP",ds="CLOSE_APP",hs="UPDATE_APP_METADATA",ps="UPDATE_URL",kr=()=>!window.frameElement,bd=()=>{var n;return!!(!((n=window.frameElement)===null||n===void 0)&&n.closest(".show-menu"))},vd=()=>{if(!kr()){const e=document.createElement("style");e.textContent="body{padding: 0;}",document.head.appendChild(e)}const n=document.createElement("style");n.textContent=".rmg-window__header:not(.rmg-window__app-clip-header){margin-left: 40px;}",!kr()&&!bd()&&document.head.appendChild(n),kr()||Se.onMessage(us,e=>{if(e)try{document.head.removeChild(n)}catch(r){me.warn("Unable to remove indent style from RmgWindowHeader",r)}else document.head.appendChild(n)})},wd=n=>{Se.postEvent(cs,n)},xd=n=>{Se.postEvent(ds,n)},Sd=n=>{Se.postEvent(hs,n)},Nd=n=>{Se.postEvent(ps,n)},_d=n=>{Se.onMessage(cs,n)},Rd=n=>{Se.onMessage(ds,n)},kd=n=>{Se.onMessage(hs,n)},Cd=n=>{Se.onMessage(ps,n)},Ad=n=>{Se.postEvent(us,n)},Je={isStandaloneWindow:kr,injectUITools:vd,openApp:wd,onAppOpen:_d,closeApp:xd,onAppClose:Rd,updateAppMetadata:Sd,onAppMetadataUpdate:kd,updateUrl:Nd,onUrlUpdate:Cd,toggleNavMenu:Ad},fs="SET_LANGUAGE",gs="SET_COLOUR_MODE",Td=n=>{Se.postEvent(fs,n),window.localStorage.setItem(rs,n)},Ed=()=>window.localStorage.getItem(rs)||"en",Ld=n=>{Se.onMessage(fs,n)},ms=["light","dark","system"],Od=n=>{ms.includes(n)&&(Se.postEvent(gs,n),window.localStorage.setItem(is,n))},jd=()=>{const n=window.localStorage.getItem(is);return n&&ms.includes(n)?n:"system"},Md=n=>{Se.onMessage(gs,n)},Pd=()=>window.localStorage.getItem(jr)!==null,ys=()=>window.localStorage.getItem(jr)==="true",$d=n=>{const e=ys();return n?(e||(window.localStorage.setItem(jr,n.toString()),Pr.init()),{refreshRequired:!1}):e?(window.localStorage.setItem(jr,n.toString()),{refreshRequired:!0}):{refreshRequired:!1}},Ye={setLanguage:Td,getLanguage:Ed,onLanguageChange:Ld,setColourMode:Od,getColourMode:jd,onColourModeChange:Md,isAnalyticsQADone:Pd,isAllowAnalytics:ys,allowAnalytics:$d},Id=new Date().getTime();function Dd(){const n=Le.getComponent(),e=window.localStorage.getItem(n+"__startTime");return e===null?new Date().getTime()-Id:new Date().getTime()-Number(e)}const Bd={getMsSinceStartUp:Dd},Cr={},gn=()=>{const n=Le.getComponent();if(n===er)throw new Error("Unable to clear storage for unknown app");return n};window.addEventListener("storage",n=>{var e;const{key:r,newValue:i}=n;r&&((e=Cr[r])===null||e===void 0||e.forEach(o=>o(i)))});const zd=(n,e)=>{var r;const i="".concat(gn(),"__").concat(n);i in Cr?(r=Cr[i])===null||r===void 0||r.push(e):Cr[i]=[e]},Fd=n=>{const e=gn();return window.localStorage.getItem("".concat(e,"__").concat(n))},Gd=()=>{const n=gn(),e={};let r=0;for(;r{const r=gn();window.localStorage.setItem("".concat(r,"__").concat(n),e)},Wd=n=>{const e=gn();window.localStorage.removeItem("".concat(e,"__").concat(n))},Vd=()=>{const n=gn();let e=0;for(;e1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,r)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=e||Hd,this.options=r,this.debug=r.debug}log(){for(var e=arguments.length,r=new Array(e),i=0;i{this.observers[i]||(this.observers[i]=new Map);const o=this.observers[i].get(r)||0;this.observers[i].set(r,o+1)}),this}off(e,r){if(this.observers[e]){if(!r){delete this.observers[e];return}this.observers[e].delete(r)}}emit(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o{let[l,u]=s;for(let c=0;c{let[l,u]=s;for(let c=0;c{n=i,e=o});return r.resolve=n,r.reject=e,r}function Xo(n){return n==null?"":""+n}function Jd(n,e,r){n.forEach(i=>{e[i]&&(r[i]=e[i])})}const Kd=/###/g;function Un(n,e,r){function i(l){return l&&l.indexOf("###")>-1?l.replace(Kd,"."):l}function o(){return!n||typeof n=="string"}const a=typeof e!="string"?e:e.split(".");let s=0;for(;s":">",'"':""","'":"'","/":"/"};function Qd(n){return typeof n=="string"?n.replace(/[&<>"'\/]/g,e=>Zd[e]):n}class Xd{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const r=this.regExpMap.get(e);if(r!==void 0)return r;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const eh=[" ",",","?","!",";"],th=new Xd(20);function nh(n,e,r){e=e||"",r=r||"";const i=eh.filter(s=>e.indexOf(s)<0&&r.indexOf(s)<0);if(i.length===0)return!0;const o=th.getRegExp("(".concat(i.map(s=>s==="?"?"\\?":s).join("|"),")"));let a=!o.test(n);if(!a){const s=n.indexOf(r);s>0&&!o.test(n.substring(0,s))&&(a=!0)}return a}function Wi(n,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return n[e];const i=e.split(r);let o=n;for(let a=0;a-1&&u0?n.replace("_","-"):n}class ta extends hi{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const r=this.options.ns.indexOf(e);r>-1&&this.options.ns.splice(r,1)}getResource(e,r,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.indexOf(".")>-1?l=e.split("."):(l=[e,r],i&&(Array.isArray(i)?l.push(...i):typeof i=="string"&&a?l.push(...i.split(a)):l.push(i)));const u=Ir(this.data,l);return!u&&!r&&!i&&e.indexOf(".")>-1&&(e=l[0],r=l[1],i=l.slice(2).join(".")),u||!s||typeof i!="string"?u:Wi(this.data&&this.data[e]&&this.data[e][r],i,a)}addResource(e,r,i,o){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let l=[e,r];i&&(l=l.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(l=e.split("."),o=r,r=l[1]),this.addNamespaces(r),ea(this.data,l,o),a.silent||this.emit("added",e,r,i,o)}addResources(e,r,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in i)(typeof i[a]=="string"||Array.isArray(i[a]))&&this.addResource(e,r,a,i[a],{silent:!0});o.silent||this.emit("added",e,r,i)}addResourceBundle(e,r,i,o,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[e,r];e.indexOf(".")>-1&&(l=e.split("."),o=i,i=r,r=l[1]),this.addNamespaces(r);let u=Ir(this.data,l)||{};s.skipCopy||(i=JSON.parse(JSON.stringify(i))),o?bs(u,i,a):u={...u,...i},ea(this.data,l,u),s.silent||this.emit("added",e,r,i)}removeResourceBundle(e,r){this.hasResourceBundle(e,r)&&delete this.data[e][r],this.removeNamespaces(r),this.emit("removed",e,r)}hasResourceBundle(e,r){return this.getResource(e,r)!==void 0}getResourceBundle(e,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,r)}:this.getResource(e,r)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const r=this.getDataByLanguage(e);return!!(r&&Object.keys(r)||[]).find(o=>r[o]&&Object.keys(r[o]).length>0)}toJSON(){return this.data}}var vs={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,r,i,o){return n.forEach(a=>{this.processors[a]&&(e=this.processors[a].process(e,r,i,o))}),e}};const na={};class Br extends hi{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Jd(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=lt.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const i=this.resolve(e,r);return i&&i.res!==void 0}extractFromKey(e,r){let i=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=r.ns||this.options.defaultNS||[];const s=i&&e.indexOf(i)>-1,l=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!nh(e,i,o);if(s&&!l){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:a};const c=e.split(i);(i!==o||i===o&&this.options.ns.indexOf(c[0])>-1)&&(a=c.shift()),e=c.join(o)}return typeof a=="string"&&(a=[a]),{key:e,namespaces:a}}translate(e,r,i){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const o=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(e[e.length-1],r),u=l[l.length-1],c=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(d){const j=r.nsSeparator||this.options.nsSeparator;return o?{res:"".concat(u).concat(j).concat(s),usedKey:s,exactUsedKey:s,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:"".concat(u).concat(j).concat(s)}return o?{res:s,usedKey:s,exactUsedKey:s,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:s}const h=this.resolve(e,r);let p=h&&h.res;const m=h&&h.usedKey||s,y=h&&h.exactUsedKey||s,w=Object.prototype.toString.apply(p),_=["[object Number]","[object Function]","[object RegExp]"],N=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,R=!this.i18nFormat||this.i18nFormat.handleAsObject;if(R&&p&&(typeof p!="string"&&typeof p!="boolean"&&typeof p!="number")&&_.indexOf(w)<0&&!(typeof N=="string"&&Array.isArray(p))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const j=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,p,{...r,ns:l}):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");return o?(h.res=j,h.usedParams=this.getUsedParamsDetails(r),h):j}if(a){const j=Array.isArray(p),A=j?[]:{},G=j?y:m;for(const T in p)if(Object.prototype.hasOwnProperty.call(p,T)){const U="".concat(G).concat(a).concat(T);A[T]=this.translate(U,{...r,joinArrays:!1,ns:l}),A[T]===U&&(A[T]=p[T])}p=A}}else if(R&&typeof N=="string"&&Array.isArray(p))p=p.join(N),p&&(p=this.extendTranslation(p,e,r,i));else{let j=!1,A=!1;const G=r.count!==void 0&&typeof r.count!="string",T=Br.hasDefaultValue(r),U=G?this.pluralResolver.getSuffix(c,r.count,r):"",L=r.ordinal&&G?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",I=G&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),W=I&&r["defaultValue".concat(this.options.pluralSeparator,"zero")]||r["defaultValue".concat(U)]||r["defaultValue".concat(L)]||r.defaultValue;!this.isValidLookup(p)&&T&&(j=!0,p=W),this.isValidLookup(p)||(A=!0,p=s);const te=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&A?void 0:p,Q=T&&W!==p&&this.options.updateMissing;if(A||j||Q){if(this.logger.log(Q?"updateKey":"missingKey",c,u,s,Q?W:p),a){const Ne=this.resolve(s,{...r,keySeparator:!1});Ne&&Ne.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Be=[];const Xe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Xe&&Xe[0])for(let Ne=0;Ne{const ze=T&&Pe!==p?Pe:te;this.options.missingKeyHandler?this.options.missingKeyHandler(Ne,u,We,ze,Q,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(Ne,u,We,ze,Q,r),this.emit("missingKey",Ne,u,We,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&G?Be.forEach(Ne=>{const We=this.pluralResolver.getSuffixes(Ne,r);I&&r["defaultValue".concat(this.options.pluralSeparator,"zero")]&&We.indexOf("".concat(this.options.pluralSeparator,"zero"))<0&&We.push("".concat(this.options.pluralSeparator,"zero")),We.forEach(Pe=>{et([Ne],s+Pe,r["defaultValue".concat(Pe)]||W)})}):et(Be,s,W))}p=this.extendTranslation(p,e,r,h,i),A&&p===s&&this.options.appendNamespaceToMissingKey&&(p="".concat(u,":").concat(s)),(A||j)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(s):s,j?p:void 0):p=this.options.parseMissingKeyHandler(p))}return o?(h.res=p,h.usedParams=this.getUsedParamsDetails(r),h):p}extendTranslation(e,r,i,o,a){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const c=typeof e=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(c){const p=e.match(this.interpolator.nestingRegexp);d=p&&p.length}let h=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,i.lng||this.language,i),c){const p=e.match(this.interpolator.nestingRegexp),m=p&&p.length;d1&&arguments[1]!==void 0?arguments[1]:{},i,o,a,s,l;return typeof e=="string"&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(i))return;const c=this.extractFromKey(u,r),d=c.key;o=d;let h=c.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const p=r.count!==void 0&&typeof r.count!="string",m=p&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),y=r.context!==void 0&&(typeof r.context=="string"||typeof r.context=="number")&&r.context!=="",w=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);h.forEach(_=>{this.isValidLookup(i)||(l=_,!na["".concat(w[0],"-").concat(_)]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(na["".concat(w[0],"-").concat(_)]=!0,this.logger.warn('key "'.concat(o,'" for languages "').concat(w.join(", "),'" won\'t get resolved as namespace "').concat(l,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(N=>{if(this.isValidLookup(i))return;s=N;const R=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(R,d,N,_,r);else{let j;p&&(j=this.pluralResolver.getSuffix(N,r.count,r));const A="".concat(this.options.pluralSeparator,"zero"),G="".concat(this.options.pluralSeparator,"ordinal").concat(this.options.pluralSeparator);if(p&&(R.push(d+j),r.ordinal&&j.indexOf(G)===0&&R.push(d+j.replace(G,this.options.pluralSeparator)),m&&R.push(d+A)),y){const T="".concat(d).concat(this.options.contextSeparator).concat(r.context);R.push(T),p&&(R.push(T+j),r.ordinal&&j.indexOf(G)===0&&R.push(T+j.replace(G,this.options.pluralSeparator)),m&&R.push(T+A))}}let M;for(;M=R.pop();)this.isValidLookup(i)||(a=M,i=this.getResource(N,_,M,r))}))})}),{res:i,usedKey:o,exactUsedKey:a,usedLng:s,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,r,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,r,i,o):this.resourceStore.getResource(e,r,i,o)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&typeof e.replace!="string";let o=i?e.replace:e;if(i&&typeof e.count<"u"&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!i){o={...o};for(const a of r)delete o[a]}return o}static hasDefaultValue(e){const r="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&r===i.substring(0,r.length)&&e[i]!==void 0)return!0;return!1}}function ji(n){return n.charAt(0).toUpperCase()+n.slice(1)}class ra{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=lt.create("languageUtils")}getScriptPartFromCode(e){if(e=Dr(e),!e||e.indexOf("-")<0)return null;const r=e.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(e){if(e=Dr(e),!e||e.indexOf("-")<0)return e;const r=e.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const r=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(o=>o.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=ji(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=ji(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=ji(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let r;return e.forEach(i=>{if(r)return;const o=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(o))&&(r=o)}),!r&&this.options.supportedLngs&&e.forEach(i=>{if(r)return;const o=this.getLanguagePartFromCode(i);if(this.isSupportedCode(o))return r=o;r=this.options.supportedLngs.find(a=>{if(a===o)return a;if(!(a.indexOf("-")<0&&o.indexOf("-")<0)&&(a.indexOf("-")>0&&o.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===o||a.indexOf(o)===0&&o.length>1))return a})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(e,r){if(!e)return[];if(typeof e=="function"&&(e=e(r)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!r)return e.default||[];let i=e[r];return i||(i=e[this.getScriptPartFromCode(r)]),i||(i=e[this.formatLanguageCode(r)]),i||(i=e[this.getLanguagePartFromCode(r)]),i||(i=e.default),i||[]}toResolveHierarchy(e,r){const i=this.getFallbackCodes(r||this.options.fallbackLng||[],e),o=[],a=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn("rejecting language code not found in supportedLngs: ".concat(s)))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):typeof e=="string"&&a(this.formatLanguageCode(e)),i.forEach(s=>{o.indexOf(s)<0&&a(this.formatLanguageCode(s))}),o}}let rh=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],ih={1:function(n){return+(n>1)},2:function(n){return+(n!=1)},3:function(n){return 0},4:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},5:function(n){return n==0?0:n==1?1:n==2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5},6:function(n){return n==1?0:n>=2&&n<=4?1:2},7:function(n){return n==1?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},8:function(n){return n==1?0:n==2?1:n!=8&&n!=11?2:3},9:function(n){return+(n>=2)},10:function(n){return n==1?0:n==2?1:n<7?2:n<11?3:4},11:function(n){return n==1||n==11?0:n==2||n==12?1:n>2&&n<20?2:3},12:function(n){return+(n%10!=1||n%100==11)},13:function(n){return+(n!==0)},14:function(n){return n==1?0:n==2?1:n==3?2:3},15:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?1:2},16:function(n){return n%10==1&&n%100!=11?0:n!==0?1:2},17:function(n){return n==1||n%10==1&&n%100!=11?0:1},18:function(n){return n==0?0:n==1?1:2},19:function(n){return n==1?0:n==0||n%100>1&&n%100<11?1:n%100>10&&n%100<20?2:3},20:function(n){return n==1?0:n==0||n%100>0&&n%100<20?1:2},21:function(n){return n%100==1?1:n%100==2?2:n%100==3||n%100==4?3:0},22:function(n){return n==1?0:n==2?1:(n<0||n>10)&&n%10==0?2:3}};const oh=["v1","v2","v3"],ah=["v4"],ia={zero:0,one:1,two:2,few:3,many:4,other:5};function sh(){const n={};return rh.forEach(e=>{e.lngs.forEach(r=>{n[r]={numbers:e.nr,plurals:ih[e.fc]}})}),n}class lh{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=r,this.logger=lt.create("pluralResolver"),(!this.options.compatibilityJSON||ah.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=sh()}addRule(e,r){this.rules[e]=r}getRule(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Dr(e==="dev"?"en":e),{type:r.ordinal?"ordinal":"cardinal"})}catch(i){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(o=>"".concat(r).concat(o))}getSuffixes(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,r);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((o,a)=>ia[o]-ia[a]).map(o=>"".concat(this.options.prepend).concat(r.ordinal?"ordinal".concat(this.options.prepend):"").concat(o)):i.numbers.map(o=>this.getSuffix(e,o,r)):[]}getSuffix(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(e,i);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(i.ordinal?"ordinal".concat(this.options.prepend):"").concat(o.select(r)):this.getSuffixRetroCompatible(o,r):(this.logger.warn("no plural rule found for: ".concat(e)),"")}getSuffixRetroCompatible(e,r){const i=e.noAbs?e.plurals(r):e.plurals(Math.abs(r));let o=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const a=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?"_plural_".concat(o.toString()):a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!oh.includes(this.options.compatibilityJSON)}}function oa(n,e,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=Yd(n,e,r);return!a&&o&&typeof r=="string"&&(a=Wi(n,r,i),a===void 0&&(a=Wi(e,r,i))),a}class uh{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=lt.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(r=>r),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:r,escapeValue:i,useRawValueToEscape:o,prefix:a,prefixEscaped:s,suffix:l,suffixEscaped:u,formatSeparator:c,unescapeSuffix:d,unescapePrefix:h,nestingPrefix:p,nestingPrefixEscaped:m,nestingSuffix:y,nestingSuffixEscaped:w,nestingOptionsSeparator:_,maxReplaces:N,alwaysFormat:R}=e.interpolation;this.escape=r!==void 0?r:Qd,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?nn(a):s||"{{",this.suffix=l?nn(l):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=d?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=p?nn(p):m||nn("$t("),this.nestingSuffix=y?nn(y):w||nn(")"),this.nestingOptionsSeparator=_||",",this.maxReplaces=N||1e3,this.alwaysFormat=R!==void 0?R:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(r,i)=>r&&r.source===i?(r.lastIndex=0,r):new RegExp(i,"g");this.regexp=e(this.regexp,"".concat(this.prefix,"(.+?)").concat(this.suffix)),this.regexpUnescape=e(this.regexpUnescape,"".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix)),this.nestingRegexp=e(this.nestingRegexp,"".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix))}interpolate(e,r,i,o){let a,s,l;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(y){return y.replace(/\$/g,"$$$$")}const d=y=>{if(y.indexOf(this.formatSeparator)<0){const R=oa(r,u,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(R,void 0,i,{...o,...r,interpolationkey:y}):R}const w=y.split(this.formatSeparator),_=w.shift().trim(),N=w.join(this.formatSeparator).trim();return this.format(oa(r,u,_,this.options.keySeparator,this.options.ignoreJSONStructure),N,i,{...o,...r,interpolationkey:_})};this.resetRegExp();const h=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,p=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>c(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?c(this.escape(y)):c(y)}].forEach(y=>{for(l=0;a=y.regex.exec(e);){const w=a[1].trim();if(s=d(w),s===void 0)if(typeof h=="function"){const N=h(e,a,o);s=typeof N=="string"?N:""}else if(o&&Object.prototype.hasOwnProperty.call(o,w))s="";else if(p){s=a[0];continue}else this.logger.warn("missed to pass in variable ".concat(w," for interpolating ").concat(e)),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=Xo(s));const _=y.safeValue(s);if(e=e.replace(a[0],_),p?(y.regex.lastIndex+=s.length,y.regex.lastIndex-=a[0].length):y.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,s;function l(u,c){const d=this.nestingOptionsSeparator;if(u.indexOf(d)<0)return u;const h=u.split(new RegExp("".concat(d,"[ ]*{")));let p="{".concat(h[1]);u=h[0],p=this.interpolate(p,s);const m=p.match(/'/g),y=p.match(/"/g);(m&&m.length%2===0&&!y||y.length%2!==0)&&(p=p.replace(/'/g,'"'));try{s=JSON.parse(p),c&&(s={...c,...s})}catch(w){return this.logger.warn("failed parsing options string in nesting for key ".concat(u),w),"".concat(u).concat(d).concat(p)}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,u}for(;o=this.nestingRegexp.exec(e);){let u=[];s={...i},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let c=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const d=o[1].split(this.formatSeparator).map(h=>h.trim());o[1]=d.shift(),u=d,c=!0}if(a=r(l.call(this,o[1].trim(),s),s),a&&o[0]===e&&typeof a!="string")return a;typeof a!="string"&&(a=Xo(a)),a||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(e)),a=""),c&&(a=u.reduce((d,h)=>this.format(d,h,i.lng,{...i,interpolationkey:o[1].trim()}),a.trim())),e=e.replace(o[0],a),this.regexp.lastIndex=0}return e}}function ch(n){let e=n.toLowerCase().trim();const r={};if(n.indexOf("(")>-1){const i=n.split("(");e=i[0].toLowerCase().trim();const o=i[1].substring(0,i[1].length-1);e==="currency"&&o.indexOf(":")<0?r.currency||(r.currency=o.trim()):e==="relativetime"&&o.indexOf(":")<0?r.range||(r.range=o.trim()):o.split(";").forEach(s=>{if(s){const[l,...u]=s.split(":"),c=u.join(":").trim().replace(/^'+|'+$/g,""),d=l.trim();r[d]||(r[d]=c),c==="false"&&(r[d]=!1),c==="true"&&(r[d]=!0),isNaN(c)||(r[d]=parseInt(c,10))}})}return{formatName:e,formatOptions:r}}function rn(n){const e={};return function(i,o,a){const s=o+JSON.stringify(a);let l=e[s];return l||(l=n(Dr(o),a),e[s]=l),l(i)}}class dh{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=lt.create("formatter"),this.options=e,this.formats={number:rn((r,i)=>{const o=new Intl.NumberFormat(r,{...i});return a=>o.format(a)}),currency:rn((r,i)=>{const o=new Intl.NumberFormat(r,{...i,style:"currency"});return a=>o.format(a)}),datetime:rn((r,i)=>{const o=new Intl.DateTimeFormat(r,{...i});return a=>o.format(a)}),relativetime:rn((r,i)=>{const o=new Intl.RelativeTimeFormat(r,{...i});return a=>o.format(a,i.range||"day")}),list:rn((r,i)=>{const o=new Intl.ListFormat(r,{...i});return a=>o.format(a)})},this.init(e)}init(e){const i=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}add(e,r){this.formats[e.toLowerCase().trim()]=r}addCached(e,r){this.formats[e.toLowerCase().trim()]=rn(r)}format(e,r,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return r.split(this.formatSeparator).reduce((l,u)=>{const{formatName:c,formatOptions:d}=ch(u);if(this.formats[c]){let h=l;try{const p=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},m=p.locale||p.lng||o.locale||o.lng||i;h=this.formats[c](l,m,{...d,...o,...p})}catch(p){this.logger.warn(p)}return h}else this.logger.warn("there was no format function for ".concat(c));return l},e)}}function hh(n,e){n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)}class ph extends hi{constructor(e,r,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=r,this.services=i,this.languageUtils=i.languageUtils,this.options=o,this.logger=lt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,o.backend,o)}queueLoad(e,r,i,o){const a={},s={},l={},u={};return e.forEach(c=>{let d=!0;r.forEach(h=>{const p="".concat(c,"|").concat(h);!i.reload&&this.store.hasResourceBundle(c,h)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?s[p]===void 0&&(s[p]=!0):(this.state[p]=1,d=!1,s[p]===void 0&&(s[p]=!0),a[p]===void 0&&(a[p]=!0),u[h]===void 0&&(u[h]=!0)))}),d||(l[c]=!0)}),(Object.keys(a).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(u)}}loaded(e,r,i){const o=e.split("|"),a=o[0],s=o[1];r&&this.emit("failedLoading",a,s,r),i&&this.store.addResourceBundle(a,s,i,void 0,void 0,{skipCopy:!0}),this.state[e]=r?-1:2;const l={};this.queue.forEach(u=>{qd(u.loaded,[a],s),hh(u,e),r&&u.errors.push(r),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(c=>{l[c]||(l[c]={});const d=u.loaded[c];d.length&&d.forEach(h=>{l[c][h]===void 0&&(l[c][h]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(u=>!u.done)}read(e,r,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:r,fcName:i,tried:o,wait:a,callback:s});return}this.readingCalls++;const l=(c,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(c&&d&&o{this.read.call(this,e,r,i,o+1,a*2,s)},a);return}s(c,d)},u=this.backend[i].bind(this.backend);if(u.length===2){try{const c=u(e,r);c&&typeof c.then=="function"?c.then(d=>l(null,d)).catch(l):l(null,c)}catch(c){l(c)}return}return u(e,r,l)}prepareLoading(e,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof r=="string"&&(r=[r]);const a=this.queueLoad(e,r,i,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(s=>{this.loadOne(s)})}load(e,r,i){this.prepareLoading(e,r,{},i)}reload(e,r,i){this.prepareLoading(e,r,{reload:!0},i)}loadOne(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),o=i[0],a=i[1];this.read(o,a,"read",void 0,void 0,(s,l)=>{s&&this.logger.warn("".concat(r,"loading namespace ").concat(a," for language ").concat(o," failed"),s),!s&&l&&this.logger.log("".concat(r,"loaded namespace ").concat(a," for language ").concat(o),l),this.loaded(e,s,l)})}saveMissing(e,r,i,o,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn('did not save key "'.concat(i,'" as the namespace "').concat(r,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend&&this.backend.create){const u={...s,isUpdate:a},c=this.backend.create.bind(this.backend);if(c.length<6)try{let d;c.length===5?d=c(e,r,i,o,u):d=c(e,r,i,o),d&&typeof d.then=="function"?d.then(h=>l(null,h)).catch(l):l(null,d)}catch(d){l(d)}else c(e,r,i,o,l,u)}!e||!e[0]||this.store.addResource(e[0],r,i,o)}}}function aa(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let r={};if(typeof e[1]=="object"&&(r=e[1]),typeof e[1]=="string"&&(r.defaultValue=e[1]),typeof e[2]=="string"&&(r.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const i=e[3]||e[2];Object.keys(i).forEach(o=>{r[o]=i[o]})}return r},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function sa(n){return typeof n.ns=="string"&&(n.ns=[n.ns]),typeof n.fallbackLng=="string"&&(n.fallbackLng=[n.fallbackLng]),typeof n.fallbackNS=="string"&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&n.supportedLngs.indexOf("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n}function pr(){}function fh(n){Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(r=>{typeof n[r]=="function"&&(n[r]=n[r].bind(n))})}class Yn extends hi{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=sa(e),this.services={},this.logger=lt,this.modules={external:[]},fh(this),r&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,r),this;setTimeout(()=>{this.init(e,r)},0)}}init(){var e=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(i=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(typeof r.ns=="string"?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const o=aa();this.options={...o,...this.options,...sa(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);function a(d){return d?typeof d=="function"?new d:d:null}if(!this.options.isClone){this.modules.logger?lt.init(a(this.modules.logger),this.options):lt.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=dh);const h=new ra(this.options);this.store=new ta(this.options.resources,this.options);const p=this.services;p.logger=lt,p.resourceStore=this.store,p.languageUtils=h,p.pluralResolver=new lh(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(p.formatter=a(d),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new uh(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new ph(a(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(m){for(var y=arguments.length,w=new Array(y>1?y-1:0),_=1;_1?y-1:0),_=1;_{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,i||(i=pr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return e.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return e.store[d](...arguments),e}});const u=Tn(),c=()=>{const d=(h,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(p),i(h,p)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),u}loadResources(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pr;const o=typeof e=="string"?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const a=[],s=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(c=>{c!=="cimode"&&a.indexOf(c)<0&&a.push(c)})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>s(u)),this.options.preload&&this.options.preload.forEach(l=>s(l)),this.services.backendConnector.load(a,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(l)})}else i(null)}reloadResources(e,r,i){const o=Tn();return e||(e=this.languages),r||(r=this.options.ns),i||(i=pr),this.services.backendConnector.reload(e,r,a=>{o.resolve(),i(a)}),o}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&vs.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let r=0;r-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,r){var i=this;this.isLanguageChangingTo=e;const o=Tn();this.emit("languageChanging",e);const a=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},s=(u,c)=>{c?(a(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,o.resolve(function(){return i.t(...arguments)}),r&&r(u,function(){return i.t(...arguments)})},l=u=>{!e&&!u&&this.services.languageDetector&&(u=[]);const c=typeof u=="string"?u:this.services.languageUtils.getBestMatchFromCodes(u);c&&(this.language||a(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,d=>{s(d,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e),o}getFixedT(e,r,i){var o=this;const a=function(s,l){let u;if(typeof l!="object"){for(var c=arguments.length,d=new Array(c>2?c-2:0),h=2;h"".concat(u.keyPrefix).concat(p).concat(y)):m=u.keyPrefix?"".concat(u.keyPrefix).concat(p).concat(s):s,o.t(m,u)};return typeof e=="string"?a.lng=e:a.lngs=e,a.ns=r,a.keyPrefix=i,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=r.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const s=(l,u)=>{const c=this.services.backendConnector.state["".concat(l,"|").concat(u)];return c===-1||c===2};if(r.precheck){const l=r.precheck(this,s);if(l!==void 0)return l}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(i,e)&&(!o||s(a,e)))}loadNamespaces(e,r){const i=Tn();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{i.resolve(),r&&r(o)}),i):(r&&r(),Promise.resolve())}loadLanguages(e,r){const i=Tn();typeof e=="string"&&(e=[e]);const o=this.options.preload||[],a=e.filter(s=>o.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=o.concat(a),this.loadResources(s=>{i.resolve(),r&&r(s)}),i):(r&&r(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services&&this.services.languageUtils||new ra(aa());return r.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new Yn(e,r)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pr;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},a=new Yn(o);return(e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},i&&(a.store=new ta(this.store.data,o),a.services.resourceStore=a.store),a.translator=new Br(a.services,o),a.translator.on("*",function(l){for(var u=arguments.length,c=new Array(u>1?u-1:0),d=1;dsn,mh=n=>{Ye.onLanguageChange(e=>n.changeLanguage(e))};class yh{constructor(){this._appName="RMG",this._lng=void 0,this._defaultResources={},this._resources={}}use(e){return Te.use(e),this}withAppName(e){return this._appName=e,this}withLng(e){return this._lng=e,this}withDefaultResource(e){return Object.entries(e).forEach(([r,i])=>{this._defaultResources[r]=i}),this}withResource(e,r){return this._resources[e]=r,this}combineResource(){const e={};return Object.entries(this._defaultResources).forEach(([r,i])=>{e[r]={translation:i}}),Object.entries(this._resources).forEach(([r,i])=>{r in e?e[r].translation=Object.assign(Object.assign({},e[r].translation),i):e[r]={translation:i}}),e}build(){return sn=Te.createInstance({lng:this._lng,fallbackLng:{"zh-CN":["zh-Hans","zh-Hant","en"],"zh-HK":["zh-Hant","zh-Hans","en"],"zh-TW":["zh-Hant","zh-Hans","en"],default:["en"]},resources:this.combineResource()},(e,r)=>{var i;if(e){me.error("unexpected error occurs while initialising i18n",e);return}document.title=r(this._appName),document.documentElement.lang=(i=this._lng)!==null&&i!==void 0?i:"en"}),sn.on("languageChanged",e=>{document.title=sn.t(this._appName),document.documentElement.lang=e}),mh(sn),sn}}var Zn=function(n,e,r,i){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function l(d){try{c(i.next(d))}catch(h){s(h)}}function u(d){try{c(i.throw(d))}catch(h){s(h)}}function c(d){d.done?a(d.value):o(d.value).then(l,u)}c((i=i.apply(n,e||[])).next())})};let Tt={};const bh=()=>Tt,ws="LOAD_REMOTE_FONT",vh=(n,e)=>{Se.postEvent(ws,{family:n,definition:e})},wh=n=>{Se.onMessage(ws,n)},vo=n=>n.source.startsWith("local"),xh=n=>{var e;const r=(e=n.source.match(/url\(['"](\S+)['"]\)/))===null||e===void 0?void 0:e[1];if(!r)throw new Error("Invalid URL in source "+n.source);return new URL(r,window.location.href)},la=(n,e)=>{var r;return"@font-face {\n font-family: '".concat(n,"';\n src: ").concat(e.source,";\n ").concat(Object.entries((r=e.descriptors)!==null&&r!==void 0?r:{}).map(([i,o])=>"".concat(i,": ").concat(o,";")).join("\n"),"\n}")},Sh=()=>Xc(()=>fetch("/fonts/config.json").then(n=>n.json()));let xs=Sh();const Nh=(n,e,r)=>Zn(void 0,void 0,void 0,function*(){try{const i=new FontFace(n,e.source,e.descriptors);return vo(e)?yield i.load():i.loaded.then(r),document.fonts.add(i),Tt[n]={configs:[Object.assign(Object.assign({},e),{font:i})]},!0}catch(i){return me.warn("Failed to load font ".concat(n," with source ").concat(e.source),i),!1}}),_h=(n,e,r)=>Zn(void 0,void 0,void 0,function*(){if(e.some(vo))return me.error("Unable to load multiple FontFace for the same family ".concat(n)),!1;const i=[];return e.forEach(o=>{const a=new FontFace(n,o.source,o.descriptors);a.loaded.then(r),document.fonts.add(a),i.push(Object.assign(Object.assign({},o),{font:a}))}),Tt[n]={configs:i},!0}),Rh=(n,e)=>Zn(void 0,void 0,void 0,function*(){if(n in Tt)return Tt[n];let r;if(e)r=e;else try{r=(yield xs())[n]}catch(a){throw new Error("Unable to load font definition of "+n)}const i=()=>{vh(n,r)};for(const a of r.configs)if(Array.isArray(a)?yield _h(n,a,i):yield Nh(n,a,i))break;const o=Tt[n];if(o)return o.displayName=r.displayName,o.url=r.url,Tt[n]}),kh=n=>Zn(void 0,void 0,void 0,function*(){const e=Tt[n];if(!e)throw new Error("Font family ".concat(n," is not loaded"));return(yield Promise.all(e.configs.filter(i=>{const o=i.font.status==="loaded";return o||me.warn("Font family ".concat(n," is not loaded completely. Some FontFaceRules may be missing")),o}).map(i=>Zn(void 0,void 0,void 0,function*(){if(vo(i))return la(n,i);const o=xh(i),a=yield fetch(o),s=yield Qc(yield a.blob());return la(n,Object.assign(Object.assign({},i),{source:"url('".concat(s,"')")}))})))).join("\n\n")}),En={getAllFonts:xs,getLoadedFonts:bh,loadFont:Rh,getFontCSS:kh,onRemoteFontLoaded:wh},Ch=()=>{if(Le.getEnvironment()!=="PRD"||!Le.isRMT())if(document.querySelector('meta[name="robots"]'))me.info("Noindex meta tag already presents.");else{me.info("Injecting noindex meta tag as this app is not PRD RMT.");const n=document.createElement("meta");n.name="robots",n.content="noindex",document.head.appendChild(n)}},Ah={injectNoindexRule:Ch};var Ss=function(n,e,r,i){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function l(d){try{c(i.next(d))}catch(h){s(h)}}function u(d){try{c(i.throw(d))}catch(h){s(h)}}function c(d){d.done?a(d.value):o(d.value).then(l,u)}c((i=i.apply(n,e||[])).next())})};let Ns=!1;const Th=()=>Ss(void 0,void 0,void 0,function*(){yield Le.loadWithTimeout(),me.setup(Le.getComponent()),Ah.injectNoindexRule(),Ye.isAnalyticsQADone()?Ye.isAllowAnalytics()&&(me.info("User has previously allowed GA"),Pr.init()):Je.isStandaloneWindow()&&!Le.isRMT()&&(me.warn("App is opened in standalone window but analytics Q&A is not finished. GA will be init by default."),Pr.init()),Ns=!0}),Eh=()=>Ss(void 0,void 0,void 0,function*(){let n=0;for(;n<=10&&!Ns;)yield ns(1e3),n+=1}),Ge={ready:Eh,getAppName:Le.getComponent,getAppVersion:Le.getVersion,getEnv:Le.getEnvironment,getInstance:Le.getInstance,event:Pr.customEvent,isStandaloneWindow:Je.isStandaloneWindow,injectUITools:Je.injectUITools,openApp:Je.openApp,onAppOpen:Je.onAppOpen,closeApp:Je.closeApp,onAppClose:Je.onAppClose,updateAppMetadata:Je.updateAppMetadata,onAppMetadataUpdate:Je.onAppMetadataUpdate,updateUrl:Je.updateUrl,onUrlUpdate:Je.onUrlUpdate,toggleNavMenu:Je.toggleNavMenu,postEvent:Se.postEvent,onMessage:Se.onMessage,setLanguage:Ye.setLanguage,getLanguage:Ye.getLanguage,onLanguageChange:Ye.onLanguageChange,setColourMode:Ye.setColourMode,getColourMode:Ye.getColourMode,onColourModeChange:Ye.onColourModeChange,isAnalyticsQADone:Ye.isAnalyticsQADone,isAllowAnalytics:Ye.isAllowAnalytics,allowAnalytics:Ye.allowAnalytics,storage:{on:tn.on,get:tn.get,getAll:tn.getAll,set:tn.set,remove:tn.remove,clear:tn.clear},getMsSinceStartUp:Bd.getMsSinceStartUp,I18nBuilder:yh,getI18nInstance:gh,getAllFonts:En.getAllFonts,getLoadedFonts:En.getLoadedFonts,loadFont:En.loadFont,getFontCSS:En.getFontCSS,onRemoteFontLoaded:En.onRemoteFontLoaded};Th().then();window.rmgRuntime=Ge;const jt=me.logger;var wo={exports:{}},ln=typeof Reflect=="object"?Reflect:null,ua=ln&&typeof ln.apply=="function"?ln.apply:function(e,r,i){return Function.prototype.apply.call(e,r,i)},Ar;ln&&typeof ln.ownKeys=="function"?Ar=ln.ownKeys:Object.getOwnPropertySymbols?Ar=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Ar=function(e){return Object.getOwnPropertyNames(e)};function Lh(n){console&&console.warn&&console.warn(n)}var _s=Number.isNaN||function(e){return e!==e};function ie(){ie.init.call(this)}wo.exports=ie;wo.exports.once=Ph;ie.EventEmitter=ie;ie.prototype._events=void 0;ie.prototype._eventsCount=0;ie.prototype._maxListeners=void 0;var ca=10;function pi(n){if(typeof n!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n)}Object.defineProperty(ie,"defaultMaxListeners",{enumerable:!0,get:function(){return ca},set:function(n){if(typeof n!="number"||n<0||_s(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");ca=n}});ie.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};ie.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||_s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Rs(n){return n._maxListeners===void 0?ie.defaultMaxListeners:n._maxListeners}ie.prototype.getMaxListeners=function(){return Rs(this)};ie.prototype.emit=function(e){for(var r=[],i=1;i0&&(s=r[0]),s instanceof Error)throw s;var l=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw l.context=s,l}var u=a[e];if(u===void 0)return!1;if(typeof u=="function")ua(u,this,r);else for(var c=u.length,d=Es(u,c),i=0;i0&&s.length>o&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=n,l.type=e,l.count=s.length,Lh(l)}return n}ie.prototype.addListener=function(e,r){return ks(this,e,r,!1)};ie.prototype.on=ie.prototype.addListener;ie.prototype.prependListener=function(e,r){return ks(this,e,r,!0)};function Oh(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Cs(n,e,r){var i={fired:!1,wrapFn:void 0,target:n,type:e,listener:r},o=Oh.bind(i);return o.listener=r,i.wrapFn=o,o}ie.prototype.once=function(e,r){return pi(r),this.on(e,Cs(this,e,r)),this};ie.prototype.prependOnceListener=function(e,r){return pi(r),this.prependListener(e,Cs(this,e,r)),this};ie.prototype.removeListener=function(e,r){var i,o,a,s,l;if(pi(r),o=this._events,o===void 0)return this;if(i=o[e],i===void 0)return this;if(i===r||i.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete o[e],o.removeListener&&this.emit("removeListener",e,i.listener||r));else if(typeof i!="function"){for(a=-1,s=i.length-1;s>=0;s--)if(i[s]===r||i[s].listener===r){l=i[s].listener,a=s;break}if(a<0)return this;a===0?i.shift():jh(i,a),i.length===1&&(o[e]=i[0]),o.removeListener!==void 0&&this.emit("removeListener",e,l||r)}return this};ie.prototype.off=ie.prototype.removeListener;ie.prototype.removeAllListeners=function(e){var r,i,o;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[e]),this;if(arguments.length===0){var a=Object.keys(i),s;for(o=0;o=0;o--)this.removeListener(e,r[o]);return this};function As(n,e,r){var i=n._events;if(i===void 0)return[];var o=i[e];return o===void 0?[]:typeof o=="function"?r?[o.listener||o]:[o]:r?Mh(o):Es(o,o.length)}ie.prototype.listeners=function(e){return As(this,e,!0)};ie.prototype.rawListeners=function(e){return As(this,e,!1)};ie.listenerCount=function(n,e){return typeof n.listenerCount=="function"?n.listenerCount(e):Ts.call(n,e)};ie.prototype.listenerCount=Ts;function Ts(n){var e=this._events;if(e!==void 0){var r=e[n];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}ie.prototype.eventNames=function(){return this._eventsCount>0?Ar(this._events):[]};function Es(n,e){for(var r=new Array(e),i=0;i=e?{done:!0}:{done:!1,value:n[r++]}})};ct.empty=function(){var n=new ct(function(){return{done:!0}});return n};ct.fromSequence=function(n){var e=0,r=n.length;return new ct(function(){return e>=r?{done:!0}:{done:!1,value:n[e++]}})};ct.is=function(n){return n instanceof ct?!0:typeof n=="object"&&n!==null&&typeof n.next=="function"};var xo=ct;const Qe=ho(xo);var So={};So.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u";So.SYMBOL_SUPPORT=typeof Symbol<"u";var Dh=xo,Os=So,Bh=Os.ARRAY_BUFFER_SUPPORT,zh=Os.SYMBOL_SUPPORT;function Fh(n){return typeof n=="string"||Array.isArray(n)||Bh&&ArrayBuffer.isView(n)?Dh.fromSequence(n):typeof n!="object"||n===null?null:zh&&typeof n[Symbol.iterator]=="function"?n[Symbol.iterator]():typeof n.next=="function"?n:null}var js=function(e){var r=Fh(e);if(!r)throw new Error("obliterator: target is not iterable nor a valid iterator.");return r},Gh=js,Uh=function(e,r){for(var i=arguments.length>1?r:1/0,o=i!==1/0?new Array(i):[],a,s=0,l=Gh(e);;){if(s===i)return o;if(a=l.next(),a.done)return s!==r&&(o.length=s),o;o[s++]=a.value}};const Ms=ho(Uh);var Wh=xo,Vh=js,Hh=function(){var e=arguments,r=null,i=-1;return new Wh(function(){var a=null;do{if(r===null){if(i++,i>=e.length)return{done:!0};r=Vh(e[i])}if(a=r.next(),a.done===!0){r=null;continue}break}while(!0);return a})};const wt=ho(Hh);function Jh(){const n=arguments[0];for(let e=1,r=arguments.length;en++}class No extends Error{constructor(e){super(),this.name="GraphError",this.message=e}}class E extends No{constructor(e){super(e),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,E.prototype.constructor)}}class C extends No{constructor(e){super(e),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,C.prototype.constructor)}}class z extends No{constructor(e){super(e),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,z.prototype.constructor)}}function $s(n,e){this.key=n,this.attributes=e,this.clear()}$s.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function Is(n,e){this.key=n,this.attributes=e,this.clear()}Is.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function Ds(n,e){this.key=n,this.attributes=e,this.clear()}Ds.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function mn(n,e,r,i,o){this.key=e,this.attributes=o,this.undirected=n,this.source=r,this.target=i}mn.prototype.attach=function(){let n="out",e="in";this.undirected&&(n=e="undirected");const r=this.source.key,i=this.target.key;this.source[n][i]=this,!(this.undirected&&r===i)&&(this.target[e][r]=this)};mn.prototype.attachMulti=function(){let n="out",e="in";const r=this.source.key,i=this.target.key;this.undirected&&(n=e="undirected");const o=this.source[n],a=o[i];if(typeof a>"u"){o[i]=this,this.undirected&&r===i||(this.target[e][r]=this);return}a.previous=this,this.next=a,o[i]=this,this.target[e][r]=this};mn.prototype.detach=function(){const n=this.source.key,e=this.target.key;let r="out",i="in";this.undirected&&(r=i="undirected"),delete this.source[r][e],delete this.target[i][n]};mn.prototype.detachMulti=function(){const n=this.source.key,e=this.target.key;let r="out",i="in";this.undirected&&(r=i="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[r][e],delete this.target[i][n]):(this.next.previous=void 0,this.source[r][e]=this.next,this.target[i][n]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const Bs=0,zs=1,qh=2,Fs=3;function xt(n,e,r,i,o,a,s){let l,u,c,d;if(i=""+i,r===Bs){if(l=n._nodes.get(i),!l)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" node in the graph.'));c=o,d=a}else if(r===Fs){if(o=""+o,u=n._edges.get(o),!u)throw new C("Graph.".concat(e,': could not find the "').concat(o,'" edge in the graph.'));const h=u.source.key,p=u.target.key;if(i===h)l=u.target;else if(i===p)l=u.source;else throw new C("Graph.".concat(e,': the "').concat(i,'" node is not attached to the "').concat(o,'" edge (').concat(h,", ").concat(p,")."));c=a,d=s}else{if(u=n._edges.get(i),!u)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'));r===zs?l=u.source:l=u.target,c=o,d=a}return[l,c,d]}function Yh(n,e,r){n.prototype[e]=function(i,o,a){const[s,l]=xt(this,e,r,i,o,a);return s.attributes[l]}}function Zh(n,e,r){n.prototype[e]=function(i,o){const[a]=xt(this,e,r,i,o);return a.attributes}}function Qh(n,e,r){n.prototype[e]=function(i,o,a){const[s,l]=xt(this,e,r,i,o,a);return s.attributes.hasOwnProperty(l)}}function Xh(n,e,r){n.prototype[e]=function(i,o,a,s){const[l,u,c]=xt(this,e,r,i,o,a,s);return l.attributes[u]=c,this.emit("nodeAttributesUpdated",{key:l.key,type:"set",attributes:l.attributes,name:u}),this}}function ep(n,e,r){n.prototype[e]=function(i,o,a,s){const[l,u,c]=xt(this,e,r,i,o,a,s);if(typeof c!="function")throw new E("Graph.".concat(e,": updater should be a function."));const d=l.attributes,h=c(d[u]);return d[u]=h,this.emit("nodeAttributesUpdated",{key:l.key,type:"set",attributes:l.attributes,name:u}),this}}function tp(n,e,r){n.prototype[e]=function(i,o,a){const[s,l]=xt(this,e,r,i,o,a);return delete s.attributes[l],this.emit("nodeAttributesUpdated",{key:s.key,type:"remove",attributes:s.attributes,name:l}),this}}function np(n,e,r){n.prototype[e]=function(i,o,a){const[s,l]=xt(this,e,r,i,o,a);if(!Ae(l))throw new E("Graph.".concat(e,": provided attributes are not a plain object."));return s.attributes=l,this.emit("nodeAttributesUpdated",{key:s.key,type:"replace",attributes:s.attributes}),this}}function rp(n,e,r){n.prototype[e]=function(i,o,a){const[s,l]=xt(this,e,r,i,o,a);if(!Ae(l))throw new E("Graph.".concat(e,": provided attributes are not a plain object."));return we(s.attributes,l),this.emit("nodeAttributesUpdated",{key:s.key,type:"merge",attributes:s.attributes,data:l}),this}}function ip(n,e,r){n.prototype[e]=function(i,o,a){const[s,l]=xt(this,e,r,i,o,a);if(typeof l!="function")throw new E("Graph.".concat(e,": provided updater is not a function."));return s.attributes=l(s.attributes),this.emit("nodeAttributesUpdated",{key:s.key,type:"update",attributes:s.attributes}),this}}const op=[{name:n=>"get".concat(n,"Attribute"),attacher:Yh},{name:n=>"get".concat(n,"Attributes"),attacher:Zh},{name:n=>"has".concat(n,"Attribute"),attacher:Qh},{name:n=>"set".concat(n,"Attribute"),attacher:Xh},{name:n=>"update".concat(n,"Attribute"),attacher:ep},{name:n=>"remove".concat(n,"Attribute"),attacher:tp},{name:n=>"replace".concat(n,"Attributes"),attacher:np},{name:n=>"merge".concat(n,"Attributes"),attacher:rp},{name:n=>"update".concat(n,"Attributes"),attacher:ip}];function ap(n){op.forEach(function({name:e,attacher:r}){r(n,e("Node"),Bs),r(n,e("Source"),zs),r(n,e("Target"),qh),r(n,e("Opposite"),Fs)})}function sp(n,e,r){n.prototype[e]=function(i,o){let a;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new z("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new z("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const s=""+i,l=""+o;if(o=arguments[2],a=Ze(this,s,l,r),!a)throw new C("Graph.".concat(e,': could not find an edge for the given path ("').concat(s,'" - "').concat(l,'").'))}else{if(r!=="mixed")throw new z("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,a=this._edges.get(i),!a)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}return a.attributes[o]}}function lp(n,e,r){n.prototype[e]=function(i){let o;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new z("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>1){if(this.multi)throw new z("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const a=""+i,s=""+arguments[1];if(o=Ze(this,a,s,r),!o)throw new C("Graph.".concat(e,': could not find an edge for the given path ("').concat(a,'" - "').concat(s,'").'))}else{if(r!=="mixed")throw new z("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,o=this._edges.get(i),!o)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}return o.attributes}}function up(n,e,r){n.prototype[e]=function(i,o){let a;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new z("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new z("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const s=""+i,l=""+o;if(o=arguments[2],a=Ze(this,s,l,r),!a)throw new C("Graph.".concat(e,': could not find an edge for the given path ("').concat(s,'" - "').concat(l,'").'))}else{if(r!=="mixed")throw new z("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,a=this._edges.get(i),!a)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}return a.attributes.hasOwnProperty(o)}}function cp(n,e,r){n.prototype[e]=function(i,o,a){let s;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new z("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new z("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const l=""+i,u=""+o;if(o=arguments[2],a=arguments[3],s=Ze(this,l,u,r),!s)throw new C("Graph.".concat(e,': could not find an edge for the given path ("').concat(l,'" - "').concat(u,'").'))}else{if(r!=="mixed")throw new z("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,s=this._edges.get(i),!s)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}return s.attributes[o]=a,this.emit("edgeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:o}),this}}function dp(n,e,r){n.prototype[e]=function(i,o,a){let s;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new z("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new z("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const l=""+i,u=""+o;if(o=arguments[2],a=arguments[3],s=Ze(this,l,u,r),!s)throw new C("Graph.".concat(e,': could not find an edge for the given path ("').concat(l,'" - "').concat(u,'").'))}else{if(r!=="mixed")throw new z("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,s=this._edges.get(i),!s)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}if(typeof a!="function")throw new E("Graph.".concat(e,": updater should be a function."));return s.attributes[o]=a(s.attributes[o]),this.emit("edgeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:o}),this}}function hp(n,e,r){n.prototype[e]=function(i,o){let a;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new z("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new z("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const s=""+i,l=""+o;if(o=arguments[2],a=Ze(this,s,l,r),!a)throw new C("Graph.".concat(e,': could not find an edge for the given path ("').concat(s,'" - "').concat(l,'").'))}else{if(r!=="mixed")throw new z("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,a=this._edges.get(i),!a)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}return delete a.attributes[o],this.emit("edgeAttributesUpdated",{key:a.key,type:"remove",attributes:a.attributes,name:o}),this}}function pp(n,e,r){n.prototype[e]=function(i,o){let a;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new z("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new z("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const s=""+i,l=""+o;if(o=arguments[2],a=Ze(this,s,l,r),!a)throw new C("Graph.".concat(e,': could not find an edge for the given path ("').concat(s,'" - "').concat(l,'").'))}else{if(r!=="mixed")throw new z("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,a=this._edges.get(i),!a)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}if(!Ae(o))throw new E("Graph.".concat(e,": provided attributes are not a plain object."));return a.attributes=o,this.emit("edgeAttributesUpdated",{key:a.key,type:"replace",attributes:a.attributes}),this}}function fp(n,e,r){n.prototype[e]=function(i,o){let a;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new z("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new z("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const s=""+i,l=""+o;if(o=arguments[2],a=Ze(this,s,l,r),!a)throw new C("Graph.".concat(e,': could not find an edge for the given path ("').concat(s,'" - "').concat(l,'").'))}else{if(r!=="mixed")throw new z("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,a=this._edges.get(i),!a)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}if(!Ae(o))throw new E("Graph.".concat(e,": provided attributes are not a plain object."));return we(a.attributes,o),this.emit("edgeAttributesUpdated",{key:a.key,type:"merge",attributes:a.attributes,data:o}),this}}function gp(n,e,r){n.prototype[e]=function(i,o){let a;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new z("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new z("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const s=""+i,l=""+o;if(o=arguments[2],a=Ze(this,s,l,r),!a)throw new C("Graph.".concat(e,': could not find an edge for the given path ("').concat(s,'" - "').concat(l,'").'))}else{if(r!=="mixed")throw new z("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,a=this._edges.get(i),!a)throw new C("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}if(typeof o!="function")throw new E("Graph.".concat(e,": provided updater is not a function."));return a.attributes=o(a.attributes),this.emit("edgeAttributesUpdated",{key:a.key,type:"update",attributes:a.attributes}),this}}const mp=[{name:n=>"get".concat(n,"Attribute"),attacher:sp},{name:n=>"get".concat(n,"Attributes"),attacher:lp},{name:n=>"has".concat(n,"Attribute"),attacher:up},{name:n=>"set".concat(n,"Attribute"),attacher:cp},{name:n=>"update".concat(n,"Attribute"),attacher:dp},{name:n=>"remove".concat(n,"Attribute"),attacher:hp},{name:n=>"replace".concat(n,"Attributes"),attacher:pp},{name:n=>"merge".concat(n,"Attributes"),attacher:fp},{name:n=>"update".concat(n,"Attributes"),attacher:gp}];function yp(n){mp.forEach(function({name:e,attacher:r}){r(n,e("Edge"),"mixed"),r(n,e("DirectedEdge"),"directed"),r(n,e("UndirectedEdge"),"undirected")})}const bp=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function vp(n,e,r,i){let o=!1;for(const a in e){if(a===i)continue;const s=e[a];if(o=r(s.key,s.attributes,s.source.key,s.target.key,s.source.attributes,s.target.attributes,s.undirected),n&&o)return s.key}}function wp(n,e,r,i){let o,a,s,l=!1;for(const u in e)if(u!==i){o=e[u];do{if(a=o.source,s=o.target,l=r(o.key,o.attributes,a.key,s.key,a.attributes,s.attributes,o.undirected),n&&l)return o.key;o=o.next}while(o!==void 0)}}function Mi(n,e){const r=Object.keys(n),i=r.length;let o,a=0;return new Qe(function(){do if(o)o=o.next;else{if(a>=i)return{done:!0};const l=r[a++];if(l===e){o=void 0;continue}o=n[l]}while(!o);return{done:!1,value:{edge:o.key,attributes:o.attributes,source:o.source.key,target:o.target.key,sourceAttributes:o.source.attributes,targetAttributes:o.target.attributes,undirected:o.undirected}}})}function xp(n,e,r,i){const o=e[r];if(!o)return;const a=o.source,s=o.target;if(i(o.key,o.attributes,a.key,s.key,a.attributes,s.attributes,o.undirected)&&n)return o.key}function Sp(n,e,r,i){let o=e[r];if(!o)return;let a=!1;do{if(a=i(o.key,o.attributes,o.source.key,o.target.key,o.source.attributes,o.target.attributes,o.undirected),n&&a)return o.key;o=o.next}while(o!==void 0)}function Pi(n,e){let r=n[e];return r.next!==void 0?new Qe(function(){if(!r)return{done:!0};const i={edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected};return r=r.next,{done:!1,value:i}}):Qe.of({edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected})}function Np(n,e){if(n.size===0)return[];if(e==="mixed"||e===n.type)return typeof Array.from=="function"?Array.from(n._edges.keys()):Ms(n._edges.keys(),n._edges.size);const r=e==="undirected"?n.undirectedSize:n.directedSize,i=new Array(r),o=e==="undirected",a=n._edges.values();let s=0,l,u;for(;l=a.next(),l.done!==!0;)u=l.value,u.undirected===o&&(i[s++]=u.key);return i}function Gs(n,e,r,i){if(e.size===0)return;const o=r!=="mixed"&&r!==e.type,a=r==="undirected";let s,l,u=!1;const c=e._edges.values();for(;s=c.next(),s.done!==!0;){if(l=s.value,o&&l.undirected!==a)continue;const{key:d,attributes:h,source:p,target:m}=l;if(u=i(d,h,p.key,m.key,p.attributes,m.attributes,l.undirected),n&&u)return d}}function _p(n,e){if(n.size===0)return Qe.empty();const r=e!=="mixed"&&e!==n.type,i=e==="undirected",o=n._edges.values();return new Qe(function(){let s,l;for(;;){if(s=o.next(),s.done)return s;if(l=s.value,!(r&&l.undirected!==i))break}return{value:{edge:l.key,attributes:l.attributes,source:l.source.key,target:l.target.key,sourceAttributes:l.source.attributes,targetAttributes:l.target.attributes,undirected:l.undirected},done:!1}})}function _o(n,e,r,i,o,a){const s=e?wp:vp;let l;if(r!=="undirected"&&(i!=="out"&&(l=s(n,o.in,a),n&&l)||i!=="in"&&(l=s(n,o.out,a,i?void 0:o.key),n&&l))||r!=="directed"&&(l=s(n,o.undirected,a),n&&l))return l}function Rp(n,e,r,i){const o=[];return _o(!1,n,e,r,i,function(a){o.push(a)}),o}function kp(n,e,r){let i=Qe.empty();return n!=="undirected"&&(e!=="out"&&typeof r.in<"u"&&(i=wt(i,Mi(r.in))),e!=="in"&&typeof r.out<"u"&&(i=wt(i,Mi(r.out,e?void 0:r.key)))),n!=="directed"&&typeof r.undirected<"u"&&(i=wt(i,Mi(r.undirected))),i}function Ro(n,e,r,i,o,a,s){const l=r?Sp:xp;let u;if(e!=="undirected"&&(typeof o.in<"u"&&i!=="out"&&(u=l(n,o.in,a,s),n&&u)||typeof o.out<"u"&&i!=="in"&&(i||o.key!==a)&&(u=l(n,o.out,a,s),n&&u))||e!=="directed"&&typeof o.undirected<"u"&&(u=l(n,o.undirected,a,s),n&&u))return u}function Cp(n,e,r,i,o){const a=[];return Ro(!1,n,e,r,i,o,function(s){a.push(s)}),a}function Ap(n,e,r,i){let o=Qe.empty();return n!=="undirected"&&(typeof r.in<"u"&&e!=="out"&&i in r.in&&(o=wt(o,Pi(r.in,i))),typeof r.out<"u"&&e!=="in"&&i in r.out&&(e||r.key!==i)&&(o=wt(o,Pi(r.out,i)))),n!=="directed"&&typeof r.undirected<"u"&&i in r.undirected&&(o=wt(o,Pi(r.undirected,i))),o}function Tp(n,e){const{name:r,type:i,direction:o}=e;n.prototype[r]=function(a,s){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return[];if(!arguments.length)return Np(this,i);if(arguments.length===1){a=""+a;const l=this._nodes.get(a);if(typeof l>"u")throw new C("Graph.".concat(r,': could not find the "').concat(a,'" node in the graph.'));return Rp(this.multi,i==="mixed"?this.type:i,o,l)}if(arguments.length===2){a=""+a,s=""+s;const l=this._nodes.get(a);if(!l)throw new C("Graph.".concat(r,': could not find the "').concat(a,'" source node in the graph.'));if(!this._nodes.has(s))throw new C("Graph.".concat(r,': could not find the "').concat(s,'" target node in the graph.'));return Cp(i,this.multi,o,l,s)}throw new E("Graph.".concat(r,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}function Ep(n,e){const{name:r,type:i,direction:o}=e,a="forEach"+r[0].toUpperCase()+r.slice(1,-1);n.prototype[a]=function(c,d,h){if(!(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)){if(arguments.length===1)return h=c,Gs(!1,this,i,h);if(arguments.length===2){c=""+c,h=d;const p=this._nodes.get(c);if(typeof p>"u")throw new C("Graph.".concat(a,': could not find the "').concat(c,'" node in the graph.'));return _o(!1,this.multi,i==="mixed"?this.type:i,o,p,h)}if(arguments.length===3){c=""+c,d=""+d;const p=this._nodes.get(c);if(!p)throw new C("Graph.".concat(a,': could not find the "').concat(c,'" source node in the graph.'));if(!this._nodes.has(d))throw new C("Graph.".concat(a,': could not find the "').concat(d,'" target node in the graph.'));return Ro(!1,i,this.multi,o,p,d,h)}throw new E("Graph.".concat(a,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))}};const s="map"+r[0].toUpperCase()+r.slice(1);n.prototype[s]=function(){const c=Array.prototype.slice.call(arguments),d=c.pop();let h;if(c.length===0){let p=0;i!=="directed"&&(p+=this.undirectedSize),i!=="undirected"&&(p+=this.directedSize),h=new Array(p);let m=0;c.push((y,w,_,N,R,M,j)=>{h[m++]=d(y,w,_,N,R,M,j)})}else h=[],c.push((p,m,y,w,_,N,R)=>{h.push(d(p,m,y,w,_,N,R))});return this[a].apply(this,c),h};const l="filter"+r[0].toUpperCase()+r.slice(1);n.prototype[l]=function(){const c=Array.prototype.slice.call(arguments),d=c.pop(),h=[];return c.push((p,m,y,w,_,N,R)=>{d(p,m,y,w,_,N,R)&&h.push(p)}),this[a].apply(this,c),h};const u="reduce"+r[0].toUpperCase()+r.slice(1);n.prototype[u]=function(){let c=Array.prototype.slice.call(arguments);if(c.length<2||c.length>4)throw new E("Graph.".concat(u,": invalid number of arguments (expecting 2, 3 or 4 and got ").concat(c.length,")."));if(typeof c[c.length-1]=="function"&&typeof c[c.length-2]!="function")throw new E("Graph.".concat(u,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));let d,h;c.length===2?(d=c[0],h=c[1],c=[]):c.length===3?(d=c[1],h=c[2],c=[c[0]]):c.length===4&&(d=c[2],h=c[3],c=[c[0],c[1]]);let p=h;return c.push((m,y,w,_,N,R,M)=>{p=d(p,m,y,w,_,N,R,M)}),this[a].apply(this,c),p}}function Lp(n,e){const{name:r,type:i,direction:o}=e,a="find"+r[0].toUpperCase()+r.slice(1,-1);n.prototype[a]=function(u,c,d){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return!1;if(arguments.length===1)return d=u,Gs(!0,this,i,d);if(arguments.length===2){u=""+u,d=c;const h=this._nodes.get(u);if(typeof h>"u")throw new C("Graph.".concat(a,': could not find the "').concat(u,'" node in the graph.'));return _o(!0,this.multi,i==="mixed"?this.type:i,o,h,d)}if(arguments.length===3){u=""+u,c=""+c;const h=this._nodes.get(u);if(!h)throw new C("Graph.".concat(a,': could not find the "').concat(u,'" source node in the graph.'));if(!this._nodes.has(c))throw new C("Graph.".concat(a,': could not find the "').concat(c,'" target node in the graph.'));return Ro(!0,i,this.multi,o,h,c,d)}throw new E("Graph.".concat(a,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))};const s="some"+r[0].toUpperCase()+r.slice(1,-1);n.prototype[s]=function(){const u=Array.prototype.slice.call(arguments),c=u.pop();return u.push((h,p,m,y,w,_,N)=>c(h,p,m,y,w,_,N)),!!this[a].apply(this,u)};const l="every"+r[0].toUpperCase()+r.slice(1,-1);n.prototype[l]=function(){const u=Array.prototype.slice.call(arguments),c=u.pop();return u.push((h,p,m,y,w,_,N)=>!c(h,p,m,y,w,_,N)),!this[a].apply(this,u)}}function Op(n,e){const{name:r,type:i,direction:o}=e,a=r.slice(0,-1)+"Entries";n.prototype[a]=function(s,l){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return Qe.empty();if(!arguments.length)return _p(this,i);if(arguments.length===1){s=""+s;const u=this._nodes.get(s);if(!u)throw new C("Graph.".concat(a,': could not find the "').concat(s,'" node in the graph.'));return kp(i,o,u)}if(arguments.length===2){s=""+s,l=""+l;const u=this._nodes.get(s);if(!u)throw new C("Graph.".concat(a,': could not find the "').concat(s,'" source node in the graph.'));if(!this._nodes.has(l))throw new C("Graph.".concat(a,': could not find the "').concat(l,'" target node in the graph.'));return Ap(i,o,u,l)}throw new E("Graph.".concat(a,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}function jp(n){bp.forEach(e=>{Tp(n,e),Ep(n,e),Lp(n,e),Op(n,e)})}const Mp=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function fi(){this.A=null,this.B=null}fi.prototype.wrap=function(n){this.A===null?this.A=n:this.B===null&&(this.B=n)};fi.prototype.has=function(n){return this.A!==null&&n in this.A||this.B!==null&&n in this.B};function Ln(n,e,r,i,o){for(const a in i){const s=i[a],l=s.source,u=s.target,c=l===r?u:l;if(e&&e.has(c.key))continue;const d=o(c.key,c.attributes);if(n&&d)return c.key}}function ko(n,e,r,i,o){if(e!=="mixed"){if(e==="undirected")return Ln(n,null,i,i.undirected,o);if(typeof r=="string")return Ln(n,null,i,i[r],o)}const a=new fi;let s;if(e!=="undirected"){if(r!=="out"){if(s=Ln(n,null,i,i.in,o),n&&s)return s;a.wrap(i.in)}if(r!=="in"){if(s=Ln(n,a,i,i.out,o),n&&s)return s;a.wrap(i.out)}}if(e!=="directed"&&(s=Ln(n,a,i,i.undirected,o),n&&s))return s}function Pp(n,e,r){if(n!=="mixed"){if(n==="undirected")return Object.keys(r.undirected);if(typeof e=="string")return Object.keys(r[e])}const i=[];return ko(!1,n,e,r,function(o){i.push(o)}),i}function On(n,e,r){const i=Object.keys(r),o=i.length;let a=0;return new Qe(function(){let l=null;do{if(a>=o)return n&&n.wrap(r),{done:!0};const u=r[i[a++]],c=u.source,d=u.target;if(l=c===e?d:c,n&&n.has(l.key)){l=null;continue}}while(l===null);return{done:!1,value:{neighbor:l.key,attributes:l.attributes}}})}function $p(n,e,r){if(n!=="mixed"){if(n==="undirected")return On(null,r,r.undirected);if(typeof e=="string")return On(null,r,r[e])}let i=Qe.empty();const o=new fi;return n!=="undirected"&&(e!=="out"&&(i=wt(i,On(o,r,r.in))),e!=="in"&&(i=wt(i,On(o,r,r.out)))),n!=="directed"&&(i=wt(i,On(o,r,r.undirected))),i}function Ip(n,e){const{name:r,type:i,direction:o}=e;n.prototype[r]=function(a){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return[];a=""+a;const s=this._nodes.get(a);if(typeof s>"u")throw new C("Graph.".concat(r,': could not find the "').concat(a,'" node in the graph.'));return Pp(i==="mixed"?this.type:i,o,s)}}function Dp(n,e){const{name:r,type:i,direction:o}=e,a="forEach"+r[0].toUpperCase()+r.slice(1,-1);n.prototype[a]=function(c,d){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return;c=""+c;const h=this._nodes.get(c);if(typeof h>"u")throw new C("Graph.".concat(a,': could not find the "').concat(c,'" node in the graph.'));ko(!1,i==="mixed"?this.type:i,o,h,d)};const s="map"+r[0].toUpperCase()+r.slice(1);n.prototype[s]=function(c,d){const h=[];return this[a](c,(p,m)=>{h.push(d(p,m))}),h};const l="filter"+r[0].toUpperCase()+r.slice(1);n.prototype[l]=function(c,d){const h=[];return this[a](c,(p,m)=>{d(p,m)&&h.push(p)}),h};const u="reduce"+r[0].toUpperCase()+r.slice(1);n.prototype[u]=function(c,d,h){if(arguments.length<3)throw new E("Graph.".concat(u,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));let p=h;return this[a](c,(m,y)=>{p=d(p,m,y)}),p}}function Bp(n,e){const{name:r,type:i,direction:o}=e,a=r[0].toUpperCase()+r.slice(1,-1),s="find"+a;n.prototype[s]=function(c,d){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return;c=""+c;const h=this._nodes.get(c);if(typeof h>"u")throw new C("Graph.".concat(s,': could not find the "').concat(c,'" node in the graph.'));return ko(!0,i==="mixed"?this.type:i,o,h,d)};const l="some"+a;n.prototype[l]=function(c,d){return!!this[s](c,d)};const u="every"+a;n.prototype[u]=function(c,d){return!this[s](c,(p,m)=>!d(p,m))}}function zp(n,e){const{name:r,type:i,direction:o}=e,a=r.slice(0,-1)+"Entries";n.prototype[a]=function(s){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return Qe.empty();s=""+s;const l=this._nodes.get(s);if(typeof l>"u")throw new C("Graph.".concat(a,': could not find the "').concat(s,'" node in the graph.'));return $p(i==="mixed"?this.type:i,o,l)}}function Fp(n){Mp.forEach(e=>{Ip(n,e),Dp(n,e),Bp(n,e),zp(n,e)})}function fr(n,e,r,i,o){const a=i._nodes.values(),s=i.type;let l,u,c,d,h,p;for(;l=a.next(),l.done!==!0;){let m=!1;if(u=l.value,s!=="undirected"){d=u.out;for(c in d){h=d[c];do p=h.target,m=!0,o(u.key,p.key,u.attributes,p.attributes,h.key,h.attributes,h.undirected),h=h.next;while(h)}}if(s!=="directed"){d=u.undirected;for(c in d)if(!(e&&u.key>c)){h=d[c];do p=h.target,p.key!==c&&(p=h.source),m=!0,o(u.key,p.key,u.attributes,p.attributes,h.key,h.attributes,h.undirected),h=h.next;while(h)}}r&&!m&&o(u.key,null,u.attributes,null,null,null,null)}}function Gp(n,e){const r={key:n};return Ps(e.attributes)||(r.attributes=we({},e.attributes)),r}function Up(n,e,r){const i={key:e,source:r.source.key,target:r.target.key};return Ps(r.attributes)||(i.attributes=we({},r.attributes)),n==="mixed"&&r.undirected&&(i.undirected=!0),i}function Wp(n){if(!Ae(n))throw new E('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in n))throw new E("Graph.import: serialized node is missing its key.");if("attributes"in n&&(!Ae(n.attributes)||n.attributes===null))throw new E("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function Vp(n){if(!Ae(n))throw new E('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in n))throw new E("Graph.import: serialized edge is missing its source.");if(!("target"in n))throw new E("Graph.import: serialized edge is missing its target.");if("attributes"in n&&(!Ae(n.attributes)||n.attributes===null))throw new E("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in n&&typeof n.undirected!="boolean")throw new E("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const Hp=Kh(),Jp=new Set(["directed","undirected","mixed"]),ha=new Set(["domain","_events","_eventsCount","_maxListeners"]),Kp=[{name:n=>"".concat(n,"Edge"),generateKey:!0},{name:n=>"".concat(n,"DirectedEdge"),generateKey:!0,type:"directed"},{name:n=>"".concat(n,"UndirectedEdge"),generateKey:!0,type:"undirected"},{name:n=>"".concat(n,"EdgeWithKey")},{name:n=>"".concat(n,"DirectedEdgeWithKey"),type:"directed"},{name:n=>"".concat(n,"UndirectedEdgeWithKey"),type:"undirected"}],qp={allowSelfLoops:!0,multi:!1,type:"mixed"};function Yp(n,e,r){if(r&&!Ae(r))throw new E('Graph.addNode: invalid attributes. Expecting an object but got "'.concat(r,'"'));if(e=""+e,r=r||{},n._nodes.has(e))throw new z('Graph.addNode: the "'.concat(e,'" node already exist in the graph.'));const i=new n.NodeDataClass(e,r);return n._nodes.set(e,i),n.emit("nodeAdded",{key:e,attributes:r}),i}function pa(n,e,r){const i=new n.NodeDataClass(e,r);return n._nodes.set(e,i),n.emit("nodeAdded",{key:e,attributes:r}),i}function Us(n,e,r,i,o,a,s,l){if(!i&&n.type==="undirected")throw new z("Graph.".concat(e,": you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead."));if(i&&n.type==="directed")throw new z("Graph.".concat(e,": you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead."));if(l&&!Ae(l))throw new E("Graph.".concat(e,': invalid attributes. Expecting an object but got "').concat(l,'"'));if(a=""+a,s=""+s,l=l||{},!n.allowSelfLoops&&a===s)throw new z("Graph.".concat(e,': source & target are the same ("').concat(a,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));const u=n._nodes.get(a),c=n._nodes.get(s);if(!u)throw new C("Graph.".concat(e,': source node "').concat(a,'" not found.'));if(!c)throw new C("Graph.".concat(e,': target node "').concat(s,'" not found.'));const d={key:null,undirected:i,source:a,target:s,attributes:l};if(r)o=n._edgeKeyGenerator();else if(o=""+o,n._edges.has(o))throw new z("Graph.".concat(e,': the "').concat(o,'" edge already exists in the graph.'));if(!n.multi&&(i?typeof u.undirected[s]<"u":typeof u.out[s]<"u"))throw new z("Graph.".concat(e,': an edge linking "').concat(a,'" to "').concat(s,"\" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option."));const h=new mn(i,o,u,c,l);n._edges.set(o,h);const p=a===s;return i?(u.undirectedDegree++,c.undirectedDegree++,p&&(u.undirectedLoops++,n._undirectedSelfLoopCount++)):(u.outDegree++,c.inDegree++,p&&(u.directedLoops++,n._directedSelfLoopCount++)),n.multi?h.attachMulti():h.attach(),i?n._undirectedSize++:n._directedSize++,d.key=o,n.emit("edgeAdded",d),o}function Zp(n,e,r,i,o,a,s,l,u){if(!i&&n.type==="undirected")throw new z("Graph.".concat(e,": you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead."));if(i&&n.type==="directed")throw new z("Graph.".concat(e,": you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead."));if(l){if(u){if(typeof l!="function")throw new E("Graph.".concat(e,': invalid updater function. Expecting a function but got "').concat(l,'"'))}else if(!Ae(l))throw new E("Graph.".concat(e,': invalid attributes. Expecting an object but got "').concat(l,'"'))}a=""+a,s=""+s;let c;if(u&&(c=l,l=void 0),!n.allowSelfLoops&&a===s)throw new z("Graph.".concat(e,': source & target are the same ("').concat(a,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));let d=n._nodes.get(a),h=n._nodes.get(s),p,m;if(!r&&(p=n._edges.get(o),p)){if((p.source.key!==a||p.target.key!==s)&&(!i||p.source.key!==s||p.target.key!==a))throw new z("Graph.".concat(e,': inconsistency detected when attempting to merge the "').concat(o,'" edge with "').concat(a,'" source & "').concat(s,'" target vs. ("').concat(p.source.key,'", "').concat(p.target.key,'").'));m=p}if(!m&&!n.multi&&d&&(m=i?d.undirected[s]:d.out[s]),m){const R=[m.key,!1,!1,!1];if(u?!c:!l)return R;if(u){const M=m.attributes;m.attributes=c(M),n.emit("edgeAttributesUpdated",{type:"replace",key:m.key,attributes:m.attributes})}else we(m.attributes,l),n.emit("edgeAttributesUpdated",{type:"merge",key:m.key,attributes:m.attributes,data:l});return R}l=l||{},u&&c&&(l=c(l));const y={key:null,undirected:i,source:a,target:s,attributes:l};if(r)o=n._edgeKeyGenerator();else if(o=""+o,n._edges.has(o))throw new z("Graph.".concat(e,': the "').concat(o,'" edge already exists in the graph.'));let w=!1,_=!1;d||(d=pa(n,a,{}),w=!0,a===s&&(h=d,_=!0)),h||(h=pa(n,s,{}),_=!0),p=new mn(i,o,d,h,l),n._edges.set(o,p);const N=a===s;return i?(d.undirectedDegree++,h.undirectedDegree++,N&&(d.undirectedLoops++,n._undirectedSelfLoopCount++)):(d.outDegree++,h.inDegree++,N&&(d.directedLoops++,n._directedSelfLoopCount++)),n.multi?p.attachMulti():p.attach(),i?n._undirectedSize++:n._directedSize++,y.key=o,n.emit("edgeAdded",y),[o,!0,w,_]}function on(n,e){n._edges.delete(e.key);const{source:r,target:i,attributes:o}=e,a=e.undirected,s=r===i;a?(r.undirectedDegree--,i.undirectedDegree--,s&&(r.undirectedLoops--,n._undirectedSelfLoopCount--)):(r.outDegree--,i.inDegree--,s&&(r.directedLoops--,n._directedSelfLoopCount--)),n.multi?e.detachMulti():e.detach(),a?n._undirectedSize--:n._directedSize--,n.emit("edgeDropped",{key:e.key,attributes:o,source:r.key,target:i.key,undirected:a})}class ae extends Ih.EventEmitter{constructor(e){if(super(),e=we({},qp,e),typeof e.multi!="boolean")throw new E("Graph.constructor: invalid 'multi' option. Expecting a boolean but got \"".concat(e.multi,'".'));if(!Jp.has(e.type))throw new E('Graph.constructor: invalid \'type\' option. Should be one of "mixed", "directed" or "undirected" but got "'.concat(e.type,'".'));if(typeof e.allowSelfLoops!="boolean")throw new E("Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got \"".concat(e.allowSelfLoops,'".'));const r=e.type==="mixed"?$s:e.type==="directed"?Is:Ds;Ve(this,"NodeDataClass",r);const i="geid_"+Hp()+"_";let o=0;const a=()=>{let s;do s=i+o++;while(this._edges.has(s));return s};Ve(this,"_attributes",{}),Ve(this,"_nodes",new Map),Ve(this,"_edges",new Map),Ve(this,"_directedSize",0),Ve(this,"_undirectedSize",0),Ve(this,"_directedSelfLoopCount",0),Ve(this,"_undirectedSelfLoopCount",0),Ve(this,"_edgeKeyGenerator",a),Ve(this,"_options",e),ha.forEach(s=>Ve(this,s,this[s])),rt(this,"order",()=>this._nodes.size),rt(this,"size",()=>this._edges.size),rt(this,"directedSize",()=>this._directedSize),rt(this,"undirectedSize",()=>this._undirectedSize),rt(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),rt(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),rt(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),rt(this,"multi",this._options.multi),rt(this,"type",this._options.type),rt(this,"allowSelfLoops",this._options.allowSelfLoops),rt(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(e){return this._nodes.has(""+e)}hasDirectedEdge(e,r){if(this.type==="undirected")return!1;if(arguments.length===1){const i=""+e,o=this._edges.get(i);return!!o&&!o.undirected}else if(arguments.length===2){e=""+e,r=""+r;const i=this._nodes.get(e);return i?i.out.hasOwnProperty(r):!1}throw new E("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))}hasUndirectedEdge(e,r){if(this.type==="directed")return!1;if(arguments.length===1){const i=""+e,o=this._edges.get(i);return!!o&&o.undirected}else if(arguments.length===2){e=""+e,r=""+r;const i=this._nodes.get(e);return i?i.undirected.hasOwnProperty(r):!1}throw new E("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))}hasEdge(e,r){if(arguments.length===1){const i=""+e;return this._edges.has(i)}else if(arguments.length===2){e=""+e,r=""+r;const i=this._nodes.get(e);return i?typeof i.out<"u"&&i.out.hasOwnProperty(r)||typeof i.undirected<"u"&&i.undirected.hasOwnProperty(r):!1}throw new E("Graph.hasEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))}directedEdge(e,r){if(this.type==="undirected")return;if(e=""+e,r=""+r,this.multi)throw new z("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const i=this._nodes.get(e);if(!i)throw new C('Graph.directedEdge: could not find the "'.concat(e,'" source node in the graph.'));if(!this._nodes.has(r))throw new C('Graph.directedEdge: could not find the "'.concat(r,'" target node in the graph.'));const o=i.out&&i.out[r]||void 0;if(o)return o.key}undirectedEdge(e,r){if(this.type==="directed")return;if(e=""+e,r=""+r,this.multi)throw new z("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const i=this._nodes.get(e);if(!i)throw new C('Graph.undirectedEdge: could not find the "'.concat(e,'" source node in the graph.'));if(!this._nodes.has(r))throw new C('Graph.undirectedEdge: could not find the "'.concat(r,'" target node in the graph.'));const o=i.undirected&&i.undirected[r]||void 0;if(o)return o.key}edge(e,r){if(this.multi)throw new z("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");e=""+e,r=""+r;const i=this._nodes.get(e);if(!i)throw new C('Graph.edge: could not find the "'.concat(e,'" source node in the graph.'));if(!this._nodes.has(r))throw new C('Graph.edge: could not find the "'.concat(r,'" target node in the graph.'));const o=i.out&&i.out[r]||i.undirected&&i.undirected[r]||void 0;if(o)return o.key}areDirectedNeighbors(e,r){e=""+e,r=""+r;const i=this._nodes.get(e);if(!i)throw new C('Graph.areDirectedNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?!1:r in i.in||r in i.out}areOutNeighbors(e,r){e=""+e,r=""+r;const i=this._nodes.get(e);if(!i)throw new C('Graph.areOutNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?!1:r in i.out}areInNeighbors(e,r){e=""+e,r=""+r;const i=this._nodes.get(e);if(!i)throw new C('Graph.areInNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?!1:r in i.in}areUndirectedNeighbors(e,r){e=""+e,r=""+r;const i=this._nodes.get(e);if(!i)throw new C('Graph.areUndirectedNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type==="directed"?!1:r in i.undirected}areNeighbors(e,r){e=""+e,r=""+r;const i=this._nodes.get(e);if(!i)throw new C('Graph.areNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type!=="undirected"&&(r in i.in||r in i.out)||this.type!=="directed"&&r in i.undirected}areInboundNeighbors(e,r){e=""+e,r=""+r;const i=this._nodes.get(e);if(!i)throw new C('Graph.areInboundNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type!=="undirected"&&r in i.in||this.type!=="directed"&&r in i.undirected}areOutboundNeighbors(e,r){e=""+e,r=""+r;const i=this._nodes.get(e);if(!i)throw new C('Graph.areOutboundNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type!=="undirected"&&r in i.out||this.type!=="directed"&&r in i.undirected}inDegree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.inDegree: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?0:r.inDegree}outDegree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.outDegree: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?0:r.outDegree}directedDegree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.directedDegree: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?0:r.inDegree+r.outDegree}undirectedDegree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.undirectedDegree: could not find the "'.concat(e,'" node in the graph.'));return this.type==="directed"?0:r.undirectedDegree}inboundDegree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.inboundDegree: could not find the "'.concat(e,'" node in the graph.'));let i=0;return this.type!=="directed"&&(i+=r.undirectedDegree),this.type!=="undirected"&&(i+=r.inDegree),i}outboundDegree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.outboundDegree: could not find the "'.concat(e,'" node in the graph.'));let i=0;return this.type!=="directed"&&(i+=r.undirectedDegree),this.type!=="undirected"&&(i+=r.outDegree),i}degree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.degree: could not find the "'.concat(e,'" node in the graph.'));let i=0;return this.type!=="directed"&&(i+=r.undirectedDegree),this.type!=="undirected"&&(i+=r.inDegree+r.outDegree),i}inDegreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.inDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?0:r.inDegree-r.directedLoops}outDegreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.outDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?0:r.outDegree-r.directedLoops}directedDegreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.directedDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?0:r.inDegree+r.outDegree-r.directedLoops*2}undirectedDegreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.undirectedDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return this.type==="directed"?0:r.undirectedDegree-r.undirectedLoops*2}inboundDegreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.inboundDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));let i=0,o=0;return this.type!=="directed"&&(i+=r.undirectedDegree,o+=r.undirectedLoops*2),this.type!=="undirected"&&(i+=r.inDegree,o+=r.directedLoops),i-o}outboundDegreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.outboundDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));let i=0,o=0;return this.type!=="directed"&&(i+=r.undirectedDegree,o+=r.undirectedLoops*2),this.type!=="undirected"&&(i+=r.outDegree,o+=r.directedLoops),i-o}degreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.degreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));let i=0,o=0;return this.type!=="directed"&&(i+=r.undirectedDegree,o+=r.undirectedLoops*2),this.type!=="undirected"&&(i+=r.inDegree+r.outDegree,o+=r.directedLoops*2),i-o}source(e){e=""+e;const r=this._edges.get(e);if(!r)throw new C('Graph.source: could not find the "'.concat(e,'" edge in the graph.'));return r.source.key}target(e){e=""+e;const r=this._edges.get(e);if(!r)throw new C('Graph.target: could not find the "'.concat(e,'" edge in the graph.'));return r.target.key}extremities(e){e=""+e;const r=this._edges.get(e);if(!r)throw new C('Graph.extremities: could not find the "'.concat(e,'" edge in the graph.'));return[r.source.key,r.target.key]}opposite(e,r){e=""+e,r=""+r;const i=this._edges.get(r);if(!i)throw new C('Graph.opposite: could not find the "'.concat(r,'" edge in the graph.'));const o=i.source.key,a=i.target.key;if(e===o)return a;if(e===a)return o;throw new C('Graph.opposite: the "'.concat(e,'" node is not attached to the "').concat(r,'" edge (').concat(o,", ").concat(a,")."))}hasExtremity(e,r){e=""+e,r=""+r;const i=this._edges.get(e);if(!i)throw new C('Graph.hasExtremity: could not find the "'.concat(e,'" edge in the graph.'));return i.source.key===r||i.target.key===r}isUndirected(e){e=""+e;const r=this._edges.get(e);if(!r)throw new C('Graph.isUndirected: could not find the "'.concat(e,'" edge in the graph.'));return r.undirected}isDirected(e){e=""+e;const r=this._edges.get(e);if(!r)throw new C('Graph.isDirected: could not find the "'.concat(e,'" edge in the graph.'));return!r.undirected}isSelfLoop(e){e=""+e;const r=this._edges.get(e);if(!r)throw new C('Graph.isSelfLoop: could not find the "'.concat(e,'" edge in the graph.'));return r.source===r.target}addNode(e,r){return Yp(this,e,r).key}mergeNode(e,r){if(r&&!Ae(r))throw new E('Graph.mergeNode: invalid attributes. Expecting an object but got "'.concat(r,'"'));e=""+e,r=r||{};let i=this._nodes.get(e);return i?(r&&(we(i.attributes,r),this.emit("nodeAttributesUpdated",{type:"merge",key:e,attributes:i.attributes,data:r})),[e,!1]):(i=new this.NodeDataClass(e,r),this._nodes.set(e,i),this.emit("nodeAdded",{key:e,attributes:r}),[e,!0])}updateNode(e,r){if(r&&typeof r!="function")throw new E('Graph.updateNode: invalid updater function. Expecting a function but got "'.concat(r,'"'));e=""+e;let i=this._nodes.get(e);if(i){if(r){const a=i.attributes;i.attributes=r(a),this.emit("nodeAttributesUpdated",{type:"replace",key:e,attributes:i.attributes})}return[e,!1]}const o=r?r({}):{};return i=new this.NodeDataClass(e,o),this._nodes.set(e,i),this.emit("nodeAdded",{key:e,attributes:o}),[e,!0]}dropNode(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new C('Graph.dropNode: could not find the "'.concat(e,'" node in the graph.'));let i;if(this.type!=="undirected"){for(const o in r.out){i=r.out[o];do on(this,i),i=i.next;while(i)}for(const o in r.in){i=r.in[o];do on(this,i),i=i.next;while(i)}}if(this.type!=="directed")for(const o in r.undirected){i=r.undirected[o];do on(this,i),i=i.next;while(i)}this._nodes.delete(e),this.emit("nodeDropped",{key:e,attributes:r.attributes})}dropEdge(e){let r;if(arguments.length>1){const i=""+arguments[0],o=""+arguments[1];if(r=Ze(this,i,o,this.type),!r)throw new C('Graph.dropEdge: could not find the "'.concat(i,'" -> "').concat(o,'" edge in the graph.'))}else if(e=""+e,r=this._edges.get(e),!r)throw new C('Graph.dropEdge: could not find the "'.concat(e,'" edge in the graph.'));return on(this,r),this}dropDirectedEdge(e,r){if(arguments.length<2)throw new z("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new z("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");e=""+e,r=""+r;const i=Ze(this,e,r,"directed");if(!i)throw new C('Graph.dropDirectedEdge: could not find a "'.concat(e,'" -> "').concat(r,'" edge in the graph.'));return on(this,i),this}dropUndirectedEdge(e,r){if(arguments.length<2)throw new z("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new z("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const i=Ze(this,e,r,"undirected");if(!i)throw new C('Graph.dropUndirectedEdge: could not find a "'.concat(e,'" -> "').concat(r,'" edge in the graph.'));return on(this,i),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const e=this._nodes.values();let r;for(;r=e.next(),r.done!==!0;)r.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(e){return this._attributes[e]}getAttributes(){return this._attributes}hasAttribute(e){return this._attributes.hasOwnProperty(e)}setAttribute(e,r){return this._attributes[e]=r,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this}updateAttribute(e,r){if(typeof r!="function")throw new E("Graph.updateAttribute: updater should be a function.");const i=this._attributes[e];return this._attributes[e]=r(i),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this}removeAttribute(e){return delete this._attributes[e],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:e}),this}replaceAttributes(e){if(!Ae(e))throw new E("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=e,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(e){if(!Ae(e))throw new E("Graph.mergeAttributes: provided attributes are not a plain object.");return we(this._attributes,e),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:e}),this}updateAttributes(e){if(typeof e!="function")throw new E("Graph.updateAttributes: provided updater is not a function.");return this._attributes=e(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(e,r){if(typeof e!="function")throw new E("Graph.updateEachNodeAttributes: expecting an updater function.");if(r&&!da(r))throw new E("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const i=this._nodes.values();let o,a;for(;o=i.next(),o.done!==!0;)a=o.value,a.attributes=e(a.key,a.attributes);this.emit("eachNodeAttributesUpdated",{hints:r||null})}updateEachEdgeAttributes(e,r){if(typeof e!="function")throw new E("Graph.updateEachEdgeAttributes: expecting an updater function.");if(r&&!da(r))throw new E("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const i=this._edges.values();let o,a,s,l;for(;o=i.next(),o.done!==!0;)a=o.value,s=a.source,l=a.target,a.attributes=e(a.key,a.attributes,s.key,l.key,s.attributes,l.attributes,a.undirected);this.emit("eachEdgeAttributesUpdated",{hints:r||null})}forEachAdjacencyEntry(e){if(typeof e!="function")throw new E("Graph.forEachAdjacencyEntry: expecting a callback.");fr(!1,!1,!1,this,e)}forEachAdjacencyEntryWithOrphans(e){if(typeof e!="function")throw new E("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");fr(!1,!1,!0,this,e)}forEachAssymetricAdjacencyEntry(e){if(typeof e!="function")throw new E("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");fr(!1,!0,!1,this,e)}forEachAssymetricAdjacencyEntryWithOrphans(e){if(typeof e!="function")throw new E("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");fr(!1,!0,!0,this,e)}nodes(){return typeof Array.from=="function"?Array.from(this._nodes.keys()):Ms(this._nodes.keys(),this._nodes.size)}forEachNode(e){if(typeof e!="function")throw new E("Graph.forEachNode: expecting a callback.");const r=this._nodes.values();let i,o;for(;i=r.next(),i.done!==!0;)o=i.value,e(o.key,o.attributes)}findNode(e){if(typeof e!="function")throw new E("Graph.findNode: expecting a callback.");const r=this._nodes.values();let i,o;for(;i=r.next(),i.done!==!0;)if(o=i.value,e(o.key,o.attributes))return o.key}mapNodes(e){if(typeof e!="function")throw new E("Graph.mapNode: expecting a callback.");const r=this._nodes.values();let i,o;const a=new Array(this.order);let s=0;for(;i=r.next(),i.done!==!0;)o=i.value,a[s++]=e(o.key,o.attributes);return a}someNode(e){if(typeof e!="function")throw new E("Graph.someNode: expecting a callback.");const r=this._nodes.values();let i,o;for(;i=r.next(),i.done!==!0;)if(o=i.value,e(o.key,o.attributes))return!0;return!1}everyNode(e){if(typeof e!="function")throw new E("Graph.everyNode: expecting a callback.");const r=this._nodes.values();let i,o;for(;i=r.next(),i.done!==!0;)if(o=i.value,!e(o.key,o.attributes))return!1;return!0}filterNodes(e){if(typeof e!="function")throw new E("Graph.filterNodes: expecting a callback.");const r=this._nodes.values();let i,o;const a=[];for(;i=r.next(),i.done!==!0;)o=i.value,e(o.key,o.attributes)&&a.push(o.key);return a}reduceNodes(e,r){if(typeof e!="function")throw new E("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new E("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let i=r;const o=this._nodes.values();let a,s;for(;a=o.next(),a.done!==!0;)s=a.value,i=e(i,s.key,s.attributes);return i}nodeEntries(){const e=this._nodes.values();return new Qe(()=>{const r=e.next();if(r.done)return r;const i=r.value;return{value:{node:i.key,attributes:i.attributes},done:!1}})}export(){const e=new Array(this._nodes.size);let r=0;this._nodes.forEach((o,a)=>{e[r++]=Gp(a,o)});const i=new Array(this._edges.size);return r=0,this._edges.forEach((o,a)=>{i[r++]=Up(this.type,a,o)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:e,edges:i}}import(e,r=!1){if(e instanceof ae)return e.forEachNode((u,c)=>{r?this.mergeNode(u,c):this.addNode(u,c)}),e.forEachEdge((u,c,d,h,p,m,y)=>{r?y?this.mergeUndirectedEdgeWithKey(u,d,h,c):this.mergeDirectedEdgeWithKey(u,d,h,c):y?this.addUndirectedEdgeWithKey(u,d,h,c):this.addDirectedEdgeWithKey(u,d,h,c)}),this;if(!Ae(e))throw new E("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(e.attributes){if(!Ae(e.attributes))throw new E("Graph.import: invalid attributes. Expecting a plain object.");r?this.mergeAttributes(e.attributes):this.replaceAttributes(e.attributes)}let i,o,a,s,l;if(e.nodes){if(a=e.nodes,!Array.isArray(a))throw new E("Graph.import: invalid nodes. Expecting an array.");for(i=0,o=a.length;i{const a=we({},i.attributes);i=new r.NodeDataClass(o,a),r._nodes.set(o,i)}),r}copy(e){if(e=e||{},typeof e.type=="string"&&e.type!==this.type&&e.type!=="mixed")throw new z('Graph.copy: cannot create an incompatible copy from "'.concat(this.type,'" type to "').concat(e.type,'" because this would mean losing information about the current graph.'));if(typeof e.multi=="boolean"&&e.multi!==this.multi&&e.multi!==!0)throw new z("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof e.allowSelfLoops=="boolean"&&e.allowSelfLoops!==this.allowSelfLoops&&e.allowSelfLoops!==!0)throw new z("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const r=this.emptyCopy(e),i=this._edges.values();let o,a;for(;o=i.next(),o.done!==!0;)a=o.value,Us(r,"copy",!1,a.undirected,a.key,a.source.key,a.target.key,we({},a.attributes));return r}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const e={};this._nodes.forEach((a,s)=>{e[s]=a.attributes});const r={},i={};this._edges.forEach((a,s)=>{const l=a.undirected?"--":"->";let u="",c=a.source.key,d=a.target.key,h;a.undirected&&c>d&&(h=c,c=d,d=h);const p="(".concat(c,")").concat(l,"(").concat(d,")");s.startsWith("geid_")?this.multi&&(typeof i[p]>"u"?i[p]=0:i[p]++,u+="".concat(i[p],". ")):u+="[".concat(s,"]: "),u+=p,r[u]=a.attributes});const o={};for(const a in this)this.hasOwnProperty(a)&&!ha.has(a)&&typeof this[a]!="function"&&typeof a!="symbol"&&(o[a]=this[a]);return o.attributes=this._attributes,o.nodes=e,o.edges=r,Ve(o,"constructor",this.constructor),o}}typeof Symbol<"u"&&(ae.prototype[Symbol.for("nodejs.util.inspect.custom")]=ae.prototype.inspect);Kp.forEach(n=>{["add","merge","update"].forEach(e=>{const r=n.name(e),i=e==="add"?Us:Zp;n.generateKey?ae.prototype[r]=function(o,a,s){return i(this,r,!0,(n.type||this.type)==="undirected",null,o,a,s,e==="update")}:ae.prototype[r]=function(o,a,s,l){return i(this,r,!1,(n.type||this.type)==="undirected",o,a,s,l,e==="update")}})});ap(ae);yp(ae);jp(ae);Fp(ae);class Ws extends ae{constructor(e){const r=we({type:"directed"},e);if("multi"in r&&r.multi!==!1)throw new E("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(r.type!=="directed")throw new E('DirectedGraph.from: inconsistent "'+r.type+'" type in given options!');super(r)}}class Vs extends ae{constructor(e){const r=we({type:"undirected"},e);if("multi"in r&&r.multi!==!1)throw new E("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(r.type!=="undirected")throw new E('UndirectedGraph.from: inconsistent "'+r.type+'" type in given options!');super(r)}}class Hs extends ae{constructor(e){const r=we({multi:!0},e);if("multi"in r&&r.multi!==!0)throw new E("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(r)}}class pe extends ae{constructor(e){const r=we({type:"directed",multi:!0},e);if("multi"in r&&r.multi!==!0)throw new E("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(r.type!=="directed")throw new E('MultiDirectedGraph.from: inconsistent "'+r.type+'" type in given options!');super(r)}}class Js extends ae{constructor(e){const r=we({type:"undirected",multi:!0},e);if("multi"in r&&r.multi!==!0)throw new E("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(r.type!=="undirected")throw new E('MultiUndirectedGraph.from: inconsistent "'+r.type+'" type in given options!');super(r)}}function yn(n){n.from=function(e,r){const i=we({},e.options,r),o=new n(i);return o.import(e),o}}yn(ae);yn(Ws);yn(Vs);yn(Hs);yn(pe);yn(Js);ae.Graph=ae;ae.DirectedGraph=Ws;ae.UndirectedGraph=Vs;ae.MultiGraph=Hs;ae.MultiDirectedGraph=pe;ae.MultiUndirectedGraph=Js;ae.InvalidArgumentsGraphError=E;ae.NotFoundGraphError=C;ae.UsageGraphError=z;var Ks,fa=Gc;Ks=fa.createRoot,fa.hydrateRoot;const Qp="modulepreload",Xp=function(n){return"/rmp/"+n},ga={},bn=function(e,r,i){let o=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(r.map(u=>{if(u=Xp(u),u in ga)return;ga[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector('link[href="'.concat(u,'"]').concat(d)))return;const h=document.createElement("link");if(h.rel=c?"stylesheet":Qp,c||(h.as="script"),h.crossOrigin="",h.href=u,l&&h.setAttribute("nonce",l),document.head.appendChild(h),c)return new Promise((p,m)=>{h.addEventListener("load",p),h.addEventListener("error",()=>m(new Error("Unable to preload CSS for ".concat(u))))})}))}function a(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return o.then(s=>{for(const l of s||[])l.status==="rejected"&&a(l.reason);return e().catch(a)})};var qs=function(){if(typeof Map<"u")return Map;function n(e,r){var i=-1;return e.some(function(o,a){return o[0]===r?(i=a,!0):!1}),i}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(r){var i=n(this.__entries__,r),o=this.__entries__[i];return o&&o[1]},e.prototype.set=function(r,i){var o=n(this.__entries__,r);~o?this.__entries__[o][1]=i:this.__entries__.push([r,i])},e.prototype.delete=function(r){var i=this.__entries__,o=n(i,r);~o&&i.splice(o,1)},e.prototype.has=function(r){return!!~n(this.__entries__,r)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(r,i){i===void 0&&(i=null);for(var o=0,a=this.__entries__;o0},n.prototype.connect_=function(){!Vi||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),af?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},n.prototype.disconnect_=function(){!Vi||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},n.prototype.onTransitionEnd_=function(e){var r=e.propertyName,i=r===void 0?"":r,o=of.some(function(a){return!!~i.indexOf(a)});o&&this.refresh()},n.getInstance=function(){return this.instance_||(this.instance_=new n),this.instance_},n.instance_=null,n}(),Ys=function(n,e){for(var r=0,i=Object.keys(e);r"u"||!(Element instanceof Object))){if(!(e instanceof hn(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)||(r.set(e,new gf(e)),this.controller_.addObserver(this),this.controller_.refresh())}},n.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof hn(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)&&(r.delete(e),r.size||this.controller_.removeObserver(this))}},n.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},n.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&e.activeObservations_.push(r)})},n.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,r=this.activeObservations_.map(function(i){return new mf(i.target,i.broadcastRect())});this.callback_.call(e,r,e),this.clearActive()}},n.prototype.clearActive=function(){this.activeObservations_.splice(0)},n.prototype.hasActive=function(){return this.activeObservations_.length>0},n}(),Qs=typeof WeakMap<"u"?new WeakMap:new qs,Xs=function(){function n(e){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=sf.getInstance(),i=new yf(e,r,this);Qs.set(this,i)}return n}();["observe","unobserve","disconnect"].forEach(function(n){Xs.prototype[n]=function(){var e;return(e=Qs.get(this))[n].apply(e,arguments)}});var bf=function(){return typeof zr.ResizeObserver<"u"?zr.ResizeObserver:Xs}();window.ResizeObserver||(window.ResizeObserver=bf);var Hi=function(){return Hi=Object.assign||function(n){for(var e,r=1,i=arguments.length;r`"});var mi=function(n,e){for(var r,i=$.Children.toArray(n),o=0,a=i;o{var e;return(e=typeof n=="string"||typeof n=="number"?n:n[Object.keys(n)[0]])==null?void 0:e.toString()},Sf=(n,e)=>typeof n!="string"||qa(e)?n:n.toString().replace(new RegExp(kf(e),"gi"),r=>"".concat(r,"")),Nf=n=>nl(n,e=>{var r;return((r=e==null?void 0:e.type)==null?void 0:r.displayName)==="AutoCompleteItem"}).map(e=>{const r=sc(e.props,["value","label","fixed","disabled"]),{getValue:i=Co}=e.props,o=i(r.value);return{...Ya(r.label)?r:{...r,label:o},value:o,originalValue:r.value}}),_f=()=>({bg:"whiteAlpha.100",_light:{bg:"gray.200"}}),Rf=(n,e,r)=>(e==null?void 0:e.toLowerCase().indexOf(n==null?void 0:n.toLowerCase()))>=0||(r==null?void 0:r.toLowerCase().indexOf(n==null?void 0:n.toLowerCase()))>=0||ba(n,e)>=.5||ba(n,r)>=.5;function kf(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}const Cf=(n,e)=>{const r={},i={},{field:o}=n;return o&&Object.keys(o).forEach(a=>{if(a.startsWith("--input")===!1)r[a]=o[a];else{let s=o[a];const l=a.replace("--input-","").replace(/-([a-z])/g,function(u){return u[1].toUpperCase()});s.indexOf(".")!==-1&&(s=s.substring(s.indexOf(".")+1)),i[l]=s}}),{...e&&{...r,...i,_focusWithin:n.field._focus,pos:"relative",minH:9,py:1.5,spacing:3},cursor:"text",h:"fit-content"}},Af=(n,e)=>mi(n,r=>{var i;return((i=r==null?void 0:r.type)==null?void 0:i.displayName)==="AutoCompleteItem"&&r.props.value===(e==null?void 0:e.value)}),Tf=(n,e)=>mi(n,r=>{var i;return((i=r==null?void 0:r.type)==null?void 0:i.displayName)==="AutoCompleteItem"&&r.props.value===(e==null?void 0:e.value)}),Ef=(n,e)=>Ya(mi(n,r=>{var i,o;const a=be(((i=r.props)==null?void 0:i.getValue)||Co,((o=r.props)==null?void 0:o.value)||{});return e.some(s=>s.value===a)}));function Lf(n){var e;let{closeOnBlur:r=!0,creatable:i,emphasize:o,emptyState:a=!0,freeSolo:s,isReadOnly:l,listAllValuesOnFocus:u,maxSuggestions:c,multiple:d,closeOnSelect:h=!d,defaultValue:p,defaultValues:m=p?[p]:[],onReady:y,defaultIsOpen:w,disableFilter:_,isLoading:N=!1,placement:R="bottom",restoreOnBlurIfEmpty:M=!s,shouldRenderSuggestions:j=()=>!0,submitKeys:A=[],suggestWhenEmpty:G,value:T,values:U=T?typeof T=="string"?[T]:[...T]:void 0}=n;s=s||(d?!0:n.freeSolo);const{isOpen:L,onClose:I,onOpen:W}=ec({defaultIsOpen:w}),se=be(n.children,{isOpen:L,onClose:I,onOpen:W}),te=Nf(se),Q=$.useRef(null),Be=$.useRef(null),Xe=$.useRef(null),et=$.useRef(null),[Ne,We]=$.useState(!1);let Pe="";d?Pe="":_r(m)?_r(U)||(Pe=U[0]):Pe=m[0];const[ze,Pt]=$.useState(Pe!=null?Pe:""),ne=_?te:te.filter(B=>B.fixed||be(n.filter||Rf,ze,B.value,B.label)||Ne).filter((B,re)=>c?B.fixed||reB==null?void 0:B.toString()),value:U,onChange:B=>{const re=Ee.find(X=>X.value===B[0]),ge=B.map(X=>Ee.find($e=>$e.value===X));be(n.onChange,d?B:B[0],d?ge:re)}}),[tt,ot]=$.useState((e=te[0])==null?void 0:e.value),vn=n.maxSelections||Oe.length+1,Kt=Ee.findIndex(B=>B.value===tt),wn=nc(Kt,Ee,!!n.rollNavigation),rr=rc(Kt,Ee,!!n.rollNavigation),$t=ic(Ee),ir=Oi(Ee);oc(()=>{ot($t==null?void 0:$t.value)},[ze]),$.useEffect(()=>{var B;L||ot((B=te[0])==null?void 0:B.value)},[L]),$.useEffect(()=>{const B=te.find(re=>re.value===tt);be(n.onOptionFocus,{item:B,focusMethod:et.current,isNewInput:B==null?void 0:B.creatable})},[tt,n.onOptionFocus]);const xn=B=>{var re,ge;!Oe.includes(B)&&Oe.lengthd?[...Ie,B]:[B]);const X=Ee.find(Ie=>Ie.value===B);d&&((re=Q.current)==null||re.focus()),n.focusInputOnSelect&&((ge=Q.current)==null||ge.focus()),be(n.onSelectOption,{item:X,selectMethod:et.current,isNewInput:X==null?void 0:X.creatable}),X!=null&&X.creatable&&be(n.onCreateOption,{item:ui(X,["noFilter"]),selectMethod:et.current});const $e=(X==null?void 0:X.label)||(X==null?void 0:X.value);Pt(()=>d?"":$e!=null?$e:""),h&&I()},or=(B,re)=>{var ge;Jt(X=>{const $e=te.find(Ie=>Ie.value===B);return be(n.onTagRemoved,B,$e,X),X.filter(Ie=>Ie!==B)}),ze===B&&Pt(""),re&&((ge=Q.current)==null||ge.focus())},wi=B=>{var re;Jt([]),B&&((re=Q.current)==null||re.focus())},ar=d?Oe.map(B=>{var re;return{label:((re=te.find(ge=>ge.value===(B==null?void 0:B.toString())))==null?void 0:re.label)||B,onRemove:()=>or(B)}}):[];return $.useEffect(()=>{be(y,{tags:ar})},[Oe]),{autoCompleteProps:n,children:se,filteredList:Ee,filteredResults:ne,focusedValue:tt,getEmptyStateProps:B=>{if(Ee.every(re=>re.noFilter)&&a&&!i)return typeof a=="boolean"?B:be(a,{query:ze})},getGroupProps:B=>{const re=Ef(B.children,Ee);return{divider:{hasFirstChild:Af(B.children,$t),hasLastChild:Tf(B.children,Oi(Ee.filter(ge=>_r(ge==null?void 0:ge.noFilter))))},group:{display:re?"initial":"none"}}},getInputProps:(B,re)=>{const{onBlur:ge,onChange:X,onFocus:$e,onKeyDown:Ie,variant:qt,...Yt}=B;return{wrapper:{ref:Be,onClick:()=>{var K;(K=Q==null?void 0:Q.current)==null||K.focus()},...Cf(re,d),...Yt},input:{isReadOnly:l,onFocus:K=>{be($e,K),n.openOnFocus&&!l&&W(),n.selectOnFocus&&K.target.select(),u&&We(!0)},onBlur:K=>{var De,_e;be(ge,K);const Re=K.relatedTarget===(Xe==null?void 0:Xe.current)||((De=Xe.current)==null?void 0:De.contains(K.relatedTarget)),Zt=(_e=Be.current)==null?void 0:_e.contains(K.relatedTarget);if(!Re&&!Zt&&(r&&I(),!Oe.includes(K.target.value)&&M)){const Sn=Oi(Oe),St=te.find(Nt=>Nt.value===Sn),ke=(St==null?void 0:St.label)||(St==null?void 0:St.value)||"";Pt(ke)}},onChange:K=>{const De=K.target.value;be(X,K),Pt(De);const _e=qa(De);be(j,De)&&(!_e||G)?W():I(),We(!1)},onKeyDown:K=>{var De;be(Ie,K),et.current="keyboard";const{key:_e}=K,Re=Ee[Kt];if(["Enter",...A].includes(_e)){Re&&!(Re!=null&&Re.disabled)?xn(Re==null?void 0:Re.value):(De=Q.current)==null||De.focus(),K.preventDefault();return}if(_e==="ArrowDown"){L?ot(wn==null?void 0:wn.value):W(),K.preventDefault();return}if(_e==="ArrowUp"){L?ot(rr==null?void 0:rr.value):W(),K.preventDefault();return}if(_e==="Tab"){L&&Re&&!(Re!=null&&Re.disabled)?xn(Re==null?void 0:Re.value):I();return}if(_e==="Home"){ot($t==null?void 0:$t.value),K.preventDefault();return}if(_e==="End"){ot(ir==null?void 0:ir.value),K.preventDefault();return}_e==="Escape"&&(I(),K.preventDefault())},value:ze,variant:d?"unstyled":qt,...Yt}}},getItemProps:(B,re)=>{var ge;const{_fixed:X,_focus:$e,children:Ie,disabled:qt,label:Yt,value:K,fixed:De,getValue:_e=Co,onClick:Re,onMouseOver:Zt,sx:Sn,...St}=B,ke=re?K:(ge=_e(K))==null?void 0:ge.toString(),Nt=ke===tt,xi=Ee.findIndex(It=>It.value===ke)>=0,Qt=Ie||Yt||ke;return{item:{...typeof Qt!="string"||!o?{children:Qt}:{dangerouslySetInnerHTML:{__html:Sf(Qt,ze)}},"aria-selected":Oe.includes(ke),"aria-disabled":qt,_disabled:{opacity:.4,cursor:"not-allowed",userSelect:"none"},onClick:It=>{var Nn;be(Re,It),qt?(Nn=Q.current)==null||Nn.focus():xn(ke)},onMouseOver:It=>{be(Zt,It),ot(ke),et.current="mouse"},sx:{...Sn,mark:{color:"inherit",bg:"transparent",...ac(o)?o:{fontWeight:o?"extrabold":"inherit"}}},...Nt&&($e||_f()),...De&&X,...St},root:{isValidSuggestion:xi,value:ke}}},inputRef:Q,interactionRef:et,isLoading:N,isOpen:L,itemList:te,listRef:Xe,onClose:I,onOpen:W,placement:R,query:ze,removeItem:or,resetItems:wi,setQuery:Pt,tags:ar,values:Oe}}const rl=Vt((n,e)=>{const r=Lf(n),{children:i,isOpen:o,onClose:a,onOpen:s,placement:l,resetItems:u,removeItem:c}=r;return $.useImperativeHandle(e,()=>({resetItems:u,removeItem:c})),F.jsx(xf,{value:r,children:F.jsx(Va,{isLazy:!0,isOpen:o,onClose:a,onOpen:s,autoFocus:!1,placement:l,closeOnBlur:!0,matchWidth:!0,children:F.jsx(Lr.div,{w:"full",ref:e,children:i})})})});rl.displayName="AutoComplete";const il=Vt((n,e)=>{const{focusedValue:r,getItemProps:i,interactionRef:o}=Mt(),a=$.useRef(),s=Xn(e,a),l=i(n),{isValidSuggestion:u,value:c}=l.root,d=r===c;$.useEffect(()=>{var w;d&&o.current==="keyboard"&&((w=a==null?void 0:a.current)==null||w.scrollIntoView({behavior:"smooth",block:"center"}))},[d,o]),$.useEffect(()=>{typeof c!="string"&&console.warn("wow"),typeof c!="string"&&_r(n.getValue)&&console.error("You must define the `getValue` prop, when an Item's value is not a string")},[]);const{children:h,dangerouslySetInnerHTML:p,...m}=l.item,y=ui(m,["groupId"]);return u?F.jsx(ut,{ref:s,...Of,...y,children:h||F.jsx("span",{dangerouslySetInnerHTML:p})}):null});il.displayName="AutoCompleteItem";const Of={mx:"2",px:"2",py:"2",rounded:"md",cursor:"pointer"},jf=Vt((n,e)=>{const{children:r,showDivider:i,...o}=n,a=ui(o,["groupSibling"]),{getGroupProps:s}=Mt(),{group:l}=s(n),u=$f(n);return F.jsxs(Hu,{ref:e,...l,...a,children:[F.jsx(Zo,{...u.top}),r,F.jsx(Zo,{...u.bottom})]})}),Mf=Vt((n,e)=>F.jsx(ut,{...Pf,...n,ref:e}));jf.displayName="AutoCompleteGroup";Mf.displayName="AutoCompleteGroupTitle";const Pf={ml:5,my:1,fontSize:"xs",letterSpacing:"wider",fontWeight:"extrabold",textTransform:"uppercase"},$f=n=>{const{getGroupProps:e}=Mt(),r=n.groupSibling,{divider:{hasFirstChild:i,hasLastChild:o}}=e(n),a={my:2,borderColor:n.dividerColor},s={...a,mb:4,display:!n.showDivider||i?"none":""},l={...a,display:!n.showDivider||o||r?"none":""};return{top:s,bottom:l}},va=Vt((n,e)=>{const{isLoading:r}=Mt(),{loadingIcon:i,...o}=n;return F.jsxs(Ju,{children:[F.jsx(Ha,{...o,ref:e}),r&&F.jsx(Ku,{children:i||F.jsx(Ja,{})})]})}),Ao=Vt((n,e)=>{const{autoCompleteProps:r,inputRef:i,getInputProps:o,tags:a,setQuery:s}=Mt(),{children:l,isInvalid:u,hidePlaceholder:c,...d}=n,{value:h}=d;$.useEffect(()=>{h!==void 0&&(typeof h=="string"||h instanceof String)&&s(h)},[h]);const p=qu("Input",n);let{wrapper:m,input:y}=o(d,p);const{ref:w,..._}=m,N=Xn(e,i),R=be(l,{tags:a});c&&(y={...y,placeholder:Array.isArray(R)&&R.length?void 0:y.placeholder});const M=F.jsx(va,{isInvalid:u,...y,ref:N}),j=F.jsxs(Yu,{..._,ref:w,children:[R,F.jsx(Zu,{as:va,...y,ref:N})]});return F.jsx(Qu,{children:r.multiple?j:M})});Ao.displayName="Input";Ao.id="Input";function If(){const n=$.useContext(dc);if(!n)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return n}var ol=$.createContext({});ol.displayName="ColorModeContext";function al(){const n=$.useContext(ol);if(n===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return n}function Df(){const n=al(),e=If();return{...n,theme:e}}var To=(...n)=>n.filter(Boolean).join(" ");function Ut(n){const e=typeof n;return n!=null&&(e==="object"||e==="function")&&!Array.isArray(n)}function zt(n,...e){return Bf(n)?n(...e):n}var Bf=n=>typeof n=="function",Gr={exports:{}};Gr.exports;(function(n,e){var r=200,i="__lodash_hash_undefined__",o=800,a=16,s=9007199254740991,l="[object Arguments]",u="[object Array]",c="[object AsyncFunction]",d="[object Boolean]",h="[object Date]",p="[object Error]",m="[object Function]",y="[object GeneratorFunction]",w="[object Map]",_="[object Number]",N="[object Null]",R="[object Object]",M="[object Proxy]",j="[object RegExp]",A="[object Set]",G="[object String]",T="[object Undefined]",U="[object WeakMap]",L="[object ArrayBuffer]",I="[object DataView]",W="[object Float32Array]",se="[object Float64Array]",te="[object Int8Array]",Q="[object Int16Array]",Be="[object Int32Array]",Xe="[object Uint8Array]",et="[object Uint8ClampedArray]",Ne="[object Uint16Array]",We="[object Uint32Array]",Pe=/[\\^$.*+?()[\]{}|]/g,ze=/^\[object .+?Constructor\]$/,Pt=/^(?:0|[1-9]\d*)$/,ne={};ne[W]=ne[se]=ne[te]=ne[Q]=ne[Be]=ne[Xe]=ne[et]=ne[Ne]=ne[We]=!0,ne[l]=ne[u]=ne[L]=ne[d]=ne[I]=ne[h]=ne[p]=ne[m]=ne[w]=ne[_]=ne[R]=ne[j]=ne[A]=ne[G]=ne[U]=!1;var nr=typeof gr=="object"&&gr&&gr.Object===Object&&gr,Ee=typeof self=="object"&&self&&self.Object===Object&&self,Oe=nr||Ee||Function("return this")(),Jt=e&&!e.nodeType&&e,tt=Jt&&!0&&n&&!n.nodeType&&n,ot=tt&&tt.exports===Jt,vn=ot&&nr.process,Kt=function(){try{var g=tt&&tt.require&&tt.require("util").types;return g||vn&&vn.binding&&vn.binding("util")}catch(v){}}(),wn=Kt&&Kt.isTypedArray;function rr(g,v,x){switch(x.length){case 0:return g.call(v);case 1:return g.call(v,x[0]);case 2:return g.call(v,x[0],x[1]);case 3:return g.call(v,x[0],x[1],x[2])}return g.apply(v,x)}function $t(g,v){for(var x=-1,O=Array(g);++x-1}function Ql(g,v){var x=this.__data__,O=sr(x,g);return O<0?(++this.size,x.push([g,v])):x[O][1]=v,this}pt.prototype.clear=Kl,pt.prototype.delete=ql,pt.prototype.get=Yl,pt.prototype.has=Zl,pt.prototype.set=Ql;function Xt(g){var v=-1,x=g==null?0:g.length;for(this.clear();++v1?x[V-1]:void 0,de=V>2?x[2]:void 0;for(oe=g.length>3&&typeof oe=="function"?(V--,oe):void 0,de&&Cu(x[0],x[1],de)&&(oe=V<3?void 0:oe,V=1),v=Object(v);++O-1&&g%1==0&&g0){if(++v>=o)return arguments[0]}else v=0;return g.apply(void 0,arguments)}}function Pu(g){if(g!=null){try{return ge.call(g)}catch(v){}try{return g+""}catch(v){}}return""}function cr(g,v){return g===v||g!==g&&v!==v}var ki=zo(function(){return arguments}())?zo:function(g){return Rn(g)&&X.call(g,"callee")&&!Sn.call(g,"callee")},Ci=Array.isArray;function Ai(g){return g!=null&&Vo(g.length)&&!Ti(g)}function $u(g){return Rn(g)&&Ai(g)}var Wo=xi||Fu;function Ti(g){if(!Bt(g))return!1;var v=lr(g);return v==m||v==y||v==c||v==M}function Vo(g){return typeof g=="number"&&g>-1&&g%1==0&&g<=s}function Bt(g){var v=typeof g;return g!=null&&(v=="object"||v=="function")}function Rn(g){return g!=null&&typeof g=="object"}function Iu(g){if(!Rn(g)||lr(g)!=R)return!1;var v=Re(g);if(v===null)return!0;var x=X.call(v,"constructor")&&v.constructor;return typeof x=="function"&&x instanceof x&&ge.call(x)==qt}var Ho=wn?ir(wn):pu;function Du(g){return Su(g,Jo(g))}function Jo(g){return Ai(g)?uu(g):fu(g)}var Bu=Nu(function(g,v,x,O){Fo(g,v,x,O)});function zu(g){return function(){return g}}function Ko(g){return g}function Fu(){return!1}n.exports=Bu})(Gr,Gr.exports);var zf=Gr.exports;const Et=el(zf);var Ff=n=>/!(important)?$/.test(n),wa=n=>typeof n=="string"?n.replace(/!(important)?$/,"").trim():n,Gf=(n,e)=>r=>{const i=String(e),o=Ff(i),a=wa(i),s=n?"".concat(n,".").concat(a):a;let l=Ut(r.__cssMap)&&s in r.__cssMap?r.__cssMap[s].varRef:e;return l=wa(l),o?"".concat(l," !important"):l};function Eo(n){const{scale:e,transform:r,compose:i}=n;return(o,a)=>{var s;const l=Gf(e,o)(a);let u=(s=r==null?void 0:r(l,a))!=null?s:l;return i&&(u=i(u,a)),u}}var yr=(...n)=>e=>n.reduce((r,i)=>i(r),e);function He(n,e){return r=>{const i={property:r,scale:n};return i.transform=Eo({scale:n,transform:e}),i}}var Uf=({rtl:n,ltr:e})=>r=>r.direction==="rtl"?n:e;function Wf(n){const{property:e,scale:r,transform:i}=n;return{scale:r,property:Uf(e),transform:r?Eo({scale:r,compose:i}):i}}var sl=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function Vf(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...sl].join(" ")}function Hf(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...sl].join(" ")}var Jf={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},Kf={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function qf(n){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":n,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var Yf={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},Ji={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},Zf=new Set(Object.values(Ji)),Ki=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),Qf=n=>n.trim();function Xf(n,e){if(n==null||Ki.has(n))return n;if(!(qi(n)||Ki.has(n)))return"url('".concat(n,"')");const r=/(^[a-z-A-Z]+)\((.*)\)/g.exec(n),i=r==null?void 0:r[1],o=r==null?void 0:r[2];if(!i||!o)return n;const a=i.includes("-gradient")?i:"".concat(i,"-gradient"),[s,...l]=o.split(",").map(Qf).filter(Boolean);if((l==null?void 0:l.length)===0)return n;const u=s in Ji?Ji[s]:s;l.unshift(u);const c=l.map(d=>{if(Zf.has(d))return d;const h=d.indexOf(" "),[p,m]=h!==-1?[d.substr(0,h),d.substr(h+1)]:[d],y=qi(m)?m:m&&m.split(" "),w="colors.".concat(p),_=w in e.__cssMap?e.__cssMap[w].varRef:p;return y?[_,...Array.isArray(y)?y:[y]].join(" "):_});return"".concat(a,"(").concat(c.join(", "),")")}var qi=n=>typeof n=="string"&&n.includes("(")&&n.includes(")"),eg=(n,e)=>Xf(n,e!=null?e:{});function tg(n){return/^var\(--.+\)$/.test(n)}var ng=n=>{const e=parseFloat(n.toString()),r=n.toString().replace(String(e),"");return{unitless:!r,value:e,unit:r}},at=n=>e=>"".concat(n,"(").concat(e,")"),J={filter(n){return n!=="auto"?n:Jf},backdropFilter(n){return n!=="auto"?n:Kf},ring(n){return qf(J.px(n))},bgClip(n){return n==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:n}},transform(n){return n==="auto"?Vf():n==="auto-gpu"?Hf():n},vh(n){return n==="$100vh"?"var(--chakra-vh)":n},px(n){if(n==null)return n;const{unitless:e}=ng(n);return e||typeof n=="number"?"".concat(n,"px"):n},fraction(n){return typeof n!="number"||n>1?n:"".concat(n*100,"%")},float(n,e){const r={left:"right",right:"left"};return e.direction==="rtl"?r[n]:n},degree(n){if(tg(n)||n==null)return n;const e=typeof n=="string"&&!n.endsWith("deg");return typeof n=="number"||e?"".concat(n,"deg"):n},gradient:eg,blur:at("blur"),opacity:at("opacity"),brightness:at("brightness"),contrast:at("contrast"),dropShadow:at("drop-shadow"),grayscale:at("grayscale"),hueRotate:at("hue-rotate"),invert:at("invert"),saturate:at("saturate"),sepia:at("sepia"),bgImage(n){return n==null||qi(n)||Ki.has(n)?n:"url(".concat(n,")")},outline(n){const e=String(n)==="0"||String(n)==="none";return n!==null&&e?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:n}},flexDirection(n){var e;const{space:r,divide:i}=(e=Yf[n])!=null?e:{},o={flexDirection:n};return r&&(o[r]=1),i&&(o[i]=1),o}},b={borderWidths:He("borderWidths"),borderStyles:He("borderStyles"),colors:He("colors"),borders:He("borders"),gradients:He("gradients",J.gradient),radii:He("radii",J.px),space:He("space",yr(J.vh,J.px)),spaceT:He("space",yr(J.vh,J.px)),degreeT(n){return{property:n,transform:J.degree}},prop(n,e,r){return{property:n,scale:e,...e&&{transform:Eo({scale:e,transform:r})}}},propT(n,e){return{property:n,transform:e}},sizes:He("sizes",yr(J.vh,J.px)),sizesT:He("sizes",yr(J.vh,J.fraction)),shadows:He("shadows"),logical:Wf,blur:He("blur",J.blur)},Tr={background:b.colors("background"),backgroundColor:b.colors("backgroundColor"),backgroundImage:b.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:J.bgClip},bgSize:b.prop("backgroundSize"),bgPosition:b.prop("backgroundPosition"),bg:b.colors("background"),bgColor:b.colors("backgroundColor"),bgPos:b.prop("backgroundPosition"),bgRepeat:b.prop("backgroundRepeat"),bgAttachment:b.prop("backgroundAttachment"),bgGradient:b.gradients("backgroundImage"),bgClip:{transform:J.bgClip}};Object.assign(Tr,{bgImage:Tr.backgroundImage,bgImg:Tr.backgroundImage});var Y={border:b.borders("border"),borderWidth:b.borderWidths("borderWidth"),borderStyle:b.borderStyles("borderStyle"),borderColor:b.colors("borderColor"),borderRadius:b.radii("borderRadius"),borderTop:b.borders("borderTop"),borderBlockStart:b.borders("borderBlockStart"),borderTopLeftRadius:b.radii("borderTopLeftRadius"),borderStartStartRadius:b.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:b.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:b.radii("borderTopRightRadius"),borderStartEndRadius:b.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:b.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:b.borders("borderRight"),borderInlineEnd:b.borders("borderInlineEnd"),borderBottom:b.borders("borderBottom"),borderBlockEnd:b.borders("borderBlockEnd"),borderBottomLeftRadius:b.radii("borderBottomLeftRadius"),borderBottomRightRadius:b.radii("borderBottomRightRadius"),borderLeft:b.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:b.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:b.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:b.borders(["borderLeft","borderRight"]),borderInline:b.borders("borderInline"),borderY:b.borders(["borderTop","borderBottom"]),borderBlock:b.borders("borderBlock"),borderTopWidth:b.borderWidths("borderTopWidth"),borderBlockStartWidth:b.borderWidths("borderBlockStartWidth"),borderTopColor:b.colors("borderTopColor"),borderBlockStartColor:b.colors("borderBlockStartColor"),borderTopStyle:b.borderStyles("borderTopStyle"),borderBlockStartStyle:b.borderStyles("borderBlockStartStyle"),borderBottomWidth:b.borderWidths("borderBottomWidth"),borderBlockEndWidth:b.borderWidths("borderBlockEndWidth"),borderBottomColor:b.colors("borderBottomColor"),borderBlockEndColor:b.colors("borderBlockEndColor"),borderBottomStyle:b.borderStyles("borderBottomStyle"),borderBlockEndStyle:b.borderStyles("borderBlockEndStyle"),borderLeftWidth:b.borderWidths("borderLeftWidth"),borderInlineStartWidth:b.borderWidths("borderInlineStartWidth"),borderLeftColor:b.colors("borderLeftColor"),borderInlineStartColor:b.colors("borderInlineStartColor"),borderLeftStyle:b.borderStyles("borderLeftStyle"),borderInlineStartStyle:b.borderStyles("borderInlineStartStyle"),borderRightWidth:b.borderWidths("borderRightWidth"),borderInlineEndWidth:b.borderWidths("borderInlineEndWidth"),borderRightColor:b.colors("borderRightColor"),borderInlineEndColor:b.colors("borderInlineEndColor"),borderRightStyle:b.borderStyles("borderRightStyle"),borderInlineEndStyle:b.borderStyles("borderInlineEndStyle"),borderTopRadius:b.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:b.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:b.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:b.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(Y,{rounded:Y.borderRadius,roundedTop:Y.borderTopRadius,roundedTopLeft:Y.borderTopLeftRadius,roundedTopRight:Y.borderTopRightRadius,roundedTopStart:Y.borderStartStartRadius,roundedTopEnd:Y.borderStartEndRadius,roundedBottom:Y.borderBottomRadius,roundedBottomLeft:Y.borderBottomLeftRadius,roundedBottomRight:Y.borderBottomRightRadius,roundedBottomStart:Y.borderEndStartRadius,roundedBottomEnd:Y.borderEndEndRadius,roundedLeft:Y.borderLeftRadius,roundedRight:Y.borderRightRadius,roundedStart:Y.borderInlineStartRadius,roundedEnd:Y.borderInlineEndRadius,borderStart:Y.borderInlineStart,borderEnd:Y.borderInlineEnd,borderTopStartRadius:Y.borderStartStartRadius,borderTopEndRadius:Y.borderStartEndRadius,borderBottomStartRadius:Y.borderEndStartRadius,borderBottomEndRadius:Y.borderEndEndRadius,borderStartRadius:Y.borderInlineStartRadius,borderEndRadius:Y.borderInlineEndRadius,borderStartWidth:Y.borderInlineStartWidth,borderEndWidth:Y.borderInlineEndWidth,borderStartColor:Y.borderInlineStartColor,borderEndColor:Y.borderInlineEndColor,borderStartStyle:Y.borderInlineStartStyle,borderEndStyle:Y.borderInlineEndStyle});var rg={color:b.colors("color"),textColor:b.colors("color"),fill:b.colors("fill"),stroke:b.colors("stroke")},Yi={boxShadow:b.shadows("boxShadow"),mixBlendMode:!0,blendMode:b.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:b.prop("backgroundBlendMode"),opacity:!0};Object.assign(Yi,{shadow:Yi.boxShadow});var ig={filter:{transform:J.filter},blur:b.blur("--chakra-blur"),brightness:b.propT("--chakra-brightness",J.brightness),contrast:b.propT("--chakra-contrast",J.contrast),hueRotate:b.degreeT("--chakra-hue-rotate"),invert:b.propT("--chakra-invert",J.invert),saturate:b.propT("--chakra-saturate",J.saturate),dropShadow:b.propT("--chakra-drop-shadow",J.dropShadow),backdropFilter:{transform:J.backdropFilter},backdropBlur:b.blur("--chakra-backdrop-blur"),backdropBrightness:b.propT("--chakra-backdrop-brightness",J.brightness),backdropContrast:b.propT("--chakra-backdrop-contrast",J.contrast),backdropHueRotate:b.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:b.propT("--chakra-backdrop-invert",J.invert),backdropSaturate:b.propT("--chakra-backdrop-saturate",J.saturate)},Ur={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:J.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:b.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:b.space("gap"),rowGap:b.space("rowGap"),columnGap:b.space("columnGap")};Object.assign(Ur,{flexDir:Ur.flexDirection});var ll={gridGap:b.space("gridGap"),gridColumnGap:b.space("gridColumnGap"),gridRowGap:b.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},og={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:J.outline},outlineOffset:!0,outlineColor:b.colors("outlineColor")},Ke={width:b.sizesT("width"),inlineSize:b.sizesT("inlineSize"),height:b.sizes("height"),blockSize:b.sizes("blockSize"),boxSize:b.sizes(["width","height"]),minWidth:b.sizes("minWidth"),minInlineSize:b.sizes("minInlineSize"),minHeight:b.sizes("minHeight"),minBlockSize:b.sizes("minBlockSize"),maxWidth:b.sizes("maxWidth"),maxInlineSize:b.sizes("maxInlineSize"),maxHeight:b.sizes("maxHeight"),maxBlockSize:b.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(n,e)=>{var r,i,o;return{["@media screen and (min-width: ".concat((o=(i=(r=e.__breakpoints)==null?void 0:r.get(n))==null?void 0:i.minW)!=null?o:n,")")]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(n,e)=>{var r,i,o;return{["@media screen and (max-width: ".concat((o=(i=(r=e.__breakpoints)==null?void 0:r.get(n))==null?void 0:i._minW)!=null?o:n,")")]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:b.propT("float",J.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ke,{w:Ke.width,h:Ke.height,minW:Ke.minWidth,maxW:Ke.maxWidth,minH:Ke.minHeight,maxH:Ke.maxHeight,overscroll:Ke.overscrollBehavior,overscrollX:Ke.overscrollBehaviorX,overscrollY:Ke.overscrollBehaviorY});var ag={listStyleType:!0,listStylePosition:!0,listStylePos:b.prop("listStylePosition"),listStyleImage:!0,listStyleImg:b.prop("listStyleImage")};function sg(n,e,r,i){const o=typeof e=="string"?e.split("."):[e];for(i=0;i{const e=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return n(r,i,o);e.has(r)||e.set(r,new Map);const s=e.get(r);if(s.has(i))return s.get(i);const l=n(r,i,o,a);return s.set(i,l),l}},ug=lg(sg),cg={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},dg={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},$i=(n,e,r)=>{const i={},o=ug(n,e,{});for(const a in o)a in r&&r[a]!=null||(i[a]=o[a]);return i},hg={srOnly:{transform(n){return n===!0?cg:n==="focusable"?dg:{}}},layerStyle:{processResult:!0,transform:(n,e,r)=>$i(e,"layerStyles.".concat(n),r)},textStyle:{processResult:!0,transform:(n,e,r)=>$i(e,"textStyles.".concat(n),r)},apply:{processResult:!0,transform:(n,e,r)=>$i(e,n,r)}},Wn={position:!0,pos:b.prop("position"),zIndex:b.prop("zIndex","zIndices"),inset:b.spaceT("inset"),insetX:b.spaceT(["left","right"]),insetInline:b.spaceT("insetInline"),insetY:b.spaceT(["top","bottom"]),insetBlock:b.spaceT("insetBlock"),top:b.spaceT("top"),insetBlockStart:b.spaceT("insetBlockStart"),bottom:b.spaceT("bottom"),insetBlockEnd:b.spaceT("insetBlockEnd"),left:b.spaceT("left"),insetInlineStart:b.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:b.spaceT("right"),insetInlineEnd:b.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Wn,{insetStart:Wn.insetInlineStart,insetEnd:Wn.insetInlineEnd});var pg={ring:{transform:J.ring},ringColor:b.colors("--chakra-ring-color"),ringOffset:b.prop("--chakra-ring-offset-width"),ringOffsetColor:b.colors("--chakra-ring-offset-color"),ringInset:b.prop("--chakra-ring-inset")},ue={margin:b.spaceT("margin"),marginTop:b.spaceT("marginTop"),marginBlockStart:b.spaceT("marginBlockStart"),marginRight:b.spaceT("marginRight"),marginInlineEnd:b.spaceT("marginInlineEnd"),marginBottom:b.spaceT("marginBottom"),marginBlockEnd:b.spaceT("marginBlockEnd"),marginLeft:b.spaceT("marginLeft"),marginInlineStart:b.spaceT("marginInlineStart"),marginX:b.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:b.spaceT("marginInline"),marginY:b.spaceT(["marginTop","marginBottom"]),marginBlock:b.spaceT("marginBlock"),padding:b.space("padding"),paddingTop:b.space("paddingTop"),paddingBlockStart:b.space("paddingBlockStart"),paddingRight:b.space("paddingRight"),paddingBottom:b.space("paddingBottom"),paddingBlockEnd:b.space("paddingBlockEnd"),paddingLeft:b.space("paddingLeft"),paddingInlineStart:b.space("paddingInlineStart"),paddingInlineEnd:b.space("paddingInlineEnd"),paddingX:b.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:b.space("paddingInline"),paddingY:b.space(["paddingTop","paddingBottom"]),paddingBlock:b.space("paddingBlock")};Object.assign(ue,{m:ue.margin,mt:ue.marginTop,mr:ue.marginRight,me:ue.marginInlineEnd,marginEnd:ue.marginInlineEnd,mb:ue.marginBottom,ml:ue.marginLeft,ms:ue.marginInlineStart,marginStart:ue.marginInlineStart,mx:ue.marginX,my:ue.marginY,p:ue.padding,pt:ue.paddingTop,py:ue.paddingY,px:ue.paddingX,pb:ue.paddingBottom,pl:ue.paddingLeft,ps:ue.paddingInlineStart,paddingStart:ue.paddingInlineStart,pr:ue.paddingRight,pe:ue.paddingInlineEnd,paddingEnd:ue.paddingInlineEnd});var fg={textDecorationColor:b.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:b.shadows("textShadow")},gg={clipPath:!0,transform:b.propT("transform",J.transform),transformOrigin:!0,translateX:b.spaceT("--chakra-translate-x"),translateY:b.spaceT("--chakra-translate-y"),skewX:b.degreeT("--chakra-skew-x"),skewY:b.degreeT("--chakra-skew-y"),scaleX:b.prop("--chakra-scale-x"),scaleY:b.prop("--chakra-scale-y"),scale:b.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:b.degreeT("--chakra-rotate")},mg={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:b.prop("transitionDuration","transition.duration"),transitionProperty:b.prop("transitionProperty","transition.property"),transitionTimingFunction:b.prop("transitionTimingFunction","transition.easing")},yg={fontFamily:b.prop("fontFamily","fonts"),fontSize:b.prop("fontSize","fontSizes",J.px),fontWeight:b.prop("fontWeight","fontWeights"),lineHeight:b.prop("lineHeight","lineHeights"),letterSpacing:b.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(n){if(n===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},bg={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:b.spaceT("scrollMargin"),scrollMarginTop:b.spaceT("scrollMarginTop"),scrollMarginBottom:b.spaceT("scrollMarginBottom"),scrollMarginLeft:b.spaceT("scrollMarginLeft"),scrollMarginRight:b.spaceT("scrollMarginRight"),scrollMarginX:b.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:b.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:b.spaceT("scrollPadding"),scrollPaddingTop:b.spaceT("scrollPaddingTop"),scrollPaddingBottom:b.spaceT("scrollPaddingBottom"),scrollPaddingLeft:b.spaceT("scrollPaddingLeft"),scrollPaddingRight:b.spaceT("scrollPaddingRight"),scrollPaddingX:b.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:b.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function ul(n){return Ut(n)&&n.reference?n.reference:String(n)}var yi=(n,...e)=>e.map(ul).join(" ".concat(n," ")).replace(/calc/g,""),xa=(...n)=>"calc(".concat(yi("+",...n),")"),Sa=(...n)=>"calc(".concat(yi("-",...n),")"),Zi=(...n)=>"calc(".concat(yi("*",...n),")"),Na=(...n)=>"calc(".concat(yi("/",...n),")"),_a=n=>{const e=ul(n);return e!=null&&!Number.isNaN(parseFloat(e))?String(e).startsWith("-")?String(e).slice(1):"-".concat(e):Zi(e,-1)},Mn=Object.assign(n=>({add:(...e)=>Mn(xa(n,...e)),subtract:(...e)=>Mn(Sa(n,...e)),multiply:(...e)=>Mn(Zi(n,...e)),divide:(...e)=>Mn(Na(n,...e)),negate:()=>Mn(_a(n)),toString:()=>n.toString()}),{add:xa,subtract:Sa,multiply:Zi,divide:Na,negate:_a});function vg(n){const e=parseFloat(n.toString()),r=n.toString().replace(String(e),"");return{unitless:!r,value:e,unit:r}}function Ra(n){if(n==null)return n;const{unitless:e}=vg(n);return e||typeof n=="number"?"".concat(n,"px"):n}function wg(n,e){const r=["@media screen"];return n&&r.push("and","(min-width: ".concat(Ra(n),")")),e&&r.push("and","(max-width: ".concat(Ra(e),")")),r.join(" ")}var Ce={hover:(n,e)=>"".concat(n,":hover ").concat(e,", ").concat(n,"[data-hover] ").concat(e),focus:(n,e)=>"".concat(n,":focus ").concat(e,", ").concat(n,"[data-focus] ").concat(e),focusVisible:(n,e)=>"".concat(n,":focus-visible ").concat(e),focusWithin:(n,e)=>"".concat(n,":focus-within ").concat(e),active:(n,e)=>"".concat(n,":active ").concat(e,", ").concat(n,"[data-active] ").concat(e),disabled:(n,e)=>"".concat(n,":disabled ").concat(e,", ").concat(n,"[data-disabled] ").concat(e),invalid:(n,e)=>"".concat(n,":invalid ").concat(e,", ").concat(n,"[data-invalid] ").concat(e),checked:(n,e)=>"".concat(n,":checked ").concat(e,", ").concat(n,"[data-checked] ").concat(e),indeterminate:(n,e)=>"".concat(n,":indeterminate ").concat(e,", ").concat(n,"[aria-checked=mixed] ").concat(e,", ").concat(n,"[data-indeterminate] ").concat(e),readOnly:(n,e)=>"".concat(n,":read-only ").concat(e,", ").concat(n,"[readonly] ").concat(e,", ").concat(n,"[data-read-only] ").concat(e),expanded:(n,e)=>"".concat(n,":read-only ").concat(e,", ").concat(n,"[aria-expanded=true] ").concat(e,", ").concat(n,"[data-expanded] ").concat(e),placeholderShown:(n,e)=>"".concat(n,":placeholder-shown ").concat(e)},_t=n=>cl(e=>n(e,"&"),"[role=group]","[data-group]",".group"),ft=n=>cl(e=>n(e,"~ &"),"[data-peer]",".peer"),cl=(n,...e)=>e.map(n).join(", "),Lo={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:_t(Ce.hover),_peerHover:ft(Ce.hover),_groupFocus:_t(Ce.focus),_peerFocus:ft(Ce.focus),_groupFocusVisible:_t(Ce.focusVisible),_peerFocusVisible:ft(Ce.focusVisible),_groupActive:_t(Ce.active),_peerActive:ft(Ce.active),_groupDisabled:_t(Ce.disabled),_peerDisabled:ft(Ce.disabled),_groupInvalid:_t(Ce.invalid),_peerInvalid:ft(Ce.invalid),_groupChecked:_t(Ce.checked),_peerChecked:ft(Ce.checked),_groupFocusWithin:_t(Ce.focusWithin),_peerFocusWithin:ft(Ce.focusWithin),_peerPlaceholderShown:ft(Ce.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},xg=Object.keys(Lo);function Sg(n,e=[]){const r=Object.assign({},n);for(const i of e)i in r&&delete r[i];return r}var Oo=Et({},Tr,Y,rg,Ur,Ke,ig,pg,og,ll,hg,Wn,Yi,ue,bg,yg,fg,gg,ag,mg);Object.assign({},ue,Ke,Ur,ll,Wn);var Ng=[...Object.keys(Oo),...xg],_g={...Oo,...Lo},Rg=n=>n in _g,kg=n=>e=>{if(!e.__breakpoints)return n;const{isResponsive:r,toArrayValue:i,media:o}=e.__breakpoints,a={};for(const s in n){let l=zt(n[s],e);if(l==null)continue;if(l=Ut(l)&&r(l)?i(l):l,!Array.isArray(l)){a[s]=l;continue}const u=l.slice(0,o.length).length;for(let c=0;cn.startsWith("--")&&typeof e=="string"&&!Ag(e),Eg=(n,e)=>{var r,i;if(e==null)return e;const o=u=>{var c,d;return(d=(c=n.__cssMap)==null?void 0:c[u])==null?void 0:d.varRef},a=u=>{var c;return(c=o(u))!=null?c:u},[s,l]=Cg(e);return e=(i=(r=o(s))!=null?r:a(l))!=null?i:a(e),e};function Lg(n){const{configs:e={},pseudos:r={},theme:i}=n,o=(a,s=!1)=>{var l,u,c;const d=zt(a,i),h=kg(d)(i);let p={};for(let m in h){const y=h[m];let w=zt(y,i);m in r&&(m=r[m]),Tg(m,w)&&(w=Eg(i,w));let _=e[m];if(_===!0&&(_={property:m}),Ut(w)){p[m]=(l=p[m])!=null?l:{},p[m]=Et({},p[m],o(w,!0));continue}let N=(c=(u=_==null?void 0:_.transform)==null?void 0:u.call(_,w,i,d))!=null?c:w;N=_!=null&&_.processResult?o(N,!0):N;const R=zt(_==null?void 0:_.property,i);if(!s&&_!=null&&_.static){const M=zt(_.static,i);p=Et({},p,M)}if(R&&Array.isArray(R)){for(const M of R)p[M]=N;continue}if(R){R==="&"&&Ut(N)?p=Et({},p,N):p[R]=N;continue}if(Ut(N)){p=Et({},p,N);continue}p[m]=N}return p};return o}var Og=n=>e=>Lg({theme:e,pseudos:Lo,configs:Oo})(n);function jg(n,e){if(Array.isArray(n))return n;if(Ut(n))return e(n);if(n!=null)return[n]}function Mg(n,e){for(let r=e+1;r{Et(u,{[R]:h?N[R]:{[_]:N[R]}})});continue}if(!p){h?Et(u,N):u[_]=N;continue}u[_]=N}}return u}}function $g(n){return e=>{var r;const{variant:i,size:o,theme:a}=e,s=Pg(a);return Et({},zt((r=n.baseStyle)!=null?r:{},e),s(n,"sizes",o,e),s(n,"variants",i,e))}}function Ig(n){return Sg(n,["styleConfig","size","variant","colorScheme"])}var Dg=typeof Element<"u",Bg=typeof Map=="function",zg=typeof Set=="function",Fg=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Er(n,e){if(n===e)return!0;if(n&&e&&typeof n=="object"&&typeof e=="object"){if(n.constructor!==e.constructor)return!1;var r,i,o;if(Array.isArray(n)){if(r=n.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!Er(n[i],e[i]))return!1;return!0}var a;if(Bg&&n instanceof Map&&e instanceof Map){if(n.size!==e.size)return!1;for(a=n.entries();!(i=a.next()).done;)if(!e.has(i.value[0]))return!1;for(a=n.entries();!(i=a.next()).done;)if(!Er(i.value[1],e.get(i.value[0])))return!1;return!0}if(zg&&n instanceof Set&&e instanceof Set){if(n.size!==e.size)return!1;for(a=n.entries();!(i=a.next()).done;)if(!e.has(i.value[0]))return!1;return!0}if(Fg&&ArrayBuffer.isView(n)&&ArrayBuffer.isView(e)){if(r=n.length,r!=e.length)return!1;for(i=r;i--!==0;)if(n[i]!==e[i])return!1;return!0}if(n.constructor===RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf&&typeof n.valueOf=="function"&&typeof e.valueOf=="function")return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString&&typeof n.toString=="function"&&typeof e.toString=="function")return n.toString()===e.toString();if(o=Object.keys(n),r=o.length,r!==Object.keys(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[i]))return!1;if(Dg&&n instanceof Element)return!1;for(i=r;i--!==0;)if(!((o[i]==="_owner"||o[i]==="__v"||o[i]==="__o")&&n.$$typeof)&&!Er(n[o[i]],e[o[i]]))return!1;return!0}return n!==n&&e!==e}var Gg=function(n,e){try{return Er(n,e)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const Ug=el(Gg);function dl(n,e={}){var r;const{styleConfig:i,...o}=e,{theme:a,colorMode:s}=Df(),l=n?lc(a,"components.".concat(n)):void 0,u=i||l,c=uc({theme:a,colorMode:s},(r=u==null?void 0:u.defaultProps)!=null?r:{},Za(ui(o,["children"]))),d=$.useRef({});if(u){const h=$g(u)(c);Ug(d.current,h)||(d.current=h)}return d.current}function Wg(n,e={}){return dl(n,e)}function Vg(n,e={}){return dl(n,e)}var Hg=new Set([...Ng,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Jg=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function Kg(n){return Jg.has(n)||!Hg.has(n)}function qg(n,...e){if(n==null)throw new TypeError("Cannot convert undefined or null to object");const r={...n};for(const i of e)if(i!=null)for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&(o in r&&delete r[o],r[o]=i[o]);return r}var ka,Yg=(ka=Yo.default)!=null?ka:Yo,Zg=({baseStyle:n})=>e=>{const{theme:r,css:i,__css:o,sx:a,...s}=e,l=cc(s,(h,p)=>Rg(p)),u=be(n,e),c=qg({},o,u,Za(l),a),d=Og(c)(e.theme);return i?[d,i]:d};function Ii(n,e){const{baseStyle:r,...i}=e!=null?e:{};i.shouldForwardProp||(i.shouldForwardProp=Kg);const o=Zg({baseStyle:r}),a=Yg(n,i)(o);return P.forwardRef(function(s,l){const{colorMode:u,forced:c}=al();return P.createElement(a,{ref:l,"data-theme":c?u:void 0,...s})})}function Qg(){const n=new Map;return new Proxy(Ii,{apply(e,r,i){return Ii(...i)},get(e,r){return n.has(r)||n.set(r,Ii(r)),n.get(r)}})}var dt=Qg();function it(n){return $.forwardRef(n)}var Ca={path:F.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[F.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),F.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),F.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},bi=it((n,e)=>{const{as:r,viewBox:i,color:o="currentColor",focusable:a=!1,children:s,className:l,__css:u,...c}=n,d=To("chakra-icon",l),h=Wg("Icon",n),p={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o,...u,...h},m={ref:e,focusable:a,className:d,__css:p},y=i!=null?i:Ca.viewBox;if(r&&typeof r!="string")return F.jsx(dt.svg,{as:r,...m,...c});const w=s!=null?s:Ca.path;return F.jsx(dt.svg,{verticalAlign:"middle",viewBox:y,...m,...c,children:w})});bi.displayName="Icon";function Xg(n,e){return"".concat(n," returned `undefined`. Seems you forgot to wrap component within ").concat(e)}function em(n={}){const{name:e,strict:r=!0,hookName:i="useContext",providerName:o="Provider",errorMessage:a,defaultValue:s}=n,l=$.createContext(s);l.displayName=e;function u(){var c;const d=$.useContext(l);if(!d&&r){const h=new Error(a!=null?a:Xg(i,o));throw h.name="ContextError",(c=Error.captureStackTrace)==null||c.call(Error,h,u),h}return d}return[l.Provider,u,l]}var tm=it(function(n,e){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:c,shouldWrapChildren:d,...h}=n,p=$.useMemo(()=>d?$.Children.map(a,(m,y)=>F.jsx(jo,{children:m},y)):a,[a,d]);return F.jsx(dt.div,{ref:e,className:To("chakra-wrap",c),...h,children:F.jsx(dt.ul,{className:"chakra-wrap__list",__css:{display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",gap:r,columnGap:i,rowGap:o,padding:"0"},children:p})})});tm.displayName="Wrap";var jo=it(function(n,e){const{className:r,...i}=n;return F.jsx(dt.li,{ref:e,__css:{display:"flex",alignItems:"flex-start"},className:To("chakra-wrap__listitem",r),...i})});jo.displayName="WrapItem";var Mo=dt("div");Mo.displayName="Box";var hl=it(function(n,e){const{size:r,centerContent:i=!0,...o}=n,a=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return F.jsx(Mo,{ref:e,boxSize:r,__css:{...a,flexShrink:0,flexGrow:0},...o})});hl.displayName="Square";var nm=it(function(n,e){const{size:r,...i}=n;return F.jsx(hl,{size:r,ref:e,borderRadius:"9999px",...i})});nm.displayName="Circle";var pl=it(function(n,e){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...c}=n,d={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return F.jsx(dt.div,{ref:e,__css:d,...c})});pl.displayName="Flex";const rm=n=>{const{getEmptyStateProps:e}=Mt(),r=e(F.jsx(pl,{...im,children:"No options found!"}));return F.jsx(Mo,{...n,children:r})},im={fontSize:"sm",align:"center",justify:"center",fontWeight:"bold",fontStyle:"italic"},Aa=["AutoCompleteGroup","AutoCompleteItem","AutoCompleteCreatable"],om=n=>{const e=P.Children.map(n,(i,o)=>{var a;if(((a=i==null?void 0:i.type)==null?void 0:a.displayName)==="AutoCompleteGroup"){const s=P.Children.toArray(n)[o+1];return P.cloneElement(i,{groupSibling:s?s.type.displayName==="AutoCompleteGroup":!1})}return i}),r=P.Children.toArray(e).filter(i=>{var o;return!Aa.includes((o=i==null?void 0:i.type)==null?void 0:o.displayName)});return[P.Children.toArray(e).filter(i=>{var o;return Aa.includes((o=i==null?void 0:i.type)==null?void 0:o.displayName)}),r]},fl=Vt((n,e)=>{const{children:r,loadingState:i,...o}=n,{listRef:a,isLoading:s}=Mt(),l=Xn(e,a),[u,c]=om(r);return F.jsxs(Ka,{ref:l,w:"inherit",...am,...o,children:[s&&F.jsx(Xu,{children:i||F.jsx(Ja,{size:"md"})}),!s&&F.jsxs(F.Fragment,{children:[u,F.jsx(rm,{}),c]})]})});fl.displayName="AutoCompleteList";const am={py:"4",opacity:"0",bg:"#232934",rounded:"md",maxH:"350px",border:"none",shadow:"base",zIndex:"popover",overflowY:"auto",_light:{bg:"#ffffff"},_focus:{boxShadow:"none"}};var[sm,gl]=em({name:"TagStylesContext",errorMessage:"useTagStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),ml=it((n,e)=>{const r=Vg("Tag",n),i=Ig(n),o={display:"inline-flex",verticalAlign:"top",alignItems:"center",maxWidth:"100%",...r.container};return F.jsx(sm,{value:r,children:F.jsx(dt.span,{ref:e,...i,__css:o})})});ml.displayName="Tag";var yl=it((n,e)=>{const r=gl();return F.jsx(dt.span,{ref:e,noOfLines:1,...n,__css:r.label})});yl.displayName="TagLabel";var lm=it((n,e)=>F.jsx(bi,{ref:e,verticalAlign:"top",marginEnd:"0.5rem",...n}));lm.displayName="TagLeftIcon";var um=it((n,e)=>F.jsx(bi,{ref:e,verticalAlign:"top",marginStart:"0.5rem",...n}));um.displayName="TagRightIcon";var bl=n=>F.jsx(bi,{verticalAlign:"inherit",viewBox:"0 0 512 512",...n,children:F.jsx("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})});bl.displayName="TagCloseIcon";var vl=it((n,e)=>{const{isDisabled:r,children:i,...o}=n,a={display:"flex",alignItems:"center",justifyContent:"center",outline:"0",...gl().closeButton};return F.jsx(dt.button,{ref:e,"aria-label":"close",...o,type:"button",disabled:r,__css:a,children:i||F.jsx(bl,{})})});vl.displayName="TagCloseButton";$.memo(n=>{const{label:e,onRemove:r,disabled:i,...o}=n;return F.jsx(jo,{children:F.jsxs(ml,{borderRadius:"md",fontWeight:"normal",...i&&Ta,...o,children:[F.jsx(yl,{children:e}),F.jsx(vl,{onClick:()=>!i&&be(r),cursor:"pointer",...i&&Ta})]})})});const Ta={cursor:"text",userSelect:"none",opacity:.4,_focus:{boxShadow:"none"}};var Ft=function(){return Ft=Object.assign||function(n){for(var e,r=1,i=arguments.length;r0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a},La=function(n,e,r){if(r||arguments.length===2)for(var i=0,o=e.length,a;i0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a},fm=function(n,e){var r=n.validator,i=n.onDebouncedChange,o=n.delay,a=n.optionList,s=n.defaultValue;n.onChange;var l=hm(n,["validator","onDebouncedChange","delay","optionList","defaultValue","onChange"]),u=$.useRef(null),c=Xn(u,e),d=$.useRef("datalist-"+new Date().valueOf()),h=pm($.useState(!1),2),p=h[0],m=h[1],y=$.useRef();$.useEffect(function(){u.current&&(u.current.value=(s==null?void 0:s.toString())||"")},[s]);var w=function(N){var R=N.target.value;window.clearTimeout(y.current),r&&m(!r(R)),y.current=window.setTimeout(function(){i==null||i(R),y.current=void 0},o!=null?o:500)},_=function(N){var R=N.target.value;y.current!==void 0&&(window.clearTimeout(y.current),r&&m(!r(R)),i==null||i(R),y.current=void 0)};return f.jsxs(f.Fragment,{children:[f.jsx(Ha,Qi({ref:c,list:d.current,variant:"flushed",size:"sm",h:6,onChange:w,onBlur:_,isInvalid:p},l)),a&&f.jsx("datalist",{id:d.current,children:a==null?void 0:a.map(function(N,R){return f.jsx("option",{children:N},R)})})]})},gm=$.forwardRef(fm),Xi=function(){return Xi=Object.assign||function(n){for(var e,r=1,i=arguments.length;r0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a},wm=function(n){switch(n){case Lt.DEV:return"red";case Lt.UAT:return"orange";case Lt.PRD:return"green"}};function Ex(n){var e=n.environment,r=n.version,i=n.popoverHeader,o=n.popoverBody,a=vm($.useState(!1),2),s=a[0],l=a[1];return f.jsxs(Va,{isOpen:s,onOpen:function(){return i&&l(!0)},onClose:function(){return l(!1)},children:[f.jsx(fc,{children:f.jsx(Qa,{ml:1,colorScheme:wm(e),title:"".concat(e,": ").concat(r),cursor:i?"pointer":"help",children:e===Lt.PRD?r:e})}),f.jsxs(Ka,{children:[f.jsx(gc,{}),f.jsx(mc,{}),f.jsx(yc,{children:i}),f.jsx(bc,{children:o})]})]})}var xm=function(n,e,r){var i=new Blob([r],{type:e});Sm(n,i)},Sm=function(n,e){var r=window.URL.createObjectURL(e),i=document.createElement("a");i.href=r,i.download=n,document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(r)},Nm=function(n,e){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var i=r.call(n),o,a=[],s;try{for(;(e===void 0||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a};function _m(n){var e=n.cancelRef,r=n.isOpen,i=n.onClose,o=Nm($.useState(!1),2),a=o[0],s=o[1],l=function(){s(!0);var u=Ge.storage.getAll(),c=Ge.getAppName(),d="".concat(c,"_BACKUP_").concat(new Date().toISOString(),".json");xm(d,"application/json",JSON.stringify(u)),Ge.storage.clear(),setTimeout(function(){window.location.reload()},2e3)};return f.jsxs(vc,{leastDestructiveRef:e,isOpen:r,onClose:i,children:[f.jsx(wc,{}),f.jsxs(xc,{children:[f.jsx(Sc,{children:"Warning 警告"}),f.jsx(Nc,{}),f.jsxs(_c,{sx:{"& p":{my:1}},children:[f.jsx(At,{children:"Are you sure you want to reset the app? The webpage local storage for this app will be cleared. A copy of the local storage will be downloaded and it may be used for restoration (varies with app)."}),f.jsx(At,{children:"確定重設該應用程式嗎?應用程式的網頁本地儲存將會被清除。本地儲存的副本可供下載及用於復原(因應用程式而異)。"}),f.jsx(At,{children:"确定重置本应用程序吗?应用程序的网页本地存储将会被清除。本地存储的拷贝可供下载以及用于还原(因应用程序而異)。"})]}),f.jsxs(Rc,{children:[f.jsx(dn,{ref:e,onClick:i,children:"Cancel"}),f.jsx(dn,{isLoading:a,colorScheme:"red",ml:3,onClick:l,children:"Confirm and reload"})]})]})]})}var Hn=function(){return Hn=Object.assign||function(n){for(var e,r=1,i=arguments.length;r0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a};function Cm(n){var e=n.error,r=n.errorInfo,i=n.allowReset,o=n.sx,a=Rm(n,["error","errorInfo","allowReset","sx"]),s=ht("RmgErrorBoundary"),l=Xa("primary.500","primary.300"),u=km($.useState(!1),2),c=u[0],d=u[1],h=$.useRef(null),p=function(w){return f.jsx(Fn,{color:l,role:"button",onClick:function(){return d(!0)},children:w})},m=Ge.getAppName(),y=f.jsx(Fn,{color:l,href:"https://github.com/railmapgen/".concat(m,"/issues"),isExternal:!0,children:"GitHub Issue"});return f.jsxs(uo,Hn({status:"error",sx:Hn(Hn({},s),o)},a,{children:[f.jsx(co,{}),f.jsx(kc,{children:"Something went wrong!"}),f.jsxs(Cc,{children:[f.jsxs(At,{children:["Please try to refresh or re-import your configuration files. If the issue still persists, please consider upgrading your browser",i?f.jsxs(f.Fragment,{children:[" or ",p("reset this app")]}):"",". Should you need any help, please contact us by submitting an issue in ",y," with the details shown below."]}),f.jsxs(At,{children:["請嘗試重新整理或重新上載設定檔。如果問題仍然存在,請考慮更新你的瀏覽器",i?f.jsxs(f.Fragment,{children:["或",p("重設該應用程式")]}):"","。如需協助或與我們聯絡,請前往 ",y," 提交一個 Issue 並附以詳細資料。"]}),f.jsxs(At,{children:["请尝试刷新或者重新上传配置文件。如果问题仍然存在,请考虑更新您的浏览器",i?f.jsxs(f.Fragment,{children:["或者",p("重置本应用程序")]}):"","。如需帮助或者联系我们,请前往 ",y," 提交一个 Issue 并附上详细信息。"]}),f.jsxs(At,{as:"details",children:[e==null?void 0:e.toString(),f.jsx("br",{}),r==null?void 0:r.componentStack]}),i&&f.jsx(_m,{cancelRef:h,isOpen:c,onClose:function(){return d(!1)}})]})]}))}var Am=function(){var n=function(e,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(i[a]=o[a])},n(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}(),eo=function(){return eo=Object.assign||function(n){for(var e,r=1,i=arguments.length;r0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a};function Mm(n){var e=n.defaultValue,r=n.options,i=n.disabledOptions,o=jm(n,["defaultValue","options","disabledOptions"]),a=$.useRef(null);$.useEffect(function(){a.current&&(a.current.value=(e==null?void 0:e.toString())||"")},[e]);var s=function(l,u){return f.jsx("option",{value:l,disabled:(i==null?void 0:i.find(function(c){return c.toString()===l}))!==void 0,children:u},l)};return f.jsx(Ec,no({ref:a,variant:"flushed",size:"sm",h:6},o,{children:Object.entries(r).map(function(l){var u=Oa(l,2),c=u[0],d=u[1];return typeof d=="object"?f.jsx("optgroup",{label:c,children:Object.entries(d).map(function(h){var p=Oa(h,2),m=p[0],y=p[1];return s(m,y)})},c):s(c,d)})}))}var Pm=function(n,e){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var i=r.call(n),o,a=[],s;try{for(;(e===void 0||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a},Lx=function(n,e,r){var i=Pm($.useState(e()),2),o=i[0],a=i[1];return $.useEffect(function(){n.then(function(){console.debug("[rmg-components] Getter updates finished"),a(e())})},[]),o},Di=function(n,e){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var i=r.call(n),o,a=[],s;try{for(;(e===void 0||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a},ja=function(n,e,r){if(r||arguments.length===2)for(var i=0,o=e.length,a;i0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return a};function Dm(n){var e=n.defaultValue,r=n.min,i=n.max,o=n.step,a=n.onThrottledChange,s=n.leftIcon,l=n.rightIcon,u=ht("RmgThrottledSlider"),c=Im($.useState(e!=null?e:0),2),d=c[0],h=c[1];$.useEffect(function(){e!==void 0&&d!==e&&h(e)},[e]);var p=$m(a!=null?a:function(){},500),m=function(){var w=Math.min(d+(o!=null?o:1)*10,i!=null?i:100);a==null||a(w),h(w)},y=function(){var w=Math.max(d-(o!=null?o:1)*10,r!=null?r:0);a==null||a(w),h(w)};return f.jsxs(ut,{sx:u,children:[s&&f.jsx(Or,{size:"xs",variant:"ghost","aria-label":"Drag left",icon:s,onClick:y}),f.jsxs(Lc,{value:d,min:r,max:i,step:o,onChange:function(w){p(w),h(w)},children:[f.jsx(Oc,{children:f.jsx(jc,{})}),f.jsx(Mc,{})]}),l&&f.jsx(Or,{size:"xs",variant:"ghost","aria-label":"Drag right",icon:l,onClick:m})]})}var Bm=function(n){var e=n.children,r=n.noWrap,i=ht("RmgOutput",{noWrap:r});return f.jsx(Lr.output,{sx:i,children:e})};function ye(n){var e=n.fields,r=n.noLabel,i=n.minW;return f.jsx(ut,{wrap:"wrap",children:e.map(function(o,a){if(o.hidden)return f.jsx($.Fragment,{},a);var s=o.minW||i,l=s==="full";return f.jsx(Om,{className:l?"mw-full":"",label:o.label,flex:l?void 0:1,minW:l?void 0:s,noLabel:r,oneLine:o.oneLine,children:function(u){switch(u.type){case"input":return f.jsx(gm,{placeholder:u.placeholder,defaultValue:u.value,type:u.variant,validator:u.validator,onDebouncedChange:u.onChange,delay:u.debouncedDelay,optionList:u.optionList,isDisabled:u.isDisabled});case"output":return f.jsx(Bm,{noWrap:u.noWrap,children:u.value});case"textarea":return f.jsx(bm,{placeholder:u.placeholder,defaultValue:u.value,onDebouncedChange:u.onChange,isDisabled:u.isDisabled});case"slider":return f.jsx(Dm,{defaultValue:u.value,min:u.min,max:u.max,step:u.step,onThrottledChange:u.onChange,leftIcon:u.leftIcon,rightIcon:u.rightIcon,isDisabled:u.isDisabled});case"select":return f.jsx(Mm,{defaultValue:u.value,onChange:function(c){var d,h=c.target.value;return(d=u.onChange)===null||d===void 0?void 0:d.call(u,typeof u.value=="number"?Number(h):h.toString())},options:u.options,disabledOptions:u.disabledOptions,isInvalid:u.isInvalid,isDisabled:u.isDisabled});case"switch":return f.jsx(Pc,{isChecked:u.isChecked,isDisabled:u.isDisabled,onChange:function(c){var d,h=c.target.checked;return(d=u.onChange)===null||d===void 0?void 0:d.call(u,h)}});case"custom":return u.component;default:return f.jsx("div",{})}}(o)},a)})})}var Ot=function(){return Ot=Object.assign||function(n){for(var e,r=1,i=arguments.length;r button:first-of-type":{ml:1}}},Qm={baseStyle:{w:"100%",h:"100%",position:"absolute",top:0,right:0,alignItems:"center",justifyContent:"center","& .rmg-loader__backdrop":{position:"absolute",w:"100%",h:"100%",zIndex:1500,bg:"blackAlpha.400"},"& .chakra-progress":{zIndex:2e3}}},Rt=function(n){return n==="dark"?"primary.300":"primary.500"},Xm={baseStyle:function(n){var e=n.theme,r=n.colorMode;return{"& .rmg-multi-select__wrapper":{position:"relative",w:"100%",h:"25.75px",transform:"translateY(1.75px)",cursor:"default"},"& .rmg-multi-select__field":{position:"relative",w:"100%",minW:0,outline:0,appearance:"none",transitionProperty:"common",transitionDuration:"normal",pb:"1px",fontSize:"sm",h:"6",borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_active:{borderColor:Rt(r),boxShadow:"0px 1px 0px 0px ".concat(zn(e,Rt(r)))},_focus:{borderColor:Rt(r),boxShadow:"0px 1px 0px 0px ".concat(zn(e,Rt(r)))},_focusVisible:{borderColor:Rt(r),boxShadow:"0px 1px 0px 0px ".concat(zn(e,Rt(r)))},"&.active":{borderColor:Rt(r),boxShadow:"0px 1px 0px 0px ".concat(zn(e,Rt(r)))},"& > span:last-of-type":{position:"absolute",right:8}},"& .rmg-multi-select__icon-wrapper":{display:"inline-flex",justifyContent:"center",w:6,h:"100%",position:"absolute",right:2,top:0,fontSize:"xl","& svg":{h:"1em",w:"1em"}},"& .chakra-popover__content":{w:"unset",minW:200},"& .chakra-popover__body":{p:0,"li label":{p:2,w:"100%",_hover:{bg:r==="dark"?"whiteAlpha.200":"gray.100"},_active:{bg:r==="dark"?"whiteAlpha.300":"gray.200"}}}}}},io=function(){return io=Object.assign||function(n){for(var e,r=1,i=arguments.length;r(n.RailMap="railmap",n.Platform="platform",n))(yy||{}),by=(n=>(n.Metro="metro",n.NationalRail="nationalrail",n.LightRail="lightrail",n.Footpath="footpath",n))(by||{}),vy=(n=>(n.APP_LOAD="APP_LOAD",n.ADD_STATION="ADD_STATION",n.ADD_LINE="ADD_LINE",n.IMPORT_RMG_PARAM="IMPORT_RMG_PARAM",n.IMPORT_WORK_FROM_GALLERY="IMPORT_WORK_FROM_GALLERY",n.DOWNLOAD_PARAM="DOWNLOAD_PARAM",n.DOWNLOAD_IMAGES="DOWNLOAD_IMAGES",n.LOAD_TUTORIAL="LOAD_TUTORIAL",n))(vy||{}),Ue=(n=>(n.LOGIN_STATE="rmp__login_state",n.APP="rmp__app",n.PARAM="rmp__param",n.PARAM_BACKUP="rmp__param__backup",n.DO_NOT_SHOW_RMT_MSG="rmp__doNotShowRMTMsg",n.ACCOUNT="rmg-home__account",n))(Ue||{}),le=(n=>(n.Other="other",n.Beijing="beijing",n.Berlin="berlin",n.Chongqing="chongqing",n.Foshan="foshan",n.Guangzhou="guangzhou",n.Hongkong="hongkong",n.Kunming="kunming",n.London="london",n.Qingdao="qingdao",n.Shanghai="shanghai",n.Shenzhen="shenzhen",n.Singapore="singapore",n.Suzhou="suzhou",n.Tokyo="tokyo",n))(le||{}),wy=(n=>(n.Shmetro="shmetro",n.Bjsubway="bjsubway",n))(wy||{});const xy="https://railmapgen.org/v1/subscription",Dx="https://railmapgen.org/v1/randomStationNames",Wr={RMP_CLOUD:!1,RMP_EXPORT:!1},Sy={state:"logged-out",activeSubscriptions:Wr,token:void 0},Sl=ci({name:"account",initialState:Sy,reducers:{setState:(n,e)=>{n.state=e.payload},setActiveSubscriptions:(n,e)=>{n.activeSubscriptions=e.payload},setToken:(n,e)=>{n.token=e.payload}}}),{setState:Kn,setActiveSubscriptions:Vr,setToken:Nl}=Sl.actions,Ny=Sl.reducer;var ee;(function(n){n.black="#000",n.white="#fff"})(ee||(ee={}));var _l=function(n,e,r,i){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function l(d){try{c(i.next(d))}catch(h){s(h)}}function u(d){try{c(i.throw(d))}catch(h){s(h)}}function c(d){d.done?a(d.value):o(d.value).then(l,u)}c((i=i.apply(n,e||[])).next())})};let zi={};const _y=(n,e)=>_l(void 0,void 0,void 0,function*(){if(n in zi)return zi[n];const i=yield(yield fetch(n,e)).json();return zi[n]=i,i}),Ry=(n,e)=>_l(void 0,void 0,void 0,function*(){return yield _y("/rmg-palette/resources/palettes/".concat(n,".json"),{signal:e})});var ky=function(n,e,r,i){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function l(d){try{c(i.next(d))}catch(h){s(h)}}function u(d){try{c(i.throw(d))}catch(h){s(h)}}function c(d){d.done?a(d.value):o(d.value).then(l,u)}c((i=i.apply(n,e||[])).next())})};const Bx=(n,e,r)=>ky(void 0,void 0,void 0,function*(){const[i,o]=n;if(i==="other")return n;try{const s=(yield Ry(i)).find(l=>l.id===o);return s?[i,o,s.colour,s.fg||ee.white]:(console.warn("[rmg-palette] updateTheme(".concat(i,", ").concat(o,"), line does not exist, returning old theme")),n)}catch(a){throw console.error("[rmg-palette] updateTheme(".concat(i,", ").concat(o,"), unexpected error occurs"),a),a}}),zx=n=>{const e=n.currentTarget.getBoundingClientRect(),r=n.clientX-e.left,i=n.clientY-e.top;return{x:r,y:i}},Fx=(n,e,r,i)=>({x:n*r/100+i.x,y:e*r/100+i.y}),Gx=(n,e)=>Math.round(n/e)*e,Ux=n=>{let[e,r,i,o]=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MIN_VALUE,Number.MIN_VALUE];return n.forEachNode((a,s)=>{const l=document.getElementById(a);if(l){const u=Cy(l);e=Math.min(u.x,e),r=Math.min(u.y,r),i=Math.max(u.x+u.width,i),o=Math.max(u.y+u.height,o)}}),e-=50,r-=50,i+=100,o+=100,{xMin:e,yMin:r,xMax:i,yMax:o}},Wx=n=>{var e,r;return{width:((e=n.width)!=null?e:720)-40,height:((r=n.height)!=null?r:1280)-40}},Cy=n=>{const e=n.getBBox(),r=n.ownerSVGElement,i=n.parentNode.getScreenCTM().inverse().multiply(n.getScreenCTM()),o=[r.createSVGPoint(),r.createSVGPoint(),r.createSVGPoint(),r.createSVGPoint()];o[0].x=e.x,o[0].y=e.y,o[1].x=e.x+e.width,o[1].y=e.y,o[2].x=e.x+e.width,o[2].y=e.y+e.height,o[3].x=e.x,o[3].y=e.y+e.height;let[a,s,l,u]=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MIN_VALUE,Number.MIN_VALUE];return o.forEach(c=>{c=c.matrixTransform(i),a=Math.min(a,c.x),l=Math.max(l,c.x),s=Math.min(s,c.y),u=Math.max(u,c.y)}),e.x=a,e.width=l-a,e.y=s,e.height=u-s,e},Vx=navigator.platform.startsWith("Mac"),Ia=async(n,e="SHA-256")=>{const i=new TextEncoder().encode(n),o=await crypto.subtle.digest(e,i);return Array.from(new Uint8Array(o)).map(s=>s.toString(16).padStart(2,"0")).join("")},Hx=()=>{const n=Math.floor(Math.random()*16777215);return"#".concat(n.toString(16).padStart(6,"0"))},Jx=n=>{const e=parseInt(n.slice(1,3),16),r=parseInt(n.slice(3,5),16),i=parseInt(n.slice(5,7),16);return(e*299+r*587+i*114)/1e3>=128?ee.black:ee.white},Ay="rmt-save-manager";var Ty=(n=>(n.SAVE_CHANGED="SAVE_CHANGED",n.TOKEN_REQUEST="TOKEN_REQUEST",n))(Ty||{});const Rl=new BroadcastChannel(Ay);let br,vr;const Ey=async n=>{if(!vr){const r=new pe().export();vr=await Ia(JSON.stringify(r)),jt.debug("Default graph hash: ".concat(vr))}const e=await Ia(JSON.stringify(n));br&&br!==vr&&br!==e&&(jt.debug("Notify RMP save change, hash: ".concat(e)),Rl.postMessage({type:"SAVE_CHANGED",key:Ue.PARAM,from:"rmp"})),br=e},Da=async()=>{jt.debug("Requesting token from RMT"),Rl.postMessage({type:"TOKEN_REQUEST",from:"rmp"})},Ly=async(n,e)=>{jt.debug("Updating token to: ".concat(e)),n.dispatch(Nl(e))},Oy=async(n,e)=>{const r=await fetch(xy,{headers:{accept:"application/json","Content-Type":"application/json",Authorization:"Bearer ".concat(e)}});if(r.status!==200){jt.debug("Token is invalid, expiring the login state"),n.dispatch(Kn("expired")),n.dispatch(Vr(Wr));return}n.dispatch(Kn("free"));const i=(await r.json()).subscriptions,o=structuredClone(Wr);for(const a of i){const s=a.type;s in o&&(n.dispatch(Kn("subscriber")),o[s]=!0)}n.dispatch(Vr(o)),jt.debug("Token is valid, setting active subscriptions: ".concat(JSON.stringify(o)))},jy=n=>{const e=i=>{if(!i){jt.debug("Account string is empty, logging out"),n.dispatch(Nl(void 0)),n.dispatch(Kn("logged-out")),n.dispatch(Vr(Wr));return}const o=JSON.parse(i),{token:a}=o;Ly(n,a),Oy(n,a)};let r=localStorage.getItem(Ue.ACCOUNT);e(r!=null?r:void 0),window.onstorage=()=>{const i=localStorage.getItem(Ue.ACCOUNT);r!==i&&(r=i,jt.debug("Account string changed to: ".concat(i)),e(i!=null?i:void 0))}},My="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Py=(n=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(n));for(;n--;)e+=My[r[n]&63];return e};var S=(n=>(n.Diagonal="diagonal",n.Perpendicular="perpendicular",n.RotatePerpendicular="ro-perp",n.Simple="simple",n))(S||{}),D=(n=>(n.SingleColor="single-color",n.ShanghaiSuburbanRailway="sh-sub-rwy",n.ShmetroVirtualInt="shmetro-virtual-int",n.GzmtrVirtualInt="gzmtr-virtual-int",n.GZMTRLoop="gzmtr-loop",n.ChinaRailway="china-railway",n.BjsubwaySingleColor="bjsubway-single-color",n.BjsubwayTram="bjsubway-tram",n.BjsubwayDotted="bjsubway-dotted",n.DualColor="dual-color",n.River="river",n.MTRRaceDays="mtr-race-days",n.MTRLightRail="mtr-light-rail",n.MTRUnpaidArea="mtr-unpaid-area",n.MTRPaidArea="mtr-paid-area",n.MRTUnderConstruction="mrt-under-constr",n.MRTSentosaExpress="mrt-sentosa-express",n.JREastSingleColor="jr-east-single-color",n.JREastSingleColorPattern="jr-east-single-color-pattern",n.LRTSingleColor="lrt-single-color",n.LondonTubeTerminal="london-tube-terminal",n.LondonTubeInternalInt="london-tube-internal-int",n.LondonTube10MinWalk="london-tube-10-min-walk",n.LondonRail="london-rail",n.LondonSandwich="london-sandwich",n.LondonLutonAirportDART="london-DART",n.LondonIFSCloudCableCar="london-dangleway",n.GuangdongIntercityRailway="gd-intercity-rwy",n))(D||{});const Kx=["single-color","bjsubway-single-color","bjsubway-tram","bjsubway-dotted","china-railway","mtr-race-days","mtr-light-rail","mrt-under-constr","jr-east-single-color","jr-east-single-color-pattern","lrt-single-color","london-sandwich","london-DART","london-dangleway"],$y=(n,e,r,i,o=Hr)=>{const{offset:a=Hr.offset}=o,s=Math.abs((i-r)/(e-n));if(s===1/0)return"M ".concat(n+a," ").concat(r," L ").concat(e+a," ").concat(i);if(s===0)return"M ".concat(n," ").concat(r+a," L ").concat(e," ").concat(i+a);{const l=1/s,u=a/Math.sqrt(l*l+1),c=u*l*-Math.sign((e-n)*(i-r));return"M ".concat(n+u," ").concat(r+c," L ").concat(e+u," ").concat(i+c)}},Hr={offset:0},Iy=n=>{var s;const{id:e,attrs:r,handleAttrsUpdate:i}=n,{t:o}=fe(),a=[{type:"input",label:o("panel.details.lines.simple.offset"),value:((s=r.offset)!=null?s:Hr.offset).toString(),variant:"number",onChange:l=>{r.offset=Number(l),i(e,r)},minW:"full"}];return f.jsx(ye,{fields:a})},Dy=f.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:f.jsx("path",{d:"M6,18L18,6",stroke:"currentColor",fill:"none"})}),By={generatePath:$y,icon:Dy,defaultAttrs:Hr,attrsComponent:Iy,metadata:{displayName:"panel.details.lines.simple.displayName"}},qx={translateX:0,translateY:0,scale:1,rotate:0},zy=3,Fy=1/0;var st=(n=>(n.Virtual="virtual",n.ShmetroNumLineBadge="shmetro-num-line-badge",n.ShmetroTextLineBadge="shmetro-text-line-badge",n.GzmtrLineBadge="gzmtr-line-badge",n.BjsubwayNumLineBadge="bjsubway-num-line-badge",n.BjsubwayTextLineBadge="bjsubway-text-line-badge",n.SuzhouRTNumLineBadge="suzhourt-num-line-badge",n.BerlinSBahnLineBadge="berlin-s-bahn-line-badge",n.BerlinUBahnLineBadge="berlin-u-bahn-line-badge",n.ChongqingRTNumLineBadge="chongqingrt-num-line-badge",n.ChongqingRTTextLineBadge="chongqingrt-text-line-badge",n.ShenzhenMetroNumLineBadge="shenzhen-metro-num-line-badge",n.MRTDestinationNumbers="mrt-num-line-badge",n.JREastLineBadge="jr-east-line-badge",n.QingdaoMetroNumLineBadge="qingdao-metro-num-line-badge",n.MRTLineBadge="mrt-line-badge",n.GuangdongIntercityRailwayLineBadge="gd-intercity-rwy-line-badge",n.LondonArrow="london-arrow",n.Facilities="facilities",n.Text="text",n.I18nText="i18n-text",n.Master="master",n))(st||{});const Gy="操作",Uy="应用程序",Wy="黑",Vy="取消",Hy="城市",Jy="组件",Ky="确定",qy="继续",Yy="复制",Zy="编辑",Qy="语言/Language",Xy="理由",eb="名称",tb="下一步",nb="打开",rb="调色板",ib="上一步",ob="删除",ab="重置",sb="设置",lb="提交",ub="翻译",cb="上传",db="白",hb={Action:Gy,Apps:Uy,"Back to list":"返回列表","Background colour":"背景色",Black:Wy,Cancel:Vy,City:Hy,Components:Jy,"Configuration file":"配置文件",Confirm:Ky,Continue:qy,"Country/Region":"国家/地区",Copy:Yy,Edit:Zy,"Foreground colour":"前景色","Go back":"返回",Language:Qy,Justification:Xy,Name:eb,Next:tb,Open:nb,Palette:rb,"Please select...":"请选择...",Previous:ib,"Rail Map Generator":"铁路线路图生成器","Rail Map Painter":"地铁线路图绘制器","Rail Map Toolkit":"线路图工具包",Remove:ob,Reset:ab,"RMG Templates":"RMG 模板","RMP Gallery":"RMP 画廊","RMP Designer":"RMP 设计师","Seed Project":"种子项目",Settings:sb,Submit:lb,Translate:ub,Upload:cb,White:db},pb="動作",fb="應用程式",gb="黑",mb="取消",yb="城市",bb="元件",vb="確定",wb="繼續",xb="複製",Sb="編輯",Nb="語言/Language",_b="理由",Rb="名稱",kb="下一步",Cb="開啟",Ab="調色盤",Tb="上一步",Eb="移除",Lb="重設",Ob="設定",jb="提交",Mb="翻譯",Pb="上載",$b="白",Ib={Action:pb,Apps:fb,"Back to list":"返回列表","Background colour":"背景色",Black:gb,Cancel:mb,City:yb,Components:bb,"Configuration file":"設定檔",Confirm:vb,Continue:wb,Copy:xb,"Country/Region":"國家/地區",Edit:Sb,"Foreground colour":"前景色","Go back":"返回",Language:Nb,Justification:_b,Name:Rb,Next:kb,Open:Cb,Palette:Ab,"Please select...":"請選擇...",Previous:Tb,"Rail Map Generator":"鐵路路綫圖產生器","Rail Map Painter":"地鐵路綫圖繪製器","Rail Map Toolkit":"路綫圖工具組",Remove:Eb,Reset:Lb,"RMG Templates":"RMG 範本","RMP Gallery":"RMP 畫廊","RMP Designer":"RMP 設計師","Seed Project":"種子項目",Settings:Ob,Submit:jb,Translate:Mb,Upload:Pb,White:$b},Db="言語/Language",Bb="調色板",zb="削除",Fb={Language:Db,Palette:Bb,"Rail Map Generator":"鉄道路線図ジェネレータ","Rail Map Painter":"鉄道路線図画家","Rail Map Toolkit":"路線図ツールキット",Remove:zb,"RMG Templates":"RMG テンプレート","RMP Gallery":"RMP 画廊","RMP Designer":"RMP 図案家"},Gb="조작",Ub="앱",Wb="블랙",Vb="취소",Hb="도시",Jb="요소",Kb="확인",qb="복사",Yb="편집",Zb="언어/Language",Qb="이유",Xb="명칭",ev="다음",tv="열기",nv="팔레트",rv="나아가",iv="삭제",ov="리셋",av="설치",sv="제출",lv="번역",uv="업로드",cv="화이트",dv={Action:Gb,Apps:Ub,"Back to list":"다시 목록으로","Background colour":"배경색",Black:Wb,Cancel:Vb,City:Hb,Components:Jb,"Configuration file":"환경 설정 파일",Confirm:Kb,Copy:qb,"Country/Region":"국가/지역",Edit:Yb,"Foreground colour":"전경색","Go back":"되돌아가",Language:Zb,Justification:Qb,Name:Xb,Next:ev,Open:tv,Palette:nv,"Please select...":"선택해주세요",Previous:rv,"Rail Map Generator":"철도 노선도 생성기","Rail Map Painter":"지하철 노선도 그리기","Rail Map Toolkit":"노선도 툴킷",Remove:iv,Reset:ov,"RMG Templates":"RMG 템플릿","RMP Gallery":"RMP 갤러리","RMP Designer":"RMP 디자이너","Seed Project":"종자 프로젝트",Settings:av,Submit:sv,Translate:lv,Upload:uv,White:cv};var hv={en:{},"zh-Hans":hb,"zh-Hant":Ib,ja:Fb,ko:dv};const pv="Color",fv="Warning",gv="Cancel",mv="Apply",yv="Remove",bv="Close",vv="Don't show me again",wv="The all-in-one toolkit you definitely do not want to miss!",xv={tools:{showLess:"Show less",section:{lineDrawing:"Line drawing",stations:"Stations",miscellaneousNodes:"Miscellaneous nodes"},select:"Select",learnHowToAdd:{station:"Learn how to add your stations!","misc-node":"Learn how to add your nodes!",line:"Learn how to add your line styles!"}},details:{header:"Details",info:{title:"Basic information",id:"ID",zIndex:"Depth",stationType:"Station Type",linePathType:"Line Path Type",lineStyleType:"Line Style Type",type:"Type",parallel:"Parallel line",parallelIndex:"Parallel index"},multipleSelection:{title:"Multiple Selection",change:"Change selected attributes",selected:"Selected Objects:",show:"Show",station:"Stations",miscNode:"MiscNodes",edge:"Lines"},changeStationTypeContent:"Changing station's type will remove all attributes from the station except its names.",changeLineTypeContent:"Changing line's type will remove all attributes from the line.",changeType:"Change Type",nodePosition:{title:"Node Position",pos:{x:"Coordinate X",y:"Coordinate Y"}},lineExtremities:{title:"Line Extremities",source:"Source",target:"Target",sourceName:"Source Name",targetName:"Target Name"},specificAttrsTitle:"Specific Attributes",unknown:{error:"Oops :( We can't recognize this {{category}}. Maybe it is created in a newer version.",node:"node",linePath:"line path",lineStyle:"line style"},nodes:{common:{nameZh:"Line name in Chinese",nameEn:"Line name in English",nameJa:"Line name in Japanese",num:"Line number"},virtual:{displayName:"Virtual node"},shmetroNumLineBadge:{displayName:"Shanghai Metro num line badge"},shmetroTextLineBadge:{displayName:"Shanghai Metro text line badge"},gzmtrLineBadge:{displayName:"Guangzhou Metro line badge",tram:"Tram",span:"Row-spanning digits"},bjsubwayNumLineBadge:{displayName:"Beijing Subway num line badge"},bjsubwayTextLineBadge:{displayName:"Beijing Subway text line badge"},berlinSBahnLineBadge:{displayName:"Berlin S Bahn line badge"},berlinUBahnLineBadge:{displayName:"Berlin U Bahn line badge"},suzhouRTNumLineBadge:{displayName:"Suzhou Rail Transit num line badge",branch:"Is branch line"},chongqingRTNumLineBadge:{displayName:"Chongqing Rail Transit num line badge"},chongqingRTTextLineBadge:{displayName:"Chongqing Rail Transit text line badge"},shenzhenMetroNumLineBadge:{displayName:"Shenzhen Metro num line badge",branch:"Is branch line"},mrtDestinationNumbers:{displayName:"Singapore MRT destination numbers"},mrtLineBadge:{displayName:"Singapore MRT line badge",isTram:"Is LRT line badge"},jrEastLineBadge:{displayName:"JR East line badge",crosshatchPatternFill:"Fill with crosshatch pattern"},qingdaoMetroNumLineBadge:{displayName:"Qingdao Metro Num line badge",numEn:"Line number in English",showText:"Show text"},guangdongIntercityRailwayLineBadge:{displayName:"Guangdong Intercity Railway line badge"},londonArrow:{displayName:"London arrow",type:"Type",continuation:"Continuation",sandwich:"Sandwich",tube:"Tube"},master:{displayName:"Master node",type:"Master node type",undefined:"Undefined"},facilities:{displayName:"Facilities",type:"Type"},text:{displayName:"Arbitrary text",content:"Content",fontSize:"Font size",lineHeight:"Line height",textAnchor:"Text anchor",start:"Start",middle:"Middle",end:"End",auto:"Auto",hanging:"Hanging",dominantBaseline:"Dominant baseline",language:"Font family in which language",zh:"Chinese",en:"English",mtr__zh:"Hongkong MTR Chinese",mtr__en:"Hongkong MTR English",berlin:"Berlin S/U Bahn",mrt:"Singapore MRT",jreast_ja:"JR East Japanese",jreast_en:"JR East English",rotate:"Rotation",italic:"Italic",bold:"Bold"}},stations:{common:{nameZh:"Names in Chinese",nameEn:"Names in English",nameJa:"Names in Japanese",nameOffsetX:"Names offset X",nameOffsetY:"Names offset Y",rotate:"Icon rotation",lineCode:"Line code",stationCode:"Station code",left:"Left",middle:"Middle",right:"Right",top:"Top",bottom:"Bottom"},interchange:{title:"Interchanges",within:"Within-station interchange",outStation:"Out-of-station interchange",outSystem:"Out-of-system interchange",addGroup:"Add interchange group",noInterchanges:"No interchanges",nameZh:"Chinese name",nameEn:"English name",add:"Add interchange",copy:"Copy interchange",remove:"Remove interchange"},shmetroBasic:{displayName:"Shanghai Metro basic station"},shmetroBasic2020:{displayName:"Shanghai Metro basic station (2020)"},shmetroInt:{displayName:"Shanghai Metro interchange station",height:"Icon height",width:"Icon width"},shmetroOsysi:{displayName:"Shanghai Metro out-of-system interchange station"},shanghaiSuburbanRailway:{displayName:"Shanghai Suburban Railway station"},gzmtrBasic:{displayName:"Guangzhou Metro basic station",open:"Is opened",secondaryNameZh:"Secondary name in Chinese",secondaryNameEn:"Secondary name in English",tram:"Tram"},gzmtrInt:{displayName:"Guangzhou Metro interchange station",open:"Is opened",secondaryNameZh:"Secondary name in Chinese",secondaryNameEn:"Secondary name in English",foshan:"Foshan"},gzmtrInt2024:{displayName:"Guangzhou Metro interchange station (2024)",columns:"Columns of stations",topHeavy:"Prefer more stations on the top row",anchorAt:"Anchor at",anchorAtNone:"Center",osiPosition:"Out-of-Station Interchange",osiPositionNone:"None",osiPositionLeft:"Left",osiPositionRight:"Right"},bjsubwayBasic:{displayName:"Beijing Subway basic station",open:"Is opened"},bjsubwayInt:{displayName:"Beijing Subway interchange station",outOfStation:"Out of station interchange"},mtr:{displayName:"Hongkong MTR station",rotate:"Icon rotation"},suzhouRTBasic:{displayName:"Suzhou Rail Transit basic station",textVertical:"Vertical names"},suzhouRTInt:{displayName:"Suzhou Rail Transit interchange station"},kunmingRTBasic:{displayName:"Kunming Rail Transit basic station"},kunmingRTInt:{displayName:"Kunming Rail Transit interchange station"},MRTBasic:{displayName:"Singapore MRT basic station",isTram:"Is LRT station"},MRTInt:{displayName:"Singapore MRT interchange station"},jrEastBasic:{displayName:"JR East basic station",nameOffset:"Names offset",textOneLine:"Names in one line",textVertical:"Vertical names",important:"Important station",lines:"Interchange lines offset"},jrEastImportant:{displayName:"JR East important station",textVertical:"Vertical names",mostImportant:"Most important station",minLength:"Minimal length of the station"},foshanMetroBasic:{displayName:"Foshan Metro basic station",open:"Is opened",secondaryNameZh:"Secondary name in Chinese",secondaryNameEn:"Secondary name in English",tram:"Tram"},qingdaoMetro:{displayName:"Qingdao Metro station",isInt:"Is interchange station"},tokyoMetroBasic:{displayName:"Tokyo Metro basic station",nameOffset:"Names offset",textVertical:"Vertical names",lineCode:"Line code",stationCode:"Station code"},tokyoMetroInt:{displayName:"Tokyo Metro interchange station",mereOffset:{displayName:"Names mere offset",none:"None",left1:"Left (less)",left2:"Left (more)",right1:"Right (less)",right2:"Right (more)",up:"Up",down:"Down"},importance:{displayName:"Station importance",default:"Default",middle:"Middle",high:"High"},align:{displayName:"Icon align",horizontal:"Horizontal",vertical:"Vertical"}},londonTubeCommon:{stepFreeAccess:"Step free access",stepFreeAccessNone:"None",stepFreeAccessTrain:"From street to train",stepFreeAccessPlatform:"From street to platform"},londonTubeBasic:{displayName:"London Tube basic station",terminal:"Terminal station",shareTracks:"Track shares",shareTracksIndex:"Index of the track shares"},londonTubeInt:{displayName:"London Tube interchange station"},londonRiverServicesInt:{displayName:"London river services interchange station"},guangdongIntercityRailway:{displayName:"Guangdong Intercity Railway station"}},lines:{reconcileId:"Reconcile ID",common:{offsetFrom:"Offset From",offsetTo:"Offset To",startFrom:"Start From",from:"From",to:"To",roundCornerFactor:"Round Corner Factor",parallelDisabled:"Some attributes are disabled as this line is parallel.",changeInBaseLine:"Change them in the base line:"},simple:{displayName:"Simple path",offset:"Offset"},diagonal:{displayName:"135° diagonal path"},perpendicular:{displayName:"90° perpendicular path"},rotatePerpendicular:{displayName:"90° rotate perpendicular path"},singleColor:{displayName:"Single color style"},shmetroVirtualInt:{displayName:"Shanghai Metro out-of-station interchange style"},shanghaiSuburbanRailway:{displayName:"Shanghai Suburban Railway style",isEnd:"Is the ending line"},gzmtrVirtualInt:{displayName:"Guangzhou Metro out-of-station interchange style"},gzmtrLoop:{displayName:"Guangzhou Metro loop style"},chinaRailway:{displayName:"China Railway style"},bjsubwaySingleColor:{displayName:"Beijing Subway single color style"},bjsubwayTram:{displayName:"Beijing Subway tram style"},bjsubwayDotted:{displayName:"Beijing Subway dotted style"},dualColor:{displayName:"Dual color style",swap:"Swap color",colorA:"Color A",colorB:"Color B"},river:{displayName:"River style",width:"Width"},mtrRaceDays:{displayName:"Hongkong MTR race days style"},mtrLightRail:{displayName:"Hongkong MTR light rail style"},mtrUnpaidArea:{displayName:"Hongkong MTR unpaid area style"},mtrPaidArea:{displayName:"Hongkong MTR paid area style"},mrtUnderConstruction:{displayName:"Singapore MRT under construction style"},mrtSentosaExpress:{displayName:"Singapore MRT Sentosa Express style"},jrEastSingleColor:{displayName:"JR East single color style"},jrEastSingleColorPattern:{displayName:"JR East single color filled with crosshatch pattern style"},lrtSingleColor:{displayName:"Singapore LRT single color style"},londonTubeInternalInt:{displayName:"London Tube internal interchange style"},londonTube10MinWalk:{displayName:"London Tube under a 10 minute walk interchange style"},londonTubeTerminal:{displayName:"London Tube terminal style"},londonRail:{displayName:"London rail style",limitedService:"Limited service/Peak hours only",colorBackground:"Color background",colorForeground:"Color foreground"},londonSandwich:{displayName:"London sandwich style"},londonLutonAirportDART:{displayName:"London Luton Airport DART style"},londonIFSCloudCableCar:{displayName:"London IFS Cloud Cable Car style"},guangdongIntercityRailway:{displayName:"Guangdong Intercity Railway style"}},edge:{},footer:{duplicate:"Duplicate",copy:"Copy",remove:"Remove"}}},Sv={popoverHeader:"You're on <1>{{environment}} environment!",popoverBody:"We are currently testing the latest RMP. If you have any suggestions, feel free to raise at https://github.com/railmapgen/rmp/issues",search:"Search stations",open:{new:"New project",config:"Import project",projectRMG:"Import from RMG project",invalidType:"Invalid file type! Only file in JSON format is accepted.",unknownError:"Unknown error occurred while parsing the uploaded file! Please try again.",gallery:"Import from Gallery",tutorial:"Start tutorial",importFromRMPGallery:"Template {{id}} imported. Not satisfied with this change? Undo via Ctrl + Z or the undo button.",failToImportFromRMPGallery:"Fail to import {{id}} from the gallery. The file can not be found."},download:{config:"Export project",image:"Export image","2rmg":{title:"Export to RMG project",type:{line:"Line",loop:"Loop",branch:"Branch"},placeholder:{chinese:"Chinese name",english:"English name",lineCode:"Line code"},info1:"This function is designed to convert the RMP project into RMG projects.",info2:"The lines in the list following are the available lines for converting. You can enter the Chinese line name in the text box on the left, the English line name in the middle, the line code (for Guangzhou Metro style) on the right, and then click the download button on the right to save your RMG projects.",noline:"No available lines found.",download:"Download",downloadInfo:"Please select one of the following stations as the starting station and click it to download."},format:"Format",png:"PNG",svg:"SVG",svgVersion:"Version","svg1.1":"1.1 (Compatible with Adobe Illustrator)",svg2:"2 (Compatible with modern browsers)",transparent:"Transparency",scale:"Scale",disabledScaleOptions:"Some scale options are disabled due to your browser's canvas limitation.",disabledScaleOptionsWorkarounds:"Possible workarounds include generating the image from svg using this cli tool: ",imageTooBig:"The image is too big for your browser to generate!",useSystemFonts:"Use system fonts instead of fonts previewed in the canvas",shareInfo1:"I will attach ",shareInfo2:" and its link when I share this image.",termsAndConditions:"Terms and Conditions",termsAndConditionsInfo:"I agree to ",period:".",confirm:"Download"},donation:{title:"Donation",openCollective:"Open Collective",viaUSD:"Donate in USD via Paypal or Visa card.",afdian:"爱发电",viaCNY:"Donate in CNY via Alipay or Wechat Pay."},settings:{title:"Settings",pro:"This is a PRO feature and an account with a subscription is required.",proWithTrial:"This is a PRO feature with a limited free trial available.",proLimitExceed:{master:"Master nodes exceed the free tier.",parallel:"Parallel lines exceed the free tier.",solution:"Remove them to dismiss this warning, or subscribe to unlock more!"},subscription:{title:"Subscription Status","logged-out":"You are currently logged out.",free:"Logged In! Subscribe to unlock more features!",subscriber:"Thanks for your subscription! Enjoy all features!",expired:"Login status expired. Please log out and log in again."},preference:{title:"Preference",keepLastPath:"Keep drawing lines until clicking on the background in the next move",autoParallel:"Automatically set new lines to be parallel to existing lines",randomStationNames:{title:"Set station names to random on creation",none:"None",shmetro:"Shanghai",bjsubway:"Beijing"}},shortcuts:{title:"Shortcuts",keys:"Keys",description:"Description",f:"Use the last tool.",s:"Select.",arrows:"Move the canvas a little bit.",ijkl:"Move the selected station(s) a little bit.",shift:"Multiple selection.",alt:"Precise movement.",delete:"Delete the selected station(s).",cut:"Cut.",copy:"Copy.",paste:"Paste.",undo:"Undo.",redo:"Redo."},procedures:{title:"Procedures",translate:{title:"Translate nodes' coordinates",content:"Add the following offset to all nodes' x and y:",x:"X axis",y:"Y axis"},scale:{title:"Scale nodes' coordinates",content:"Multiply the following value to all nodes' x and y:",factor:"Scale factor"},changeType:{title:"Change all objects' attributes",any:"Any"},changeZIndex:"Change depth in batch",changeStationType:{title:"Change stations type in batch",changeFrom:"Change all stations from this type:",changeTo:"To this type:",info:"Changing stations' type will remove all specific attributes from stations except their position and names. SAVE BEFORE CHANGE!"},changeLineStyleType:{title:"Change lines style in batch",changeFrom:"Change all lines from this style:",changeTo:"To this style:",info:"Changing lines' style will remove all specific attributes from lines except their connections. SAVE BEFORE CHANGE!"},changeLinePathType:{title:"Change lines path in batch",changeFrom:"Change all lines from this path:",changeTo:"To this path:"},changeColor:{title:"Change color in batch",changeFrom:"Change all objects from this color:",changeTo:"To this color:",any:"From any color"},removeLines:{title:"Remove lines with single color",content:"Remove lines that have this color: "},updateColor:{title:"Update color",content:"Update all colors with their latest value.",success:"Successfully update all colors.",error:"Error in updating all colors: {{e}}."},unlockSimplePath:{title:"Unlock simple path",content1:"The Rail Map Painter application endeavors to offer an interactive platform conducive to the creation of rail maps while adhering to established conventions. Among these conventions, one particularly renowned style finds its origins in the innovative work of Harry Beck. His pioneering contribution, officially endorsed in the year 1932, garnered instantaneous acclaim from the general populace. Presently, it stands as an exemplar of paramount significance within the realm of information design. This paradigmatic approach has found widespread implementation in transit cartography on a global scale, albeit with varying degrees of success.",content2:"The application inherently conceals the option to utilize a simple path, as its deployment has the potential to contravene established conventions. This particular feature remains discreetly tucked away by default. Additionally, submissions to the Rail Map Painter Gallery are subject to stringent scrutiny, with a categorical rejection of compositions that employ the simple path with a single color style approach.",content3:"Still, we reserve the opportunity to unlock this option and use the simple path when you subscribe. It should be noted that even after acquisition, the use of simple path is limited to single color.",check:"Unlock",unlocked:"Already Unlocked"},masterManager:{title:"Manage all master nodes",id:"Id",label:"Label",type:"Type",types:{MiscNode:"MiscNode",Station:"Station"},importTitle:"Upload master parameter",importFrom:"Use imported styles",importOther:"Import new style",importParam:"Paste configuration"}},telemetry:{title:"Telemetry",info:"To help improve Rail Map Painter and keep contributors motivated to enhance the project, anonymous usage data is collected through Google Analytics. This data is used solely for enhancing the user experience and optimizing the tool's functionality and is never shared with third parties.",essential:"Basic",essentialTooltip:"Change this global setting in Rail Map Toolkit",essentialInfo:"Rail Map Painter collects essential usage data that helps us understand how and when users interact with the tool. Rest assured, no personally identifiable information or data from your projects is ever collected.",essentialLink:"Click this link to see detailed fields that Google Analytics may collect.",additional:"Additional",additionalInfo:"Rail Map Painter also gathers data on interactions, such as project creation or station addition, when you input. These additional data is also anonymous and are only used for statistical analysis to help us make the tool better."}},about:{title:"About",rmp:"Rail Map Painter",railmapgen:"A Rail Map Toolkit project",desc:"Design your own rail map by freely dragging stations from different cities and connecting them with 90 or 135-degree rounded corners lines!",content1:"In memory of all the freedom and equality we once had.",content2:"06/01/2022 in Shanghai",contributors:"Contributors",coreContributors:"Core Contributors",styleContributors:"Style Contributors",langonginc:"Live a life you will remember.","203IhzElttil":"Special thanks for his diligent work in ensuring that the stations of Shanghai Metro match the original design.",Swiftiecott:"Special thanks for his diligent work in ensuring that the stations of Beijing Subway match the original design.",Minwtraft:"Special thanks for his diligent work in ensuring that the stations of Guangzhou Metro match the original design.",contactUs:"Contact Us",github:"Project repository",githubContent:"Face any problems? Search or raise an issue here!",slack:"Slack group",slackContent:"Chat in these Slack channels!"}},Nv={color:pv,warning:fv,cancel:gv,apply:mv,remove:yv,close:bv,noShowAgain:vv,rmtPromotion:wv,panel:xv,header:Sv},_v="Color A",Rv="Color B",kv="カラー",Cv="警告",Av="キャンセル",Tv="適用",Ev="削除",Lv="閉じる",Ov="次回表示しない",jv="絶対に見逃せないオールインワンツールキット!",Mv={tools:{showLess:"表示を減らす",section:{lineDrawing:"路線描画",stations:"駅",miscellaneousNodes:"その他の節点"},select:"選択する",learnHowToAdd:{station:"駅を追加する方法を学ぶ!","misc-node":"節点を追加する方法を学ぶ!",line:"路線風格を追加する方法を学ぶ!"}},details:{header:"詳細",info:{title:"基本情報",id:"ID",zIndex:"深度",stationType:"駅の種類",linePathType:"路線経路の種類",lineStyleType:"路線風格の種類",type:"種類",parallel:"平行路線",parallelIndex:"平行路線索引"},multipleSelection:{title:"複数選択",change:"選択した属性を変更する",selected:"選択されたオブジェクト:",show:"見せる",station:"駅",miscNode:"その他のノード",edge:"ライン"},changeStationTypeContent:"駅の種類を変更すると、駅の名前以外のすべての属性が削除されます。",changeLineTypeContent:"路線の種類を変更すると、すべての属性が削除されます。",changeType:"種類を変更",nodePosition:{title:"節点の位置",pos:{x:"X座標",y:"Y座標"}},lineExtremities:{title:"路線の端点",source:"出発点",target:"到着点",sourceName:"出発点名",targetName:"到着点名"},specificAttrsTitle:"特定の属性",unknown:{error:"おっと :( これは{{category}}を認識できません。おそらくそれは新しいバージョンで作成されました。",node:"節点",linePath:"路線経路",lineStyle:"路線風格"},nodes:{common:{nameZh:"中国語の路線名",nameEn:"英語の路線名",nameJa:"日本語の路線名",num:"路線番号"},virtual:{displayName:"仮想節点"},shmetroNumLineBadge:{displayName:"上海地下鉄路線番号徽章"},shmetroTextLineBadge:{displayName:"上海地下鉄テキスト路線徽章"},gzmtrLineBadge:{displayName:"広州地下鉄路線徽章",tram:"路面電車",span:"行にまたがる数字"},bjsubwayNumLineBadge:{displayName:"北京地下鉄路線番号徽章"},bjsubwayTextLineBadge:{displayName:"北京地下鉄テキスト路線徽章"},berlinSBahnLineBadge:{displayName:"ベルリンSバーン番号徽章"},berlinUBahnLineBadge:{displayName:"ベルリン地下鉄番号徽章"},suzhouRTNumLineBadge:{displayName:"蘇州軌道交通路線番号徽章",branch:"支線"},chongqingRTNumLineBadge:{displayName:"重慶鉄道交通路線番号徽章"},chongqingRTTextLineBadge:{displayName:"重慶鉄道交通テキスト路線徽章"},shenzhenMetroNumLineBadge:{displayName:"深セン地下鉄路線番号徽章",branch:"支線"},mrtDestinationNumbers:{displayName:"シンガポールMRTの目的地番号"},mrtLineBadge:{displayName:"シンガポールMRT路線バッジ",isTram:"LRT路線バッジです"},jrEastLineBadge:{displayName:"JR東日本路線番号徽章",crosshatchPatternFill:"網目模様で塗りつぶす"},qingdaoMetroNumLineBadge:{displayName:"青島地下鉄番号線徽章",numEn:"英語の行番号",showText:"テキストを表示"},guangdongIntercityRailwayLineBadge:{displayName:"広東省都市間鉄道線徽章"},londonArrow:{displayName:"ロンドン矢印",type:"種類",continuation:"継続",sandwich:"サンドイッチ",tube:"地下鉄"},master:{displayName:"大師節点",type:"大師節点種類",undefined:"未定義"},facilities:{displayName:"施設",type:"種類"},text:{displayName:"任意のテキスト",content:"コンテンツ",fontSize:"書体サイズ",lineHeight:"行の高さ",textAnchor:"テキストのアンカー",start:"開始",middle:"中央",end:"終了",auto:"自動",hanging:"吊り下げ",dominantBaseline:"ドミナントベースライン",language:"言語での書体ファミリー",zh:"中国語",en:"英語",mtr__zh:"香港MTR中国語",mtr__en:"香港MTR英語",berlin:"ベルリンS/Uバーン",mrt:"シンガポールMRT",jreast_ja:"JR東日本日本語",jreast_en:"JR東日本英語",rotate:"回転",italic:"イタリック体",bold:"太字"}},stations:{common:{nameZh:"中国語の駅名",nameEn:"英語の駅名",nameJa:"日本語の駅名",nameOffsetX:"駅名補正値X",nameOffsetY:"駅名補正値Y",rotate:"アイコンの回転",lineCode:"路線番号",stationCode:"駅番号",left:"左",middle:"中央",right:"右",top:"上",bottom:"下"},interchange:{title:"乗り換え",within:"駅構内の乗り換え",outStation:"駅外の乗り換え",outSystem:"系統外の乗り換え",addGroup:"乗り換えグループを追加",noInterchanges:"乗り換えなし",nameZh:"中国語の駅名",nameEn:"英語の駅名",add:"乗り換えを追加",copy:"乗り換えをコピー",remove:"乗り換えを削除"},shmetroBasic:{displayName:"上海地下鉄基本駅"},shmetroBasic2020:{displayName:"上海地下鉄基本駅(令和2年)"},shmetroInt:{displayName:"上海地下鉄乗り換え駅",height:"アイコンの高さ",width:"アイコンの幅"},shmetroOsysi:{displayName:"上海地下鉄の系統外乗り換え駅"},shanghaiSuburbanRailway:{displayName:"上海市営鉄道駅"},gzmtrBasic:{displayName:"広州地下鉄基本駅",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",tram:"路面電車"},gzmtrInt:{displayName:"広州地下鉄乗り換え駅",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",foshan:"仏山"},gzmtrInt2024:{displayName:"広州地下鉄乗り換え駅(令和6年)",columns:"駅の列数",topHeavy:"上段に多くの駅を優先配置",anchorAt:"錨位置",anchorAtNone:"中心",osiPosition:"改札外乗り換え",osiPositionNone:"なし",osiPositionLeft:"左",osiPositionRight:"右"},bjsubwayBasic:{displayName:"北京地下鉄基本駅",open:"開業済み"},bjsubwayInt:{displayName:"北京地下鉄乗り換え駅",outOfStation:"改札外乗り換え"},mtr:{displayName:"香港MTR駅",rotate:"アイコンの回転"},suzhouRTBasic:{displayName:"蘇州軌道交通基本駅",textVertical:"垂直の名前"},suzhouRTInt:{displayName:"蘇州軌道交通乗り換え駅"},kunmingRTBasic:{displayName:"昆明軌道交通基本駅"},kunmingRTInt:{displayName:"昆明軌道交通乗り換え駅"},MRTBasic:{displayName:"シンガポールMRT基本駅",isTram:"LRTの駅です"},MRTInt:{displayName:"シンガポールMRT乗り換え駅"},jrEastBasic:{displayName:"JR東日本基本駅",nameOffset:"名前の補正値",textOneLine:"1行での名前",textVertical:"垂直の名前",important:"重要な駅",lines:"乗り換え線の補正値"},jrEastImportant:{displayName:"JR東日本重要駅",textVertical:"垂直の名前",mostImportant:"最も重要な駅",minLength:"駅の最小長"},foshanMetroBasic:{displayName:"仏山地鐵基本車站",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",tram:"路面電車"},qingdaoMetro:{displayName:"地下鉄青島駅",isInt:"乗換駅です"},tokyoMetroBasic:{displayName:"東京メトロの基本駅",nameOffset:"駅名補正値",textVertical:"垂直の名前"},tokyoMetroInt:{displayName:"東京メトロ乗換駅",mereOffset:{displayName:"名前は単なるオフセットです",none:"なし",left1:"左(少ない)",left2:"左(さらに)",right1:"右(少ない)",right2:"右(さらに)",up:"上",down:"下"},importance:{displayName:"駅の重要性",default:"デフォルト",middle:"真ん中",high:"高い"},align:{displayName:"アイコンの整列",horizontal:"水平",vertical:"垂直"}},londonTubeCommon:{stepFreeAccess:"段差のないアクセス",stepFreeAccessNone:"なし",stepFreeAccessTrain:"駅から電車まで",stepFreeAccessPlatform:"駅からプラットフォームまで"},londonTubeBasic:{displayName:"ロンドン地下鉄基本駅",terminal:"終着駅",shareTracks:"線路共有",shareTracksIndex:"線路共有索引"},londonTubeInt:{displayName:"ロンドン地下鉄乗換駅"},londonRiverServicesInt:{displayName:"ロンドン川サービス乗換駅"},guangdongIntercityRailway:{displayName:"広東省都市間鉄道駅"}},lines:{reconcileId:"調整ID",common:{offsetFrom:"補正値(From)",offsetTo:"補正値(To)",startFrom:"開始位置",roundCornerFactor:"角の丸め係数",from:"から",to:"まで",parallelDisabled:"この路線が平行であるため、一部の属性が無効になっています。",changeInBaseLine:"基準線で変更してください:"},simple:{displayName:"簡単な経路",offset:"補正値"},diagonal:{displayName:"135°対角経路"},perpendicular:{displayName:"90°垂直経路"},rotatePerpendicular:{displayName:"90°回転する垂直経路"},singleColor:{displayName:"単色風格"},shmetroVirtualInt:{displayName:"上海地下鉄駅外乗り換え風格"},shanghaiSuburbanRailway:{displayName:"上海市営鉄道風格",isEnd:"終了行"},gzmtrVirtualInt:{displayName:"広州地下鉄駅外乗り換え風格"},gzmtrLoop:{displayName:"広州地下鉄環状線風格"},chinaRailway:{displayName:"中国鉄道風格"},bjsubwaySingleColor:{displayName:"北京地下鉄単色風格"},bjsubwayTram:{displayName:"北京地下鉄路面電車風格"},bjsubwayDotted:{displayName:"北京地下鉄の点線風格"},dualColor:{displayName:"2色風格",swap:"色を交換",colorA:"色A",colorB:"色B"},river:{displayName:"河川風格",width:"幅"},mtrRaceDays:{displayName:"香港MTRレース日風格"},mtrLightRail:{displayName:"香港MTR軽軌風格"},mtrUnpaidArea:{displayName:"香港MTR改札外乗り換え風格"},mtrPaidArea:{displayName:"香港MTR改札内乗り換え風格"},mrtUnderConstruction:{displayName:"シンガポール MRT 工事中風格"},mrtSentosaExpress:{displayName:"シンガポール MRT セントーサ・エクスプレス風格"},jrEastSingleColor:{displayName:"JR東日本単色風格"},jrEastSingleColorPattern:{displayName:"JR東日本単色網目模様風格"},lrtSingleColor:{displayName:"シンガポールLRT単色風格"},londonTubeInternalInt:{displayName:"ロンドン地下鉄内部乗換風格"},londonTube10MinWalk:{displayName:"ロンドン地下鉄10分以内の乗換風格"},londonTubeTerminal:{displayName:"ロンドン地下鉄終着風格"},londonRail:{displayName:"ロンドン鉄道風格",limitedService:"限定サービス/ピーク時のみ",colorBackground:"背景色",colorForeground:"前景色"},londonSandwich:{displayName:"ロンドンサンドイッチ風格"},londonLutonAirportDART:{displayName:"ロンドンルートン空港DART風格"},londonIFSCloudCableCar:{displayName:"ロンドンIF雲索道風格"},guangdongIntercityRailway:{displayName:"広東省都市間鉄道風格"}},edges:{},footer:{duplicate:"重複",copy:"複製",remove:"削除"}}},Pv={popoverHeader:"<1>{{environment}} 環境です!",popoverBody:"現在、最新のRMPをテストしています。ご意見がありましたら、https://github.com/railmapgen/rmp/issues で提案してください",search:"駅を探す",open:{new:"新しい作品",config:"作品をインポート",projectRMG:"RMG作品からインポート",invalidType:"無効なファイルタイプです!JSON形式のファイルのみが受け付けられます。",unknownError:"アップロードされたファイルの解析中に不明なエラーが発生しました。もう一度お試しください。",gallery:"ギャラリーからインポート",tutorial:"指導を開始する",importFromRMPGallery:"テンプレート{{id}}がインポートされました。この変更に満足していませんか?Ctrl + Zまたは元に戻すボタンで元に戻せます。",failToImportFromRMPGallery:"ギャラリーから{{id}}のインポートに失敗しました。ファイルが見つかりませんでした。"},download:{config:"作品をエクスポート",image:"画像をエクスポート","2rmg":{title:"RMG作品へエクスポート",type:{line:"直線",loop:"環状線",branch:"支線"},placeholder:{chinese:"中国語のライン名",english:"英語の路線名",lineCode:"路線番号"},info1:"この機能は、RMP作品をRMG作品に変換するために設計されています。",info2:"以下のリストの行は、変換用に利用できます。左側のテキストボックスに中国語の行名、中央に英語の行名、右側に(広州メトロ風格用の)行コードを入力し、ダウンロードボタンをクリックしてRMG作品を保存できます。",noline:"利用可能な回線が見つかりません。",download:"ダウンロード",downloadInfo:"出発駅を選択してクリックしてください。"},format:"フォーマット",png:"PNG",svg:"SVG",svgVersion:"版","svg1.1":"1.1(Adobe Illustratorと互換性あり)",svg2:"2(現代のブラウザと互換性あり)",transparent:"透明性",scale:"スケール",disabledScaleOptions:"ブラウザのキャンバス制限のため、一部のスケールオプションが無効になっています。",disabledScaleOptionsWorkarounds:"回避策として、このCLIツールを使用してSVGから画像を生成する方法が考えられます:",imageTooBig:"画像が大きすぎてブラウザで生成できません!",useSystemFonts:"キャンバスで内覧された書体の代わりに系統書体を使用する",shareInfo1:"この画像を共有する際に、添付ファイル ",shareInfo2:" とリンクを添付します。",termsAndConditions:"利用規約",termsAndConditionsInfo:"以下の利用規約に同意します:",period:"。",confirm:"ダウンロード"},donation:{title:"寄付",openCollective:"Open Collective",viaUSD:"PaypalまたはVisaカードを使用してドルで寄付する。",afdian:"爱发电",viaCNY:"AlipayまたはWechat Payを使用して人民元で寄付する。"},settings:{title:"設定",pro:"これはPRO機能であり、サブスクリプションが必要です。",proWithTrial:"これはPRO機能で、無料の限定トライアルが利用可能です。",proLimitExceed:{master:"大師節点が無料枠を超えています。",parallel:"平行路線が無料枠を超えています。",solution:"これらを削除して警告を解除するか、サブスクリプションに登録してさらに多くの機能を利用してください!"},subscription:{title:"サブスクリプションステータス","logged-out":"現在ログアウトしています。",free:"ログイン済み!さらに多くの機能をアンロックするにはサブスクリプションを登録してください!",subscriber:"サブスクリプションありがとうございます!すべての機能をお楽しみください!",expired:"ログインステータスの有効期限が切れました。ログアウトして再度ログインしてください。"},preference:{title:"設定",keepLastPath:"次の移動で背景をクリックするまで、線を描き続ける",autoParallel:"新しい路線を既存の路線と平行に自動的に設定",randomStationNames:{title:"作成時に駅名を乱数化する",none:"なし",shmetro:"上海",bjsubway:"北京"}},shortcuts:{title:"ショートカット",keys:"キー",description:"説明",f:"最後のツールを使用する。",s:"選択する。",arrows:"キャンバスを少し移動します。",ijkl:"選択した駅を少し移動します。",shift:"複数選択。",alt:"正確な移動。",delete:"選択した駅を削除します。",cut:"切り取る。",copy:"複製する。",paste:"貼り付ける。",undo:"元に戻す。",redo:"やり直す。"},procedures:{title:"手順",translate:{title:"節点の座標を変換",content:"すべての節点のX座標とY座標に次の補正値を追加する:",x:"X軸",y:"Y軸"},scale:{title:"節点の座標をスケーリング",content:"すべての節点のX座標とY座標に次の値を乗算する:",factor:"スケールファクター"},changeType:{title:"すべてのオブジェクトの属性を変更する",any:"どれでも"},changeZIndex:"深度を変更する",changeStationType:{title:"一括で駅の種類を変更",changeFrom:"すべての駅をこの種類から変更する:",changeTo:"この種類に変更する:",info:"駅の種類を変更すると、位置と名前以外の特定の属性がすべて削除されます。変更する前に保存してください!"},changeLineStyleType:{title:"線の風格を一括で変更",changeFrom:"この風格からすべての行を変更します:",changeTo:"この風格に:",info:"線の風格を変更すると、接続を除くすべての特定の属性が線から削除されます。 変更する前に保存してください!"},changeLinePathType:{title:"行のパスを一括で変更する",changeFrom:"このパスのすべての行を変更します:",changeTo:"この道へ:"},changeColor:{title:"一括で色を変更する",changeFrom:"すべてのオブジェクトをこの色から変更します:",changeTo:"この色に:",any:"どの色からも"},removeLines:{title:"単一色の路線を削除",content:"この色を持つ路線を削除する:"},updateColor:{title:"色を更新する",content:"最新の値ですべての色を更新します。",success:"すべての色を正常に更新しました。",error:"すべての色を更新する際にエラーが発生しました: {{e}}。"},unlockSimplePath:{title:"簡単な経路の解除",content1:"「地下鉄路線図画家」は、既存の慣例に従いつつ、鉄道地図の作成を支援するインタラクティブなプラットフォームを提供することを目指しています。その中でも、特に有名な風格の1つは、ハリー・ベックの革新的な作品に由来しています。彼の先駆的な貢献は1932年に正式に認められ、一般大衆から即座に称賛されました。現在では、情報デザインの領域において極めて重要な存在となっています。この典型的なアプローチは、世界規模の公共交通カートグラフィに広く採用されていますが、成功度は異なります。",content2:"アプリケーション自体は、既存の慣例に反する可能性があるため、簡単な経路を利用するオプションをデフォルトで控えめに隠しています。また、「地下鉄路線図画家ギャラリー」への投稿は厳格な審査を受けることになり、簡単な経路を単一の色の風格で使用する作品は断固として拒否されます。",content3:"それでも、このオプションのロックを解除し、寄付時にイージーパスを使用する機会を予約します。 取得後も、単純なパスの使用はモノクロスタイルに限定されることに注意してください。",check:"簡単な経路を解除",unlocked:"既に解除されています"},masterManager:{title:"すべての大師節点を管理する",id:"ID",label:"標識",type:"種類",types:{MiscNode:"その他節点",Station:"駅"},importTitle:"大師引数をアップロード",importFrom:"インポートしたスタイルを使用",importOther:"新しいスタイルをインポート",importParam:"設定情報を貼り付け"}},telemetry:{title:"テレメトリー",info:"鉄道路線図画家を改善し、貢献者がプロジェクトを向上させる意欲を維持するため、Google Analytics を通じて匿名の使用データを収集しています。このデータはユーザー体験の向上とツールの最適化のためだけに使用され、第三者と共有されることはありません。",essential:"基本",essentialTooltip:"鉄道路線図ツールキットでこのグローバル設定を変更する",essentialInfo:"鉄道路線図画家は、ツールがどのように、またいつ使用されるかを理解するための基本的な使用データを収集します。ご安心ください。個人を特定できる情報やプロジェクトデータは一切収集されません。",essentialLink:"Google Analytics が収集する可能性のある詳細フィールドを表示するには、こちらのリンクをクリックしてください。",additional:"追加",additionalInfo:"鉄道路線図画家は、プロジェクトの作成や駅の追加など、入力時のインタラクションに関するデータも収集します。これらの追加データも匿名であり、ツールを改善するための統計分析にのみ使用されます。"}},about:{title:"について",rmp:"地下鉄路線図画家",railmapgen:"地下鉄路線図ツールキットのプロジェクト",desc:"異なる都市の駅を自由にドラッグして、90度または135度の角丸線で接続して独自の鉄道地図を設計しましょう!",content1:"かつて私たちが持っていた自由と平等のすべての記憶に捧げます。",content2:"2022年6月1日、上海",contributors:"貢献者",coreContributors:"主要な貢献者",styleContributors:"風格の貢献者","203IhzElttil":"上海地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",Swiftiecott:"北京地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",Minwtraft:"広州地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",contactUs:"お問い合わせ",github:"プロジェクトリポジトリ",githubContent:"問題が発生しましたか?こちらで検索したり、問題を報告したりしてください!",slack:"Slackグループ",slackContent:"Slackのチャンネルでチャットしましょう!"}},$v={colorA:_v,colorB:Rv,color:kv,warning:Cv,cancel:Av,apply:Tv,remove:Ev,close:Lv,noShowAgain:Ov,rmtPromotion:jv,panel:Mv,header:Pv},Iv="색깔",Dv="경고",Bv="취소",zv="사용",Fv="삭제",Gv="다시",Uv="표시하지 않기",Wv="놓치고 싶지 않은 올인원 툴킷! 닫기.",Vv={tools:{showLess:"적게 표시",section:{lineDrawing:"선 그리기",stations:"역",miscellaneousNodes:"기타 노드"},select:"선택하다",learnHowToAdd:{station:"역을 추가하는 방법 배우기!","misc-node":"노드를 추가하는 방법 배우기!",line:"라인 스타일을 추가하는 방법 배우기!"}},details:{header:"상세한 상황",info:{title:"기본정보",id:"고유 식별자",zIndex:"깊이",stationType:"역 유형",linePathType:"선분 경로 유형",lineStyleType:"선분 스타일 유형",type:"유형",parallel:"평행선",parallelIndex:"평행 인덱스"},multipleSelection:{title:"다중 선택",change:"선택한 속성 변경",selected:"선택한 개체:",show:"보여주다",station:"역",miscNode:"기타 노드",edge:"윤곽"},changeStationTypeContent:"역 유형을 변경하면 이름을 제외한 모든 독특한 속성이 제거됩니다.",changeLineTypeContent:"선분 유형을 변경하면 모든 독특한 속성이 제거됩니다.",changeType:"종류 변경",nodePosition:{title:"노드 위치",pos:{x:"가로 좌표",y:"세로 좌표"}},lineExtremities:{title:"선분 양단",source:"시작점",target:"종말점",sourceName:"시작점 명칭",targetName:"종말점 명칭"},specificAttrsTitle:"독특 속성",unknown:{error:"이런 :( 우리는 이 {{category}}를 인식할 수 없습니다. 아마도 더 최근 버전에서 생성되었을 것입니다.",node:"노드",lineType:"선분 경로",lineStyle:"선분 스타일"},nodes:{common:{nameZh:"한자 노선명칭",nameEn:"영문 노선명칭",nameJa:"일본 노선명칭",num:"노선 번호"},virtual:{displayName:"가상 노드"},shmetroNumLineBadge:{displayName:"상해 지하철 디지털 노선 표지"},shmetroTextLineBadge:{displayName:"상해 지하철 문자 노선 표지"},gzmtrLineBadge:{displayName:"광저우 지하철 노선 표지",tram:"시가 전차",span:"행 범위 숫자"},bjsubwayNumLineBadge:{displayName:"베이징 지하철 노선 배지"},bjsubwayTextLineBadge:{displayName:"베이징 지하철 텍스트 라인 배지"},berlinSBahnLineBadge:{displayName:"베를린 S반 노선 배지"},berlinUBahnLineBadge:{displayName:"베를린 U반 노선 배지"},suzhouRTNumLineBadge:{displayName:"수주 철도 번호 라인 배지",branch:"지선입니다"},chongqingRTNumLineBadge:{displayName:"충칭 철도 교통 디지털 노선 식별"},chongqingRTTextLineBadge:{displayName:"충칭 철도 교통 텍스트 라인 표시"},shenzhenMetroNumLineBadge:{displayName:"심천 지하철 번호 라인 배지",branch:"지선입니다"},mrtDestinationNumbers:{displayName:"싱가포르 MRT 목적지 번호"},mrtLineBadge:{displayName:"싱가포르 MRT 노선 배지",isTram:"LRT 노선 배지입니다"},jrEastLineBadge:{displayName:"JR 동일본 라인 배지",crosshatchPatternFill:"크로스해치 패턴으로 채우기"},qingdaoMetroNumLineBadge:{displayName:"칭다오 지하철 번호 라인 배지",numEn:"영어로 된 줄 번호",showText:"텍스트 표시"},guangdongIntercityRailwayLineBadge:{displayName:"광동 시외 철도 노선 표지판"},londonArrow:{displayName:"런던 화살표",type:"유형",continuation:"계속",sandwich:"샌드위치",tube:"튜브"},master:{displayName:"마스터 노드",type:"마스터 노드 유형",undefined:"정의되지 않음"},facilities:{displayName:"시설",type:"유형"},text:{displayName:"임의 글자",content:"내용",fontSize:"글자 대소",lineHeight:"행고도",textAnchor:"글자 앵커",start:"시작",middle:"가운데",end:"끝",auto:"자동",hanging:"매달리는",dominantBaseline:"현성 바셀린",language:"언어로 된 글꼴 종류",zh:"중국어",en:"영어",mtr__zh:"홍콩 MTR 중국어",mtr__en:"홍콩 MTR 영어",berlin:"베를린 S/U Bahn",mrt:"싱가포르 MRT",jreast_ja:"JR 동일본어",jreast_en:"JR 동일본 영어",rotate:"회전",italic:"이탤릭체",bold:"굵게"}},stations:{common:{nameZh:"한자 명칭",nameEn:"영문 명칭",nameJa:"일본 명칭",nameOffsetX:"명칭 가로 이동",nameOffsetY:"명칭 세로 이동",rotate:"역회전각도",lineCode:"노선 번호",stationCode:"역 번호",left:"왼쪽",middle:"가운데",right:"오른쪽",top:"위",bottom:"아래"},interchange:{title:"환승",within:"같은 역에서 환승한",outStation:"역을 나가 환승한",outSystem:"시스템외환승",addGroup:"환승 조합 추가",noInterchanges:"비환승역",nameZh:"한자 명칭",nameEn:"영문 명칭",add:"환승 추가",copy:"환승 복제",remove:"환승 삭제"},shmetroBasic:{displayName:"상해 지하철의 기본 역"},shmetroBasic2020:{displayName:"상해 지하철 기본 역(2020년)"},shmetroInt:{displayName:"상해 지하철 환승역",height:"역 높이",width:"역 폭"},shmetroOsysi:{displayName:"상하이 지하철 시스템 외환승 역"},shanghaiSuburbanRailway:{displayName:"상하이 기차역"},gzmtrBasic:{displayName:"광저우 지하철 기본역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",tram:"시가 전차"},gzmtrInt:{displayName:"광저우 지하철 환승역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",foshan:"포산"},gzmtrInt2024:{displayName:"광저우 지하철 환승역 (2024)",columns:"역 열 수",topHeavy:"상단에 더 많은 역 우선 배치",anchorAt:"앵커 위치",anchorAtNone:"중앙",osiPosition:"역을 나가 환승",osiPositionNone:"없음",osiPositionLeft:"왼쪽",osiPositionRight:"오른쪽"},bjsubwayBasic:{displayName:"베이징 지하철 기본역",open:"개통여부"},bjsubwayInt:{displayName:"베이징 지하철 환승역",outOfStation:"역을 나가 환승"},mtr:{displayName:"홍콩 MTR 역"},suzhouRTBasic:{displayName:"쑤저우 궤도교통 기본역",textVertical:"수직 이름"},suzhouRTInt:{displayName:"쑤저우 궤도교통 환승역"},kunmingRTBasic:{displayName:"쿤밍 궤도교통 기본역"},kunmingRTInt:{displayName:"쿤밍 궤도교통 환승역"},MRTBasic:{displayName:"싱가포르MRT기본역",isTram:"LRT역이에요"},MRTInt:{displayName:"싱가포르MRT환승역"},jrEastBasic:{displayName:"JR 동일본 기본 역",nameOffset:"이름 오프셋",textOneLine:"한 줄로 표시된 이름",textVertical:"수직 이름",important:"중요한 역",lines:"환승 노선 오프셋"},jrEastImportant:{displayName:"JR 동일본 중요 역",textVertical:"수직 이름",mostImportant:"가장 중요한 역",minLength:"스테이션의 최소 길이"},foshanMetroBasic:{displayName:"포산 지하철 기본역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",tram:"시가 전차"},qingdaoMetro:{displayName:"칭다오 지하철역",isInt:"환승역인가"},tokyoMetroBasic:{displayName:"도쿄메트로 기본역",nameOffset:"이름 오프셋",textVertical:"업종명",lineCode:"라인 코드",stationCode:"역 코드"},tokyoMetroInt:{displayName:"도쿄메트로 환승역",mereOffset:{displayName:"단순한 오프셋 이름",none:"없음",left1:"왼쪽(적음)",left2:"왼쪽(더)",right1:"오른쪽(적음)",right2:"맞아요 (더)",up:"위로",down:"아래에"},importance:{displayName:"역 중요성",default:"기본",middle:"가운데",high:"높은"},align:{displayName:"아이콘 정렬",horizontal:"수평의",vertical:"수직의"}},londonTubeCommon:{stepFreeAccess:"단차 없는 접근",stepFreeAccessNone:"없음",stepFreeAccessTrain:"거리에서 열차까지",stepFreeAccessPlatform:"거리에서 플랫폼까지"},londonTubeBasic:{displayName:"런던 지하철 기본역",terminal:"종착역",shareTracks:"선로 공유",shareTracksIndex:"선로 공유 지수"},londonTubeInt:{displayName:"런던 지하철 환승역"},londonRiverServicesInt:{displayName:"런던 강 서비스 환승역"},guangdongIntercityRailway:{displayName:"광둥 시외 기차역"}},lines:{reconcileId:"연결 선분 고유 식별자",common:{offsetFrom:"시작점 오프셋",offsetTo:"끝점 오프셋",startFrom:"여기서부터 시작",roundCornerFactor:"회전원각인자",from:"에서",to:"까지",parallelDisabled:"이 선이 평행하기 때문에 일부 속성이 비활성화되었습니다.",changeInBaseLine:"기본선에서 변경하십시오:"},simple:{displayName:"기본 선분",offset:"오프셋"},diagonal:{displayName:"135° 접힌 선분"},perpendicular:{displayName:"90° 수직 선분"},rotatePerpendicular:{displayName:"90° 수직 경로 회전"},singleColor:{displayName:"단색 스타일"},shmetroVirtualInt:{displayName:"상해 지하철 역 환승 모습"},shanghaiSuburbanRailway:{displayName:"상하이 도시철도 스타일",isEnd:"끝 범위"},gzmtrVirtualInt:{displayName:"광저우 지하철 역 환승 모습"},gzmtrLoop:{displayName:"광저우 지하철 순환선 스타일"},chinaRailway:{displayName:"중국 철도 모습"},bjsubwaySingleColor:{displayName:"베이징 지하철 단색 스타일"},bjsubwayTram:{displayName:"베이징 지하철 노면 전차 모습"},bjsubwayDotted:{displayName:"베이징 지하철 점선 스타일"},dualColor:{displayName:"이색 스타일",swap:"색을 바꾸기",colorA:"색깔 A",colorB:"색깔 B"},river:{displayName:"강 스타일",width:"폭"},mtrRaceDays:{displayName:"홍콩 MTR 경마일 스타일"},mtrLightRail:{displayName:"홍콩 MTR 경전철 스타일"},mtrUnpaidArea:{displayName:"홍콩 MTR 미결제 구역 스타일"},mtrPaidArea:{displayName:"홍콩 MTR 결제완료 구역 스타일"},mrtUnderConstruction:{displayName:"싱가포르 MRT 공사중 스타일"},mrtSentosaExpress:{displayName:"싱가포르 MRT 센토사 익스프레스 스타일"},jrEastSingleColor:{displayName:"JR 동일본 단색 스타일"},jrEastSingleColorPattern:{displayName:"JR 동일본 단색 크로스해치 패턴 스타일"},lrtSingleColor:{displayName:"싱가포르 LRT 단색 스타일"},londonTubeInternalInt:{displayName:"런던 지하철 내부 환승 스타일"},londonTube10MinWalk:{displayName:"런던 지하철 10분 이내 도보 환승 스타일"},londonTubeTerminal:{displayName:"런던 지하철 종착 스타일"},londonRail:{displayName:"런던 철도 스타일",limitedService:"제한 서비스/혼잡 시간대만",colorBackground:"배경 색상",colorForeground:"전경 색상"},londonSandwich:{displayName:"런던 샌드위치 스타일"},londonLutonAirportDART:{displayName:"런던 루튼 공항 DART 스타일"},londonIFSCloudCableCar:{displayName:"런던 IFS 클라우드 케이블카 스타일"},guangdongIntercityRailway:{displayName:"광동성 도시간 철도 스타일"}},edges:{},footer:{duplicate:"복사",copy:"복사",remove:"삭제"}}},Hv={popoverHeader:"당신은 환경을<1>{{environment}}탐색하고 있습니다",popoverBody:"최신 RMP를 테스트하고 있습니다.제안 사항이 있으시면 언제든지 https://github.com/railmapgen/rmp/issues에 제출해 주십시오.",search:"방송국 검색",open:{new:"신 프로젝트",config:"프로젝트 가져오기",projectRMG:"RMG 프로젝트에서 가져오기",invalidType:"잘못된 파일 형식입니다! JSON 형식의 파일만 허용됩니다.",unknownError:"업로드된 파일의 파싱 중 알 수 없는 오류가 발생했습니다. 다시 시도해주세요.",gallery:"갤러리에서 가져오기",tutorial:"튜토리얼 시작",importFromRMPGallery:"템플릿 {{id}}가 가져 왔습니다. 이 변경 사항에 만족하지 않으십니까? Ctrl + Z 또는 실행 취소 버튼을 사용하여 실행 취소하세요.",failToImportFromRMPGallery:"갤러리에서 {{id}}를 가져올 수 없습니다. 파일을 찾을 수 없습니다."},download:{config:"프로젝트 내보내기",image:"사진 내보내기","2rmg":{title:"RMG 프로젝트로 내보내기",type:{line:"일직선",loop:"고리",branch:"지선"},placeholder:{chinese:"중국어 라인 이름",english:"영어 줄 이름",lineCode:"노선 번호"},info1:"이 기능은 RMP 프로젝트를 RMG 프로젝트로 변환하는 데 사용됩니다.",info2:"변환할 수 있는 사용 가능한 라인들은 다음과 같습니다. 왼쪽 텍스트 상자에 중국어 라인 이름을 입력하고, 가운데에 영어 라인 이름을 입력하며, 오른쪽에 (광저우 메트로 스타일용) 라인 코드를 입력한 다음, 오른쪽의 다운로드 버튼을 클릭하여 RMG 프로젝트를 저장할 수 있습니다.",noline:"사용 가능한 라인이 없습니다.",download:"다운로드",downloadInfo:"출발 역을 선택하고 클릭하십시오."},format:"파일 종류",png:"PNG 이미지",svg:"SVG 이미지",svgVersion:"버전","svg1.1":"1.1 (Adobe Illustrator 호환)",svg2:"2 (현대 브라우저 호환)",transparent:"투명 배경",scale:"확대/축소",disabledScaleOptions:"브라우저의 캔버스 제한으로 인해 일부 스케일 옵션이 비활성화되었습니다.",disabledScaleOptionsWorkarounds:"가능한 해결 방법으로는 이 CLI 도구를 사용하여 SVG에서 이미지를 생성하는 것이 있습니다:",imageTooBig:"이미지가 너무 크기 때문에 브라우저에서 생성할 수 없습니다!",useSystemFonts:"캔버스에서 미리보기된 글꼴 대신 시스템 글꼴 사용",shareInfo1:"이 사진을 공유할 때",shareInfo2:"링크를 첨부할 것입니다.",termsAndConditions:"약관 및 세칙",termsAndConditionsInfo:"동의",period:".",confirm:"다운로드"},donation:{title:"기부",openCollective:"Open Collective",viaUSD:"Paypal 또는 Visa 카드를 통해 달러로 기부하기.",afdian:"爱发电",viaCNY:"Alipay 또는 Wechat Pay를 통해 인민폐로 기부하기."},settings:{title:"설정",pro:"이것은 PRO 기능이며, 구독이 필요한 계정입니다.",proWithTrial:"이것은 PRO 기능이며, 제한된 무료 체험이 가능합니다.",proLimitExceed:{master:"마스터 노드가 무료 사용 한도를 초과했습니다.",parallel:"평행선이 무료 사용 한도를 초과했습니다.",solution:"경고를 해제하려면 이 항목들을 제거하거나 구독을 통해 더 많은 기능을 잠금 해제하세요!"},subscription:{title:"구독 상태","logged-out":"현재 로그아웃 상태입니다.",free:"로그인 완료! 더 많은 기능을 사용하려면 구독하세요!",subscriber:"구독해주셔서 감사합니다! 모든 기능을 즐기세요!",expired:"로그인 상태가 만료되었습니다. 다시 로그인 해주세요."},preference:{title:"선호",keepLastPath:"다음 이동에서 배경을 클릭할 때까지 계속 선을 그립니다",autoParallel:"새 선을 기존 선과 평행하게 자동으로 설정합니다",randomStationNames:{title:"생성 시 역 이름을 랜덤으로 설정",none:"없음",shmetro:"상하이",bjsubway:"베이징"}},shortcuts:{title:"바로 가기",keys:"키",description:"설명",f:"마지막 도구 사용.",s:"선택하다.",arrows:"캔버스를 약간 이동합니다.",ijkl:"선택한 역을 약간 이동합니다.",shift:"여러 항목 선택.",alt:"정밀한 이동.",delete:"선택한 역을 삭제합니다.",cut:"잘라내기.",copy:"복사하다.",paste:"붙여넣다.",undo:"취소하다.",redo:"다시 하다."},procedures:{title:"절차",translate:{title:"노드 좌표 변환",content:"모든 노드의 x 및 y에 다음 오프셋을 추가:",x:"X축",y:"Y축"},scale:{title:"스케일 노드의 좌표",content:"모든 노드의 x 및 y에 다음 값을 곱하:",factor:"스케일 팩터"},changeType:{title:"모든 객체의 속성 변경",any:"어느"},changeZIndex:"일괄적으로 깊이 변경",changeStationType:{title:"역의 종류를 대량으로 수정",changeFrom:"이 유형의 모든 역:",changeTo:"이 유형의 역으로 변환:",info:"역 유형을 변경하면 이름을 제외한 모든 고유한 속성이 제거됩니다.저장했다가 다시 실행!"},changeLineStyleType:{title:"일괄적으로 선 스타일 변경",changeFrom:"이 스타일의 모든 선을 변경하세요:",changeTo:"이 스타일에:",info:"선 스타일을 변경하면 연결을 제외한 선의 모든 특정 속성이 제거됩니다. 변경하기 전에 저장하세요!"},changeLinePathType:{title:"일괄적으로 라인 경로 변경",changeFrom:"이 경로의 모든 줄을 변경하세요:",changeTo:"이 길로:"},changeColor:{title:"일괄 색상 변경",changeFrom:"이 색상의 모든 개체를 변경합니다.:",changeTo:"이 색상에:",any:"모든 색상에서"},removeLines:{title:"단일 색상의 선 제거",content:"이 색상의 선을 제거하세요: "},updateColor:{title:"색상 업데이트",content:"최신 값으로 모든 색상을 업데이트합니다.",success:"모든 색상을 성공적으로 업데이트했습니다.",error:"모든 색상을 업데이트하는 동안 오류가 발생했습니다: {{e}}."},unlockSimplePath:{title:"간단 경로 잠금 해제",content1:"Rail Map Painter 애플리케이션은 확립된 관례를 준수하면서도 철도지도 작성을 위한 대화식 플랫폼을 제공하기 위해 노력합니다. 이러한 관례 중 하나는 특히 해리 벡의 혁신적인 작업에서 비롯되었습니다. 그의 개척적인 기여는 공식적으로 1932년에 인정받았으며 일반 대중으로부터 즉각적인 찬사를 받았습니다. 현재는 정보 디자인 분야에서 중요한 본보기로 자리 잡고 있습니다. 이 패러다임적인 접근 방식은 전 세계적인 규모의 교통 카토그래피에서 널리 구현되었으나 성공의 정도는 다양합니다.",content2:"이 애플리케이션은 기존 관례에 위배될 가능성이 있기 때문에 간단한 경로를 활용하는 옵션을 기본 설정으로 가려놓았습니다. 또한 Rail Map Painter 갤러리에 제출되는 작품은 엄격한 심사를 받으며, 단일 색상 스타일로 간단한 경로를 사용하는 작품은 명확히 거부됩니다.",content3:"그래도 이 옵션을 잠금 해제하고 기부할 때 Easy Path를 사용할 수 있는 기회를 보유하고 있습니다. 획득 후에도 단순 경로의 사용은 단색 스타일로 제한된다는 점에 유의해야 합니다.",check:"간단한 경로 잠금 해제",unlocked:"이미 해제됨"},masterManager:{title:"모든 마스터 노드를 관리",id:"ID",label:"레이블",type:"유형",types:{MiscNode:"기타 노드",Station:"스테이션"},importTitle:"마스터 매개변수 업로드",importFrom:"가져온 스타일 사용",importOther:"새 스타일 가져오기",importParam:"구성 정보 붙여넣기"}},telemetry:{title:"원격 측정",info:"지하철 노선도 그리기를 개선하고 기여자가 프로젝트를 향상시키는 데 동기를 부여하기 위해 Google Analytics를 통해 익명의 사용 데이터를 수집합니다. 이 데이터는 사용자 경험을 향상하고 도구 기능을 최적화하는 데에만 사용되며, 제3자와 절대 공유되지 않습니다.",essential:"기본",essentialTooltip:"지하철 노선도 툴킷에서 이 전역 설정을 변경하세요",essentialInfo:"지하철 노선도 그리기는 도구를 언제, 어떻게 사용하는지 이해하기 위해 기본적인 사용 데이터를 수집합니다. 안심하세요. 개인 식별이 가능한 정보나 프로젝트 데이터는 절대 수집되지 않습니다.",essentialLink:"Google Analytics에서 수집할 수 있는 세부 필드를 보려면 이 링크를 클릭하세요.",additional:"추가",additionalInfo:"지하철 노선도 그리기는 프로젝트 생성이나 역 추가와 같은 입력 시의 상호작용 데이터도 수집합니다. 이러한 추가 데이터도 익명으로 처리되며, 도구를 개선하기 위한 통계 분석에만 사용됩니다."}},about:{title:"대함",rmp:"지하철 노선도 그리기",railmapgen:"철도 지도 툴킷 프로젝트 노선도 툴킷",desc:"다양한 도시의 역을 자유롭게 끌어서 90도 또는 135도의 둥근 모서리 선으로 연결함으로써 여러분만의 철도 지도를 디자인해요!",content1:"우리가 가졌던 자유와 평등을 기념한다.",content2:"2022년 6월 1일 상해",contributors:"기여자",coreContributors:"핵심 기여자",styleContributors:"스타일 기여자",langonginc:"기억에 남을 삶을 살아보세요.","203IhzElttil":"상하이 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",Swiftiecott:"베이징 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",Minwtraft:"광저우 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",contactUs:"우리에게 연락하기",github:"프로젝트 저장소",githubContent:"무슨 문제라도 있나요? 여기서 문제를 검색하거나 제기하십시오!",slack:"슬랙 그룹",slackContent:"이 슬랙 채널에서 채팅해요!"}},Jv={color:Iv,warning:Dv,cancel:Bv,apply:zv,remove:Fv,close:Gv,noShowAgain:Uv,rmtPromotion:Wv,panel:Vv,header:Hv},Kv="颜色",qv="警告",Yv="取消",Zv="应用",Qv="移除",Xv="关闭",ew="不再显示",tw="您绝对不想错过的全能工具包!",nw={tools:{showLess:"显示更少",section:{lineDrawing:"线段绘制",stations:"车站",miscellaneousNodes:"杂项节点"},select:"多选",learnHowToAdd:{station:"了解如何添加车站!","misc-node":"了解如何添加节点!",line:"了解如何添加线段样式!"}},details:{header:"详情",info:{title:"基本信息",id:"唯一识别符",zIndex:"深度",stationType:"车站类型",linePathType:"线段路径类型",lineStyleType:"线段样式类型",type:"类型",parallel:"平行线段",parallelIndex:"平行线段索引"},multipleSelection:{title:"多重选取",change:"修改选中对象的属性",selected:"选中的对象:",show:"显示",station:"车站",miscNode:"杂项节点",edge:"线段"},changeStationTypeContent:"修改车站类型会移除所有独特属性除了名称。",changeLineTypeContent:"修改线段类型会移除所有独特属性。",changeType:"更改类型",nodePosition:{title:"节点位置",pos:{x:"横坐标",y:"纵坐标"}},lineExtremities:{title:"线段两端",source:"起点",target:"终点",sourceName:"起点名称",targetName:"终点名称"},specificAttrsTitle:"独特属性",unknown:{error:"哎呀 :( 我们无法识别此{{category}}。也许它是在更新版本中创建的。",node:"节点",linePath:"线段路径",lineStyle:"线段样式"},nodes:{common:{nameZh:"中文线路名称",nameEn:"英文线路名称",nameJa:"日语线路名称",num:"线路号"},virtual:{displayName:"虚拟节点"},shmetroNumLineBadge:{displayName:"上海地铁数字线路标识"},shmetroTextLineBadge:{displayName:"上海地铁文字线路标识"},gzmtrLineBadge:{displayName:"广州地铁线路标识",tram:"有轨电车",span:"跨行显示数字"},bjsubwayNumLineBadge:{displayName:"北京地铁数字线路标识"},bjsubwayTextLineBadge:{displayName:"北京地铁文字线路标识"},berlinSBahnLineBadge:{displayName:"柏林城市快铁线路标识"},berlinUBahnLineBadge:{displayName:"柏林地铁线路标识"},suzhouRTNumLineBadge:{displayName:"苏州轨道交通数字线路标识",branch:"是否支线"},chongqingRTNumLineBadge:{displayName:"重庆轨道交通数字线路标识"},chongqingRTTextLineBadge:{displayName:"重庆轨道交通文字线路标识"},shenzhenMetroNumLineBadge:{displayName:"深圳地铁数字线路标识",branch:"是否为支线"},mrtDestinationNumbers:{displayName:"新加坡MRT终点数字"},mrtLineBadge:{displayName:"新加坡MRT线路标识",isTram:"是LRT线路标识"},jrEastLineBadge:{displayName:"JR东日本线路标识",crosshatchPatternFill:"用网状图案填充"},qingdaoMetroNumLineBadge:{displayName:"青岛地铁数字线路标识",numEn:"英文线路号",showText:"显示文字"},guangdongIntercityRailwayLineBadge:{displayName:"广东城际铁路线路标识"},londonArrow:{displayName:"伦敦箭头",type:"类型",continuation:"延续",sandwich:"三明治",tube:"地铁"},master:{displayName:"大师节点",type:"大师节点类型",undefined:"未定义"},facilities:{displayName:"设施",type:"类型"},text:{displayName:"任意文字",content:"内容",fontSize:"文字大小",lineHeight:"行高度",textAnchor:"文字锚点",start:"开始",middle:"居中",end:"结束",auto:"自动",hanging:"悬挂",dominantBaseline:"显性基线",language:"哪个语言的字体系列",zh:"中文",en:"英文",mtr__zh:"港铁中文",mtr__en:"港铁英文",berlin:"柏林 S/U Bahn",mrt:"新加坡地铁",jreast_ja:"JR东日本日语",jreast_en:"JR东日本英语",rotate:"旋转",italic:"斜体",bold:"粗体"}},stations:{common:{nameZh:"中文名称",nameEn:"英文名称",nameJa:"日语名称",nameOffsetX:"名称横向偏移",nameOffsetY:"名称纵向偏移",rotate:"车站旋转角度",lineCode:"路线编号",stationCode:"车站编号",left:"左",middle:"中间",right:"右",top:"顶部",bottom:"底部"},interchange:{title:"换乘",within:"同站换乘",outStation:"出站换乘",outSystem:"系统外换乘",addGroup:"添加换乘组合",noInterchanges:"非换乘站",nameZh:"中文名称",nameEn:"英文名称",add:"添加换乘",copy:"复制换乘",remove:"删除换乘"},shmetroBasic:{displayName:"上海地铁基本车站"},shmetroBasic2020:{displayName:"上海地铁基本车站(2020)"},shmetroInt:{displayName:"上海地铁换乘车站",height:"车站高度",width:"车站宽度"},shmetroOsysi:{displayName:"上海地铁转乘车站"},shanghaiSuburbanRailway:{displayName:"上海市域铁路车站"},gzmtrBasic:{displayName:"广州地铁基本车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",tram:"有轨电车"},gzmtrInt:{displayName:"广州地铁换乘车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",foshan:"佛山"},gzmtrInt2024:{displayName:"广州地铁换乘站(2024)",columns:"站点列数",topHeavy:"优先将更多站点放在上方",anchorAt:"锚点位置",anchorAtNone:"居中",osiPosition:"出站换乘",osiPositionNone:"无",osiPositionLeft:"左侧",osiPositionRight:"右侧"},bjsubwayBasic:{displayName:"北京地铁基本车站",open:"是否开通"},bjsubwayInt:{displayName:"北京地铁换乘车站",outOfStation:"出站换乘"},mtr:{displayName:"香港MTR车站"},suzhouRTBasic:{displayName:"苏州轨道交通基本车站",textVertical:"垂直名称"},suzhouRTInt:{displayName:"苏州轨道交通换乘车站"},kunmingRTBasic:{displayName:"昆明轨道交通基本车站"},kunmingRTInt:{displayName:"昆明轨道交通换乘车站"},MRTBasic:{displayName:"新加坡MRT基本车站",isTram:"是LRT车站"},MRTInt:{displayName:"新加坡MRT换乘车站"},jrEastBasic:{displayName:"JR东日本基本车站",nameOffset:"名称偏移",textOneLine:"名称在一行中",textVertical:"垂直名称",important:"重要车站",lines:"换乘线偏移"},jrEastImportant:{displayName:"JR东日本重要车站",textVertical:"垂直名称",mostImportant:"最重要车站",minLength:"车站的最小长度"},foshanMetroBasic:{displayName:"佛山地铁基本车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",tram:"有轨电车"},qingdaoMetro:{displayName:"青岛地铁车站",isInt:"是换乘站"},tokyoMetroBasic:{displayName:"东京地铁基本车站",nameOffset:"名称偏移",textVertical:"垂直站名",lineCode:"线路编号",stationCode:"车站编号"},tokyoMetroInt:{displayName:"东京地铁换乘车站",mereOffset:{displayName:"名称微小偏移",none:"无",left1:"左 (较少)",left2:"左 (较大)",right1:"右 (较少)",right2:"右 (较大)",up:"上",down:"下"},importance:{displayName:"车站重要性",default:"默认",middle:"中",high:"高"},align:{displayName:"图标排列方向",horizontal:"横向",vertical:"纵向"}},londonTubeCommon:{stepFreeAccess:"无障碍通行",stepFreeAccessNone:"无",stepFreeAccessTrain:"从街道到列车",stepFreeAccessPlatform:"从街道到站台"},londonTubeBasic:{displayName:"伦敦地铁基本车站",terminal:"终点站",shareTracks:"轨道共享",shareTracksIndex:"轨道共享索引"},londonTubeInt:{displayName:"伦敦地铁换乘车站"},londonRiverServicesInt:{displayName:"伦敦河流服务换乘站"},guangdongIntercityRailway:{displayName:"广东城际铁路车站"}},lines:{reconcileId:"合并线段唯一标识符",common:{offsetFrom:"起始点偏移",offsetTo:"结束点偏移",startFrom:"从这里开始",roundCornerFactor:"转折圆角因子",from:"从",to:"到",parallelDisabled:"由于此线段是平行的,因此某些属性已被禁用。",changeInBaseLine:"在基准线段中更改它们:"},simple:{displayName:"基本线段",offset:"偏移"},diagonal:{displayName:"135°折线线段"},perpendicular:{displayName:"90°垂直线段"},rotatePerpendicular:{displayName:"90°旋转垂直线段"},singleColor:{displayName:"纯色样式"},shmetroVirtualInt:{displayName:"上海地铁出站换乘样式"},shanghaiSuburbanRailway:{displayName:"上海市域铁路样式",isEnd:"结束区间"},gzmtrVirtualInt:{displayName:"广州地铁出站换乘样式"},gzmtrLoop:{displayName:"广州地铁环线样式"},chinaRailway:{displayName:"中国铁路样式"},bjsubwaySingleColor:{displayName:"北京地铁纯色样式"},bjsubwayTram:{displayName:"北京地铁有轨电车样式"},bjsubwayDotted:{displayName:"北京地铁虚线样式"},dualColor:{displayName:"双色样式",swap:"切换颜色",colorA:"颜色A",colorB:"颜色B"},river:{displayName:"河流样式",width:"宽度"},mtrRaceDays:{displayName:"香港MTR赛马日样式"},mtrLightRail:{displayName:"香港MTR轻铁样式"},mtrUnpaidArea:{displayName:"香港MTR未付费区域样式"},mtrPaidArea:{displayName:"香港MTR付费区域样式"},mrtUnderConstruction:{displayName:"新加坡MRT在建样式"},mrtSentosaExpress:{displayName:"新加坡MRT圣淘沙捷运样式"},jrEastSingleColor:{displayName:"JR东日本单色样式"},jrEastSingleColorPattern:{displayName:"JR东日本单色网状图案样式"},lrtSingleColor:{displayName:"新加坡LRT纯色样式"},londonTubeInternalInt:{displayName:"伦敦地铁内部换乘样式"},londonTube10MinWalk:{displayName:"伦敦地铁10分钟步行换乘样式"},londonTubeTerminal:{displayName:"伦敦地铁终点站样式"},londonRail:{displayName:"伦敦铁路样式",limitedService:"有限服务/仅限高峰时段",colorBackground:"背景颜色",colorForeground:"前景颜色"},londonSandwich:{displayName:"伦敦三明治样式"},londonLutonAirportDART:{displayName:"伦敦卢顿机场DART样式"},londonIFSCloudCableCar:{displayName:"伦敦IFS云缆车样式"},guangdongIntercityRailway:{displayName:"广东城际铁路样式"}},edges:{},footer:{duplicate:"重复",copy:"复制",remove:"移除"}}},rw={popoverHeader:"你正在浏览<1>{{environment}}环境!",popoverBody:"我们正在测试最新的RMP。如果你有任何建议,欢迎在 https://github.com/railmapgen/rmp/issues 上提出。",search:"搜索车站",open:{new:"新项目",config:"导入项目",projectRMG:"从RMG项目中导入",invalidType:"无效的文件类型!仅接受JSON格式的文件。",unknownError:"解析上传文件时发生未知错误!请重试。",gallery:"从画廊中导入",tutorial:"开始教程",importFromRMPGallery:"模板 {{id}} 已导入。对此更改不满意?可通过 Ctrl + Z 或撤销按钮进行撤销。",failToImportFromRMPGallery:"无法从画廊导入{{id}},找不到文件。"},download:{config:"导出项目",image:"导出图片","2rmg":{title:"导出RMG项目",type:{line:"直线",loop:"环线",branch:"支线"},placeholder:{chinese:"中文线路名称",english:"英文线路名称",lineCode:"路线编号"},info1:"这个功能可将RMP项目导出为RMG项目。",info2:"下面的线路将可以被导出,你可以在左侧文本框中输入中文线路名称、在中间输入英文线路名称、右边输入线路编号(广州地铁样式专用),随后点击下载按钮即可导出RMG项目。",noline:"未找到可用线路。",download:"下载",downloadInfo:"请选择一个起始车站,并点击它。"},format:"文件种类",png:"PNG图像",svg:"SVG图像",svgVersion:"版本","svg1.1":"1.1(适用于Adobe Illustrator)",svg2:"2(适用于现代浏览器)",transparent:"透明背景",scale:"缩放",disabledScaleOptions:"由于浏览器的画布限制,部分缩放选项被禁用。",disabledScaleOptionsWorkarounds:"可能的解决方法包括使用此命令行工具从SVG生成图像:",imageTooBig:"图像太大,无法在您的浏览器中生成!",useSystemFonts:"使用系统字体而不是在画布上预览的字体",shareInfo1:"当我分享此图片时我会附上",shareInfo2:"和它的链接。",termsAndConditions:"条款及细则",termsAndConditionsInfo:"我同意",period:"。",confirm:"下载"},donation:{title:"捐赠",openCollective:"Open Collective",viaUSD:"通过Paypal或Visa卡以美元捐赠。",afdian:"爱发电",viaCNY:"通过支付宝或微信支付以人民币捐赠。"},settings:{title:"设置",pro:"这是一个专业功能,需要带有订阅的账户。",proWithTrial:"这是一个PRO功能,并提供有限的免费试用。",proLimitExceed:{master:"大师节点超出了免费额度。",parallel:"平行线段超出了免费额度。",solution:"移除它们以消除此警告,或订阅以解锁更多功能!"},subscription:{title:"订阅状态","logged-out":"您当前已登出。",free:"已登录!订阅以解锁更多功能!",subscriber:"感谢您的订阅!享受所有功能吧!",expired:"登录状态已过期。请登出后重新登录。"},preference:{title:"偏好",keepLastPath:"在下一次操作中持续画线段直到点击背景",autoParallel:"自动将新线段设置为与现有线段平行",randomStationNames:{title:"创建时将站名随机化",none:"无",shmetro:"上海",bjsubway:"北京"}},shortcuts:{title:"快捷键",keys:"键",description:"描述",f:"使用上一个工具。",s:"多选。",arrows:"稍微移动画布。",ijkl:"稍微移动所选站点。",shift:"多选。",alt:"精确移动。",delete:"删除所选站点。",cut:"剪切。",copy:"复制。",paste:"粘贴。",undo:"撤销。",redo:"重做。"},procedures:{title:"过程",translate:{title:"转化节点坐标",content:"将以下偏移加到所有节点的x和y上:",x:"横坐标",y:"纵坐标"},scale:{title:"缩放节点坐标",content:"将所有节点的x和y乘以以下值:",factor:"缩放因子"},changeType:{title:"修改所有对象的属性",any:"任意"},changeZIndex:"批量修改深度",changeStationType:{title:"批量修改车站种类",changeFrom:"将此类型的所有车站:",changeTo:"转换为这个类型的车站:",info:"修改车站类型会移除所有独特属性除了名称。保存再操作!"},changeLineStyleType:{title:"批量修改线段样式",changeFrom:"将此样式的所有线段:",changeTo:"转换为这个样式的线段:",info:"修改线段样式会移除所有独特属性除了连通性。保存再操作!"},changeLinePathType:{title:"批量修改线段类型",changeFrom:"将此类型的所有线段:",changeTo:"转换为这个类型的线段:"},changeColor:{title:"批量修改颜色",changeFrom:"将此颜色的所有对象:",changeTo:"转换为这个颜色:",any:"从任何颜色转换"},removeLines:{title:"移除所有纯色线段",content:"移除具有此颜色的所有线段: "},updateColor:{title:"更新颜色",content:"使用最新值更新所有颜色。",success:"成功更新所有颜色。",error:"更新所有颜色时出错:{{e}}。"},unlockSimplePath:{title:"解锁简单路径",content1:"地铁线路图绘制器应用致力于在遵循既定惯例的前提下,提供一个有利于创建地铁线路图的互动平台。在这些惯例中,一种特别著名的风格源自哈利·贝克的创新工作。他的开创性贡献于1932年得到官方认可,并在大众中迅速赢得了声誉。目前,它在信息设计领域具有重要的示范意义,在全球范围内的交通制图中得到了广泛的实施,尽管成功程度有所不同。",content2:"应用程序固有地隐藏了使用简单路径的选项,因为其部署有可能违反既定的惯例。默认情况下,此特定功能保持隐蔽。此外,提交到地铁线路图绘制器画廊的作品将经过严格的审查,坚决拒绝使用单色风格的简单路径的构图。",content3:"尽管如此,我们仍然保留了解锁此选项的机会,当您订阅后,方可使用简单路径。需要注意的是,即使获得后,简单路径的使用也仅限于单色风格。",check:"解锁简单路径",unlocked:"已解锁"},masterManager:{title:"管理全部大师节点",id:"唯一标识",label:"标签",type:"类型",types:{MiscNode:"杂项节点",Station:"车站"},importTitle:"上传大师节点参数",importFrom:"使用导入的样式",importOther:"导入新样式",importParam:"粘贴配置信息"}},telemetry:{title:"遥测",info:"为了帮助改进地铁线路图绘制器并激励贡献者提升项目,我们通过 Google Analytics 收集匿名使用数据。这些数据仅用于增强用户体验和优化工具功能,绝不会与第三方共享。",essential:"基础",essentialTooltip:"在地铁线路图工具包中更改此全局设置",essentialInfo:"地铁线路图绘制器收集一些基本使用数据,以帮助我们了解用户如何以及何时与工具交互。请放心,我们从不收集任何可识别个人身份的信息或您的项目数据。",essentialLink:"点击此链接查看 Google Analytics 可能收集的详细字段。",additional:"额外",additionalInfo:"地铁线路图绘制器还会收集有关交互的数据,例如项目创建或站点添加等操作。这些额外数据同样是匿名的,仅用于统计分析以帮助我们改进工具。"}},about:{title:"关于",rmp:"地铁线路图绘制器",railmapgen:"一个线路图工具包项目",desc:"通过自由拖动来自不同城市的车站并以 90 或 135 度圆角线段将它们连接起来,设计您自己的铁路地图!",content1:"谨以此纪念我们曾拥有的自由与平等。",content2:"06/01/2022于上海",contributors:"贡献者",coreContributors:"核心贡献者",styleContributors:"样式贡献者",langonginc:"活出值得铭记的人生。","203IhzElttil":"特别感谢他勤勉工作,确保上海地铁站与原始设计相符。",Swiftiecott:"特别感谢他勤勉工作,确保北京地铁站与原始设计相符。",Minwtraft:"特别感谢他勤勉工作,确保广州地铁站与原始设计相符。",contactUs:"联系我们",github:"项目仓库",githubContent:"遇到任何问题?在这里搜索或提出一个问题!",slack:"Slack群组",slackContent:"在这些Slack频道中讨论!"}},iw={color:Kv,warning:qv,cancel:Yv,apply:Zv,remove:Qv,close:Xv,noShowAgain:ew,rmtPromotion:tw,panel:nw,header:rw},ow="顏色",aw="警告",sw="取消",lw="應用",uw="移除",cw="關閉",dw="不要再顯示",hw="絕對不想錯過的多功能工具包!",pw={tools:{showLess:"顯示更少",section:{lineDrawing:"線段繪製",stations:"車站",miscellaneousNodes:"雜項節點"},select:"多選",learnHowToAdd:{station:"了解如何添加車站!","misc-node":"了解如何添加節點!",line:"了解如何添加線條樣式!"}},details:{header:"詳情",info:{title:"基本信息",id:"唯一識別符",zIndex:"深度",stationType:"車站類型",linePathType:"線段路徑類型",lineStyleType:"線段樣式類型",type:"類型",parallel:"平行線段",parallelIndex:"平行線段索引"},multipleSelection:{title:"多重選取",change:"修改選取物件的屬性",selected:"選取的物件:",show:"顯示",station:"車站",miscNode:"雜項節點",edge:"線段"},changeStationTypeContent:"修改車站類型會移除所有獨特屬性除了名稱。",changeLineTypeContent:"修改線段類型會移除所有獨特屬性。",changeType:"更改類型",nodePosition:{title:"節點位置",pos:{x:"橫坐標",y:"縱坐標"}},lineExtremities:{title:"線段兩端",source:"起點",target:"終點",sourceName:"起點名稱",targetName:"終點名稱"},specificAttrsTitle:"獨特屬性",unknown:{error:"哎呀 :( 我們無法識別此{{category}}。也許它是在更新版本中創建的。",node:"節點",linePath:"線段路徑",lineStyle:"線段樣式"},nodes:{common:{nameZh:"中文線路名稱",nameEn:"英文線路名稱",nameJa:"日語線路名稱",num:"線路號"},virtual:{displayName:"虛擬節點"},shmetroNumLineBadge:{displayName:"上海地鐵數字線路標識"},shmetroTextLineBadge:{displayName:"上海地鐵文字線路標識"},gzmtrLineBadge:{displayName:"廣州地鐵線路標識",tram:"輕軌",span:"跨行顯示數字"},bjsubwayNumLineBadge:{displayName:"北京地鐵數字線路標識"},bjsubwayTextLineBadge:{displayName:"北京地鐵文字線路標識"},berlinSBahnLineBadge:{displayName:"柏林城市快鐵線路標識"},berlinUBahnLineBadge:{displayName:"柏林地鐵線路標識"},suzhouRTNumLineBadge:{displayName:"蘇州軌道交通數字線路標識",branch:"是否支線"},chongqingRTNumLineBadge:{displayName:"重慶軌道交通數字線路標識"},chongqingRTTextLineBadge:{displayName:"重慶軌道交通文字線路標識"},shenzhenMetroNumLineBadge:{displayName:"深圳地鐵數字線路標識",branch:"是否支線"},mrtDestinationNumbers:{displayName:"新加坡MRT終點數字"},mrtLineBadge:{displayName:"新加坡MRT線路標識",isTram:"是LRT線路標識"},jrEastLineBadge:{displayName:"JR東日本線路標識",crosshatchPatternFill:"用網狀圖案填充"},qingdaoMetroNumLineBadge:{displayName:"青島地鐵數位線路標識",numEn:"英文線路號",showText:"顯示文字"},guangdongIntercityRailwayLineBadge:{displayName:"廣東城際鐵路線標識"},londonArrow:{displayName:"倫敦箭頭",type:"類型",continuation:"延續",sandwich:"三明治",tube:"地鐵"},master:{displayName:"大師節點",type:"大師節點類型",undefined:"未定義"},facilities:{displayName:"設施",type:"類型"},text:{displayName:"任意文字",content:"內容",fontSize:"文字大小",lineHeight:"行高度",textAnchor:"文字錨點",start:"開始",middle:"中間",end:"結束",auto:"自動",hanging:"懸吊",dominantBaseline:"顯性基線",language:"哪個語言的字體系列",zh:"中文",en:"英文",mtr__zh:"香港地鐵中文",mtr__en:"香港地鐵英文",berlin:"柏林 S/U 地鐵",mrt:"新加坡地鐵",jreast_ja:"JR 東日本日文",jreast_en:"JR 東日本英文",rotate:"旋轉",italic:"斜體",bold:"粗體"}},stations:{common:{nameZh:"中文名稱",nameEn:"英文名稱",nameJa:"日語名稱",nameOffsetX:"名稱橫向偏移",nameOffsetY:"名稱縱向偏移",rotate:"車站旋轉角度",lineCode:"路綫編碼",stationCode:"車站編碼",left:"左",middle:"中間",right:"右",top:"頂部",bottom:"底部"},interchange:{title:"換乘",within:"同站換乘",outStation:"出站換乘",outSystem:"系統外換乘",addGroup:"添加換乘組合",noInterchanges:"非換乘站",nameZh:"中文名稱",nameEn:"英文名稱",add:"添加換乘",copy:"復製換乘",remove:"刪除換乘"},shmetroBasic:{displayName:"上海地鐵基本車站"},shmetroBasic2020:{displayName:"上海地鐵基本車站(2020)"},shmetroInt:{displayName:"上海地鐵換乘車站",height:"車站高度",width:"車站寬度"},shmetroOsysi:{displayName:"上海地鐵轉乘車站"},shanghaiSuburbanRailway:{displayName:"上海市域鐵路車站"},gzmtrBasic:{displayName:"廣州地鐵基本車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",tram:"輕軌"},gzmtrInt:{displayName:"廣州地鐵換乘車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",foshan:"佛山"},gzmtrInt2024:{displayName:"廣州地鐵換乘站(2024)",columns:"站點列數",topHeavy:"優先將更多站點放在上方",anchorAt:"錨點位置",anchorAtNone:"居中",osiPosition:"出站轉車",osiPositionNone:"無",osiPositionLeft:"左側",osiPositionRight:"右側"},bjsubwayBasic:{displayName:"北京地鐵基本車站",open:"是否開通"},bjsubwayInt:{displayName:"北京地鐵換乘車站",outOfStation:"出站轉車"},mtr:{displayName:"香港MTR車站"},suzhouRTBasic:{displayName:"蘇州軌道交通基本車站",textVertical:"垂直名稱"},suzhouRTInt:{displayName:"蘇州軌道交通換乘車站"},kunmingRTBasic:{displayName:"昆明軌道交通基本車站"},kunmingRTInt:{displayName:"昆明軌道交通換乘車站"},MRTBasic:{displayName:"新加坡MRT基本車站",isTram:"是LRT車站"},MRTInt:{displayName:"新加坡MRT換乘車站"},jrEastBasic:{displayName:"JR東日本基本車站",nameOffset:"名稱偏移",textOneLine:"名稱在一行中",textVertical:"垂直名稱",important:"重要車站",lines:"轉乘線偏移"},jrEastImportant:{displayName:"JR東日本重要車站",textVertical:"垂直名稱",mostImportant:"最重要車站",minLength:"車站的最小長度"},foshanMetroBasic:{displayName:"佛山地鐵基本車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",tram:"輕軌"},qingdaoMetro:{displayName:"青島地鐵基本車站",isInt:"是換乘站"},tokyoMetroBasic:{displayName:"東京地鐵基本車站",nameOffset:"名稱偏移",textVertical:"垂直站名",lineCode:"線路編號",stationCode:"車站編號"},tokyoMetroInt:{displayName:"東京地鐵轉乘車站",mereOffset:{displayName:"名稱微小偏移",none:"無",left1:"左 (较少)",left2:"左 (较大)",right1:"右 (较少)",right2:"右 (较大)",up:"上",down:"下"},importance:{displayName:"車站重要性",default:"預設",middle:"中",high:"高"},align:{displayName:"圖標排列方向",horizontal:"橫向",vertical:"縱向"}},londonTubeCommon:{stepFreeAccess:"無障礙通行",stepFreeAccessNone:"無",stepFreeAccessTrain:"從街道到列車",stepFreeAccessPlatform:"從街道到月台"},londonTubeBasic:{displayName:"倫敦地鐵基本車站",terminal:"終點站",shareTracks:"軌道共享",shareTracksIndex:"軌道共享指數"},londonTubeInt:{displayName:"倫敦地鐵換乘車站"},londonRiverServicesInt:{displayName:"倫敦河流服務換乘站"},guangdongIntercityRailway:{displayName:"廣東城際鐵路車站"}},lines:{reconcileId:"合並線段唯一標識符",common:{offsetFrom:"起始點偏移",offsetTo:"結束點偏移",startFrom:"從這裏開始",roundCornerFactor:"轉折圓角因子",from:"從",to:"到",parallelDisabled:"由於此線段是平行的,因此某些屬性已被禁用。",changeInBaseLine:"在基準線段中更改它們:"},simple:{displayName:"基本線段",offset:"偏移"},diagonal:{displayName:"135°折線線段"},perpendicular:{displayName:"90°垂直線段"},rotatePerpendicular:{displayName:"90°旋轉垂直線段"},singleColor:{displayName:"純色樣式"},shmetroVirtualInt:{displayName:"上海地鐵出站換乘樣式"},shanghaiSuburbanRailway:{displayName:"上海市域鐵路樣式",isEnd:"結束區間"},gzmtrVirtualInt:{displayName:"廣州地鐵出站換乘樣式"},gzmtrLoop:{displayName:"廣州地鐵環線樣式"},chinaRailway:{displayName:"中國鐵路樣式"},bjsubwaySingleColor:{displayName:"北京地鐵純色樣式"},bjsubwayTram:{displayName:"北京地鐵有軌電車樣式"},bjsubwayDotted:{displayName:"北京地鐵虛線樣式"},dualColor:{displayName:"雙色樣式",swap:"切換顏色",colorA:"顏色A",colorB:"顏色B"},river:{displayName:"河流樣式",width:"寬度"},mtrRaceDays:{displayName:"香港MTR賽馬日樣式"},mtrLightRail:{displayName:"香港MTR輕鐵樣式"},mtrUnpaidArea:{displayName:"香港MTR未付費區域樣式"},mtrPaidArea:{displayName:"香港MTR付費區域樣式"},mrtUnderConstruction:{displayName:"新加坡MRT在建樣式"},mrtSentosaExpress:{displayName:"新加坡MRT聖淘沙捷運樣式"},jrEastSingleColor:{displayName:"JR東日本單色樣式"},jrEastSingleColorPattern:{displayName:"JR東日本單色網狀圖案樣式"},lrtSingleColor:{displayName:"新加坡LRT純色樣式"},londonTubeInternalInt:{displayName:"倫敦地鐵內部換乘樣式"},londonTube10MinWalk:{displayName:"倫敦地鐵10分鐘步行換乘樣式"},londonTubeTerminal:{displayName:"倫敦地鐵終點站樣式"},londonRail:{displayName:"倫敦鐵路樣式",limitedService:"有限服務/只限繁忙時段",colorBackground:"背景顏色",colorForeground:"前景顏色"},londonSandwich:{displayName:"倫敦三明治樣式"},londonLutonAirportDART:{displayName:"倫敦盧頓機場DART樣式"},londonIFSCloudCableCar:{displayName:"倫敦IFS雲纜車樣式"},guangdongIntercityRailway:{displayName:"廣東城際鐵路樣式"}},edges:{},footer:{duplicate:"重複",copy:"複製",remove:"移除"}}},fw={popoverHeader:"你正在瀏覽<1>{{environment}}環境!",popoverBody:"我們正在測試最新的RMP。如果妳有任何建議,歡迎在 https://github.com/railmapgen/rmp/issues 上提出。",search:"搜尋車站",open:{new:"新項目",config:"讀入項目",projectRMG:"從RMG專案中讀入",invalidType:"無效的文件類型!僅接受JSON格式的文件。",unknownError:"解析上傳文件時發生未知錯誤!請重試。",gallery:"從畫廊中讀入",tutorial:"開始教程",importFromRMPGallery:"範本 {{id}} 已匯入。對此更改不滿意?可通過 Ctrl + Z 或撤銷按鈕進行撤銷。",failToImportFromRMPGallery:"無法從畫廊導入{{id}},找不到檔案。"},download:{config:"導出項目",image:"導出圖片","2rmg":{title:"導出RMG項目",type:{line:"直線",loop:"環線",branch:"支線"},placeholder:{chinese:"中文線路名稱",english:"英文線路名稱",lineCode:"路綫編碼"},info1:"這個功能可將RMP項目導出為RMG項目。",info2:"下面的線路將可以被導出,你可以在左側文本框中輸入中文線路名稱、在中間輸入英文線路名稱、右邊輸入線路編號(廣州地鐵樣式專用),隨後點擊下載按鈕即可導出RMG項目。",noline:"未找到可用線路。",download:"下載",downloadInfo:"請選擇一個起始車站,並點擊它。"},format:"檔案種類",png:"PNG影像",svg:"SVG影像",svgVersion:"版本","svg1.1":"1.1(適用於Adobe Illustrator)",svg2:"2(適用於現代瀏覽器)",transparent:"透明背景",scale:"縮放",disabledScaleOptions:"由於您的瀏覽器的畫布限制,部分縮放選項已被禁用。",disabledScaleOptionsWorkarounds:"可能的解決方法包括使用此命令行工具從SVG生成圖像:",imageTooBig:"圖像太大,您的瀏覽器無法生成!",useSystemFonts:"使用系統字型而不是在畫布上預覽的字型",shareInfo1:"當我分享此圖片時我會附上",shareInfo2:"和它的鏈接。",termsAndConditions:"條款及細則",termsAndConditionsInfo:"我同意",period:"。",confirm:"下載"},donation:{title:"捐款",openCollective:"Open Collective",viaUSD:"通過Paypal或Visa卡以美元捐款。",afdian:"爱发电",viaCNY:"通過支付寶或微信支付以人民幣捐款。"},settings:{title:"設置",pro:"這是一個專業功能,需要带有訂閱的帳戶。",proWithTrial:"這是一個PRO功能,並提供有限的免費試用。",proLimitExceed:{master:"大師節點超出了免費額度。",parallel:"平行線段超出了免費額度。",solution:"移除它們以解除此警告,或訂閱以解鎖更多功能!"},subscription:{title:"訂閱狀態","logged-out":"您目前已登出。",free:"已登入!訂閱以解鎖更多功能!",subscriber:"感謝您的訂閱!享受所有功能吧!",expired:"登入狀態已過期。請登出後重新登入。"},preference:{title:"偏好",keepLastPath:"在下一次操作中持續畫線段直到點擊背景",autoParallel:"自動將新段線設置為與現有線段平行",randomStationNames:{title:"創建時將站名隨機化",none:"無",shmetro:"上海",bjsubway:"北京"}},shortcuts:{title:"捷徑",keys:"按鍵",description:"描述",f:"使用上一個工具。",s:"多選。",arrows:"稍微移動畫布。",ijkl:"稍微移動所選站點。",shift:"多選。",alt:"精確移動。",delete:"刪除所選站點。",cut:"剪切。",copy:"複製。",paste:"貼上。",undo:"撤銷。",redo:"重做。"},procedures:{title:"過程",translate:{title:"轉化節點坐標",content:"將以下偏移加到所有節點的x和y上:",x:"橫坐標",y:"縱坐標"},scale:{title:"縮放節點坐標",content:"將所有節點的x和y乘以以下值:",factor:"縮放因子"},changeType:{title:"修改所有物件的屬性",any:"任意"},changeZIndex:"批量修改深度",changeStationType:{title:"批量修改車站種類",changeFrom:"將此類型的所有車站:",changeTo:"轉換為這個類型的車站:",info:"修改車站類型會移除所有獨特屬性除了名稱。保存再操作!"},changeLineStyleType:{title:"批量修改線段樣式",changeFrom:"將此樣式的所有線段:",changeTo:"轉換為這個樣式的線段:",info:"修改線段樣式會移除所有獨特屬性除了連通性。保存再操作!"},changeLinePathType:{title:"批量修改線段類型",changeFrom:"將此類型的所有線段:",changeTo:"轉換為這個類型的線段:"},changeColor:{title:"批量修改顏色",changeFrom:"將此顏色的所有對象:",changeTo:"轉換為這個顏色:",any:"從任何顏色轉換"},removeLines:{title:"移除所有純色線段",content:"移除具有此顏色的所有線段: "},updateColor:{title:"更新顏色",content:"使用最新值更新所有顏色。",success:"成功更新所有顏色。",error:"更新所有顏色時發生錯誤:{{e}}。"},unlockSimplePath:{title:"解鎖簡單路徑",content1:"地鐵線路圖繪製器應用致力於在遵循既定慣例的前提下,提供一個有利於創建地鐵線路圖的互動平台。在這些慣例中,一種特別著名的風格源自哈利·貝克的創新工作。他的開創性貢獻於1932年得到官方認可,並在大眾中迅速贏得了聲譽。目前,它在信息設計領域具有重要的示範意義,在全球範圍內的交通製圖中得到了廣泛的實施,儘管成功程度有所不同。",content2:"應用程式固有地隱藏了使用簡單路徑的選項,因為其部署有可能違反既定的慣例。默認情況下,此特定功能保持隱蔽。此外,提交到地鐵線路圖繪製器畫廊的作品將經過嚴格的審查,堅決拒絕使用單色風格的簡單路徑的構圖。",content3:"儘管如此,我們仍然保留瞭解鎖此選項的機會,當您訂閱后,方可使用簡單路徑。 需要注意的是,即使獲得后,簡單路徑的使用也僅限於單色風格。",check:"解鎖簡單路徑",unlocked:"已解鎖"},masterManager:{title:"管理全部大師節點",id:"唯一標識",label:"標籤",type:"類型",types:{MiscNode:"雜項節點",Station:"車站"},importTitle:"上傳大師節點參數",importFrom:"使用匯入的樣式",importOther:"導入新樣式",importParam:"貼上配置信息"}},telemetry:{title:"遙測",info:"為了協助改進地鐵路綫圖繪製器並激勵貢獻者提升項目,我們透過 Google Analytics 收集匿名使用數據。這些數據僅用於提升用戶體驗及優化工具功能,絕不會與第三方共享。",essential:"基本",essentialTooltip:"在地鐵路綫圖工具組中更改此全局設定",essentialInfo:"地鐵路綫圖繪製器收集一些基本使用數據,以協助我們了解用戶如何及何時與工具互動。請放心,我們絕不收集任何可識別個人身份的資訊或您的項目數據。",essentialLink:"點擊此鏈接查看 Google Analytics 可能收集的詳細字段。",additional:"額外",additionalInfo:"地鐵路綫圖繪製器還會收集與互動有關的數據,例如創建項目或新增站點等操作。這些額外數據同樣是匿名的,僅用於統計分析以協助我們改進工具。"}},about:{title:"關於",rmp:"地鐵線路圖繪製器",railmapgen:"一個路綫圖工具組的項目",desc:"通過自由拖動來自不同城市的車站並以 90 或 135 度圓角線段將它們連接起來,設計您自己的鐵路地圖!",content1:"謹以此紀念我們曾擁有的自由與平等。",content2:"06/01/2022於上海",contributors:"貢獻者",coreContributors:"核心貢獻者",styleContributors:"樣式貢獻者",langonginc:"活出值得銘記的人生。","203IhzElttil":"特別感謝他勤奮工作,確保上海地鐵站與原始設計相符。",Swiftiecott:"特別感謝他勤奮工作,確保北京地鐵站與原始設計相符。",Minwtraft:"特別感謝他勤奮工作,確保廣州地鐵站與原始設計相符。",contactUs:"聯繫我們",github:"項目倉庫",githubContent:"遇到任何問題?在這裡搜索或提出一個問題!",slack:"Slack群組",slackContent:"在這些Slack頻道中討論!"}},gw={color:ow,warning:aw,cancel:sw,apply:lw,remove:uw,close:cw,noShowAgain:dw,rmtPromotion:hw,panel:pw,header:fw},Qn=new Ge.I18nBuilder().use(Uc).withAppName("Rail Map Painter").withLng(Ge.getLanguage()).withDefaultResource(hv).withResource("en",Nv).withResource("zh-Hans",iw).withResource("zh-Hant",gw).withResource("ja",$v).withResource("ko",Jv).build(),{abs:Pn,cos:gt,sin:an,acos:mw,atan2:$n,sqrt:kt,pow:qe}=Math;function In(n){return n<0?-qe(-n,1/3):qe(n,1/3)}const kl=Math.PI,wr=2*kl,Ct=kl/2,yw=1e-6,Fi=Number.MAX_SAFE_INTEGER||9007199254740991,Gi=Number.MIN_SAFE_INTEGER||-9007199254740991,bw={x:0,y:0,z:0},k={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(n,e){const r=e(n);let i=r.x*r.x+r.y*r.y;return typeof r.z<"u"&&(i+=r.z*r.z),kt(i)},compute:function(n,e,r){if(n===0)return e[0].t=0,e[0];const i=e.length-1;if(n===1)return e[i].t=1,e[i];const o=1-n;let a=e;if(i===0)return e[0].t=n,e[0];if(i===1){const l={x:o*a[0].x+n*a[1].x,y:o*a[0].y+n*a[1].y,t:n};return r&&(l.z=o*a[0].z+n*a[1].z),l}if(i<4){let l=o*o,u=n*n,c,d,h,p=0;i===2?(a=[a[0],a[1],a[2],bw],c=l,d=o*n*2,h=u):i===3&&(c=l*o,d=l*n*3,h=o*u*3,p=n*u);const m={x:c*a[0].x+d*a[1].x+h*a[2].x+p*a[3].x,y:c*a[0].y+d*a[1].y+h*a[2].y+p*a[3].y,t:n};return r&&(m.z=c*a[0].z+d*a[1].z+h*a[2].z+p*a[3].z),m}const s=JSON.parse(JSON.stringify(e));for(;s.length>1;){for(let l=0;l1;o--,a--){const s=[];for(let l=0,u;l"u")n=.5;else if(n===0||n===1)return n;const r=qe(n,e)+qe(1-n,e),i=r-1;return Pn(i/r)},projectionratio:function(n,e){if(e!==2&&e!==3)return!1;if(typeof n>"u")n=.5;else if(n===0||n===1)return n;const r=qe(1-n,e),i=qe(n,e)+r;return r/i},lli8:function(n,e,r,i,o,a,s,l){const u=(n*i-e*r)*(o-s)-(n-r)*(o*l-a*s),c=(n*i-e*r)*(a-l)-(e-i)*(o*l-a*s),d=(n-r)*(a-l)-(e-i)*(o-s);return d==0?!1:{x:u/d,y:c/d}},lli4:function(n,e,r,i){const o=n.x,a=n.y,s=e.x,l=e.y,u=r.x,c=r.y,d=i.x,h=i.y;return k.lli8(o,a,s,l,u,c,d,h)},lli:function(n,e){return k.lli4(n,n.c,e,e.c)},makeline:function(n,e){return new ce(n.x,n.y,(n.x+e.x)/2,(n.y+e.y)/2,e.x,e.y)},findbbox:function(n){let e=Fi,r=Fi,i=Gi,o=Gi;return n.forEach(function(a){const s=a.bbox();e>s.x.min&&(e=s.x.min),r>s.y.min&&(r=s.y.min),i0&&(d.c1=u,d.c2=c,d.s1=n,d.s2=r,a.push(d))})}),a},makeshape:function(n,e,r){const i=e.points.length,o=n.points.length,a=k.makeline(e.points[i-1],n.points[0]),s=k.makeline(n.points[o-1],e.points[0]),l={startcap:a,forward:n,back:e,endcap:s,bbox:k.findbbox([a,n,e,s])};return l.intersections=function(u){return k.shapeintersections(l,l.bbox,u,u.bbox,r)},l},getminmax:function(n,e,r){if(!r)return{min:0,max:0};let i=Fi,o=Gi,a,s;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let l=0,u=r.length;lo&&(o=s[e]);return{min:i,mid:(i+o)/2,max:o,size:o-i}},align:function(n,e){const r=e.p1.x,i=e.p1.y,o=-$n(e.p2.y-i,e.p2.x-r),a=function(s){return{x:(s.x-r)*gt(o)-(s.y-i)*an(o),y:(s.x-r)*an(o)+(s.y-i)*gt(o)}};return n.map(a)},roots:function(n,e){e=e||{p1:{x:0,y:0},p2:{x:1,y:0}};const r=n.length-1,i=k.align(n,e),o=function(T){return 0<=T&&T<=1};if(r===2){const T=i[0].y,U=i[1].y,L=i[2].y,I=T-2*U+L;if(I!==0){const W=-kt(U*U-T*L),se=-T+U,te=-(W+se)/I,Q=-(-W+se)/I;return[te,Q].filter(o)}else if(U!==L&&I===0)return[(2*U-L)/(2*U-2*L)].filter(o);return[]}const a=i[0].y,s=i[1].y,l=i[2].y,u=i[3].y;let c=-a+3*s-3*l+u,d=3*a-6*s+3*l,h=-3*a+3*s,p=a;if(k.approximately(c,0)){if(k.approximately(d,0))return k.approximately(h,0)?[]:[-p/h].filter(o);const T=kt(h*h-4*d*p),U=2*d;return[(T-h)/U,(-h-T)/U].filter(o)}d/=c,h/=c,p/=c;const m=(3*h-d*d)/3,y=m/3,w=(2*d*d*d-9*d*h+27*p)/27,_=w/2,N=_*_+y*y*y;let R,M,j,A,G;if(N<0){const T=-m/3,U=T*T*T,L=kt(U),I=-w/(2*L),W=I<-1?-1:I>1?1:I,se=mw(W),te=In(L),Q=2*te;return j=Q*gt(se/3)-d/3,A=Q*gt((se+wr)/3)-d/3,G=Q*gt((se+2*wr)/3)-d/3,[j,A,G].filter(o)}else{if(N===0)return R=_<0?In(-_):-In(_),j=2*R-d/3,A=-R-d/3,[j,A].filter(o);{const T=kt(N);return R=In(-_+T),M=In(_+T),[R-M-d/3].filter(o)}}},droots:function(n){if(n.length===3){const e=n[0],r=n[1],i=n[2],o=e-2*r+i;if(o!==0){const a=-kt(r*r-e*i),s=-e+r,l=-(a+s)/o,u=-(-a+s)/o;return[l,u]}else if(r!==i&&o===0)return[(2*r-i)/(2*(r-i))];return[]}if(n.length===2){const e=n[0],r=n[1];return e!==r?[e/(e-r)]:[]}return[]},curvature:function(n,e,r,i,o){let a,s,l,u,c=0,d=0;const h=k.compute(n,e),p=k.compute(n,r),m=h.x*h.x+h.y*h.y;if(i?(a=kt(qe(h.y*p.z-p.y*h.z,2)+qe(h.z*p.x-p.z*h.x,2)+qe(h.x*p.y-p.x*h.y,2)),s=qe(m+h.z*h.z,3/2)):(a=h.x*p.y-h.y*p.x,s=qe(m,3/2)),a===0||s===0)return{k:0,r:0};if(c=a/s,d=s/a,!o){const y=k.curvature(n-.001,e,r,i,!0).k,w=k.curvature(n+.001,e,r,i,!0).k;u=(w-c+(c-y))/2,l=(Pn(w-c)+Pn(c-y))/2}return{k:c,r:d,dk:u,adk:l}},inflections:function(n){if(n.length<4)return[];const e=k.align(n,{p1:n[0],p2:n.slice(-1)[0]}),r=e[2].x*e[1].y,i=e[3].x*e[1].y,o=e[1].x*e[2].y,a=e[3].x*e[2].y,s=18*(-3*r+2*i+3*o-a),l=18*(3*r-i-3*o),u=18*(o-r);if(k.approximately(s,0)){if(!k.approximately(l,0)){let p=-u/l;if(0<=p&&p<=1)return[p]}return[]}const c=2*s;if(k.approximately(c,0))return[];const d=l*l-4*s*u;if(d<0)return[];const h=Math.sqrt(d);return[(h-l)/c,-(l+h)/c].filter(function(p){return 0<=p&&p<=1})},bboxoverlap:function(n,e){const r=["x","y"],i=r.length;for(let o=0,a,s,l,u;o=u)return!1;return!0},expandbox:function(n,e){e.x.minn.x.max&&(n.x.max=e.x.max),e.y.max>n.y.max&&(n.y.max=e.y.max),e.z&&e.z.max>n.z.max&&(n.z.max=e.z.max),n.x.mid=(n.x.min+n.x.max)/2,n.y.mid=(n.y.min+n.y.max)/2,n.z&&(n.z.mid=(n.z.min+n.z.max)/2),n.x.size=n.x.max-n.x.min,n.y.size=n.y.max-n.y.min,n.z&&(n.z.size=n.z.max-n.z.min)},pairiteration:function(n,e,r){const i=n.bbox(),o=e.bbox(),a=1e5,s=r||.5;if(i.x.size+i.y.sizeG||G>T)&&(A+=wr),A>T&&(U=T,T=A,A=U)):T4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");o=!0}}else if(a!==6&&a!==8&&a!==9&&a!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const s=this._3d=!o&&(a===9||a===12)||e&&e[0]&&typeof e[0].z<"u",l=this.points=[];for(let m=0,y=s?3:2;mm+Dn(y.y),0)

"u"&&(o=.5),o===0)return new ce(r,r,i);if(o===1)return new ce(e,r,r);const a=ce.getABC(2,e,r,i,o);return new ce(e,a.A,i)}static cubicFromPoints(e,r,i,o,a){typeof o>"u"&&(o=.5);const s=ce.getABC(3,e,r,i,o);typeof a>"u"&&(a=k.dist(r,s.C));const l=a*(1-o)/o,u=k.dist(e,i),c=(i.x-e.x)/u,d=(i.y-e.y)/u,h=a*c,p=a*d,m=l*c,y=l*d,w={x:r.x-h,y:r.y-p},_={x:r.x+m,y:r.y+y},N=s.A,R={x:N.x+(w.x-N.x)/(1-o),y:N.y+(w.y-N.y)/(1-o)},M={x:N.x+(_.x-N.x)/o,y:N.y+(_.y-N.y)/o},j={x:e.x+(R.x-e.x)/o,y:e.y+(R.y-e.y)/o},A={x:i.x+(M.x-i.x)/(1-o),y:i.y+(M.y-i.y)/(1-o)};return new ce(e,j,A,i)}static getUtils(){return k}getUtils(){return ce.getUtils()}static get PolyBezier(){return qn}valueOf(){return this.toString()}toString(){return k.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const e=this.points,r=e[0].x,i=e[0].y,o=["M",r,i,this.order===2?"Q":"C"];for(let a=1,s=e.length;a0}length(){return k.length(this.derivative.bind(this))}static getABC(e=2,r,i,o,a=.5){const s=k.projectionratio(a,e),l=1-s,u={x:s*r.x+l*o.x,y:s*r.y+l*o.y},c=k.abcratio(a,e);return{A:{x:i.x+(i.x-u.x)/c,y:i.y+(i.y-u.y)/c},B:i,C:u,S:r,E:o}}getABC(e,r){r=r||this.get(e);let i=this.points[0],o=this.points[this.order];return ce.getABC(this.order,i,r,o,e)}getLUT(e){if(this.verify(),e=e||100,this._lut.length===e+1)return this._lut;this._lut=[],e++,this._lut=[];for(let r=0,i,o;r1?1:h,p=this.compute(h),p.t=h,p.d=c,p}get(e){return this.compute(e)}point(e){return this.points[e]}compute(e){return this.ratios?k.computeWithRatios(e,this.points,this.ratios,this._3d):k.compute(e,this.points,this._3d,this.ratios)}raise(){const e=this.points,r=[e[0]],i=e.length;for(let o=1,a,s;o1;){i=[];for(let s=0,l,u=r.length-1;s=0&&s<=1}),r=r.concat(e[i].sort(k.numberSort))}).bind(this)),e.values=r.sort(k.numberSort).filter(function(i,o){return r.indexOf(i)===o}),e}bbox(){const e=this.extrema(),r={};return this.dims.forEach((function(i){r[i]=k.getminmax(this,i,e[i])}).bind(this)),r}overlaps(e){const r=this.bbox(),i=e.bbox();return k.bboxoverlap(r,i)}offset(e,r){if(typeof r<"u"){const i=this.get(e),o=this.normal(e),a={c:i,n:o,x:i.x+o.x*r,y:i.y+o.y*r};return this._3d&&(a.z=i.z+o.z*r),a}if(this._linear){const i=this.normal(0),o=this.points.map(function(a){const s={x:a.x+e*i.x,y:a.y+e*i.y};return a.z&&i.z&&(s.z=a.z+e*i.z),s});return[new ce(o)]}return this.reduce().map(function(i){return i._linear?i.offset(e)[0]:i.scale(e)})}simple(){if(this.order===3){const o=k.angle(this.points[0],this.points[3],this.points[1]),a=k.angle(this.points[0],this.points[3],this.points[2]);if(o>0&&a<0||o<0&&a>0)return!1}const e=this.normal(0),r=this.normal(1);let i=e.x*r.x+e.y*r.y;return this._3d&&(i+=e.z*r.z),Dn(xw(i))(1-l/o)*r+l/o*i);return new ce(this.points.map((s,l)=>({x:s.x+e.x*a[l],y:s.y+e.y*a[l]})))}scale(e){const r=this.order;let i=!1;if(typeof e=="function"&&(i=e),i&&r===2)return this.raise().scale(i);const o=this.clockwise,a=this.points;if(this._linear)return this.translate(this.normal(0),i?i(0):e,i?i(1):e);const s=i?i(0):e,l=i?i(1):e,u=[this.offset(0,10),this.offset(1,10)],c=[],d=k.lli4(u[0],u[0].c,u[1],u[1].c);if(!d)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(h){const p=c[h*r]=k.copy(a[h*r]);p.x+=(h?l:s)*u[h].n.x,p.y+=(h?l:s)*u[h].n.y}),i?([0,1].forEach(function(h){if(!(r===2&&h)){var p=a[h+1],m={x:p.x-d.x,y:p.y-d.y},y=i?i((h+1)/r):e;i&&!o&&(y=-y);var w=Bn(m.x*m.x+m.y*m.y);m.x/=w,m.y/=w,c[h+1]={x:p.x+y*m.x,y:p.y+y*m.y}}}),new ce(c)):([0,1].forEach(h=>{if(r===2&&h)return;const p=c[h*r],m=this.derivative(h),y={x:p.x+m.x,y:p.y+m.y};c[h+1]=k.lli4(p,y,d,a[h+1])}),new ce(c))}outline(e,r,i,o){if(r=r===void 0?e:r,this._linear){const A=this.normal(0),G=this.points[0],T=this.points[this.points.length-1];let U,L,I;i===void 0&&(i=e,o=r),U={x:G.x+A.x*e,y:G.y+A.y*e},I={x:T.x+A.x*i,y:T.y+A.y*i},L={x:(U.x+I.x)/2,y:(U.y+I.y)/2};const W=[U,L,I];U={x:G.x-A.x*r,y:G.y-A.y*r},I={x:T.x-A.x*o,y:T.y-A.y*o},L={x:(U.x+I.x)/2,y:(U.y+I.y)/2};const se=[I,L,U],te=k.makeline(se[2],W[0]),Q=k.makeline(W[2],se[0]),Be=[te,new ce(W),Q,new ce(se)];return new qn(Be)}const a=this.reduce(),s=a.length,l=[];let u=[],c,d=0,h=this.length();const p=typeof i<"u"&&typeof o<"u";function m(A,G,T,U,L){return function(I){const W=U/T,se=(U+L)/T,te=G-A;return k.map(I,0,1,A+W*te,A+se*te)}}a.forEach(function(A){const G=A.length();p?(l.push(A.scale(m(e,i,h,d,G))),u.push(A.scale(m(-r,-o,h,d,G)))):(l.push(A.scale(e)),u.push(A.scale(-r))),d+=G}),u=u.map(function(A){return c=A.points,c[3]?A.points=[c[3],c[2],c[1],c[0]]:A.points=[c[2],c[1],c[0]],A}).reverse();const y=l[0].points[0],w=l[s-1].points[l[s-1].points.length-1],_=u[s-1].points[u[s-1].points.length-1],N=u[0].points[0],R=k.makeline(_,y),M=k.makeline(w,N),j=[R].concat(l).concat([M]).concat(u);return new qn(j)}outlineshapes(e,r,i){r=r||e;const o=this.outline(e,r).curves,a=[];for(let s=1,l=o.length;s1,u.endcap.virtual=s{var l=this.get(s);return k.between(l.x,r,o)&&k.between(l.y,i,a)})}selfintersects(e){const r=this.reduce(),i=r.length-2,o=[];for(let a=0,s,l,u;a0&&(a=a.concat(l))}),a}arcs(e){return e=e||.5,this._iterate(e,[])}_error(e,r,i,o){const a=(o-i)/4,s=this.get(i+a),l=this.get(o-a),u=k.dist(e,r),c=k.dist(e,s),d=k.dist(e,l);return Dn(c-u)+Dn(d-u)}_iterate(e,r){let i=0,o=1,a;do{a=0,o=1;let s=this.get(i),l,u,c,d,h=!1,p=!1,m,y=o,w=1;do if(p=h,d=c,y=(i+o)/2,l=this.get(y),u=this.get(o),c=k.getccenter(s,l,u),c.interval={start:i,end:o},h=this._error(c,s,i,o)<=e,m=p&&!h,m||(w=o),h){if(o>=1){if(c.interval.end=w=1,d=c,o>1){let N={x:c.x+c.r*vw(c.e),y:c.y+c.r*ww(c.e)};c.e+=k.angle({x:c.x,y:c.y},N,this.get(1))}break}o=o+(o-i)/2}else o=y;while(!m&&a++<100);if(a>=100)break;d=d||c,r.push(d),i=w}while(o<1);return r}}const Cl=(n,e,r,i)=>{i=i!=null?i:-r;const[o,a]=Al(n);if(!o||!a)return;if(o[0]===a[0]||o[1]===a[1]||e===S.Diagonal&&Math.abs(o[1]-a[1])===Math.abs(o[0]-a[0])){const j=Math.abs(r);return Tl(o,a,j)}const[s,l]=ao(n);if(!s||!l)return;const u=new ce([...s,...l]),[c,d]=[u.scale(r),u.scale(i)],h=El(o,s,a,u,c,d);if(!h)return;const{mA:[p,m],mB:[y,w],endA:[_,N],endB:[R,M]}=h;return["M ".concat(p," ").concat(m," ").concat(c.toSVG().replace("M","L")," L ").concat(_," ").concat(N),"M ".concat(y," ").concat(w," ").concat(d.toSVG().replace("M","L")," L ").concat(R," ").concat(M)]},Nw=(n,e,r,i)=>{i=i!=null?i:2.5;const[o,a]=Al(n);if(!o||!a)return;if(o[0]===a[0]||o[1]===a[1]||e===S.Diagonal&&Math.abs(o[1]-a[1])===Math.abs(o[0]-a[0])){const L=Math.abs(r),[I,W]=Tl(o,a,L);return{outline:_w(o,a,L),pA:I,pB:W}}const[s,l]=ao(n);if(!s||!l)return;const u=new ce([...s,...l]),[c,d]=[u.scale(r),u.scale(i)],h=El(o,s,a,u,c,d);if(!h)return;const{mA:[p,m],mB:[y,w],endA:[_,N],endB:[R,M]}=h,[j,A]=ao(d.toSVG().replace("M","L")),[G,T]=Rw(j,A);return{outline:"M ".concat(p," ").concat(m," ").concat(c.toSVG().replace("M","L")," L ").concat(_," ").concat(N," L ").concat(R," ").concat(M," L ").concat(G.join(" ")," C ").concat(T.join(" ")," L ").concat(y," ").concat(w," Z"),pA:"M ".concat(p," ").concat(m," ").concat(c.toSVG().replace("M","L")," L ").concat(_," ").concat(N),pB:"M ".concat(y," ").concat(w," ").concat(d.toSVG().replace("M","L")," L ").concat(R," ").concat(M)}},Al=n=>{var i,o,a,s;const e=(o=(i=n.match(/M\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/))==null?void 0:i.at(0))==null?void 0:o.replace(/M\s*/,"").split(" ").map(l=>Number(l)),r=(s=(a=n.match(/L\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*$/))==null?void 0:a.at(0))==null?void 0:s.replace(/L\s*/,"").split(" ").map(l=>Number(l));return[e,r]},Tl=(n,e,r)=>{const[i,o,a,s]=[n[0],n[1],e[0],e[1]],l=Math.abs((s-o)/(a-i));if(l===1/0)return["M ".concat(i+r," ").concat(o," L ").concat(a+r," ").concat(s),"M ".concat(i-r," ").concat(o," L ").concat(a-r," ").concat(s)];if(l===0)return["M ".concat(i," ").concat(o+r," L ").concat(a," ").concat(s+r),"M ".concat(i," ").concat(o-r," L ").concat(a," ").concat(s-r)];{const u=1/l,c=r/Math.sqrt(u*u+1),d=c*u*-Math.sign((a-i)*(s-o));return["M ".concat(i+c," ").concat(o+d," L ").concat(a+c," ").concat(s+d),"M ".concat(i-c," ").concat(o-d," L ").concat(a-c," ").concat(s-d)]}},_w=(n,e,r)=>{const[i,o,a,s]=[n[0],n[1],e[0],e[1]],l=Math.abs((s-o)/(a-i));if(l===1/0)return"M ".concat(i+r," ").concat(o," L ").concat(a+r," ").concat(s," L ").concat(a-r," ").concat(s," L ").concat(i-r," ").concat(o," Z");if(l===0)return"M ".concat(i," ").concat(o+r," L ").concat(a," ").concat(s+r," L ").concat(a," ").concat(s-r," L ").concat(i," ").concat(o-r," Z");{const u=1/l,c=r/Math.sqrt(u*u+1),d=c*u*-Math.sign((a-i)*(s-o));return"M ".concat(i+c," ").concat(o+d," L ").concat(a+c," ").concat(s+d," L ").concat(a-c," ").concat(s-d," L ").concat(i-c," ").concat(o-d," Z")}},ao=n=>{var i,o,a,s;const e=(o=(i=n.match(/L\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/))==null?void 0:i.at(0))==null?void 0:o.replace(/L\s*/,"").split(" ").map(l=>Number(l)),r=(s=(a=n.match(/C\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/g))==null?void 0:a.at(0))==null?void 0:s.replace(/C\s*/,"").split(" ").map(l=>Number(l));return[e,r]},Rw=(n,e)=>[[e[4],e[5]],[e[2],e[3],e[0],e[1],n[0],n[1]]],El=(n,e,r,i,o,a)=>{const s=[o.points.at(0).x,o.points.at(0).y],l=[a.points.at(0).x,a.points.at(0).y];if(!n)return;const[u,c]=xr(n[0],e[0],s[0],n[1],e[1],s[1]),[d,h]=xr(n[0],e[0],l[0],n[1],e[1],l[1]),p=[o.points.at(-1).x,o.points.at(-1).y],m=[a.points.at(-1).x,a.points.at(-1).y],y=[i.points.at(-1).x,i.points.at(-1).y];if(!r)return;const[w,_]=xr(p[0],y[0],r[0],p[1],y[1],r[1]),[N,R]=xr(m[0],y[0],r[0],m[1],y[1],r[1]);return{mA:[u,c],mB:[d,h],endA:[w,_],endB:[N,R]}},xr=(n,e,r,i,o,a)=>{const[s,l]=[n+r,i+a],[u,c]=[s-e,l-o];return[u,c]},kw=1,Yx=(n,e)=>{const{type:r,parallelIndex:i}=e.attributes;if(r===S.Simple||i<0)return{normal:[e],parallel:[]};const{source:o,target:a}=e,s=[],l=[];for(const u of n.edgeEntries(o,a)){const{type:c,parallelIndex:d}=u.attributes;if(c===S.Simple||d<0){s.push(u);continue}const{startFrom:h}=u.attributes[c];Ll(c,o,h,u)&&l.push(u)}return{normal:s,parallel:l}},Cw=(n,e,r,i,o)=>{let a=!1;if(n===S.Diagonal)(Math.abs(i-e)e&&o>r)||Math.abs(i-e)>Math.abs(o-r)&&(i>e&&or))&&(a=!0);else if(n===S.Perpendicular)(i>e&&or)&&(a=!0);else if(n===S.RotatePerpendicular){const[s,l,u,c]=[e*Math.SQRT1_2+r*Math.SQRT1_2,-e*Math.SQRT1_2+r*Math.SQRT1_2,i*Math.SQRT1_2+o*Math.SQRT1_2,-i*Math.SQRT1_2+o*Math.SQRT1_2];(u>s&&cl)&&(a=!0)}return a},Zx=n=>{var p;let e=n.at(0);if(!e)return{};for(const m of n)m.attributes.parallelIndex0?m.attributes.parallelIndex:0;if(y===0){h[m.edge]=c;continue}const w=y*5,_=["M ".concat(a," ").concat(s+w," L ").concat(l," ").concat(u+w),"M ".concat(a," ").concat(s-w," L ").concat(l," ").concat(u-w)],[N,R]=(p=Cl(c,r,w))!=null?p:_;h[m.edge]=d?N:R}return h},Ll=(n,e,r,i)=>{const o=i.attributes.type;return n===i.attributes.type&&e===i.source&&r===i.attributes[o].startFrom?!0:n===i.attributes.type&&e===i.target&&r!==i.attributes[o].startFrom},Qx=(n,e,r,i,o)=>{if(e===S.Simple)return-1;const a=[];for(const l of n.edgeEntries(r,i))Ll(e,r,o,l)&&a.push(l.attributes.parallelIndex);a.sort();let s=0;for(const l of a){if(l>s)break;s=l+1}return s},Po=(n,e,r)=>{if(e===S.Simple)return r;const i=n.getEdgeAttribute(r,"parallelIndex");if(i<0)return r;const{startFrom:o}=n.getEdgeAttribute(r,e),[a,s]=n.extremities(r);let l=i,u=r;for(const c of n.edgeEntries(a,s)){const d=c.attributes;(e===d.type&&a===c.source&&d[e].startFrom===o&&d.parallelIndex>=0&&d.parallelIndex=0&&d.parallelIndex{let e=0;for(const r of n.edgeEntries())r.attributes.parallelIndex>=0&&(e+=1);return e},Lw={telemetry:{app:!0,project:!0},preference:{unlockSimplePathAttempts:3,toolsPanel:{expand:!0},autoParallel:!0,randomStationsNames:"none"}},Ol=ci({name:"app",initialState:Lw,reducers:{setTelemetryApp:(n,e)=>{n.telemetry.app=e.payload},setTelemetryProject:(n,e)=>{n.telemetry.project=e.payload},setUnlockSimplePath:(n,e)=>{n.preference.unlockSimplePathAttempts=e.payload},setToolsPanelExpansion:(n,e)=>{n.preference.toolsPanel.expand=e.payload},setAutoParallel:(n,e)=>{n.preference.autoParallel=e.payload},setRandomStationsNames:(n,e)=>{n.preference.randomStationsNames=e.payload}}}),{setTelemetryApp:Ow,setTelemetryProject:jw,setUnlockSimplePath:Mw,setToolsPanelExpansion:Pw,setAutoParallel:jl,setRandomStationsNames:$w}=Ol.actions,Iw=Ol.reducer,Dw=49,Bw={present:new pe().export(),past:[],future:[],svgViewBoxZoom:100,svgViewBoxMin:{x:0,y:0}},Ml=es("undo"),Pl=es("redo"),$l=ci({name:"param",initialState:Bw,reducers:{setFullState:(n,e)=>structuredClone(e.payload),saveGraph:(n,e)=>{n.future=[],n.past.push(n.present),n.past.length>Dw&&n.past.shift(),n.present=structuredClone(e.payload)},setSvgViewBoxZoom:(n,e)=>{n.svgViewBoxZoom=e.payload},setSvgViewBoxMin:(n,e)=>{n.svgViewBoxMin=e.payload}},extraReducers:n=>{n.addCase(Ml,e=>{if(e.past.length===0)return;const r=e.past.pop();e.future.unshift(e.present),e.present=r,window.graph.clear(),window.graph.import(structuredClone(Qo(r)))}).addCase(Pl,e=>{if(e.future.length===0)return;const r=e.future.shift();e.past.push(e.present),e.present=r,window.graph.clear(),window.graph.import(structuredClone(Qo(r)))})}}),{setFullState:zw,saveGraph:un,setSvgViewBoxZoom:Xx,setSvgViewBoxMin:eS}=$l.actions,Fw=$l.reducer,Gw={selected:new Set,active:void 0,refresh:{nodes:Date.now(),edges:Date.now()},mode:"free",lastTool:void 0,keepLastPath:!1,theme:[le.Shanghai,"sh1","#E3002B",ee.white],paletteAppClip:{input:void 0,output:void 0},masterNodesCount:0,parallelLinesCount:0,stationNames:{},globalAlerts:{}},Jr=ts("runtime/refreshNodes",async(n,{getState:e,dispatch:r})=>{const i=e();r(Vw());let o=0;window.graph.forEachNode((s,l)=>{l.type===st.Master&&(o+=1)}),r(Uw(o));const a=i.account.activeSubscriptions.RMP_CLOUD?Fy:zy;o>a&&r(Do({status:"warning",message:"".concat(Qn.t("header.settings.proLimitExceed.master")," ").concat(Qn.t("header.settings.proLimitExceed.solution"))}))}),pn=ts("runtime/refreshEdges",async(n,{getState:e,dispatch:r})=>{const i=e();r(Hw());const o=Ew(window.graph);r(Ww(o));const a=i.account.activeSubscriptions.RMP_CLOUD?Tw:Aw;o>=a&&r(jl(!1)),o>a&&r(Do({status:"warning",message:"".concat(Qn.t("header.settings.proLimitExceed.parallel")," ").concat(Qn.t("header.settings.proLimitExceed.solution"))}))}),$o=ci({name:"runtime",initialState:Gw,reducers:{setSelected:(n,e)=>{n.selected=e.payload},addSelected:(n,e)=>{n.selected.add(e.payload)},removeSelected:(n,e)=>{n.selected.delete(e.payload)},clearSelected:n=>{n.selected=new Set},setActive:(n,e)=>{n.active=e.payload},setRefreshNodes:n=>{n.refresh.nodes=Date.now()},setRefreshEdges:n=>{n.refresh.edges=Date.now()},setMode:(n,e)=>{n.mode!=="free"&&(n.lastTool=n.mode),n.mode=e.payload},setKeepLastPath:(n,e)=>{n.keepLastPath=e.payload},setTheme:(n,e)=>{n.theme=e.payload},openPaletteAppClip:(n,e)=>{n.paletteAppClip.input=e.payload,n.paletteAppClip.output=void 0},closePaletteAppClip:n=>{n.paletteAppClip.input=void 0},onPaletteAppClipEmit:(n,e)=>{n.paletteAppClip.input=void 0,n.paletteAppClip.output=e.payload},setMasterNodesCount:(n,e)=>{n.masterNodesCount=e.payload},setParallelLinesCount:(n,e)=>{n.parallelLinesCount=e.payload},setStationNames:(n,e)=>{n.stationNames[e.payload.cityName]=e.payload.names},setGlobalAlert:(n,e)=>{const{status:r,message:i,url:o,linkedApp:a}=e.payload;n.globalAlerts[r]={message:i,url:o,linkedApp:a}},closeGlobalAlert:(n,e)=>{delete n.globalAlerts[e.payload]}},extraReducers:n=>{n.addCase(Ml,e=>{e.refresh.nodes=Date.now(),e.refresh.edges=Date.now()}).addCase(Pl,e=>{e.refresh.nodes=Date.now(),e.refresh.edges=Date.now()})}}),{setMasterNodesCount:Uw,setParallelLinesCount:Ww}=$o.actions,{setSelected:Io,addSelected:tS,removeSelected:nS,clearSelected:rS,setActive:iS,setRefreshNodes:Vw,setRefreshEdges:Hw,setMode:oS,setKeepLastPath:aS,setTheme:sS,openPaletteAppClip:Jw,closePaletteAppClip:Kw,onPaletteAppClipEmit:qw,setStationNames:lS,setGlobalAlert:Do,closeGlobalAlert:uS}=$o.actions,Yw=$o.reducer,Bo=(n,e,r)=>e===0?n:Zw(n,e);function Zw(n,e,r){function i(L,I,W){var se=I.x-L.x,te=I.y-L.y,Q=Math.sqrt(se*se+te*te);return o(L,I,Math.min(1,W/Q))}function o(L,I,W){return{x:L.x+(I.x-L.x)*W,y:L.y+(I.y-L.y)*W}}function a(L,I){L.length>2&&(L[L.length-2]=I.x,L[L.length-1]=I.y)}function s(L){return{x:parseFloat(L[L.length-2]),y:parseFloat(L[L.length-1])}}var l=n.split(/[,\s]/).reduce(function(L,I){var W=I.match("([a-zA-Z])(.+)");return W?(L.push(W[1]),L.push(W[2])):L.push(I),L},[]),u=l.reduce(function(L,I){return parseFloat(I)==I&&L.length?L[L.length-1].push(I):L.push([I]),L},[]),c=[];if(u.length>1){var d=s(u[0]),h=null;u[u.length-1][0]=="Z"&&u[0].length>2&&(h=["L",d.x,d.y],u[u.length-1]=h),c.push(u[0]);for(var p=1;p2&&y[0]=="L"&&w.length>2&&w[0]=="L"){var _=s(m),N=s(y),R=s(w),M,j;M=i(N,_,e),j=i(N,R,e),a(y,M),y.origPoint=N,c.push(y);var A=o(M,N,.5),G=o(N,j,.5),T=["C",A.x,A.y,G.x,G.y,j.x,j.y];T.origPoint=N,c.push(T)}else c.push(y)}if(h){var U=s(c[c.length-1]);c.push(["Z"]),a(c[0],U)}}else c=u;return c.reduce(function(L,I){return L+I.join(" ")+" "},"")}const Qw=(n,e,r,i,o=yt)=>{const{startFrom:a=yt.startFrom,offsetFrom:s=yt.offsetFrom,offsetTo:l=yt.offsetTo,roundCornerFactor:u=yt.roundCornerFactor}=o,[c,d,h,p]=a==="from"?[n,r,e,i]:[e,i,n,r],m=Math.abs(h-c)0?-1:1):j,L=m==="horizontal"?A:T+Math.abs(G-j)*(T-A>0?-1:1),[I,W,se,te]=a==="from"?[j,A,G,T]:[G,T,j,A];return Bo("M ".concat(I," ").concat(W," L ").concat(U," ").concat(L," L ").concat(se," ").concat(te),u)},yt={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:10},Xw=n=>{var h,p,m;const{id:e,attrs:r,handleAttrsUpdate:i,recalculateParallelIndex:o,parallelIndex:a}=n,{t:s}=fe(),l=Ht(),u=Po(window.graph,S.Diagonal,e),c=a>=0&&u!==e,d=[{type:"select",label:s("panel.details.lines.common.startFrom"),value:r.startFrom,options:{from:s("panel.details.lines.common.from"),to:s("panel.details.lines.common.to")},onChange:y=>{o(e,y),r.startFrom=y,i(e,r)},minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetFrom"),value:((h=r.offsetFrom)!=null?h:yt.offsetFrom).toString(),variant:"number",onChange:y=>{Number.isNaN(y)&&(y="0"),r.offsetFrom=Number(y),i(e,r)},isDisabled:c,minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetTo"),value:((p=r.offsetTo)!=null?p:yt.offsetTo).toString(),variant:"number",onChange:y=>{Number.isNaN(y)&&(y="0"),r.offsetTo=Number(y),i(e,r)},isDisabled:c,minW:"full"},{type:"input",label:s("panel.details.lines.common.roundCornerFactor"),value:((m=r==null?void 0:r.roundCornerFactor)!=null?m:yt.roundCornerFactor).toString(),variant:"number",onChange:y=>{(Number.isNaN(y)||Number(y)<0)&&(y="0"),r.roundCornerFactor=Number(y),i(e,r)},isDisabled:c,minW:"full"}];return c&&d.unshift({type:"custom",label:s("panel.details.lines.common.parallelDisabled"),component:f.jsxs(dn,{size:"sm",variant:"link",onClick:()=>l(Io(new Set([u]))),children:[s("panel.details.lines.common.changeInBaseLine")," ",u]})}),f.jsx(ye,{fields:d})},e0=f.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:f.jsx("path",{d:"M9,18V12L15,6",stroke:"currentColor",fill:"none"})}),t0={generatePath:Qw,icon:e0,defaultAttrs:yt,attrsComponent:Xw,metadata:{displayName:"panel.details.lines.diagonal.displayName"}},n0=(n,e,r,i,o=bt)=>{const{startFrom:a=bt.startFrom,offsetFrom:s=bt.offsetFrom,offsetTo:l=bt.offsetTo,roundCornerFactor:u=bt.roundCornerFactor}=o,[c,d]=a==="from"?[s,l]:[l,s],[h,p,m,y]=a==="from"?[0,c,d,0]:[c,0,0,d],w=a==="from"?e+m:n+h,_=a==="from"?r+p:i+y;return Bo("M ".concat(n+h," ").concat(r+p," L ").concat(w," ").concat(_," L ").concat(e+m," ").concat(i+y),u)},bt={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:18.33},r0=n=>{var h,p,m;const{id:e,attrs:r,handleAttrsUpdate:i,recalculateParallelIndex:o,parallelIndex:a}=n,{t:s}=fe(),l=Ht(),u=Po(window.graph,S.Perpendicular,e),c=a>=0&&u!==e,d=[{type:"select",label:s("panel.details.lines.common.startFrom"),value:r.startFrom,options:{from:s("panel.details.lines.common.from"),to:s("panel.details.lines.common.to")},onChange:y=>{o(e,y),r.startFrom=y,i(e,r)},minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetFrom"),value:((h=r.offsetFrom)!=null?h:bt.offsetFrom).toString(),variant:"number",onChange:y=>{Number.isNaN(y)&&(y="0"),r.offsetFrom=Number(y),i(e,r)},isDisabled:c,minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetTo"),value:((p=r.offsetTo)!=null?p:bt.offsetTo).toString(),variant:"number",onChange:y=>{Number.isNaN(y)&&(y="0"),r.offsetTo=Number(y),i(e,r)},isDisabled:c,minW:"full"},{type:"input",label:s("panel.details.lines.common.roundCornerFactor"),value:((m=r==null?void 0:r.roundCornerFactor)!=null?m:bt.roundCornerFactor).toString(),variant:"number",onChange:y=>{(Number.isNaN(y)||Number(y)<0)&&(y="0"),r.roundCornerFactor=Number(y),i(e,r)},isDisabled:c,minW:"full"}];return c&&d.unshift({type:"custom",label:s("panel.details.lines.common.parallelDisabled"),component:f.jsxs(dn,{size:"sm",variant:"link",onClick:()=>l(Io(new Set([u]))),children:[s("panel.details.lines.common.changeInBaseLine")," ",u]})}),f.jsx(ye,{fields:d})},i0=f.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:f.jsx("path",{d:"M6,6H18V18",stroke:"currentColor",fill:"none"})}),o0={generatePath:n0,icon:i0,defaultAttrs:bt,attrsComponent:r0,metadata:{displayName:"panel.details.lines.perpendicular.displayName"}},a0=(n,e,r,i,o=vt)=>{const{startFrom:a=vt.startFrom,offsetFrom:s=vt.offsetFrom,offsetTo:l=vt.offsetTo,roundCornerFactor:u=vt.roundCornerFactor}=o,[c,d]=a==="from"?[s,l]:[l,s],[h,p,m,y]=a==="from"?[0,c,d,0]:[c,0,0,d],[w,_,N,R]=[n*Math.SQRT1_2+r*Math.SQRT1_2,-n*Math.SQRT1_2+r*Math.SQRT1_2,e*Math.SQRT1_2+i*Math.SQRT1_2,-e*Math.SQRT1_2+i*Math.SQRT1_2],[M,j,A,G]=[w+h,_+p,N+m,R+y],[T,U,L,I]=[M*Math.SQRT1_2-j*Math.SQRT1_2,M*Math.SQRT1_2+j*Math.SQRT1_2,A*Math.SQRT1_2-G*Math.SQRT1_2,A*Math.SQRT1_2+G*Math.SQRT1_2],W=a==="from"?N+m:w+h,se=a==="from"?_+p:R+y,[te,Q]=[W*Math.SQRT1_2-se*Math.SQRT1_2,W*Math.SQRT1_2+se*Math.SQRT1_2];return Bo("M ".concat(T," ").concat(U," L ").concat(te," ").concat(Q," L ").concat(L," ").concat(I),u)},vt={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:18.33},s0=n=>{var h,p,m;const{id:e,attrs:r,handleAttrsUpdate:i,recalculateParallelIndex:o,parallelIndex:a}=n,{t:s}=fe(),l=Ht(),u=Po(window.graph,S.RotatePerpendicular,e),c=a>=0&&u!==e,d=[{type:"select",label:s("panel.details.lines.common.startFrom"),value:r.startFrom,options:{from:s("panel.details.lines.common.from"),to:s("panel.details.lines.common.to")},onChange:y=>{o(e,y),r.startFrom=y,i(e,r)},minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetFrom"),value:((h=r.offsetFrom)!=null?h:vt.offsetFrom).toString(),variant:"number",onChange:y=>{Number.isNaN(y)&&(y="0"),r.offsetFrom=Number(y),i(e,r)},isDisabled:c,minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetTo"),value:((p=r.offsetTo)!=null?p:vt.offsetTo).toString(),variant:"number",onChange:y=>{Number.isNaN(y)&&(y="0"),r.offsetTo=Number(y),i(e,r)},isDisabled:c,minW:"full"},{type:"input",label:s("panel.details.lines.common.roundCornerFactor"),value:((m=r==null?void 0:r.roundCornerFactor)!=null?m:vt.roundCornerFactor).toString(),variant:"number",onChange:y=>{(Number.isNaN(y)||Number(y)<0)&&(y="0"),r.roundCornerFactor=Number(y),i(e,r)},isDisabled:c,minW:"full"}];return c&&d.unshift({type:"custom",label:s("panel.details.lines.common.parallelDisabled"),component:f.jsxs(dn,{size:"sm",variant:"link",onClick:()=>l(Io(new Set([u]))),children:[s("panel.details.lines.common.changeInBaseLine")," ",u]})}),f.jsx(ye,{fields:d})},l0=f.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:f.jsx("path",{d:"M9,6L15,12L9,18",stroke:"currentColor",fill:"none"})}),u0={generatePath:a0,icon:l0,defaultAttrs:vt,attrsComponent:s0,metadata:{displayName:"panel.details.lines.rotatePerpendicular.displayName"}};var Z=(n=>(n.ShmetroBasic="shmetro-basic",n.ShmetroBasic2020="shmetro-basic-2020",n.ShmetroInt="shmetro-int",n.ShmetroOutOfSystemInt="shmetro-osysi",n.ShanghaiSuburbanRailway="sh-sub-rwy",n.GzmtrBasic="gzmtr-basic",n.GzmtrInt="gzmtr-int",n.GzmtrInt2024="gzmtr-int-2024",n.BjsubwayBasic="bjsubway-basic",n.BjsubwayInt="bjsubway-int",n.MTR="mtr",n.SuzhouRTBasic="suzhourt-basic",n.SuzhouRTInt="suzhourt-int",n.KunmingRTBasic="kunmingrt-basic",n.KunmingRTInt="kunmingrt-int",n.MRTBasic="mrt-basic",n.MRTInt="mrt-int",n.JREastBasic="jr-east-basic",n.JREastImportant="jr-east-imp",n.FoshanMetroBasic="foshan-metro-basic",n.QingdaoMetroStation="qingdao-metro-basic",n.TokyoMetroBasic="tokyo-metro-basic",n.TokyoMetroInt="tokyo-metro-int",n.LondonTubeBasic="london-tube-basic",n.LondonTubeInt="london-tube-int",n.LondonRiverServicesInt="london-river-int",n.GuangdongIntercityRailway="gd-intercity-rwy",n))(Z||{});const cS=["shmetro-basic-2020","gzmtr-basic","suzhourt-basic","kunmingrt-basic","mrt-basic","foshan-metro-basic","qingdao-metro-basic"],dS={names:["车站","Stn"]};class c0{static hexToRgb(e){return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16)]}static fade(e,r){return"rgba(".concat([...this.hexToRgb(e),r].join(","),")")}static euclideanDistance(e,r){return this.hexToRgb(e).reduce((i,o,a)=>i+Math.pow(o-this.hexToRgb(r)[a],2),0)}}function hS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"},child:[]}]})(n)}function pS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"},child:[]}]})(n)}function fS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},child:[]}]})(n)}function gS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 14h-3v3h-2v-3H8v-2h3v-3h2v3h3v2zm-3-7V3.5L18.5 9H13z"},child:[]}]})(n)}function mS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"},child:[]}]})(n)}function yS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(n)}function bS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.488.488 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"},child:[]}]})(n)}function vS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12.87 15.07-2.54-2.51.03-.03A17.52 17.52 0 0 0 14.07 6H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7 1.62-4.33L19.12 17h-3.24z"},child:[]}]})(n)}function wS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]},{tag:"path",attr:{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"},child:[]}]})(n)}function xS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"},child:[]}]})(n)}function SS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M13 7h9v2h-9zM13 15h9v2h-9zM16 11h6v2h-6zM13 12 8 7v4H2v2h6v4z"},child:[]}]})(n)}function NS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"},child:[]}]})(n)}function _S(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},child:[]}]})(n)}function RS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 13h2v-2H3v2zm4 8h2v-2H7v2zm6-18h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zm8 4h2v-2h-2v2zm8-8h2v-2h-2v2zm0-4h2V7h-2v2zm-4-4h2V3h-2v2zM7.83 5 7 4.17V3h2v2H7.83zm12 12-.83-.83V15h2v2h-1.17zm1.36 4.19L2.81 2.81 1.39 4.22 4.17 7H3v2h2V7.83l2 2V17h7.17l2 2H15v2h2v-1.17l2.78 2.78 1.41-1.42zM9 15v-3.17L12.17 15H9zm6-2.83V9h-3.17l-2-2H17v7.17l-2-2z"},child:[]}]})(n)}function kS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 0 1 7.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"},child:[]}]})(n)}function CS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 13H5v-2h14v2z"},child:[]}]})(n)}function AS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 12.4V7l-4-4H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7.4l8.6-8.6zM15 15c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zM6 6h9v4H6V6zm13.99 10.25 1.77 1.77L16.77 23H15v-1.77l4.99-4.98zm3.26.26-.85.85-1.77-1.77.85-.85c.2-.2.51-.2.71 0l1.06 1.06c.2.2.2.52 0 .71z"},child:[]}]})(n)}function TS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"},child:[]}]})(n)}function ES(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"},child:[]}]})(n)}function LS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"},child:[]}]})(n)}function OS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"},child:[]}]})(n)}function jS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 20h14v-2H5v2zm0-10h4v6h6v-6h4l-7-7-7 7z"},child:[]}]})(n)}function d0(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"},child:[]}]})(n)}function MS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"},child:[]}]})(n)}function PS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"},child:[]}]})(n)}function $S(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"},child:[]}]})(n)}function IS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(n)}function DS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"},child:[]}]})(n)}function BS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(n)}function zS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(n)}function FS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(n)}function GS(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3 1 9l11 6 9-4.91V17h2V9L12 3z"},child:[]}]})(n)}function h0(n){return H({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3z"},child:[]}]})(n)}function p0(n){const{theme:e,onClick:r}=n,{t:i}=fe();return f.jsx(Or,{"aria-label":i("Color"),color:e[3],bg:e[2],size:"md",_hover:{bg:c0.fade(e[2],.7)},icon:f.jsx(d0,{}),onClick:r})}const ve=n=>{var R;const{type:e,colorKey:r="color",defaultTheme:i}=n,o=Ht(),{selected:a,paletteAppClip:{output:s}}=vi(M=>M.runtime),[l]=a,u=P.useCallback(()=>{o(Jr()),o(pn()),o(un(c.current.export()))},[o,Jr,pn,un]),c=P.useRef(window.graph),[d,h,p]=[].concat(Object.values(Z)).concat(Object.values(st)).find(M=>e===M)?[c.current.hasNode,c.current.getNodeAttribute,c.current.mergeNodeAttributes]:[c.current.hasEdge,c.current.getEdgeAttribute,c.current.mergeEdgeAttributes],m=M=>{if(l&&d.bind(c.current)(l)){const j=h.bind(c.current)(l,e);j[r]=M,p.bind(c.current)(l,{[e]:j}),u()}},[y,w]=P.useState(!1);P.useEffect(()=>{y&&s&&(m(s),w(!1))},[s==null?void 0:s.toString()]);const N=l&&d.bind(c.current)(l)&&(l.startsWith("stn")||l.startsWith("misc_node")?c.current.getNodeAttribute(l,"type")===e:c.current.getEdgeAttribute(l,"style")===e)?((R=h.bind(c.current)(l,e))!=null?R:{[r]:i})[r]:i;return f.jsx(f.Fragment,{children:f.jsx(p0,{theme:N,onClick:()=>{w(!0),o(Jw(N))}})})},f0=n=>{const{id:e,path:r,styleAttrs:i,newLine:o,handlePointerDown:a}=n,{color:s=Kr.color}=i!=null?i:Kr,l=P.useCallback(u=>a(e,u),[e,a]);return f.jsx("path",{id:e,d:r,fill:"none",stroke:s[2],strokeWidth:"5",strokeLinecap:"round",cursor:"pointer",onPointerDown:o?void 0:l,pointerEvents:o?"none":void 0})},Kr={color:[le.Shanghai,"sh1","#E4002B",ee.white]},g0=n=>{const{t:e}=fe(),r=[{type:"custom",label:e("color"),component:f.jsx(ve,{type:D.SingleColor,defaultTheme:Kr.color})}];return f.jsx(ye,{fields:r})},m0={component:f0,defaultAttrs:Kr,attrsComponent:g0,metadata:{displayName:"panel.details.lines.singleColor.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},y0=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=P.useCallback(a=>i(e,a),[e,i]);return f.jsxs("g",{id:e,onPointerDown:o,cursor:"pointer",children:[f.jsx("path",{d:r,fill:"none",stroke:"black",strokeWidth:"7",strokeLinecap:"round"}),f.jsx("path",{d:r,fill:"none",stroke:"white",strokeWidth:"4.33",strokeLinecap:"round"})]})},b0={},v0=()=>{},w0={component:y0,defaultAttrs:b0,attrsComponent:v0,metadata:{displayName:"panel.details.lines.shmetroVirtualInt.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular,S.Simple]}},x0=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{isEnd:a=Il.isEnd}=i,s=P.useCallback(u=>o(e,u),[e,o]),l=a?"round":void 0;return f.jsx("g",{id:"".concat(e,".pre"),onPointerDown:s,cursor:"pointer",children:f.jsx("path",{d:r,fill:"none",stroke:"#898989",strokeWidth:"5",strokeLinecap:l})})},S0=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=P.useCallback(a=>i(e,a),[e,i]);return f.jsx("g",{id:e,onPointerDown:o,cursor:"pointer",children:f.jsx("path",{d:r,fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})})},Il={isEnd:!1},N0=n=>{const{id:e,attrs:r,handleAttrsUpdate:i}=n,{t:o}=fe(),a=[{type:"switch",label:o("panel.details.lines.shanghaiSuburbanRailway.isEnd"),isChecked:r.isEnd,onChange:s=>{r.isEnd=s,i(e,r)},oneLine:!0,minW:"full"}];return f.jsx(ye,{fields:a})},_0={component:S0,preComponent:x0,defaultAttrs:Il,attrsComponent:N0,metadata:{displayName:"panel.details.lines.shanghaiSuburbanRailway.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},R0=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=P.useCallback(a=>i(e,a),[e,i]);return f.jsx("path",{id:e,d:r,fill:"none",stroke:"#565656",strokeWidth:"3",strokeDasharray:"3",cursor:"pointer",onPointerDown:o})},k0={},C0=()=>null,A0={component:R0,defaultAttrs:k0,attrsComponent:C0,metadata:{displayName:"panel.details.lines.gzmtrVirtualInt.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular,S.Simple]}},Dl=9.25*2,Bl=1.3,zl=.57915,T0=(Dl+Bl)*zl,E0=(Dl-Bl)*zl,L0=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=qr.color}=i!=null?i:qr,s=P.useCallback(l=>o(e,l),[e,o]);return f.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[f.jsx("path",{d:r,fill:"none",stroke:"black",strokeWidth:T0}),f.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:E0})]})},qr={color:[le.Guangzhou,"gz11","#ffb00a",ee.black]},O0=n=>{const{t:e}=fe(),r=[{type:"custom",label:e("color"),component:f.jsx(ve,{type:D.GZMTRLoop,defaultTheme:qr.color})}];return f.jsx(ye,{fields:r})},j0={component:L0,defaultAttrs:qr,attrsComponent:O0,metadata:{displayName:"panel.details.lines.gzmtrLoop.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},M0=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=Yr.color}=i!=null?i:Yr,s=P.useCallback(l=>o(e,l),[e,o]);return f.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[f.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),f.jsx("path",{d:r,fill:"none",stroke:a[3],strokeWidth:"4.67",strokeDasharray:"17.5"})]})},Yr={color:[le.Shanghai,"jsr","#000000",ee.white]},P0=n=>{const{t:e}=fe(),r=[{type:"custom",label:e("color"),component:f.jsx(ve,{type:D.ChinaRailway,defaultTheme:Yr.color})}];return f.jsx(ye,{fields:r})},$0={component:M0,defaultAttrs:Yr,attrsComponent:P0,metadata:{displayName:"panel.details.lines.chinaRailway.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},I0=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=Zr.color}=i!=null?i:Zr,s=P.useCallback(l=>o(e,l),[e,o]);return f.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[f.jsx("path",{d:r,fill:"none",stroke:"white",strokeWidth:"6",strokeLinecap:"round"}),f.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"})]})},Zr={color:[le.Beijing,"bj1","#c23a30",ee.white]},D0=n=>{fe();const e=[{type:"custom",label:"color",component:f.jsx(ve,{type:D.BjsubwaySingleColor,defaultTheme:Zr.color})}];return f.jsx(ye,{fields:e})},B0={component:I0,defaultAttrs:Zr,attrsComponent:D0,metadata:{displayName:"panel.details.lines.bjsubwaySingleColor.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},tr=n=>{const{t:e}=fe(),r=Ht(),{selected:i}=vi(l=>l.runtime),[o]=i,a=P.useRef(window.graph),s=[];if(i.size===1&&a.current.hasNode(o)){const l=a.current.getNodeAttribute(o,"type"),u=a.current.getNodeAttribute(o,l);s.push(...n.fields.filter(c=>c.type!=="custom").map(c=>{var d,h,p;return{type:c.type,label:e(c.label),value:(d=c.value)==null?void 0:d.call(c,u),isChecked:(h=c.isChecked)==null?void 0:h.call(c,u),hidden:(p=c.hidden)==null?void 0:p.call(c,u),options:c.options,disabledOptions:c.disabledOptions&&c.disabledOptions(u),validator:c.validator,oneLine:c.oneLine,onChange:m=>{let y;try{y=c.onChange(m,u)}catch(w){r(Do({status:"error",message:e("err-code.".concat(w))}));return}a.current.mergeNodeAttributes(o,{[l]:y}),r(Jr()),r(un(a.current.export()))}}}),...n.fields.filter(c=>c.type==="custom").map(c=>({...c,label:e(c.label)})))}if(i.size===1&&a.current.hasEdge(o)&&n.type!=="style"){const l=a.current.getEdgeAttribute(o,"type"),u=a.current.getEdgeAttribute(o,l);s.push(...n.fields.map(c=>({type:c.type,label:e(c.label),value:c.value(u),options:c.options,disabledOptions:c.disabledOptions&&c.disabledOptions(u),validator:c.validator,onChange:d=>{a.current.mergeEdgeAttributes(o,{[l]:c.onChange(d,u)}),r(pn()),r(un(a.current.export()))}})))}if(i.size===1&&a.current.hasEdge(o)&&n.type==="style"){const l=a.current.getEdgeAttribute(o,"style"),u=a.current.getEdgeAttribute(o,l);s.push(...n.fields.filter(c=>c.type!=="custom").map(c=>({type:c.type,label:e(c.label),value:c.value(u),options:c.options,disabledOptions:c.disabledOptions&&c.disabledOptions(u),validator:c.validator,onChange:d=>{a.current.mergeEdgeAttributes(o,{[l]:c.onChange(d,u)}),r(pn()),r(un(a.current.export()))}})),...n.fields.filter(c=>c.type==="custom").map(c=>({...c,label:e(c.label)})))}return f.jsx(ye,{fields:s,minW:276})},z0=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=Qr.color}=i!=null?i:Qr,s=P.useCallback(l=>o(e,l),[e,o]);return f.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[f.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5"}),f.jsx("path",{d:r,fill:"none",stroke:"white",strokeWidth:"1.67"})]})},Qr={color:[le.Beijing,"bj1","#c23a30",ee.white]},F0=[{type:"custom",label:"color",component:f.jsx(ve,{type:D.BjsubwayTram,defaultTheme:Qr.color})}],G0=()=>f.jsx(tr,{fields:F0,type:"style"}),U0={component:z0,defaultAttrs:Qr,attrsComponent:G0,metadata:{displayName:"panel.details.lines.bjsubwayTram.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},W0=n=>{const{id:e,type:r,path:i,styleAttrs:o,handlePointerDown:a}=n,{colorA:s=Wt.colorA,colorB:l=Wt.colorB}=o!=null?o:Wt,u=P.useCallback(m=>a(e,m),[e,a]),[c,d]=P.useState(i),[h,p]=P.useState(i);return P.useEffect(()=>{const m=Cl(i,r,-1.25,1.25);m&&(d(m[0]),p(m[1]))},[i]),f.jsxs("g",{id:e,onPointerDown:u,cursor:"pointer",children:[f.jsx("path",{d:c,fill:"none",stroke:s[2],strokeWidth:"2.5",strokeLinecap:"round"}),f.jsx("path",{d:h,fill:"none",stroke:l[2],strokeWidth:"2.5",strokeLinecap:"round"})]})},Wt={colorA:[le.Shanghai,"maglevA","#008B9A",ee.white],colorB:[le.Shanghai,"maglevB","#F5A74E",ee.white]},V0=()=>{const{t:n}=fe(),e=Ht(),{selected:r}=vi(a=>a.runtime),[i]=r,o=P.useRef(window.graph);return f.jsx(Or,{"aria-label":n("panel.details.lines.dualColor.swap"),icon:f.jsx(h0,{}),size:"sm",onClick:()=>{var l;const a=(l=o.current.getEdgeAttribute(i,D.DualColor))!=null?l:Wt,s=a.colorA;a.colorA=a.colorB,a.colorB=s,o.current.mergeEdgeAttributes(i,{[D.DualColor]:a}),e(pn()),e(un(o.current.export()))}})},H0=n=>{const{t:e}=fe(),r=[{type:"custom",label:e("panel.details.lines.dualColor.swap"),component:f.jsx(V0,{})},{type:"custom",label:e("panel.details.lines.dualColor.colorA"),component:f.jsx(ve,{type:D.DualColor,colorKey:"colorA",defaultTheme:Wt.colorA})},{type:"custom",label:e("panel.details.lines.dualColor.colorB"),component:f.jsx(ve,{type:D.DualColor,colorKey:"colorB",defaultTheme:Wt.colorB})}];return f.jsx(ye,{fields:r})},J0={component:W0,defaultAttrs:Wt,attrsComponent:H0,metadata:{displayName:"panel.details.lines.dualColor.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},K0=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=cn.color,width:s=cn.width}=i!=null?i:cn,l=P.useCallback(u=>o(e,u),[e,o]);return f.jsx("path",{id:e,d:r,fill:"none",stroke:a[2],strokeWidth:s,strokeLinecap:"round",cursor:"pointer",onPointerDown:l})},cn={color:[le.Shanghai,"river","#B9E3F9",ee.white],width:20},q0=[{type:"input",label:"panel.details.lines.river.width",variant:"number",value:n=>(n!=null?n:cn).width,onChange:(n,e)=>{const r=e!=null?e:cn;return r.width=Number(n),r}}],Y0=()=>f.jsx(tr,{fields:q0,type:"style"}),Z0={component:K0,defaultAttrs:cn,attrsComponent:Y0,metadata:{displayName:"panel.details.lines.river.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular,S.Simple]}},Q0=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=Xr.color}=i!=null?i:Xr,s=P.useCallback(l=>o(e,l),[e,o]);return f.jsx("path",{id:e,d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"butt",strokeDasharray:"5 2.5",cursor:"pointer",onPointerDown:s})},Xr={color:[le.Hongkong,"twl","#E2231A",ee.white]},X0=[{type:"custom",label:"color",component:f.jsx(ve,{type:D.MTRRaceDays,defaultTheme:Xr.color})}],e1=()=>f.jsx(tr,{fields:X0,type:"style"}),t1={component:Q0,defaultAttrs:Xr,attrsComponent:e1,metadata:{displayName:"panel.details.lines.mtrRaceDays.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},n1=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=ei.color}=i!=null?i:ei,s=P.useCallback(l=>o(e,l),[e,o]);return f.jsx("path",{id:e,d:r,fill:"none",stroke:a[2],strokeWidth:"2.5",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},ei={color:[le.Hongkong,"lrl","#CD9700",ee.white]},r1=[{type:"custom",label:"color",component:f.jsx(ve,{type:D.MTRLightRail,defaultTheme:ei.color})}],i1=()=>f.jsx(tr,{fields:r1,type:"style"}),o1={component:n1,defaultAttrs:ei,attrsComponent:i1,metadata:{displayName:"panel.details.lines.mtrLightRail.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},a1=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=P.useCallback(a=>i(e,a),[e,i]);return f.jsx("path",{id:e,d:r,fill:"none",stroke:"black",strokeWidth:"1.33",strokeDasharray:"2.66 1.33",cursor:"pointer",onPointerDown:o})},s1={},l1=()=>{},u1={component:a1,defaultAttrs:s1,attrsComponent:l1,metadata:{displayName:"panel.details.lines.mtrUnpaidArea.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular,S.Simple]}},c1=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=P.useCallback(a=>i(e,a),[e,i]);return f.jsx("path",{id:e,d:r,fill:"none",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",cursor:"pointer",onPointerDown:o})},d1={},h1=()=>f.jsx(tr,{fields:[],type:"style"}),p1={component:c1,defaultAttrs:d1,attrsComponent:h1,metadata:{displayName:"panel.details.lines.mtrPaidArea.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular,S.Simple]}},f1=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=ti.color}=i!=null?i:ti,s=P.useCallback(u=>o(e,u),[e,o]),l=Xa("white","var(--chakra-colors-gray-800)");return f.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[f.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeDasharray:"2 2"}),f.jsx("path",{d:r,fill:"none",stroke:l,strokeWidth:"3.4"})]})},ti={color:[le.Beijing,"bj1","#c23a30",ee.white]},g1=n=>{fe();const e=[{type:"custom",label:"color",component:f.jsx(ve,{type:D.BjsubwayDotted,defaultTheme:ti.color})}];return f.jsx(ye,{fields:e})},m1={component:f1,defaultAttrs:ti,attrsComponent:g1,metadata:{displayName:"panel.details.lines.bjsubwayDotted.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},y1=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=ni.color}=i!=null?i:ni,s=P.useCallback(l=>o(e,l),[e,o]);return f.jsx("path",{id:e,d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeDasharray:"0 10",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},ni={color:[le.Singapore,"ewl","#009739",ee.white]},b1=n=>{fe();const e=[{type:"custom",label:"color",component:f.jsx(ve,{type:D.MRTUnderConstruction,defaultTheme:ni.color})}];return f.jsx(ye,{fields:e})},v1={component:y1,defaultAttrs:ni,attrsComponent:b1,metadata:{displayName:"panel.details.lines.mrtUnderConstruction.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},w1=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=P.useCallback(a=>i(e,a),[e,i]);return f.jsx("path",{id:e,d:r,fill:"none",stroke:"black",strokeWidth:"5",strokeDasharray:"0 10 10 10",strokeLinecap:"round",cursor:"pointer",onPointerDown:o})},x1={},S1=n=>null,N1={component:w1,defaultAttrs:x1,attrsComponent:S1,metadata:{displayName:"panel.details.lines.mrtSentosaExpress.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},_1=n=>{const{id:e,path:r,styleAttrs:i,newLine:o,handlePointerDown:a}=n,{color:s=ri.color}=i!=null?i:ri,l=P.useCallback(u=>a(e,u),[e,a]);return f.jsxs("g",{id:e,onPointerDown:l,cursor:"pointer",children:[f.jsx("path",{d:r,fill:"none",stroke:"black",strokeWidth:"5.1"}),f.jsx("path",{d:r,fill:"none",stroke:s[2],strokeWidth:"4.9"})]})},ri={color:[le.Tokyo,"jy","#9ACD32",ee.black]},R1=n=>{const{t:e}=fe(),r=[{type:"custom",label:e("color"),component:f.jsx(ve,{type:D.JREastSingleColor,defaultTheme:ri.color})}];return f.jsx(ye,{fields:r})},k1={component:_1,defaultAttrs:ri,attrsComponent:R1,metadata:{displayName:"panel.details.lines.jrEastSingleColor.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},C1=5,Me=C1*Math.SQRT1_2,so=.25,Sr=(Me*Math.SQRT2-so)/2*Math.SQRT2,A1=n=>{const{id:e,type:r,path:i,styleAttrs:o,newLine:a,handlePointerDown:s}=n,{color:l=ii.color}=o!=null?o:ii,u=P.useCallback(h=>s(e,h),[e,s]),[c,d]=P.useState({outline:i,pA:i,pB:i});return P.useEffect(()=>{const h=Nw(i,r,-2.5,2.5);h&&d(h)},[i]),f.jsxs("g",{id:e,onPointerDown:u,cursor:"pointer",children:[f.jsxs("defs",{children:[f.jsxs("clipPath",{id:"jr_east_fill_pattern_clip_path",patternUnits:"userSpaceOnUse",children:[f.jsx("polygon",{points:"0,0 0,".concat(Sr," ").concat(Sr,",0")}),f.jsx("polygon",{points:"".concat(Me,",").concat(Me," ").concat(Me-Sr,",").concat(Me," ").concat(Me,",").concat(Me-Sr)})]}),f.jsxs("pattern",{id:"jr_east_".concat(e,"_fill_pattern_").concat(l[2]),width:Me,height:Me,patternUnits:"userSpaceOnUse",children:[f.jsx("rect",{width:Me,height:Me,fill:l[2]}),f.jsx("line",{x1:"0",y1:"0",x2:Me,y2:Me,stroke:"white",strokeWidth:so,strokeOpacity:"50%",clipPath:"url(#jr_east_fill_pattern_clip_path)"}),f.jsx("line",{x1:Me,y1:"0",x2:"0",y2:Me,stroke:"white",strokeWidth:so,strokeOpacity:"50%"})]})]}),f.jsx("path",{d:c.outline,fill:"url(#jr_east_".concat(e,"_fill_pattern_").concat(l[2],")")}),f.jsx("path",{d:c.pA,fill:"none",stroke:"black",strokeWidth:"0.1"}),f.jsx("path",{d:c.pB,fill:"none",stroke:"black",strokeWidth:"0.1"})]})},ii={color:[le.Tokyo,"jy","#9ACD32",ee.black]},T1=n=>{const{t:e}=fe(),r=[{type:"custom",label:e("color"),component:f.jsx(ve,{type:D.JREastSingleColorPattern,defaultTheme:ii.color})}];return f.jsx(ye,{fields:r})},E1={component:A1,defaultAttrs:ii,attrsComponent:T1,metadata:{displayName:"panel.details.lines.jrEastSingleColorPattern.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},L1=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=oi.color}=i!=null?i:oi,s=P.useCallback(l=>o(e,l),[e,o]);return f.jsx("path",{id:e,d:r,fill:"none",stroke:a[2],strokeWidth:"2.157",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},oi={color:[le.Singapore,"lrt","#708573",ee.white]},O1=n=>{const e=[{type:"custom",label:"color",component:f.jsx(ve,{type:D.LRTSingleColor,defaultTheme:oi.color})}];return f.jsx(ye,{fields:e})},j1={component:L1,defaultAttrs:oi,attrsComponent:O1,metadata:{displayName:"panel.details.lines.lrtSingleColor.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},M1=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=P.useCallback(a=>i(e,a),[e,i]);return f.jsx("g",{id:"".concat(e,".pre"),onPointerDown:o,cursor:"pointer",children:f.jsx("path",{d:r,fill:"none",stroke:"black",strokeWidth:"7.5",strokeLinecap:"round"})})},P1=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=P.useCallback(a=>i(e,a),[e,i]);return f.jsx("g",{id:e,onPointerDown:o,cursor:"pointer",children:f.jsx("path",{d:r,fill:"none",stroke:"white",strokeWidth:"2.5",strokeLinecap:"round"})})},$1={},I1=()=>{},D1={component:P1,preComponent:M1,defaultAttrs:$1,attrsComponent:I1,metadata:{displayName:"panel.details.lines.londonTubeInternalInt.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},B1=n=>{const{id:e,path:r,handlePointerDown:i}=n,o=P.useCallback(a=>i(e,a),[e,i]);return f.jsx("path",{d:r,fill:"none",stroke:"black",strokeWidth:"5",strokeDasharray:"5 2.5",cursor:"pointer",onPointerDown:o})},z1={},F1=()=>{},G1={component:B1,defaultAttrs:z1,attrsComponent:F1,metadata:{displayName:"panel.details.lines.londonTube10MinWalk.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},U1=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=ai.color}=i!=null?i:ai,s=P.useCallback(l=>o(e,l),[e,o]);return f.jsx("path",{id:e,d:r,fill:"none",stroke:a[2],strokeWidth:"5",cursor:"pointer",onPointerDown:s})},ai={color:[le.London,"central","#DC241F",ee.white]},W1=n=>{const{t:e}=fe(),r=[{type:"custom",label:e("color"),component:f.jsx(ve,{type:D.LondonTubeTerminal,defaultTheme:ai.color})}];return f.jsx(ye,{fields:r})},V1={component:U1,defaultAttrs:ai,attrsComponent:W1,metadata:{displayName:"panel.details.lines.londonTubeTerminal.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},H1=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{colorBackground:a=Gt.colorBackground,colorForeground:s=Gt.colorForeground,limitedService:l=Gt.limitedService}=i!=null?i:Gt,u=P.useCallback(c=>o(e,c),[e,o]);return l?f.jsxs("g",{id:e,onPointerDown:u,cursor:"pointer",children:[f.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),f.jsx("path",{d:r,fill:"none",stroke:s[2],strokeWidth:"4.25",strokeLinecap:"round"}),f.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"2",strokeDasharray:"7 3"})]}):f.jsxs("g",{id:e,onPointerDown:u,cursor:"pointer",children:[f.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),f.jsx("path",{d:r,fill:"none",stroke:s[2],strokeWidth:"2",strokeDasharray:"7 3"})]})},Gt={colorBackground:[le.London,"thameslink","#d28db0",ee.white],colorForeground:[le.London,"white","#ffffff",ee.black],limitedService:!1},J1=n=>{const{id:e,attrs:r,handleAttrsUpdate:i}=n,{t:o}=fe(),a=[{type:"switch",label:o("panel.details.lines.londonRail.limitedService"),oneLine:!0,isChecked:r.limitedService,onChange:s=>{r.limitedService=s,i(e,r)},minW:"full"},{type:"custom",label:o("panel.details.lines.londonRail.colorBackground"),component:f.jsx(ve,{type:D.LondonRail,colorKey:"colorBackground",defaultTheme:Gt.colorBackground})},{type:"custom",label:o("panel.details.lines.londonRail.colorForeground"),component:f.jsx(ve,{type:D.LondonRail,colorKey:"colorForeground",defaultTheme:Gt.colorForeground})}];return f.jsx(ye,{fields:a})},K1={component:H1,defaultAttrs:Gt,attrsComponent:J1,metadata:{displayName:"panel.details.lines.londonRail.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},q1=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=fn.color}=i!=null?i:fn,s=P.useCallback(l=>o(e,l),[e,o]);return f.jsx("g",{id:"".concat(e,".pre"),onPointerDown:s,cursor:"pointer",children:f.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5"})})},Y1=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=fn.color}=i!=null?i:fn,s=P.useCallback(l=>o(e,l),[e,o]);return f.jsx("g",{id:e,onPointerDown:s,cursor:"pointer",children:f.jsx("path",{d:r,fill:"none",stroke:a[3],strokeWidth:"1.67",strokeLinecap:"round"})})},fn={color:[le.London,"elizabeth","#9364cc",ee.white]},Z1=n=>{const{t:e}=fe(),r=[{type:"custom",label:e("color"),component:f.jsx(ve,{type:D.LondonSandwich,defaultTheme:fn.color})}];return f.jsx(ye,{fields:r})},Q1={component:Y1,preComponent:q1,defaultAttrs:fn,attrsComponent:Z1,metadata:{displayName:"panel.details.lines.londonSandwich.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},X1=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=si.color}=i!=null?i:si,s=P.useCallback(l=>o(e,l),[e,o]);return f.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[f.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),f.jsx("path",{d:r,fill:"none",stroke:a[3],strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"0.001 6"})]})},si={color:[le.London,"rail","#d6ae00",ee.white]},ex=n=>{const{t:e}=fe(),r=[{type:"custom",label:e("color"),component:f.jsx(ve,{type:D.LondonLutonAirportDART,defaultTheme:si.color})}];return f.jsx(ye,{fields:r})},tx={component:X1,defaultAttrs:si,attrsComponent:ex,metadata:{displayName:"panel.details.lines.londonLutonAirportDART.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},nx=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=li.color}=i!=null?i:li,s=P.useCallback(l=>o(e,l),[e,o]);return f.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[f.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5"}),f.jsx("path",{d:r,fill:"none",stroke:"white",strokeWidth:"3"}),f.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"1"})]})},li={color:[le.London,"dangleway","#dc241f",ee.white]},rx=n=>{const{t:e}=fe(),r=[{type:"custom",label:e("color"),component:f.jsx(ve,{type:D.LondonIFSCloudCableCar,defaultTheme:li.color})}];return f.jsx(ye,{fields:r})},ix={component:nx,defaultAttrs:li,attrsComponent:rx,metadata:{displayName:"panel.details.lines.londonIFSCloudCableCar.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},ox=n=>{const{id:e,path:r,styleAttrs:i,handlePointerDown:o}=n,{color:a=lo.color}=i!=null?i:lo,s=P.useCallback(l=>o(e,l),[e,o]);return f.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[f.jsx("path",{d:r,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),f.jsx("path",{d:r,fill:"none",stroke:a[3],strokeWidth:"2.5",strokeDasharray:"7.5"})]})},lo={color:[le.Guangzhou,"ir","#2559a8",ee.white]},ax=()=>{},sx={component:ox,defaultAttrs:lo,attrsComponent:ax,metadata:{displayName:"panel.details.lines.guangdongIntercityRailway.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},Fl={[S.Diagonal]:t0,[S.Perpendicular]:o0,[S.RotatePerpendicular]:u0,[S.Simple]:By},lx={[D.SingleColor]:m0,[D.ShmetroVirtualInt]:w0,[D.ShanghaiSuburbanRailway]:_0,[D.GzmtrVirtualInt]:A0,[D.GZMTRLoop]:j0,[D.ChinaRailway]:$0,[D.BjsubwaySingleColor]:B0,[D.BjsubwayTram]:U0,[D.BjsubwayDotted]:m1,[D.DualColor]:J0,[D.River]:Z0,[D.MTRRaceDays]:t1,[D.MTRLightRail]:o1,[D.MTRUnpaidArea]:u1,[D.MTRPaidArea]:p1,[D.MRTUnderConstruction]:v1,[D.MRTSentosaExpress]:N1,[D.JREastSingleColor]:k1,[D.JREastSingleColorPattern]:E1,[D.LRTSingleColor]:j1,[D.LondonTubeTerminal]:V1,[D.LondonTubeInternalInt]:D1,[D.LondonTube10MinWalk]:G1,[D.LondonRail]:K1,[D.LondonSandwich]:Q1,[D.LondonLutonAirportDART]:tx,[D.LondonIFSCloudCableCar]:ix,[D.GuangdongIntercityRailway]:sx},ux=43,Fa=async()=>JSON.stringify((await bn(async()=>{const{default:n}=await import("./tutorial-B9Su1GrM.js");return{default:n}},[])).default),cx=async n=>{let e=!1;n||(n=await Fa(),e=!0);let r=JSON.parse(n);(!("version"in r)||!Number.isInteger(r.version))&&(r=JSON.parse(await Fa()),e=!0);let i=Number(r.version),o=JSON.stringify(r);for(;i in Ga;)o=Ga[i](o),i=Number(JSON.parse(o).version),e=!0;return e&&(console.warn("Upgrade save from version: ".concat(r.version," to version: ").concat(i)),localStorage.setItem(Ue.PARAM_BACKUP,n)),o},dx=n=>{const{present:e,past:r,future:i,...o}=n,a={...o,graph:e,version:ux};return JSON.stringify(a)},Ga={0:n=>{var e;return JSON.stringify({version:1,graph:(e=JSON.parse(n))==null?void 0:e.graph,svgViewBoxZoom:100,svgViewBoxMin:{x:0,y:0}})},1:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("stn")&&o.type!==Z.GzmtrInt).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a&&"transfer"in a&&delete a.transfer,r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:2,graph:r.export()})},2:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("stn")).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);(a==null?void 0:a.nameOffsetX)==="middle"&&(a==null?void 0:a.nameOffsetY)==="middle"&&(a.nameOffsetX="right",a.nameOffsetY="top"),(a==null?void 0:a.nameOffsetY)==="up"&&(a.nameOffsetY="top"),r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:3,graph:r.export()})},3:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterEdges((i,o,a,s,l,u,c)=>i.startsWith("line")).forEach(i=>{const o=r.getEdgeAttribute(i,"color");r.removeEdgeAttribute(i,"color"),r.mergeEdgeAttributes(i,{style:D.SingleColor,[D.SingleColor]:{color:o}})}),r.filterEdges((i,o,a,s,l,u,c)=>i.startsWith("misc_edge")).forEach(i=>{const o="line_".concat(Py(10)),[a,s]=r.extremities(i),l=r.getEdgeAttribute(i,"type"),u=l;r.addDirectedEdgeWithKey(o,a,s,{visible:!0,zIndex:0,type:S.Simple,[l]:structuredClone(Fl[S.Simple].defaultAttrs),style:u,[u]:structuredClone(lx[u].defaultAttrs),reconcileId:""}),r.dropEdge(i)}),JSON.stringify({...e,version:4,graph:r.export()})},4:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("stn")&&(o.type===Z.GzmtrBasic||o.type===Z.GzmtrInt)).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.open=!0,a.secondaryNames=["",""],r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:5,graph:r.export()})},5:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterEdges((i,o,a,s,l,u,c)=>i.startsWith("line")&&o.type===S.Simple).forEach(i=>{var a;const o=(a=r.getEdgeAttribute(i,S.Simple))!=null?a:{offset:0};o.offset=0,r.mergeEdgeAttributes(i,{[S.Simple]:o})}),JSON.stringify({...e,version:6,graph:r.export()})},6:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("stn")&&o.type===Z.GzmtrBasic).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.tram=!1,r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:7,graph:r.export()})},7:n=>JSON.stringify({...JSON.parse(n),version:8}),8:n=>JSON.stringify({...JSON.parse(n),version:9}),9:n=>JSON.stringify({...JSON.parse(n),version:10}),10:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===st.Text).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.color=[le.Shanghai,"jsr","#000000",ee.white],r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:11,graph:r.export()})},11:n=>JSON.stringify({...JSON.parse(n),version:12}),12:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===st.Text).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.rotate=0,a.italic=!1,r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:13,graph:r.export()})},13:n=>JSON.stringify({...JSON.parse(n),version:14}),14:n=>JSON.stringify({...JSON.parse(n),version:15}),15:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===st.Text).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.italic=a.italic?"italic":"normal",a.bold="normal",r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:16,graph:r.export()})},16:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===st.Facilities).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);let s=0;switch(a.type){case"airport":case"maglev":case"disney":case"railway":s+=25/2;break;case"hsr":case"airport_hk":case"disney_hk":s+=19/2;break}r.updateNodeAttribute(i,"y",l=>(l!=null?l:0)+s)}),JSON.stringify({...e,version:17,graph:r.export()})},17:n=>JSON.stringify({...JSON.parse(n),version:18}),18:n=>JSON.stringify({...JSON.parse(n),version:19}),19:n=>JSON.stringify({...JSON.parse(n),version:20}),20:n=>JSON.stringify({...JSON.parse(n),version:21}),21:n=>JSON.stringify({...JSON.parse(n),version:22}),22:n=>JSON.stringify({...JSON.parse(n),version:23}),23:n=>JSON.stringify({...JSON.parse(n),version:24}),24:n=>{const e=JSON.parse(n),r=new pe;return r.import(e.graph),r.filterNodes((i,o)=>i.startsWith("stn")&&o.type===Z.GzmtrInt||i.startsWith("misc_node")&&o.type===st.GzmtrLineBadge).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.tram=!1,r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:25,graph:r.export()})},25:n=>JSON.stringify({...JSON.parse(n),version:26}),26:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===st.GzmtrLineBadge).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.span=!0,r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:27,graph:r.export()})},27:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("stn")&&o.type===Z.GzmtrInt).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);for(let s=0;sJSON.stringify({...JSON.parse(n),version:29}),29:n=>JSON.stringify({...JSON.parse(n),version:30}),30:n=>JSON.stringify({...JSON.parse(n),version:31}),31:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterEdges((i,o)=>o.style===D.ChinaRailway).forEach(i=>{const o=r.getEdgeAttributes(i)[D.ChinaRailway];r.mergeEdgeAttributes(i,{[D.ChinaRailway]:{...o,color:[le.Shanghai,"jsr","#000000",ee.white]}})}),JSON.stringify({...e,version:32,graph:r.export()})},32:n=>JSON.stringify({...JSON.parse(n),version:33}),33:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.forEachDirectedEdge(i=>{r.setEdgeAttribute(i,"parallelIndex",-1),r.updateEdgeAttribute(i,"zIndex",o=>Math.max(-10,(o!=null?o:0)-5))}),r.forEachNode(i=>{r.updateNodeAttribute(i,"zIndex",o=>Math.min(10,(o!=null?o:0)+5))}),JSON.stringify({...e,version:34,graph:r.export()})},34:n=>JSON.stringify({...JSON.parse(n),version:35}),35:n=>JSON.stringify({...JSON.parse(n),version:36}),36:n=>JSON.stringify({...JSON.parse(n),version:37}),37:n=>JSON.stringify({...JSON.parse(n),version:38}),38:n=>JSON.stringify({...JSON.parse(n),version:39}),39:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===st.Facilities).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.type==="qingdao_airport"?a.type="airport_qingdao":a.type==="qingdao_coach_station"?a.type="coach_station_qingdao":a.type==="qingdao_cruise_terminal"?a.type="cruise_terminal_qingdao":a.type==="qingdao_railway"?a.type="railway_qingdao":a.type==="qingdao_tram"&&(a.type="tram_qingdao"),r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:40,graph:r.export()})},40:n=>JSON.stringify({...JSON.parse(n),version:41}),41:n=>{const e=JSON.parse(n),r=new pe;r.import(e==null?void 0:e.graph);const i=o=>o.map(a=>a.replaceAll("\\","\n"));return r.forEachNode((o,a)=>{const s=r.getNodeAttribute(o,"type");let l;(s===Z.BjsubwayBasic||s===Z.BjsubwayInt||s===Z.FoshanMetroBasic||s===Z.GuangdongIntercityRailway||s===Z.GzmtrBasic||s===Z.GzmtrInt||s===Z.JREastBasic||s===Z.JREastImportant||s===Z.KunmingRTBasic||s===Z.KunmingRTInt||s===Z.MRTBasic||s===Z.MRTInt||s===Z.MTR||s===Z.ShanghaiSuburbanRailway||s===Z.ShmetroBasic2020||s===Z.ShmetroBasic||s===Z.ShmetroInt||s===Z.ShmetroOutOfSystemInt||s===Z.SuzhouRTBasic||s===Z.SuzhouRTInt||s===Z.TokyoMetroBasic||s===Z.TokyoMetroInt)&&(l=i(a[s].names)),l&&(a[s].names=l,r.mergeNodeAttributes(o,a))}),JSON.stringify({...e,version:42,graph:r.export()})},42:n=>{const e=JSON.parse(n),r=new pe;return r.import(e==null?void 0:e.graph),r.filterNodes((i,o)=>i.startsWith("stn")&&o.type===Z.GzmtrInt2024).forEach(i=>{const o=r.getNodeAttribute(i,"type"),a=r.getNodeAttribute(i,o);a.columns=2,a.topHeavy=!1,a.osiPosition="none",a.preferVertical&&a.transfer.flat().length===2&&(a.columns=1),delete a.preferVertical,r.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:43,graph:r.export()})}};Kc();const hx=Wc({account:Ny,app:Iw,param:Fw,runtime:Yw}),px=(n={})=>Vc({reducer:hx,middleware:e=>e({serializableCheck:!1}),preloadedState:n}),xe=px();xe.subscribe(async()=>{await Ey(xe.getState().param.present),localStorage.setItem(Ue.PARAM,dx(xe.getState().param)),localStorage.setItem(Ue.APP,JSON.stringify(xe.getState().app)),localStorage.setItem(Ue.LOGIN_STATE,JSON.stringify(xe.getState().account))});const Ht=()=>Hc(),vi=Jc,fx=P.lazy(()=>bn(()=>import("./page-header-BpUv6R7o.js"),__vite__mapDeps([0,1,2,3,4]))),gx=P.lazy(()=>bn(()=>import("./tools-DZ01x_ln.js"),__vite__mapDeps([5,1,2,6,3]))),mx=P.lazy(()=>bn(()=>import("./svg-wrapper-Xiw4OObF.js"),__vite__mapDeps([7,1,2,3,8,6]))),yx=P.lazy(()=>bn(()=>import("./details-Dqiw1DIF.js"),__vite__mapDeps([9,1,2,8,3,4,5,6]))),bx=P.lazy(()=>bn(()=>import("./rmg-palette-app-clip-BKLlM3Ws.js"),__vite__mapDeps([10,1,2])));function vx(){const n=Ht(),{paletteAppClip:{input:e}}=vi(u=>u.runtime),{t:r}=fe(),[i,o]=P.useState(!1);P.useEffect(()=>{Ge.isStandaloneWindow()&&!window.localStorage.getItem(Ue.DO_NOT_SHOW_RMT_MSG)&&o(!0)},[]);const a=new Date,s="".concat(a.getFullYear()).concat(String(a.getMonth()+1).padStart(2,"0"),"01"),l="".concat(String(a.getFullYear()).slice(-2),".").concat(a.getMonth()+1,".1");return f.jsx(gy,{children:f.jsx(zm,{children:f.jsxs(P.Suspense,{fallback:f.jsxs(f.Fragment,{children:[f.jsx("p",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:"Rail Map Toolkit protocol... checked"}),f.jsxs("p",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",fontSize:"small",color:"gray"},children:["Seeing this page for too long? Try another mirror"," ",f.jsx("a",{href:"https://railmapgen.github.io/?app=rmp",target:"_blank",rel:"noreferrer",children:"GitHub"})," ",f.jsx("a",{href:"https://railmapgen.gitlab.io/?app=rmp",target:"_blank",rel:"noreferrer",children:"Gitlab"})," ","or the"," ",f.jsx("a",{href:"https://github.com/railmapgen/railmapgen.github.io/releases",target:"_blank",rel:"noreferrer",children:"offline application"})," ",".",f.jsx("br",{}),f.jsx("br",{}),"Offline applications also available via ghfast.top"," ",f.jsx("a",{href:"https://ghfast.top/https://github.com/railmapgen/railmapgen.github.io/releases/download/tauri-".concat(s,"/railmapgen_").concat(l,"_x64-setup.exe"),children:"Windows"})," ",f.jsx("a",{href:"https://ghfast.top/https://github.com/railmapgen/railmapgen.github.io/releases/download/tauri-".concat(s,"/railmapgen_").concat(l,"_aarch64.dmg"),children:"MacOS"})," ",f.jsx("a",{href:"https://ghfast.top/https://github.com/railmapgen/railmapgen.github.io/releases/download/tauri-".concat(s,"/railmapgen_").concat(l,"_amd64.deb"),children:"Linux"})," ","if you are blocked by GFW :)"]})]}),children:[f.jsx(fx,{}),i&&f.jsxs(uo,{status:"info",variant:"solid",size:"xs",pl:3,pr:1,py:1,zIndex:"1",children:[f.jsx(co,{}),f.jsxs(At,{children:[f.jsx(Fn,{href:"/?app=rmp",isExternal:!0,fontWeight:"bold",children:r("rmtPromotion")})," ",f.jsx(Fn,{as:"button",ml:"auto",textDecoration:"underline",onClick:()=>o(!1),children:r("close")})," | ",f.jsx(Fn,{as:"button",textDecoration:"underline",onClick:()=>{o(!1),window.localStorage.setItem(Ue.DO_NOT_SHOW_RMT_MSG,"true")},children:r("noShowAgain")})]})]}),f.jsx(Em,{allowReset:!0,children:f.jsxs(ut,{direction:"row",height:"100%",overflow:"hidden",sx:{position:"relative"},children:[f.jsx(gx,{}),f.jsx(mx,{}),f.jsx(yx,{})]})}),f.jsx(bx,{isOpen:!!e,onClose:()=>n(Kw()),defaultTheme:e,onSelect:u=>n(qw(u))})]})})})}const wx=()=>{Ks(document.getElementById("root")).render(f.jsx(P.StrictMode,{children:f.jsx(qc,{store:xe,children:f.jsx(Yc,{i18n:Qn,children:f.jsx(vx,{})})})}))};var Ua;const Nr=JSON.parse((Ua=localStorage.getItem(Ue.LOGIN_STATE))!=null?Ua:"{}");var Wa;const je=JSON.parse((Wa=localStorage.getItem(Ue.APP))!=null?Wa:"{}"),xx=localStorage.getItem(Ue.PARAM);"telemetry"in je&&("app"in je.telemetry&&xe.dispatch(Ow(je.telemetry.app)),"project"in je.telemetry&&xe.dispatch(jw(je.telemetry.project))),"preference"in je&&("unlockSimplePathAttempts"in je.preference&&xe.dispatch(Mw(je.preference.unlockSimplePathAttempts)),"toolsPanel"in je.preference&&"expand"in je.preference.toolsPanel&&xe.dispatch(Pw(je.preference.toolsPanel.expand)),"autoParallel"in je.preference&&xe.dispatch(jl(je.preference.autoParallel)),"randomStationsNames"in je.preference&&xe.dispatch($w(je.preference.randomStationsNames))),"state"in Nr&&xe.dispatch(Kn(Nr.state)),"activeSubscriptions"in Nr&&xe.dispatch(Vr(Nr.activeSubscriptions));cx(xx).then(n=>{const{version:e,graph:r,...i}=JSON.parse(n);window.graph=pe.from(r);const o={...i,present:r,past:[],future:[]};xe.dispatch(zw(o)),xe.dispatch(Jr()),xe.dispatch(pn()),wx(),Ge.injectUITools(),jy(xe),Da(),window.setInterval(()=>Da(),15*60*1e3)});export{Tw as $,eS as A,Rl as B,le as C,jS as D,vy as E,gS as F,LS as G,GS as H,Fa as I,Ty as J,Ue as K,Kx as L,ee as M,jt as N,yS as O,Om as P,Cx as Q,jx as R,Z as S,Io as T,Fx as U,p0 as V,Jw as W,Mw as X,Bx as Y,FS as Z,Da as _,Sx as __vite_legacy_guard,OS as a,pS as a$,Aw as a0,aS as a1,jl as a2,wy as a3,SS as a4,DS as a5,PS as a6,IS as a7,$S as a8,Vx as a9,tS as aA,Gx as aB,m0 as aC,zy as aD,Ax as aE,RS as aF,Mm as aG,Mx as aH,Px as aI,$x as aJ,Ix as aK,cS as aL,sS as aM,zS as aN,BS as aO,hS as aP,Pw as aQ,tr as aR,ve as aS,qx as aT,Qn as aU,yy as aV,by as aW,dS as aX,Tx as aY,NS as aZ,_S as a_,jw as aa,$w as ab,wS as ac,xS as ad,Lt as ae,Ox as af,Ex as ag,ES as ah,kS as ai,vS as aj,bS as ak,fS as al,Ml as am,Pl as an,uS as ao,lS as ap,Dx as aq,Po as ar,Yx as as,Zx as at,lx as au,st as av,oS as aw,zx as ax,iS as ay,nS as az,mS as b,CS as b0,gm as b1,Dm as b2,Hx as b3,Jx as b4,Ht as c,vi as d,Ux as e,TS as f,AS as g,MS as h,ye as i,Do as j,S as k,Fl as l,Qx as m,Py as n,D as o,Wx as p,Jr as q,Ge as r,dx as s,pn as t,Lx as u,un as v,kx as w,cx as x,rS as y,Xx as z}; diff --git a/assets/index-CsgTWcmq.js b/assets/index-CsgTWcmq.js new file mode 100644 index 00000000..a35eb9e7 --- /dev/null +++ b/assets/index-CsgTWcmq.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/page-header-DH4nmP-r.js","assets/chakra-BF_mGyXb.js","assets/react-0YWW4C_I.js","assets/master-manager-DW7JCfNm.js","assets/change-type-modal-Cu7YVLn7.js","assets/tools-D91kC9Kf.js","assets/misc-nodes-DWMfnp13.js","assets/svg-wrapper-DsHbu_ep.js","assets/clipboard-Bcs6EvZd.js","assets/details-BjKL7_V5.js","assets/rmg-palette-app-clip-D4KwJcU-.js"])))=>i.map(i=>d[i]); +import{u as Pe,a as Oa,j as f,P as Ma,c as Rn,F as Pa,f as ut,W as ro,T as ja,b as $a,d as Ia,e as io,g as rn,h as ke,B as oo,D as yi,i as Da,k as za,l as Ba,m as ao,C as Fa,S as so,n as Ga,o as Ua,p as Va,I as Wa,q as lo,r as Ha,s as Ja,t as St,v as Ka,w as qa,x as uo,y as Ya,z as Za,A as Qa,E as Xa,G as es,M as ts,H as ns,J as rs,K as is,L as os,N as Ze,O as as,Q as co,R as Ht,U as Br,V as Fr,X as ss,Y as ls,Z as us,_ as cs,$ as ds,a0 as hs,a1 as ps,a2 as Cn,a3 as fs,a4 as gs,a5 as ms,a6 as ys,a7 as bs,a8 as ws,a9 as Wt,aa as vs,ab as xs,ac as Ss,ad as Ns,ae as Rs,af as F}from"./chakra-BF_mGyXb.js";import{e as Cs,a as O,b as j,f as er,u as X,i as As,h as ho,o as bi,j as po,k as _s,l as Ls,m as Es,n as Ts,p as ks,P as Os,I as Ms}from"./react-0YWW4C_I.js";function Mb(){import.meta.url,import("_").catch(()=>1),async function*(){}().next()}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();var Ps=function(r,e,n,i){function o(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function l(d){try{c(i.next(d))}catch(h){s(h)}}function u(d){try{c(i.throw(d))}catch(h){s(h)}}function c(d){d.done?a(d.value):o(d.value).then(l,u)}c((i=i.apply(r,e||[])).next())})};const fo=r=>new Promise(e=>{setTimeout(e,r,"Timeout after ".concat(r/1e3," seconds"))}),js=r=>new Promise(e=>{const n=new FileReader;n.onloadend=()=>e(n.result),n.readAsDataURL(r)}),$s=r=>{let e,n=!1;return i=>Ps(void 0,void 0,void 0,function*(){return e&&(n||!i)?e:(e=r(),n=!0,e.then(o=>(n=!1,o)).catch(o=>{throw e=null,o}))})},Gr=r=>{let e=0;for(let n=0;n{const e=(r&16777215).toString(16).toUpperCase();return"#"+"00000".substring(0,6-e.length)+e};var Xe;(function(r){r.DEV="DEV",r.UAT="UAT",r.PRD="PRD"})(Xe||(Xe={}));const go="rmg-runtime__language",mo="rmg-runtime__colourMode",An="rmg-runtime__allowAnalytics",on="rmg-unknown",Is="railmapgen.github.io",Ds="rmg-home";let _n=on,yo=Ur(Gr(on));const zs=r=>{_n=r,yo=Ur(Gr(r))},sn=()=>"[".concat(_n,"]"),ln=()=>yo,ze=(r,e,n)=>(...i)=>{typeof i[0]=="string"?r("%c".concat(e(),"%c ").concat(i[0]),"color: ".concat(n()),"",...i.slice(1)):r("%c".concat(e(),"%c"),"color: ".concat(n()),"",...i)},Bs={debug:ze(console.debug,sn,ln),info:ze(console.info,sn,ln),warn:ze(console.warn,sn,ln),error:ze(console.error,sn,ln)},Pt=()=>_n===on?"[runtime]":"[runtime@".concat(_n,"]"),Fs=Ur(Gr("runtime")),jt=()=>Fs,te={setup:zs,logger:Bs,debug:ze(console.debug,Pt,jt),info:ze(console.info,Pt,jt),warn:ze(console.warn,Pt,jt),error:ze(console.error,Pt,jt),group:ze(console.group,Pt,jt),groupEnd:console.groupEnd};var bo=function(r,e,n,i){function o(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function l(d){try{c(i.next(d))}catch(h){s(h)}}function u(d){try{c(i.throw(d))}catch(h){s(h)}}function c(d){d.done?a(d.value):o(d.value).then(l,u)}c((i=i.apply(r,e||[])).next())})};let Vr,tr,Wr,Hr,Jr;const wo=()=>{Vr=!1,tr=on,Wr="unknown",Hr=Xe.PRD,Jr="unknown"},Gs=()=>bo(void 0,void 0,void 0,function*(){const r=window.location.pathname.split("/")[1],e=r?"/".concat(r,"/info.json"):"/info.json",n=yield fetch(e);if(n.ok){const i=yield n.json();te.info("Received info.json",i),tr=i.component,Wr=i.version,Hr=i.environment,Jr=i.instance}else throw new Error("Failed to fetch config from ".concat(e))}),Us=()=>bo(void 0,void 0,void 0,function*(){try{te.group("Loading config...");const r=yield Promise.race([Gs(),fo(10*1e3)]);r?te.error("❌ Failed to load config.",r):(Vr=!0,te.info("✅ Config loaded!"))}catch(r){te.error("❌ Failed to load config.",r)}finally{te.groupEnd()}}),Vs=()=>Vr,Ws=()=>vo()?Ds:tr,Hs=()=>Wr,Js=()=>Hr,Ks=()=>Jr,vo=()=>tr===Is;wo();const pe={loadWithTimeout:Us,isInitialised:Vs,getComponent:Ws,getVersion:Hs,getEnvironment:Js,getInstance:Ks,isRMT:vo,_resetConfig:wo};window.dataLayer=window.dataLayer||[];const qs=()=>{const r=document.createElement("script");r.async=!0,r.src="https://www.googletagmanager.com/gtag/js?id=G-2HP8Y4MRRQ",document.head.append(r)};function Cr(...r){if(pe.getEnvironment()!==Xe.DEV)return window.dataLayer.push(arguments);te.info("Not going to send event in DEV environment",r)}const Ys=(r,e={})=>{Cr("event",r,e)},Zs=()=>{qs(),Cr("js",new Date),Cr("config","G-2HP8Y4MRRQ",{appName:pe.getComponent(),version:pe.getVersion(),environment:pe.getEnvironment(),instance:pe.getInstance()})},Ln={init:Zs,customEvent:Ys},Qs="rmg-runtime-channel",vn={};let Jt;try{Jt=new BroadcastChannel(Qs),Jt.onmessage=r=>{var e;const{event:n,data:i,frameId:o}=r.data;(e=vn[n])===null||e===void 0||e.forEach(a=>a(i,o))}}catch(r){te.warn("Failed to initiate broadcast channel. Some features may be unavailable.",r)}const Xs=(r,e)=>{var n;te.debug("Broadcasting event ".concat(r," with data"),e),Jt==null||Jt.postMessage({event:r,data:e,frameId:(n=window.frameElement)===null||n===void 0?void 0:n.id})},el=(r,e)=>{var n;r in vn?(n=vn[r])===null||n===void 0||n.push(e):vn[r]=[e]},le={postEvent:Xs,onMessage:el},xo="TOGGLE_NAV_MENU",So="OPEN_APP",No="CLOSE_APP",Ro="UPDATE_APP_METADATA",Co="UPDATE_URL",xn=()=>!window.frameElement,tl=()=>{var r;return!!(!((r=window.frameElement)===null||r===void 0)&&r.closest(".show-menu"))},nl=()=>{if(!xn()){const e=document.createElement("style");e.textContent="body{padding: 0;}",document.head.appendChild(e)}const r=document.createElement("style");r.textContent=".rmg-window__header:not(.rmg-window__app-clip-header){margin-left: 40px;}",!xn()&&!tl()&&document.head.appendChild(r),xn()||le.onMessage(xo,e=>{if(e)try{document.head.removeChild(r)}catch(n){te.warn("Unable to remove indent style from RmgWindowHeader",n)}else document.head.appendChild(r)})},rl=r=>{le.postEvent(So,r)},il=r=>{le.postEvent(No,r)},ol=r=>{le.postEvent(Ro,r)},al=r=>{le.postEvent(Co,r)},sl=r=>{le.onMessage(So,r)},ll=r=>{le.onMessage(No,r)},ul=r=>{le.onMessage(Ro,r)},cl=r=>{le.onMessage(Co,r)},dl=r=>{le.postEvent(xo,r)},Re={isStandaloneWindow:xn,injectUITools:nl,openApp:rl,onAppOpen:sl,closeApp:il,onAppClose:ll,updateAppMetadata:ol,onAppMetadataUpdate:ul,updateUrl:al,onUrlUpdate:cl,toggleNavMenu:dl},Ao="SET_LANGUAGE",_o="SET_COLOUR_MODE",hl=r=>{le.postEvent(Ao,r),window.localStorage.setItem(go,r)},pl=()=>window.localStorage.getItem(go)||"en",fl=r=>{le.onMessage(Ao,r)},Lo=["light","dark","system"],gl=r=>{Lo.includes(r)&&(le.postEvent(_o,r),window.localStorage.setItem(mo,r))},ml=r=>!!(r&&Lo.includes(r)),yl=()=>{const r=window.localStorage.getItem(mo);return ml(r)?r:"system"},bl=r=>{le.onMessage(_o,r)},wl=()=>window.localStorage.getItem(An)!==null,Eo=()=>window.localStorage.getItem(An)==="true",vl=r=>{const e=Eo();return r?(e||(window.localStorage.setItem(An,r.toString()),Ln.init()),{refreshRequired:!1}):e?(window.localStorage.setItem(An,r.toString()),{refreshRequired:!0}):{refreshRequired:!1}},Ae={setLanguage:hl,getLanguage:pl,onLanguageChange:fl,setColourMode:gl,getColourMode:yl,onColourModeChange:bl,isAnalyticsQADone:wl,isAllowAnalytics:Eo,allowAnalytics:vl},xl=new Date().getTime();function Sl(){const r=pe.getComponent(),e=window.localStorage.getItem(r+"__startTime");return e===null?new Date().getTime()-xl:new Date().getTime()-Number(e)}const Nl={getMsSinceStartUp:Sl},Sn={},At=()=>{const r=pe.getComponent();if(r===on)throw new Error("Unable to clear storage for unknown app");return r};window.addEventListener("storage",r=>{var e;const{key:n,newValue:i}=r;n&&((e=Sn[n])===null||e===void 0||e.forEach(o=>o(i)))});const Rl=(r,e)=>{var n;const i="".concat(At(),"__").concat(r);i in Sn?(n=Sn[i])===null||n===void 0||n.push(e):Sn[i]=[e]},Cl=r=>{const e=At();return window.localStorage.getItem("".concat(e,"__").concat(r))},Al=()=>{const r=At(),e={};let n=0;for(;n{const n=At();window.localStorage.setItem("".concat(n,"__").concat(r),e)},Ll=r=>{const e=At();window.localStorage.removeItem("".concat(e,"__").concat(r))},El=()=>{const r=At();let e=0;for(;etypeof r=="string",$t=()=>{let r,e;const n=new Promise((i,o)=>{r=i,e=o});return n.resolve=r,n.reject=e,n},wi=r=>r==null?"":""+r,Tl=(r,e,n)=>{r.forEach(i=>{e[i]&&(n[i]=e[i])})},kl=/###/g,vi=r=>r&&r.indexOf("###")>-1?r.replace(kl,"."):r,xi=r=>!r||z(r),Kt=(r,e,n)=>{const i=z(e)?e.split("."):e;let o=0;for(;o{const{obj:i,k:o}=Kt(r,e,Object);if(i!==void 0||e.length===1){i[o]=n;return}let a=e[e.length-1],s=e.slice(0,e.length-1),l=Kt(r,s,Object);for(;l.obj===void 0&&s.length;)a="".concat(s[s.length-1],".").concat(a),s=s.slice(0,s.length-1),l=Kt(r,s,Object),l&&l.obj&&typeof l.obj["".concat(l.k,".").concat(a)]<"u"&&(l.obj=void 0);l.obj["".concat(l.k,".").concat(a)]=n},Ol=(r,e,n,i)=>{const{obj:o,k:a}=Kt(r,e,Object);o[a]=o[a]||[],o[a].push(n)},En=(r,e)=>{const{obj:n,k:i}=Kt(r,e);if(n)return n[i]},Ml=(r,e,n)=>{const i=En(r,n);return i!==void 0?i:En(e,n)},To=(r,e,n)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in r?z(r[i])||r[i]instanceof String||z(e[i])||e[i]instanceof String?n&&(r[i]=e[i]):To(r[i],e[i],n):r[i]=e[i]);return r},gt=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Pl={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const jl=r=>z(r)?r.replace(/[&<>"'\/]/g,e=>Pl[e]):r;class $l{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const Il=[" ",",","?","!",";"],Dl=new $l(20),zl=(r,e,n)=>{e=e||"",n=n||"";const i=Il.filter(s=>e.indexOf(s)<0&&n.indexOf(s)<0);if(i.length===0)return!0;const o=Dl.getRegExp("(".concat(i.map(s=>s==="?"?"\\?":s).join("|"),")"));let a=!o.test(r);if(!a){const s=r.indexOf(n);s>0&&!o.test(r.substring(0,s))&&(a=!0)}return a},Ar=function(r,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!r)return;if(r[e])return r[e];const i=e.split(n);let o=r;for(let a=0;a-1&&ur&&r.replace("_","-"),Bl={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){console&&console[r]&&console[r].apply(console,e)}};class kn{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||Bl,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),i=0;i{this.observers[i]||(this.observers[i]=new Map);const o=this.observers[i].get(n)||0;this.observers[i].set(n,o+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o{let[l,u]=s;for(let c=0;c{let[l,u]=s;for(let c=0;c1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.indexOf(".")>-1?l=e.split("."):(l=[e,n],i&&(Array.isArray(i)?l.push(...i):z(i)&&a?l.push(...i.split(a)):l.push(i)));const u=En(this.data,l);return!u&&!n&&!i&&e.indexOf(".")>-1&&(e=l[0],n=l[1],i=l.slice(2).join(".")),u||!s||!z(i)?u:Ar(this.data&&this.data[e]&&this.data[e][n],i,a)}addResource(e,n,i,o){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let l=[e,n];i&&(l=l.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(l=e.split("."),o=n,n=l[1]),this.addNamespaces(n),Si(this.data,l,o),a.silent||this.emit("added",e,n,i,o)}addResources(e,n,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in i)(z(i[a])||Array.isArray(i[a]))&&this.addResource(e,n,a,i[a],{silent:!0});o.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,o,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[e,n];e.indexOf(".")>-1&&(l=e.split("."),o=i,i=n,n=l[1]),this.addNamespaces(n);let u=En(this.data,l)||{};s.skipCopy||(i=JSON.parse(JSON.stringify(i))),o?To(u,i,a):u={...u,...i},Si(this.data,l,u),s.silent||this.emit("added",e,n,i)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var ko={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,n,i,o){return r.forEach(a=>{this.processors[a]&&(e=this.processors[a].process(e,n,i,o))}),e}};const Ri={};class On extends nr{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Tl(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Me.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const i=this.resolve(e,n);return i&&i.res!==void 0}extractFromKey(e,n){let i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const s=i&&e.indexOf(i)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!zl(e,i,o);if(s&&!l){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:z(a)?[a]:a};const c=e.split(i);(i!==o||i===o&&this.options.ns.indexOf(c[0])>-1)&&(a=c.shift()),e=c.join(o)}return{key:e,namespaces:z(a)?[a]:a}}translate(e,n,i){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(e[e.length-1],n),u=l[l.length-1],c=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(d){const b=n.nsSeparator||this.options.nsSeparator;return o?{res:"".concat(u).concat(b).concat(s),usedKey:s,exactUsedKey:s,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:"".concat(u).concat(b).concat(s)}return o?{res:s,usedKey:s,exactUsedKey:s,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:s}const h=this.resolve(e,n);let p=h&&h.res;const g=h&&h.usedKey||s,m=h&&h.exactUsedKey||s,w=Object.prototype.toString.apply(p),N=["[object Number]","[object Function]","[object RegExp]"],L=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,M=!z(p)&&typeof p!="boolean"&&typeof p!="number";if(T&&p&&M&&N.indexOf(w)<0&&!(z(L)&&Array.isArray(p))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const b=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,p,{...n,ns:l}):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");return o?(h.res=b,h.usedParams=this.getUsedParamsDetails(n),h):b}if(a){const b=Array.isArray(p),y=b?[]:{},x=b?m:g;for(const v in p)if(Object.prototype.hasOwnProperty.call(p,v)){const C="".concat(x).concat(a).concat(v);y[v]=this.translate(C,{...n,joinArrays:!1,ns:l}),y[v]===C&&(y[v]=p[v])}p=y}}else if(T&&z(L)&&Array.isArray(p))p=p.join(L),p&&(p=this.extendTranslation(p,e,n,i));else{let b=!1,y=!1;const x=n.count!==void 0&&!z(n.count),v=On.hasDefaultValue(n),C=x?this.pluralResolver.getSuffix(c,n.count,n):"",R=n.ordinal&&x?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",_=x&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),P=_&&n["defaultValue".concat(this.options.pluralSeparator,"zero")]||n["defaultValue".concat(C)]||n["defaultValue".concat(R)]||n.defaultValue;!this.isValidLookup(p)&&v&&(b=!0,p=P),this.isValidLookup(p)||(y=!0,p=s);const V=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&y?void 0:p,Y=v&&P!==p&&this.options.updateMissing;if(y||b||Y){if(this.logger.log(Y?"updateKey":"missingKey",c,u,s,Y?P:p),a){const ae=this.resolve(s,{...n,keySeparator:!1});ae&&ae.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let ee=[];const me=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&me&&me[0])for(let ae=0;ae{const rt=v&&We!==p?We:V;this.options.missingKeyHandler?this.options.missingKeyHandler(ae,u,ye,rt,Y,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(ae,u,ye,rt,Y,n),this.emit("missingKey",ae,u,ye,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?ee.forEach(ae=>{const ye=this.pluralResolver.getSuffixes(ae,n);_&&n["defaultValue".concat(this.options.pluralSeparator,"zero")]&&ye.indexOf("".concat(this.options.pluralSeparator,"zero"))<0&&ye.push("".concat(this.options.pluralSeparator,"zero")),ye.forEach(We=>{kt([ae],s+We,n["defaultValue".concat(We)]||P)})}):kt(ee,s,P))}p=this.extendTranslation(p,e,n,h,i),y&&p===s&&this.options.appendNamespaceToMissingKey&&(p="".concat(u,":").concat(s)),(y||b)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(s):s,b?p:void 0):p=this.options.parseMissingKeyHandler(p))}return o?(h.res=p,h.usedParams=this.getUsedParamsDetails(n),h):p}extendTranslation(e,n,i,o,a){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const c=z(e)&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(c){const p=e.match(this.interpolator.nestingRegexp);d=p&&p.length}let h=i.replace&&!z(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,i.lng||this.language||o.usedLng,i),c){const p=e.match(this.interpolator.nestingRegexp),g=p&&p.length;d1&&arguments[1]!==void 0?arguments[1]:{},i,o,a,s,l;return z(e)&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(i))return;const c=this.extractFromKey(u,n),d=c.key;o=d;let h=c.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const p=n.count!==void 0&&!z(n.count),g=p&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),m=n.context!==void 0&&(z(n.context)||typeof n.context=="number")&&n.context!=="",w=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);h.forEach(N=>{this.isValidLookup(i)||(l=N,!Ri["".concat(w[0],"-").concat(N)]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(Ri["".concat(w[0],"-").concat(N)]=!0,this.logger.warn('key "'.concat(o,'" for languages "').concat(w.join(", "),'" won\'t get resolved as namespace "').concat(l,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(L=>{if(this.isValidLookup(i))return;s=L;const T=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(T,d,L,N,n);else{let b;p&&(b=this.pluralResolver.getSuffix(L,n.count,n));const y="".concat(this.options.pluralSeparator,"zero"),x="".concat(this.options.pluralSeparator,"ordinal").concat(this.options.pluralSeparator);if(p&&(T.push(d+b),n.ordinal&&b.indexOf(x)===0&&T.push(d+b.replace(x,this.options.pluralSeparator)),g&&T.push(d+y)),m){const v="".concat(d).concat(this.options.contextSeparator).concat(n.context);T.push(v),p&&(T.push(v+b),n.ordinal&&b.indexOf(x)===0&&T.push(v+b.replace(x,this.options.pluralSeparator)),g&&T.push(v+y))}}let M;for(;M=T.pop();)this.isValidLookup(i)||(a=M,i=this.getResource(L,N,M,n))}))})}),{res:i,usedKey:o,exactUsedKey:a,usedLng:s,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,i,o):this.resourceStore.getResource(e,n,i,o)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!z(e.replace);let o=i?e.replace:e;if(i&&typeof e.count<"u"&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!i){o={...o};for(const a of n)delete o[a]}return o}static hasDefaultValue(e){const n="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n===i.substring(0,n.length)&&e[i]!==void 0)return!0;return!1}}const gr=r=>r.charAt(0).toUpperCase()+r.slice(1);class Ci{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Me.create("languageUtils")}getScriptPartFromCode(e){if(e=Tn(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=Tn(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(z(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let o=Intl.getCanonicalLocales(e)[0];if(o&&this.options.lowerCaseLng&&(o=o.toLowerCase()),o)return o}catch(o){}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(o=>o.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=gr(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=gr(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=gr(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(i=>{if(n)return;const o=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const o=this.getLanguagePartFromCode(i);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(a=>{if(a===o)return a;if(!(a.indexOf("-")<0&&o.indexOf("-")<0)&&(a.indexOf("-")>0&&o.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===o||a.indexOf(o)===0&&o.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),z(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let i=e[n];return i||(i=e[this.getScriptPartFromCode(n)]),i||(i=e[this.formatLanguageCode(n)]),i||(i=e[this.getLanguagePartFromCode(n)]),i||(i=e.default),i||[]}toResolveHierarchy(e,n){const i=this.getFallbackCodes(n||this.options.fallbackLng||[],e),o=[],a=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn("rejecting language code not found in supportedLngs: ".concat(s)))};return z(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):z(e)&&a(this.formatLanguageCode(e)),i.forEach(s=>{o.indexOf(s)<0&&a(this.formatLanguageCode(s))}),o}}let Fl=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Gl={1:r=>+(r>1),2:r=>+(r!=1),3:r=>0,4:r=>r%10==1&&r%100!=11?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2,5:r=>r==0?0:r==1?1:r==2?2:r%100>=3&&r%100<=10?3:r%100>=11?4:5,6:r=>r==1?0:r>=2&&r<=4?1:2,7:r=>r==1?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2,8:r=>r==1?0:r==2?1:r!=8&&r!=11?2:3,9:r=>+(r>=2),10:r=>r==1?0:r==2?1:r<7?2:r<11?3:4,11:r=>r==1||r==11?0:r==2||r==12?1:r>2&&r<20?2:3,12:r=>+(r%10!=1||r%100==11),13:r=>+(r!==0),14:r=>r==1?0:r==2?1:r==3?2:3,15:r=>r%10==1&&r%100!=11?0:r%10>=2&&(r%100<10||r%100>=20)?1:2,16:r=>r%10==1&&r%100!=11?0:r!==0?1:2,17:r=>r==1||r%10==1&&r%100!=11?0:1,18:r=>r==0?0:r==1?1:2,19:r=>r==1?0:r==0||r%100>1&&r%100<11?1:r%100>10&&r%100<20?2:3,20:r=>r==1?0:r==0||r%100>0&&r%100<20?1:2,21:r=>r%100==1?1:r%100==2?2:r%100==3||r%100==4?3:0,22:r=>r==1?0:r==2?1:(r<0||r>10)&&r%10==0?2:3};const Ul=["v1","v2","v3"],Vl=["v4"],Ai={zero:0,one:1,two:2,few:3,many:4,other:5},Wl=()=>{const r={};return Fl.forEach(e=>{e.lngs.forEach(n=>{r[n]={numbers:e.nr,plurals:Gl[e.fc]}})}),r};class Hl{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=Me.create("pluralResolver"),(!this.options.compatibilityJSON||Vl.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Wl(),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const i=Tn(e==="dev"?"en":e),o=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:i,type:o});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let s;try{s=new Intl.PluralRules(i,{type:o})}catch(l){if(!e.match(/-|_/))return;const u=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(u,n)}return this.pluralRulesCache[a]=s,s}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(o=>"".concat(n).concat(o))}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((o,a)=>Ai[o]-Ai[a]).map(o=>"".concat(this.options.prepend).concat(n.ordinal?"ordinal".concat(this.options.prepend):"").concat(o)):i.numbers.map(o=>this.getSuffix(e,o,n)):[]}getSuffix(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(e,i);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(i.ordinal?"ordinal".concat(this.options.prepend):"").concat(o.select(n)):this.getSuffixRetroCompatible(o,n):(this.logger.warn("no plural rule found for: ".concat(e)),"")}getSuffixRetroCompatible(e,n){const i=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let o=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const a=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?"_plural_".concat(o.toString()):a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!Ul.includes(this.options.compatibilityJSON)}}const _i=function(r,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=Ml(r,e,n);return!a&&o&&z(n)&&(a=Ar(r,n,i),a===void 0&&(a=Ar(e,n,i))),a},mr=r=>r.replace(/\$/g,"$$$$");class Jl{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Me.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:i,useRawValueToEscape:o,prefix:a,prefixEscaped:s,suffix:l,suffixEscaped:u,formatSeparator:c,unescapeSuffix:d,unescapePrefix:h,nestingPrefix:p,nestingPrefixEscaped:g,nestingSuffix:m,nestingSuffixEscaped:w,nestingOptionsSeparator:N,maxReplaces:L,alwaysFormat:T}=e.interpolation;this.escape=n!==void 0?n:jl,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?gt(a):s||"{{",this.suffix=l?gt(l):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=d?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=p?gt(p):g||gt("$t("),this.nestingSuffix=m?gt(m):w||gt(")"),this.nestingOptionsSeparator=N||",",this.maxReplaces=L||1e3,this.alwaysFormat=T!==void 0?T:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,i)=>n&&n.source===i?(n.lastIndex=0,n):new RegExp(i,"g");this.regexp=e(this.regexp,"".concat(this.prefix,"(.+?)").concat(this.suffix)),this.regexpUnescape=e(this.regexpUnescape,"".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix)),this.nestingRegexp=e(this.nestingRegexp,"".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix))}interpolate(e,n,i,o){let a,s,l;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=g=>{if(g.indexOf(this.formatSeparator)<0){const L=_i(n,u,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(L,void 0,i,{...o,...n,interpolationkey:g}):L}const m=g.split(this.formatSeparator),w=m.shift().trim(),N=m.join(this.formatSeparator).trim();return this.format(_i(n,u,w,this.options.keySeparator,this.options.ignoreJSONStructure),N,i,{...o,...n,interpolationkey:w})};this.resetRegExp();const d=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,h=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>mr(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?mr(this.escape(g)):mr(g)}].forEach(g=>{for(l=0;a=g.regex.exec(e);){const m=a[1].trim();if(s=c(m),s===void 0)if(typeof d=="function"){const N=d(e,a,o);s=z(N)?N:""}else if(o&&Object.prototype.hasOwnProperty.call(o,m))s="";else if(h){s=a[0];continue}else this.logger.warn("missed to pass in variable ".concat(m," for interpolating ").concat(e)),s="";else!z(s)&&!this.useRawValueToEscape&&(s=wi(s));const w=g.safeValue(s);if(e=e.replace(a[0],w),h?(g.regex.lastIndex+=s.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,s;const l=(u,c)=>{const d=this.nestingOptionsSeparator;if(u.indexOf(d)<0)return u;const h=u.split(new RegExp("".concat(d,"[ ]*{")));let p="{".concat(h[1]);u=h[0],p=this.interpolate(p,s);const g=p.match(/'/g),m=p.match(/"/g);(g&&g.length%2===0&&!m||m.length%2!==0)&&(p=p.replace(/'/g,'"'));try{s=JSON.parse(p),c&&(s={...c,...s})}catch(w){return this.logger.warn("failed parsing options string in nesting for key ".concat(u),w),"".concat(u).concat(d).concat(p)}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,u};for(;o=this.nestingRegexp.exec(e);){let u=[];s={...i},s=s.replace&&!z(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let c=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const d=o[1].split(this.formatSeparator).map(h=>h.trim());o[1]=d.shift(),u=d,c=!0}if(a=n(l.call(this,o[1].trim(),s),s),a&&o[0]===e&&!z(a))return a;z(a)||(a=wi(a)),a||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(e)),a=""),c&&(a=u.reduce((d,h)=>this.format(d,h,i.lng,{...i,interpolationkey:o[1].trim()}),a.trim())),e=e.replace(o[0],a),this.regexp.lastIndex=0}return e}}const Kl=r=>{let e=r.toLowerCase().trim();const n={};if(r.indexOf("(")>-1){const i=r.split("(");e=i[0].toLowerCase().trim();const o=i[1].substring(0,i[1].length-1);e==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):e==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(s=>{if(s){const[l,...u]=s.split(":"),c=u.join(":").trim().replace(/^'+|'+$/g,""),d=l.trim();n[d]||(n[d]=c),c==="false"&&(n[d]=!1),c==="true"&&(n[d]=!0),isNaN(c)||(n[d]=parseInt(c,10))}})}return{formatName:e,formatOptions:n}},mt=r=>{const e={};return(n,i,o)=>{let a=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(a={...a,[o.interpolationkey]:void 0});const s=i+JSON.stringify(a);let l=e[s];return l||(l=r(Tn(i),o),e[s]=l),l(n)}};class ql{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Me.create("formatter"),this.options=e,this.formats={number:mt((n,i)=>{const o=new Intl.NumberFormat(n,{...i});return a=>o.format(a)}),currency:mt((n,i)=>{const o=new Intl.NumberFormat(n,{...i,style:"currency"});return a=>o.format(a)}),datetime:mt((n,i)=>{const o=new Intl.DateTimeFormat(n,{...i});return a=>o.format(a)}),relativetime:mt((n,i)=>{const o=new Intl.RelativeTimeFormat(n,{...i});return a=>o.format(a,i.range||"day")}),list:mt((n,i)=>{const o=new Intl.ListFormat(n,{...i});return a=>o.format(a)})},this.init(e)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=mt(n)}format(e,n,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(l=>l.indexOf(")")>-1)){const l=a.findIndex(u=>u.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,l)].join(this.formatSeparator)}return a.reduce((l,u)=>{const{formatName:c,formatOptions:d}=Kl(u);if(this.formats[c]){let h=l;try{const p=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},g=p.locale||p.lng||o.locale||o.lng||i;h=this.formats[c](l,g,{...d,...o,...p})}catch(p){this.logger.warn(p)}return h}else this.logger.warn("there was no format function for ".concat(c));return l},e)}}const Yl=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class Zl extends nr{constructor(e,n,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=o,this.logger=Me.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,o.backend,o)}queueLoad(e,n,i,o){const a={},s={},l={},u={};return e.forEach(c=>{let d=!0;n.forEach(h=>{const p="".concat(c,"|").concat(h);!i.reload&&this.store.hasResourceBundle(c,h)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?s[p]===void 0&&(s[p]=!0):(this.state[p]=1,d=!1,s[p]===void 0&&(s[p]=!0),a[p]===void 0&&(a[p]=!0),u[h]===void 0&&(u[h]=!0)))}),d||(l[c]=!0)}),(Object.keys(a).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(u)}}loaded(e,n,i){const o=e.split("|"),a=o[0],s=o[1];n&&this.emit("failedLoading",a,s,n),!n&&i&&this.store.addResourceBundle(a,s,i,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&i&&(this.state[e]=0);const l={};this.queue.forEach(u=>{Ol(u.loaded,[a],s),Yl(u,e),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(c=>{l[c]||(l[c]={});const d=u.loaded[c];d.length&&d.forEach(h=>{l[c][h]===void 0&&(l[c][h]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(u=>!u.done)}read(e,n,i){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:o,wait:a,callback:s});return}this.readingCalls++;const l=(c,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(c&&d&&o{this.read.call(this,e,n,i,o+1,a*2,s)},a);return}s(c,d)},u=this.backend[i].bind(this.backend);if(u.length===2){try{const c=u(e,n);c&&typeof c.then=="function"?c.then(d=>l(null,d)).catch(l):l(null,c)}catch(c){l(c)}return}return u(e,n,l)}prepareLoading(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();z(e)&&(e=this.languageUtils.toResolveHierarchy(e)),z(n)&&(n=[n]);const a=this.queueLoad(e,n,i,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(s=>{this.loadOne(s)})}load(e,n,i){this.prepareLoading(e,n,{},i)}reload(e,n,i){this.prepareLoading(e,n,{reload:!0},i)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),o=i[0],a=i[1];this.read(o,a,"read",void 0,void 0,(s,l)=>{s&&this.logger.warn("".concat(n,"loading namespace ").concat(a," for language ").concat(o," failed"),s),!s&&l&&this.logger.log("".concat(n,"loaded namespace ").concat(a," for language ").concat(o),l),this.loaded(e,s,l)})}saveMissing(e,n,i,o,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn('did not save key "'.concat(i,'" as the namespace "').concat(n,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend&&this.backend.create){const u={...s,isUpdate:a},c=this.backend.create.bind(this.backend);if(c.length<6)try{let d;c.length===5?d=c(e,n,i,o,u):d=c(e,n,i,o),d&&typeof d.then=="function"?d.then(h=>l(null,h)).catch(l):l(null,d)}catch(d){l(d)}else c(e,n,i,o,l,u)}!e||!e[0]||this.store.addResource(e[0],n,i,o)}}}const Li=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),z(r[1])&&(e.defaultValue=r[1]),z(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const n=r[3]||r[2];Object.keys(n).forEach(i=>{e[i]=n[i]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Ei=r=>(z(r.ns)&&(r.ns=[r.ns]),z(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),z(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),r.supportedLngs&&r.supportedLngs.indexOf("cimode")<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),r),un=()=>{},Ql=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(n=>{typeof r[n]=="function"&&(r[n]=r[n].bind(r))})};class en extends nr{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Ei(e),this.services={},this.logger=Me,this.modules={external:[]},Ql(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(i=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(z(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=Li();this.options={...o,...this.options,...Ei(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const a=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?Me.init(a(this.modules.logger),this.options):Me.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=ql);const h=new Ci(this.options);this.store=new Ni(this.options.resources,this.options);const p=this.services;p.logger=Me,p.resourceStore=this.store,p.languageUtils=h,p.pluralResolver=new Hl(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(p.formatter=a(d),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new Jl(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new Zl(a(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(g){for(var m=arguments.length,w=new Array(m>1?m-1:0),N=1;N1?m-1:0),N=1;N{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,i||(i=un),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return e.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return e.store[d](...arguments),e}});const u=$t(),c=()=>{const d=(h,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(p),i(h,p)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),u}loadResources(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:un;const o=z(e)?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const a=[],s=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(c=>{c!=="cimode"&&a.indexOf(c)<0&&a.push(c)})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>s(u)),this.options.preload&&this.options.preload.forEach(l=>s(l)),this.services.backendConnector.load(a,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(l)})}else i(null)}reloadResources(e,n,i){const o=$t();return typeof e=="function"&&(i=e,e=void 0),typeof n=="function"&&(i=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),i||(i=un),this.services.backendConnector.reload(e,n,a=>{o.resolve(),i(a)}),o}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&ko.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,n){var i=this;this.isLanguageChangingTo=e;const o=$t();this.emit("languageChanging",e);const a=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},s=(u,c)=>{c?(a(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,o.resolve(function(){return i.t(...arguments)}),n&&n(u,function(){return i.t(...arguments)})},l=u=>{!e&&!u&&this.services.languageDetector&&(u=[]);const c=z(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);c&&(this.language||a(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,d=>{s(d,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e),o}getFixedT(e,n,i){var o=this;const a=function(s,l){let u;if(typeof l!="object"){for(var c=arguments.length,d=new Array(c>2?c-2:0),h=2;h"".concat(u.keyPrefix).concat(p).concat(m)):g=u.keyPrefix?"".concat(u.keyPrefix).concat(p).concat(s):s,o.t(g,u)};return z(e)?a.lng=e:a.lngs=e,a.ns=n,a.keyPrefix=i,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const s=(l,u)=>{const c=this.services.backendConnector.state["".concat(l,"|").concat(u)];return c===-1||c===0||c===2};if(n.precheck){const l=n.precheck(this,s);if(l!==void 0)return l}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(i,e)&&(!o||s(a,e)))}loadNamespaces(e,n){const i=$t();return this.options.ns?(z(e)&&(e=[e]),e.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{i.resolve(),n&&n(o)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=$t();z(e)&&(e=[e]);const o=this.options.preload||[],a=e.filter(s=>o.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=o.concat(a),this.loadResources(s=>{i.resolve(),n&&n(s)}),i):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services&&this.services.languageUtils||new Ci(Li());return n.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new en(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:un;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},a=new en(o);return(e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},i&&(a.store=new Ni(this.store.data,o),a.services.resourceStore=a.store),a.translator=new On(a.services,o),a.translator.on("*",function(l){for(var u=arguments.length,c=new Array(u>1?u-1:0),d=1;dwt,eu=r=>{Ae.onLanguageChange(e=>r.changeLanguage(e))};class tu{constructor(){this._appName="RMG",this._lng=void 0,this._defaultResources={},this._resources={}}use(e){return he.use(e),this}withAppName(e){return this._appName=e,this}withLng(e){return this._lng=e,this}withDefaultResource(e){return Object.entries(e).forEach(([n,i])=>{this._defaultResources[n]=i}),this}withResource(e,n){return this._resources[e]=n,this}combineResource(){const e={};return Object.entries(this._defaultResources).forEach(([n,i])=>{e[n]={translation:i}}),Object.entries(this._resources).forEach(([n,i])=>{n in e?e[n].translation=Object.assign(Object.assign({},e[n].translation),i):e[n]={translation:i}}),e}build(){return wt=he.createInstance({lng:this._lng,fallbackLng:{"zh-CN":["zh-Hans","zh-Hant","en"],"zh-HK":["zh-Hant","zh-Hans","en"],"zh-TW":["zh-Hant","zh-Hans","en"],default:["en"]},resources:this.combineResource()},(e,n)=>{var i;if(e){te.error("unexpected error occurs while initialising i18n",e);return}document.title=n(this._appName),document.documentElement.lang=(i=this._lng)!==null&&i!==void 0?i:"en"}),wt.on("languageChanged",e=>{document.title=wt.t(this._appName),document.documentElement.lang=e}),eu(wt),wt}}var tn=function(r,e,n,i){function o(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function l(d){try{c(i.next(d))}catch(h){s(h)}}function u(d){try{c(i.throw(d))}catch(h){s(h)}}function c(d){d.done?a(d.value):o(d.value).then(l,u)}c((i=i.apply(r,e||[])).next())})};let Qe={};const nu=()=>Qe,Oo="LOAD_REMOTE_FONT",ru=(r,e)=>{le.postEvent(Oo,{family:r,definition:e})},iu=r=>{le.onMessage(Oo,r)},Kr=r=>r.source.startsWith("local"),ou=r=>{var e;const n=(e=r.source.match(/url\(['"](\S+)['"]\)/))===null||e===void 0?void 0:e[1];if(!n)throw new Error("Invalid URL in source "+r.source);return new URL(n,window.location.href)},Ti=(r,e)=>{var n;return"@font-face {\n font-family: '".concat(r,"';\n src: ").concat(e.source,";\n ").concat(Object.entries((n=e.descriptors)!==null&&n!==void 0?n:{}).map(([i,o])=>"".concat(i,": ").concat(o,";")).join("\n"),"\n}")},au=()=>$s(()=>fetch("/fonts/config.json").then(r=>r.json()));let Mo=au();const su=(r,e,n)=>tn(void 0,void 0,void 0,function*(){try{const i=new FontFace(r,e.source,e.descriptors);return Kr(e)?yield i.load():i.loaded.then(n),document.fonts.add(i),Qe[r]={configs:[Object.assign(Object.assign({},e),{font:i})]},!0}catch(i){return te.warn("Failed to load font ".concat(r," with source ").concat(e.source),i),!1}}),lu=(r,e,n)=>tn(void 0,void 0,void 0,function*(){if(e.some(Kr))return te.error("Unable to load multiple FontFace for the same family ".concat(r)),!1;const i=[];return e.forEach(o=>{const a=new FontFace(r,o.source,o.descriptors);a.loaded.then(n),document.fonts.add(a),i.push(Object.assign(Object.assign({},o),{font:a}))}),Qe[r]={configs:i},!0}),uu=(r,e)=>tn(void 0,void 0,void 0,function*(){if(r in Qe)return Qe[r];let n;if(e)n=e;else try{n=(yield Mo())[r]}catch(a){const s=a instanceof Error?" due to "+a.message:"";throw new Error("Unable to load font definition of "+r+s)}const i=()=>{ru(r,n)};for(const a of n.configs)if(Array.isArray(a)?yield lu(r,a,i):yield su(r,a,i))break;const o=Qe[r];if(o)return o.displayName=n.displayName,o.url=n.url,Qe[r]}),cu=r=>tn(void 0,void 0,void 0,function*(){const e=Qe[r];if(!e)throw new Error("Font family ".concat(r," is not loaded"));return(yield Promise.all(e.configs.filter(i=>{const o=i.font.status==="loaded";return o||te.warn("Font family ".concat(r," is not loaded completely. Some FontFaceRules may be missing")),o}).map(i=>tn(void 0,void 0,void 0,function*(){if(Kr(i))return Ti(r,i);const o=ou(i),a=yield fetch(o),s=yield js(yield a.blob());return Ti(r,Object.assign(Object.assign({},i),{source:"url('".concat(s,"')")}))})))).join("\n\n")}),It={getAllFonts:Mo,getLoadedFonts:nu,loadFont:uu,getFontCSS:cu,onRemoteFontLoaded:iu},du=()=>{if(pe.getEnvironment()!=="PRD"||!pe.isRMT())if(document.querySelector('meta[name="robots"]'))te.info("Noindex meta tag already presents.");else{te.info("Injecting noindex meta tag as this app is not PRD RMT.");const r=document.createElement("meta");r.name="robots",r.content="noindex",document.head.appendChild(r)}},hu={injectNoindexRule:du};var Po=function(r,e,n,i){function o(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function l(d){try{c(i.next(d))}catch(h){s(h)}}function u(d){try{c(i.throw(d))}catch(h){s(h)}}function c(d){d.done?a(d.value):o(d.value).then(l,u)}c((i=i.apply(r,e||[])).next())})};let jo=!1;const pu=()=>Po(void 0,void 0,void 0,function*(){yield pe.loadWithTimeout(),te.setup(pe.getComponent()),hu.injectNoindexRule(),Ae.isAnalyticsQADone()?Ae.isAllowAnalytics()&&(te.info("User has previously allowed GA"),Ln.init()):Re.isStandaloneWindow()&&!pe.isRMT()&&(te.warn("App is opened in standalone window but analytics Q&A is not finished. GA will be init by default."),Ln.init()),jo=!0}),fu=()=>Po(void 0,void 0,void 0,function*(){let r=0;for(;r<=10&&!jo;)yield fo(1e3),r+=1}),xe={ready:fu,getAppName:pe.getComponent,getAppVersion:pe.getVersion,getEnv:pe.getEnvironment,getInstance:pe.getInstance,event:Ln.customEvent,isStandaloneWindow:Re.isStandaloneWindow,injectUITools:Re.injectUITools,openApp:Re.openApp,onAppOpen:Re.onAppOpen,closeApp:Re.closeApp,onAppClose:Re.onAppClose,updateAppMetadata:Re.updateAppMetadata,onAppMetadataUpdate:Re.onAppMetadataUpdate,updateUrl:Re.updateUrl,onUrlUpdate:Re.onUrlUpdate,toggleNavMenu:Re.toggleNavMenu,postEvent:le.postEvent,onMessage:le.onMessage,setLanguage:Ae.setLanguage,getLanguage:Ae.getLanguage,onLanguageChange:Ae.onLanguageChange,setColourMode:Ae.setColourMode,getColourMode:Ae.getColourMode,onColourModeChange:Ae.onColourModeChange,isAnalyticsQADone:Ae.isAnalyticsQADone,isAllowAnalytics:Ae.isAllowAnalytics,allowAnalytics:Ae.allowAnalytics,storage:{on:ft.on,get:ft.get,getAll:ft.getAll,set:ft.set,remove:ft.remove,clear:ft.clear},getMsSinceStartUp:Nl.getMsSinceStartUp,I18nBuilder:tu,getI18nInstance:Xl,getAllFonts:It.getAllFonts,getLoadedFonts:It.getLoadedFonts,loadFont:It.loadFont,getFontCSS:It.getFontCSS,onRemoteFontLoaded:It.onRemoteFontLoaded};pu().then();window.rmgRuntime=xe;const tt=te.logger;var cn={exports:{}},ki;function gu(){if(ki)return cn.exports;ki=1;var r=typeof Reflect=="object"?Reflect:null,e=r&&typeof r.apply=="function"?r.apply:function(y,x,v){return Function.prototype.apply.call(y,x,v)},n;r&&typeof r.ownKeys=="function"?n=r.ownKeys:Object.getOwnPropertySymbols?n=function(y){return Object.getOwnPropertyNames(y).concat(Object.getOwnPropertySymbols(y))}:n=function(y){return Object.getOwnPropertyNames(y)};function i(b){console&&console.warn&&console.warn(b)}var o=Number.isNaN||function(y){return y!==y};function a(){a.init.call(this)}cn.exports=a,cn.exports.once=L,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function l(b){if(typeof b!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof b)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(b){if(typeof b!="number"||b<0||o(b))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+b+".");s=b}}),a.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(y){if(typeof y!="number"||y<0||o(y))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+y+".");return this._maxListeners=y,this};function u(b){return b._maxListeners===void 0?a.defaultMaxListeners:b._maxListeners}a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(y){for(var x=[],v=1;v0&&(_=x[0]),_ instanceof Error)throw _;var P=new Error("Unhandled error."+(_?" ("+_.message+")":""));throw P.context=_,P}var B=R[y];if(B===void 0)return!1;if(typeof B=="function")e(B,this,x);else for(var V=B.length,Y=m(B,V),v=0;v0&&_.length>C&&!_.warned){_.warned=!0;var P=new Error("Possible EventEmitter memory leak detected. "+_.length+" "+String(y)+" listeners added. Use emitter.setMaxListeners() to increase limit");P.name="MaxListenersExceededWarning",P.emitter=b,P.type=y,P.count=_.length,i(P)}return b}a.prototype.addListener=function(y,x){return c(this,y,x,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(y,x){return c(this,y,x,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(b,y,x){var v={fired:!1,wrapFn:void 0,target:b,type:y,listener:x},C=d.bind(v);return C.listener=x,v.wrapFn=C,C}a.prototype.once=function(y,x){return l(x),this.on(y,h(this,y,x)),this},a.prototype.prependOnceListener=function(y,x){return l(x),this.prependListener(y,h(this,y,x)),this},a.prototype.removeListener=function(y,x){var v,C,R,_,P;if(l(x),C=this._events,C===void 0)return this;if(v=C[y],v===void 0)return this;if(v===x||v.listener===x)--this._eventsCount===0?this._events=Object.create(null):(delete C[y],C.removeListener&&this.emit("removeListener",y,v.listener||x));else if(typeof v!="function"){for(R=-1,_=v.length-1;_>=0;_--)if(v[_]===x||v[_].listener===x){P=v[_].listener,R=_;break}if(R<0)return this;R===0?v.shift():w(v,R),v.length===1&&(C[y]=v[0]),C.removeListener!==void 0&&this.emit("removeListener",y,P||x)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(y){var x,v,C;if(v=this._events,v===void 0)return this;if(v.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):v[y]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete v[y]),this;if(arguments.length===0){var R=Object.keys(v),_;for(C=0;C=0;C--)this.removeListener(y,x[C]);return this};function p(b,y,x){var v=b._events;if(v===void 0)return[];var C=v[y];return C===void 0?[]:typeof C=="function"?x?[C.listener||C]:[C]:x?N(C):m(C,C.length)}a.prototype.listeners=function(y){return p(this,y,!0)},a.prototype.rawListeners=function(y){return p(this,y,!1)},a.listenerCount=function(b,y){return typeof b.listenerCount=="function"?b.listenerCount(y):g.call(b,y)},a.prototype.listenerCount=g;function g(b){var y=this._events;if(y!==void 0){var x=y[b];if(typeof x=="function")return 1;if(x!==void 0)return x.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function m(b,y){for(var x=new Array(y),v=0;vr++}function Ue(){const r=arguments;let e=null,n=-1;return{[Symbol.iterator](){return this},next(){let i=null;do{if(e===null){if(n++,n>=r.length)return{done:!0};e=r[n][Symbol.iterator]()}if(i=e.next(),i.done){e=null;continue}break}while(!0);return i}}}function _t(){return{[Symbol.iterator](){return this},next(){return{done:!0}}}}class qr extends Error{constructor(e){super(),this.name="GraphError",this.message=e}}class k extends qr{constructor(e){super(e),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,k.prototype.constructor)}}class E extends qr{constructor(e){super(e),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,E.prototype.constructor)}}class D extends qr{constructor(e){super(e),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,D.prototype.constructor)}}function Io(r,e){this.key=r,this.attributes=e,this.clear()}Io.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function Do(r,e){this.key=r,this.attributes=e,this.clear()}Do.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function zo(r,e){this.key=r,this.attributes=e,this.clear()}zo.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function Lt(r,e,n,i,o){this.key=e,this.attributes=o,this.undirected=r,this.source=n,this.target=i}Lt.prototype.attach=function(){let r="out",e="in";this.undirected&&(r=e="undirected");const n=this.source.key,i=this.target.key;this.source[r][i]=this,!(this.undirected&&n===i)&&(this.target[e][n]=this)};Lt.prototype.attachMulti=function(){let r="out",e="in";const n=this.source.key,i=this.target.key;this.undirected&&(r=e="undirected");const o=this.source[r],a=o[i];if(typeof a>"u"){o[i]=this,this.undirected&&n===i||(this.target[e][n]=this);return}a.previous=this,this.next=a,o[i]=this,this.target[e][n]=this};Lt.prototype.detach=function(){const r=this.source.key,e=this.target.key;let n="out",i="in";this.undirected&&(n=i="undirected"),delete this.source[n][e],delete this.target[i][r]};Lt.prototype.detachMulti=function(){const r=this.source.key,e=this.target.key;let n="out",i="in";this.undirected&&(n=i="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[n][e],delete this.target[i][r]):(this.next.previous=void 0,this.source[n][e]=this.next,this.target[i][r]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const Bo=0,Fo=1,wu=2,Go=3;function Ve(r,e,n,i,o,a,s){let l,u,c,d;if(i=""+i,n===Bo){if(l=r._nodes.get(i),!l)throw new E("Graph.".concat(e,': could not find the "').concat(i,'" node in the graph.'));c=o,d=a}else if(n===Go){if(o=""+o,u=r._edges.get(o),!u)throw new E("Graph.".concat(e,': could not find the "').concat(o,'" edge in the graph.'));const h=u.source.key,p=u.target.key;if(i===h)l=u.target;else if(i===p)l=u.source;else throw new E("Graph.".concat(e,': the "').concat(i,'" node is not attached to the "').concat(o,'" edge (').concat(h,", ").concat(p,")."));c=a,d=s}else{if(u=r._edges.get(i),!u)throw new E("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'));n===Fo?l=u.source:l=u.target,c=o,d=a}return[l,c,d]}function vu(r,e,n){r.prototype[e]=function(i,o,a){const[s,l]=Ve(this,e,n,i,o,a);return s.attributes[l]}}function xu(r,e,n){r.prototype[e]=function(i,o){const[a]=Ve(this,e,n,i,o);return a.attributes}}function Su(r,e,n){r.prototype[e]=function(i,o,a){const[s,l]=Ve(this,e,n,i,o,a);return s.attributes.hasOwnProperty(l)}}function Nu(r,e,n){r.prototype[e]=function(i,o,a,s){const[l,u,c]=Ve(this,e,n,i,o,a,s);return l.attributes[u]=c,this.emit("nodeAttributesUpdated",{key:l.key,type:"set",attributes:l.attributes,name:u}),this}}function Ru(r,e,n){r.prototype[e]=function(i,o,a,s){const[l,u,c]=Ve(this,e,n,i,o,a,s);if(typeof c!="function")throw new k("Graph.".concat(e,": updater should be a function."));const d=l.attributes,h=c(d[u]);return d[u]=h,this.emit("nodeAttributesUpdated",{key:l.key,type:"set",attributes:l.attributes,name:u}),this}}function Cu(r,e,n){r.prototype[e]=function(i,o,a){const[s,l]=Ve(this,e,n,i,o,a);return delete s.attributes[l],this.emit("nodeAttributesUpdated",{key:s.key,type:"remove",attributes:s.attributes,name:l}),this}}function Au(r,e,n){r.prototype[e]=function(i,o,a){const[s,l]=Ve(this,e,n,i,o,a);if(!de(l))throw new k("Graph.".concat(e,": provided attributes are not a plain object."));return s.attributes=l,this.emit("nodeAttributesUpdated",{key:s.key,type:"replace",attributes:s.attributes}),this}}function _u(r,e,n){r.prototype[e]=function(i,o,a){const[s,l]=Ve(this,e,n,i,o,a);if(!de(l))throw new k("Graph.".concat(e,": provided attributes are not a plain object."));return oe(s.attributes,l),this.emit("nodeAttributesUpdated",{key:s.key,type:"merge",attributes:s.attributes,data:l}),this}}function Lu(r,e,n){r.prototype[e]=function(i,o,a){const[s,l]=Ve(this,e,n,i,o,a);if(typeof l!="function")throw new k("Graph.".concat(e,": provided updater is not a function."));return s.attributes=l(s.attributes),this.emit("nodeAttributesUpdated",{key:s.key,type:"update",attributes:s.attributes}),this}}const Eu=[{name:r=>"get".concat(r,"Attribute"),attacher:vu},{name:r=>"get".concat(r,"Attributes"),attacher:xu},{name:r=>"has".concat(r,"Attribute"),attacher:Su},{name:r=>"set".concat(r,"Attribute"),attacher:Nu},{name:r=>"update".concat(r,"Attribute"),attacher:Ru},{name:r=>"remove".concat(r,"Attribute"),attacher:Cu},{name:r=>"replace".concat(r,"Attributes"),attacher:Au},{name:r=>"merge".concat(r,"Attributes"),attacher:_u},{name:r=>"update".concat(r,"Attributes"),attacher:Lu}];function Tu(r){Eu.forEach(function({name:e,attacher:n}){n(r,e("Node"),Bo),n(r,e("Source"),Fo),n(r,e("Target"),wu),n(r,e("Opposite"),Go)})}function ku(r,e,n){r.prototype[e]=function(i,o){let a;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new D("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new D("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const s=""+i,l=""+o;if(o=arguments[2],a=_e(this,s,l,n),!a)throw new E("Graph.".concat(e,': could not find an edge for the given path ("').concat(s,'" - "').concat(l,'").'))}else{if(n!=="mixed")throw new D("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,a=this._edges.get(i),!a)throw new E("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}return a.attributes[o]}}function Ou(r,e,n){r.prototype[e]=function(i){let o;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new D("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>1){if(this.multi)throw new D("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const a=""+i,s=""+arguments[1];if(o=_e(this,a,s,n),!o)throw new E("Graph.".concat(e,': could not find an edge for the given path ("').concat(a,'" - "').concat(s,'").'))}else{if(n!=="mixed")throw new D("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,o=this._edges.get(i),!o)throw new E("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}return o.attributes}}function Mu(r,e,n){r.prototype[e]=function(i,o){let a;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new D("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new D("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const s=""+i,l=""+o;if(o=arguments[2],a=_e(this,s,l,n),!a)throw new E("Graph.".concat(e,': could not find an edge for the given path ("').concat(s,'" - "').concat(l,'").'))}else{if(n!=="mixed")throw new D("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,a=this._edges.get(i),!a)throw new E("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}return a.attributes.hasOwnProperty(o)}}function Pu(r,e,n){r.prototype[e]=function(i,o,a){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new D("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new D("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const l=""+i,u=""+o;if(o=arguments[2],a=arguments[3],s=_e(this,l,u,n),!s)throw new E("Graph.".concat(e,': could not find an edge for the given path ("').concat(l,'" - "').concat(u,'").'))}else{if(n!=="mixed")throw new D("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,s=this._edges.get(i),!s)throw new E("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}return s.attributes[o]=a,this.emit("edgeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:o}),this}}function ju(r,e,n){r.prototype[e]=function(i,o,a){let s;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new D("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new D("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const l=""+i,u=""+o;if(o=arguments[2],a=arguments[3],s=_e(this,l,u,n),!s)throw new E("Graph.".concat(e,': could not find an edge for the given path ("').concat(l,'" - "').concat(u,'").'))}else{if(n!=="mixed")throw new D("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,s=this._edges.get(i),!s)throw new E("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}if(typeof a!="function")throw new k("Graph.".concat(e,": updater should be a function."));return s.attributes[o]=a(s.attributes[o]),this.emit("edgeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:o}),this}}function $u(r,e,n){r.prototype[e]=function(i,o){let a;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new D("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new D("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const s=""+i,l=""+o;if(o=arguments[2],a=_e(this,s,l,n),!a)throw new E("Graph.".concat(e,': could not find an edge for the given path ("').concat(s,'" - "').concat(l,'").'))}else{if(n!=="mixed")throw new D("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,a=this._edges.get(i),!a)throw new E("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}return delete a.attributes[o],this.emit("edgeAttributesUpdated",{key:a.key,type:"remove",attributes:a.attributes,name:o}),this}}function Iu(r,e,n){r.prototype[e]=function(i,o){let a;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new D("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new D("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const s=""+i,l=""+o;if(o=arguments[2],a=_e(this,s,l,n),!a)throw new E("Graph.".concat(e,': could not find an edge for the given path ("').concat(s,'" - "').concat(l,'").'))}else{if(n!=="mixed")throw new D("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,a=this._edges.get(i),!a)throw new E("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}if(!de(o))throw new k("Graph.".concat(e,": provided attributes are not a plain object."));return a.attributes=o,this.emit("edgeAttributesUpdated",{key:a.key,type:"replace",attributes:a.attributes}),this}}function Du(r,e,n){r.prototype[e]=function(i,o){let a;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new D("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new D("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const s=""+i,l=""+o;if(o=arguments[2],a=_e(this,s,l,n),!a)throw new E("Graph.".concat(e,': could not find an edge for the given path ("').concat(s,'" - "').concat(l,'").'))}else{if(n!=="mixed")throw new D("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,a=this._edges.get(i),!a)throw new E("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}if(!de(o))throw new k("Graph.".concat(e,": provided attributes are not a plain object."));return oe(a.attributes,o),this.emit("edgeAttributesUpdated",{key:a.key,type:"merge",attributes:a.attributes,data:o}),this}}function zu(r,e,n){r.prototype[e]=function(i,o){let a;if(this.type!=="mixed"&&n!=="mixed"&&n!==this.type)throw new D("Graph.".concat(e,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new D("Graph.".concat(e,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));const s=""+i,l=""+o;if(o=arguments[2],a=_e(this,s,l,n),!a)throw new E("Graph.".concat(e,': could not find an edge for the given path ("').concat(s,'" - "').concat(l,'").'))}else{if(n!=="mixed")throw new D("Graph.".concat(e,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(i=""+i,a=this._edges.get(i),!a)throw new E("Graph.".concat(e,': could not find the "').concat(i,'" edge in the graph.'))}if(typeof o!="function")throw new k("Graph.".concat(e,": provided updater is not a function."));return a.attributes=o(a.attributes),this.emit("edgeAttributesUpdated",{key:a.key,type:"update",attributes:a.attributes}),this}}const Bu=[{name:r=>"get".concat(r,"Attribute"),attacher:ku},{name:r=>"get".concat(r,"Attributes"),attacher:Ou},{name:r=>"has".concat(r,"Attribute"),attacher:Mu},{name:r=>"set".concat(r,"Attribute"),attacher:Pu},{name:r=>"update".concat(r,"Attribute"),attacher:ju},{name:r=>"remove".concat(r,"Attribute"),attacher:$u},{name:r=>"replace".concat(r,"Attributes"),attacher:Iu},{name:r=>"merge".concat(r,"Attributes"),attacher:Du},{name:r=>"update".concat(r,"Attributes"),attacher:zu}];function Fu(r){Bu.forEach(function({name:e,attacher:n}){n(r,e("Edge"),"mixed"),n(r,e("DirectedEdge"),"directed"),n(r,e("UndirectedEdge"),"undirected")})}const Gu=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function Uu(r,e,n,i){let o=!1;for(const a in e){if(a===i)continue;const s=e[a];if(o=n(s.key,s.attributes,s.source.key,s.target.key,s.source.attributes,s.target.attributes,s.undirected),r&&o)return s.key}}function Vu(r,e,n,i){let o,a,s,l=!1;for(const u in e)if(u!==i){o=e[u];do{if(a=o.source,s=o.target,l=n(o.key,o.attributes,a.key,s.key,a.attributes,s.attributes,o.undirected),r&&l)return o.key;o=o.next}while(o!==void 0)}}function yr(r,e){const n=Object.keys(r),i=n.length;let o,a=0;return{[Symbol.iterator](){return this},next(){do if(o)o=o.next;else{if(a>=i)return{done:!0};const s=n[a++];if(s===e){o=void 0;continue}o=r[s]}while(!o);return{done:!1,value:{edge:o.key,attributes:o.attributes,source:o.source.key,target:o.target.key,sourceAttributes:o.source.attributes,targetAttributes:o.target.attributes,undirected:o.undirected}}}}}function Wu(r,e,n,i){const o=e[n];if(!o)return;const a=o.source,s=o.target;if(i(o.key,o.attributes,a.key,s.key,a.attributes,s.attributes,o.undirected)&&r)return o.key}function Hu(r,e,n,i){let o=e[n];if(!o)return;let a=!1;do{if(a=i(o.key,o.attributes,o.source.key,o.target.key,o.source.attributes,o.target.attributes,o.undirected),r&&a)return o.key;o=o.next}while(o!==void 0)}function br(r,e){let n=r[e];if(n.next!==void 0)return{[Symbol.iterator](){return this},next(){if(!n)return{done:!0};const o={edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected};return n=n.next,{done:!1,value:o}}};let i=!1;return{[Symbol.iterator](){return this},next(){return i===!0?{done:!0}:(i=!0,{done:!1,value:{edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected}})}}}function Ju(r,e){if(r.size===0)return[];if(e==="mixed"||e===r.type)return Array.from(r._edges.keys());const n=e==="undirected"?r.undirectedSize:r.directedSize,i=new Array(n),o=e==="undirected",a=r._edges.values();let s=0,l,u;for(;l=a.next(),l.done!==!0;)u=l.value,u.undirected===o&&(i[s++]=u.key);return i}function Uo(r,e,n,i){if(e.size===0)return;const o=n!=="mixed"&&n!==e.type,a=n==="undirected";let s,l,u=!1;const c=e._edges.values();for(;s=c.next(),s.done!==!0;){if(l=s.value,o&&l.undirected!==a)continue;const{key:d,attributes:h,source:p,target:g}=l;if(u=i(d,h,p.key,g.key,p.attributes,g.attributes,l.undirected),r&&u)return d}}function Ku(r,e){if(r.size===0)return _t();const n=e!=="mixed"&&e!==r.type,i=e==="undirected",o=r._edges.values();return{[Symbol.iterator](){return this},next(){let a,s;for(;;){if(a=o.next(),a.done)return a;if(s=a.value,!(n&&s.undirected!==i))break}return{value:{edge:s.key,attributes:s.attributes,source:s.source.key,target:s.target.key,sourceAttributes:s.source.attributes,targetAttributes:s.target.attributes,undirected:s.undirected},done:!1}}}}function Yr(r,e,n,i,o,a){const s=e?Vu:Uu;let l;if(n!=="undirected"&&(i!=="out"&&(l=s(r,o.in,a),r&&l)||i!=="in"&&(l=s(r,o.out,a,i?void 0:o.key),r&&l))||n!=="directed"&&(l=s(r,o.undirected,a),r&&l))return l}function qu(r,e,n,i){const o=[];return Yr(!1,r,e,n,i,function(a){o.push(a)}),o}function Yu(r,e,n){let i=_t();return r!=="undirected"&&(e!=="out"&&typeof n.in<"u"&&(i=Ue(i,yr(n.in))),e!=="in"&&typeof n.out<"u"&&(i=Ue(i,yr(n.out,e?void 0:n.key)))),r!=="directed"&&typeof n.undirected<"u"&&(i=Ue(i,yr(n.undirected))),i}function Zr(r,e,n,i,o,a,s){const l=n?Hu:Wu;let u;if(e!=="undirected"&&(typeof o.in<"u"&&i!=="out"&&(u=l(r,o.in,a,s),r&&u)||typeof o.out<"u"&&i!=="in"&&(i||o.key!==a)&&(u=l(r,o.out,a,s),r&&u))||e!=="directed"&&typeof o.undirected<"u"&&(u=l(r,o.undirected,a,s),r&&u))return u}function Zu(r,e,n,i,o){const a=[];return Zr(!1,r,e,n,i,o,function(s){a.push(s)}),a}function Qu(r,e,n,i){let o=_t();return r!=="undirected"&&(typeof n.in<"u"&&e!=="out"&&i in n.in&&(o=Ue(o,br(n.in,i))),typeof n.out<"u"&&e!=="in"&&i in n.out&&(e||n.key!==i)&&(o=Ue(o,br(n.out,i)))),r!=="directed"&&typeof n.undirected<"u"&&i in n.undirected&&(o=Ue(o,br(n.undirected,i))),o}function Xu(r,e){const{name:n,type:i,direction:o}=e;r.prototype[n]=function(a,s){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return[];if(!arguments.length)return Ju(this,i);if(arguments.length===1){a=""+a;const l=this._nodes.get(a);if(typeof l>"u")throw new E("Graph.".concat(n,': could not find the "').concat(a,'" node in the graph.'));return qu(this.multi,i==="mixed"?this.type:i,o,l)}if(arguments.length===2){a=""+a,s=""+s;const l=this._nodes.get(a);if(!l)throw new E("Graph.".concat(n,': could not find the "').concat(a,'" source node in the graph.'));if(!this._nodes.has(s))throw new E("Graph.".concat(n,': could not find the "').concat(s,'" target node in the graph.'));return Zu(i,this.multi,o,l,s)}throw new k("Graph.".concat(n,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}function ec(r,e){const{name:n,type:i,direction:o}=e,a="forEach"+n[0].toUpperCase()+n.slice(1,-1);r.prototype[a]=function(c,d,h){if(!(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)){if(arguments.length===1)return h=c,Uo(!1,this,i,h);if(arguments.length===2){c=""+c,h=d;const p=this._nodes.get(c);if(typeof p>"u")throw new E("Graph.".concat(a,': could not find the "').concat(c,'" node in the graph.'));return Yr(!1,this.multi,i==="mixed"?this.type:i,o,p,h)}if(arguments.length===3){c=""+c,d=""+d;const p=this._nodes.get(c);if(!p)throw new E("Graph.".concat(a,': could not find the "').concat(c,'" source node in the graph.'));if(!this._nodes.has(d))throw new E("Graph.".concat(a,': could not find the "').concat(d,'" target node in the graph.'));return Zr(!1,i,this.multi,o,p,d,h)}throw new k("Graph.".concat(a,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))}};const s="map"+n[0].toUpperCase()+n.slice(1);r.prototype[s]=function(){const c=Array.prototype.slice.call(arguments),d=c.pop();let h;if(c.length===0){let p=0;i!=="directed"&&(p+=this.undirectedSize),i!=="undirected"&&(p+=this.directedSize),h=new Array(p);let g=0;c.push((m,w,N,L,T,M,b)=>{h[g++]=d(m,w,N,L,T,M,b)})}else h=[],c.push((p,g,m,w,N,L,T)=>{h.push(d(p,g,m,w,N,L,T))});return this[a].apply(this,c),h};const l="filter"+n[0].toUpperCase()+n.slice(1);r.prototype[l]=function(){const c=Array.prototype.slice.call(arguments),d=c.pop(),h=[];return c.push((p,g,m,w,N,L,T)=>{d(p,g,m,w,N,L,T)&&h.push(p)}),this[a].apply(this,c),h};const u="reduce"+n[0].toUpperCase()+n.slice(1);r.prototype[u]=function(){let c=Array.prototype.slice.call(arguments);if(c.length<2||c.length>4)throw new k("Graph.".concat(u,": invalid number of arguments (expecting 2, 3 or 4 and got ").concat(c.length,")."));if(typeof c[c.length-1]=="function"&&typeof c[c.length-2]!="function")throw new k("Graph.".concat(u,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));let d,h;c.length===2?(d=c[0],h=c[1],c=[]):c.length===3?(d=c[1],h=c[2],c=[c[0]]):c.length===4&&(d=c[2],h=c[3],c=[c[0],c[1]]);let p=h;return c.push((g,m,w,N,L,T,M)=>{p=d(p,g,m,w,N,L,T,M)}),this[a].apply(this,c),p}}function tc(r,e){const{name:n,type:i,direction:o}=e,a="find"+n[0].toUpperCase()+n.slice(1,-1);r.prototype[a]=function(u,c,d){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return!1;if(arguments.length===1)return d=u,Uo(!0,this,i,d);if(arguments.length===2){u=""+u,d=c;const h=this._nodes.get(u);if(typeof h>"u")throw new E("Graph.".concat(a,': could not find the "').concat(u,'" node in the graph.'));return Yr(!0,this.multi,i==="mixed"?this.type:i,o,h,d)}if(arguments.length===3){u=""+u,c=""+c;const h=this._nodes.get(u);if(!h)throw new E("Graph.".concat(a,': could not find the "').concat(u,'" source node in the graph.'));if(!this._nodes.has(c))throw new E("Graph.".concat(a,': could not find the "').concat(c,'" target node in the graph.'));return Zr(!0,i,this.multi,o,h,c,d)}throw new k("Graph.".concat(a,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))};const s="some"+n[0].toUpperCase()+n.slice(1,-1);r.prototype[s]=function(){const u=Array.prototype.slice.call(arguments),c=u.pop();return u.push((h,p,g,m,w,N,L)=>c(h,p,g,m,w,N,L)),!!this[a].apply(this,u)};const l="every"+n[0].toUpperCase()+n.slice(1,-1);r.prototype[l]=function(){const u=Array.prototype.slice.call(arguments),c=u.pop();return u.push((h,p,g,m,w,N,L)=>!c(h,p,g,m,w,N,L)),!this[a].apply(this,u)}}function nc(r,e){const{name:n,type:i,direction:o}=e,a=n.slice(0,-1)+"Entries";r.prototype[a]=function(s,l){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return _t();if(!arguments.length)return Ku(this,i);if(arguments.length===1){s=""+s;const u=this._nodes.get(s);if(!u)throw new E("Graph.".concat(a,': could not find the "').concat(s,'" node in the graph.'));return Yu(i,o,u)}if(arguments.length===2){s=""+s,l=""+l;const u=this._nodes.get(s);if(!u)throw new E("Graph.".concat(a,': could not find the "').concat(s,'" source node in the graph.'));if(!this._nodes.has(l))throw new E("Graph.".concat(a,': could not find the "').concat(l,'" target node in the graph.'));return Qu(i,o,u,l)}throw new k("Graph.".concat(a,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}function rc(r){Gu.forEach(e=>{Xu(r,e),ec(r,e),tc(r,e),nc(r,e)})}const ic=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function rr(){this.A=null,this.B=null}rr.prototype.wrap=function(r){this.A===null?this.A=r:this.B===null&&(this.B=r)};rr.prototype.has=function(r){return this.A!==null&&r in this.A||this.B!==null&&r in this.B};function Dt(r,e,n,i,o){for(const a in i){const s=i[a],l=s.source,u=s.target,c=l===n?u:l;if(e&&e.has(c.key))continue;const d=o(c.key,c.attributes);if(r&&d)return c.key}}function Qr(r,e,n,i,o){if(e!=="mixed"){if(e==="undirected")return Dt(r,null,i,i.undirected,o);if(typeof n=="string")return Dt(r,null,i,i[n],o)}const a=new rr;let s;if(e!=="undirected"){if(n!=="out"){if(s=Dt(r,null,i,i.in,o),r&&s)return s;a.wrap(i.in)}if(n!=="in"){if(s=Dt(r,a,i,i.out,o),r&&s)return s;a.wrap(i.out)}}if(e!=="directed"&&(s=Dt(r,a,i,i.undirected,o),r&&s))return s}function oc(r,e,n){if(r!=="mixed"){if(r==="undirected")return Object.keys(n.undirected);if(typeof e=="string")return Object.keys(n[e])}const i=[];return Qr(!1,r,e,n,function(o){i.push(o)}),i}function zt(r,e,n){const i=Object.keys(n),o=i.length;let a=0;return{[Symbol.iterator](){return this},next(){let s=null;do{if(a>=o)return r&&r.wrap(n),{done:!0};const l=n[i[a++]],u=l.source,c=l.target;if(s=u===e?c:u,r&&r.has(s.key)){s=null;continue}}while(s===null);return{done:!1,value:{neighbor:s.key,attributes:s.attributes}}}}}function ac(r,e,n){if(r!=="mixed"){if(r==="undirected")return zt(null,n,n.undirected);if(typeof e=="string")return zt(null,n,n[e])}let i=_t();const o=new rr;return r!=="undirected"&&(e!=="out"&&(i=Ue(i,zt(o,n,n.in))),e!=="in"&&(i=Ue(i,zt(o,n,n.out)))),r!=="directed"&&(i=Ue(i,zt(o,n,n.undirected))),i}function sc(r,e){const{name:n,type:i,direction:o}=e;r.prototype[n]=function(a){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return[];a=""+a;const s=this._nodes.get(a);if(typeof s>"u")throw new E("Graph.".concat(n,': could not find the "').concat(a,'" node in the graph.'));return oc(i==="mixed"?this.type:i,o,s)}}function lc(r,e){const{name:n,type:i,direction:o}=e,a="forEach"+n[0].toUpperCase()+n.slice(1,-1);r.prototype[a]=function(c,d){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return;c=""+c;const h=this._nodes.get(c);if(typeof h>"u")throw new E("Graph.".concat(a,': could not find the "').concat(c,'" node in the graph.'));Qr(!1,i==="mixed"?this.type:i,o,h,d)};const s="map"+n[0].toUpperCase()+n.slice(1);r.prototype[s]=function(c,d){const h=[];return this[a](c,(p,g)=>{h.push(d(p,g))}),h};const l="filter"+n[0].toUpperCase()+n.slice(1);r.prototype[l]=function(c,d){const h=[];return this[a](c,(p,g)=>{d(p,g)&&h.push(p)}),h};const u="reduce"+n[0].toUpperCase()+n.slice(1);r.prototype[u]=function(c,d,h){if(arguments.length<3)throw new k("Graph.".concat(u,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));let p=h;return this[a](c,(g,m)=>{p=d(p,g,m)}),p}}function uc(r,e){const{name:n,type:i,direction:o}=e,a=n[0].toUpperCase()+n.slice(1,-1),s="find"+a;r.prototype[s]=function(c,d){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return;c=""+c;const h=this._nodes.get(c);if(typeof h>"u")throw new E("Graph.".concat(s,': could not find the "').concat(c,'" node in the graph.'));return Qr(!0,i==="mixed"?this.type:i,o,h,d)};const l="some"+a;r.prototype[l]=function(c,d){return!!this[s](c,d)};const u="every"+a;r.prototype[u]=function(c,d){return!this[s](c,(p,g)=>!d(p,g))}}function cc(r,e){const{name:n,type:i,direction:o}=e,a=n.slice(0,-1)+"Entries";r.prototype[a]=function(s){if(i!=="mixed"&&this.type!=="mixed"&&i!==this.type)return _t();s=""+s;const l=this._nodes.get(s);if(typeof l>"u")throw new E("Graph.".concat(a,': could not find the "').concat(s,'" node in the graph.'));return ac(i==="mixed"?this.type:i,o,l)}}function dc(r){ic.forEach(e=>{sc(r,e),lc(r,e),uc(r,e),cc(r,e)})}function dn(r,e,n,i,o){const a=i._nodes.values(),s=i.type;let l,u,c,d,h,p;for(;l=a.next(),l.done!==!0;){let g=!1;if(u=l.value,s!=="undirected"){d=u.out;for(c in d){h=d[c];do p=h.target,g=!0,o(u.key,p.key,u.attributes,p.attributes,h.key,h.attributes,h.undirected),h=h.next;while(h)}}if(s!=="directed"){d=u.undirected;for(c in d)if(!(e&&u.key>c)){h=d[c];do p=h.target,p.key!==c&&(p=h.source),g=!0,o(u.key,p.key,u.attributes,p.attributes,h.key,h.attributes,h.undirected),h=h.next;while(h)}}n&&!g&&o(u.key,null,u.attributes,null,null,null,null)}}function hc(r,e){const n={key:r};return $o(e.attributes)||(n.attributes=oe({},e.attributes)),n}function pc(r,e,n){const i={key:e,source:n.source.key,target:n.target.key};return $o(n.attributes)||(i.attributes=oe({},n.attributes)),r==="mixed"&&n.undirected&&(i.undirected=!0),i}function fc(r){if(!de(r))throw new k('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in r))throw new k("Graph.import: serialized node is missing its key.");if("attributes"in r&&(!de(r.attributes)||r.attributes===null))throw new k("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function gc(r){if(!de(r))throw new k('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in r))throw new k("Graph.import: serialized edge is missing its source.");if(!("target"in r))throw new k("Graph.import: serialized edge is missing its target.");if("attributes"in r&&(!de(r.attributes)||r.attributes===null))throw new k("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in r&&typeof r.undirected!="boolean")throw new k("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const mc=bu(),yc=new Set(["directed","undirected","mixed"]),Mi=new Set(["domain","_events","_eventsCount","_maxListeners"]),bc=[{name:r=>"".concat(r,"Edge"),generateKey:!0},{name:r=>"".concat(r,"DirectedEdge"),generateKey:!0,type:"directed"},{name:r=>"".concat(r,"UndirectedEdge"),generateKey:!0,type:"undirected"},{name:r=>"".concat(r,"EdgeWithKey")},{name:r=>"".concat(r,"DirectedEdgeWithKey"),type:"directed"},{name:r=>"".concat(r,"UndirectedEdgeWithKey"),type:"undirected"}],wc={allowSelfLoops:!0,multi:!1,type:"mixed"};function vc(r,e,n){if(n&&!de(n))throw new k('Graph.addNode: invalid attributes. Expecting an object but got "'.concat(n,'"'));if(e=""+e,n=n||{},r._nodes.has(e))throw new D('Graph.addNode: the "'.concat(e,'" node already exist in the graph.'));const i=new r.NodeDataClass(e,n);return r._nodes.set(e,i),r.emit("nodeAdded",{key:e,attributes:n}),i}function Pi(r,e,n){const i=new r.NodeDataClass(e,n);return r._nodes.set(e,i),r.emit("nodeAdded",{key:e,attributes:n}),i}function Vo(r,e,n,i,o,a,s,l){if(!i&&r.type==="undirected")throw new D("Graph.".concat(e,": you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead."));if(i&&r.type==="directed")throw new D("Graph.".concat(e,": you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead."));if(l&&!de(l))throw new k("Graph.".concat(e,': invalid attributes. Expecting an object but got "').concat(l,'"'));if(a=""+a,s=""+s,l=l||{},!r.allowSelfLoops&&a===s)throw new D("Graph.".concat(e,': source & target are the same ("').concat(a,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));const u=r._nodes.get(a),c=r._nodes.get(s);if(!u)throw new E("Graph.".concat(e,': source node "').concat(a,'" not found.'));if(!c)throw new E("Graph.".concat(e,': target node "').concat(s,'" not found.'));const d={key:null,undirected:i,source:a,target:s,attributes:l};if(n)o=r._edgeKeyGenerator();else if(o=""+o,r._edges.has(o))throw new D("Graph.".concat(e,': the "').concat(o,'" edge already exists in the graph.'));if(!r.multi&&(i?typeof u.undirected[s]<"u":typeof u.out[s]<"u"))throw new D("Graph.".concat(e,': an edge linking "').concat(a,'" to "').concat(s,"\" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option."));const h=new Lt(i,o,u,c,l);r._edges.set(o,h);const p=a===s;return i?(u.undirectedDegree++,c.undirectedDegree++,p&&(u.undirectedLoops++,r._undirectedSelfLoopCount++)):(u.outDegree++,c.inDegree++,p&&(u.directedLoops++,r._directedSelfLoopCount++)),r.multi?h.attachMulti():h.attach(),i?r._undirectedSize++:r._directedSize++,d.key=o,r.emit("edgeAdded",d),o}function xc(r,e,n,i,o,a,s,l,u){if(!i&&r.type==="undirected")throw new D("Graph.".concat(e,": you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead."));if(i&&r.type==="directed")throw new D("Graph.".concat(e,": you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead."));if(l){if(u){if(typeof l!="function")throw new k("Graph.".concat(e,': invalid updater function. Expecting a function but got "').concat(l,'"'))}else if(!de(l))throw new k("Graph.".concat(e,': invalid attributes. Expecting an object but got "').concat(l,'"'))}a=""+a,s=""+s;let c;if(u&&(c=l,l=void 0),!r.allowSelfLoops&&a===s)throw new D("Graph.".concat(e,': source & target are the same ("').concat(a,"\"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false."));let d=r._nodes.get(a),h=r._nodes.get(s),p,g;if(!n&&(p=r._edges.get(o),p)){if((p.source.key!==a||p.target.key!==s)&&(!i||p.source.key!==s||p.target.key!==a))throw new D("Graph.".concat(e,': inconsistency detected when attempting to merge the "').concat(o,'" edge with "').concat(a,'" source & "').concat(s,'" target vs. ("').concat(p.source.key,'", "').concat(p.target.key,'").'));g=p}if(!g&&!r.multi&&d&&(g=i?d.undirected[s]:d.out[s]),g){const T=[g.key,!1,!1,!1];if(u?!c:!l)return T;if(u){const M=g.attributes;g.attributes=c(M),r.emit("edgeAttributesUpdated",{type:"replace",key:g.key,attributes:g.attributes})}else oe(g.attributes,l),r.emit("edgeAttributesUpdated",{type:"merge",key:g.key,attributes:g.attributes,data:l});return T}l=l||{},u&&c&&(l=c(l));const m={key:null,undirected:i,source:a,target:s,attributes:l};if(n)o=r._edgeKeyGenerator();else if(o=""+o,r._edges.has(o))throw new D("Graph.".concat(e,': the "').concat(o,'" edge already exists in the graph.'));let w=!1,N=!1;d||(d=Pi(r,a,{}),w=!0,a===s&&(h=d,N=!0)),h||(h=Pi(r,s,{}),N=!0),p=new Lt(i,o,d,h,l),r._edges.set(o,p);const L=a===s;return i?(d.undirectedDegree++,h.undirectedDegree++,L&&(d.undirectedLoops++,r._undirectedSelfLoopCount++)):(d.outDegree++,h.inDegree++,L&&(d.directedLoops++,r._directedSelfLoopCount++)),r.multi?p.attachMulti():p.attach(),i?r._undirectedSize++:r._directedSize++,m.key=o,r.emit("edgeAdded",m),[o,!0,w,N]}function yt(r,e){r._edges.delete(e.key);const{source:n,target:i,attributes:o}=e,a=e.undirected,s=n===i;a?(n.undirectedDegree--,i.undirectedDegree--,s&&(n.undirectedLoops--,r._undirectedSelfLoopCount--)):(n.outDegree--,i.inDegree--,s&&(n.directedLoops--,r._directedSelfLoopCount--)),r.multi?e.detachMulti():e.detach(),a?r._undirectedSize--:r._directedSize--,r.emit("edgeDropped",{key:e.key,attributes:o,source:n.key,target:i.key,undirected:a})}class W extends mu.EventEmitter{constructor(e){if(super(),e=oe({},wc,e),typeof e.multi!="boolean")throw new k("Graph.constructor: invalid 'multi' option. Expecting a boolean but got \"".concat(e.multi,'".'));if(!yc.has(e.type))throw new k('Graph.constructor: invalid \'type\' option. Should be one of "mixed", "directed" or "undirected" but got "'.concat(e.type,'".'));if(typeof e.allowSelfLoops!="boolean")throw new k("Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got \"".concat(e.allowSelfLoops,'".'));const n=e.type==="mixed"?Io:e.type==="directed"?Do:zo;Ne(this,"NodeDataClass",n);const i="geid_"+mc()+"_";let o=0;const a=()=>{let s;do s=i+o++;while(this._edges.has(s));return s};Ne(this,"_attributes",{}),Ne(this,"_nodes",new Map),Ne(this,"_edges",new Map),Ne(this,"_directedSize",0),Ne(this,"_undirectedSize",0),Ne(this,"_directedSelfLoopCount",0),Ne(this,"_undirectedSelfLoopCount",0),Ne(this,"_edgeKeyGenerator",a),Ne(this,"_options",e),Mi.forEach(s=>Ne(this,s,this[s])),Te(this,"order",()=>this._nodes.size),Te(this,"size",()=>this._edges.size),Te(this,"directedSize",()=>this._directedSize),Te(this,"undirectedSize",()=>this._undirectedSize),Te(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),Te(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),Te(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),Te(this,"multi",this._options.multi),Te(this,"type",this._options.type),Te(this,"allowSelfLoops",this._options.allowSelfLoops),Te(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(e){return this._nodes.has(""+e)}hasDirectedEdge(e,n){if(this.type==="undirected")return!1;if(arguments.length===1){const i=""+e,o=this._edges.get(i);return!!o&&!o.undirected}else if(arguments.length===2){e=""+e,n=""+n;const i=this._nodes.get(e);return i?i.out.hasOwnProperty(n):!1}throw new k("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))}hasUndirectedEdge(e,n){if(this.type==="directed")return!1;if(arguments.length===1){const i=""+e,o=this._edges.get(i);return!!o&&o.undirected}else if(arguments.length===2){e=""+e,n=""+n;const i=this._nodes.get(e);return i?i.undirected.hasOwnProperty(n):!1}throw new k("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))}hasEdge(e,n){if(arguments.length===1){const i=""+e;return this._edges.has(i)}else if(arguments.length===2){e=""+e,n=""+n;const i=this._nodes.get(e);return i?typeof i.out<"u"&&i.out.hasOwnProperty(n)||typeof i.undirected<"u"&&i.undirected.hasOwnProperty(n):!1}throw new k("Graph.hasEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))}directedEdge(e,n){if(this.type==="undirected")return;if(e=""+e,n=""+n,this.multi)throw new D("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const i=this._nodes.get(e);if(!i)throw new E('Graph.directedEdge: could not find the "'.concat(e,'" source node in the graph.'));if(!this._nodes.has(n))throw new E('Graph.directedEdge: could not find the "'.concat(n,'" target node in the graph.'));const o=i.out&&i.out[n]||void 0;if(o)return o.key}undirectedEdge(e,n){if(this.type==="directed")return;if(e=""+e,n=""+n,this.multi)throw new D("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const i=this._nodes.get(e);if(!i)throw new E('Graph.undirectedEdge: could not find the "'.concat(e,'" source node in the graph.'));if(!this._nodes.has(n))throw new E('Graph.undirectedEdge: could not find the "'.concat(n,'" target node in the graph.'));const o=i.undirected&&i.undirected[n]||void 0;if(o)return o.key}edge(e,n){if(this.multi)throw new D("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");e=""+e,n=""+n;const i=this._nodes.get(e);if(!i)throw new E('Graph.edge: could not find the "'.concat(e,'" source node in the graph.'));if(!this._nodes.has(n))throw new E('Graph.edge: could not find the "'.concat(n,'" target node in the graph.'));const o=i.out&&i.out[n]||i.undirected&&i.undirected[n]||void 0;if(o)return o.key}areDirectedNeighbors(e,n){e=""+e,n=""+n;const i=this._nodes.get(e);if(!i)throw new E('Graph.areDirectedNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?!1:n in i.in||n in i.out}areOutNeighbors(e,n){e=""+e,n=""+n;const i=this._nodes.get(e);if(!i)throw new E('Graph.areOutNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?!1:n in i.out}areInNeighbors(e,n){e=""+e,n=""+n;const i=this._nodes.get(e);if(!i)throw new E('Graph.areInNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?!1:n in i.in}areUndirectedNeighbors(e,n){e=""+e,n=""+n;const i=this._nodes.get(e);if(!i)throw new E('Graph.areUndirectedNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type==="directed"?!1:n in i.undirected}areNeighbors(e,n){e=""+e,n=""+n;const i=this._nodes.get(e);if(!i)throw new E('Graph.areNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type!=="undirected"&&(n in i.in||n in i.out)||this.type!=="directed"&&n in i.undirected}areInboundNeighbors(e,n){e=""+e,n=""+n;const i=this._nodes.get(e);if(!i)throw new E('Graph.areInboundNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type!=="undirected"&&n in i.in||this.type!=="directed"&&n in i.undirected}areOutboundNeighbors(e,n){e=""+e,n=""+n;const i=this._nodes.get(e);if(!i)throw new E('Graph.areOutboundNeighbors: could not find the "'.concat(e,'" node in the graph.'));return this.type!=="undirected"&&n in i.out||this.type!=="directed"&&n in i.undirected}inDegree(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new E('Graph.inDegree: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?0:n.inDegree}outDegree(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new E('Graph.outDegree: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?0:n.outDegree}directedDegree(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new E('Graph.directedDegree: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?0:n.inDegree+n.outDegree}undirectedDegree(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new E('Graph.undirectedDegree: could not find the "'.concat(e,'" node in the graph.'));return this.type==="directed"?0:n.undirectedDegree}inboundDegree(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new E('Graph.inboundDegree: could not find the "'.concat(e,'" node in the graph.'));let i=0;return this.type!=="directed"&&(i+=n.undirectedDegree),this.type!=="undirected"&&(i+=n.inDegree),i}outboundDegree(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new E('Graph.outboundDegree: could not find the "'.concat(e,'" node in the graph.'));let i=0;return this.type!=="directed"&&(i+=n.undirectedDegree),this.type!=="undirected"&&(i+=n.outDegree),i}degree(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new E('Graph.degree: could not find the "'.concat(e,'" node in the graph.'));let i=0;return this.type!=="directed"&&(i+=n.undirectedDegree),this.type!=="undirected"&&(i+=n.inDegree+n.outDegree),i}inDegreeWithoutSelfLoops(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new E('Graph.inDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?0:n.inDegree-n.directedLoops}outDegreeWithoutSelfLoops(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new E('Graph.outDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?0:n.outDegree-n.directedLoops}directedDegreeWithoutSelfLoops(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new E('Graph.directedDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return this.type==="undirected"?0:n.inDegree+n.outDegree-n.directedLoops*2}undirectedDegreeWithoutSelfLoops(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new E('Graph.undirectedDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));return this.type==="directed"?0:n.undirectedDegree-n.undirectedLoops*2}inboundDegreeWithoutSelfLoops(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new E('Graph.inboundDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));let i=0,o=0;return this.type!=="directed"&&(i+=n.undirectedDegree,o+=n.undirectedLoops*2),this.type!=="undirected"&&(i+=n.inDegree,o+=n.directedLoops),i-o}outboundDegreeWithoutSelfLoops(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new E('Graph.outboundDegreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));let i=0,o=0;return this.type!=="directed"&&(i+=n.undirectedDegree,o+=n.undirectedLoops*2),this.type!=="undirected"&&(i+=n.outDegree,o+=n.directedLoops),i-o}degreeWithoutSelfLoops(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new E('Graph.degreeWithoutSelfLoops: could not find the "'.concat(e,'" node in the graph.'));let i=0,o=0;return this.type!=="directed"&&(i+=n.undirectedDegree,o+=n.undirectedLoops*2),this.type!=="undirected"&&(i+=n.inDegree+n.outDegree,o+=n.directedLoops*2),i-o}source(e){e=""+e;const n=this._edges.get(e);if(!n)throw new E('Graph.source: could not find the "'.concat(e,'" edge in the graph.'));return n.source.key}target(e){e=""+e;const n=this._edges.get(e);if(!n)throw new E('Graph.target: could not find the "'.concat(e,'" edge in the graph.'));return n.target.key}extremities(e){e=""+e;const n=this._edges.get(e);if(!n)throw new E('Graph.extremities: could not find the "'.concat(e,'" edge in the graph.'));return[n.source.key,n.target.key]}opposite(e,n){e=""+e,n=""+n;const i=this._edges.get(n);if(!i)throw new E('Graph.opposite: could not find the "'.concat(n,'" edge in the graph.'));const o=i.source.key,a=i.target.key;if(e===o)return a;if(e===a)return o;throw new E('Graph.opposite: the "'.concat(e,'" node is not attached to the "').concat(n,'" edge (').concat(o,", ").concat(a,")."))}hasExtremity(e,n){e=""+e,n=""+n;const i=this._edges.get(e);if(!i)throw new E('Graph.hasExtremity: could not find the "'.concat(e,'" edge in the graph.'));return i.source.key===n||i.target.key===n}isUndirected(e){e=""+e;const n=this._edges.get(e);if(!n)throw new E('Graph.isUndirected: could not find the "'.concat(e,'" edge in the graph.'));return n.undirected}isDirected(e){e=""+e;const n=this._edges.get(e);if(!n)throw new E('Graph.isDirected: could not find the "'.concat(e,'" edge in the graph.'));return!n.undirected}isSelfLoop(e){e=""+e;const n=this._edges.get(e);if(!n)throw new E('Graph.isSelfLoop: could not find the "'.concat(e,'" edge in the graph.'));return n.source===n.target}addNode(e,n){return vc(this,e,n).key}mergeNode(e,n){if(n&&!de(n))throw new k('Graph.mergeNode: invalid attributes. Expecting an object but got "'.concat(n,'"'));e=""+e,n=n||{};let i=this._nodes.get(e);return i?(n&&(oe(i.attributes,n),this.emit("nodeAttributesUpdated",{type:"merge",key:e,attributes:i.attributes,data:n})),[e,!1]):(i=new this.NodeDataClass(e,n),this._nodes.set(e,i),this.emit("nodeAdded",{key:e,attributes:n}),[e,!0])}updateNode(e,n){if(n&&typeof n!="function")throw new k('Graph.updateNode: invalid updater function. Expecting a function but got "'.concat(n,'"'));e=""+e;let i=this._nodes.get(e);if(i){if(n){const a=i.attributes;i.attributes=n(a),this.emit("nodeAttributesUpdated",{type:"replace",key:e,attributes:i.attributes})}return[e,!1]}const o=n?n({}):{};return i=new this.NodeDataClass(e,o),this._nodes.set(e,i),this.emit("nodeAdded",{key:e,attributes:o}),[e,!0]}dropNode(e){e=""+e;const n=this._nodes.get(e);if(!n)throw new E('Graph.dropNode: could not find the "'.concat(e,'" node in the graph.'));let i;if(this.type!=="undirected"){for(const o in n.out){i=n.out[o];do yt(this,i),i=i.next;while(i)}for(const o in n.in){i=n.in[o];do yt(this,i),i=i.next;while(i)}}if(this.type!=="directed")for(const o in n.undirected){i=n.undirected[o];do yt(this,i),i=i.next;while(i)}this._nodes.delete(e),this.emit("nodeDropped",{key:e,attributes:n.attributes})}dropEdge(e){let n;if(arguments.length>1){const i=""+arguments[0],o=""+arguments[1];if(n=_e(this,i,o,this.type),!n)throw new E('Graph.dropEdge: could not find the "'.concat(i,'" -> "').concat(o,'" edge in the graph.'))}else if(e=""+e,n=this._edges.get(e),!n)throw new E('Graph.dropEdge: could not find the "'.concat(e,'" edge in the graph.'));return yt(this,n),this}dropDirectedEdge(e,n){if(arguments.length<2)throw new D("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new D("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");e=""+e,n=""+n;const i=_e(this,e,n,"directed");if(!i)throw new E('Graph.dropDirectedEdge: could not find a "'.concat(e,'" -> "').concat(n,'" edge in the graph.'));return yt(this,i),this}dropUndirectedEdge(e,n){if(arguments.length<2)throw new D("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new D("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const i=_e(this,e,n,"undirected");if(!i)throw new E('Graph.dropUndirectedEdge: could not find a "'.concat(e,'" -> "').concat(n,'" edge in the graph.'));return yt(this,i),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const e=this._nodes.values();let n;for(;n=e.next(),n.done!==!0;)n.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(e){return this._attributes[e]}getAttributes(){return this._attributes}hasAttribute(e){return this._attributes.hasOwnProperty(e)}setAttribute(e,n){return this._attributes[e]=n,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this}updateAttribute(e,n){if(typeof n!="function")throw new k("Graph.updateAttribute: updater should be a function.");const i=this._attributes[e];return this._attributes[e]=n(i),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this}removeAttribute(e){return delete this._attributes[e],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:e}),this}replaceAttributes(e){if(!de(e))throw new k("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=e,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(e){if(!de(e))throw new k("Graph.mergeAttributes: provided attributes are not a plain object.");return oe(this._attributes,e),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:e}),this}updateAttributes(e){if(typeof e!="function")throw new k("Graph.updateAttributes: provided updater is not a function.");return this._attributes=e(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(e,n){if(typeof e!="function")throw new k("Graph.updateEachNodeAttributes: expecting an updater function.");if(n&&!Oi(n))throw new k("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const i=this._nodes.values();let o,a;for(;o=i.next(),o.done!==!0;)a=o.value,a.attributes=e(a.key,a.attributes);this.emit("eachNodeAttributesUpdated",{hints:n||null})}updateEachEdgeAttributes(e,n){if(typeof e!="function")throw new k("Graph.updateEachEdgeAttributes: expecting an updater function.");if(n&&!Oi(n))throw new k("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const i=this._edges.values();let o,a,s,l;for(;o=i.next(),o.done!==!0;)a=o.value,s=a.source,l=a.target,a.attributes=e(a.key,a.attributes,s.key,l.key,s.attributes,l.attributes,a.undirected);this.emit("eachEdgeAttributesUpdated",{hints:n||null})}forEachAdjacencyEntry(e){if(typeof e!="function")throw new k("Graph.forEachAdjacencyEntry: expecting a callback.");dn(!1,!1,!1,this,e)}forEachAdjacencyEntryWithOrphans(e){if(typeof e!="function")throw new k("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");dn(!1,!1,!0,this,e)}forEachAssymetricAdjacencyEntry(e){if(typeof e!="function")throw new k("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");dn(!1,!0,!1,this,e)}forEachAssymetricAdjacencyEntryWithOrphans(e){if(typeof e!="function")throw new k("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");dn(!1,!0,!0,this,e)}nodes(){return Array.from(this._nodes.keys())}forEachNode(e){if(typeof e!="function")throw new k("Graph.forEachNode: expecting a callback.");const n=this._nodes.values();let i,o;for(;i=n.next(),i.done!==!0;)o=i.value,e(o.key,o.attributes)}findNode(e){if(typeof e!="function")throw new k("Graph.findNode: expecting a callback.");const n=this._nodes.values();let i,o;for(;i=n.next(),i.done!==!0;)if(o=i.value,e(o.key,o.attributes))return o.key}mapNodes(e){if(typeof e!="function")throw new k("Graph.mapNode: expecting a callback.");const n=this._nodes.values();let i,o;const a=new Array(this.order);let s=0;for(;i=n.next(),i.done!==!0;)o=i.value,a[s++]=e(o.key,o.attributes);return a}someNode(e){if(typeof e!="function")throw new k("Graph.someNode: expecting a callback.");const n=this._nodes.values();let i,o;for(;i=n.next(),i.done!==!0;)if(o=i.value,e(o.key,o.attributes))return!0;return!1}everyNode(e){if(typeof e!="function")throw new k("Graph.everyNode: expecting a callback.");const n=this._nodes.values();let i,o;for(;i=n.next(),i.done!==!0;)if(o=i.value,!e(o.key,o.attributes))return!1;return!0}filterNodes(e){if(typeof e!="function")throw new k("Graph.filterNodes: expecting a callback.");const n=this._nodes.values();let i,o;const a=[];for(;i=n.next(),i.done!==!0;)o=i.value,e(o.key,o.attributes)&&a.push(o.key);return a}reduceNodes(e,n){if(typeof e!="function")throw new k("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new k("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let i=n;const o=this._nodes.values();let a,s;for(;a=o.next(),a.done!==!0;)s=a.value,i=e(i,s.key,s.attributes);return i}nodeEntries(){const e=this._nodes.values();return{[Symbol.iterator](){return this},next(){const n=e.next();if(n.done)return n;const i=n.value;return{value:{node:i.key,attributes:i.attributes},done:!1}}}}export(){const e=new Array(this._nodes.size);let n=0;this._nodes.forEach((o,a)=>{e[n++]=hc(a,o)});const i=new Array(this._edges.size);return n=0,this._edges.forEach((o,a)=>{i[n++]=pc(this.type,a,o)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:e,edges:i}}import(e,n=!1){if(e instanceof W)return e.forEachNode((u,c)=>{n?this.mergeNode(u,c):this.addNode(u,c)}),e.forEachEdge((u,c,d,h,p,g,m)=>{n?m?this.mergeUndirectedEdgeWithKey(u,d,h,c):this.mergeDirectedEdgeWithKey(u,d,h,c):m?this.addUndirectedEdgeWithKey(u,d,h,c):this.addDirectedEdgeWithKey(u,d,h,c)}),this;if(!de(e))throw new k("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(e.attributes){if(!de(e.attributes))throw new k("Graph.import: invalid attributes. Expecting a plain object.");n?this.mergeAttributes(e.attributes):this.replaceAttributes(e.attributes)}let i,o,a,s,l;if(e.nodes){if(a=e.nodes,!Array.isArray(a))throw new k("Graph.import: invalid nodes. Expecting an array.");for(i=0,o=a.length;i{const a=oe({},i.attributes);i=new n.NodeDataClass(o,a),n._nodes.set(o,i)}),n}copy(e){if(e=e||{},typeof e.type=="string"&&e.type!==this.type&&e.type!=="mixed")throw new D('Graph.copy: cannot create an incompatible copy from "'.concat(this.type,'" type to "').concat(e.type,'" because this would mean losing information about the current graph.'));if(typeof e.multi=="boolean"&&e.multi!==this.multi&&e.multi!==!0)throw new D("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof e.allowSelfLoops=="boolean"&&e.allowSelfLoops!==this.allowSelfLoops&&e.allowSelfLoops!==!0)throw new D("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const n=this.emptyCopy(e),i=this._edges.values();let o,a;for(;o=i.next(),o.done!==!0;)a=o.value,Vo(n,"copy",!1,a.undirected,a.key,a.source.key,a.target.key,oe({},a.attributes));return n}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const e={};this._nodes.forEach((a,s)=>{e[s]=a.attributes});const n={},i={};this._edges.forEach((a,s)=>{const l=a.undirected?"--":"->";let u="",c=a.source.key,d=a.target.key,h;a.undirected&&c>d&&(h=c,c=d,d=h);const p="(".concat(c,")").concat(l,"(").concat(d,")");s.startsWith("geid_")?this.multi&&(typeof i[p]>"u"?i[p]=0:i[p]++,u+="".concat(i[p],". ")):u+="[".concat(s,"]: "),u+=p,n[u]=a.attributes});const o={};for(const a in this)this.hasOwnProperty(a)&&!Mi.has(a)&&typeof this[a]!="function"&&typeof a!="symbol"&&(o[a]=this[a]);return o.attributes=this._attributes,o.nodes=e,o.edges=n,Ne(o,"constructor",this.constructor),o}}typeof Symbol<"u"&&(W.prototype[Symbol.for("nodejs.util.inspect.custom")]=W.prototype.inspect);bc.forEach(r=>{["add","merge","update"].forEach(e=>{const n=r.name(e),i=e==="add"?Vo:xc;r.generateKey?W.prototype[n]=function(o,a,s){return i(this,n,!0,(r.type||this.type)==="undirected",null,o,a,s,e==="update")}:W.prototype[n]=function(o,a,s,l){return i(this,n,!1,(r.type||this.type)==="undirected",o,a,s,l,e==="update")}})});Tu(W);Fu(W);rc(W);dc(W);class Wo extends W{constructor(e){const n=oe({type:"directed"},e);if("multi"in n&&n.multi!==!1)throw new k("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(n.type!=="directed")throw new k('DirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class Ho extends W{constructor(e){const n=oe({type:"undirected"},e);if("multi"in n&&n.multi!==!1)throw new k("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(n.type!=="undirected")throw new k('UndirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class Jo extends W{constructor(e){const n=oe({multi:!0},e);if("multi"in n&&n.multi!==!0)throw new k("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(n)}}class Q extends W{constructor(e){const n=oe({type:"directed",multi:!0},e);if("multi"in n&&n.multi!==!0)throw new k("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(n.type!=="directed")throw new k('MultiDirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}class Ko extends W{constructor(e){const n=oe({type:"undirected",multi:!0},e);if("multi"in n&&n.multi!==!0)throw new k("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(n.type!=="undirected")throw new k('MultiUndirectedGraph.from: inconsistent "'+n.type+'" type in given options!');super(n)}}function Et(r){r.from=function(e,n){const i=oe({},e.options,n),o=new r(i);return o.import(e),o}}Et(W);Et(Wo);Et(Ho);Et(Jo);Et(Q);Et(Ko);W.Graph=W;W.DirectedGraph=Wo;W.UndirectedGraph=Ho;W.MultiGraph=Jo;W.MultiDirectedGraph=Q;W.MultiUndirectedGraph=Ko;W.InvalidArgumentsGraphError=k;W.NotFoundGraphError=E;W.UsageGraphError=D;var hn={},ji;function Sc(){if(ji)return hn;ji=1;var r=Cs();return hn.createRoot=r.createRoot,hn.hydrateRoot=r.hydrateRoot,hn}var Nc=Sc();const Rc="modulepreload",Cc=function(r){return"/rmp/"+r},$i={},Tt=function(e,n,i){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(n.map(u=>{if(u=Cc(u),u in $i)return;$i[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector('link[href="'.concat(u,'"]').concat(d)))return;const h=document.createElement("link");if(h.rel=c?"stylesheet":Rc,c||(h.as="script"),h.crossOrigin="",h.href=u,l&&h.setAttribute("nonce",l),document.head.appendChild(h),c)return new Promise((p,g)=>{h.addEventListener("load",p),h.addEventListener("error",()=>g(new Error("Unable to preload CSS for ".concat(u))))})}))}function a(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return o.then(s=>{for(const l of s||[])l.status==="rejected"&&a(l.reason);return e().catch(a)})};var qo=function(){if(typeof Map<"u")return Map;function r(e,n){var i=-1;return e.some(function(o,a){return o[0]===n?(i=a,!0):!1}),i}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var i=r(this.__entries__,n),o=this.__entries__[i];return o&&o[1]},e.prototype.set=function(n,i){var o=r(this.__entries__,n);~o?this.__entries__[o][1]=i:this.__entries__.push([n,i])},e.prototype.delete=function(n){var i=this.__entries__,o=r(i,n);~o&&i.splice(o,1)},e.prototype.has=function(n){return!!~r(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,i){i===void 0&&(i=null);for(var o=0,a=this.__entries__;o0},r.prototype.connect_=function(){!_r||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),kc?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},r.prototype.disconnect_=function(){!_r||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},r.prototype.onTransitionEnd_=function(e){var n=e.propertyName,i=n===void 0?"":n,o=Tc.some(function(a){return!!~i.indexOf(a)});o&&this.refresh()},r.getInstance=function(){return this.instance_||(this.instance_=new r),this.instance_},r.instance_=null,r}(),Yo=function(r,e){for(var n=0,i=Object.keys(e);n"u"||!(Element instanceof Object))){if(!(e instanceof Nt(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new Bc(e)),this.controller_.addObserver(this),this.controller_.refresh())}},r.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof Nt(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},r.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},r.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},r.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(i){return new Fc(i.target,i.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},r.prototype.clearActive=function(){this.activeObservations_.splice(0)},r.prototype.hasActive=function(){return this.activeObservations_.length>0},r}(),Qo=typeof WeakMap<"u"?new WeakMap:new qo,Xo=function(){function r(e){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Oc.getInstance(),i=new Gc(e,n,this);Qo.set(this,i)}return r}();["observe","unobserve","disconnect"].forEach(function(r){Xo.prototype[r]=function(){var e;return(e=Qo.get(this))[r].apply(e,arguments)}});var Uc=function(){return typeof Mn.ResizeObserver<"u"?Mn.ResizeObserver:Xo}();window.ResizeObserver||(window.ResizeObserver=Uc);var Lr=function(){return Lr=Object.assign||function(r){for(var e,n=1,i=arguments.length;n`";if(!i){const a=new Error(o);throw a.name="ContextError",(n=Error.captureStackTrace)==null||n.call(Error,a,e),a}return i}return[r.Provider,e,r]}function Jc(r){return r==null?void 0:r[0]}function wr(r){return r!=null&&r.length?r[r.length-1]:void 0}function ea(r,e,n=1,i=!0){if(e===0)return-1;let o=r+n;return r===-1&&(o=n>0?0:e-1),i?o=(o%e+e)%e:o=Math.max(0,Math.min(o,e-1)),o}function Kc(r,e,n=!0){return ea(r,e,-1,n)}function qc(r,e,n=!0){const i=ea(r,e.length,1,n);return e[i]}function Yc(r,e,n=!0){const i=Kc(r,e.length,n);return e[i]}function Xr(r){return Array.isArray(r)}function Zc(r){return Xr(r)&&r.length===0}function ei(r){return r!==null&&typeof r=="object"&&!Xr(r)}function Qc(r){return ei(r)&&Object.keys(r).length===0}function ta(r){return Xr(r)?Zc(r):ei(r)?Qc(r):r==null||r===""}function Nn(r){return typeof r>"u"}function na(r){return typeof r<"u"}function Xc(r,e){const n={};return e.forEach(i=>{i in r&&(n[i]=r[i])}),n}function ti(r,e){const n={...r};return e.forEach(i=>{delete n[i]}),n}function ed(r){return typeof r=="function"}function ie(r,...e){return ed(r)?r(...e):r}var or=function(r,e){for(var n,i=O.Children.toArray(r),o=0,a=i;o{var e;return(e=typeof r=="string"||typeof r=="number"?r:r[Object.keys(r)[0]])==null?void 0:e.toString()},td=(r,e)=>typeof r!="string"||ta(e)?r:r.toString().replace(new RegExp(od(e),"gi"),n=>"".concat(n,"")),nd=r=>ra(r,e=>{var n;return((n=e==null?void 0:e.type)==null?void 0:n.displayName)==="AutoCompleteItem"}).map(e=>{const n=Xc(e.props,["value","label","fixed","disabled"]),{getValue:i=ni}=e.props,o=i(n.value);return{...na(n.label)?n:{...n,label:o},value:o,originalValue:n.value}}),rd=()=>({bg:"whiteAlpha.100",_light:{bg:"gray.200"}}),id=(r,e,n)=>(e==null?void 0:e.toLowerCase().indexOf(r==null?void 0:r.toLowerCase()))>=0||(n==null?void 0:n.toLowerCase().indexOf(r==null?void 0:r.toLowerCase()))>=0||Di(r,e)>=.5||Di(r,n)>=.5;function od(r){return r.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}const ad=(r,e)=>or(r,n=>{var i;return((i=n==null?void 0:n.type)==null?void 0:i.displayName)==="AutoCompleteItem"&&n.props.value===(e==null?void 0:e.value)}),sd=(r,e)=>or(r,n=>{var i;return((i=n==null?void 0:n.type)==null?void 0:i.displayName)==="AutoCompleteItem"&&n.props.value===(e==null?void 0:e.value)}),ld=(r,e)=>na(or(r,n=>{var i,o;const a=ie(((i=n.props)==null?void 0:i.getValue)||ni,((o=n.props)==null?void 0:o.value)||{});return e.some(s=>s.value===a)})),ud=(r,e)=>{const n={},i={},{field:o}=r;return o&&Object.keys(o).forEach(a=>{if(a.startsWith("--input")===!1)n[a]=o[a];else{let s=o[a];const l=a.replace("--input-","").replace(/-([a-z])/g,function(u){return u[1].toUpperCase()});s.indexOf(".")!==-1&&(s=s.substring(s.indexOf(".")+1)),i[l]=s}}),{...e&&{...n,...i,_focusWithin:r.field._focus,pos:"relative",minH:9,py:1.5,spacing:3},cursor:"text",h:"fit-content"}};function cd(r){var e;let{prefocusFirstItem:n=!0,closeOnBlur:i=!0,creatable:o,emphasize:a,emptyState:s=!0,defaultEmptyStateProps:l={},freeSolo:u,isReadOnly:c,listAllValuesOnFocus:d,maxSuggestions:h,multiple:p,closeOnSelect:g=!p,defaultValue:m,defaultValues:w=m?[m]:[],onReady:N,defaultIsOpen:L,disableFilter:T,isLoading:M=!1,placement:b="bottom",restoreOnBlurIfEmpty:y=!u,shouldRenderSuggestions:x=()=>!0,submitKeys:v=[],suggestWhenEmpty:C,value:R,values:_=R?typeof R=="string"?[R]:[...R]:void 0}=r;u=u||(p?!0:r.freeSolo);const{isOpen:P,onClose:B,onOpen:V}=Ga({defaultIsOpen:L}),Y=O.useMemo(()=>ie(r.children,{isOpen:P,onClose:B,onOpen:V}),[r.children,P]),ee=O.useMemo(()=>nd(Y),[Y]),me=O.useRef(null),kt=O.useRef(null),ae=O.useRef(null),ye=O.useRef(null),[We,rt]=O.useState(!1);let dt="";p?dt="":Nn(w)?Nn(_)||(dt=_[0]):dt=w[0];const[je,Ot]=O.useState(dt!=null?dt:""),sr=O.useMemo(()=>T?ee:ee.filter(I=>I.fixed||ie(r.filter||id,je,I.value,I.label)||We).filter((I,K)=>h?I.fixed||K[...sr,...ui],[sr,ui]),[$e,lr]=Ua({defaultValue:w.map(I=>I==null?void 0:I.toString()),value:_,onChange:I=>{const K=ue.find(Z=>Z.value===I[0]);if(!K)return;const ce=I.map(Z=>ue.find(Le=>Le.value===Z));ie(r.onChange,p?I:I[0],p?ce:K)}});O.useEffect(()=>{ue.length===0&&!s&&P&&B()},[ue.length,s,P]);const[ht,He]=O.useState(n?(e=ee[0])==null?void 0:e.value:null),Ea=r.maxSelections||$e.length+1,ur=ue.findIndex(I=>I.value===ht),ci=qc(ur,ue,!!r.rollNavigation),di=Yc(ur,ue,!!r.rollNavigation),it=Jc(ue),hi=wr(ue),pi=!ue.some(I=>I.value===ht);O.useEffect(()=>{var I;pi&&He(n?(I=ee[0])==null?void 0:I.value:null)},[pi]),Va(()=>{n&&He(it==null?void 0:it.value)},[je,it==null?void 0:it.value]),O.useEffect(()=>{var I;!P&&n&&He((I=ee[0])==null?void 0:I.value)},[P]),O.useEffect(()=>{P&&d&&rt(!0)},[P,d,rt]),O.useEffect(()=>{const I=ee.find(K=>K.value===ht);ie(r.onOptionFocus,{item:I,focusMethod:ye.current,isNewInput:I==null?void 0:I.creatable})},[ht,r.onOptionFocus]);const cr=I=>{var K,ce;const Z=ue.find(ve=>ve.value===I),Le=(Z==null?void 0:Z.label)||(Z==null?void 0:Z.value);Ot(()=>p?"":Le!=null?Le:""),!$e.includes(I)&&$e.lengthp?[...ve,I]:[I]),p&&((K=me.current)==null||K.focus()),r.focusInputOnSelect&&((ce=me.current)==null||ce.focus()),ie(r.onSelectOption,{item:Z,selectMethod:ye.current,isNewInput:Z==null?void 0:Z.creatable}),Z!=null&&Z.creatable&&ie(r.onCreateOption,{item:ti(Z,["noFilter"]),selectMethod:ye.current}),g&&B()},fi=(I,K)=>{var ce;lr(ve=>{const ot=ee.find(Je=>Je.value===I);return ot?(ie(r.onTagRemoved,I,ot,ve),ve.filter(Je=>Je!==I)):ve});const Z=ee.find(ve=>ve.value===I),Le=(Z==null?void 0:Z.label)||(Z==null?void 0:Z.value);je===Le&&Ot(""),K&&((ce=me.current)==null||ce.focus())},Ta=I=>{var K;lr([]),I&&((K=me.current)==null||K.focus())},gi=p?$e.map(I=>{var K;return{label:((K=ee.find(ce=>ce.value===(I==null?void 0:I.toString())))==null?void 0:K.label)||I,onRemove:()=>fi(I)}}):[];return O.useEffect(()=>{ie(N,{tags:gi})},[$e]),{autoCompleteProps:r,children:Y,filteredList:ue,filteredResults:sr,focusedValue:ht,defaultEmptyStateProps:l,getEmptyStateProps:I=>{if(ue.every(K=>K.noFilter)&&s&&!o)return typeof s=="boolean"?I:ie(s,{query:je})},getGroupProps:I=>{const K=ld(I.children,ue);return{divider:{hasFirstChild:ad(I.children,it),hasLastChild:sd(I.children,wr(ue.filter(ce=>Nn(ce==null?void 0:ce.noFilter))))},group:{display:K?"initial":"none"}}},getInputProps:(I,K)=>{const{onBlur:ce,onChange:Z,onFocus:Le,onKeyDown:ve,variant:ot,...Je}=I;return{wrapper:{ref:kt,onClick:()=>{var H;(H=me==null?void 0:me.current)==null||H.focus()},...ud(K,p),...Je},input:{isReadOnly:c,onFocus:H=>{ie(Le,H),r.openOnFocus&&!c&&V(),r.selectOnFocus&&H.target.select(),d&&rt(!0)},onBlur:H=>{var Ee,be;ie(ce,H);const we=H.relatedTarget===(ae==null?void 0:ae.current)||((Ee=ae.current)==null?void 0:Ee.contains(H.relatedTarget)),dr=(be=kt.current)==null?void 0:be.contains(H.relatedTarget);if(!we&&!dr&&(i&&B(),!$e.includes(H.target.value)&&y)){const hr=wr($e),pt=ee.find(pr=>pr.value===hr),Ie=(pt==null?void 0:pt.label)||(pt==null?void 0:pt.value)||"";Ot(Ie)}},onChange:H=>{const Ee=H.target.value;ie(Z,H),Ot(Ee);const be=ta(Ee);ie(x,Ee)&&(!be||C)?V():B(),rt(!1)},onKeyDown:H=>{var Ee;ie(ve,H),ye.current="keyboard";const{key:be}=H,we=ue[ur];if(["Enter",...v].includes(be)){we&&!(we!=null&&we.disabled)&&P?cr(we==null?void 0:we.value):(Ee=me.current)==null||Ee.focus(),H.preventDefault();return}if(be==="ArrowDown"){P?He(ci==null?void 0:ci.value):V(),H.preventDefault();return}if(be==="ArrowUp"){P?He(di==null?void 0:di.value):V(),H.preventDefault();return}if(be==="Tab"){P&&we&&!(we!=null&&we.disabled)?cr(we==null?void 0:we.value):B();return}if(be==="Home"){He(it==null?void 0:it.value),H.preventDefault();return}if(be==="End"){He(hi==null?void 0:hi.value),H.preventDefault();return}be==="Escape"&&(B(),H.preventDefault())},value:je,variant:p?"unstyled":ot,...Je}}},getItemProps:(I,K)=>{var ce;const{_fixed:Z,_focus:Le,children:ve,disabled:ot,label:Je,value:H,fixed:Ee,getValue:be=ni,onClick:we,onMouseOver:dr,sx:hr,...pt}=I,Ie=K?H:(ce=be(H))==null?void 0:ce.toString(),pr=Ie===ht,ka=ue.findIndex(Mt=>Mt.value===Ie)>=0,fr=ve||Je||Ie;return{item:{...typeof fr!="string"||!a?{children:fr}:{dangerouslySetInnerHTML:{__html:td(fr,je)}},"aria-selected":$e.includes(Ie),"aria-disabled":ot,_disabled:{opacity:.4,cursor:"not-allowed",userSelect:"none"},onClick:Mt=>{var mi;ie(we,Mt),ot?(mi=me.current)==null||mi.focus():cr(Ie)},onMouseOver:Mt=>{ie(dr,Mt),He(Ie),ye.current="mouse"},sx:{...hr,mark:{color:"inherit",bg:"transparent",...ei(a)?a:{fontWeight:a?"extrabold":"inherit"}}},...pr&&(Le||rd()),...Ee&&Z,...pt},root:{isValidSuggestion:ka,value:Ie}}},inputRef:me,interactionRef:ye,isLoading:M,isOpen:P,itemList:ee,listRef:ae,onClose:B,onOpen:V,placement:b,query:je,removeItem:fi,resetItems:Ta,setQuery:Ot,tags:gi,value:R,values:$e}}const ia=ut((r,e)=>{const n=cd(r),{children:i,isOpen:o,onClose:a,onOpen:s,placement:l,resetItems:u,removeItem:c}=n;O.useImperativeHandle(e,()=>({resetItems:u,removeItem:c}));const{matchWidth:d=!0}=n.autoCompleteProps;return f.jsx(Wc,{value:n,children:f.jsx(io,{isLazy:!0,isOpen:o,autoFocus:!1,placement:l,closeOnBlur:!0,matchWidth:d,children:f.jsx(Rn.div,{w:"full",ref:e,children:i})})})});ia.displayName="AutoComplete";const oa=ut((r,e)=>{const{focusedValue:n,getItemProps:i,interactionRef:o}=nt(),a=O.useRef(),s=rn(e,a),l=i(r),{isValidSuggestion:u,value:c}=l.root,d=n===c;O.useEffect(()=>{var w;d&&o.current==="keyboard"&&((w=a==null?void 0:a.current)==null||w.scrollIntoView({behavior:"smooth",block:"nearest"}))},[d,o]),O.useEffect(()=>{typeof c!="string"&&console.warn("wow"),typeof c!="string"&&Nn(r.getValue)&&console.error("You must define the `getValue` prop, when an Item's value is not a string")},[]);const{children:h,dangerouslySetInnerHTML:p,...g}=l.item,m=ti(g,["groupId"]);return u?f.jsx(ke,{ref:s,...dd,...m,children:h||f.jsx("span",{dangerouslySetInnerHTML:p})}):null});oa.displayName="AutoCompleteItem";const dd={mx:"2",px:"2",py:"2",rounded:"md",cursor:"pointer"},hd=ut((r,e)=>{const{children:n,showDivider:i,...o}=r,a=ti(o,["groupSibling"]),{getGroupProps:s}=nt(),{group:l}=s(r),u=gd(r);return f.jsxs(oo,{ref:e,...l,...a,children:[f.jsx(yi,{...u.top}),n,f.jsx(yi,{...u.bottom})]})}),pd=ut((r,e)=>f.jsx(ke,{...fd,...r,ref:e}));hd.displayName="AutoCompleteGroup";pd.displayName="AutoCompleteGroupTitle";const fd={ml:5,my:1,fontSize:"xs",letterSpacing:"wider",fontWeight:"extrabold",textTransform:"uppercase"},gd=r=>{const{getGroupProps:e}=nt(),n=r.groupSibling,{divider:{hasFirstChild:i,hasLastChild:o}}=e(r),a={my:2,borderColor:r.dividerColor},s={...a,mb:4,display:!r.showDivider||i?"none":""},l={...a,display:!r.showDivider||o||n?"none":""};return{top:s,bottom:l}},zi=ut((r,e)=>{const{isLoading:n}=nt(),{loadingIcon:i,...o}=r;return f.jsxs(Wa,{children:[f.jsx(lo,{...o,ref:e}),n&&f.jsx(Ha,{children:i||f.jsx(so,{})})]})}),ri=ut((r,e)=>{const{autoCompleteProps:n,inputRef:i,getInputProps:o,tags:a,setQuery:s,value:l,itemList:u}=nt(),{children:c,isInvalid:d,hidePlaceholder:h,...p}=r,{value:g}=p;O.useEffect(()=>{if(l!==void 0&&(typeof l=="string"||l instanceof String)){const v=u.find(R=>R.value===l),C=v===void 0?l:v.label;s(C)}},[l]),O.useEffect(()=>{g!==void 0&&(typeof g=="string"||g instanceof String)&&s(g)},[g]);const m=Da("Input",r);let{wrapper:w,input:N}=o(p,m);const{ref:L,...T}=w,M=rn(e,i),b=ie(c,{tags:a});h&&(N={...N,placeholder:Array.isArray(b)&&b.length?void 0:N.placeholder});const y=f.jsx(zi,{isInvalid:d,...N,ref:M}),x=f.jsxs(za,{"aria-invalid":d,...T,ref:L,children:[b,f.jsx(ro,{as:zi,...N,ref:M})]});return f.jsx(Ba,{children:n.multiple?x:y})});ri.displayName="Input";ri.id="Input";const md=r=>{const{getEmptyStateProps:e,defaultEmptyStateProps:n}=nt(),i=e(f.jsx(ke,{...yd,...n,children:"No options found!"}));return f.jsx(oo,{...r,children:i})},yd={fontSize:"sm",align:"center",justify:"center",fontWeight:"bold",fontStyle:"italic"},Bi=["AutoCompleteGroup","AutoCompleteItem","AutoCompleteCreatable"],bd=r=>{const e=j.Children.map(r,(i,o)=>{var a;if(((a=i==null?void 0:i.type)==null?void 0:a.displayName)==="AutoCompleteGroup"){const s=j.Children.toArray(r)[o+1];return j.cloneElement(i,{groupSibling:s?s.type.displayName==="AutoCompleteGroup":!1})}return i}),n=j.Children.toArray(e).filter(i=>{var o;return!Bi.includes((o=i==null?void 0:i.type)==null?void 0:o.displayName)});return[j.Children.toArray(e).filter(i=>{var o;return Bi.includes((o=i==null?void 0:i.type)==null?void 0:o.displayName)}),n]},aa=ut((r,e)=>{const{children:n,loadingState:i,...o}=r,{listRef:a,isLoading:s}=nt(),l=rn(e,a),[u,c]=bd(n);return f.jsxs(ao,{ref:l,w:"inherit",...wd,...o,children:[s&&f.jsx(Fa,{children:i||f.jsx(so,{size:"md"})}),!s&&f.jsxs(f.Fragment,{children:[u,f.jsx(md,{}),c]})]})});aa.displayName="AutoCompleteList";const wd={py:"4",opacity:"0",bg:"#232934",rounded:"md",maxH:"350px",border:"none",shadow:"base",zIndex:"popover",overflowY:"auto",_light:{bg:"#ffffff"},_focus:{boxShadow:"none"}};O.memo(r=>{const{label:e,onRemove:n,disabled:i,...o}=r;return f.jsx(ro,{children:f.jsxs(ja,{borderRadius:"md",fontWeight:"normal",...i&&Fi,...o,children:[f.jsx($a,{children:e}),f.jsx(Ia,{onClick:()=>!i&&ie(n),cursor:"pointer",...i&&Fi})]})})});const Fi={cursor:"text",userSelect:"none",opacity:.4,_focus:{boxShadow:"none"}};var at=function(){return at=Object.assign||function(r){for(var e,n=1,i=arguments.length;n0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return a},Ui=function(r,e,n){if(n||arguments.length===2)for(var i=0,o=e.length,a;i0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return a},Rd=function(r,e){var n=r.validator,i=r.onDebouncedChange,o=r.delay,a=r.optionList,s=r.defaultValue;r.onChange;var l=Sd(r,["validator","onDebouncedChange","delay","optionList","defaultValue","onChange"]),u=O.useRef(null),c=rn(u,e),d=O.useRef("datalist-"+new Date().valueOf()),h=Nd(O.useState(!1),2),p=h[0],g=h[1],m=O.useRef();O.useEffect(function(){u.current&&(u.current.value=(s==null?void 0:s.toString())||"")},[s]);var w=function(L){var T=L.target.value;window.clearTimeout(m.current),n&&g(!n(T)),m.current=window.setTimeout(function(){i==null||i(T),m.current=void 0},o!=null?o:500)},N=function(L){var T=L.target.value;m.current!==void 0&&(window.clearTimeout(m.current),n&&g(!n(T)),i==null||i(T),m.current=void 0)};return f.jsxs(f.Fragment,{children:[f.jsx(lo,Er({ref:c,list:d.current,variant:"flushed",size:"sm",h:6,onChange:w,onBlur:N,isInvalid:p},l)),a&&f.jsx("datalist",{id:d.current,children:a==null?void 0:a.map(function(L,T){return f.jsx("option",{children:L},T)})})]})},Cd=O.forwardRef(Rd),Tr=function(){return Tr=Object.assign||function(r){for(var e,n=1,i=arguments.length;n0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return a},Td=function(r){switch(r){case Xe.DEV:return"red";case Xe.UAT:return"orange";case Xe.PRD:return"green"}};function Bb(r){var e=r.environment,n=r.version,i=r.popoverHeader,o=r.popoverBody,a=Ed(O.useState(!1),2),s=a[0],l=a[1];return f.jsxs(io,{isOpen:s,onOpen:function(){return i&&l(!0)},onClose:function(){return l(!1)},children:[f.jsx(qa,{children:f.jsx(uo,{ml:1,colorScheme:Td(e),title:"".concat(e,": ").concat(n),cursor:i?"pointer":"help",children:e===Xe.PRD?n:e})}),f.jsxs(ao,{children:[f.jsx(Ya,{}),f.jsx(Za,{}),f.jsx(Qa,{children:i}),f.jsx(Xa,{children:o})]})]})}var kd=function(r,e,n){var i=new Blob([n],{type:e});Od(r,i)},Od=function(r,e){var n=window.URL.createObjectURL(e),i=document.createElement("a");i.href=n,i.download=r,document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(n)},Md=function(r,e){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),o,a=[],s;try{for(;(e===void 0||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return a};function Pd(r){var e=r.cancelRef,n=r.isOpen,i=r.onClose,o=Md(O.useState(!1),2),a=o[0],s=o[1],l=function(){s(!0);var u=xe.storage.getAll(),c=xe.getAppName(),d="".concat(c,"_BACKUP_").concat(new Date().toISOString(),".json");kd(d,"application/json",JSON.stringify(u)),xe.storage.clear(),setTimeout(function(){window.location.reload()},2e3)};return f.jsxs(es,{leastDestructiveRef:e,isOpen:n,onClose:i,children:[f.jsx(ts,{}),f.jsxs(ns,{children:[f.jsx(rs,{children:"Warning 警告"}),f.jsx(is,{}),f.jsxs(os,{sx:{"& p":{my:1}},children:[f.jsx(Ze,{children:"Are you sure you want to reset the app? The webpage local storage for this app will be cleared. A copy of the local storage will be downloaded and it may be used for restoration (varies with app)."}),f.jsx(Ze,{children:"確定重設該應用程式嗎?應用程式的網頁本地儲存將會被清除。本地儲存的副本可供下載及用於復原(因應用程式而異)。"}),f.jsx(Ze,{children:"确定重置本应用程序吗?应用程序的网页本地存储将会被清除。本地存储的拷贝可供下载以及用于还原(因应用程序而異)。"})]}),f.jsxs(as,{children:[f.jsx(St,{ref:e,onClick:i,children:"Cancel"}),f.jsx(St,{isLoading:a,colorScheme:"red",ml:3,onClick:l,children:"Confirm and reload"})]})]})]})}var Yt=function(){return Yt=Object.assign||function(r){for(var e,n=1,i=arguments.length;n0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return a};function Id(r){var e=r.error,n=r.errorInfo,i=r.allowReset,o=r.sx,a=jd(r,["error","errorInfo","allowReset","sx"]),s=Pe("RmgErrorBoundary"),l=co("primary.500","primary.300"),u=$d(O.useState(!1),2),c=u[0],d=u[1],h=O.useRef(null),p=function(w){return f.jsx(Ht,{color:l,role:"button",onClick:function(){return d(!0)},children:w})},g=xe.getAppName(),m=f.jsx(Ht,{color:l,href:"https://github.com/railmapgen/".concat(g==="rmg-home"?"railmapgen.github.io":g,"/issues"),isExternal:!0,children:"GitHub Issue"});return f.jsxs(Br,Yt({status:"error",sx:Yt(Yt({},s),o)},a,{children:[f.jsx(Fr,{}),f.jsx(ss,{children:"Something went wrong!"}),f.jsxs(ls,{children:[f.jsxs(Ze,{children:["Please try to refresh or re-import your configuration files. If the issue still persists, please consider upgrading your browser",i?f.jsxs(f.Fragment,{children:[" or ",p("reset this app")]}):"",". Should you need any help, please contact us by submitting an issue in ",m," with the details shown below."]}),f.jsxs(Ze,{children:["請嘗試重新整理或重新上載設定檔。如果問題仍然存在,請考慮更新你的瀏覽器",i?f.jsxs(f.Fragment,{children:["或",p("重設該應用程式")]}):"","。如需協助或與我們聯絡,請前往 ",m," 提交一個 Issue 並附以詳細資料。"]}),f.jsxs(Ze,{children:["请尝试刷新或者重新上传配置文件。如果问题仍然存在,请考虑更新您的浏览器",i?f.jsxs(f.Fragment,{children:["或者",p("重置本应用程序")]}):"","。如需帮助或者联系我们,请前往 ",m," 提交一个 Issue 并附上详细信息。"]}),f.jsxs(Ze,{as:"details",children:[e==null?void 0:e.toString(),f.jsx("br",{}),n==null?void 0:n.componentStack]}),i&&f.jsx(Pd,{cancelRef:h,isOpen:c,onClose:function(){return d(!1)}})]})]}))}var Dd=function(){var r=function(e,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(i[a]=o[a])},r(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");r(e,n);function i(){this.constructor=e}e.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),kr=function(){return kr=Object.assign||function(r){for(var e,n=1,i=arguments.length;n0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return a};function Vd(r){var e=r.defaultValue,n=r.options,i=r.disabledOptions,o=Ud(r,["defaultValue","options","disabledOptions"]),a=O.useRef(null);O.useEffect(function(){a.current&&(a.current.value=(e==null?void 0:e.toString())||"")},[e]);var s=function(l,u){return f.jsx("option",{value:l,disabled:(i==null?void 0:i.find(function(c){return c.toString()===l}))!==void 0,children:u},l)};return f.jsx(ps,Mr({ref:a,variant:"flushed",size:"sm",h:6},o,{children:Object.entries(n).map(function(l){var u=Vi(l,2),c=u[0],d=u[1];return typeof d=="object"?f.jsx("optgroup",{label:c,children:Object.entries(d).map(function(h){var p=Vi(h,2),g=p[0],m=p[1];return s(g,m)})},c):s(c,d)})}))}var Wd=function(r,e){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),o,a=[],s;try{for(;(e===void 0||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return a},Fb=function(r,e,n){var i=Wd(O.useState(e()),2),o=i[0],a=i[1];return O.useEffect(function(){r.then(function(){console.debug("[rmg-components] Getter updates finished"),a(e())})},[]),o},vr=function(r,e){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var i=n.call(r),o,a=[],s;try{for(;(e===void 0||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return a},Wi=function(r,e,n){if(n||arguments.length===2)for(var i=0,o=e.length,a;i0)&&!(o=i.next()).done;)a.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return a};function Kd(r){var e=r.defaultValue,n=r.min,i=r.max,o=r.step,a=r.onThrottledChange,s=r.leftIcon,l=r.rightIcon,u=Pe("RmgThrottledSlider"),c=Jd(O.useState(e!=null?e:0),2),d=c[0],h=c[1];O.useEffect(function(){e!==void 0&&d!==e&&h(e)},[e]);var p=Hd(a!=null?a:function(){},500),g=function(){var w=Math.min(d+(o!=null?o:1)*10,i!=null?i:100);a==null||a(w),h(w)},m=function(){var w=Math.max(d-(o!=null?o:1)*10,n!=null?n:0);a==null||a(w),h(w)};return f.jsxs(ke,{sx:u,children:[s&&f.jsx(Cn,{size:"xs",variant:"ghost","aria-label":"Drag left",icon:s,onClick:m}),f.jsxs(fs,{value:d,min:n,max:i,step:o,onChange:function(w){p(w),h(w)},children:[f.jsx(gs,{children:f.jsx(ms,{})}),f.jsx(ys,{})]}),l&&f.jsx(Cn,{size:"xs",variant:"ghost","aria-label":"Drag right",icon:l,onClick:g})]})}var qd=function(r){var e=r.children,n=r.noWrap,i=Pe("RmgOutput",{noWrap:n});return f.jsx(Rn.output,{sx:i,children:e})};function ne(r){var e=r.fields,n=r.noLabel,i=r.minW;return f.jsx(ke,{wrap:"wrap",children:e.map(function(o,a){if(o.hidden)return f.jsx(O.Fragment,{},a);var s=o.minW||i,l=s==="full";return f.jsx(Gd,{className:l?"mw-full":"",label:o.label,flex:l?void 0:1,minW:l?void 0:s,noLabel:n,oneLine:o.oneLine,helper:o.helper,errorMessage:o.errorMessage,children:function(u){switch(u.type){case"input":return f.jsx(Cd,{placeholder:u.placeholder,defaultValue:u.value,type:u.variant,validator:u.validator,onDebouncedChange:u.onChange,delay:u.debouncedDelay,optionList:u.optionList,isDisabled:u.isDisabled});case"output":return f.jsx(qd,{noWrap:u.noWrap,children:u.value});case"textarea":return f.jsx(Ld,{placeholder:u.placeholder,defaultValue:u.value,onDebouncedChange:u.onChange,isDisabled:u.isDisabled});case"slider":return f.jsx(Kd,{defaultValue:u.value,min:u.min,max:u.max,step:u.step,onThrottledChange:u.onChange,leftIcon:u.leftIcon,rightIcon:u.rightIcon,isDisabled:u.isDisabled});case"select":return f.jsx(Vd,{defaultValue:u.value,onChange:function(c){var d,h=c.target.value;return(d=u.onChange)===null||d===void 0?void 0:d.call(u,typeof u.value=="number"?Number(h):h.toString())},options:u.options,disabledOptions:u.disabledOptions,isInvalid:u.isInvalid,isDisabled:u.isDisabled});case"switch":return f.jsx(bs,{isChecked:u.isChecked,isDisabled:u.isDisabled,onChange:function(c){var d,h=c.target.checked;return(d=u.onChange)===null||d===void 0?void 0:d.call(u,h)}});case"custom":return u.component;default:return f.jsx("div",{})}}(o)},a)})})}var et=function(){return et=Object.assign||function(r){for(var e,n=1,i=arguments.length;n button:first-of-type":{ml:1}}},lh={baseStyle:{w:"100%",h:"100%",position:"absolute",top:0,right:0,alignItems:"center",justifyContent:"center","& .rmg-loader__backdrop":{position:"absolute",w:"100%",h:"100%",zIndex:1500,bg:"blackAlpha.400"},"& .chakra-progress":{zIndex:2e3}}},Ke=function(r){return r==="dark"?"primary.300":"primary.500"},uh={baseStyle:function(r){var e=r.theme,n=r.colorMode;return{"& .rmg-multi-select__wrapper":{position:"relative",w:"100%",h:"25.75px",transform:"translateY(1.75px)",cursor:"default"},"& .rmg-multi-select__field":{position:"relative",w:"100%",minW:0,outline:0,appearance:"none",transitionProperty:"common",transitionDuration:"normal",pb:"1px",fontSize:"sm",h:"6",borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_active:{borderColor:Ke(n),boxShadow:"0px 1px 0px 0px ".concat(Wt(e,Ke(n)))},_focus:{borderColor:Ke(n),boxShadow:"0px 1px 0px 0px ".concat(Wt(e,Ke(n)))},_focusVisible:{borderColor:Ke(n),boxShadow:"0px 1px 0px 0px ".concat(Wt(e,Ke(n)))},"&.active":{borderColor:Ke(n),boxShadow:"0px 1px 0px 0px ".concat(Wt(e,Ke(n)))},"& > span:last-of-type":{position:"absolute",right:8}},"& .rmg-multi-select__icon-wrapper":{display:"inline-flex",justifyContent:"center",w:6,h:"100%",position:"absolute",right:2,top:0,fontSize:"xl","& svg":{h:"1em",w:"1em"}},"& .chakra-popover__content":{w:"unset",minW:200},"& .chakra-popover__body":{p:0,"li label":{p:2,w:"100%",_hover:{bg:n==="dark"?"whiteAlpha.200":"gray.100"},_active:{bg:n==="dark"?"whiteAlpha.300":"gray.200"}}}}}},jr=function(){return jr=Object.assign||function(r){for(var e,n=1,i=arguments.length;n(r.RailMap="railmap",r.Platform="platform",r))(_h||{}),Lh=(r=>(r.Metro="metro",r.NationalRail="nationalrail",r.LightRail="lightrail",r.Footpath="footpath",r))(Lh||{}),Eh=(r=>(r.APP_LOAD="APP_LOAD",r.ADD_STATION="ADD_STATION",r.ADD_LINE="ADD_LINE",r.IMPORT_RMG_PARAM="IMPORT_RMG_PARAM",r.IMPORT_WORK_FROM_GALLERY="IMPORT_WORK_FROM_GALLERY",r.DOWNLOAD_PARAM="DOWNLOAD_PARAM",r.DOWNLOAD_IMAGES="DOWNLOAD_IMAGES",r.LOAD_TUTORIAL="LOAD_TUTORIAL",r))(Eh||{}),Se=(r=>(r.LOGIN_STATE="rmp__login_state",r.APP="rmp__app",r.PARAM="rmp__param",r.PARAM_BACKUP="rmp__param__backup",r.DO_NOT_SHOW_RMT_MSG="rmp__doNotShowRMTMsg",r.ACCOUNT="rmg-home__account",r))(Se||{}),J=(r=>(r.Other="other",r.Beijing="beijing",r.Berlin="berlin",r.Chongqing="chongqing",r.Foshan="foshan",r.Guangzhou="guangzhou",r.Hongkong="hongkong",r.Kunming="kunming",r.London="london",r.Qingdao="qingdao",r.Shanghai="shanghai",r.Shenzhen="shenzhen",r.Singapore="singapore",r.Suzhou="suzhou",r.Tokyo="tokyo",r))(J||{}),Th=(r=>(r.Shmetro="shmetro",r.Bjsubway="bjsubway",r))(Th||{});const kh="https://railmapgen.org/v1/subscription",Kb="https://railmapgen.org/v1/randomStationNames",jn={RMP_CLOUD:!1,RMP_EXPORT:!1},Oh={state:"logged-out",activeSubscriptions:jn,token:void 0},ua=er({name:"account",initialState:Oh,reducers:{setState:(r,e)=>{r.state=e.payload},setActiveSubscriptions:(r,e)=>{r.activeSubscriptions=e.payload},setToken:(r,e)=>{r.token=e.payload}}}),{setState:Qt,setActiveSubscriptions:$n,setToken:ca}=ua.actions,Mh=ua.reducer;var U;(function(r){r.black="#000",r.white="#fff"})(U||(U={}));var da=function(r,e,n,i){function o(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function l(d){try{c(i.next(d))}catch(h){s(h)}}function u(d){try{c(i.throw(d))}catch(h){s(h)}}function c(d){d.done?a(d.value):o(d.value).then(l,u)}c((i=i.apply(r,e||[])).next())})};let Sr={};const Ph=(r,e)=>da(void 0,void 0,void 0,function*(){if(r in Sr)return Sr[r];const i=yield(yield fetch(r,e)).json();return Sr[r]=i,i}),jh=(r,e)=>da(void 0,void 0,void 0,function*(){return yield Ph("/rmg-palette/resources/palettes/".concat(r,".json"),{signal:e})});var $h=function(r,e,n,i){function o(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function l(d){try{c(i.next(d))}catch(h){s(h)}}function u(d){try{c(i.throw(d))}catch(h){s(h)}}function c(d){d.done?a(d.value):o(d.value).then(l,u)}c((i=i.apply(r,e||[])).next())})};const qb=(r,e,n)=>$h(void 0,void 0,void 0,function*(){const[i,o]=r;if(i==="other")return r;try{const s=(yield jh(i)).find(l=>l.id===o);return s?[i,o,s.colour,s.fg||U.white]:(console.warn("[rmg-palette] updateTheme(".concat(i,", ").concat(o,"), line does not exist, returning old theme")),r)}catch(a){throw console.error("[rmg-palette] updateTheme(".concat(i,", ").concat(o,"), unexpected error occurs"),a),a}}),Yb=r=>{const e=r.currentTarget.getBoundingClientRect(),n=r.clientX-e.left,i=r.clientY-e.top;return{x:n,y:i}},Zb=(r,e,n,i)=>({x:r*n/100+i.x,y:e*n/100+i.y}),Qb=(r,e)=>Math.round(r/e)*e,Xb=r=>{let[e,n,i,o]=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MIN_VALUE,Number.MIN_VALUE];return r.forEachNode((a,s)=>{const l=document.getElementById(a);if(l){const u=Ih(l);e=Math.min(u.x,e),n=Math.min(u.y,n),i=Math.max(u.x+u.width,i),o=Math.max(u.y+u.height,o)}}),e-=50,n-=50,i+=100,o+=100,{xMin:e,yMin:n,xMax:i,yMax:o}},ew=r=>{var e,n;return{width:((e=r.width)!=null?e:720)-40,height:((n=r.height)!=null?n:1280)-40}},Ih=r=>{const e=r.getBBox(),n=r.ownerSVGElement,i=r.parentNode.getScreenCTM().inverse().multiply(r.getScreenCTM()),o=[n.createSVGPoint(),n.createSVGPoint(),n.createSVGPoint(),n.createSVGPoint()];o[0].x=e.x,o[0].y=e.y,o[1].x=e.x+e.width,o[1].y=e.y,o[2].x=e.x+e.width,o[2].y=e.y+e.height,o[3].x=e.x,o[3].y=e.y+e.height;let[a,s,l,u]=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MIN_VALUE,Number.MIN_VALUE];return o.forEach(c=>{c=c.matrixTransform(i),a=Math.min(a,c.x),l=Math.max(l,c.x),s=Math.min(s,c.y),u=Math.max(u,c.y)}),e.x=a,e.width=l-a,e.y=s,e.height=u-s,e},tw=navigator.platform.startsWith("Mac"),qi=async(r,e="SHA-256")=>{const i=new TextEncoder().encode(r),o=await crypto.subtle.digest(e,i);return Array.from(new Uint8Array(o)).map(s=>s.toString(16).padStart(2,"0")).join("")},nw=()=>{const r=Math.floor(Math.random()*16777215);return"#".concat(r.toString(16).padStart(6,"0"))},rw=r=>{const e=parseInt(r.slice(1,3),16),n=parseInt(r.slice(3,5),16),i=parseInt(r.slice(5,7),16);return(e*299+n*587+i*114)/1e3>=128?U.black:U.white},Dh="rmt-save-manager";var zh=(r=>(r.SAVE_CHANGED="SAVE_CHANGED",r.TOKEN_REQUEST="TOKEN_REQUEST",r))(zh||{});const ha=new BroadcastChannel(Dh);let fn,gn;const Bh=async r=>{if(!gn){const n=new Q().export();gn=await qi(JSON.stringify(n)),tt.debug("Default graph hash: ".concat(gn))}const e=await qi(JSON.stringify(r));fn&&fn!==gn&&fn!==e&&(tt.debug("Notify RMP save change, hash: ".concat(e)),ha.postMessage({type:"SAVE_CHANGED",key:Se.PARAM,from:"rmp"})),fn=e},Yi=async()=>{tt.debug("Requesting token from RMT"),ha.postMessage({type:"TOKEN_REQUEST",from:"rmp"})},Fh=async(r,e)=>{tt.debug("Updating token to: ".concat(e)),r.dispatch(ca(e))},Gh=async(r,e)=>{const n=await fetch(kh,{headers:{accept:"application/json","Content-Type":"application/json",Authorization:"Bearer ".concat(e)}});if(n.status!==200){tt.debug("Token is invalid, expiring the login state"),r.dispatch(Qt("expired")),r.dispatch($n(jn));return}r.dispatch(Qt("free"));const i=(await n.json()).subscriptions,o=structuredClone(jn);for(const a of i){const s=a.type;s in o&&(r.dispatch(Qt("subscriber")),o[s]=!0)}r.dispatch($n(o)),tt.debug("Token is valid, setting active subscriptions: ".concat(JSON.stringify(o)))},Uh=r=>{const e=i=>{if(!i){tt.debug("Account string is empty, logging out"),r.dispatch(ca(void 0)),r.dispatch(Qt("logged-out")),r.dispatch($n(jn));return}const o=JSON.parse(i),{token:a}=o;Fh(r,a),Gh(r,a)};let n=localStorage.getItem(Se.ACCOUNT);e(n!=null?n:void 0),window.onstorage=()=>{const i=localStorage.getItem(Se.ACCOUNT);n!==i&&(n=i,tt.debug("Account string changed to: ".concat(i)),e(i!=null?i:void 0))}},Vh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Wh=(r=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(r|=0));for(;r--;)e+=Vh[n[r]&63];return e};var S=(r=>(r.Diagonal="diagonal",r.Perpendicular="perpendicular",r.RotatePerpendicular="ro-perp",r.Simple="simple",r))(S||{}),$=(r=>(r.SingleColor="single-color",r.ShanghaiSuburbanRailway="sh-sub-rwy",r.ShmetroVirtualInt="shmetro-virtual-int",r.GzmtrVirtualInt="gzmtr-virtual-int",r.GZMTRLoop="gzmtr-loop",r.ChinaRailway="china-railway",r.BjsubwaySingleColor="bjsubway-single-color",r.BjsubwayTram="bjsubway-tram",r.BjsubwayDotted="bjsubway-dotted",r.DualColor="dual-color",r.River="river",r.MTRRaceDays="mtr-race-days",r.MTRLightRail="mtr-light-rail",r.MTRUnpaidArea="mtr-unpaid-area",r.MTRPaidArea="mtr-paid-area",r.MRTUnderConstruction="mrt-under-constr",r.MRTSentosaExpress="mrt-sentosa-express",r.JREastSingleColor="jr-east-single-color",r.JREastSingleColorPattern="jr-east-single-color-pattern",r.LRTSingleColor="lrt-single-color",r.LondonTubeTerminal="london-tube-terminal",r.LondonTubeInternalInt="london-tube-internal-int",r.LondonTube10MinWalk="london-tube-10-min-walk",r.LondonRail="london-rail",r.LondonSandwich="london-sandwich",r.LondonLutonAirportDART="london-DART",r.LondonIFSCloudCableCar="london-dangleway",r.GuangdongIntercityRailway="gd-intercity-rwy",r))($||{});const iw=["single-color","bjsubway-single-color","bjsubway-tram","bjsubway-dotted","china-railway","mtr-race-days","mtr-light-rail","mrt-under-constr","jr-east-single-color","jr-east-single-color-pattern","lrt-single-color","london-sandwich","london-DART","london-dangleway"],Hh=(r,e,n,i,o=In)=>{const{offset:a=In.offset}=o,s=Math.abs((i-n)/(e-r));if(s===1/0)return"M ".concat(r+a," ").concat(n," L ").concat(e+a," ").concat(i);if(s===0)return"M ".concat(r," ").concat(n+a," L ").concat(e," ").concat(i+a);{const l=1/s,u=a/Math.sqrt(l*l+1),c=u*l*-Math.sign((e-r)*(i-n));return"M ".concat(r+u," ").concat(n+c," L ").concat(e+u," ").concat(i+c)}},In={offset:0},Jh=r=>{var s;const{id:e,attrs:n,handleAttrsUpdate:i}=r,{t:o}=X(),a=[{type:"input",label:o("panel.details.lines.simple.offset"),value:((s=n.offset)!=null?s:In.offset).toString(),variant:"number",onChange:l=>{n.offset=Number(l),i(e,n)},minW:"full"}];return f.jsx(ne,{fields:a})},Kh=f.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:f.jsx("path",{d:"M6,18L18,6",stroke:"currentColor",fill:"none"})}),qh={generatePath:Hh,icon:Kh,defaultAttrs:In,attrsComponent:Jh,metadata:{displayName:"panel.details.lines.simple.displayName"}},ow={translateX:0,translateY:0,scale:1,rotate:0},Yh=3,Zh=1/0;var Oe=(r=>(r.Virtual="virtual",r.ShmetroNumLineBadge="shmetro-num-line-badge",r.ShmetroTextLineBadge="shmetro-text-line-badge",r.GzmtrLineBadge="gzmtr-line-badge",r.BjsubwayNumLineBadge="bjsubway-num-line-badge",r.BjsubwayTextLineBadge="bjsubway-text-line-badge",r.SuzhouRTNumLineBadge="suzhourt-num-line-badge",r.BerlinSBahnLineBadge="berlin-s-bahn-line-badge",r.BerlinUBahnLineBadge="berlin-u-bahn-line-badge",r.ChongqingRTNumLineBadge="chongqingrt-num-line-badge",r.ChongqingRTTextLineBadge="chongqingrt-text-line-badge",r.ShenzhenMetroNumLineBadge="shenzhen-metro-num-line-badge",r.MRTDestinationNumbers="mrt-num-line-badge",r.JREastLineBadge="jr-east-line-badge",r.QingdaoMetroNumLineBadge="qingdao-metro-num-line-badge",r.MRTLineBadge="mrt-line-badge",r.GuangdongIntercityRailwayLineBadge="gd-intercity-rwy-line-badge",r.LondonArrow="london-arrow",r.Facilities="facilities",r.Text="text",r.I18nText="i18n-text",r.Master="master",r))(Oe||{});const Qh="操作",Xh="应用程序",ep="黑",tp="取消",np="城市",rp="组件",ip="确定",op="继续",ap="复制",sp="编辑",lp="语言/Language",up="理由",cp="名称",dp="下一步",hp="打开",pp="调色板",fp="上一步",gp="删除",mp="重置",yp="设置",bp="提交",wp="翻译",vp="上传",xp="白",Sp={Action:Qh,Apps:Xh,"Back to list":"返回列表","Background colour":"背景色",Black:ep,Cancel:tp,City:np,Components:rp,"Configuration file":"配置文件",Confirm:ip,Continue:op,"Country/Region":"国家/地区",Copy:ap,Edit:sp,"Foreground colour":"前景色","Go back":"返回",Language:lp,Justification:up,Name:cp,Next:dp,Open:hp,Palette:pp,"Please select...":"请选择...",Previous:fp,"Rail Map Generator":"铁路线路图生成器","Rail Map Painter":"地铁线路图绘制器","Rail Map Toolkit":"线路图工具包",Remove:gp,Reset:mp,"RMG Templates":"RMG 模板","RMP Gallery":"RMP 画廊","RMP Designer":"RMP 设计师","Seed Project":"种子项目",Settings:yp,Submit:bp,Translate:wp,Upload:vp,White:xp},Np="動作",Rp="應用程式",Cp="黑",Ap="取消",_p="城市",Lp="元件",Ep="確定",Tp="繼續",kp="複製",Op="編輯",Mp="語言/Language",Pp="理由",jp="名稱",$p="下一步",Ip="開啟",Dp="調色盤",zp="上一步",Bp="移除",Fp="重設",Gp="設定",Up="提交",Vp="翻譯",Wp="上載",Hp="白",Jp={Action:Np,Apps:Rp,"Back to list":"返回列表","Background colour":"背景色",Black:Cp,Cancel:Ap,City:_p,Components:Lp,"Configuration file":"設定檔",Confirm:Ep,Continue:Tp,Copy:kp,"Country/Region":"國家/地區",Edit:Op,"Foreground colour":"前景色","Go back":"返回",Language:Mp,Justification:Pp,Name:jp,Next:$p,Open:Ip,Palette:Dp,"Please select...":"請選擇...",Previous:zp,"Rail Map Generator":"鐵路路綫圖產生器","Rail Map Painter":"地鐵路綫圖繪製器","Rail Map Toolkit":"路綫圖工具組",Remove:Bp,Reset:Fp,"RMG Templates":"RMG 範本","RMP Gallery":"RMP 畫廊","RMP Designer":"RMP 設計師","Seed Project":"種子項目",Settings:Gp,Submit:Up,Translate:Vp,Upload:Wp,White:Hp},Kp="言語/Language",qp="調色板",Yp="削除",Zp={Language:Kp,Palette:qp,"Rail Map Generator":"鉄道路線図ジェネレータ","Rail Map Painter":"鉄道路線図画家","Rail Map Toolkit":"路線図ツールキット",Remove:Yp,"RMG Templates":"RMG テンプレート","RMP Gallery":"RMP 画廊","RMP Designer":"RMP 図案家"},Qp="조작",Xp="앱",ef="블랙",tf="취소",nf="도시",rf="요소",of="확인",af="복사",sf="편집",lf="언어/Language",uf="이유",cf="명칭",df="다음",hf="열기",pf="팔레트",ff="나아가",gf="삭제",mf="리셋",yf="설치",bf="제출",wf="번역",vf="업로드",xf="화이트",Sf={Action:Qp,Apps:Xp,"Back to list":"다시 목록으로","Background colour":"배경색",Black:ef,Cancel:tf,City:nf,Components:rf,"Configuration file":"환경 설정 파일",Confirm:of,Copy:af,"Country/Region":"국가/지역",Edit:sf,"Foreground colour":"전경색","Go back":"되돌아가",Language:lf,Justification:uf,Name:cf,Next:df,Open:hf,Palette:pf,"Please select...":"선택해주세요",Previous:ff,"Rail Map Generator":"철도 노선도 생성기","Rail Map Painter":"지하철 노선도 그리기","Rail Map Toolkit":"노선도 툴킷",Remove:gf,Reset:mf,"RMG Templates":"RMG 템플릿","RMP Gallery":"RMP 갤러리","RMP Designer":"RMP 디자이너","Seed Project":"종자 프로젝트",Settings:yf,Submit:bf,Translate:wf,Upload:vf,White:xf};var Nf={en:{},"zh-Hans":Sp,"zh-Hant":Jp,ja:Zp,ko:Sf};const Rf="Color",Cf="Warning",Af="Cancel",_f="Apply",Lf="Remove",Ef="Close",Tf="Don't show me again",kf="The all-in-one toolkit you definitely do not want to miss!",Of=JSON.parse('{"tools":{"showLess":"Show less","section":{"lineDrawing":"Line drawing","stations":"Stations","miscellaneousNodes":"Miscellaneous nodes"},"select":"Select","learnHowToAdd":{"station":"Learn how to add your stations!","misc-node":"Learn how to add your nodes!","line":"Learn how to add your line styles!"}},"details":{"header":"Details","info":{"title":"Basic information","id":"ID","zIndex":"Depth","stationType":"Station Type","linePathType":"Line Path Type","lineStyleType":"Line Style Type","type":"Type","parallel":"Parallel line","parallelIndex":"Parallel index"},"multipleSelection":{"title":"Multiple Selection","change":"Change selected attributes","selected":"Selected Objects:","show":"Show","station":"Stations","miscNode":"MiscNodes","edge":"Lines"},"changeStationTypeContent":"Changing station\'s type will remove all attributes from the station except its names.","changeLineTypeContent":"Changing line\'s type will remove all attributes from the line.","changeType":"Change Type","nodePosition":{"title":"Node Position","pos":{"x":"Coordinate X","y":"Coordinate Y"}},"lineExtremities":{"title":"Line Extremities","source":"Source","target":"Target","sourceName":"Source Name","targetName":"Target Name"},"specificAttrsTitle":"Specific Attributes","unknown":{"error":"Oops :( We can\'t recognize this {{category}}. Maybe it is created in a newer version.","node":"node","linePath":"line path","lineStyle":"line style"},"nodes":{"common":{"nameZh":"Line name in Chinese","nameEn":"Line name in English","nameJa":"Line name in Japanese","num":"Line number"},"virtual":{"displayName":"Virtual node"},"shmetroNumLineBadge":{"displayName":"Shanghai Metro num line badge"},"shmetroTextLineBadge":{"displayName":"Shanghai Metro text line badge"},"gzmtrLineBadge":{"displayName":"Guangzhou Metro line badge","tram":"Tram","span":"Row-spanning digits"},"bjsubwayNumLineBadge":{"displayName":"Beijing Subway num line badge"},"bjsubwayTextLineBadge":{"displayName":"Beijing Subway text line badge"},"berlinSBahnLineBadge":{"displayName":"Berlin S Bahn line badge"},"berlinUBahnLineBadge":{"displayName":"Berlin U Bahn line badge"},"suzhouRTNumLineBadge":{"displayName":"Suzhou Rail Transit num line badge","branch":"Is branch line"},"chongqingRTNumLineBadge":{"displayName":"Chongqing Rail Transit num line badge"},"chongqingRTTextLineBadge":{"displayName":"Chongqing Rail Transit text line badge"},"shenzhenMetroNumLineBadge":{"displayName":"Shenzhen Metro num line badge","branch":"Is branch line"},"mrtDestinationNumbers":{"displayName":"Singapore MRT destination numbers"},"mrtLineBadge":{"displayName":"Singapore MRT line badge","isTram":"Is LRT line badge"},"jrEastLineBadge":{"displayName":"JR East line badge","crosshatchPatternFill":"Fill with crosshatch pattern"},"qingdaoMetroNumLineBadge":{"displayName":"Qingdao Metro Num line badge","numEn":"Line number in English","showText":"Show text"},"guangdongIntercityRailwayLineBadge":{"displayName":"Guangdong Intercity Railway line badge"},"londonArrow":{"displayName":"London arrow","type":"Type","continuation":"Continuation","sandwich":"Sandwich","tube":"Tube"},"master":{"displayName":"Master node","type":"Master node type","undefined":"Undefined"},"facilities":{"displayName":"Facilities","type":"Type"},"text":{"displayName":"Arbitrary text","content":"Content","fontSize":"Font size","lineHeight":"Line height","textAnchor":"Text anchor","start":"Start","middle":"Middle","end":"End","auto":"Auto","hanging":"Hanging","dominantBaseline":"Dominant baseline","language":"Font family in which language","zh":"Chinese","en":"English","mtr__zh":"Hongkong MTR Chinese","mtr__en":"Hongkong MTR English","berlin":"Berlin S/U Bahn","mrt":"Singapore MRT","jreast_ja":"JR East Japanese","jreast_en":"JR East English","rotate":"Rotation","italic":"Italic","bold":"Bold"}},"stations":{"common":{"nameZh":"Names in Chinese","nameEn":"Names in English","nameJa":"Names in Japanese","nameOffsetX":"Names offset X","nameOffsetY":"Names offset Y","rotate":"Icon rotation","lineCode":"Line code","stationCode":"Station code","left":"Left","middle":"Middle","right":"Right","top":"Top","bottom":"Bottom"},"interchange":{"title":"Interchanges","within":"Within-station interchange","outStation":"Out-of-station interchange","outSystem":"Out-of-system interchange","addGroup":"Add interchange group","noInterchanges":"No interchanges","nameZh":"Chinese name","nameEn":"English name","add":"Add interchange","copy":"Copy interchange","remove":"Remove interchange"},"shmetroBasic":{"displayName":"Shanghai Metro basic station"},"shmetroBasic2020":{"displayName":"Shanghai Metro basic station (2020)"},"shmetroInt":{"displayName":"Shanghai Metro interchange station","height":"Icon height","width":"Icon width"},"shmetroOsysi":{"displayName":"Shanghai Metro out-of-system interchange station"},"shanghaiSuburbanRailway":{"displayName":"Shanghai Suburban Railway station"},"gzmtrBasic":{"displayName":"Guangzhou Metro basic station","open":"Is opened","secondaryNameZh":"Secondary name in Chinese","secondaryNameEn":"Secondary name in English","tram":"Tram"},"gzmtrInt":{"displayName":"Guangzhou Metro interchange station","open":"Is opened","secondaryNameZh":"Secondary name in Chinese","secondaryNameEn":"Secondary name in English","foshan":"Foshan"},"gzmtrInt2024":{"displayName":"Guangzhou Metro interchange station (2024)","columns":"Columns of stations","topHeavy":"Prefer more stations on the top row","anchorAt":"Anchor at","anchorAtNone":"Center","osiPosition":"Out-of-Station Interchange","osiPositionNone":"None","osiPositionLeft":"Left","osiPositionRight":"Right"},"bjsubwayBasic":{"displayName":"Beijing Subway basic station","open":"Is opened"},"bjsubwayInt":{"displayName":"Beijing Subway interchange station","outOfStation":"Out of station interchange"},"mtr":{"displayName":"Hongkong MTR station","rotate":"Icon rotation"},"suzhouRTBasic":{"displayName":"Suzhou Rail Transit basic station","textVertical":"Vertical names"},"suzhouRTInt":{"displayName":"Suzhou Rail Transit interchange station"},"kunmingRTBasic":{"displayName":"Kunming Rail Transit basic station"},"kunmingRTInt":{"displayName":"Kunming Rail Transit interchange station"},"MRTBasic":{"displayName":"Singapore MRT basic station","isTram":"Is LRT station"},"MRTInt":{"displayName":"Singapore MRT interchange station"},"jrEastBasic":{"displayName":"JR East basic station","nameOffset":"Names offset","textOneLine":"Names in one line","textVertical":"Vertical names","important":"Important station","lines":"Interchange lines offset"},"jrEastImportant":{"displayName":"JR East important station","textVertical":"Vertical names","mostImportant":"Most important station","minLength":"Minimal length of the station"},"foshanMetroBasic":{"displayName":"Foshan Metro basic station","open":"Is opened","secondaryNameZh":"Secondary name in Chinese","secondaryNameEn":"Secondary name in English","tram":"Tram"},"qingdaoMetro":{"displayName":"Qingdao Metro station","isInt":"Is interchange station"},"tokyoMetroBasic":{"displayName":"Tokyo Metro basic station","nameOffset":"Names offset","textVertical":"Vertical names","lineCode":"Line code","stationCode":"Station code"},"tokyoMetroInt":{"displayName":"Tokyo Metro interchange station","mereOffset":{"displayName":"Names mere offset","none":"None","left1":"Left (less)","left2":"Left (more)","right1":"Right (less)","right2":"Right (more)","up":"Up","down":"Down"},"importance":{"displayName":"Station importance","default":"Default","middle":"Middle","high":"High"},"align":{"displayName":"Icon align","horizontal":"Horizontal","vertical":"Vertical"}},"londonTubeCommon":{"stepFreeAccess":"Step free access","stepFreeAccessNone":"None","stepFreeAccessTrain":"From street to train","stepFreeAccessPlatform":"From street to platform"},"londonTubeBasic":{"displayName":"London Tube basic station","terminal":"Terminal station","shareTracks":"Track shares","shareTracksIndex":"Index of the track shares"},"londonTubeInt":{"displayName":"London Tube interchange station"},"londonRiverServicesInt":{"displayName":"London river services interchange station"},"guangdongIntercityRailway":{"displayName":"Guangdong Intercity Railway station"}},"lines":{"reconcileId":"Reconcile ID","common":{"offsetFrom":"Offset From","offsetTo":"Offset To","startFrom":"Start From","from":"From","to":"To","roundCornerFactor":"Round Corner Factor","parallelDisabled":"Some attributes are disabled as this line is parallel.","changeInBaseLine":"Change them in the base line:"},"simple":{"displayName":"Simple path","offset":"Offset"},"diagonal":{"displayName":"135° diagonal path"},"perpendicular":{"displayName":"90° perpendicular path"},"rotatePerpendicular":{"displayName":"90° rotate perpendicular path"},"singleColor":{"displayName":"Single color style"},"shmetroVirtualInt":{"displayName":"Shanghai Metro out-of-station interchange style"},"shanghaiSuburbanRailway":{"displayName":"Shanghai Suburban Railway style","isEnd":"Is the ending line"},"gzmtrVirtualInt":{"displayName":"Guangzhou Metro out-of-station interchange style"},"gzmtrLoop":{"displayName":"Guangzhou Metro loop style"},"chinaRailway":{"displayName":"China Railway style"},"bjsubwaySingleColor":{"displayName":"Beijing Subway single color style"},"bjsubwayTram":{"displayName":"Beijing Subway tram style"},"bjsubwayDotted":{"displayName":"Beijing Subway dotted style"},"dualColor":{"displayName":"Dual color style","swap":"Swap color","colorA":"Color A","colorB":"Color B"},"river":{"displayName":"River style","width":"Width"},"mtrRaceDays":{"displayName":"Hongkong MTR race days style"},"mtrLightRail":{"displayName":"Hongkong MTR light rail style"},"mtrUnpaidArea":{"displayName":"Hongkong MTR unpaid area style"},"mtrPaidArea":{"displayName":"Hongkong MTR paid area style"},"mrtUnderConstruction":{"displayName":"Singapore MRT under construction style"},"mrtSentosaExpress":{"displayName":"Singapore MRT Sentosa Express style"},"jrEastSingleColor":{"displayName":"JR East single color style"},"jrEastSingleColorPattern":{"displayName":"JR East single color filled with crosshatch pattern style"},"lrtSingleColor":{"displayName":"Singapore LRT single color style"},"londonTubeInternalInt":{"displayName":"London Tube internal interchange style"},"londonTube10MinWalk":{"displayName":"London Tube under a 10 minute walk interchange style"},"londonTubeTerminal":{"displayName":"London Tube terminal style"},"londonRail":{"displayName":"London rail style","limitedService":"Limited service/Peak hours only","colorBackground":"Color background","colorForeground":"Color foreground"},"londonSandwich":{"displayName":"London sandwich style"},"londonLutonAirportDART":{"displayName":"London Luton Airport DART style"},"londonIFSCloudCableCar":{"displayName":"London IFS Cloud Cable Car style"},"guangdongIntercityRailway":{"displayName":"Guangdong Intercity Railway style"}},"edge":{},"footer":{"duplicate":"Duplicate","copy":"Copy","remove":"Remove"}}}'),Mf={popoverHeader:"You're on <1>{{environment}} environment!",popoverBody:"We are currently testing the latest RMP. If you have any suggestions, feel free to raise at https://github.com/railmapgen/rmp/issues",search:"Search stations",open:{new:"New project",config:"Import project",projectRMG:"Import from RMG project",invalidType:"Invalid file type! Only file in JSON format is accepted.",unknownError:"Unknown error occurred while parsing the uploaded file! Please try again.",gallery:"Import from Gallery",tutorial:"Start tutorial",importFromRMPGallery:"Template {{id}} imported. Not satisfied with this change? Undo via Ctrl + Z or the undo button.",failToImportFromRMPGallery:"Fail to import {{id}} from the gallery. The file can not be found."},download:{config:"Export project",image:"Export image","2rmg":{title:"Export to RMG project",type:{line:"Line",loop:"Loop",branch:"Branch"},placeholder:{chinese:"Chinese name",english:"English name",lineCode:"Line code"},info1:"This function is designed to convert the RMP project into RMG projects.",info2:"The lines in the list following are the available lines for converting. You can enter the Chinese line name in the text box on the left, the English line name in the middle, the line code (for Guangzhou Metro style) on the right, and then click the download button on the right to save your RMG projects.",noline:"No available lines found.",download:"Download",downloadInfo:"Please select one of the following stations as the starting station and click it to download."},format:"Format",png:"PNG",svg:"SVG",svgVersion:"Version","svg1.1":"1.1 (Compatible with Adobe Illustrator)",svg2:"2 (Compatible with modern browsers)",transparent:"Transparency",scale:"Scale",disabledScaleOptions:"Some scale options are disabled due to your browser's canvas limitation.",disabledScaleOptionsWorkarounds:"Possible workarounds include generating the image from svg using this cli tool: ",imageTooBig:"The image is too big for your browser to generate!",useSystemFonts:"Use system fonts instead of fonts previewed in the canvas",shareInfo1:"I will attach ",shareInfo2:" and its link when I share this image.",termsAndConditions:"Terms and Conditions",termsAndConditionsInfo:"I agree to ",period:".",confirm:"Download"},donation:{title:"Donation",openCollective:"Open Collective",viaUSD:"Donate in USD via Paypal or Visa card.",afdian:"爱发电",viaCNY:"Donate in CNY via Alipay or Wechat Pay."},settings:{title:"Settings",pro:"This is a PRO feature and an account with a subscription is required.",proWithTrial:"This is a PRO feature with a limited free trial available.",proLimitExceed:{master:"Master nodes exceed the free tier.",parallel:"Parallel lines exceed the free tier.",solution:"Remove them to dismiss this warning, or subscribe to unlock more!"},subscription:{title:"Subscription Status","logged-out":"You are currently logged out.",free:"Logged In! Subscribe to unlock more features!",subscriber:"Thanks for your subscription! Enjoy all features!",expired:"Login status expired. Please log out and log in again."},preference:{title:"Preference",keepLastPath:"Keep drawing lines until clicking on the background in the next move",autoParallel:"Automatically set new lines to be parallel to existing lines",randomStationNames:{title:"Set station names to random on creation",none:"None",shmetro:"Shanghai",bjsubway:"Beijing"}},shortcuts:{title:"Shortcuts",keys:"Keys",description:"Description",f:"Use the last tool.",s:"Select.",arrows:"Move the canvas a little bit.",ijkl:"Move the selected station(s) a little bit.",shift:"Multiple selection.",alt:"Precise movement.",delete:"Delete the selected station(s).",cut:"Cut.",copy:"Copy.",paste:"Paste.",undo:"Undo.",redo:"Redo."},procedures:{title:"Procedures",translate:{title:"Translate nodes' coordinates",content:"Add the following offset to all nodes' x and y:",x:"X axis",y:"Y axis"},scale:{title:"Scale nodes' coordinates",content:"Multiply the following value to all nodes' x and y:",factor:"Scale factor"},changeType:{title:"Change all objects' attributes",any:"Any"},changeZIndex:"Change depth in batch",changeStationType:{title:"Change stations type in batch",changeFrom:"Change all stations from this type:",changeTo:"To this type:",info:"Changing stations' type will remove all specific attributes from stations except their position and names. SAVE BEFORE CHANGE!"},changeLineStyleType:{title:"Change lines style in batch",changeFrom:"Change all lines from this style:",changeTo:"To this style:",info:"Changing lines' style will remove all specific attributes from lines except their connections. SAVE BEFORE CHANGE!"},changeLinePathType:{title:"Change lines path in batch",changeFrom:"Change all lines from this path:",changeTo:"To this path:"},changeColor:{title:"Change color in batch",changeFrom:"Change all objects from this color:",changeTo:"To this color:",any:"From any color"},removeLines:{title:"Remove lines with single color",content:"Remove lines that have this color: "},updateColor:{title:"Update color",content:"Update all colors with their latest value.",success:"Successfully update all colors.",error:"Error in updating all colors: {{e}}."},unlockSimplePath:{title:"Unlock simple path",content1:"The Rail Map Painter application endeavors to offer an interactive platform conducive to the creation of rail maps while adhering to established conventions. Among these conventions, one particularly renowned style finds its origins in the innovative work of Harry Beck. His pioneering contribution, officially endorsed in the year 1932, garnered instantaneous acclaim from the general populace. Presently, it stands as an exemplar of paramount significance within the realm of information design. This paradigmatic approach has found widespread implementation in transit cartography on a global scale, albeit with varying degrees of success.",content2:"The application inherently conceals the option to utilize a simple path, as its deployment has the potential to contravene established conventions. This particular feature remains discreetly tucked away by default. Additionally, submissions to the Rail Map Painter Gallery are subject to stringent scrutiny, with a categorical rejection of compositions that employ the simple path with a single color style approach.",content3:"Still, we reserve the opportunity to unlock this option and use the simple path when you subscribe. It should be noted that even after acquisition, the use of simple path is limited to single color.",check:"Unlock",unlocked:"Already Unlocked"},masterManager:{title:"Manage all master nodes",id:"Id",label:"Label",type:"Type",types:{MiscNode:"MiscNode",Station:"Station"},importTitle:"Upload master parameter",importFrom:"Use imported styles",importOther:"Import new style",importParam:"Paste configuration"}},telemetry:{title:"Telemetry",info:"To help improve Rail Map Painter and keep contributors motivated to enhance the project, anonymous usage data is collected through Google Analytics. This data is used solely for enhancing the user experience and optimizing the tool's functionality and is never shared with third parties.",essential:"Basic",essentialTooltip:"Change this global setting in Rail Map Toolkit",essentialInfo:"Rail Map Painter collects essential usage data that helps us understand how and when users interact with the tool. Rest assured, no personally identifiable information or data from your projects is ever collected.",essentialLink:"Click this link to see detailed fields that Google Analytics may collect.",additional:"Additional",additionalInfo:"Rail Map Painter also gathers data on interactions, such as project creation or station addition, when you input. These additional data is also anonymous and are only used for statistical analysis to help us make the tool better."}},about:{title:"About",rmp:"Rail Map Painter",railmapgen:"A Rail Map Toolkit project",desc:"Design your own rail map by freely dragging stations from different cities and connecting them with 90 or 135-degree rounded corners lines!",content1:"In memory of all the freedom and equality we once had.",content2:"06/01/2022 in Shanghai",contributors:"Contributors",coreContributors:"Core Contributors",styleContributors:"Style Contributors",langonginc:"Live a life you will remember.","203IhzElttil":"Special thanks for his diligent work in ensuring that the stations of Shanghai Metro match the original design.",Swiftiecott:"Special thanks for his diligent work in ensuring that the stations of Beijing Subway match the original design.",Minwtraft:"Special thanks for his diligent work in ensuring that the stations of Guangzhou Metro match the original design.",contactUs:"Contact Us",github:"Project repository",githubContent:"Face any problems? Search or raise an issue here!",slack:"Slack group",slackContent:"Chat in these Slack channels!"}},Pf={color:Rf,warning:Cf,cancel:Af,apply:_f,remove:Lf,close:Ef,noShowAgain:Tf,rmtPromotion:kf,panel:Of,header:Mf},jf="Color A",$f="Color B",If="カラー",Df="警告",zf="キャンセル",Bf="適用",Ff="削除",Gf="閉じる",Uf="次回表示しない",Vf="絶対に見逃せないオールインワンツールキット!",Wf={tools:{showLess:"表示を減らす",section:{lineDrawing:"路線描画",stations:"駅",miscellaneousNodes:"その他の節点"},select:"選択する",learnHowToAdd:{station:"駅を追加する方法を学ぶ!","misc-node":"節点を追加する方法を学ぶ!",line:"路線風格を追加する方法を学ぶ!"}},details:{header:"詳細",info:{title:"基本情報",id:"ID",zIndex:"深度",stationType:"駅の種類",linePathType:"路線経路の種類",lineStyleType:"路線風格の種類",type:"種類",parallel:"平行路線",parallelIndex:"平行路線索引"},multipleSelection:{title:"複数選択",change:"選択した属性を変更する",selected:"選択されたオブジェクト:",show:"見せる",station:"駅",miscNode:"その他のノード",edge:"ライン"},changeStationTypeContent:"駅の種類を変更すると、駅の名前以外のすべての属性が削除されます。",changeLineTypeContent:"路線の種類を変更すると、すべての属性が削除されます。",changeType:"種類を変更",nodePosition:{title:"節点の位置",pos:{x:"X座標",y:"Y座標"}},lineExtremities:{title:"路線の端点",source:"出発点",target:"到着点",sourceName:"出発点名",targetName:"到着点名"},specificAttrsTitle:"特定の属性",unknown:{error:"おっと :( これは{{category}}を認識できません。おそらくそれは新しいバージョンで作成されました。",node:"節点",linePath:"路線経路",lineStyle:"路線風格"},nodes:{common:{nameZh:"中国語の路線名",nameEn:"英語の路線名",nameJa:"日本語の路線名",num:"路線番号"},virtual:{displayName:"仮想節点"},shmetroNumLineBadge:{displayName:"上海地下鉄路線番号徽章"},shmetroTextLineBadge:{displayName:"上海地下鉄テキスト路線徽章"},gzmtrLineBadge:{displayName:"広州地下鉄路線徽章",tram:"路面電車",span:"行にまたがる数字"},bjsubwayNumLineBadge:{displayName:"北京地下鉄路線番号徽章"},bjsubwayTextLineBadge:{displayName:"北京地下鉄テキスト路線徽章"},berlinSBahnLineBadge:{displayName:"ベルリンSバーン番号徽章"},berlinUBahnLineBadge:{displayName:"ベルリン地下鉄番号徽章"},suzhouRTNumLineBadge:{displayName:"蘇州軌道交通路線番号徽章",branch:"支線"},chongqingRTNumLineBadge:{displayName:"重慶鉄道交通路線番号徽章"},chongqingRTTextLineBadge:{displayName:"重慶鉄道交通テキスト路線徽章"},shenzhenMetroNumLineBadge:{displayName:"深セン地下鉄路線番号徽章",branch:"支線"},mrtDestinationNumbers:{displayName:"シンガポールMRTの目的地番号"},mrtLineBadge:{displayName:"シンガポールMRT路線バッジ",isTram:"LRT路線バッジです"},jrEastLineBadge:{displayName:"JR東日本路線番号徽章",crosshatchPatternFill:"網目模様で塗りつぶす"},qingdaoMetroNumLineBadge:{displayName:"青島地下鉄番号線徽章",numEn:"英語の行番号",showText:"テキストを表示"},guangdongIntercityRailwayLineBadge:{displayName:"広東省都市間鉄道線徽章"},londonArrow:{displayName:"ロンドン矢印",type:"種類",continuation:"継続",sandwich:"サンドイッチ",tube:"地下鉄"},master:{displayName:"大師節点",type:"大師節点種類",undefined:"未定義"},facilities:{displayName:"施設",type:"種類"},text:{displayName:"任意のテキスト",content:"コンテンツ",fontSize:"書体サイズ",lineHeight:"行の高さ",textAnchor:"テキストのアンカー",start:"開始",middle:"中央",end:"終了",auto:"自動",hanging:"吊り下げ",dominantBaseline:"ドミナントベースライン",language:"言語での書体ファミリー",zh:"中国語",en:"英語",mtr__zh:"香港MTR中国語",mtr__en:"香港MTR英語",berlin:"ベルリンS/Uバーン",mrt:"シンガポールMRT",jreast_ja:"JR東日本日本語",jreast_en:"JR東日本英語",rotate:"回転",italic:"イタリック体",bold:"太字"}},stations:{common:{nameZh:"中国語の駅名",nameEn:"英語の駅名",nameJa:"日本語の駅名",nameOffsetX:"駅名補正値X",nameOffsetY:"駅名補正値Y",rotate:"アイコンの回転",lineCode:"路線番号",stationCode:"駅番号",left:"左",middle:"中央",right:"右",top:"上",bottom:"下"},interchange:{title:"乗り換え",within:"駅構内の乗り換え",outStation:"駅外の乗り換え",outSystem:"系統外の乗り換え",addGroup:"乗り換えグループを追加",noInterchanges:"乗り換えなし",nameZh:"中国語の駅名",nameEn:"英語の駅名",add:"乗り換えを追加",copy:"乗り換えをコピー",remove:"乗り換えを削除"},shmetroBasic:{displayName:"上海地下鉄基本駅"},shmetroBasic2020:{displayName:"上海地下鉄基本駅(令和2年)"},shmetroInt:{displayName:"上海地下鉄乗り換え駅",height:"アイコンの高さ",width:"アイコンの幅"},shmetroOsysi:{displayName:"上海地下鉄の系統外乗り換え駅"},shanghaiSuburbanRailway:{displayName:"上海市営鉄道駅"},gzmtrBasic:{displayName:"広州地下鉄基本駅",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",tram:"路面電車"},gzmtrInt:{displayName:"広州地下鉄乗り換え駅",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",foshan:"仏山"},gzmtrInt2024:{displayName:"広州地下鉄乗り換え駅(令和6年)",columns:"駅の列数",topHeavy:"上段に多くの駅を優先配置",anchorAt:"錨位置",anchorAtNone:"中心",osiPosition:"改札外乗り換え",osiPositionNone:"なし",osiPositionLeft:"左",osiPositionRight:"右"},bjsubwayBasic:{displayName:"北京地下鉄基本駅",open:"開業済み"},bjsubwayInt:{displayName:"北京地下鉄乗り換え駅",outOfStation:"改札外乗り換え"},mtr:{displayName:"香港MTR駅",rotate:"アイコンの回転"},suzhouRTBasic:{displayName:"蘇州軌道交通基本駅",textVertical:"垂直の名前"},suzhouRTInt:{displayName:"蘇州軌道交通乗り換え駅"},kunmingRTBasic:{displayName:"昆明軌道交通基本駅"},kunmingRTInt:{displayName:"昆明軌道交通乗り換え駅"},MRTBasic:{displayName:"シンガポールMRT基本駅",isTram:"LRTの駅です"},MRTInt:{displayName:"シンガポールMRT乗り換え駅"},jrEastBasic:{displayName:"JR東日本基本駅",nameOffset:"名前の補正値",textOneLine:"1行での名前",textVertical:"垂直の名前",important:"重要な駅",lines:"乗り換え線の補正値"},jrEastImportant:{displayName:"JR東日本重要駅",textVertical:"垂直の名前",mostImportant:"最も重要な駅",minLength:"駅の最小長"},foshanMetroBasic:{displayName:"仏山地鐵基本車站",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",tram:"路面電車"},qingdaoMetro:{displayName:"地下鉄青島駅",isInt:"乗換駅です"},tokyoMetroBasic:{displayName:"東京メトロの基本駅",nameOffset:"駅名補正値",textVertical:"垂直の名前"},tokyoMetroInt:{displayName:"東京メトロ乗換駅",mereOffset:{displayName:"名前は単なるオフセットです",none:"なし",left1:"左(少ない)",left2:"左(さらに)",right1:"右(少ない)",right2:"右(さらに)",up:"上",down:"下"},importance:{displayName:"駅の重要性",default:"デフォルト",middle:"真ん中",high:"高い"},align:{displayName:"アイコンの整列",horizontal:"水平",vertical:"垂直"}},londonTubeCommon:{stepFreeAccess:"段差のないアクセス",stepFreeAccessNone:"なし",stepFreeAccessTrain:"駅から電車まで",stepFreeAccessPlatform:"駅からプラットフォームまで"},londonTubeBasic:{displayName:"ロンドン地下鉄基本駅",terminal:"終着駅",shareTracks:"線路共有",shareTracksIndex:"線路共有索引"},londonTubeInt:{displayName:"ロンドン地下鉄乗換駅"},londonRiverServicesInt:{displayName:"ロンドン川サービス乗換駅"},guangdongIntercityRailway:{displayName:"広東省都市間鉄道駅"}},lines:{reconcileId:"調整ID",common:{offsetFrom:"補正値(From)",offsetTo:"補正値(To)",startFrom:"開始位置",roundCornerFactor:"角の丸め係数",from:"から",to:"まで",parallelDisabled:"この路線が平行であるため、一部の属性が無効になっています。",changeInBaseLine:"基準線で変更してください:"},simple:{displayName:"簡単な経路",offset:"補正値"},diagonal:{displayName:"135°対角経路"},perpendicular:{displayName:"90°垂直経路"},rotatePerpendicular:{displayName:"90°回転する垂直経路"},singleColor:{displayName:"単色風格"},shmetroVirtualInt:{displayName:"上海地下鉄駅外乗り換え風格"},shanghaiSuburbanRailway:{displayName:"上海市営鉄道風格",isEnd:"終了行"},gzmtrVirtualInt:{displayName:"広州地下鉄駅外乗り換え風格"},gzmtrLoop:{displayName:"広州地下鉄環状線風格"},chinaRailway:{displayName:"中国鉄道風格"},bjsubwaySingleColor:{displayName:"北京地下鉄単色風格"},bjsubwayTram:{displayName:"北京地下鉄路面電車風格"},bjsubwayDotted:{displayName:"北京地下鉄の点線風格"},dualColor:{displayName:"2色風格",swap:"色を交換",colorA:"色A",colorB:"色B"},river:{displayName:"河川風格",width:"幅"},mtrRaceDays:{displayName:"香港MTRレース日風格"},mtrLightRail:{displayName:"香港MTR軽軌風格"},mtrUnpaidArea:{displayName:"香港MTR改札外乗り換え風格"},mtrPaidArea:{displayName:"香港MTR改札内乗り換え風格"},mrtUnderConstruction:{displayName:"シンガポール MRT 工事中風格"},mrtSentosaExpress:{displayName:"シンガポール MRT セントーサ・エクスプレス風格"},jrEastSingleColor:{displayName:"JR東日本単色風格"},jrEastSingleColorPattern:{displayName:"JR東日本単色網目模様風格"},lrtSingleColor:{displayName:"シンガポールLRT単色風格"},londonTubeInternalInt:{displayName:"ロンドン地下鉄内部乗換風格"},londonTube10MinWalk:{displayName:"ロンドン地下鉄10分以内の乗換風格"},londonTubeTerminal:{displayName:"ロンドン地下鉄終着風格"},londonRail:{displayName:"ロンドン鉄道風格",limitedService:"限定サービス/ピーク時のみ",colorBackground:"背景色",colorForeground:"前景色"},londonSandwich:{displayName:"ロンドンサンドイッチ風格"},londonLutonAirportDART:{displayName:"ロンドンルートン空港DART風格"},londonIFSCloudCableCar:{displayName:"ロンドンIF雲索道風格"},guangdongIntercityRailway:{displayName:"広東省都市間鉄道風格"}},edges:{},footer:{duplicate:"重複",copy:"複製",remove:"削除"}}},Hf={popoverHeader:"<1>{{environment}} 環境です!",popoverBody:"現在、最新のRMPをテストしています。ご意見がありましたら、https://github.com/railmapgen/rmp/issues で提案してください",search:"駅を探す",open:{new:"新しい作品",config:"作品をインポート",projectRMG:"RMG作品からインポート",invalidType:"無効なファイルタイプです!JSON形式のファイルのみが受け付けられます。",unknownError:"アップロードされたファイルの解析中に不明なエラーが発生しました。もう一度お試しください。",gallery:"ギャラリーからインポート",tutorial:"指導を開始する",importFromRMPGallery:"テンプレート{{id}}がインポートされました。この変更に満足していませんか?Ctrl + Zまたは元に戻すボタンで元に戻せます。",failToImportFromRMPGallery:"ギャラリーから{{id}}のインポートに失敗しました。ファイルが見つかりませんでした。"},download:{config:"作品をエクスポート",image:"画像をエクスポート","2rmg":{title:"RMG作品へエクスポート",type:{line:"直線",loop:"環状線",branch:"支線"},placeholder:{chinese:"中国語のライン名",english:"英語の路線名",lineCode:"路線番号"},info1:"この機能は、RMP作品をRMG作品に変換するために設計されています。",info2:"以下のリストの行は、変換用に利用できます。左側のテキストボックスに中国語の行名、中央に英語の行名、右側に(広州メトロ風格用の)行コードを入力し、ダウンロードボタンをクリックしてRMG作品を保存できます。",noline:"利用可能な回線が見つかりません。",download:"ダウンロード",downloadInfo:"出発駅を選択してクリックしてください。"},format:"フォーマット",png:"PNG",svg:"SVG",svgVersion:"版","svg1.1":"1.1(Adobe Illustratorと互換性あり)",svg2:"2(現代のブラウザと互換性あり)",transparent:"透明性",scale:"スケール",disabledScaleOptions:"ブラウザのキャンバス制限のため、一部のスケールオプションが無効になっています。",disabledScaleOptionsWorkarounds:"回避策として、このCLIツールを使用してSVGから画像を生成する方法が考えられます:",imageTooBig:"画像が大きすぎてブラウザで生成できません!",useSystemFonts:"キャンバスで内覧された書体の代わりに系統書体を使用する",shareInfo1:"この画像を共有する際に、添付ファイル ",shareInfo2:" とリンクを添付します。",termsAndConditions:"利用規約",termsAndConditionsInfo:"以下の利用規約に同意します:",period:"。",confirm:"ダウンロード"},donation:{title:"寄付",openCollective:"Open Collective",viaUSD:"PaypalまたはVisaカードを使用してドルで寄付する。",afdian:"爱发电",viaCNY:"AlipayまたはWechat Payを使用して人民元で寄付する。"},settings:{title:"設定",pro:"これはPRO機能であり、サブスクリプションが必要です。",proWithTrial:"これはPRO機能で、無料の限定トライアルが利用可能です。",proLimitExceed:{master:"大師節点が無料枠を超えています。",parallel:"平行路線が無料枠を超えています。",solution:"これらを削除して警告を解除するか、サブスクリプションに登録してさらに多くの機能を利用してください!"},subscription:{title:"サブスクリプションステータス","logged-out":"現在ログアウトしています。",free:"ログイン済み!さらに多くの機能をアンロックするにはサブスクリプションを登録してください!",subscriber:"サブスクリプションありがとうございます!すべての機能をお楽しみください!",expired:"ログインステータスの有効期限が切れました。ログアウトして再度ログインしてください。"},preference:{title:"設定",keepLastPath:"次の移動で背景をクリックするまで、線を描き続ける",autoParallel:"新しい路線を既存の路線と平行に自動的に設定",randomStationNames:{title:"作成時に駅名を乱数化する",none:"なし",shmetro:"上海",bjsubway:"北京"}},shortcuts:{title:"ショートカット",keys:"キー",description:"説明",f:"最後のツールを使用する。",s:"選択する。",arrows:"キャンバスを少し移動します。",ijkl:"選択した駅を少し移動します。",shift:"複数選択。",alt:"正確な移動。",delete:"選択した駅を削除します。",cut:"切り取る。",copy:"複製する。",paste:"貼り付ける。",undo:"元に戻す。",redo:"やり直す。"},procedures:{title:"手順",translate:{title:"節点の座標を変換",content:"すべての節点のX座標とY座標に次の補正値を追加する:",x:"X軸",y:"Y軸"},scale:{title:"節点の座標をスケーリング",content:"すべての節点のX座標とY座標に次の値を乗算する:",factor:"スケールファクター"},changeType:{title:"すべてのオブジェクトの属性を変更する",any:"どれでも"},changeZIndex:"深度を変更する",changeStationType:{title:"一括で駅の種類を変更",changeFrom:"すべての駅をこの種類から変更する:",changeTo:"この種類に変更する:",info:"駅の種類を変更すると、位置と名前以外の特定の属性がすべて削除されます。変更する前に保存してください!"},changeLineStyleType:{title:"線の風格を一括で変更",changeFrom:"この風格からすべての行を変更します:",changeTo:"この風格に:",info:"線の風格を変更すると、接続を除くすべての特定の属性が線から削除されます。 変更する前に保存してください!"},changeLinePathType:{title:"行のパスを一括で変更する",changeFrom:"このパスのすべての行を変更します:",changeTo:"この道へ:"},changeColor:{title:"一括で色を変更する",changeFrom:"すべてのオブジェクトをこの色から変更します:",changeTo:"この色に:",any:"どの色からも"},removeLines:{title:"単一色の路線を削除",content:"この色を持つ路線を削除する:"},updateColor:{title:"色を更新する",content:"最新の値ですべての色を更新します。",success:"すべての色を正常に更新しました。",error:"すべての色を更新する際にエラーが発生しました: {{e}}。"},unlockSimplePath:{title:"簡単な経路の解除",content1:"「地下鉄路線図画家」は、既存の慣例に従いつつ、鉄道地図の作成を支援するインタラクティブなプラットフォームを提供することを目指しています。その中でも、特に有名な風格の1つは、ハリー・ベックの革新的な作品に由来しています。彼の先駆的な貢献は1932年に正式に認められ、一般大衆から即座に称賛されました。現在では、情報デザインの領域において極めて重要な存在となっています。この典型的なアプローチは、世界規模の公共交通カートグラフィに広く採用されていますが、成功度は異なります。",content2:"アプリケーション自体は、既存の慣例に反する可能性があるため、簡単な経路を利用するオプションをデフォルトで控えめに隠しています。また、「地下鉄路線図画家ギャラリー」への投稿は厳格な審査を受けることになり、簡単な経路を単一の色の風格で使用する作品は断固として拒否されます。",content3:"それでも、このオプションのロックを解除し、寄付時にイージーパスを使用する機会を予約します。 取得後も、単純なパスの使用はモノクロスタイルに限定されることに注意してください。",check:"簡単な経路を解除",unlocked:"既に解除されています"},masterManager:{title:"すべての大師節点を管理する",id:"ID",label:"標識",type:"種類",types:{MiscNode:"その他節点",Station:"駅"},importTitle:"大師引数をアップロード",importFrom:"インポートしたスタイルを使用",importOther:"新しいスタイルをインポート",importParam:"設定情報を貼り付け"}},telemetry:{title:"テレメトリー",info:"鉄道路線図画家を改善し、貢献者がプロジェクトを向上させる意欲を維持するため、Google Analytics を通じて匿名の使用データを収集しています。このデータはユーザー体験の向上とツールの最適化のためだけに使用され、第三者と共有されることはありません。",essential:"基本",essentialTooltip:"鉄道路線図ツールキットでこのグローバル設定を変更する",essentialInfo:"鉄道路線図画家は、ツールがどのように、またいつ使用されるかを理解するための基本的な使用データを収集します。ご安心ください。個人を特定できる情報やプロジェクトデータは一切収集されません。",essentialLink:"Google Analytics が収集する可能性のある詳細フィールドを表示するには、こちらのリンクをクリックしてください。",additional:"追加",additionalInfo:"鉄道路線図画家は、プロジェクトの作成や駅の追加など、入力時のインタラクションに関するデータも収集します。これらの追加データも匿名であり、ツールを改善するための統計分析にのみ使用されます。"}},about:{title:"について",rmp:"地下鉄路線図画家",railmapgen:"地下鉄路線図ツールキットのプロジェクト",desc:"異なる都市の駅を自由にドラッグして、90度または135度の角丸線で接続して独自の鉄道地図を設計しましょう!",content1:"かつて私たちが持っていた自由と平等のすべての記憶に捧げます。",content2:"2022年6月1日、上海",contributors:"貢献者",coreContributors:"主要な貢献者",styleContributors:"風格の貢献者","203IhzElttil":"上海地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",Swiftiecott:"北京地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",Minwtraft:"広州地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",contactUs:"お問い合わせ",github:"プロジェクトリポジトリ",githubContent:"問題が発生しましたか?こちらで検索したり、問題を報告したりしてください!",slack:"Slackグループ",slackContent:"Slackのチャンネルでチャットしましょう!"}},Jf={colorA:jf,colorB:$f,color:If,warning:Df,cancel:zf,apply:Bf,remove:Ff,close:Gf,noShowAgain:Uf,rmtPromotion:Vf,panel:Wf,header:Hf},Kf="색깔",qf="경고",Yf="취소",Zf="사용",Qf="삭제",Xf="다시",eg="표시하지 않기",tg="놓치고 싶지 않은 올인원 툴킷! 닫기.",ng={tools:{showLess:"적게 표시",section:{lineDrawing:"선 그리기",stations:"역",miscellaneousNodes:"기타 노드"},select:"선택하다",learnHowToAdd:{station:"역을 추가하는 방법 배우기!","misc-node":"노드를 추가하는 방법 배우기!",line:"라인 스타일을 추가하는 방법 배우기!"}},details:{header:"상세한 상황",info:{title:"기본정보",id:"고유 식별자",zIndex:"깊이",stationType:"역 유형",linePathType:"선분 경로 유형",lineStyleType:"선분 스타일 유형",type:"유형",parallel:"평행선",parallelIndex:"평행 인덱스"},multipleSelection:{title:"다중 선택",change:"선택한 속성 변경",selected:"선택한 개체:",show:"보여주다",station:"역",miscNode:"기타 노드",edge:"윤곽"},changeStationTypeContent:"역 유형을 변경하면 이름을 제외한 모든 독특한 속성이 제거됩니다.",changeLineTypeContent:"선분 유형을 변경하면 모든 독특한 속성이 제거됩니다.",changeType:"종류 변경",nodePosition:{title:"노드 위치",pos:{x:"가로 좌표",y:"세로 좌표"}},lineExtremities:{title:"선분 양단",source:"시작점",target:"종말점",sourceName:"시작점 명칭",targetName:"종말점 명칭"},specificAttrsTitle:"독특 속성",unknown:{error:"이런 :( 우리는 이 {{category}}를 인식할 수 없습니다. 아마도 더 최근 버전에서 생성되었을 것입니다.",node:"노드",lineType:"선분 경로",lineStyle:"선분 스타일"},nodes:{common:{nameZh:"한자 노선명칭",nameEn:"영문 노선명칭",nameJa:"일본 노선명칭",num:"노선 번호"},virtual:{displayName:"가상 노드"},shmetroNumLineBadge:{displayName:"상해 지하철 디지털 노선 표지"},shmetroTextLineBadge:{displayName:"상해 지하철 문자 노선 표지"},gzmtrLineBadge:{displayName:"광저우 지하철 노선 표지",tram:"시가 전차",span:"행 범위 숫자"},bjsubwayNumLineBadge:{displayName:"베이징 지하철 노선 배지"},bjsubwayTextLineBadge:{displayName:"베이징 지하철 텍스트 라인 배지"},berlinSBahnLineBadge:{displayName:"베를린 S반 노선 배지"},berlinUBahnLineBadge:{displayName:"베를린 U반 노선 배지"},suzhouRTNumLineBadge:{displayName:"수주 철도 번호 라인 배지",branch:"지선입니다"},chongqingRTNumLineBadge:{displayName:"충칭 철도 교통 디지털 노선 식별"},chongqingRTTextLineBadge:{displayName:"충칭 철도 교통 텍스트 라인 표시"},shenzhenMetroNumLineBadge:{displayName:"심천 지하철 번호 라인 배지",branch:"지선입니다"},mrtDestinationNumbers:{displayName:"싱가포르 MRT 목적지 번호"},mrtLineBadge:{displayName:"싱가포르 MRT 노선 배지",isTram:"LRT 노선 배지입니다"},jrEastLineBadge:{displayName:"JR 동일본 라인 배지",crosshatchPatternFill:"크로스해치 패턴으로 채우기"},qingdaoMetroNumLineBadge:{displayName:"칭다오 지하철 번호 라인 배지",numEn:"영어로 된 줄 번호",showText:"텍스트 표시"},guangdongIntercityRailwayLineBadge:{displayName:"광동 시외 철도 노선 표지판"},londonArrow:{displayName:"런던 화살표",type:"유형",continuation:"계속",sandwich:"샌드위치",tube:"튜브"},master:{displayName:"마스터 노드",type:"마스터 노드 유형",undefined:"정의되지 않음"},facilities:{displayName:"시설",type:"유형"},text:{displayName:"임의 글자",content:"내용",fontSize:"글자 대소",lineHeight:"행고도",textAnchor:"글자 앵커",start:"시작",middle:"가운데",end:"끝",auto:"자동",hanging:"매달리는",dominantBaseline:"현성 바셀린",language:"언어로 된 글꼴 종류",zh:"중국어",en:"영어",mtr__zh:"홍콩 MTR 중국어",mtr__en:"홍콩 MTR 영어",berlin:"베를린 S/U Bahn",mrt:"싱가포르 MRT",jreast_ja:"JR 동일본어",jreast_en:"JR 동일본 영어",rotate:"회전",italic:"이탤릭체",bold:"굵게"}},stations:{common:{nameZh:"한자 명칭",nameEn:"영문 명칭",nameJa:"일본 명칭",nameOffsetX:"명칭 가로 이동",nameOffsetY:"명칭 세로 이동",rotate:"역회전각도",lineCode:"노선 번호",stationCode:"역 번호",left:"왼쪽",middle:"가운데",right:"오른쪽",top:"위",bottom:"아래"},interchange:{title:"환승",within:"같은 역에서 환승한",outStation:"역을 나가 환승한",outSystem:"시스템외환승",addGroup:"환승 조합 추가",noInterchanges:"비환승역",nameZh:"한자 명칭",nameEn:"영문 명칭",add:"환승 추가",copy:"환승 복제",remove:"환승 삭제"},shmetroBasic:{displayName:"상해 지하철의 기본 역"},shmetroBasic2020:{displayName:"상해 지하철 기본 역(2020년)"},shmetroInt:{displayName:"상해 지하철 환승역",height:"역 높이",width:"역 폭"},shmetroOsysi:{displayName:"상하이 지하철 시스템 외환승 역"},shanghaiSuburbanRailway:{displayName:"상하이 기차역"},gzmtrBasic:{displayName:"광저우 지하철 기본역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",tram:"시가 전차"},gzmtrInt:{displayName:"광저우 지하철 환승역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",foshan:"포산"},gzmtrInt2024:{displayName:"광저우 지하철 환승역 (2024)",columns:"역 열 수",topHeavy:"상단에 더 많은 역 우선 배치",anchorAt:"앵커 위치",anchorAtNone:"중앙",osiPosition:"역을 나가 환승",osiPositionNone:"없음",osiPositionLeft:"왼쪽",osiPositionRight:"오른쪽"},bjsubwayBasic:{displayName:"베이징 지하철 기본역",open:"개통여부"},bjsubwayInt:{displayName:"베이징 지하철 환승역",outOfStation:"역을 나가 환승"},mtr:{displayName:"홍콩 MTR 역"},suzhouRTBasic:{displayName:"쑤저우 궤도교통 기본역",textVertical:"수직 이름"},suzhouRTInt:{displayName:"쑤저우 궤도교통 환승역"},kunmingRTBasic:{displayName:"쿤밍 궤도교통 기본역"},kunmingRTInt:{displayName:"쿤밍 궤도교통 환승역"},MRTBasic:{displayName:"싱가포르MRT기본역",isTram:"LRT역이에요"},MRTInt:{displayName:"싱가포르MRT환승역"},jrEastBasic:{displayName:"JR 동일본 기본 역",nameOffset:"이름 오프셋",textOneLine:"한 줄로 표시된 이름",textVertical:"수직 이름",important:"중요한 역",lines:"환승 노선 오프셋"},jrEastImportant:{displayName:"JR 동일본 중요 역",textVertical:"수직 이름",mostImportant:"가장 중요한 역",minLength:"스테이션의 최소 길이"},foshanMetroBasic:{displayName:"포산 지하철 기본역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",tram:"시가 전차"},qingdaoMetro:{displayName:"칭다오 지하철역",isInt:"환승역인가"},tokyoMetroBasic:{displayName:"도쿄메트로 기본역",nameOffset:"이름 오프셋",textVertical:"업종명",lineCode:"라인 코드",stationCode:"역 코드"},tokyoMetroInt:{displayName:"도쿄메트로 환승역",mereOffset:{displayName:"단순한 오프셋 이름",none:"없음",left1:"왼쪽(적음)",left2:"왼쪽(더)",right1:"오른쪽(적음)",right2:"맞아요 (더)",up:"위로",down:"아래에"},importance:{displayName:"역 중요성",default:"기본",middle:"가운데",high:"높은"},align:{displayName:"아이콘 정렬",horizontal:"수평의",vertical:"수직의"}},londonTubeCommon:{stepFreeAccess:"단차 없는 접근",stepFreeAccessNone:"없음",stepFreeAccessTrain:"거리에서 열차까지",stepFreeAccessPlatform:"거리에서 플랫폼까지"},londonTubeBasic:{displayName:"런던 지하철 기본역",terminal:"종착역",shareTracks:"선로 공유",shareTracksIndex:"선로 공유 지수"},londonTubeInt:{displayName:"런던 지하철 환승역"},londonRiverServicesInt:{displayName:"런던 강 서비스 환승역"},guangdongIntercityRailway:{displayName:"광둥 시외 기차역"}},lines:{reconcileId:"연결 선분 고유 식별자",common:{offsetFrom:"시작점 오프셋",offsetTo:"끝점 오프셋",startFrom:"여기서부터 시작",roundCornerFactor:"회전원각인자",from:"에서",to:"까지",parallelDisabled:"이 선이 평행하기 때문에 일부 속성이 비활성화되었습니다.",changeInBaseLine:"기본선에서 변경하십시오:"},simple:{displayName:"기본 선분",offset:"오프셋"},diagonal:{displayName:"135° 접힌 선분"},perpendicular:{displayName:"90° 수직 선분"},rotatePerpendicular:{displayName:"90° 수직 경로 회전"},singleColor:{displayName:"단색 스타일"},shmetroVirtualInt:{displayName:"상해 지하철 역 환승 모습"},shanghaiSuburbanRailway:{displayName:"상하이 도시철도 스타일",isEnd:"끝 범위"},gzmtrVirtualInt:{displayName:"광저우 지하철 역 환승 모습"},gzmtrLoop:{displayName:"광저우 지하철 순환선 스타일"},chinaRailway:{displayName:"중국 철도 모습"},bjsubwaySingleColor:{displayName:"베이징 지하철 단색 스타일"},bjsubwayTram:{displayName:"베이징 지하철 노면 전차 모습"},bjsubwayDotted:{displayName:"베이징 지하철 점선 스타일"},dualColor:{displayName:"이색 스타일",swap:"색을 바꾸기",colorA:"색깔 A",colorB:"색깔 B"},river:{displayName:"강 스타일",width:"폭"},mtrRaceDays:{displayName:"홍콩 MTR 경마일 스타일"},mtrLightRail:{displayName:"홍콩 MTR 경전철 스타일"},mtrUnpaidArea:{displayName:"홍콩 MTR 미결제 구역 스타일"},mtrPaidArea:{displayName:"홍콩 MTR 결제완료 구역 스타일"},mrtUnderConstruction:{displayName:"싱가포르 MRT 공사중 스타일"},mrtSentosaExpress:{displayName:"싱가포르 MRT 센토사 익스프레스 스타일"},jrEastSingleColor:{displayName:"JR 동일본 단색 스타일"},jrEastSingleColorPattern:{displayName:"JR 동일본 단색 크로스해치 패턴 스타일"},lrtSingleColor:{displayName:"싱가포르 LRT 단색 스타일"},londonTubeInternalInt:{displayName:"런던 지하철 내부 환승 스타일"},londonTube10MinWalk:{displayName:"런던 지하철 10분 이내 도보 환승 스타일"},londonTubeTerminal:{displayName:"런던 지하철 종착 스타일"},londonRail:{displayName:"런던 철도 스타일",limitedService:"제한 서비스/혼잡 시간대만",colorBackground:"배경 색상",colorForeground:"전경 색상"},londonSandwich:{displayName:"런던 샌드위치 스타일"},londonLutonAirportDART:{displayName:"런던 루튼 공항 DART 스타일"},londonIFSCloudCableCar:{displayName:"런던 IFS 클라우드 케이블카 스타일"},guangdongIntercityRailway:{displayName:"광동성 도시간 철도 스타일"}},edges:{},footer:{duplicate:"복사",copy:"복사",remove:"삭제"}}},rg={popoverHeader:"당신은 환경을<1>{{environment}}탐색하고 있습니다",popoverBody:"최신 RMP를 테스트하고 있습니다.제안 사항이 있으시면 언제든지 https://github.com/railmapgen/rmp/issues에 제출해 주십시오.",search:"방송국 검색",open:{new:"신 프로젝트",config:"프로젝트 가져오기",projectRMG:"RMG 프로젝트에서 가져오기",invalidType:"잘못된 파일 형식입니다! JSON 형식의 파일만 허용됩니다.",unknownError:"업로드된 파일의 파싱 중 알 수 없는 오류가 발생했습니다. 다시 시도해주세요.",gallery:"갤러리에서 가져오기",tutorial:"튜토리얼 시작",importFromRMPGallery:"템플릿 {{id}}가 가져 왔습니다. 이 변경 사항에 만족하지 않으십니까? Ctrl + Z 또는 실행 취소 버튼을 사용하여 실행 취소하세요.",failToImportFromRMPGallery:"갤러리에서 {{id}}를 가져올 수 없습니다. 파일을 찾을 수 없습니다."},download:{config:"프로젝트 내보내기",image:"사진 내보내기","2rmg":{title:"RMG 프로젝트로 내보내기",type:{line:"일직선",loop:"고리",branch:"지선"},placeholder:{chinese:"중국어 라인 이름",english:"영어 줄 이름",lineCode:"노선 번호"},info1:"이 기능은 RMP 프로젝트를 RMG 프로젝트로 변환하는 데 사용됩니다.",info2:"변환할 수 있는 사용 가능한 라인들은 다음과 같습니다. 왼쪽 텍스트 상자에 중국어 라인 이름을 입력하고, 가운데에 영어 라인 이름을 입력하며, 오른쪽에 (광저우 메트로 스타일용) 라인 코드를 입력한 다음, 오른쪽의 다운로드 버튼을 클릭하여 RMG 프로젝트를 저장할 수 있습니다.",noline:"사용 가능한 라인이 없습니다.",download:"다운로드",downloadInfo:"출발 역을 선택하고 클릭하십시오."},format:"파일 종류",png:"PNG 이미지",svg:"SVG 이미지",svgVersion:"버전","svg1.1":"1.1 (Adobe Illustrator 호환)",svg2:"2 (현대 브라우저 호환)",transparent:"투명 배경",scale:"확대/축소",disabledScaleOptions:"브라우저의 캔버스 제한으로 인해 일부 스케일 옵션이 비활성화되었습니다.",disabledScaleOptionsWorkarounds:"가능한 해결 방법으로는 이 CLI 도구를 사용하여 SVG에서 이미지를 생성하는 것이 있습니다:",imageTooBig:"이미지가 너무 크기 때문에 브라우저에서 생성할 수 없습니다!",useSystemFonts:"캔버스에서 미리보기된 글꼴 대신 시스템 글꼴 사용",shareInfo1:"이 사진을 공유할 때",shareInfo2:"링크를 첨부할 것입니다.",termsAndConditions:"약관 및 세칙",termsAndConditionsInfo:"동의",period:".",confirm:"다운로드"},donation:{title:"기부",openCollective:"Open Collective",viaUSD:"Paypal 또는 Visa 카드를 통해 달러로 기부하기.",afdian:"爱发电",viaCNY:"Alipay 또는 Wechat Pay를 통해 인민폐로 기부하기."},settings:{title:"설정",pro:"이것은 PRO 기능이며, 구독이 필요한 계정입니다.",proWithTrial:"이것은 PRO 기능이며, 제한된 무료 체험이 가능합니다.",proLimitExceed:{master:"마스터 노드가 무료 사용 한도를 초과했습니다.",parallel:"평행선이 무료 사용 한도를 초과했습니다.",solution:"경고를 해제하려면 이 항목들을 제거하거나 구독을 통해 더 많은 기능을 잠금 해제하세요!"},subscription:{title:"구독 상태","logged-out":"현재 로그아웃 상태입니다.",free:"로그인 완료! 더 많은 기능을 사용하려면 구독하세요!",subscriber:"구독해주셔서 감사합니다! 모든 기능을 즐기세요!",expired:"로그인 상태가 만료되었습니다. 다시 로그인 해주세요."},preference:{title:"선호",keepLastPath:"다음 이동에서 배경을 클릭할 때까지 계속 선을 그립니다",autoParallel:"새 선을 기존 선과 평행하게 자동으로 설정합니다",randomStationNames:{title:"생성 시 역 이름을 랜덤으로 설정",none:"없음",shmetro:"상하이",bjsubway:"베이징"}},shortcuts:{title:"바로 가기",keys:"키",description:"설명",f:"마지막 도구 사용.",s:"선택하다.",arrows:"캔버스를 약간 이동합니다.",ijkl:"선택한 역을 약간 이동합니다.",shift:"여러 항목 선택.",alt:"정밀한 이동.",delete:"선택한 역을 삭제합니다.",cut:"잘라내기.",copy:"복사하다.",paste:"붙여넣다.",undo:"취소하다.",redo:"다시 하다."},procedures:{title:"절차",translate:{title:"노드 좌표 변환",content:"모든 노드의 x 및 y에 다음 오프셋을 추가:",x:"X축",y:"Y축"},scale:{title:"스케일 노드의 좌표",content:"모든 노드의 x 및 y에 다음 값을 곱하:",factor:"스케일 팩터"},changeType:{title:"모든 객체의 속성 변경",any:"어느"},changeZIndex:"일괄적으로 깊이 변경",changeStationType:{title:"역의 종류를 대량으로 수정",changeFrom:"이 유형의 모든 역:",changeTo:"이 유형의 역으로 변환:",info:"역 유형을 변경하면 이름을 제외한 모든 고유한 속성이 제거됩니다.저장했다가 다시 실행!"},changeLineStyleType:{title:"일괄적으로 선 스타일 변경",changeFrom:"이 스타일의 모든 선을 변경하세요:",changeTo:"이 스타일에:",info:"선 스타일을 변경하면 연결을 제외한 선의 모든 특정 속성이 제거됩니다. 변경하기 전에 저장하세요!"},changeLinePathType:{title:"일괄적으로 라인 경로 변경",changeFrom:"이 경로의 모든 줄을 변경하세요:",changeTo:"이 길로:"},changeColor:{title:"일괄 색상 변경",changeFrom:"이 색상의 모든 개체를 변경합니다.:",changeTo:"이 색상에:",any:"모든 색상에서"},removeLines:{title:"단일 색상의 선 제거",content:"이 색상의 선을 제거하세요: "},updateColor:{title:"색상 업데이트",content:"최신 값으로 모든 색상을 업데이트합니다.",success:"모든 색상을 성공적으로 업데이트했습니다.",error:"모든 색상을 업데이트하는 동안 오류가 발생했습니다: {{e}}."},unlockSimplePath:{title:"간단 경로 잠금 해제",content1:"Rail Map Painter 애플리케이션은 확립된 관례를 준수하면서도 철도지도 작성을 위한 대화식 플랫폼을 제공하기 위해 노력합니다. 이러한 관례 중 하나는 특히 해리 벡의 혁신적인 작업에서 비롯되었습니다. 그의 개척적인 기여는 공식적으로 1932년에 인정받았으며 일반 대중으로부터 즉각적인 찬사를 받았습니다. 현재는 정보 디자인 분야에서 중요한 본보기로 자리 잡고 있습니다. 이 패러다임적인 접근 방식은 전 세계적인 규모의 교통 카토그래피에서 널리 구현되었으나 성공의 정도는 다양합니다.",content2:"이 애플리케이션은 기존 관례에 위배될 가능성이 있기 때문에 간단한 경로를 활용하는 옵션을 기본 설정으로 가려놓았습니다. 또한 Rail Map Painter 갤러리에 제출되는 작품은 엄격한 심사를 받으며, 단일 색상 스타일로 간단한 경로를 사용하는 작품은 명확히 거부됩니다.",content3:"그래도 이 옵션을 잠금 해제하고 기부할 때 Easy Path를 사용할 수 있는 기회를 보유하고 있습니다. 획득 후에도 단순 경로의 사용은 단색 스타일로 제한된다는 점에 유의해야 합니다.",check:"간단한 경로 잠금 해제",unlocked:"이미 해제됨"},masterManager:{title:"모든 마스터 노드를 관리",id:"ID",label:"레이블",type:"유형",types:{MiscNode:"기타 노드",Station:"스테이션"},importTitle:"마스터 매개변수 업로드",importFrom:"가져온 스타일 사용",importOther:"새 스타일 가져오기",importParam:"구성 정보 붙여넣기"}},telemetry:{title:"원격 측정",info:"지하철 노선도 그리기를 개선하고 기여자가 프로젝트를 향상시키는 데 동기를 부여하기 위해 Google Analytics를 통해 익명의 사용 데이터를 수집합니다. 이 데이터는 사용자 경험을 향상하고 도구 기능을 최적화하는 데에만 사용되며, 제3자와 절대 공유되지 않습니다.",essential:"기본",essentialTooltip:"지하철 노선도 툴킷에서 이 전역 설정을 변경하세요",essentialInfo:"지하철 노선도 그리기는 도구를 언제, 어떻게 사용하는지 이해하기 위해 기본적인 사용 데이터를 수집합니다. 안심하세요. 개인 식별이 가능한 정보나 프로젝트 데이터는 절대 수집되지 않습니다.",essentialLink:"Google Analytics에서 수집할 수 있는 세부 필드를 보려면 이 링크를 클릭하세요.",additional:"추가",additionalInfo:"지하철 노선도 그리기는 프로젝트 생성이나 역 추가와 같은 입력 시의 상호작용 데이터도 수집합니다. 이러한 추가 데이터도 익명으로 처리되며, 도구를 개선하기 위한 통계 분석에만 사용됩니다."}},about:{title:"대함",rmp:"지하철 노선도 그리기",railmapgen:"철도 지도 툴킷 프로젝트 노선도 툴킷",desc:"다양한 도시의 역을 자유롭게 끌어서 90도 또는 135도의 둥근 모서리 선으로 연결함으로써 여러분만의 철도 지도를 디자인해요!",content1:"우리가 가졌던 자유와 평등을 기념한다.",content2:"2022년 6월 1일 상해",contributors:"기여자",coreContributors:"핵심 기여자",styleContributors:"스타일 기여자",langonginc:"기억에 남을 삶을 살아보세요.","203IhzElttil":"상하이 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",Swiftiecott:"베이징 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",Minwtraft:"광저우 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",contactUs:"우리에게 연락하기",github:"프로젝트 저장소",githubContent:"무슨 문제라도 있나요? 여기서 문제를 검색하거나 제기하십시오!",slack:"슬랙 그룹",slackContent:"이 슬랙 채널에서 채팅해요!"}},ig={color:Kf,warning:qf,cancel:Yf,apply:Zf,remove:Qf,close:Xf,noShowAgain:eg,rmtPromotion:tg,panel:ng,header:rg},og="颜色",ag="警告",sg="取消",lg="应用",ug="移除",cg="关闭",dg="不再显示",hg="您绝对不想错过的全能工具包!",pg={tools:{showLess:"显示更少",section:{lineDrawing:"线段绘制",stations:"车站",miscellaneousNodes:"杂项节点"},select:"多选",learnHowToAdd:{station:"了解如何添加车站!","misc-node":"了解如何添加节点!",line:"了解如何添加线段样式!"}},details:{header:"详情",info:{title:"基本信息",id:"唯一识别符",zIndex:"深度",stationType:"车站类型",linePathType:"线段路径类型",lineStyleType:"线段样式类型",type:"类型",parallel:"平行线段",parallelIndex:"平行线段索引"},multipleSelection:{title:"多重选取",change:"修改选中对象的属性",selected:"选中的对象:",show:"显示",station:"车站",miscNode:"杂项节点",edge:"线段"},changeStationTypeContent:"修改车站类型会移除所有独特属性除了名称。",changeLineTypeContent:"修改线段类型会移除所有独特属性。",changeType:"更改类型",nodePosition:{title:"节点位置",pos:{x:"横坐标",y:"纵坐标"}},lineExtremities:{title:"线段两端",source:"起点",target:"终点",sourceName:"起点名称",targetName:"终点名称"},specificAttrsTitle:"独特属性",unknown:{error:"哎呀 :( 我们无法识别此{{category}}。也许它是在更新版本中创建的。",node:"节点",linePath:"线段路径",lineStyle:"线段样式"},nodes:{common:{nameZh:"中文线路名称",nameEn:"英文线路名称",nameJa:"日语线路名称",num:"线路号"},virtual:{displayName:"虚拟节点"},shmetroNumLineBadge:{displayName:"上海地铁数字线路标识"},shmetroTextLineBadge:{displayName:"上海地铁文字线路标识"},gzmtrLineBadge:{displayName:"广州地铁线路标识",tram:"有轨电车",span:"跨行显示数字"},bjsubwayNumLineBadge:{displayName:"北京地铁数字线路标识"},bjsubwayTextLineBadge:{displayName:"北京地铁文字线路标识"},berlinSBahnLineBadge:{displayName:"柏林城市快铁线路标识"},berlinUBahnLineBadge:{displayName:"柏林地铁线路标识"},suzhouRTNumLineBadge:{displayName:"苏州轨道交通数字线路标识",branch:"是否支线"},chongqingRTNumLineBadge:{displayName:"重庆轨道交通数字线路标识"},chongqingRTTextLineBadge:{displayName:"重庆轨道交通文字线路标识"},shenzhenMetroNumLineBadge:{displayName:"深圳地铁数字线路标识",branch:"是否为支线"},mrtDestinationNumbers:{displayName:"新加坡MRT终点数字"},mrtLineBadge:{displayName:"新加坡MRT线路标识",isTram:"是LRT线路标识"},jrEastLineBadge:{displayName:"JR东日本线路标识",crosshatchPatternFill:"用网状图案填充"},qingdaoMetroNumLineBadge:{displayName:"青岛地铁数字线路标识",numEn:"英文线路号",showText:"显示文字"},guangdongIntercityRailwayLineBadge:{displayName:"广东城际铁路线路标识"},londonArrow:{displayName:"伦敦箭头",type:"类型",continuation:"延续",sandwich:"三明治",tube:"地铁"},master:{displayName:"大师节点",type:"大师节点类型",undefined:"未定义"},facilities:{displayName:"设施",type:"类型"},text:{displayName:"任意文字",content:"内容",fontSize:"文字大小",lineHeight:"行高度",textAnchor:"文字锚点",start:"开始",middle:"居中",end:"结束",auto:"自动",hanging:"悬挂",dominantBaseline:"显性基线",language:"哪个语言的字体系列",zh:"中文",en:"英文",mtr__zh:"港铁中文",mtr__en:"港铁英文",berlin:"柏林 S/U Bahn",mrt:"新加坡地铁",jreast_ja:"JR东日本日语",jreast_en:"JR东日本英语",rotate:"旋转",italic:"斜体",bold:"粗体"}},stations:{common:{nameZh:"中文名称",nameEn:"英文名称",nameJa:"日语名称",nameOffsetX:"名称横向偏移",nameOffsetY:"名称纵向偏移",rotate:"车站旋转角度",lineCode:"路线编号",stationCode:"车站编号",left:"左",middle:"中间",right:"右",top:"顶部",bottom:"底部"},interchange:{title:"换乘",within:"同站换乘",outStation:"出站换乘",outSystem:"系统外换乘",addGroup:"添加换乘组合",noInterchanges:"非换乘站",nameZh:"中文名称",nameEn:"英文名称",add:"添加换乘",copy:"复制换乘",remove:"删除换乘"},shmetroBasic:{displayName:"上海地铁基本车站"},shmetroBasic2020:{displayName:"上海地铁基本车站(2020)"},shmetroInt:{displayName:"上海地铁换乘车站",height:"车站高度",width:"车站宽度"},shmetroOsysi:{displayName:"上海地铁转乘车站"},shanghaiSuburbanRailway:{displayName:"上海市域铁路车站"},gzmtrBasic:{displayName:"广州地铁基本车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",tram:"有轨电车"},gzmtrInt:{displayName:"广州地铁换乘车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",foshan:"佛山"},gzmtrInt2024:{displayName:"广州地铁换乘站(2024)",columns:"站点列数",topHeavy:"优先将更多站点放在上方",anchorAt:"锚点位置",anchorAtNone:"居中",osiPosition:"出站换乘",osiPositionNone:"无",osiPositionLeft:"左侧",osiPositionRight:"右侧"},bjsubwayBasic:{displayName:"北京地铁基本车站",open:"是否开通"},bjsubwayInt:{displayName:"北京地铁换乘车站",outOfStation:"出站换乘"},mtr:{displayName:"香港MTR车站"},suzhouRTBasic:{displayName:"苏州轨道交通基本车站",textVertical:"垂直名称"},suzhouRTInt:{displayName:"苏州轨道交通换乘车站"},kunmingRTBasic:{displayName:"昆明轨道交通基本车站"},kunmingRTInt:{displayName:"昆明轨道交通换乘车站"},MRTBasic:{displayName:"新加坡MRT基本车站",isTram:"是LRT车站"},MRTInt:{displayName:"新加坡MRT换乘车站"},jrEastBasic:{displayName:"JR东日本基本车站",nameOffset:"名称偏移",textOneLine:"名称在一行中",textVertical:"垂直名称",important:"重要车站",lines:"换乘线偏移"},jrEastImportant:{displayName:"JR东日本重要车站",textVertical:"垂直名称",mostImportant:"最重要车站",minLength:"车站的最小长度"},foshanMetroBasic:{displayName:"佛山地铁基本车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",tram:"有轨电车"},qingdaoMetro:{displayName:"青岛地铁车站",isInt:"是换乘站"},tokyoMetroBasic:{displayName:"东京地铁基本车站",nameOffset:"名称偏移",textVertical:"垂直站名",lineCode:"线路编号",stationCode:"车站编号"},tokyoMetroInt:{displayName:"东京地铁换乘车站",mereOffset:{displayName:"名称微小偏移",none:"无",left1:"左 (较少)",left2:"左 (较大)",right1:"右 (较少)",right2:"右 (较大)",up:"上",down:"下"},importance:{displayName:"车站重要性",default:"默认",middle:"中",high:"高"},align:{displayName:"图标排列方向",horizontal:"横向",vertical:"纵向"}},londonTubeCommon:{stepFreeAccess:"无障碍通行",stepFreeAccessNone:"无",stepFreeAccessTrain:"从街道到列车",stepFreeAccessPlatform:"从街道到站台"},londonTubeBasic:{displayName:"伦敦地铁基本车站",terminal:"终点站",shareTracks:"轨道共享",shareTracksIndex:"轨道共享索引"},londonTubeInt:{displayName:"伦敦地铁换乘车站"},londonRiverServicesInt:{displayName:"伦敦河流服务换乘站"},guangdongIntercityRailway:{displayName:"广东城际铁路车站"}},lines:{reconcileId:"合并线段唯一标识符",common:{offsetFrom:"起始点偏移",offsetTo:"结束点偏移",startFrom:"从这里开始",roundCornerFactor:"转折圆角因子",from:"从",to:"到",parallelDisabled:"由于此线段是平行的,因此某些属性已被禁用。",changeInBaseLine:"在基准线段中更改它们:"},simple:{displayName:"基本线段",offset:"偏移"},diagonal:{displayName:"135°折线线段"},perpendicular:{displayName:"90°垂直线段"},rotatePerpendicular:{displayName:"90°旋转垂直线段"},singleColor:{displayName:"纯色样式"},shmetroVirtualInt:{displayName:"上海地铁出站换乘样式"},shanghaiSuburbanRailway:{displayName:"上海市域铁路样式",isEnd:"结束区间"},gzmtrVirtualInt:{displayName:"广州地铁出站换乘样式"},gzmtrLoop:{displayName:"广州地铁环线样式"},chinaRailway:{displayName:"中国铁路样式"},bjsubwaySingleColor:{displayName:"北京地铁纯色样式"},bjsubwayTram:{displayName:"北京地铁有轨电车样式"},bjsubwayDotted:{displayName:"北京地铁虚线样式"},dualColor:{displayName:"双色样式",swap:"切换颜色",colorA:"颜色A",colorB:"颜色B"},river:{displayName:"河流样式",width:"宽度"},mtrRaceDays:{displayName:"香港MTR赛马日样式"},mtrLightRail:{displayName:"香港MTR轻铁样式"},mtrUnpaidArea:{displayName:"香港MTR未付费区域样式"},mtrPaidArea:{displayName:"香港MTR付费区域样式"},mrtUnderConstruction:{displayName:"新加坡MRT在建样式"},mrtSentosaExpress:{displayName:"新加坡MRT圣淘沙捷运样式"},jrEastSingleColor:{displayName:"JR东日本单色样式"},jrEastSingleColorPattern:{displayName:"JR东日本单色网状图案样式"},lrtSingleColor:{displayName:"新加坡LRT纯色样式"},londonTubeInternalInt:{displayName:"伦敦地铁内部换乘样式"},londonTube10MinWalk:{displayName:"伦敦地铁10分钟步行换乘样式"},londonTubeTerminal:{displayName:"伦敦地铁终点站样式"},londonRail:{displayName:"伦敦铁路样式",limitedService:"有限服务/仅限高峰时段",colorBackground:"背景颜色",colorForeground:"前景颜色"},londonSandwich:{displayName:"伦敦三明治样式"},londonLutonAirportDART:{displayName:"伦敦卢顿机场DART样式"},londonIFSCloudCableCar:{displayName:"伦敦IFS云缆车样式"},guangdongIntercityRailway:{displayName:"广东城际铁路样式"}},edges:{},footer:{duplicate:"重复",copy:"复制",remove:"移除"}}},fg={popoverHeader:"你正在浏览<1>{{environment}}环境!",popoverBody:"我们正在测试最新的RMP。如果你有任何建议,欢迎在 https://github.com/railmapgen/rmp/issues 上提出。",search:"搜索车站",open:{new:"新项目",config:"导入项目",projectRMG:"从RMG项目中导入",invalidType:"无效的文件类型!仅接受JSON格式的文件。",unknownError:"解析上传文件时发生未知错误!请重试。",gallery:"从画廊中导入",tutorial:"开始教程",importFromRMPGallery:"模板 {{id}} 已导入。对此更改不满意?可通过 Ctrl + Z 或撤销按钮进行撤销。",failToImportFromRMPGallery:"无法从画廊导入{{id}},找不到文件。"},download:{config:"导出项目",image:"导出图片","2rmg":{title:"导出RMG项目",type:{line:"直线",loop:"环线",branch:"支线"},placeholder:{chinese:"中文线路名称",english:"英文线路名称",lineCode:"路线编号"},info1:"这个功能可将RMP项目导出为RMG项目。",info2:"下面的线路将可以被导出,你可以在左侧文本框中输入中文线路名称、在中间输入英文线路名称、右边输入线路编号(广州地铁样式专用),随后点击下载按钮即可导出RMG项目。",noline:"未找到可用线路。",download:"下载",downloadInfo:"请选择一个起始车站,并点击它。"},format:"文件种类",png:"PNG图像",svg:"SVG图像",svgVersion:"版本","svg1.1":"1.1(适用于Adobe Illustrator)",svg2:"2(适用于现代浏览器)",transparent:"透明背景",scale:"缩放",disabledScaleOptions:"由于浏览器的画布限制,部分缩放选项被禁用。",disabledScaleOptionsWorkarounds:"可能的解决方法包括使用此命令行工具从SVG生成图像:",imageTooBig:"图像太大,无法在您的浏览器中生成!",useSystemFonts:"使用系统字体而不是在画布上预览的字体",shareInfo1:"当我分享此图片时我会附上",shareInfo2:"和它的链接。",termsAndConditions:"条款及细则",termsAndConditionsInfo:"我同意",period:"。",confirm:"下载"},donation:{title:"捐赠",openCollective:"Open Collective",viaUSD:"通过Paypal或Visa卡以美元捐赠。",afdian:"爱发电",viaCNY:"通过支付宝或微信支付以人民币捐赠。"},settings:{title:"设置",pro:"这是一个专业功能,需要带有订阅的账户。",proWithTrial:"这是一个PRO功能,并提供有限的免费试用。",proLimitExceed:{master:"大师节点超出了免费额度。",parallel:"平行线段超出了免费额度。",solution:"移除它们以消除此警告,或订阅以解锁更多功能!"},subscription:{title:"订阅状态","logged-out":"您当前已登出。",free:"已登录!订阅以解锁更多功能!",subscriber:"感谢您的订阅!享受所有功能吧!",expired:"登录状态已过期。请登出后重新登录。"},preference:{title:"偏好",keepLastPath:"在下一次操作中持续画线段直到点击背景",autoParallel:"自动将新线段设置为与现有线段平行",randomStationNames:{title:"创建时将站名随机化",none:"无",shmetro:"上海",bjsubway:"北京"}},shortcuts:{title:"快捷键",keys:"键",description:"描述",f:"使用上一个工具。",s:"多选。",arrows:"稍微移动画布。",ijkl:"稍微移动所选站点。",shift:"多选。",alt:"精确移动。",delete:"删除所选站点。",cut:"剪切。",copy:"复制。",paste:"粘贴。",undo:"撤销。",redo:"重做。"},procedures:{title:"过程",translate:{title:"转化节点坐标",content:"将以下偏移加到所有节点的x和y上:",x:"横坐标",y:"纵坐标"},scale:{title:"缩放节点坐标",content:"将所有节点的x和y乘以以下值:",factor:"缩放因子"},changeType:{title:"修改所有对象的属性",any:"任意"},changeZIndex:"批量修改深度",changeStationType:{title:"批量修改车站种类",changeFrom:"将此类型的所有车站:",changeTo:"转换为这个类型的车站:",info:"修改车站类型会移除所有独特属性除了名称。保存再操作!"},changeLineStyleType:{title:"批量修改线段样式",changeFrom:"将此样式的所有线段:",changeTo:"转换为这个样式的线段:",info:"修改线段样式会移除所有独特属性除了连通性。保存再操作!"},changeLinePathType:{title:"批量修改线段类型",changeFrom:"将此类型的所有线段:",changeTo:"转换为这个类型的线段:"},changeColor:{title:"批量修改颜色",changeFrom:"将此颜色的所有对象:",changeTo:"转换为这个颜色:",any:"从任何颜色转换"},removeLines:{title:"移除所有纯色线段",content:"移除具有此颜色的所有线段: "},updateColor:{title:"更新颜色",content:"使用最新值更新所有颜色。",success:"成功更新所有颜色。",error:"更新所有颜色时出错:{{e}}。"},unlockSimplePath:{title:"解锁简单路径",content1:"地铁线路图绘制器应用致力于在遵循既定惯例的前提下,提供一个有利于创建地铁线路图的互动平台。在这些惯例中,一种特别著名的风格源自哈利·贝克的创新工作。他的开创性贡献于1932年得到官方认可,并在大众中迅速赢得了声誉。目前,它在信息设计领域具有重要的示范意义,在全球范围内的交通制图中得到了广泛的实施,尽管成功程度有所不同。",content2:"应用程序固有地隐藏了使用简单路径的选项,因为其部署有可能违反既定的惯例。默认情况下,此特定功能保持隐蔽。此外,提交到地铁线路图绘制器画廊的作品将经过严格的审查,坚决拒绝使用单色风格的简单路径的构图。",content3:"尽管如此,我们仍然保留了解锁此选项的机会,当您订阅后,方可使用简单路径。需要注意的是,即使获得后,简单路径的使用也仅限于单色风格。",check:"解锁简单路径",unlocked:"已解锁"},masterManager:{title:"管理全部大师节点",id:"唯一标识",label:"标签",type:"类型",types:{MiscNode:"杂项节点",Station:"车站"},importTitle:"上传大师节点参数",importFrom:"使用导入的样式",importOther:"导入新样式",importParam:"粘贴配置信息"}},telemetry:{title:"遥测",info:"为了帮助改进地铁线路图绘制器并激励贡献者提升项目,我们通过 Google Analytics 收集匿名使用数据。这些数据仅用于增强用户体验和优化工具功能,绝不会与第三方共享。",essential:"基础",essentialTooltip:"在地铁线路图工具包中更改此全局设置",essentialInfo:"地铁线路图绘制器收集一些基本使用数据,以帮助我们了解用户如何以及何时与工具交互。请放心,我们从不收集任何可识别个人身份的信息或您的项目数据。",essentialLink:"点击此链接查看 Google Analytics 可能收集的详细字段。",additional:"额外",additionalInfo:"地铁线路图绘制器还会收集有关交互的数据,例如项目创建或站点添加等操作。这些额外数据同样是匿名的,仅用于统计分析以帮助我们改进工具。"}},about:{title:"关于",rmp:"地铁线路图绘制器",railmapgen:"一个线路图工具包项目",desc:"通过自由拖动来自不同城市的车站并以 90 或 135 度圆角线段将它们连接起来,设计您自己的铁路地图!",content1:"谨以此纪念我们曾拥有的自由与平等。",content2:"06/01/2022于上海",contributors:"贡献者",coreContributors:"核心贡献者",styleContributors:"样式贡献者",langonginc:"活出值得铭记的人生。","203IhzElttil":"特别感谢他勤勉工作,确保上海地铁站与原始设计相符。",Swiftiecott:"特别感谢他勤勉工作,确保北京地铁站与原始设计相符。",Minwtraft:"特别感谢他勤勉工作,确保广州地铁站与原始设计相符。",contactUs:"联系我们",github:"项目仓库",githubContent:"遇到任何问题?在这里搜索或提出一个问题!",slack:"Slack群组",slackContent:"在这些Slack频道中讨论!"}},gg={color:og,warning:ag,cancel:sg,apply:lg,remove:ug,close:cg,noShowAgain:dg,rmtPromotion:hg,panel:pg,header:fg},mg="顏色",yg="警告",bg="取消",wg="應用",vg="移除",xg="關閉",Sg="不要再顯示",Ng="絕對不想錯過的多功能工具包!",Rg={tools:{showLess:"顯示更少",section:{lineDrawing:"線段繪製",stations:"車站",miscellaneousNodes:"雜項節點"},select:"多選",learnHowToAdd:{station:"了解如何添加車站!","misc-node":"了解如何添加節點!",line:"了解如何添加線條樣式!"}},details:{header:"詳情",info:{title:"基本信息",id:"唯一識別符",zIndex:"深度",stationType:"車站類型",linePathType:"線段路徑類型",lineStyleType:"線段樣式類型",type:"類型",parallel:"平行線段",parallelIndex:"平行線段索引"},multipleSelection:{title:"多重選取",change:"修改選取物件的屬性",selected:"選取的物件:",show:"顯示",station:"車站",miscNode:"雜項節點",edge:"線段"},changeStationTypeContent:"修改車站類型會移除所有獨特屬性除了名稱。",changeLineTypeContent:"修改線段類型會移除所有獨特屬性。",changeType:"更改類型",nodePosition:{title:"節點位置",pos:{x:"橫坐標",y:"縱坐標"}},lineExtremities:{title:"線段兩端",source:"起點",target:"終點",sourceName:"起點名稱",targetName:"終點名稱"},specificAttrsTitle:"獨特屬性",unknown:{error:"哎呀 :( 我們無法識別此{{category}}。也許它是在更新版本中創建的。",node:"節點",linePath:"線段路徑",lineStyle:"線段樣式"},nodes:{common:{nameZh:"中文線路名稱",nameEn:"英文線路名稱",nameJa:"日語線路名稱",num:"線路號"},virtual:{displayName:"虛擬節點"},shmetroNumLineBadge:{displayName:"上海地鐵數字線路標識"},shmetroTextLineBadge:{displayName:"上海地鐵文字線路標識"},gzmtrLineBadge:{displayName:"廣州地鐵線路標識",tram:"輕軌",span:"跨行顯示數字"},bjsubwayNumLineBadge:{displayName:"北京地鐵數字線路標識"},bjsubwayTextLineBadge:{displayName:"北京地鐵文字線路標識"},berlinSBahnLineBadge:{displayName:"柏林城市快鐵線路標識"},berlinUBahnLineBadge:{displayName:"柏林地鐵線路標識"},suzhouRTNumLineBadge:{displayName:"蘇州軌道交通數字線路標識",branch:"是否支線"},chongqingRTNumLineBadge:{displayName:"重慶軌道交通數字線路標識"},chongqingRTTextLineBadge:{displayName:"重慶軌道交通文字線路標識"},shenzhenMetroNumLineBadge:{displayName:"深圳地鐵數字線路標識",branch:"是否支線"},mrtDestinationNumbers:{displayName:"新加坡MRT終點數字"},mrtLineBadge:{displayName:"新加坡MRT線路標識",isTram:"是LRT線路標識"},jrEastLineBadge:{displayName:"JR東日本線路標識",crosshatchPatternFill:"用網狀圖案填充"},qingdaoMetroNumLineBadge:{displayName:"青島地鐵數位線路標識",numEn:"英文線路號",showText:"顯示文字"},guangdongIntercityRailwayLineBadge:{displayName:"廣東城際鐵路線標識"},londonArrow:{displayName:"倫敦箭頭",type:"類型",continuation:"延續",sandwich:"三明治",tube:"地鐵"},master:{displayName:"大師節點",type:"大師節點類型",undefined:"未定義"},facilities:{displayName:"設施",type:"類型"},text:{displayName:"任意文字",content:"內容",fontSize:"文字大小",lineHeight:"行高度",textAnchor:"文字錨點",start:"開始",middle:"中間",end:"結束",auto:"自動",hanging:"懸吊",dominantBaseline:"顯性基線",language:"哪個語言的字體系列",zh:"中文",en:"英文",mtr__zh:"香港地鐵中文",mtr__en:"香港地鐵英文",berlin:"柏林 S/U 地鐵",mrt:"新加坡地鐵",jreast_ja:"JR 東日本日文",jreast_en:"JR 東日本英文",rotate:"旋轉",italic:"斜體",bold:"粗體"}},stations:{common:{nameZh:"中文名稱",nameEn:"英文名稱",nameJa:"日語名稱",nameOffsetX:"名稱橫向偏移",nameOffsetY:"名稱縱向偏移",rotate:"車站旋轉角度",lineCode:"路綫編碼",stationCode:"車站編碼",left:"左",middle:"中間",right:"右",top:"頂部",bottom:"底部"},interchange:{title:"換乘",within:"同站換乘",outStation:"出站換乘",outSystem:"系統外換乘",addGroup:"添加換乘組合",noInterchanges:"非換乘站",nameZh:"中文名稱",nameEn:"英文名稱",add:"添加換乘",copy:"復製換乘",remove:"刪除換乘"},shmetroBasic:{displayName:"上海地鐵基本車站"},shmetroBasic2020:{displayName:"上海地鐵基本車站(2020)"},shmetroInt:{displayName:"上海地鐵換乘車站",height:"車站高度",width:"車站寬度"},shmetroOsysi:{displayName:"上海地鐵轉乘車站"},shanghaiSuburbanRailway:{displayName:"上海市域鐵路車站"},gzmtrBasic:{displayName:"廣州地鐵基本車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",tram:"輕軌"},gzmtrInt:{displayName:"廣州地鐵換乘車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",foshan:"佛山"},gzmtrInt2024:{displayName:"廣州地鐵換乘站(2024)",columns:"站點列數",topHeavy:"優先將更多站點放在上方",anchorAt:"錨點位置",anchorAtNone:"居中",osiPosition:"出站轉車",osiPositionNone:"無",osiPositionLeft:"左側",osiPositionRight:"右側"},bjsubwayBasic:{displayName:"北京地鐵基本車站",open:"是否開通"},bjsubwayInt:{displayName:"北京地鐵換乘車站",outOfStation:"出站轉車"},mtr:{displayName:"香港MTR車站"},suzhouRTBasic:{displayName:"蘇州軌道交通基本車站",textVertical:"垂直名稱"},suzhouRTInt:{displayName:"蘇州軌道交通換乘車站"},kunmingRTBasic:{displayName:"昆明軌道交通基本車站"},kunmingRTInt:{displayName:"昆明軌道交通換乘車站"},MRTBasic:{displayName:"新加坡MRT基本車站",isTram:"是LRT車站"},MRTInt:{displayName:"新加坡MRT換乘車站"},jrEastBasic:{displayName:"JR東日本基本車站",nameOffset:"名稱偏移",textOneLine:"名稱在一行中",textVertical:"垂直名稱",important:"重要車站",lines:"轉乘線偏移"},jrEastImportant:{displayName:"JR東日本重要車站",textVertical:"垂直名稱",mostImportant:"最重要車站",minLength:"車站的最小長度"},foshanMetroBasic:{displayName:"佛山地鐵基本車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",tram:"輕軌"},qingdaoMetro:{displayName:"青島地鐵基本車站",isInt:"是換乘站"},tokyoMetroBasic:{displayName:"東京地鐵基本車站",nameOffset:"名稱偏移",textVertical:"垂直站名",lineCode:"線路編號",stationCode:"車站編號"},tokyoMetroInt:{displayName:"東京地鐵轉乘車站",mereOffset:{displayName:"名稱微小偏移",none:"無",left1:"左 (较少)",left2:"左 (较大)",right1:"右 (较少)",right2:"右 (较大)",up:"上",down:"下"},importance:{displayName:"車站重要性",default:"預設",middle:"中",high:"高"},align:{displayName:"圖標排列方向",horizontal:"橫向",vertical:"縱向"}},londonTubeCommon:{stepFreeAccess:"無障礙通行",stepFreeAccessNone:"無",stepFreeAccessTrain:"從街道到列車",stepFreeAccessPlatform:"從街道到月台"},londonTubeBasic:{displayName:"倫敦地鐵基本車站",terminal:"終點站",shareTracks:"軌道共享",shareTracksIndex:"軌道共享指數"},londonTubeInt:{displayName:"倫敦地鐵換乘車站"},londonRiverServicesInt:{displayName:"倫敦河流服務換乘站"},guangdongIntercityRailway:{displayName:"廣東城際鐵路車站"}},lines:{reconcileId:"合並線段唯一標識符",common:{offsetFrom:"起始點偏移",offsetTo:"結束點偏移",startFrom:"從這裏開始",roundCornerFactor:"轉折圓角因子",from:"從",to:"到",parallelDisabled:"由於此線段是平行的,因此某些屬性已被禁用。",changeInBaseLine:"在基準線段中更改它們:"},simple:{displayName:"基本線段",offset:"偏移"},diagonal:{displayName:"135°折線線段"},perpendicular:{displayName:"90°垂直線段"},rotatePerpendicular:{displayName:"90°旋轉垂直線段"},singleColor:{displayName:"純色樣式"},shmetroVirtualInt:{displayName:"上海地鐵出站換乘樣式"},shanghaiSuburbanRailway:{displayName:"上海市域鐵路樣式",isEnd:"結束區間"},gzmtrVirtualInt:{displayName:"廣州地鐵出站換乘樣式"},gzmtrLoop:{displayName:"廣州地鐵環線樣式"},chinaRailway:{displayName:"中國鐵路樣式"},bjsubwaySingleColor:{displayName:"北京地鐵純色樣式"},bjsubwayTram:{displayName:"北京地鐵有軌電車樣式"},bjsubwayDotted:{displayName:"北京地鐵虛線樣式"},dualColor:{displayName:"雙色樣式",swap:"切換顏色",colorA:"顏色A",colorB:"顏色B"},river:{displayName:"河流樣式",width:"寬度"},mtrRaceDays:{displayName:"香港MTR賽馬日樣式"},mtrLightRail:{displayName:"香港MTR輕鐵樣式"},mtrUnpaidArea:{displayName:"香港MTR未付費區域樣式"},mtrPaidArea:{displayName:"香港MTR付費區域樣式"},mrtUnderConstruction:{displayName:"新加坡MRT在建樣式"},mrtSentosaExpress:{displayName:"新加坡MRT聖淘沙捷運樣式"},jrEastSingleColor:{displayName:"JR東日本單色樣式"},jrEastSingleColorPattern:{displayName:"JR東日本單色網狀圖案樣式"},lrtSingleColor:{displayName:"新加坡LRT純色樣式"},londonTubeInternalInt:{displayName:"倫敦地鐵內部換乘樣式"},londonTube10MinWalk:{displayName:"倫敦地鐵10分鐘步行換乘樣式"},londonTubeTerminal:{displayName:"倫敦地鐵終點站樣式"},londonRail:{displayName:"倫敦鐵路樣式",limitedService:"有限服務/只限繁忙時段",colorBackground:"背景顏色",colorForeground:"前景顏色"},londonSandwich:{displayName:"倫敦三明治樣式"},londonLutonAirportDART:{displayName:"倫敦盧頓機場DART樣式"},londonIFSCloudCableCar:{displayName:"倫敦IFS雲纜車樣式"},guangdongIntercityRailway:{displayName:"廣東城際鐵路樣式"}},edges:{},footer:{duplicate:"重複",copy:"複製",remove:"移除"}}},Cg={popoverHeader:"你正在瀏覽<1>{{environment}}環境!",popoverBody:"我們正在測試最新的RMP。如果妳有任何建議,歡迎在 https://github.com/railmapgen/rmp/issues 上提出。",search:"搜尋車站",open:{new:"新項目",config:"讀入項目",projectRMG:"從RMG專案中讀入",invalidType:"無效的文件類型!僅接受JSON格式的文件。",unknownError:"解析上傳文件時發生未知錯誤!請重試。",gallery:"從畫廊中讀入",tutorial:"開始教程",importFromRMPGallery:"範本 {{id}} 已匯入。對此更改不滿意?可通過 Ctrl + Z 或撤銷按鈕進行撤銷。",failToImportFromRMPGallery:"無法從畫廊導入{{id}},找不到檔案。"},download:{config:"導出項目",image:"導出圖片","2rmg":{title:"導出RMG項目",type:{line:"直線",loop:"環線",branch:"支線"},placeholder:{chinese:"中文線路名稱",english:"英文線路名稱",lineCode:"路綫編碼"},info1:"這個功能可將RMP項目導出為RMG項目。",info2:"下面的線路將可以被導出,你可以在左側文本框中輸入中文線路名稱、在中間輸入英文線路名稱、右邊輸入線路編號(廣州地鐵樣式專用),隨後點擊下載按鈕即可導出RMG項目。",noline:"未找到可用線路。",download:"下載",downloadInfo:"請選擇一個起始車站,並點擊它。"},format:"檔案種類",png:"PNG影像",svg:"SVG影像",svgVersion:"版本","svg1.1":"1.1(適用於Adobe Illustrator)",svg2:"2(適用於現代瀏覽器)",transparent:"透明背景",scale:"縮放",disabledScaleOptions:"由於您的瀏覽器的畫布限制,部分縮放選項已被禁用。",disabledScaleOptionsWorkarounds:"可能的解決方法包括使用此命令行工具從SVG生成圖像:",imageTooBig:"圖像太大,您的瀏覽器無法生成!",useSystemFonts:"使用系統字型而不是在畫布上預覽的字型",shareInfo1:"當我分享此圖片時我會附上",shareInfo2:"和它的鏈接。",termsAndConditions:"條款及細則",termsAndConditionsInfo:"我同意",period:"。",confirm:"下載"},donation:{title:"捐款",openCollective:"Open Collective",viaUSD:"通過Paypal或Visa卡以美元捐款。",afdian:"爱发电",viaCNY:"通過支付寶或微信支付以人民幣捐款。"},settings:{title:"設置",pro:"這是一個專業功能,需要带有訂閱的帳戶。",proWithTrial:"這是一個PRO功能,並提供有限的免費試用。",proLimitExceed:{master:"大師節點超出了免費額度。",parallel:"平行線段超出了免費額度。",solution:"移除它們以解除此警告,或訂閱以解鎖更多功能!"},subscription:{title:"訂閱狀態","logged-out":"您目前已登出。",free:"已登入!訂閱以解鎖更多功能!",subscriber:"感謝您的訂閱!享受所有功能吧!",expired:"登入狀態已過期。請登出後重新登入。"},preference:{title:"偏好",keepLastPath:"在下一次操作中持續畫線段直到點擊背景",autoParallel:"自動將新段線設置為與現有線段平行",randomStationNames:{title:"創建時將站名隨機化",none:"無",shmetro:"上海",bjsubway:"北京"}},shortcuts:{title:"捷徑",keys:"按鍵",description:"描述",f:"使用上一個工具。",s:"多選。",arrows:"稍微移動畫布。",ijkl:"稍微移動所選站點。",shift:"多選。",alt:"精確移動。",delete:"刪除所選站點。",cut:"剪切。",copy:"複製。",paste:"貼上。",undo:"撤銷。",redo:"重做。"},procedures:{title:"過程",translate:{title:"轉化節點坐標",content:"將以下偏移加到所有節點的x和y上:",x:"橫坐標",y:"縱坐標"},scale:{title:"縮放節點坐標",content:"將所有節點的x和y乘以以下值:",factor:"縮放因子"},changeType:{title:"修改所有物件的屬性",any:"任意"},changeZIndex:"批量修改深度",changeStationType:{title:"批量修改車站種類",changeFrom:"將此類型的所有車站:",changeTo:"轉換為這個類型的車站:",info:"修改車站類型會移除所有獨特屬性除了名稱。保存再操作!"},changeLineStyleType:{title:"批量修改線段樣式",changeFrom:"將此樣式的所有線段:",changeTo:"轉換為這個樣式的線段:",info:"修改線段樣式會移除所有獨特屬性除了連通性。保存再操作!"},changeLinePathType:{title:"批量修改線段類型",changeFrom:"將此類型的所有線段:",changeTo:"轉換為這個類型的線段:"},changeColor:{title:"批量修改顏色",changeFrom:"將此顏色的所有對象:",changeTo:"轉換為這個顏色:",any:"從任何顏色轉換"},removeLines:{title:"移除所有純色線段",content:"移除具有此顏色的所有線段: "},updateColor:{title:"更新顏色",content:"使用最新值更新所有顏色。",success:"成功更新所有顏色。",error:"更新所有顏色時發生錯誤:{{e}}。"},unlockSimplePath:{title:"解鎖簡單路徑",content1:"地鐵線路圖繪製器應用致力於在遵循既定慣例的前提下,提供一個有利於創建地鐵線路圖的互動平台。在這些慣例中,一種特別著名的風格源自哈利·貝克的創新工作。他的開創性貢獻於1932年得到官方認可,並在大眾中迅速贏得了聲譽。目前,它在信息設計領域具有重要的示範意義,在全球範圍內的交通製圖中得到了廣泛的實施,儘管成功程度有所不同。",content2:"應用程式固有地隱藏了使用簡單路徑的選項,因為其部署有可能違反既定的慣例。默認情況下,此特定功能保持隱蔽。此外,提交到地鐵線路圖繪製器畫廊的作品將經過嚴格的審查,堅決拒絕使用單色風格的簡單路徑的構圖。",content3:"儘管如此,我們仍然保留瞭解鎖此選項的機會,當您訂閱后,方可使用簡單路徑。 需要注意的是,即使獲得后,簡單路徑的使用也僅限於單色風格。",check:"解鎖簡單路徑",unlocked:"已解鎖"},masterManager:{title:"管理全部大師節點",id:"唯一標識",label:"標籤",type:"類型",types:{MiscNode:"雜項節點",Station:"車站"},importTitle:"上傳大師節點參數",importFrom:"使用匯入的樣式",importOther:"導入新樣式",importParam:"貼上配置信息"}},telemetry:{title:"遙測",info:"為了協助改進地鐵路綫圖繪製器並激勵貢獻者提升項目,我們透過 Google Analytics 收集匿名使用數據。這些數據僅用於提升用戶體驗及優化工具功能,絕不會與第三方共享。",essential:"基本",essentialTooltip:"在地鐵路綫圖工具組中更改此全局設定",essentialInfo:"地鐵路綫圖繪製器收集一些基本使用數據,以協助我們了解用戶如何及何時與工具互動。請放心,我們絕不收集任何可識別個人身份的資訊或您的項目數據。",essentialLink:"點擊此鏈接查看 Google Analytics 可能收集的詳細字段。",additional:"額外",additionalInfo:"地鐵路綫圖繪製器還會收集與互動有關的數據,例如創建項目或新增站點等操作。這些額外數據同樣是匿名的,僅用於統計分析以協助我們改進工具。"}},about:{title:"關於",rmp:"地鐵線路圖繪製器",railmapgen:"一個路綫圖工具組的項目",desc:"通過自由拖動來自不同城市的車站並以 90 或 135 度圓角線段將它們連接起來,設計您自己的鐵路地圖!",content1:"謹以此紀念我們曾擁有的自由與平等。",content2:"06/01/2022於上海",contributors:"貢獻者",coreContributors:"核心貢獻者",styleContributors:"樣式貢獻者",langonginc:"活出值得銘記的人生。","203IhzElttil":"特別感謝他勤奮工作,確保上海地鐵站與原始設計相符。",Swiftiecott:"特別感謝他勤奮工作,確保北京地鐵站與原始設計相符。",Minwtraft:"特別感謝他勤奮工作,確保廣州地鐵站與原始設計相符。",contactUs:"聯繫我們",github:"項目倉庫",githubContent:"遇到任何問題?在這裡搜索或提出一個問題!",slack:"Slack群組",slackContent:"在這些Slack頻道中討論!"}},Ag={color:mg,warning:yg,cancel:bg,apply:wg,remove:vg,close:xg,noShowAgain:Sg,rmtPromotion:Ng,panel:Rg,header:Cg},nn=new xe.I18nBuilder().use(As).withAppName("Rail Map Painter").withLng(xe.getLanguage()).withDefaultResource(Nf).withResource("en",Pf).withResource("zh-Hans",gg).withResource("zh-Hant",Ag).withResource("ja",Jf).withResource("ko",ig).build(),{abs:Bt,cos:De,sin:bt,acos:_g,atan2:Ft,sqrt:qe,pow:Ce}=Math;function Gt(r){return r<0?-Ce(-r,1/3):Ce(r,1/3)}const pa=Math.PI,mn=2*pa,Ye=pa/2,Lg=1e-6,Nr=Number.MAX_SAFE_INTEGER||9007199254740991,Rr=Number.MIN_SAFE_INTEGER||-9007199254740991,Eg={x:0,y:0,z:0},A={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(r,e){const n=e(r);let i=n.x*n.x+n.y*n.y;return typeof n.z<"u"&&(i+=n.z*n.z),qe(i)},compute:function(r,e,n){if(r===0)return e[0].t=0,e[0];const i=e.length-1;if(r===1)return e[i].t=1,e[i];const o=1-r;let a=e;if(i===0)return e[0].t=r,e[0];if(i===1){const l={x:o*a[0].x+r*a[1].x,y:o*a[0].y+r*a[1].y,t:r};return n&&(l.z=o*a[0].z+r*a[1].z),l}if(i<4){let l=o*o,u=r*r,c,d,h,p=0;i===2?(a=[a[0],a[1],a[2],Eg],c=l,d=o*r*2,h=u):i===3&&(c=l*o,d=l*r*3,h=o*u*3,p=r*u);const g={x:c*a[0].x+d*a[1].x+h*a[2].x+p*a[3].x,y:c*a[0].y+d*a[1].y+h*a[2].y+p*a[3].y,t:r};return n&&(g.z=c*a[0].z+d*a[1].z+h*a[2].z+p*a[3].z),g}const s=JSON.parse(JSON.stringify(e));for(;s.length>1;){for(let l=0;l1;o--,a--){const s=[];for(let l=0,u;l"u")r=.5;else if(r===0||r===1)return r;const n=Ce(r,e)+Ce(1-r,e),i=n-1;return Bt(i/n)},projectionratio:function(r,e){if(e!==2&&e!==3)return!1;if(typeof r>"u")r=.5;else if(r===0||r===1)return r;const n=Ce(1-r,e),i=Ce(r,e)+n;return n/i},lli8:function(r,e,n,i,o,a,s,l){const u=(r*i-e*n)*(o-s)-(r-n)*(o*l-a*s),c=(r*i-e*n)*(a-l)-(e-i)*(o*l-a*s),d=(r-n)*(a-l)-(e-i)*(o-s);return d==0?!1:{x:u/d,y:c/d}},lli4:function(r,e,n,i){const o=r.x,a=r.y,s=e.x,l=e.y,u=n.x,c=n.y,d=i.x,h=i.y;return A.lli8(o,a,s,l,u,c,d,h)},lli:function(r,e){return A.lli4(r,r.c,e,e.c)},makeline:function(r,e){return new q(r.x,r.y,(r.x+e.x)/2,(r.y+e.y)/2,e.x,e.y)},findbbox:function(r){let e=Nr,n=Nr,i=Rr,o=Rr;return r.forEach(function(a){const s=a.bbox();e>s.x.min&&(e=s.x.min),n>s.y.min&&(n=s.y.min),i0&&(d.c1=u,d.c2=c,d.s1=r,d.s2=n,a.push(d))})}),a},makeshape:function(r,e,n){const i=e.points.length,o=r.points.length,a=A.makeline(e.points[i-1],r.points[0]),s=A.makeline(r.points[o-1],e.points[0]),l={startcap:a,forward:r,back:e,endcap:s,bbox:A.findbbox([a,r,e,s])};return l.intersections=function(u){return A.shapeintersections(l,l.bbox,u,u.bbox,n)},l},getminmax:function(r,e,n){if(!n)return{min:0,max:0};let i=Nr,o=Rr,a,s;n.indexOf(0)===-1&&(n=[0].concat(n)),n.indexOf(1)===-1&&n.push(1);for(let l=0,u=n.length;lo&&(o=s[e]);return{min:i,mid:(i+o)/2,max:o,size:o-i}},align:function(r,e){const n=e.p1.x,i=e.p1.y,o=-Ft(e.p2.y-i,e.p2.x-n),a=function(s){return{x:(s.x-n)*De(o)-(s.y-i)*bt(o),y:(s.x-n)*bt(o)+(s.y-i)*De(o)}};return r.map(a)},roots:function(r,e){e=e||{p1:{x:0,y:0},p2:{x:1,y:0}};const n=r.length-1,i=A.align(r,e),o=function(v){return 0<=v&&v<=1};if(n===2){const v=i[0].y,C=i[1].y,R=i[2].y,_=v-2*C+R;if(_!==0){const P=-qe(C*C-v*R),B=-v+C,V=-(P+B)/_,Y=-(-P+B)/_;return[V,Y].filter(o)}else if(C!==R&&_===0)return[(2*C-R)/(2*C-2*R)].filter(o);return[]}const a=i[0].y,s=i[1].y,l=i[2].y,u=i[3].y;let c=-a+3*s-3*l+u,d=3*a-6*s+3*l,h=-3*a+3*s,p=a;if(A.approximately(c,0)){if(A.approximately(d,0))return A.approximately(h,0)?[]:[-p/h].filter(o);const v=qe(h*h-4*d*p),C=2*d;return[(v-h)/C,(-h-v)/C].filter(o)}d/=c,h/=c,p/=c;const g=(3*h-d*d)/3,m=g/3,w=(2*d*d*d-9*d*h+27*p)/27,N=w/2,L=N*N+m*m*m;let T,M,b,y,x;if(L<0){const v=-g/3,C=v*v*v,R=qe(C),_=-w/(2*R),P=_<-1?-1:_>1?1:_,B=_g(P),V=Gt(R),Y=2*V;return b=Y*De(B/3)-d/3,y=Y*De((B+mn)/3)-d/3,x=Y*De((B+2*mn)/3)-d/3,[b,y,x].filter(o)}else{if(L===0)return T=N<0?Gt(-N):-Gt(N),b=2*T-d/3,y=-T-d/3,[b,y].filter(o);{const v=qe(L);return T=Gt(-N+v),M=Gt(N+v),[T-M-d/3].filter(o)}}},droots:function(r){if(r.length===3){const e=r[0],n=r[1],i=r[2],o=e-2*n+i;if(o!==0){const a=-qe(n*n-e*i),s=-e+n,l=-(a+s)/o,u=-(-a+s)/o;return[l,u]}else if(n!==i&&o===0)return[(2*n-i)/(2*(n-i))];return[]}if(r.length===2){const e=r[0],n=r[1];return e!==n?[e/(e-n)]:[]}return[]},curvature:function(r,e,n,i,o){let a,s,l,u,c=0,d=0;const h=A.compute(r,e),p=A.compute(r,n),g=h.x*h.x+h.y*h.y;if(i?(a=qe(Ce(h.y*p.z-p.y*h.z,2)+Ce(h.z*p.x-p.z*h.x,2)+Ce(h.x*p.y-p.x*h.y,2)),s=Ce(g+h.z*h.z,3/2)):(a=h.x*p.y-h.y*p.x,s=Ce(g,3/2)),a===0||s===0)return{k:0,r:0};if(c=a/s,d=s/a,!o){const m=A.curvature(r-.001,e,n,i,!0).k,w=A.curvature(r+.001,e,n,i,!0).k;u=(w-c+(c-m))/2,l=(Bt(w-c)+Bt(c-m))/2}return{k:c,r:d,dk:u,adk:l}},inflections:function(r){if(r.length<4)return[];const e=A.align(r,{p1:r[0],p2:r.slice(-1)[0]}),n=e[2].x*e[1].y,i=e[3].x*e[1].y,o=e[1].x*e[2].y,a=e[3].x*e[2].y,s=18*(-3*n+2*i+3*o-a),l=18*(3*n-i-3*o),u=18*(o-n);if(A.approximately(s,0)){if(!A.approximately(l,0)){let p=-u/l;if(0<=p&&p<=1)return[p]}return[]}const c=2*s;if(A.approximately(c,0))return[];const d=l*l-4*s*u;if(d<0)return[];const h=Math.sqrt(d);return[(h-l)/c,-(l+h)/c].filter(function(p){return 0<=p&&p<=1})},bboxoverlap:function(r,e){const n=["x","y"],i=n.length;for(let o=0,a,s,l,u;o=u)return!1;return!0},expandbox:function(r,e){e.x.minr.x.max&&(r.x.max=e.x.max),e.y.max>r.y.max&&(r.y.max=e.y.max),e.z&&e.z.max>r.z.max&&(r.z.max=e.z.max),r.x.mid=(r.x.min+r.x.max)/2,r.y.mid=(r.y.min+r.y.max)/2,r.z&&(r.z.mid=(r.z.min+r.z.max)/2),r.x.size=r.x.max-r.x.min,r.y.size=r.y.max-r.y.min,r.z&&(r.z.size=r.z.max-r.z.min)},pairiteration:function(r,e,n){const i=r.bbox(),o=e.bbox(),a=1e5,s=n||.5;if(i.x.size+i.y.sizex||x>v)&&(y+=mn),y>v&&(C=v,v=y,y=C)):v4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");o=!0}}else if(a!==6&&a!==8&&a!==9&&a!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const s=this._3d=!o&&(a===9||a===12)||e&&e[0]&&typeof e[0].z<"u",l=this.points=[];for(let g=0,m=s?3:2;gg+Ut(m.y),0)

"u"&&(o=.5),o===0)return new q(n,n,i);if(o===1)return new q(e,n,n);const a=q.getABC(2,e,n,i,o);return new q(e,a.A,i)}static cubicFromPoints(e,n,i,o,a){typeof o>"u"&&(o=.5);const s=q.getABC(3,e,n,i,o);typeof a>"u"&&(a=A.dist(n,s.C));const l=a*(1-o)/o,u=A.dist(e,i),c=(i.x-e.x)/u,d=(i.y-e.y)/u,h=a*c,p=a*d,g=l*c,m=l*d,w={x:n.x-h,y:n.y-p},N={x:n.x+g,y:n.y+m},L=s.A,T={x:L.x+(w.x-L.x)/(1-o),y:L.y+(w.y-L.y)/(1-o)},M={x:L.x+(N.x-L.x)/o,y:L.y+(N.y-L.y)/o},b={x:e.x+(T.x-e.x)/o,y:e.y+(T.y-e.y)/o},y={x:i.x+(M.x-i.x)/(1-o),y:i.y+(M.y-i.y)/(1-o)};return new q(e,b,y,i)}static getUtils(){return A}getUtils(){return q.getUtils()}static get PolyBezier(){return Xt}valueOf(){return this.toString()}toString(){return A.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const e=this.points,n=e[0].x,i=e[0].y,o=["M",n,i,this.order===2?"Q":"C"];for(let a=1,s=e.length;a0}length(){return A.length(this.derivative.bind(this))}static getABC(e=2,n,i,o,a=.5){const s=A.projectionratio(a,e),l=1-s,u={x:s*n.x+l*o.x,y:s*n.y+l*o.y},c=A.abcratio(a,e);return{A:{x:i.x+(i.x-u.x)/c,y:i.y+(i.y-u.y)/c},B:i,C:u,S:n,E:o}}getABC(e,n){n=n||this.get(e);let i=this.points[0],o=this.points[this.order];return q.getABC(this.order,i,n,o,e)}getLUT(e){if(this.verify(),e=e||100,this._lut.length===e+1)return this._lut;this._lut=[],e++,this._lut=[];for(let n=0,i,o;n1?1:h,p=this.compute(h),p.t=h,p.d=c,p}get(e){return this.compute(e)}point(e){return this.points[e]}compute(e){return this.ratios?A.computeWithRatios(e,this.points,this.ratios,this._3d):A.compute(e,this.points,this._3d,this.ratios)}raise(){const e=this.points,n=[e[0]],i=e.length;for(let o=1,a,s;o1;){i=[];for(let s=0,l,u=n.length-1;s=0&&s<=1}),n=n.concat(e[i].sort(A.numberSort))}).bind(this)),e.values=n.sort(A.numberSort).filter(function(i,o){return n.indexOf(i)===o}),e}bbox(){const e=this.extrema(),n={};return this.dims.forEach((function(i){n[i]=A.getminmax(this,i,e[i])}).bind(this)),n}overlaps(e){const n=this.bbox(),i=e.bbox();return A.bboxoverlap(n,i)}offset(e,n){if(typeof n<"u"){const i=this.get(e),o=this.normal(e),a={c:i,n:o,x:i.x+o.x*n,y:i.y+o.y*n};return this._3d&&(a.z=i.z+o.z*n),a}if(this._linear){const i=this.normal(0),o=this.points.map(function(a){const s={x:a.x+e*i.x,y:a.y+e*i.y};return a.z&&i.z&&(s.z=a.z+e*i.z),s});return[new q(o)]}return this.reduce().map(function(i){return i._linear?i.offset(e)[0]:i.scale(e)})}simple(){if(this.order===3){const o=A.angle(this.points[0],this.points[3],this.points[1]),a=A.angle(this.points[0],this.points[3],this.points[2]);if(o>0&&a<0||o<0&&a>0)return!1}const e=this.normal(0),n=this.normal(1);let i=e.x*n.x+e.y*n.y;return this._3d&&(i+=e.z*n.z),Ut(Og(i))(1-l/o)*n+l/o*i);return new q(this.points.map((s,l)=>({x:s.x+e.x*a[l],y:s.y+e.y*a[l]})))}scale(e){const n=this.order;let i=!1;if(typeof e=="function"&&(i=e),i&&n===2)return this.raise().scale(i);const o=this.clockwise,a=this.points;if(this._linear)return this.translate(this.normal(0),i?i(0):e,i?i(1):e);const s=i?i(0):e,l=i?i(1):e,u=[this.offset(0,10),this.offset(1,10)],c=[],d=A.lli4(u[0],u[0].c,u[1],u[1].c);if(!d)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(h){const p=c[h*n]=A.copy(a[h*n]);p.x+=(h?l:s)*u[h].n.x,p.y+=(h?l:s)*u[h].n.y}),i?([0,1].forEach(function(h){if(!(n===2&&h)){var p=a[h+1],g={x:p.x-d.x,y:p.y-d.y},m=i?i((h+1)/n):e;i&&!o&&(m=-m);var w=Vt(g.x*g.x+g.y*g.y);g.x/=w,g.y/=w,c[h+1]={x:p.x+m*g.x,y:p.y+m*g.y}}}),new q(c)):([0,1].forEach(h=>{if(n===2&&h)return;const p=c[h*n],g=this.derivative(h),m={x:p.x+g.x,y:p.y+g.y};c[h+1]=A.lli4(p,m,d,a[h+1])}),new q(c))}outline(e,n,i,o){if(n=n===void 0?e:n,this._linear){const y=this.normal(0),x=this.points[0],v=this.points[this.points.length-1];let C,R,_;i===void 0&&(i=e,o=n),C={x:x.x+y.x*e,y:x.y+y.y*e},_={x:v.x+y.x*i,y:v.y+y.y*i},R={x:(C.x+_.x)/2,y:(C.y+_.y)/2};const P=[C,R,_];C={x:x.x-y.x*n,y:x.y-y.y*n},_={x:v.x-y.x*o,y:v.y-y.y*o},R={x:(C.x+_.x)/2,y:(C.y+_.y)/2};const B=[_,R,C],V=A.makeline(B[2],P[0]),Y=A.makeline(P[2],B[0]),ee=[V,new q(P),Y,new q(B)];return new Xt(ee)}const a=this.reduce(),s=a.length,l=[];let u=[],c,d=0,h=this.length();const p=typeof i<"u"&&typeof o<"u";function g(y,x,v,C,R){return function(_){const P=C/v,B=(C+R)/v,V=x-y;return A.map(_,0,1,y+P*V,y+B*V)}}a.forEach(function(y){const x=y.length();p?(l.push(y.scale(g(e,i,h,d,x))),u.push(y.scale(g(-n,-o,h,d,x)))):(l.push(y.scale(e)),u.push(y.scale(-n))),d+=x}),u=u.map(function(y){return c=y.points,c[3]?y.points=[c[3],c[2],c[1],c[0]]:y.points=[c[2],c[1],c[0]],y}).reverse();const m=l[0].points[0],w=l[s-1].points[l[s-1].points.length-1],N=u[s-1].points[u[s-1].points.length-1],L=u[0].points[0],T=A.makeline(N,m),M=A.makeline(w,L),b=[T].concat(l).concat([M]).concat(u);return new Xt(b)}outlineshapes(e,n,i){n=n||e;const o=this.outline(e,n).curves,a=[];for(let s=1,l=o.length;s1,u.endcap.virtual=s{var l=this.get(s);return A.between(l.x,n,o)&&A.between(l.y,i,a)})}selfintersects(e){const n=this.reduce(),i=n.length-2,o=[];for(let a=0,s,l,u;a0&&(a=a.concat(l))}),a}arcs(e){return e=e||.5,this._iterate(e,[])}_error(e,n,i,o){const a=(o-i)/4,s=this.get(i+a),l=this.get(o-a),u=A.dist(e,n),c=A.dist(e,s),d=A.dist(e,l);return Ut(c-u)+Ut(d-u)}_iterate(e,n){let i=0,o=1,a;do{a=0,o=1;let s=this.get(i),l,u,c,d,h=!1,p=!1,g,m=o,w=1;do if(p=h,d=c,m=(i+o)/2,l=this.get(m),u=this.get(o),c=A.getccenter(s,l,u),c.interval={start:i,end:o},h=this._error(c,s,i,o)<=e,g=p&&!h,g||(w=o),h){if(o>=1){if(c.interval.end=w=1,d=c,o>1){let L={x:c.x+c.r*Tg(c.e),y:c.y+c.r*kg(c.e)};c.e+=A.angle({x:c.x,y:c.y},L,this.get(1))}break}o=o+(o-i)/2}else o=m;while(!g&&a++<100);if(a>=100)break;d=d||c,n.push(d),i=w}while(o<1);return n}}const fa=(r,e,n,i)=>{i=i!=null?i:-n;const[o,a]=ga(r);if(!o||!a)return;if(o[0]===a[0]||o[1]===a[1]||e===S.Diagonal&&Math.abs(o[1]-a[1])===Math.abs(o[0]-a[0])){const b=Math.abs(n);return ma(o,a,b)}const[s,l]=Ir(r);if(!s||!l)return;const u=new q([...s,...l]),[c,d]=[u.scale(n),u.scale(i)],h=ya(o,s,a,u,c,d);if(!h)return;const{mA:[p,g],mB:[m,w],endA:[N,L],endB:[T,M]}=h;return["M ".concat(p," ").concat(g," ").concat(c.toSVG().replace("M","L")," L ").concat(N," ").concat(L),"M ".concat(m," ").concat(w," ").concat(d.toSVG().replace("M","L")," L ").concat(T," ").concat(M)]},Pg=(r,e,n,i)=>{i=i!=null?i:2.5;const[o,a]=ga(r);if(!o||!a)return;if(o[0]===a[0]||o[1]===a[1]||e===S.Diagonal&&Math.abs(o[1]-a[1])===Math.abs(o[0]-a[0])){const R=Math.abs(n),[_,P]=ma(o,a,R);return{outline:jg(o,a,R),pA:_,pB:P}}const[s,l]=Ir(r);if(!s||!l)return;const u=new q([...s,...l]),[c,d]=[u.scale(n),u.scale(i)],h=ya(o,s,a,u,c,d);if(!h)return;const{mA:[p,g],mB:[m,w],endA:[N,L],endB:[T,M]}=h,[b,y]=Ir(d.toSVG().replace("M","L")),[x,v]=$g(b,y);return{outline:"M ".concat(p," ").concat(g," ").concat(c.toSVG().replace("M","L")," L ").concat(N," ").concat(L," L ").concat(T," ").concat(M," L ").concat(x.join(" ")," C ").concat(v.join(" ")," L ").concat(m," ").concat(w," Z"),pA:"M ".concat(p," ").concat(g," ").concat(c.toSVG().replace("M","L")," L ").concat(N," ").concat(L),pB:"M ".concat(m," ").concat(w," ").concat(d.toSVG().replace("M","L")," L ").concat(T," ").concat(M)}},ga=r=>{var i,o,a,s;const e=(o=(i=r.match(/M\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/))==null?void 0:i.at(0))==null?void 0:o.replace(/M\s*/,"").split(" ").map(l=>Number(l)),n=(s=(a=r.match(/L\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*$/))==null?void 0:a.at(0))==null?void 0:s.replace(/L\s*/,"").split(" ").map(l=>Number(l));return[e,n]},ma=(r,e,n)=>{const[i,o,a,s]=[r[0],r[1],e[0],e[1]],l=Math.abs((s-o)/(a-i));if(l===1/0)return["M ".concat(i+n," ").concat(o," L ").concat(a+n," ").concat(s),"M ".concat(i-n," ").concat(o," L ").concat(a-n," ").concat(s)];if(l===0)return["M ".concat(i," ").concat(o+n," L ").concat(a," ").concat(s+n),"M ".concat(i," ").concat(o-n," L ").concat(a," ").concat(s-n)];{const u=1/l,c=n/Math.sqrt(u*u+1),d=c*u*-Math.sign((a-i)*(s-o));return["M ".concat(i+c," ").concat(o+d," L ").concat(a+c," ").concat(s+d),"M ".concat(i-c," ").concat(o-d," L ").concat(a-c," ").concat(s-d)]}},jg=(r,e,n)=>{const[i,o,a,s]=[r[0],r[1],e[0],e[1]],l=Math.abs((s-o)/(a-i));if(l===1/0)return"M ".concat(i+n," ").concat(o," L ").concat(a+n," ").concat(s," L ").concat(a-n," ").concat(s," L ").concat(i-n," ").concat(o," Z");if(l===0)return"M ".concat(i," ").concat(o+n," L ").concat(a," ").concat(s+n," L ").concat(a," ").concat(s-n," L ").concat(i," ").concat(o-n," Z");{const u=1/l,c=n/Math.sqrt(u*u+1),d=c*u*-Math.sign((a-i)*(s-o));return"M ".concat(i+c," ").concat(o+d," L ").concat(a+c," ").concat(s+d," L ").concat(a-c," ").concat(s-d," L ").concat(i-c," ").concat(o-d," Z")}},Ir=r=>{var i,o,a,s;const e=(o=(i=r.match(/L\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/))==null?void 0:i.at(0))==null?void 0:o.replace(/L\s*/,"").split(" ").map(l=>Number(l)),n=(s=(a=r.match(/C\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/g))==null?void 0:a.at(0))==null?void 0:s.replace(/C\s*/,"").split(" ").map(l=>Number(l));return[e,n]},$g=(r,e)=>[[e[4],e[5]],[e[2],e[3],e[0],e[1],r[0],r[1]]],ya=(r,e,n,i,o,a)=>{const s=[o.points.at(0).x,o.points.at(0).y],l=[a.points.at(0).x,a.points.at(0).y];if(!r)return;const[u,c]=yn(r[0],e[0],s[0],r[1],e[1],s[1]),[d,h]=yn(r[0],e[0],l[0],r[1],e[1],l[1]),p=[o.points.at(-1).x,o.points.at(-1).y],g=[a.points.at(-1).x,a.points.at(-1).y],m=[i.points.at(-1).x,i.points.at(-1).y];if(!n)return;const[w,N]=yn(p[0],m[0],n[0],p[1],m[1],n[1]),[L,T]=yn(g[0],m[0],n[0],g[1],m[1],n[1]);return{mA:[u,c],mB:[d,h],endA:[w,N],endB:[L,T]}},yn=(r,e,n,i,o,a)=>{const[s,l]=[r+n,i+a],[u,c]=[s-e,l-o];return[u,c]},Ig=1,aw=(r,e)=>{const{type:n,parallelIndex:i}=e.attributes;if(n===S.Simple||i<0)return{normal:[e],parallel:[]};const{source:o,target:a}=e,s=[],l=[];for(const u of r.edgeEntries(o,a)){const{type:c,parallelIndex:d}=u.attributes;if(c===S.Simple||d<0){s.push(u);continue}const{startFrom:h}=u.attributes[c];ba(c,o,h,u)&&l.push(u)}return{normal:s,parallel:l}},Dg=(r,e,n,i,o)=>{let a=!1;if(r===S.Diagonal)(Math.abs(i-e)e&&o>n)||Math.abs(i-e)>Math.abs(o-n)&&(i>e&&on))&&(a=!0);else if(r===S.Perpendicular)(i>e&&on)&&(a=!0);else if(r===S.RotatePerpendicular){const[s,l,u,c]=[e*Math.SQRT1_2+n*Math.SQRT1_2,-e*Math.SQRT1_2+n*Math.SQRT1_2,i*Math.SQRT1_2+o*Math.SQRT1_2,-i*Math.SQRT1_2+o*Math.SQRT1_2];(u>s&&cl)&&(a=!0)}return a},sw=r=>{var p;let e=r.at(0);if(!e)return{};for(const g of r)g.attributes.parallelIndex0?g.attributes.parallelIndex:0;if(m===0){h[g.edge]=c;continue}const w=m*5,N=["M ".concat(a," ").concat(s+w," L ").concat(l," ").concat(u+w),"M ".concat(a," ").concat(s-w," L ").concat(l," ").concat(u-w)],[L,T]=(p=fa(c,n,w))!=null?p:N;h[g.edge]=d?L:T}return h},ba=(r,e,n,i)=>{const o=i.attributes.type;return r===i.attributes.type&&e===i.source&&n===i.attributes[o].startFrom?!0:r===i.attributes.type&&e===i.target&&n!==i.attributes[o].startFrom},lw=(r,e,n,i,o)=>{if(e===S.Simple)return-1;const a=[];for(const l of r.edgeEntries(n,i))ba(e,n,o,l)&&a.push(l.attributes.parallelIndex);a.sort();let s=0;for(const l of a){if(l>s)break;s=l+1}return s},ii=(r,e,n)=>{if(e===S.Simple)return n;const i=r.getEdgeAttribute(n,"parallelIndex");if(i<0)return n;const{startFrom:o}=r.getEdgeAttribute(n,e),[a,s]=r.extremities(n);let l=i,u=n;for(const c of r.edgeEntries(a,s)){const d=c.attributes;(e===d.type&&a===c.source&&d[e].startFrom===o&&d.parallelIndex>=0&&d.parallelIndex=0&&d.parallelIndex{let e=0;for(const n of r.edgeEntries())n.attributes.parallelIndex>=0&&(e+=1);return e},Gg={telemetry:{app:!0,project:!0},preference:{unlockSimplePathAttempts:3,toolsPanel:{expand:!0},autoParallel:!0,randomStationsNames:"none"}},wa=er({name:"app",initialState:Gg,reducers:{setTelemetryApp:(r,e)=>{r.telemetry.app=e.payload},setTelemetryProject:(r,e)=>{r.telemetry.project=e.payload},setUnlockSimplePath:(r,e)=>{r.preference.unlockSimplePathAttempts=e.payload},setToolsPanelExpansion:(r,e)=>{r.preference.toolsPanel.expand=e.payload},setAutoParallel:(r,e)=>{r.preference.autoParallel=e.payload},setRandomStationsNames:(r,e)=>{r.preference.randomStationsNames=e.payload}}}),{setTelemetryApp:Ug,setTelemetryProject:Vg,setUnlockSimplePath:Wg,setToolsPanelExpansion:Hg,setAutoParallel:va,setRandomStationsNames:Jg}=wa.actions,Kg=wa.reducer,qg=49,Yg={present:new Q().export(),past:[],future:[],svgViewBoxZoom:100,svgViewBoxMin:{x:0,y:0}},xa=ho("undo"),Sa=ho("redo"),Na=er({name:"param",initialState:Yg,reducers:{setFullState:(r,e)=>structuredClone(e.payload),saveGraph:(r,e)=>{r.future=[],r.past.push(r.present),r.past.length>qg&&r.past.shift(),r.present=structuredClone(e.payload)},setSvgViewBoxZoom:(r,e)=>{r.svgViewBoxZoom=e.payload},setSvgViewBoxMin:(r,e)=>{r.svgViewBoxMin=e.payload}},extraReducers:r=>{r.addCase(xa,e=>{if(e.past.length===0)return;const n=e.past.pop();e.future.unshift(e.present),e.present=n,window.graph.clear(),window.graph.import(structuredClone(bi(n)))}).addCase(Sa,e=>{if(e.future.length===0)return;const n=e.future.shift();e.past.push(e.present),e.present=n,window.graph.clear(),window.graph.import(structuredClone(bi(n)))})}}),{setFullState:Zg,saveGraph:vt,setSvgViewBoxZoom:uw,setSvgViewBoxMin:cw}=Na.actions,Qg=Na.reducer,Xg={selected:new Set,active:void 0,refresh:{nodes:Date.now(),edges:Date.now()},mode:"free",lastTool:void 0,keepLastPath:!1,theme:[J.Shanghai,"sh1","#E3002B",U.white],paletteAppClip:{input:void 0,output:void 0},masterNodesCount:0,parallelLinesCount:0,stationNames:{},globalAlerts:{}},Dn=po("runtime/refreshNodes",async(r,{getState:e,dispatch:n})=>{const i=e();n(nm());let o=0;window.graph.forEachNode((s,l)=>{l.type===Oe.Master&&(o+=1)}),n(em(o));const a=i.account.activeSubscriptions.RMP_CLOUD?Zh:Yh;o>a&&n(si({status:"warning",message:"".concat(nn.t("header.settings.proLimitExceed.master")," ").concat(nn.t("header.settings.proLimitExceed.solution"))}))}),Rt=po("runtime/refreshEdges",async(r,{getState:e,dispatch:n})=>{const i=e();n(rm());const o=Fg(window.graph);n(tm(o));const a=i.account.activeSubscriptions.RMP_CLOUD?Bg:zg;o>=a&&n(va(!1)),o>a&&n(si({status:"warning",message:"".concat(nn.t("header.settings.proLimitExceed.parallel")," ").concat(nn.t("header.settings.proLimitExceed.solution"))}))}),oi=er({name:"runtime",initialState:Xg,reducers:{setSelected:(r,e)=>{r.selected=e.payload},addSelected:(r,e)=>{r.selected.add(e.payload)},removeSelected:(r,e)=>{r.selected.delete(e.payload)},clearSelected:r=>{r.selected=new Set},setActive:(r,e)=>{r.active=e.payload},setRefreshNodes:r=>{r.refresh.nodes=Date.now()},setRefreshEdges:r=>{r.refresh.edges=Date.now()},setMode:(r,e)=>{r.mode!=="free"&&(r.lastTool=r.mode),r.mode=e.payload},setKeepLastPath:(r,e)=>{r.keepLastPath=e.payload},setTheme:(r,e)=>{r.theme=e.payload},openPaletteAppClip:(r,e)=>{r.paletteAppClip.input=e.payload,r.paletteAppClip.output=void 0},closePaletteAppClip:r=>{r.paletteAppClip.input=void 0},onPaletteAppClipEmit:(r,e)=>{r.paletteAppClip.input=void 0,r.paletteAppClip.output=e.payload},setMasterNodesCount:(r,e)=>{r.masterNodesCount=e.payload},setParallelLinesCount:(r,e)=>{r.parallelLinesCount=e.payload},setStationNames:(r,e)=>{r.stationNames[e.payload.cityName]=e.payload.names},setGlobalAlert:(r,e)=>{const{status:n,message:i,url:o,linkedApp:a}=e.payload;r.globalAlerts[n]={message:i,url:o,linkedApp:a}},closeGlobalAlert:(r,e)=>{delete r.globalAlerts[e.payload]}},extraReducers:r=>{r.addCase(xa,e=>{e.refresh.nodes=Date.now(),e.refresh.edges=Date.now()}).addCase(Sa,e=>{e.refresh.nodes=Date.now(),e.refresh.edges=Date.now()})}}),{setMasterNodesCount:em,setParallelLinesCount:tm}=oi.actions,{setSelected:ai,addSelected:dw,removeSelected:hw,clearSelected:pw,setActive:fw,setRefreshNodes:nm,setRefreshEdges:rm,setMode:gw,setKeepLastPath:mw,setTheme:yw,openPaletteAppClip:im,closePaletteAppClip:om,onPaletteAppClipEmit:am,setStationNames:bw,setGlobalAlert:si,closeGlobalAlert:ww}=oi.actions,sm=oi.reducer,li=(r,e,n)=>e===0?r:lm(r,e);function lm(r,e,n){function i(R,_,P){var B=_.x-R.x,V=_.y-R.y,Y=Math.sqrt(B*B+V*V);return o(R,_,Math.min(1,P/Y))}function o(R,_,P){return{x:R.x+(_.x-R.x)*P,y:R.y+(_.y-R.y)*P}}function a(R,_){R.length>2&&(R[R.length-2]=_.x,R[R.length-1]=_.y)}function s(R){return{x:parseFloat(R[R.length-2]),y:parseFloat(R[R.length-1])}}var l=r.split(/[,\s]/).reduce(function(R,_){var P=_.match("([a-zA-Z])(.+)");return P?(R.push(P[1]),R.push(P[2])):R.push(_),R},[]),u=l.reduce(function(R,_){return parseFloat(_)==_&&R.length?R[R.length-1].push(_):R.push([_]),R},[]),c=[];if(u.length>1){var d=s(u[0]),h=null;u[u.length-1][0]=="Z"&&u[0].length>2&&(h=["L",d.x,d.y],u[u.length-1]=h),c.push(u[0]);for(var p=1;p2&&m[0]=="L"&&w.length>2&&w[0]=="L"){var N=s(g),L=s(m),T=s(w),M,b;M=i(L,N,e),b=i(L,T,e),a(m,M),m.origPoint=L,c.push(m);var y=o(M,L,.5),x=o(L,b,.5),v=["C",y.x,y.y,x.x,x.y,b.x,b.y];v.origPoint=L,c.push(v)}else c.push(m)}if(h){var C=s(c[c.length-1]);c.push(["Z"]),a(c[0],C)}}else c=u;return c.reduce(function(R,_){return R+_.join(" ")+" "},"")}const um=(r,e,n,i,o=Be)=>{const{startFrom:a=Be.startFrom,offsetFrom:s=Be.offsetFrom,offsetTo:l=Be.offsetTo,roundCornerFactor:u=Be.roundCornerFactor}=o,[c,d,h,p]=a==="from"?[r,n,e,i]:[e,i,r,n],g=Math.abs(h-c)0?-1:1):b,R=g==="horizontal"?y:v+Math.abs(x-b)*(v-y>0?-1:1),[_,P,B,V]=a==="from"?[b,y,x,v]:[x,v,b,y];return li("M ".concat(_," ").concat(P," L ").concat(C," ").concat(R," L ").concat(B," ").concat(V),u)},Be={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:10},cm=r=>{var h,p,g;const{id:e,attrs:n,handleAttrsUpdate:i,recalculateParallelIndex:o,parallelIndex:a}=r,{t:s}=X(),l=ct(),u=ii(window.graph,S.Diagonal,e),c=a>=0&&u!==e,d=[{type:"select",label:s("panel.details.lines.common.startFrom"),value:n.startFrom,options:{from:s("panel.details.lines.common.from"),to:s("panel.details.lines.common.to")},onChange:m=>{o(e,m),n.startFrom=m,i(e,n)},minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetFrom"),value:((h=n.offsetFrom)!=null?h:Be.offsetFrom).toString(),variant:"number",onChange:m=>{Number.isNaN(m)&&(m="0"),n.offsetFrom=Number(m),i(e,n)},isDisabled:c,minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetTo"),value:((p=n.offsetTo)!=null?p:Be.offsetTo).toString(),variant:"number",onChange:m=>{Number.isNaN(m)&&(m="0"),n.offsetTo=Number(m),i(e,n)},isDisabled:c,minW:"full"},{type:"input",label:s("panel.details.lines.common.roundCornerFactor"),value:((g=n==null?void 0:n.roundCornerFactor)!=null?g:Be.roundCornerFactor).toString(),variant:"number",onChange:m=>{(Number.isNaN(m)||Number(m)<0)&&(m="0"),n.roundCornerFactor=Number(m),i(e,n)},isDisabled:c,minW:"full"}];return c&&d.unshift({type:"custom",label:s("panel.details.lines.common.parallelDisabled"),component:f.jsxs(St,{size:"sm",variant:"link",onClick:()=>l(ai(new Set([u]))),children:[s("panel.details.lines.common.changeInBaseLine")," ",u]})}),f.jsx(ne,{fields:d})},dm=f.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:f.jsx("path",{d:"M9,18V12L15,6",stroke:"currentColor",fill:"none"})}),hm={generatePath:um,icon:dm,defaultAttrs:Be,attrsComponent:cm,metadata:{displayName:"panel.details.lines.diagonal.displayName"}},pm=(r,e,n,i,o=Fe)=>{const{startFrom:a=Fe.startFrom,offsetFrom:s=Fe.offsetFrom,offsetTo:l=Fe.offsetTo,roundCornerFactor:u=Fe.roundCornerFactor}=o,[c,d]=a==="from"?[s,l]:[l,s],[h,p,g,m]=a==="from"?[0,c,d,0]:[c,0,0,d],w=a==="from"?e+g:r+h,N=a==="from"?n+p:i+m;return li("M ".concat(r+h," ").concat(n+p," L ").concat(w," ").concat(N," L ").concat(e+g," ").concat(i+m),u)},Fe={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:18.33},fm=r=>{var h,p,g;const{id:e,attrs:n,handleAttrsUpdate:i,recalculateParallelIndex:o,parallelIndex:a}=r,{t:s}=X(),l=ct(),u=ii(window.graph,S.Perpendicular,e),c=a>=0&&u!==e,d=[{type:"select",label:s("panel.details.lines.common.startFrom"),value:n.startFrom,options:{from:s("panel.details.lines.common.from"),to:s("panel.details.lines.common.to")},onChange:m=>{o(e,m),n.startFrom=m,i(e,n)},minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetFrom"),value:((h=n.offsetFrom)!=null?h:Fe.offsetFrom).toString(),variant:"number",onChange:m=>{Number.isNaN(m)&&(m="0"),n.offsetFrom=Number(m),i(e,n)},isDisabled:c,minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetTo"),value:((p=n.offsetTo)!=null?p:Fe.offsetTo).toString(),variant:"number",onChange:m=>{Number.isNaN(m)&&(m="0"),n.offsetTo=Number(m),i(e,n)},isDisabled:c,minW:"full"},{type:"input",label:s("panel.details.lines.common.roundCornerFactor"),value:((g=n==null?void 0:n.roundCornerFactor)!=null?g:Fe.roundCornerFactor).toString(),variant:"number",onChange:m=>{(Number.isNaN(m)||Number(m)<0)&&(m="0"),n.roundCornerFactor=Number(m),i(e,n)},isDisabled:c,minW:"full"}];return c&&d.unshift({type:"custom",label:s("panel.details.lines.common.parallelDisabled"),component:f.jsxs(St,{size:"sm",variant:"link",onClick:()=>l(ai(new Set([u]))),children:[s("panel.details.lines.common.changeInBaseLine")," ",u]})}),f.jsx(ne,{fields:d})},gm=f.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:f.jsx("path",{d:"M6,6H18V18",stroke:"currentColor",fill:"none"})}),mm={generatePath:pm,icon:gm,defaultAttrs:Fe,attrsComponent:fm,metadata:{displayName:"panel.details.lines.perpendicular.displayName"}},ym=(r,e,n,i,o=Ge)=>{const{startFrom:a=Ge.startFrom,offsetFrom:s=Ge.offsetFrom,offsetTo:l=Ge.offsetTo,roundCornerFactor:u=Ge.roundCornerFactor}=o,[c,d]=a==="from"?[s,l]:[l,s],[h,p,g,m]=a==="from"?[0,c,d,0]:[c,0,0,d],[w,N,L,T]=[r*Math.SQRT1_2+n*Math.SQRT1_2,-r*Math.SQRT1_2+n*Math.SQRT1_2,e*Math.SQRT1_2+i*Math.SQRT1_2,-e*Math.SQRT1_2+i*Math.SQRT1_2],[M,b,y,x]=[w+h,N+p,L+g,T+m],[v,C,R,_]=[M*Math.SQRT1_2-b*Math.SQRT1_2,M*Math.SQRT1_2+b*Math.SQRT1_2,y*Math.SQRT1_2-x*Math.SQRT1_2,y*Math.SQRT1_2+x*Math.SQRT1_2],P=a==="from"?L+g:w+h,B=a==="from"?N+p:T+m,[V,Y]=[P*Math.SQRT1_2-B*Math.SQRT1_2,P*Math.SQRT1_2+B*Math.SQRT1_2];return li("M ".concat(v," ").concat(C," L ").concat(V," ").concat(Y," L ").concat(R," ").concat(_),u)},Ge={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:18.33},bm=r=>{var h,p,g;const{id:e,attrs:n,handleAttrsUpdate:i,recalculateParallelIndex:o,parallelIndex:a}=r,{t:s}=X(),l=ct(),u=ii(window.graph,S.RotatePerpendicular,e),c=a>=0&&u!==e,d=[{type:"select",label:s("panel.details.lines.common.startFrom"),value:n.startFrom,options:{from:s("panel.details.lines.common.from"),to:s("panel.details.lines.common.to")},onChange:m=>{o(e,m),n.startFrom=m,i(e,n)},minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetFrom"),value:((h=n.offsetFrom)!=null?h:Ge.offsetFrom).toString(),variant:"number",onChange:m=>{Number.isNaN(m)&&(m="0"),n.offsetFrom=Number(m),i(e,n)},isDisabled:c,minW:"full"},{type:"input",label:s("panel.details.lines.common.offsetTo"),value:((p=n.offsetTo)!=null?p:Ge.offsetTo).toString(),variant:"number",onChange:m=>{Number.isNaN(m)&&(m="0"),n.offsetTo=Number(m),i(e,n)},isDisabled:c,minW:"full"},{type:"input",label:s("panel.details.lines.common.roundCornerFactor"),value:((g=n==null?void 0:n.roundCornerFactor)!=null?g:Ge.roundCornerFactor).toString(),variant:"number",onChange:m=>{(Number.isNaN(m)||Number(m)<0)&&(m="0"),n.roundCornerFactor=Number(m),i(e,n)},isDisabled:c,minW:"full"}];return c&&d.unshift({type:"custom",label:s("panel.details.lines.common.parallelDisabled"),component:f.jsxs(St,{size:"sm",variant:"link",onClick:()=>l(ai(new Set([u]))),children:[s("panel.details.lines.common.changeInBaseLine")," ",u]})}),f.jsx(ne,{fields:d})},wm=f.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:f.jsx("path",{d:"M9,6L15,12L9,18",stroke:"currentColor",fill:"none"})}),vm={generatePath:ym,icon:wm,defaultAttrs:Ge,attrsComponent:bm,metadata:{displayName:"panel.details.lines.rotatePerpendicular.displayName"}};var G=(r=>(r.ShmetroBasic="shmetro-basic",r.ShmetroBasic2020="shmetro-basic-2020",r.ShmetroInt="shmetro-int",r.ShmetroOutOfSystemInt="shmetro-osysi",r.ShanghaiSuburbanRailway="sh-sub-rwy",r.GzmtrBasic="gzmtr-basic",r.GzmtrInt="gzmtr-int",r.GzmtrInt2024="gzmtr-int-2024",r.BjsubwayBasic="bjsubway-basic",r.BjsubwayInt="bjsubway-int",r.MTR="mtr",r.SuzhouRTBasic="suzhourt-basic",r.SuzhouRTInt="suzhourt-int",r.KunmingRTBasic="kunmingrt-basic",r.KunmingRTInt="kunmingrt-int",r.MRTBasic="mrt-basic",r.MRTInt="mrt-int",r.JREastBasic="jr-east-basic",r.JREastImportant="jr-east-imp",r.FoshanMetroBasic="foshan-metro-basic",r.QingdaoMetroStation="qingdao-metro-basic",r.TokyoMetroBasic="tokyo-metro-basic",r.TokyoMetroInt="tokyo-metro-int",r.LondonTubeBasic="london-tube-basic",r.LondonTubeInt="london-tube-int",r.LondonRiverServicesInt="london-river-int",r.GuangdongIntercityRailway="gd-intercity-rwy",r))(G||{});const vw=["shmetro-basic-2020","gzmtr-basic","suzhourt-basic","kunmingrt-basic","mrt-basic","foshan-metro-basic","qingdao-metro-basic"],xw={names:["车站","Stn"]};function Sw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"},child:[]}]})(r)}function Nw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"},child:[]}]})(r)}function Rw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},child:[]}]})(r)}function Cw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 14h-3v3h-2v-3H8v-2h3v-3h2v3h3v2zm-3-7V3.5L18.5 9H13z"},child:[]}]})(r)}function Aw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"},child:[]}]})(r)}function _w(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(r)}function Lw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.488.488 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"},child:[]}]})(r)}function Ew(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12.87 15.07-2.54-2.51.03-.03A17.52 17.52 0 0 0 14.07 6H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7 1.62-4.33L19.12 17h-3.24z"},child:[]}]})(r)}function Tw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]},{tag:"path",attr:{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"},child:[]}]})(r)}function kw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"},child:[]}]})(r)}function Ow(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M13 7h9v2h-9zM13 15h9v2h-9zM16 11h6v2h-6zM13 12 8 7v4H2v2h6v4z"},child:[]}]})(r)}function Mw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"},child:[]}]})(r)}function Pw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},child:[]}]})(r)}function jw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 13h2v-2H3v2zm4 8h2v-2H7v2zm6-18h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zm8 4h2v-2h-2v2zm8-8h2v-2h-2v2zm0-4h2V7h-2v2zm-4-4h2V3h-2v2zM7.83 5 7 4.17V3h2v2H7.83zm12 12-.83-.83V15h2v2h-1.17zm1.36 4.19L2.81 2.81 1.39 4.22 4.17 7H3v2h2V7.83l2 2V17h7.17l2 2H15v2h2v-1.17l2.78 2.78 1.41-1.42zM9 15v-3.17L12.17 15H9zm6-2.83V9h-3.17l-2-2H17v7.17l-2-2z"},child:[]}]})(r)}function $w(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 0 1 7.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"},child:[]}]})(r)}function Iw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 13H5v-2h14v2z"},child:[]}]})(r)}function Dw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 12.4V7l-4-4H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7.4l8.6-8.6zM15 15c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zM6 6h9v4H6V6zm13.99 10.25 1.77 1.77L16.77 23H15v-1.77l4.99-4.98zm3.26.26-.85.85-1.77-1.77.85-.85c.2-.2.51-.2.71 0l1.06 1.06c.2.2.2.52 0 .71z"},child:[]}]})(r)}function zw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"},child:[]}]})(r)}function Bw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"},child:[]}]})(r)}function Fw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"},child:[]}]})(r)}function Gw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"},child:[]}]})(r)}function Uw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 20h14v-2H5v2zm0-10h4v6h6v-6h4l-7-7-7 7z"},child:[]}]})(r)}function xm(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"},child:[]}]})(r)}function Vw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"},child:[]}]})(r)}function Ww(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"},child:[]}]})(r)}function Hw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"},child:[]}]})(r)}function Jw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(r)}function Kw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"},child:[]}]})(r)}function qw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(r)}function Yw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(r)}function Zw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(r)}function Qw(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3 1 9l11 6 9-4.91V17h2V9L12 3z"},child:[]}]})(r)}function Sm(r){return F({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3z"},child:[]}]})(r)}class Nm{static hexToRgb(e){return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16)]}static fade(e,n){return"rgba(".concat([...this.hexToRgb(e),n].join(","),")")}static euclideanDistance(e,n){return this.hexToRgb(e).reduce((i,o,a)=>i+Math.pow(o-this.hexToRgb(n)[a],2),0)}}function Rm(r){const{theme:e,onClick:n}=r,{t:i}=X();return f.jsx(Cn,{"aria-label":i("Color"),color:e[3],bg:e[2],size:"md",_hover:{bg:Nm.fade(e[2],.7)},icon:f.jsx(xm,{}),onClick:n})}const re=r=>{var T;const{type:e,colorKey:n="color",defaultTheme:i}=r,o=ct(),{selected:a,paletteAppClip:{output:s}}=ar(M=>M.runtime),[l]=a,u=j.useCallback(()=>{o(Dn()),o(Rt()),o(vt(c.current.export()))},[o,Dn,Rt,vt]),c=j.useRef(window.graph),[d,h,p]=[].concat(Object.values(G)).concat(Object.values(Oe)).find(M=>e===M)?[c.current.hasNode,c.current.getNodeAttribute,c.current.mergeNodeAttributes]:[c.current.hasEdge,c.current.getEdgeAttribute,c.current.mergeEdgeAttributes],g=M=>{if(l&&d.bind(c.current)(l)){const b=h.bind(c.current)(l,e);b[n]=M,p.bind(c.current)(l,{[e]:b}),u()}},[m,w]=j.useState(!1);j.useEffect(()=>{m&&s&&(g(s),w(!1))},[s==null?void 0:s.toString()]);const L=l&&d.bind(c.current)(l)&&(l.startsWith("stn")||l.startsWith("misc_node")?c.current.getNodeAttribute(l,"type")===e:c.current.getEdgeAttribute(l,"style")===e)?((T=h.bind(c.current)(l,e))!=null?T:{[n]:i})[n]:i;return f.jsx(f.Fragment,{children:f.jsx(Rm,{theme:L,onClick:()=>{w(!0),o(im(L))}})})},Cm=r=>{const{id:e,path:n,styleAttrs:i,newLine:o,handlePointerDown:a}=r,{color:s=zn.color}=i!=null?i:zn,l=j.useCallback(u=>a(e,u),[e,a]);return f.jsx("path",{id:e,d:n,fill:"none",stroke:s[2],strokeWidth:"5",strokeLinecap:"round",cursor:"pointer",onPointerDown:o?void 0:l,pointerEvents:o?"none":void 0})},zn={color:[J.Shanghai,"sh1","#E4002B",U.white]},Am=r=>{const{t:e}=X(),n=[{type:"custom",label:e("color"),component:f.jsx(re,{type:$.SingleColor,defaultTheme:zn.color})}];return f.jsx(ne,{fields:n})},_m={component:Cm,defaultAttrs:zn,attrsComponent:Am,metadata:{displayName:"panel.details.lines.singleColor.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},Lm=r=>{const{id:e,path:n,handlePointerDown:i}=r,o=j.useCallback(a=>i(e,a),[e,i]);return f.jsxs("g",{id:e,onPointerDown:o,cursor:"pointer",children:[f.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"7",strokeLinecap:"round"}),f.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"4.33",strokeLinecap:"round"})]})},Em={},Tm=()=>{},km={component:Lm,defaultAttrs:Em,attrsComponent:Tm,metadata:{displayName:"panel.details.lines.shmetroVirtualInt.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular,S.Simple]}},Om=r=>{const{id:e,path:n,styleAttrs:i,handlePointerDown:o}=r,{isEnd:a=Ra.isEnd}=i,s=j.useCallback(u=>o(e,u),[e,o]),l=a?"round":void 0;return f.jsx("g",{id:"".concat(e,".pre"),onPointerDown:s,cursor:"pointer",children:f.jsx("path",{d:n,fill:"none",stroke:"#898989",strokeWidth:"5",strokeLinecap:l})})},Mm=r=>{const{id:e,path:n,handlePointerDown:i}=r,o=j.useCallback(a=>i(e,a),[e,i]);return f.jsx("g",{id:e,onPointerDown:o,cursor:"pointer",children:f.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})})},Ra={isEnd:!1},Pm=r=>{const{id:e,attrs:n,handleAttrsUpdate:i}=r,{t:o}=X(),a=[{type:"switch",label:o("panel.details.lines.shanghaiSuburbanRailway.isEnd"),isChecked:n.isEnd,onChange:s=>{n.isEnd=s,i(e,n)},oneLine:!0,minW:"full"}];return f.jsx(ne,{fields:a})},jm={component:Mm,preComponent:Om,defaultAttrs:Ra,attrsComponent:Pm,metadata:{displayName:"panel.details.lines.shanghaiSuburbanRailway.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},$m=r=>{const{id:e,path:n,handlePointerDown:i}=r,o=j.useCallback(a=>i(e,a),[e,i]);return f.jsx("path",{id:e,d:n,fill:"none",stroke:"#565656",strokeWidth:"3",strokeDasharray:"3",cursor:"pointer",onPointerDown:o})},Im={},Dm=()=>null,zm={component:$m,defaultAttrs:Im,attrsComponent:Dm,metadata:{displayName:"panel.details.lines.gzmtrVirtualInt.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular,S.Simple]}},Ca=9.25*2,Aa=1.3,_a=.57915,Bm=(Ca+Aa)*_a,Fm=(Ca-Aa)*_a,Gm=r=>{const{id:e,path:n,styleAttrs:i,handlePointerDown:o}=r,{color:a=Bn.color}=i!=null?i:Bn,s=j.useCallback(l=>o(e,l),[e,o]);return f.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[f.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:Bm}),f.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:Fm})]})},Bn={color:[J.Guangzhou,"gz11","#ffb00a",U.black]},Um=r=>{const{t:e}=X(),n=[{type:"custom",label:e("color"),component:f.jsx(re,{type:$.GZMTRLoop,defaultTheme:Bn.color})}];return f.jsx(ne,{fields:n})},Vm={component:Gm,defaultAttrs:Bn,attrsComponent:Um,metadata:{displayName:"panel.details.lines.gzmtrLoop.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},Wm=r=>{const{id:e,path:n,styleAttrs:i,handlePointerDown:o}=r,{color:a=Fn.color}=i!=null?i:Fn,s=j.useCallback(l=>o(e,l),[e,o]);return f.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[f.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),f.jsx("path",{d:n,fill:"none",stroke:a[3],strokeWidth:"4.67",strokeDasharray:"17.5"})]})},Fn={color:[J.Shanghai,"jsr","#000000",U.white]},Hm=r=>{const{t:e}=X(),n=[{type:"custom",label:e("color"),component:f.jsx(re,{type:$.ChinaRailway,defaultTheme:Fn.color})}];return f.jsx(ne,{fields:n})},Jm={component:Wm,defaultAttrs:Fn,attrsComponent:Hm,metadata:{displayName:"panel.details.lines.chinaRailway.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},Km=r=>{const{id:e,path:n,styleAttrs:i,handlePointerDown:o}=r,{color:a=Gn.color}=i!=null?i:Gn,s=j.useCallback(l=>o(e,l),[e,o]);return f.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[f.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"6",strokeLinecap:"round"}),f.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"})]})},Gn={color:[J.Beijing,"bj1","#c23a30",U.white]},qm=r=>{const{id:e,attrs:n,handleAttrsUpdate:i}=r,{t:o}=X(),a=[{type:"custom",label:"color",component:f.jsx(re,{type:$.BjsubwaySingleColor,defaultTheme:Gn.color})}];return f.jsx(ne,{fields:a})},Ym={component:Km,defaultAttrs:Gn,attrsComponent:qm,metadata:{displayName:"panel.details.lines.bjsubwaySingleColor.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},an=r=>{const{t:e}=X(),n=ct(),{selected:i}=ar(l=>l.runtime),[o]=i,a=j.useRef(window.graph),s=[];if(i.size===1&&a.current.hasNode(o)){const l=a.current.getNodeAttribute(o,"type"),u=a.current.getNodeAttribute(o,l);s.push(...r.fields.filter(c=>c.type!=="custom").map(c=>{var d,h,p;return{type:c.type,label:e(c.label),value:(d=c.value)==null?void 0:d.call(c,u),isChecked:(h=c.isChecked)==null?void 0:h.call(c,u),hidden:(p=c.hidden)==null?void 0:p.call(c,u),options:c.options,disabledOptions:c.disabledOptions&&c.disabledOptions(u),validator:c.validator,oneLine:c.oneLine,onChange:g=>{let m;try{m=c.onChange(g,u)}catch(w){n(si({status:"error",message:e("err-code.".concat(w))}));return}a.current.mergeNodeAttributes(o,{[l]:m}),n(Dn()),n(vt(a.current.export()))}}}),...r.fields.filter(c=>c.type==="custom").map(c=>({...c,label:e(c.label)})))}if(i.size===1&&a.current.hasEdge(o)&&r.type!=="style"){const l=a.current.getEdgeAttribute(o,"type"),u=a.current.getEdgeAttribute(o,l);s.push(...r.fields.map(c=>({type:c.type,label:e(c.label),value:c.value(u),options:c.options,disabledOptions:c.disabledOptions&&c.disabledOptions(u),validator:c.validator,onChange:d=>{a.current.mergeEdgeAttributes(o,{[l]:c.onChange(d,u)}),n(Rt()),n(vt(a.current.export()))}})))}if(i.size===1&&a.current.hasEdge(o)&&r.type==="style"){const l=a.current.getEdgeAttribute(o,"style"),u=a.current.getEdgeAttribute(o,l);s.push(...r.fields.filter(c=>c.type!=="custom").map(c=>({type:c.type,label:e(c.label),value:c.value(u),options:c.options,disabledOptions:c.disabledOptions&&c.disabledOptions(u),validator:c.validator,onChange:d=>{a.current.mergeEdgeAttributes(o,{[l]:c.onChange(d,u)}),n(Rt()),n(vt(a.current.export()))}})),...r.fields.filter(c=>c.type==="custom").map(c=>({...c,label:e(c.label)})))}return f.jsx(ne,{fields:s,minW:276})},Zm=r=>{const{id:e,path:n,styleAttrs:i,handlePointerDown:o}=r,{color:a=Un.color}=i!=null?i:Un,s=j.useCallback(l=>o(e,l),[e,o]);return f.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[f.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5"}),f.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"1.67"})]})},Un={color:[J.Beijing,"bj1","#c23a30",U.white]},Qm=[{type:"custom",label:"color",component:f.jsx(re,{type:$.BjsubwayTram,defaultTheme:Un.color})}],Xm=()=>f.jsx(an,{fields:Qm,type:"style"}),ey={component:Zm,defaultAttrs:Un,attrsComponent:Xm,metadata:{displayName:"panel.details.lines.bjsubwayTram.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},ty=r=>{const{id:e,type:n,path:i,styleAttrs:o,handlePointerDown:a}=r,{colorA:s=lt.colorA,colorB:l=lt.colorB}=o!=null?o:lt,u=j.useCallback(g=>a(e,g),[e,a]),[c,d]=j.useState(i),[h,p]=j.useState(i);return j.useEffect(()=>{const g=fa(i,n,-1.25,1.25);g&&(d(g[0]),p(g[1]))},[i]),f.jsxs("g",{id:e,onPointerDown:u,cursor:"pointer",children:[f.jsx("path",{d:c,fill:"none",stroke:s[2],strokeWidth:"2.5",strokeLinecap:"round"}),f.jsx("path",{d:h,fill:"none",stroke:l[2],strokeWidth:"2.5",strokeLinecap:"round"})]})},lt={colorA:[J.Shanghai,"maglevA","#008B9A",U.white],colorB:[J.Shanghai,"maglevB","#F5A74E",U.white]},ny=()=>{const{t:r}=X(),e=ct(),{selected:n}=ar(a=>a.runtime),[i]=n,o=j.useRef(window.graph);return f.jsx(Cn,{"aria-label":r("panel.details.lines.dualColor.swap"),icon:f.jsx(Sm,{}),size:"sm",onClick:()=>{var l;const a=(l=o.current.getEdgeAttribute(i,$.DualColor))!=null?l:lt,s=a.colorA;a.colorA=a.colorB,a.colorB=s,o.current.mergeEdgeAttributes(i,{[$.DualColor]:a}),e(Rt()),e(vt(o.current.export()))}})},ry=r=>{const{t:e}=X(),n=[{type:"custom",label:e("panel.details.lines.dualColor.swap"),component:f.jsx(ny,{})},{type:"custom",label:e("panel.details.lines.dualColor.colorA"),component:f.jsx(re,{type:$.DualColor,colorKey:"colorA",defaultTheme:lt.colorA})},{type:"custom",label:e("panel.details.lines.dualColor.colorB"),component:f.jsx(re,{type:$.DualColor,colorKey:"colorB",defaultTheme:lt.colorB})}];return f.jsx(ne,{fields:n})},iy={component:ty,defaultAttrs:lt,attrsComponent:ry,metadata:{displayName:"panel.details.lines.dualColor.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},oy=r=>{const{id:e,path:n,styleAttrs:i,handlePointerDown:o}=r,{color:a=xt.color,width:s=xt.width}=i!=null?i:xt,l=j.useCallback(u=>o(e,u),[e,o]);return f.jsx("path",{id:e,d:n,fill:"none",stroke:a[2],strokeWidth:s,strokeLinecap:"round",cursor:"pointer",onPointerDown:l})},xt={color:[J.Shanghai,"river","#B9E3F9",U.white],width:20},ay=[{type:"input",label:"panel.details.lines.river.width",variant:"number",value:r=>(r!=null?r:xt).width,onChange:(r,e)=>{const n=e!=null?e:xt;return n.width=Number(r),n}}],sy=()=>f.jsx(an,{fields:ay,type:"style"}),ly={component:oy,defaultAttrs:xt,attrsComponent:sy,metadata:{displayName:"panel.details.lines.river.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular,S.Simple]}},uy=r=>{const{id:e,path:n,styleAttrs:i,handlePointerDown:o}=r,{color:a=Vn.color}=i!=null?i:Vn,s=j.useCallback(l=>o(e,l),[e,o]);return f.jsx("path",{id:e,d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"butt",strokeDasharray:"5 2.5",cursor:"pointer",onPointerDown:s})},Vn={color:[J.Hongkong,"twl","#E2231A",U.white]},cy=[{type:"custom",label:"color",component:f.jsx(re,{type:$.MTRRaceDays,defaultTheme:Vn.color})}],dy=()=>f.jsx(an,{fields:cy,type:"style"}),hy={component:uy,defaultAttrs:Vn,attrsComponent:dy,metadata:{displayName:"panel.details.lines.mtrRaceDays.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},py=r=>{const{id:e,path:n,styleAttrs:i,handlePointerDown:o}=r,{color:a=Wn.color}=i!=null?i:Wn,s=j.useCallback(l=>o(e,l),[e,o]);return f.jsx("path",{id:e,d:n,fill:"none",stroke:a[2],strokeWidth:"2.5",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},Wn={color:[J.Hongkong,"lrl","#CD9700",U.white]},fy=[{type:"custom",label:"color",component:f.jsx(re,{type:$.MTRLightRail,defaultTheme:Wn.color})}],gy=()=>f.jsx(an,{fields:fy,type:"style"}),my={component:py,defaultAttrs:Wn,attrsComponent:gy,metadata:{displayName:"panel.details.lines.mtrLightRail.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},yy=r=>{const{id:e,path:n,handlePointerDown:i}=r,o=j.useCallback(a=>i(e,a),[e,i]);return f.jsx("path",{id:e,d:n,fill:"none",stroke:"black",strokeWidth:"1.33",strokeDasharray:"2.66 1.33",cursor:"pointer",onPointerDown:o})},by={},wy=()=>{},vy={component:yy,defaultAttrs:by,attrsComponent:wy,metadata:{displayName:"panel.details.lines.mtrUnpaidArea.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular,S.Simple]}},xy=r=>{const{id:e,path:n,handlePointerDown:i}=r,o=j.useCallback(a=>i(e,a),[e,i]);return f.jsx("path",{id:e,d:n,fill:"none",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",cursor:"pointer",onPointerDown:o})},Sy={},Ny=()=>f.jsx(an,{fields:[],type:"style"}),Ry={component:xy,defaultAttrs:Sy,attrsComponent:Ny,metadata:{displayName:"panel.details.lines.mtrPaidArea.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular,S.Simple]}},Cy=r=>{const{id:e,path:n,styleAttrs:i,handlePointerDown:o}=r,{color:a=Hn.color}=i!=null?i:Hn,s=j.useCallback(u=>o(e,u),[e,o]),l=co("white","var(--chakra-colors-gray-800)");return f.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[f.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeDasharray:"2 2"}),f.jsx("path",{d:n,fill:"none",stroke:l,strokeWidth:"3.4"})]})},Hn={color:[J.Beijing,"bj1","#c23a30",U.white]},Ay=r=>{const{id:e,attrs:n,handleAttrsUpdate:i}=r,{t:o}=X(),a=[{type:"custom",label:"color",component:f.jsx(re,{type:$.BjsubwayDotted,defaultTheme:Hn.color})}];return f.jsx(ne,{fields:a})},_y={component:Cy,defaultAttrs:Hn,attrsComponent:Ay,metadata:{displayName:"panel.details.lines.bjsubwayDotted.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},Ly=r=>{const{id:e,path:n,styleAttrs:i,handlePointerDown:o}=r,{color:a=Jn.color}=i!=null?i:Jn,s=j.useCallback(l=>o(e,l),[e,o]);return f.jsx("path",{id:e,d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeDasharray:"0 10",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},Jn={color:[J.Singapore,"ewl","#009739",U.white]},Ey=r=>{const{id:e,attrs:n,handleAttrsUpdate:i}=r,{t:o}=X(),a=[{type:"custom",label:"color",component:f.jsx(re,{type:$.MRTUnderConstruction,defaultTheme:Jn.color})}];return f.jsx(ne,{fields:a})},Ty={component:Ly,defaultAttrs:Jn,attrsComponent:Ey,metadata:{displayName:"panel.details.lines.mrtUnderConstruction.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},ky=r=>{const{id:e,path:n,handlePointerDown:i}=r,o=j.useCallback(a=>i(e,a),[e,i]);return f.jsx("path",{id:e,d:n,fill:"none",stroke:"black",strokeWidth:"5",strokeDasharray:"0 10 10 10",strokeLinecap:"round",cursor:"pointer",onPointerDown:o})},Oy={},My=r=>null,Py={component:ky,defaultAttrs:Oy,attrsComponent:My,metadata:{displayName:"panel.details.lines.mrtSentosaExpress.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},jy=r=>{const{id:e,path:n,styleAttrs:i,newLine:o,handlePointerDown:a}=r,{color:s=Kn.color}=i!=null?i:Kn,l=j.useCallback(u=>a(e,u),[e,a]);return f.jsxs("g",{id:e,onPointerDown:l,cursor:"pointer",children:[f.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"5.1"}),f.jsx("path",{d:n,fill:"none",stroke:s[2],strokeWidth:"4.9"})]})},Kn={color:[J.Tokyo,"jy","#9ACD32",U.black]},$y=r=>{const{id:e,attrs:n,handleAttrsUpdate:i}=r,{t:o}=X(),a=[{type:"custom",label:o("color"),component:f.jsx(re,{type:$.JREastSingleColor,defaultTheme:Kn.color})}];return f.jsx(ne,{fields:a})},Iy={component:jy,defaultAttrs:Kn,attrsComponent:$y,metadata:{displayName:"panel.details.lines.jrEastSingleColor.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},Dy=5,ge=Dy*Math.SQRT1_2,Dr=.25,bn=(ge*Math.SQRT2-Dr)/2*Math.SQRT2,zy=r=>{const{id:e,type:n,path:i,styleAttrs:o,newLine:a,handlePointerDown:s}=r,{color:l=qn.color}=o!=null?o:qn,u=j.useCallback(h=>s(e,h),[e,s]),[c,d]=j.useState({outline:i,pA:i,pB:i});return j.useEffect(()=>{const h=Pg(i,n,-2.5,2.5);h&&d(h)},[i]),f.jsxs("g",{id:e,onPointerDown:u,cursor:"pointer",children:[f.jsxs("defs",{children:[f.jsxs("clipPath",{id:"jr_east_fill_pattern_clip_path",patternUnits:"userSpaceOnUse",children:[f.jsx("polygon",{points:"0,0 0,".concat(bn," ").concat(bn,",0")}),f.jsx("polygon",{points:"".concat(ge,",").concat(ge," ").concat(ge-bn,",").concat(ge," ").concat(ge,",").concat(ge-bn)})]}),f.jsxs("pattern",{id:"jr_east_".concat(e,"_fill_pattern_").concat(l[2]),width:ge,height:ge,patternUnits:"userSpaceOnUse",children:[f.jsx("rect",{width:ge,height:ge,fill:l[2]}),f.jsx("line",{x1:"0",y1:"0",x2:ge,y2:ge,stroke:"white",strokeWidth:Dr,strokeOpacity:"50%",clipPath:"url(#jr_east_fill_pattern_clip_path)"}),f.jsx("line",{x1:ge,y1:"0",x2:"0",y2:ge,stroke:"white",strokeWidth:Dr,strokeOpacity:"50%"})]})]}),f.jsx("path",{d:c.outline,fill:"url(#jr_east_".concat(e,"_fill_pattern_").concat(l[2],")")}),f.jsx("path",{d:c.pA,fill:"none",stroke:"black",strokeWidth:"0.1"}),f.jsx("path",{d:c.pB,fill:"none",stroke:"black",strokeWidth:"0.1"})]})},qn={color:[J.Tokyo,"jy","#9ACD32",U.black]},By=r=>{const{id:e,attrs:n,handleAttrsUpdate:i}=r,{t:o}=X(),a=[{type:"custom",label:o("color"),component:f.jsx(re,{type:$.JREastSingleColorPattern,defaultTheme:qn.color})}];return f.jsx(ne,{fields:a})},Fy={component:zy,defaultAttrs:qn,attrsComponent:By,metadata:{displayName:"panel.details.lines.jrEastSingleColorPattern.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},Gy=r=>{const{id:e,path:n,styleAttrs:i,handlePointerDown:o}=r,{color:a=Yn.color}=i!=null?i:Yn,s=j.useCallback(l=>o(e,l),[e,o]);return f.jsx("path",{id:e,d:n,fill:"none",stroke:a[2],strokeWidth:"2.157",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},Yn={color:[J.Singapore,"lrt","#708573",U.white]},Uy=r=>{const e=[{type:"custom",label:"color",component:f.jsx(re,{type:$.LRTSingleColor,defaultTheme:Yn.color})}];return f.jsx(ne,{fields:e})},Vy={component:Gy,defaultAttrs:Yn,attrsComponent:Uy,metadata:{displayName:"panel.details.lines.lrtSingleColor.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},Wy=r=>{const{id:e,path:n,handlePointerDown:i}=r,o=j.useCallback(a=>i(e,a),[e,i]);return f.jsx("g",{id:"".concat(e,".pre"),onPointerDown:o,cursor:"pointer",children:f.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"7.5",strokeLinecap:"round"})})},Hy=r=>{const{id:e,path:n,handlePointerDown:i}=r,o=j.useCallback(a=>i(e,a),[e,i]);return f.jsx("g",{id:e,onPointerDown:o,cursor:"pointer",children:f.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"2.5",strokeLinecap:"round"})})},Jy={},Ky=()=>{},qy={component:Hy,preComponent:Wy,defaultAttrs:Jy,attrsComponent:Ky,metadata:{displayName:"panel.details.lines.londonTubeInternalInt.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},Yy=r=>{const{id:e,path:n,handlePointerDown:i}=r,o=j.useCallback(a=>i(e,a),[e,i]);return f.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"5",strokeDasharray:"5 2.5",cursor:"pointer",onPointerDown:o})},Zy={},Qy=()=>{},Xy={component:Yy,defaultAttrs:Zy,attrsComponent:Qy,metadata:{displayName:"panel.details.lines.londonTube10MinWalk.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},eb=r=>{const{id:e,path:n,styleAttrs:i,handlePointerDown:o}=r,{color:a=Zn.color}=i!=null?i:Zn,s=j.useCallback(l=>o(e,l),[e,o]);return f.jsx("path",{id:e,d:n,fill:"none",stroke:a[2],strokeWidth:"5",cursor:"pointer",onPointerDown:s})},Zn={color:[J.London,"central","#DC241F",U.white]},tb=r=>{const{t:e}=X(),n=[{type:"custom",label:e("color"),component:f.jsx(re,{type:$.LondonTubeTerminal,defaultTheme:Zn.color})}];return f.jsx(ne,{fields:n})},nb={component:eb,defaultAttrs:Zn,attrsComponent:tb,metadata:{displayName:"panel.details.lines.londonTubeTerminal.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},rb=r=>{const{id:e,path:n,styleAttrs:i,handlePointerDown:o}=r,{colorBackground:a=st.colorBackground,colorForeground:s=st.colorForeground,limitedService:l=st.limitedService}=i!=null?i:st,u=j.useCallback(c=>o(e,c),[e,o]);return l?f.jsxs("g",{id:e,onPointerDown:u,cursor:"pointer",children:[f.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),f.jsx("path",{d:n,fill:"none",stroke:s[2],strokeWidth:"4.25",strokeLinecap:"round"}),f.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"2",strokeDasharray:"7 3"})]}):f.jsxs("g",{id:e,onPointerDown:u,cursor:"pointer",children:[f.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),f.jsx("path",{d:n,fill:"none",stroke:s[2],strokeWidth:"2",strokeDasharray:"7 3"})]})},st={colorBackground:[J.London,"thameslink","#d28db0",U.white],colorForeground:[J.London,"white","#ffffff",U.black],limitedService:!1},ib=r=>{const{id:e,attrs:n,handleAttrsUpdate:i}=r,{t:o}=X(),a=[{type:"switch",label:o("panel.details.lines.londonRail.limitedService"),oneLine:!0,isChecked:n.limitedService,onChange:s=>{n.limitedService=s,i(e,n)},minW:"full"},{type:"custom",label:o("panel.details.lines.londonRail.colorBackground"),component:f.jsx(re,{type:$.LondonRail,colorKey:"colorBackground",defaultTheme:st.colorBackground})},{type:"custom",label:o("panel.details.lines.londonRail.colorForeground"),component:f.jsx(re,{type:$.LondonRail,colorKey:"colorForeground",defaultTheme:st.colorForeground})}];return f.jsx(ne,{fields:a})},ob={component:rb,defaultAttrs:st,attrsComponent:ib,metadata:{displayName:"panel.details.lines.londonRail.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},ab=r=>{const{id:e,path:n,styleAttrs:i,handlePointerDown:o}=r,{color:a=Ct.color}=i!=null?i:Ct,s=j.useCallback(l=>o(e,l),[e,o]);return f.jsx("g",{id:"".concat(e,".pre"),onPointerDown:s,cursor:"pointer",children:f.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5"})})},sb=r=>{const{id:e,path:n,styleAttrs:i,handlePointerDown:o}=r,{color:a=Ct.color}=i!=null?i:Ct,s=j.useCallback(l=>o(e,l),[e,o]);return f.jsx("g",{id:e,onPointerDown:s,cursor:"pointer",children:f.jsx("path",{d:n,fill:"none",stroke:a[3],strokeWidth:"1.67",strokeLinecap:"round"})})},Ct={color:[J.London,"elizabeth","#9364cc",U.white]},lb=r=>{const{t:e}=X(),n=[{type:"custom",label:e("color"),component:f.jsx(re,{type:$.LondonSandwich,defaultTheme:Ct.color})}];return f.jsx(ne,{fields:n})},ub={component:sb,preComponent:ab,defaultAttrs:Ct,attrsComponent:lb,metadata:{displayName:"panel.details.lines.londonSandwich.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},cb=r=>{const{id:e,path:n,styleAttrs:i,handlePointerDown:o}=r,{color:a=Qn.color}=i!=null?i:Qn,s=j.useCallback(l=>o(e,l),[e,o]);return f.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[f.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),f.jsx("path",{d:n,fill:"none",stroke:a[3],strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"0.001 6"})]})},Qn={color:[J.London,"rail","#d6ae00",U.white]},db=r=>{const{t:e}=X(),n=[{type:"custom",label:e("color"),component:f.jsx(re,{type:$.LondonLutonAirportDART,defaultTheme:Qn.color})}];return f.jsx(ne,{fields:n})},hb={component:cb,defaultAttrs:Qn,attrsComponent:db,metadata:{displayName:"panel.details.lines.londonLutonAirportDART.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},pb=r=>{const{id:e,path:n,styleAttrs:i,handlePointerDown:o}=r,{color:a=Xn.color}=i!=null?i:Xn,s=j.useCallback(l=>o(e,l),[e,o]);return f.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[f.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5"}),f.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"3"}),f.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"1"})]})},Xn={color:[J.London,"dangleway","#dc241f",U.white]},fb=r=>{const{t:e}=X(),n=[{type:"custom",label:e("color"),component:f.jsx(re,{type:$.LondonIFSCloudCableCar,defaultTheme:Xn.color})}];return f.jsx(ne,{fields:n})},gb={component:pb,defaultAttrs:Xn,attrsComponent:fb,metadata:{displayName:"panel.details.lines.londonIFSCloudCableCar.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},mb=r=>{const{id:e,path:n,styleAttrs:i,handlePointerDown:o}=r,{color:a=zr.color}=i!=null?i:zr,s=j.useCallback(l=>o(e,l),[e,o]);return f.jsxs("g",{id:e,onPointerDown:s,cursor:"pointer",children:[f.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),f.jsx("path",{d:n,fill:"none",stroke:a[3],strokeWidth:"2.5",strokeDasharray:"7.5"})]})},zr={color:[J.Guangzhou,"ir","#2559a8",U.white]},yb=()=>{},bb={component:mb,defaultAttrs:zr,attrsComponent:yb,metadata:{displayName:"panel.details.lines.guangdongIntercityRailway.displayName",supportLinePathType:[S.Diagonal,S.Perpendicular,S.RotatePerpendicular]}},La={[S.Diagonal]:hm,[S.Perpendicular]:mm,[S.RotatePerpendicular]:vm,[S.Simple]:qh},wb={[$.SingleColor]:_m,[$.ShmetroVirtualInt]:km,[$.ShanghaiSuburbanRailway]:jm,[$.GzmtrVirtualInt]:zm,[$.GZMTRLoop]:Vm,[$.ChinaRailway]:Jm,[$.BjsubwaySingleColor]:Ym,[$.BjsubwayTram]:ey,[$.BjsubwayDotted]:_y,[$.DualColor]:iy,[$.River]:ly,[$.MTRRaceDays]:hy,[$.MTRLightRail]:my,[$.MTRUnpaidArea]:vy,[$.MTRPaidArea]:Ry,[$.MRTUnderConstruction]:Ty,[$.MRTSentosaExpress]:Py,[$.JREastSingleColor]:Iy,[$.JREastSingleColorPattern]:Fy,[$.LRTSingleColor]:Vy,[$.LondonTubeTerminal]:nb,[$.LondonTubeInternalInt]:qy,[$.LondonTube10MinWalk]:Xy,[$.LondonRail]:ob,[$.LondonSandwich]:ub,[$.LondonLutonAirportDART]:hb,[$.LondonIFSCloudCableCar]:gb,[$.GuangdongIntercityRailway]:bb},vb=43,Xi=async()=>JSON.stringify((await Tt(async()=>{const{default:r}=await import("./tutorial-47WRWsqk.js");return{default:r}},[])).default),xb=async r=>{let e=!1;r||(r=await Xi(),e=!0);let n=JSON.parse(r);(!("version"in n)||!Number.isInteger(n.version))&&(n=JSON.parse(await Xi()),e=!0);let i=Number(n.version),o=JSON.stringify(n);for(;i in eo;)o=eo[i](o),i=Number(JSON.parse(o).version),e=!0;return e&&(console.warn("Upgrade save from version: ".concat(n.version," to version: ").concat(i)),localStorage.setItem(Se.PARAM_BACKUP,r)),o},Sb=r=>{const{present:e,past:n,future:i,...o}=r,a={...o,graph:e,version:vb};return JSON.stringify(a)},eo={0:r=>{var e;return JSON.stringify({version:1,graph:(e=JSON.parse(r))==null?void 0:e.graph,svgViewBoxZoom:100,svgViewBoxMin:{x:0,y:0}})},1:r=>{const e=JSON.parse(r),n=new Q;return n.import(e==null?void 0:e.graph),n.filterNodes((i,o)=>i.startsWith("stn")&&o.type!==G.GzmtrInt).forEach(i=>{const o=n.getNodeAttribute(i,"type"),a=n.getNodeAttribute(i,o);a&&"transfer"in a&&delete a.transfer,n.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:2,graph:n.export()})},2:r=>{const e=JSON.parse(r),n=new Q;return n.import(e==null?void 0:e.graph),n.filterNodes((i,o)=>i.startsWith("stn")).forEach(i=>{const o=n.getNodeAttribute(i,"type"),a=n.getNodeAttribute(i,o);(a==null?void 0:a.nameOffsetX)==="middle"&&(a==null?void 0:a.nameOffsetY)==="middle"&&(a.nameOffsetX="right",a.nameOffsetY="top"),(a==null?void 0:a.nameOffsetY)==="up"&&(a.nameOffsetY="top"),n.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:3,graph:n.export()})},3:r=>{const e=JSON.parse(r),n=new Q;return n.import(e==null?void 0:e.graph),n.filterEdges((i,o,a,s,l,u,c)=>i.startsWith("line")).forEach(i=>{const o=n.getEdgeAttribute(i,"color");n.removeEdgeAttribute(i,"color"),n.mergeEdgeAttributes(i,{style:$.SingleColor,[$.SingleColor]:{color:o}})}),n.filterEdges((i,o,a,s,l,u,c)=>i.startsWith("misc_edge")).forEach(i=>{const o="line_".concat(Wh(10)),[a,s]=n.extremities(i),l=n.getEdgeAttribute(i,"type"),u=l;n.addDirectedEdgeWithKey(o,a,s,{visible:!0,zIndex:0,type:S.Simple,[l]:structuredClone(La[S.Simple].defaultAttrs),style:u,[u]:structuredClone(wb[u].defaultAttrs),reconcileId:""}),n.dropEdge(i)}),JSON.stringify({...e,version:4,graph:n.export()})},4:r=>{const e=JSON.parse(r),n=new Q;return n.import(e==null?void 0:e.graph),n.filterNodes((i,o)=>i.startsWith("stn")&&(o.type===G.GzmtrBasic||o.type===G.GzmtrInt)).forEach(i=>{const o=n.getNodeAttribute(i,"type"),a=n.getNodeAttribute(i,o);a.open=!0,a.secondaryNames=["",""],n.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:5,graph:n.export()})},5:r=>{const e=JSON.parse(r),n=new Q;return n.import(e==null?void 0:e.graph),n.filterEdges((i,o,a,s,l,u,c)=>i.startsWith("line")&&o.type===S.Simple).forEach(i=>{var a;const o=(a=n.getEdgeAttribute(i,S.Simple))!=null?a:{offset:0};o.offset=0,n.mergeEdgeAttributes(i,{[S.Simple]:o})}),JSON.stringify({...e,version:6,graph:n.export()})},6:r=>{const e=JSON.parse(r),n=new Q;return n.import(e==null?void 0:e.graph),n.filterNodes((i,o)=>i.startsWith("stn")&&o.type===G.GzmtrBasic).forEach(i=>{const o=n.getNodeAttribute(i,"type"),a=n.getNodeAttribute(i,o);a.tram=!1,n.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:7,graph:n.export()})},7:r=>JSON.stringify({...JSON.parse(r),version:8}),8:r=>JSON.stringify({...JSON.parse(r),version:9}),9:r=>JSON.stringify({...JSON.parse(r),version:10}),10:r=>{const e=JSON.parse(r),n=new Q;return n.import(e==null?void 0:e.graph),n.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===Oe.Text).forEach(i=>{const o=n.getNodeAttribute(i,"type"),a=n.getNodeAttribute(i,o);a.color=[J.Shanghai,"jsr","#000000",U.white],n.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:11,graph:n.export()})},11:r=>JSON.stringify({...JSON.parse(r),version:12}),12:r=>{const e=JSON.parse(r),n=new Q;return n.import(e==null?void 0:e.graph),n.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===Oe.Text).forEach(i=>{const o=n.getNodeAttribute(i,"type"),a=n.getNodeAttribute(i,o);a.rotate=0,a.italic=!1,n.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:13,graph:n.export()})},13:r=>JSON.stringify({...JSON.parse(r),version:14}),14:r=>JSON.stringify({...JSON.parse(r),version:15}),15:r=>{const e=JSON.parse(r),n=new Q;return n.import(e==null?void 0:e.graph),n.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===Oe.Text).forEach(i=>{const o=n.getNodeAttribute(i,"type"),a=n.getNodeAttribute(i,o);a.italic=a.italic?"italic":"normal",a.bold="normal",n.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:16,graph:n.export()})},16:r=>{const e=JSON.parse(r),n=new Q;return n.import(e==null?void 0:e.graph),n.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===Oe.Facilities).forEach(i=>{const o=n.getNodeAttribute(i,"type"),a=n.getNodeAttribute(i,o);let s=0;switch(a.type){case"airport":case"maglev":case"disney":case"railway":s+=25/2;break;case"hsr":case"airport_hk":case"disney_hk":s+=19/2;break}n.updateNodeAttribute(i,"y",l=>(l!=null?l:0)+s)}),JSON.stringify({...e,version:17,graph:n.export()})},17:r=>JSON.stringify({...JSON.parse(r),version:18}),18:r=>JSON.stringify({...JSON.parse(r),version:19}),19:r=>JSON.stringify({...JSON.parse(r),version:20}),20:r=>JSON.stringify({...JSON.parse(r),version:21}),21:r=>JSON.stringify({...JSON.parse(r),version:22}),22:r=>JSON.stringify({...JSON.parse(r),version:23}),23:r=>JSON.stringify({...JSON.parse(r),version:24}),24:r=>{const e=JSON.parse(r),n=new Q;return n.import(e.graph),n.filterNodes((i,o)=>i.startsWith("stn")&&o.type===G.GzmtrInt||i.startsWith("misc_node")&&o.type===Oe.GzmtrLineBadge).forEach(i=>{const o=n.getNodeAttribute(i,"type"),a=n.getNodeAttribute(i,o);a.tram=!1,n.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:25,graph:n.export()})},25:r=>JSON.stringify({...JSON.parse(r),version:26}),26:r=>{const e=JSON.parse(r),n=new Q;return n.import(e==null?void 0:e.graph),n.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===Oe.GzmtrLineBadge).forEach(i=>{const o=n.getNodeAttribute(i,"type"),a=n.getNodeAttribute(i,o);a.span=!0,n.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:27,graph:n.export()})},27:r=>{const e=JSON.parse(r),n=new Q;return n.import(e==null?void 0:e.graph),n.filterNodes((i,o)=>i.startsWith("stn")&&o.type===G.GzmtrInt).forEach(i=>{const o=n.getNodeAttribute(i,"type"),a=n.getNodeAttribute(i,o);for(let s=0;sJSON.stringify({...JSON.parse(r),version:29}),29:r=>JSON.stringify({...JSON.parse(r),version:30}),30:r=>JSON.stringify({...JSON.parse(r),version:31}),31:r=>{const e=JSON.parse(r),n=new Q;return n.import(e==null?void 0:e.graph),n.filterEdges((i,o)=>o.style===$.ChinaRailway).forEach(i=>{const o=n.getEdgeAttributes(i)[$.ChinaRailway];n.mergeEdgeAttributes(i,{[$.ChinaRailway]:{...o,color:[J.Shanghai,"jsr","#000000",U.white]}})}),JSON.stringify({...e,version:32,graph:n.export()})},32:r=>JSON.stringify({...JSON.parse(r),version:33}),33:r=>{const e=JSON.parse(r),n=new Q;return n.import(e==null?void 0:e.graph),n.forEachDirectedEdge(i=>{n.setEdgeAttribute(i,"parallelIndex",-1),n.updateEdgeAttribute(i,"zIndex",o=>Math.max(-10,(o!=null?o:0)-5))}),n.forEachNode(i=>{n.updateNodeAttribute(i,"zIndex",o=>Math.min(10,(o!=null?o:0)+5))}),JSON.stringify({...e,version:34,graph:n.export()})},34:r=>JSON.stringify({...JSON.parse(r),version:35}),35:r=>JSON.stringify({...JSON.parse(r),version:36}),36:r=>JSON.stringify({...JSON.parse(r),version:37}),37:r=>JSON.stringify({...JSON.parse(r),version:38}),38:r=>JSON.stringify({...JSON.parse(r),version:39}),39:r=>{const e=JSON.parse(r),n=new Q;return n.import(e==null?void 0:e.graph),n.filterNodes((i,o)=>i.startsWith("misc_node")&&o.type===Oe.Facilities).forEach(i=>{const o=n.getNodeAttribute(i,"type"),a=n.getNodeAttribute(i,o);a.type==="qingdao_airport"?a.type="airport_qingdao":a.type==="qingdao_coach_station"?a.type="coach_station_qingdao":a.type==="qingdao_cruise_terminal"?a.type="cruise_terminal_qingdao":a.type==="qingdao_railway"?a.type="railway_qingdao":a.type==="qingdao_tram"&&(a.type="tram_qingdao"),n.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:40,graph:n.export()})},40:r=>JSON.stringify({...JSON.parse(r),version:41}),41:r=>{const e=JSON.parse(r),n=new Q;n.import(e==null?void 0:e.graph);const i=o=>o.map(a=>a.replaceAll("\\","\n"));return n.forEachNode((o,a)=>{const s=n.getNodeAttribute(o,"type");let l;(s===G.BjsubwayBasic||s===G.BjsubwayInt||s===G.FoshanMetroBasic||s===G.GuangdongIntercityRailway||s===G.GzmtrBasic||s===G.GzmtrInt||s===G.JREastBasic||s===G.JREastImportant||s===G.KunmingRTBasic||s===G.KunmingRTInt||s===G.MRTBasic||s===G.MRTInt||s===G.MTR||s===G.ShanghaiSuburbanRailway||s===G.ShmetroBasic2020||s===G.ShmetroBasic||s===G.ShmetroInt||s===G.ShmetroOutOfSystemInt||s===G.SuzhouRTBasic||s===G.SuzhouRTInt||s===G.TokyoMetroBasic||s===G.TokyoMetroInt)&&(l=i(a[s].names)),l&&(a[s].names=l,n.mergeNodeAttributes(o,a))}),JSON.stringify({...e,version:42,graph:n.export()})},42:r=>{const e=JSON.parse(r),n=new Q;return n.import(e==null?void 0:e.graph),n.filterNodes((i,o)=>i.startsWith("stn")&&o.type===G.GzmtrInt2024).forEach(i=>{const o=n.getNodeAttribute(i,"type"),a=n.getNodeAttribute(i,o);a.columns=2,a.topHeavy=!1,a.osiPosition="none",a.preferVertical&&a.transfer.flat().length===2&&(a.columns=1),delete a.preferVertical,n.mergeNodeAttributes(i,{[o]:a})}),JSON.stringify({...e,version:43,graph:n.export()})}};Es();const Nb=Ts({account:Mh,app:Kg,param:Qg,runtime:sm}),Rb=(r={})=>ks({reducer:Nb,middleware:e=>e({serializableCheck:!1}),preloadedState:r}),se=Rb();se.subscribe(async()=>{await Bh(se.getState().param.present),localStorage.setItem(Se.PARAM,Sb(se.getState().param)),localStorage.setItem(Se.APP,JSON.stringify(se.getState().app)),localStorage.setItem(Se.LOGIN_STATE,JSON.stringify(se.getState().account))});const ct=()=>_s(),ar=Ls,Cb=j.lazy(()=>Tt(()=>import("./page-header-DH4nmP-r.js"),__vite__mapDeps([0,1,2,3,4]))),Ab=j.lazy(()=>Tt(()=>import("./tools-D91kC9Kf.js"),__vite__mapDeps([5,1,2,6,3]))),_b=j.lazy(()=>Tt(()=>import("./svg-wrapper-DsHbu_ep.js"),__vite__mapDeps([7,1,2,3,8,6]))),Lb=j.lazy(()=>Tt(()=>import("./details-BjKL7_V5.js"),__vite__mapDeps([9,1,2,8,3,4,5,6]))),Eb=j.lazy(()=>Tt(()=>import("./rmg-palette-app-clip-D4KwJcU-.js"),__vite__mapDeps([10,1,2])));function Tb(){const r=ct(),{paletteAppClip:{input:e}}=ar(a=>a.runtime),{t:n}=X(),[i,o]=j.useState(!1);return j.useEffect(()=>{xe.isStandaloneWindow()&&!window.localStorage.getItem(Se.DO_NOT_SHOW_RMT_MSG)&&o(!0)},[]),f.jsx(Ch,{children:f.jsx(Yd,{children:f.jsxs(j.Suspense,{fallback:f.jsx("p",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:"Rail Map Painter protocol... checked"}),children:[f.jsx(Cb,{}),i&&f.jsxs(Br,{status:"info",variant:"solid",size:"xs",pl:3,pr:1,py:1,zIndex:"1",children:[f.jsx(Fr,{}),f.jsxs(Ze,{children:[f.jsx(Ht,{href:"/?app=rmp",isExternal:!0,fontWeight:"bold",children:n("rmtPromotion")})," ",f.jsx(Ht,{as:"button",ml:"auto",textDecoration:"underline",onClick:()=>o(!1),children:n("close")})," | ",f.jsx(Ht,{as:"button",textDecoration:"underline",onClick:()=>{o(!1),window.localStorage.setItem(Se.DO_NOT_SHOW_RMT_MSG,"true")},children:n("noShowAgain")})]})]}),f.jsx(Bd,{allowReset:!0,children:f.jsxs(ke,{direction:"row",height:"100%",overflow:"hidden",sx:{position:"relative"},children:[f.jsx(Ab,{}),f.jsx(_b,{}),f.jsx(Lb,{})]})}),f.jsx(Eb,{isOpen:!!e,onClose:()=>r(om()),defaultTheme:e,onSelect:a=>r(am(a))})]})})})}const kb=()=>{Nc.createRoot(document.getElementById("root")).render(f.jsx(j.StrictMode,{children:f.jsx(Os,{store:se,children:f.jsx(Ms,{i18n:nn,children:f.jsx(Tb,{})})})}))};var to;const wn=JSON.parse((to=localStorage.getItem(Se.LOGIN_STATE))!=null?to:"{}");var no;const fe=JSON.parse((no=localStorage.getItem(Se.APP))!=null?no:"{}"),Ob=localStorage.getItem(Se.PARAM);"telemetry"in fe&&("app"in fe.telemetry&&se.dispatch(Ug(fe.telemetry.app)),"project"in fe.telemetry&&se.dispatch(Vg(fe.telemetry.project))),"preference"in fe&&("unlockSimplePathAttempts"in fe.preference&&se.dispatch(Wg(fe.preference.unlockSimplePathAttempts)),"toolsPanel"in fe.preference&&"expand"in fe.preference.toolsPanel&&se.dispatch(Hg(fe.preference.toolsPanel.expand)),"autoParallel"in fe.preference&&se.dispatch(va(fe.preference.autoParallel)),"randomStationsNames"in fe.preference&&se.dispatch(Jg(fe.preference.randomStationsNames))),"state"in wn&&se.dispatch(Qt(wn.state)),"activeSubscriptions"in wn&&se.dispatch($n(wn.activeSubscriptions));xb(Ob).then(r=>{const{version:e,graph:n,...i}=JSON.parse(r);window.graph=Q.from(n);const o={...i,present:n,past:[],future:[]};se.dispatch(Zg(o)),se.dispatch(Dn()),se.dispatch(Rt()),kb(),xe.injectUITools(),Uh(se),Yi(),window.setInterval(()=>Yi(),15*60*1e3)});export{Bg as $,cw as A,ha as B,J as C,Uw as D,Eh as E,Cw as F,Fw as G,Qw as H,Xi as I,zh as J,Se as K,iw as L,U as M,tt as N,_w as O,Gd as P,Ib as Q,Ub as R,G as S,ai as T,Zb as U,Rm as V,im as W,Wg as X,qb as Y,Zw as Z,Yi as _,Mb as __vite_legacy_guard,Gw as a,Nw as a$,zg as a0,mw as a1,va as a2,Th as a3,Ow as a4,Kw as a5,Ww as a6,Jw as a7,Hw as a8,tw as a9,Qb as aA,Oe as aB,_m as aC,Yh as aD,Db as aE,jw as aF,Vd as aG,Vb as aH,Wb as aI,Hb as aJ,Jb as aK,vw as aL,yw as aM,Yw as aN,qw as aO,Sw as aP,Hg as aQ,an as aR,re as aS,ow as aT,nn as aU,Lh as aV,_h as aW,xw as aX,zb as aY,Mw as aZ,Pw as a_,Jg as aa,Vg as ab,Tw as ac,kw as ad,Xe as ae,Gb as af,Bb as ag,Bw as ah,$w as ai,Ew as aj,Lw as ak,Rw as al,xa as am,Sa as an,ww as ao,bw as ap,Kb as aq,ii as ar,aw as as,sw as at,wb as au,gw as av,Yb as aw,fw as ax,hw as ay,dw as az,Aw as b,Iw as b0,Cd as b1,Kd as b2,nw as b3,rw as b4,ct as c,ar as d,Xb as e,zw as f,Dw as g,Vw as h,ne as i,si as j,S as k,$ as l,lw as m,Wh as n,La as o,ew as p,Dn as q,xe as r,Sb as s,Rt as t,Fb as u,vt as v,$b as w,xb as x,pw as y,uw as z}; diff --git a/assets/index-legacy-CKg3D7KT.js b/assets/index-legacy-CKg3D7KT.js deleted file mode 100644 index 2f212e4a..00000000 --- a/assets/index-legacy-CKg3D7KT.js +++ /dev/null @@ -1,10 +0,0 @@ -System.register(["./chakra-legacy-DsJcG_7N.js","./react-legacy-S3BmMPiz.js"],(function(e,n){"use strict";var r,o,i,a,s,l,d,c,u,p,h,g,f,m,y,b,v,w,x,S,k,N,R,_,T,C,j,L,A,O,E,M,P,I,$,z,B,D,G,F,W,U,V,H,J,q,K,Y,Q,Z,X,ee,te,ne,re,oe,ie,ae,se,le,de,ce,ue,pe,he,ge,fe,me,ye,be,ve,we,xe,Se,ke,Ne,Re,_e,Te,Ce,je,Le,Ae,Oe,Ee,Me,Pe,Ie,$e,ze,Be,De,Ge,Fe,We,Ue,Ve,He,Je,qe;return{setters:[e=>{r=e.u,o=e.a,i=e.j,a=e.P,s=e.c,l=e.F,d=e.b,c=e.f,u=e.n,p=e.r,h=e.d,g=e.e,f=e.i,m=e.o,y=e.g,b=e.B,v=e.D,w=e.I,x=e.h,S=e.k,k=e.S,N=e.l,R=e.W,_=e.m,T=e.p,C=e.q,j=e.C,L=e.s,A=e.t,O=e.v,E=e.w,M=e.x,P=e.y,I=e.z,$=e.A,z=e.E,B=e.G,D=e.H,G=e.J,F=e.K,W=e.L,U=e.M,V=e.T,H=e.N,J=e.O,q=e.Q,K=e.R,Y=e.U,Q=e.V,Z=e.X,X=e.Y,ee=e.Z,te=e._,ne=e.$,re=e.a0,oe=e.a1,ie=e.a2,ae=e.a3,se=e.a4,le=e.a5,de=e.a6,ce=e.a7,ue=e.a8,pe=e.a9,he=e.aa,ge=e.ab,fe=e.ac,me=e.ad,ye=e.ae,be=e.af,ve=e.ag,we=e.ah,xe=e.ai,Se=e.aj,ke=e.ak,Ne=e.al,Re=e.am,_e=e.an,Te=e.ao,Ce=e.ap,je=e.aq,Le=e.ar,Ae=e.as},e=>{Oe=e.g,Ee=e.a,Me=e.r,Pe=e.b,Ie=e.d,$e=e.u,ze=e.i,Be=e.o,De=e.e,Ge=e.f,Fe=e.h,We=e.j,Ue=e.k,Ve=e.l,He=e.m,Je=e.P,qe=e.I}],execute:function(){var Ke,Ye,Qe=document.createElement("style");Qe.textContent=":root{background-color:#fff}@media (prefers-color-scheme: dark){:root{background-color:#1a202c;color:#fff}}html{height:100%}body{margin:0;overflow:hidden;height:100%;width:100%;width:-webkit-fill-available;padding:env(safe-area-inset-top,20px) env(safe-area-inset-right,20px) env(safe-area-inset-bottom,20px) env(safe-area-inset-left,20px)}div#root{height:100%;width:100%}*{box-sizing:border-box}.tools::-webkit-scrollbar{display:none}.tools{-ms-overflow-style:none;scrollbar-width:none}.rmp-name-outline{paint-order:stroke;stroke:#fff;stroke-linejoin:round}\n/*$vite$:1*/",document.head.appendChild(Qe),e({D:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 20h14v-2H5v2zm0-10h4v6h6v-6h4l-7-7-7 7z"},child:[]}]})(e)},F:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 14h-3v3h-2v-3H8v-2h3v-3h2v3h3v2zm-3-7V3.5L18.5 9H13z"},child:[]}]})(e)},G:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"},child:[]}]})(e)},H:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3 1 9l11 6 9-4.91V17h2V9L12 3z"},child:[]}]})(e)},O:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)},Q:function(e){var t=e.data,n=e.displayHandler,r=e.filter,o=e.value,a=e.onChange,s=e.InputProps,l=e.InputPropsByState,d=e.ListProps,c=e.ItemProps,u=Vs(e,["data","displayHandler","filter","value","onChange","InputProps","InputPropsByState","ListProps","ItemProps"]);return i.jsx(_i,Us({value:o,filter:function(e,n){if(r){var o=t.find((function(e){return e.id===n}));return!!o&&r(e,o)}},onChange:function(e,t){return null==a?void 0:a(t.originalValue)},suggestWhenEmpty:!0,openOnFocus:!0},u,{children:function(e){var r,a=e.isOpen;return i.jsxs(i.Fragment,{children:[i.jsx(Hs,Us({variant:"flushed",size:"sm",h:6,autoComplete:"off",value:o},null!==(r=null==l?void 0:l(a))&&void 0!==r?r:s)),i.jsx(Ps,Us({role:"menu",py:1},d,{children:t.map((function(e){return i.jsx(Ti,Us({value:e,label:e.value,role:"menuitem",fontSize:"sm",p:1,mx:1},c,{children:n?n(e):e.value}),e.id)}))}))]})}}))},V:xu,Z:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(e)},a:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"},child:[]}]})(e)},a$:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"},child:[]}]})(e)},a4:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M13 7h9v2h-9zM13 15h9v2h-9zM16 11h6v2h-6zM13 12 8 7v4H2v2h6v4z"},child:[]}]})(e)},a5:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"},child:[]}]})(e)},a6:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"},child:[]}]})(e)},a7:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)},a8:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"},child:[]}]})(e)},aE:function(e){var t=e.selections,n=e.defaultValue,r=e.onChange,o=e.multiSelect,a=Js(Me.useState(n),2),s=a[0],l=a[1];return Me.useEffect((function(){n.toString()&&l(n)}),[n.toString()]),i.jsx(H,{size:"xs",isAttached:!0,colorScheme:"primary",variant:"outline",children:t.map((function(e,n){var a="object"==typeof s&&s.includes(e.value)||s===e.value,d=n===t.length-1||a?void 0:"-px";return i.jsx(J,{role:"checkbox","aria-checked":a,variant:a?"solid":"outline",mr:d,flex:1,isDisabled:e.disabled,onClick:function(){return function(e){if(o){var t=s,n=t.includes(e)?t.filter((function(t){return t!==e})):qs(qs([],Js(t),!1),[e],!1);l(n),null==r||r(n)}else l(e),null==r||r(e)}(e.value)},children:e.label},e.value.toString())}))})},aF:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 13h2v-2H3v2zm4 8h2v-2H7v2zm6-18h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zm8 4h2v-2h-2v2zm8-8h2v-2h-2v2zm0-4h2V7h-2v2zm-4-4h2V3h-2v2zM7.83 5 7 4.17V3h2v2H7.83zm12 12-.83-.83V15h2v2h-1.17zm1.36 4.19L2.81 2.81 1.39 4.22 4.17 7H3v2h2V7.83l2 2V17h7.17l2 2H15v2h2v-1.17l2.78 2.78 1.41-1.42zM9 15v-3.17L12.17 15H9zm6-2.83V9h-3.17l-2-2H17v7.17l-2-2z"},child:[]}]})(e)},aG:Rl,aN:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(e)},aO:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)},aP:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"},child:[]}]})(e)},aZ:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"},child:[]}]})(e)},a_:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},child:[]}]})(e)},ac:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]},{tag:"path",attr:{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"},child:[]}]})(e)},ad:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"},child:[]}]})(e)},ag:function(e){var t=e.environment,n=e.version,r=e.popoverHeader,o=e.popoverBody,a=ol(Me.useState(!1),2),s=a[0],l=a[1];return i.jsxs(h,{isOpen:s,onOpen:function(){return r&&l(!0)},onClose:function(){return l(!1)},children:[i.jsx(K,{children:i.jsx(Y,{ml:1,colorScheme:il(t),title:"".concat(t,": ").concat(n),cursor:r?"pointer":"help",children:t===nt.PRD?n:t})}),i.jsxs(C,{children:[i.jsx(Q,{}),i.jsx(Z,{}),i.jsx(X,{children:r}),i.jsx(ee,{children:o})]})]})},ah:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"},child:[]}]})(e)},ai:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 0 1 7.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"},child:[]}]})(e)},aj:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12.87 15.07-2.54-2.51.03-.03A17.52 17.52 0 0 0 14.07 6H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7 1.62-4.33L19.12 17h-3.24z"},child:[]}]})(e)},ak:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.488.488 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"},child:[]}]})(e)},al:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},child:[]}]})(e)},b:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"},child:[]}]})(e)},b0:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 13H5v-2h14v2z"},child:[]}]})(e)},b2:Al,f:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"},child:[]}]})(e)},g:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 12.4V7l-4-4H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7.4l8.6-8.6zM15 15c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zM6 6h9v4H6V6zm13.99 10.25 1.77 1.77L16.77 23H15v-1.77l4.99-4.98zm3.26.26-.85.85-1.77-1.77.85-.85c.2-.2.51-.2.71 0l1.06 1.06c.2.2.2.52 0 .71z"},child:[]}]})(e)},h:function(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"},child:[]}]})(e)},i:El});var Ze=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Xe=e=>new Promise((t=>{setTimeout(t,e,`Timeout after ${e/1e3} seconds`)})),et=e=>{let t=0;for(let n=0;n{const t=(16777215&e).toString(16).toUpperCase();return"#"+"00000".substring(0,6-t.length)+t};var nt;e("ae",nt),function(e){e.DEV="DEV",e.UAT="UAT",e.PRD="PRD"}(nt||e("ae",nt={}));const rt="rmg-runtime__language",ot="rmg-runtime__colourMode",it="rmg-runtime__allowAnalytics",at="rmg-unknown";let st=at,lt=tt(et(at));const dt=()=>`[${st}]`,ct=()=>lt,ut=(e,t,n)=>(...r)=>{"string"==typeof r[0]?e(`%c${t()}%c ${r[0]}`,`color: ${n()}`,"",...r.slice(1)):e(`%c${t()}%c`,`color: ${n()}`,"",...r)},pt={debug:ut(console.debug,dt,ct),info:ut(console.info,dt,ct),warn:ut(console.warn,dt,ct),error:ut(console.error,dt,ct)},ht=()=>st===at?"[runtime]":`[runtime@${st}]`,gt=tt(et("runtime")),ft=()=>gt,mt={setup:e=>{st=e,lt=tt(et(e))},logger:pt,debug:ut(console.debug,ht,ft),info:ut(console.info,ht,ft),warn:ut(console.warn,ht,ft),error:ut(console.error,ht,ft),group:ut(console.group,ht,ft),groupEnd:console.groupEnd};var yt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};let bt,vt,wt,xt,St;const kt=()=>{bt=!1,vt=at,wt="unknown",xt=nt.PRD,St="unknown"},Nt=()=>"railmapgen.github.io"===vt;kt();const Rt={loadWithTimeout:()=>yt(void 0,void 0,void 0,(function*(){try{mt.group("Loading config...");const e=yield Promise.race([yt(void 0,void 0,void 0,(function*(){const e=window.location.pathname.split("/")[1],t=e?`/${e}/info.json`:"/info.json",n=yield fetch(t);if(!n.ok)throw new Error(`Failed to fetch config from ${t}`);{const e=yield n.json();mt.info("Received info.json",e),vt=e.component,wt=e.version,xt=e.environment,St=e.instance}})),Xe(1e4)]);e?mt.error("❌ Failed to load config.",e):(bt=!0,mt.info("✅ Config loaded!"))}catch(e){mt.error("❌ Failed to load config.",e)}finally{mt.groupEnd()}})),isInitialised:()=>bt,getComponent:()=>Nt()?"rmg-home":vt,getVersion:()=>wt,getEnvironment:()=>xt,getInstance:()=>St,isRMT:Nt,_resetConfig:kt};function _t(...e){if(Rt.getEnvironment()!==nt.DEV)return window.dataLayer.push(arguments);mt.info("Not going to send event in DEV environment",e)}window.dataLayer=window.dataLayer||[];const Tt={init:()=>{(()=>{const e=document.createElement("script");e.async=!0,e.src="https://www.googletagmanager.com/gtag/js?id=G-2HP8Y4MRRQ",document.head.append(e)})(),_t("js",new Date),_t("config","G-2HP8Y4MRRQ",{appName:Rt.getComponent(),version:Rt.getVersion(),environment:Rt.getEnvironment(),instance:Rt.getInstance()})},customEvent:(e,t={})=>{_t("event",e,t)}},Ct={};let jt;try{jt=new BroadcastChannel("rmg-runtime-channel"),jt.onmessage=e=>{var t;const{event:n,data:r,frameId:o}=e.data;null===(t=Ct[n])||void 0===t||t.forEach((e=>e(r,o)))}}catch(Hp){mt.warn("Failed to initiate broadcast channel. Some features may be unavailable.",Hp)}const Lt={postEvent:(e,t)=>{var n;mt.debug(`Broadcasting event ${e} with data`,t),null==jt||jt.postMessage({event:e,data:t,frameId:null===(n=window.frameElement)||void 0===n?void 0:n.id})},onMessage:(e,t)=>{var n;e in Ct?null===(n=Ct[e])||void 0===n||n.push(t):Ct[e]=[t]}},At="TOGGLE_NAV_MENU",Ot="OPEN_APP",Et="CLOSE_APP",Mt="UPDATE_APP_METADATA",Pt="UPDATE_URL",It=()=>!window.frameElement,$t={isStandaloneWindow:It,injectUITools:()=>{if(!It()){const e=document.createElement("style");e.textContent="body{padding: 0;}",document.head.appendChild(e)}const e=document.createElement("style");e.textContent=".rmg-window__header:not(.rmg-window__app-clip-header){margin-left: 40px;}",It()||(()=>{var e;return!!(null===(e=window.frameElement)||void 0===e?void 0:e.closest(".show-menu"))})()||document.head.appendChild(e),It()||Lt.onMessage(At,(t=>{if(t)try{document.head.removeChild(e)}catch(Hp){mt.warn("Unable to remove indent style from RmgWindowHeader",Hp)}else document.head.appendChild(e)}))},openApp:e=>{Lt.postEvent(Ot,e)},onAppOpen:e=>{Lt.onMessage(Ot,e)},closeApp:e=>{Lt.postEvent(Et,e)},onAppClose:e=>{Lt.onMessage(Et,e)},updateAppMetadata:e=>{Lt.postEvent(Mt,e)},onAppMetadataUpdate:e=>{Lt.onMessage(Mt,e)},updateUrl:e=>{Lt.postEvent(Pt,e)},onUrlUpdate:e=>{Lt.onMessage(Pt,e)},toggleNavMenu:e=>{Lt.postEvent(At,e)}},zt="SET_LANGUAGE",Bt="SET_COLOUR_MODE",Dt=["light","dark","system"],Gt=()=>"true"===window.localStorage.getItem(it),Ft={setLanguage:e=>{Lt.postEvent(zt,e),window.localStorage.setItem(rt,e)},getLanguage:()=>window.localStorage.getItem(rt)||"en",onLanguageChange:e=>{Lt.onMessage(zt,e)},setColourMode:e=>{Dt.includes(e)&&(Lt.postEvent(Bt,e),window.localStorage.setItem(ot,e))},getColourMode:()=>{const e=window.localStorage.getItem(ot);return e&&Dt.includes(e)?e:"system"},onColourModeChange:e=>{Lt.onMessage(Bt,e)},isAnalyticsQADone:()=>null!==window.localStorage.getItem(it),isAllowAnalytics:Gt,allowAnalytics:e=>{const t=Gt();return e?(t||(window.localStorage.setItem(it,e.toString()),Tt.init()),{refreshRequired:!1}):t?(window.localStorage.setItem(it,e.toString()),{refreshRequired:!0}):{refreshRequired:!1}}},Wt=(new Date).getTime(),Ut={getMsSinceStartUp:function(){const e=Rt.getComponent(),t=window.localStorage.getItem(e+"__startTime");return null===t?(new Date).getTime()-Wt:(new Date).getTime()-Number(t)}},Vt={},Ht=()=>{const e=Rt.getComponent();if(e===at)throw new Error("Unable to clear storage for unknown app");return e};window.addEventListener("storage",(e=>{var t;const{key:n,newValue:r}=e;n&&(null===(t=Vt[n])||void 0===t||t.forEach((e=>e(r))))}));const Jt={on:(e,t)=>{var n;const r=`${Ht()}__${e}`;r in Vt?null===(n=Vt[r])||void 0===n||n.push(t):Vt[r]=[t]},get:e=>{const t=Ht();return window.localStorage.getItem(`${t}__${e}`)},getAll:()=>{const e=Ht(),t={};let n=0;for(;n{const n=Ht();window.localStorage.setItem(`${n}__${e}`,t)},remove:e=>{const t=Ht();window.localStorage.removeItem(`${t}__${e}`)},clear:()=>{const e=Ht();let t=0;for(;t1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||qt,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{let[t,r]=e;for(let o=0;o{let[r,o]=t;for(let i=0;i{e=n,t=r}));return n.resolve=e,n.reject=t,n}function Xt(e){return null==e?"":""+e}const en=/###/g;function tn(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(en,"."):e}function o(){return!e||"string"==typeof e}const i="string"!=typeof t?t:t.split(".");let a=0;for(;a":">",'"':""","'":"'","/":"/"};function ln(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>sn[e])):e}const dn=[" ",",","?","!",";"],cn=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20);function un(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let i=0;i-1&&a0?e.replace("_","-"):e}class hn extends Qt{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):"string"==typeof n&&o?a.push(...n.split(o)):a.push(n)));const s=rn(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),s||!i||"string"!=typeof n?s:un(this.data&&this.data[e]&&this.data[e][t],n,o)}addResource(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),nn(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const o in n)("string"==typeof n[o]||Array.isArray(n[o]))&&this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=rn(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?on(s,n,o):s={...s,...n},nn(this.data,a,s),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var gn={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,o))})),t}};const fn={};class mn extends Qt{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),function(e,t,n){e.forEach((e=>{t[e]&&(n[e]=t[e])}))}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Yt.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";const r=dn.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const o=cn.getRegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i}(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],l=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(d){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:l,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:l,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:i}const c=this.resolve(e,t);let u=c&&c.res;const p=c&&c.usedKey||i,h=c&&c.exactUsedKey||i,g=Object.prototype.toString.apply(u),f=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject;if(m&&u&&"string"!=typeof u&&"boolean"!=typeof u&&"number"!=typeof u&&["[object Number]","[object Function]","[object RegExp]"].indexOf(g)<0&&("string"!=typeof f||!Array.isArray(u))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,u,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(o){const e=Array.isArray(u),n=e?[]:{},r=e?h:p;for(const i in u)if(Object.prototype.hasOwnProperty.call(u,i)){const e=`${r}${o}${i}`;n[i]=this.translate(e,{...t,joinArrays:!1,ns:a}),n[i]===e&&(n[i]=u[i])}u=n}}else if(m&&"string"==typeof f&&Array.isArray(u))u=u.join(f),u&&(u=this.extendTranslation(u,e,t,n));else{let r=!1,a=!1;const d=void 0!==t.count&&"string"!=typeof t.count,p=mn.hasDefaultValue(t),h=d?this.pluralResolver.getSuffix(l,t.count,t):"",g=t.ordinal&&d?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",f=d&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),m=f&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${h}`]||t[`defaultValue${g}`]||t.defaultValue;!this.isValidLookup(u)&&p&&(r=!0,u=m),this.isValidLookup(u)||(a=!0,u=i);const y=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:u,b=p&&m!==u&&this.options.updateMissing;if(a||r||b){if(this.logger.log(b?"updateKey":"missingKey",l,s,i,b?m:u),o){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t{const o=p&&r!==u?r:y;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,o,b,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,o,b,t),this.emit("missingKey",e,s,n,u)};this.options.saveMissing&&(this.options.saveMissingPlurals&&d?e.forEach((e=>{const n=this.pluralResolver.getSuffixes(e,t);f&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach((n=>{r([e],i+n,t[`defaultValue${n}`]||m)}))})):r(e,i,m))}u=this.extendTranslation(u,e,t,c,n),a&&u===i&&this.options.appendNamespaceToMissingKey&&(u=`${s}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(u="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,r?u:void 0):this.options.parseMissingKeyHandler(u))}return r?(c.res=u,c.usedParams=this.getUsedParamsDetails(t),c):u}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let l=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,n.lng||this.language,n),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),l=s.key;n=l;let d=s.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const c=void 0!==a.count&&"string"!=typeof a.count,u=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),p=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,h=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);d.forEach((e=>{this.isValidLookup(t)||(i=e,!fn[`${h[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(fn[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${h.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach((n=>{if(this.isValidLookup(t))return;o=n;const i=[l];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,l,n,e,a);else{let e;c&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(i.push(l+e),a.ordinal&&0===e.indexOf(r)&&i.push(l+e.replace(r,this.options.pluralSeparator)),u&&i.push(l+t)),p){const n=`${l}${this.options.contextSeparator}${a.context}`;i.push(n),c&&(i.push(n+e),a.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),u&&i.push(n+t))}}let s;for(;s=i.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&"string"!=typeof e.replace;let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}function yn(e){return e.charAt(0).toUpperCase()+e.slice(1)}class bn{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Yt.create("languageUtils")}getScriptPartFromCode(e){if(!(e=pn(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=pn(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map((e=>e.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=yn(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=yn(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=yn(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))})),r}}let vn=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],wn={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};const xn=["v1","v2","v3"],Sn=["v4"],kn={zero:0,one:1,two:2,few:3,many:4,other:5};class Nn{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Yt.create("pluralResolver"),this.options.compatibilityJSON&&!Sn.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=function(){const e={};return vn.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:wn[t.fc]}}))})),e}()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(pn("dev"===e?"en":e),{type:t.ordinal?"ordinal":"cardinal"})}catch(n){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((e,t)=>kn[e]-kn[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):n.numbers.map((n=>this.getSuffix(e,n,t))):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const o=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!xn.includes(this.options.compatibilityJSON)}}function Rn(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=function(e,t,n){const r=rn(e,n);return void 0!==r?r:rn(t,n)}(e,t,n);return!i&&o&&"string"==typeof n&&(i=un(e,n,r),void 0===i&&(i=un(t,n,r))),i}class _n{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Yt.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:d,unescapePrefix:c,nestingPrefix:u,nestingPrefixEscaped:p,nestingSuffix:h,nestingSuffixEscaped:g,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:y}=e.interpolation;this.escape=void 0!==t?t:ln,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?an(o):i||"{{",this.suffix=a?an(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=d?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=u?an(u):p||an("$t("),this.nestingSuffix=h?an(h):g||an(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}const d=e=>{if(e.indexOf(this.formatSeparator)<0){const o=Rn(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(Rn(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const c=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>l(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?l(this.escape(e)):l(e)}].forEach((t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=d(n),void 0===i)if("function"==typeof c){const t=c(e,o,r);i="string"==typeof t?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(u){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else"string"==typeof i||this.useRawValueToEscape||(i=Xt(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),u?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function a(e,t){const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(Hp){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,Hp),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){let s=[];o={...i},o=o.replace&&"string"!=typeof o.replace?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),s=e,l=!0}if(r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=Xt(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),l&&(r=s.reduce(((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}function Tn(e){const t={};return function(n,r,o){const i=r+JSON.stringify(o);let a=t[i];return a||(a=e(pn(r),o),t[i]=a),a(n)}}class Cn{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Yt.create("formatter"),this.options=e,this.formats={number:Tn(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:Tn(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:Tn(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:Tn(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:Tn(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Tn(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t.split(this.formatSeparator).reduce(((e,t)=>{const{formatName:o,formatOptions:i}=function(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}}))}return{formatName:t,formatOptions:n}}(t);if(this.formats[o]){let t=e;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,s,{...i,...r,...a})}catch(a){this.logger.warn(a)}return t}return this.logger.warn(`there was no format function for ${o}`),e}),e)}}class jn extends Qt{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Yt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){const o={},i={},a={},s={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))})),r||(a[e]=!0)})),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2;const a={};this.queue.forEach((n=>{!function(e,t,n,r){const{obj:o,k:i}=tn(e,t,Object);o[i]=o[i]||[],o[i].push(n)}(n.loaded,[o],i),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r{this.read.call(this,e,t,n,r+1,2*o,i)}),o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(l){a(l)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,((n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)}))}saveMissing(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const l={...i,isUpdate:o},d=this.backend.create.bind(this.backend);if(d.length<6)try{let o;o=5===d.length?d(e,t,n,r,l):d(e,t,n,r),o&&"function"==typeof o.then?o.then((e=>a(null,e))).catch(a):a(null,o)}catch(s){a(s)}else d(e,t,n,r,a,l)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}function Ln(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function An(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function On(){}class En extends Qt{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=An(e),this.services={},this.logger=Yt,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=Ln();function o(e){return e?"function"==typeof e?new e:e:null}if(this.options={...r,...this.options,...An(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){let t;this.modules.logger?Yt.init(o(this.modules.logger),this.options):Yt.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=Cn);const n=new bn(this.options);this.store=new hn(this.options.resources,this.options);const i=this.services;i.logger=Yt,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new Nn(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new _n(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new jn(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o1?n-1:0),o=1;o{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=On),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const i=Zt(),a=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:On;const n="string"==typeof e?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};n?r(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e))),this.options.preload&&this.options.preload.forEach((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=Zt();return e||(e=this.languages),t||(t=this.options.ns),n||(n=On),this.services.backendConnector.reload(e,t,(e=>{r.resolve(),n(e)})),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&gn.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=Zt();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(e=>{i(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l`${i.keyPrefix}${d}${e}`)):i.keyPrefix?`${i.keyPrefix}${d}${e}`:e,r.t(c,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!(!this.hasResourceBundle(n,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=Zt();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Zt();"string"==typeof e&&(e=[e]);const r=this.options.preload||[],o=e.filter((e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return o.length?(this.options.preload=r.concat(o),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new bn(Ln());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new En(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:On;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new En(r);return void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e)),["store","services","language"].forEach((e=>{o[e]=this[e]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new hn(this.store.data,r),o.services.resourceStore=o.store),o.translator=new mn(o.services,r),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;re.source.startsWith("local"),Dn=(e,t)=>{var n;return`@font-face {\n font-family: '${e}';\n src: ${t.source};\n ${Object.entries(null!==(n=t.descriptors)&&void 0!==n?n:{}).map((([e,t])=>`${e}: ${t};`)).join("\n")}\n}`};let Gn=(e=>{let t,n=!1;return r=>Ze(void 0,void 0,void 0,(function*(){return!t||!n&&r?(t=e(),n=!0,t.then((e=>(n=!1,e))).catch((e=>{throw t=null,e}))):t}))})((()=>fetch("/fonts/config.json").then((e=>e.json()))));const Fn=(e,t,n)=>In(void 0,void 0,void 0,(function*(){try{const r=new FontFace(e,t.source,t.descriptors);return Bn(t)?yield r.load():r.loaded.then(n),document.fonts.add(r),$n[e]={configs:[Object.assign(Object.assign({},t),{font:r})]},!0}catch(Hp){return mt.warn(`Failed to load font ${e} with source ${t.source}`,Hp),!1}})),Wn=(e,t,n)=>In(void 0,void 0,void 0,(function*(){if(t.some(Bn))return mt.error(`Unable to load multiple FontFace for the same family ${e}`),!1;const r=[];return t.forEach((t=>{const o=new FontFace(e,t.source,t.descriptors);o.loaded.then(n),document.fonts.add(o),r.push(Object.assign(Object.assign({},t),{font:o}))})),$n[e]={configs:r},!0})),Un={getAllFonts:Gn,getLoadedFonts:()=>$n,loadFont:(e,t)=>In(void 0,void 0,void 0,(function*(){if(e in $n)return $n[e];let n;if(t)n=t;else try{n=(yield Gn())[e]}catch(Hp){throw new Error("Unable to load font definition of "+e)}const r=()=>{((e,t)=>{Lt.postEvent(zn,{family:e,definition:t})})(e,n)};for(const t of n.configs)if(Array.isArray(t)?yield Wn(e,t,r):yield Fn(e,t,r))break;const o=$n[e];return o?(o.displayName=n.displayName,o.url=n.url,$n[e]):void 0})),getFontCSS:e=>In(void 0,void 0,void 0,(function*(){const t=$n[e];if(!t)throw new Error(`Font family ${e} is not loaded`);const n=yield Promise.all(t.configs.filter((t=>{const n="loaded"===t.font.status;return n||mt.warn(`Font family ${e} is not loaded completely. Some FontFaceRules may be missing`),n})).map((t=>In(void 0,void 0,void 0,(function*(){if(Bn(t))return Dn(e,t);const n=(e=>{var t;const n=null===(t=e.source.match(/url\(['"](\S+)['"]\)/))||void 0===t?void 0:t[1];if(!n)throw new Error("Invalid URL in source "+e.source);return new URL(n,window.location.href)})(t),r=yield fetch(n),o=yield(i=yield r.blob(),new Promise((e=>{const t=new FileReader;t.onloadend=()=>e(t.result),t.readAsDataURL(i)})));var i;return Dn(e,Object.assign(Object.assign({},t),{source:`url('${o}')`}))})))));return n.join("\n\n")})),onRemoteFontLoaded:e=>{Lt.onMessage(zn,e)}},Vn=()=>{if("PRD"!==Rt.getEnvironment()||!Rt.isRMT())if(document.querySelector('meta[name="robots"]'))mt.info("Noindex meta tag already presents.");else{mt.info("Injecting noindex meta tag as this app is not PRD RMT.");const e=document.createElement("meta");e.name="robots",e.content="noindex",document.head.appendChild(e)}};var Hn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(Hp){i(Hp)}}function s(e){try{l(r.throw(e))}catch(Hp){i(Hp)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};let Jn=!1;const qn=e("r",{ready:()=>Hn(void 0,void 0,void 0,(function*(){let e=0;for(;e<=10&&!Jn;)yield Xe(1e3),e+=1})),getAppName:Rt.getComponent,getAppVersion:Rt.getVersion,getEnv:Rt.getEnvironment,getInstance:Rt.getInstance,event:Tt.customEvent,isStandaloneWindow:$t.isStandaloneWindow,injectUITools:$t.injectUITools,openApp:$t.openApp,onAppOpen:$t.onAppOpen,closeApp:$t.closeApp,onAppClose:$t.onAppClose,updateAppMetadata:$t.updateAppMetadata,onAppMetadataUpdate:$t.onAppMetadataUpdate,updateUrl:$t.updateUrl,onUrlUpdate:$t.onUrlUpdate,toggleNavMenu:$t.toggleNavMenu,postEvent:Lt.postEvent,onMessage:Lt.onMessage,setLanguage:Ft.setLanguage,getLanguage:Ft.getLanguage,onLanguageChange:Ft.onLanguageChange,setColourMode:Ft.setColourMode,getColourMode:Ft.getColourMode,onColourModeChange:Ft.onColourModeChange,isAnalyticsQADone:Ft.isAnalyticsQADone,isAllowAnalytics:Ft.isAllowAnalytics,allowAnalytics:Ft.allowAnalytics,storage:{on:Jt.on,get:Jt.get,getAll:Jt.getAll,set:Jt.set,remove:Jt.remove,clear:Jt.clear},getMsSinceStartUp:Ut.getMsSinceStartUp,I18nBuilder:class{constructor(){this._appName="RMG",this._lng=void 0,this._defaultResources={},this._resources={}}use(e){return Mn.use(e),this}withAppName(e){return this._appName=e,this}withLng(e){return this._lng=e,this}withDefaultResource(e){return Object.entries(e).forEach((([e,t])=>{this._defaultResources[e]=t})),this}withResource(e,t){return this._resources[e]=t,this}combineResource(){const e={};return Object.entries(this._defaultResources).forEach((([t,n])=>{e[t]={translation:n}})),Object.entries(this._resources).forEach((([t,n])=>{t in e?e[t].translation=Object.assign(Object.assign({},e[t].translation),n):e[t]={translation:n}})),e}build(){return Pn=Mn.createInstance({lng:this._lng,fallbackLng:{"zh-CN":["zh-Hans","zh-Hant","en"],"zh-HK":["zh-Hant","zh-Hans","en"],"zh-TW":["zh-Hant","zh-Hans","en"],default:["en"]},resources:this.combineResource()},((e,t)=>{var n;e?mt.error("unexpected error occurs while initialising i18n",e):(document.title=t(this._appName),document.documentElement.lang=null!==(n=this._lng)&&void 0!==n?n:"en")})),Pn.on("languageChanged",(e=>{document.title=Pn.t(this._appName),document.documentElement.lang=e})),(e=>{Ft.onLanguageChange((t=>e.changeLanguage(t)))})(Pn),Pn}},getI18nInstance:()=>Pn,getAllFonts:Un.getAllFonts,getLoadedFonts:Un.getLoadedFonts,loadFont:Un.loadFont,getFontCSS:Un.getFontCSS,onRemoteFontLoaded:Un.onRemoteFontLoaded});Hn(void 0,void 0,void 0,(function*(){yield Rt.loadWithTimeout(),mt.setup(Rt.getComponent()),Vn(),Ft.isAnalyticsQADone()?Ft.isAllowAnalytics()&&(mt.info("User has previously allowed GA"),Tt.init()):$t.isStandaloneWindow()&&!Rt.isRMT()&&(mt.warn("App is opened in standalone window but analytics Q&A is not finished. GA will be init by default."),Tt.init()),Jn=!0})).then(),window.rmgRuntime=qn;const Kn=e("N",mt.logger);var Yn,Qn={exports:{}},Zn="object"==typeof Reflect?Reflect:null,Xn=Zn&&"function"==typeof Zn.apply?Zn.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};Yn=Zn&&"function"==typeof Zn.ownKeys?Zn.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var er=Number.isNaN||function(e){return e!=e};function tr(){tr.init.call(this)}Qn.exports=tr,Qn.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}ur(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&ur(e,"error",t,n)}(e,o,{once:!0})}))},tr.EventEmitter=tr,tr.prototype._events=void 0,tr.prototype._eventsCount=0,tr.prototype._maxListeners=void 0;var nr=10;function rr(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function or(e){return void 0===e._maxListeners?tr.defaultMaxListeners:e._maxListeners}function ir(e,t,n,r){var o,i,a;if(rr(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=or(e))>0&&a.length>o&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,function(e){console&&console.warn&&console.warn(e)}(s)}return e}function ar(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function sr(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=ar.bind(r);return o.listener=n,r.wrapFn=o,o}function lr(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(i=t[0]),i instanceof Error)throw i;var a=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw a.context=i,a}var s=o[e];if(void 0===s)return!1;if("function"==typeof s)Xn(s,this,t);else{var l=s.length,d=cr(s,l);for(n=0;n=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},tr.prototype.listeners=function(e){return lr(this,e,!0)},tr.prototype.rawListeners=function(e){return lr(this,e,!1)},tr.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):dr.call(e,t)},tr.prototype.listenerCount=dr,tr.prototype.eventNames=function(){return this._eventsCount>0?Yn(this._events):[]};var pr=Qn.exports;function hr(e){if("function"!=typeof e)throw new Error("obliterator/iterator: expecting a function!");this.next=e}"undefined"!=typeof Symbol&&(hr.prototype[Symbol.iterator]=function(){return this}),hr.of=function(){var e=arguments,t=e.length,n=0;return new hr((function(){return n>=t?{done:!0}:{done:!1,value:e[n++]}}))},hr.empty=function(){return new hr((function(){return{done:!0}}))},hr.fromSequence=function(e){var t=0,n=e.length;return new hr((function(){return t>=n?{done:!0}:{done:!1,value:e[t++]}}))},hr.is=function(e){return e instanceof hr||"object"==typeof e&&null!==e&&"function"==typeof e.next};var gr=hr;const fr=Oe(gr);var mr={};mr.ARRAY_BUFFER_SUPPORT="undefined"!=typeof ArrayBuffer,mr.SYMBOL_SUPPORT="undefined"!=typeof Symbol;var yr=gr,br=mr,vr=br.ARRAY_BUFFER_SUPPORT,wr=br.SYMBOL_SUPPORT,xr=function(e){var t=function(e){return"string"==typeof e||Array.isArray(e)||vr&&ArrayBuffer.isView(e)?yr.fromSequence(e):"object"!=typeof e||null===e?null:wr&&"function"==typeof e[Symbol.iterator]?e[Symbol.iterator]():"function"==typeof e.next?e:null}(e);if(!t)throw new Error("obliterator: target is not iterable nor a valid iterator.");return t},Sr=xr,kr=function(e,t){for(var n,r=arguments.length>1?t:1/0,o=r!==1/0?new Array(r):[],i=0,a=Sr(e);;){if(i===r)return o;if((n=a.next()).done)return i!==t&&(o.length=i),o;o[i++]=n.value}};const Nr=Oe(kr);var Rr=gr,_r=xr,Tr=function(){var e=arguments,t=null,n=-1;return new Rr((function(){for(var r=null;;){if(null===t){if(++n>=e.length)return{done:!0};t=_r(e[n])}if(!0!==(r=t.next()).done)break;t=null}return r}))};const Cr=Oe(Tr);let jr=function(){const e=arguments[0];for(let t=1,n=arguments.length;t`get${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,r,o){const[i,a]=Jr(this,t,n,e,r,o);return i.attributes[a]}}},{name:e=>`get${e}Attributes`,attacher:function(e,t,n){e.prototype[t]=function(e,r){const[o]=Jr(this,t,n,e,r);return o.attributes}}},{name:e=>`has${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,r,o){const[i,a]=Jr(this,t,n,e,r,o);return i.attributes.hasOwnProperty(a)}}},{name:e=>`set${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,r,o,i){const[a,s,l]=Jr(this,t,n,e,r,o,i);return a.attributes[s]=l,this.emit("nodeAttributesUpdated",{key:a.key,type:"set",attributes:a.attributes,name:s}),this}}},{name:e=>`update${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,r,o,i){const[a,s,l]=Jr(this,t,n,e,r,o,i);if("function"!=typeof l)throw new $r(`Graph.${t}: updater should be a function.`);const d=a.attributes,c=l(d[s]);return d[s]=c,this.emit("nodeAttributesUpdated",{key:a.key,type:"set",attributes:a.attributes,name:s}),this}}},{name:e=>`remove${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,r,o){const[i,a]=Jr(this,t,n,e,r,o);return delete i.attributes[a],this.emit("nodeAttributesUpdated",{key:i.key,type:"remove",attributes:i.attributes,name:a}),this}}},{name:e=>`replace${e}Attributes`,attacher:function(e,t,n){e.prototype[t]=function(e,r,o){const[i,a]=Jr(this,t,n,e,r,o);if(!Ar(a))throw new $r(`Graph.${t}: provided attributes are not a plain object.`);return i.attributes=a,this.emit("nodeAttributesUpdated",{key:i.key,type:"replace",attributes:i.attributes}),this}}},{name:e=>`merge${e}Attributes`,attacher:function(e,t,n){e.prototype[t]=function(e,r,o){const[i,a]=Jr(this,t,n,e,r,o);if(!Ar(a))throw new $r(`Graph.${t}: provided attributes are not a plain object.`);return jr(i.attributes,a),this.emit("nodeAttributesUpdated",{key:i.key,type:"merge",attributes:i.attributes,data:a}),this}}},{name:e=>`update${e}Attributes`,attacher:function(e,t,n){e.prototype[t]=function(e,r,o){const[i,a]=Jr(this,t,n,e,r,o);if("function"!=typeof a)throw new $r(`Graph.${t}: provided updater is not a function.`);return i.attributes=a(i.attributes),this.emit("nodeAttributesUpdated",{key:i.key,type:"update",attributes:i.attributes}),this}}}],Kr=[{name:e=>`get${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,r){let o;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new Br(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Br(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const i=""+e,a=""+r;if(r=arguments[2],o=Lr(this,i,a,n),!o)throw new zr(`Graph.${t}: could not find an edge for the given path ("${i}" - "${a}").`)}else{if("mixed"!==n)throw new Br(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,o=this._edges.get(e),!o)throw new zr(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return o.attributes[r]}}},{name:e=>`get${e}Attributes`,attacher:function(e,t,n){e.prototype[t]=function(e){let r;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new Br(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new Br(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+e,i=""+arguments[1];if(r=Lr(this,o,i,n),!r)throw new zr(`Graph.${t}: could not find an edge for the given path ("${o}" - "${i}").`)}else{if("mixed"!==n)throw new Br(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,r=this._edges.get(e),!r)throw new zr(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return r.attributes}}},{name:e=>`has${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,r){let o;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new Br(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Br(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const i=""+e,a=""+r;if(r=arguments[2],o=Lr(this,i,a,n),!o)throw new zr(`Graph.${t}: could not find an edge for the given path ("${i}" - "${a}").`)}else{if("mixed"!==n)throw new Br(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,o=this._edges.get(e),!o)throw new zr(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return o.attributes.hasOwnProperty(r)}}},{name:e=>`set${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,r,o){let i;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new Br(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new Br(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+e,s=""+r;if(r=arguments[2],o=arguments[3],i=Lr(this,a,s,n),!i)throw new zr(`Graph.${t}: could not find an edge for the given path ("${a}" - "${s}").`)}else{if("mixed"!==n)throw new Br(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,i=this._edges.get(e),!i)throw new zr(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return i.attributes[r]=o,this.emit("edgeAttributesUpdated",{key:i.key,type:"set",attributes:i.attributes,name:r}),this}}},{name:e=>`update${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,r,o){let i;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new Br(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new Br(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+e,s=""+r;if(r=arguments[2],o=arguments[3],i=Lr(this,a,s,n),!i)throw new zr(`Graph.${t}: could not find an edge for the given path ("${a}" - "${s}").`)}else{if("mixed"!==n)throw new Br(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,i=this._edges.get(e),!i)throw new zr(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if("function"!=typeof o)throw new $r(`Graph.${t}: updater should be a function.`);return i.attributes[r]=o(i.attributes[r]),this.emit("edgeAttributesUpdated",{key:i.key,type:"set",attributes:i.attributes,name:r}),this}}},{name:e=>`remove${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,r){let o;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new Br(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Br(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const i=""+e,a=""+r;if(r=arguments[2],o=Lr(this,i,a,n),!o)throw new zr(`Graph.${t}: could not find an edge for the given path ("${i}" - "${a}").`)}else{if("mixed"!==n)throw new Br(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,o=this._edges.get(e),!o)throw new zr(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return delete o.attributes[r],this.emit("edgeAttributesUpdated",{key:o.key,type:"remove",attributes:o.attributes,name:r}),this}}},{name:e=>`replace${e}Attributes`,attacher:function(e,t,n){e.prototype[t]=function(e,r){let o;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new Br(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Br(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const i=""+e,a=""+r;if(r=arguments[2],o=Lr(this,i,a,n),!o)throw new zr(`Graph.${t}: could not find an edge for the given path ("${i}" - "${a}").`)}else{if("mixed"!==n)throw new Br(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,o=this._edges.get(e),!o)throw new zr(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(!Ar(r))throw new $r(`Graph.${t}: provided attributes are not a plain object.`);return o.attributes=r,this.emit("edgeAttributesUpdated",{key:o.key,type:"replace",attributes:o.attributes}),this}}},{name:e=>`merge${e}Attributes`,attacher:function(e,t,n){e.prototype[t]=function(e,r){let o;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new Br(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Br(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const i=""+e,a=""+r;if(r=arguments[2],o=Lr(this,i,a,n),!o)throw new zr(`Graph.${t}: could not find an edge for the given path ("${i}" - "${a}").`)}else{if("mixed"!==n)throw new Br(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,o=this._edges.get(e),!o)throw new zr(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(!Ar(r))throw new $r(`Graph.${t}: provided attributes are not a plain object.`);return jr(o.attributes,r),this.emit("edgeAttributesUpdated",{key:o.key,type:"merge",attributes:o.attributes,data:r}),this}}},{name:e=>`update${e}Attributes`,attacher:function(e,t,n){e.prototype[t]=function(e,r){let o;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new Br(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new Br(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const i=""+e,a=""+r;if(r=arguments[2],o=Lr(this,i,a,n),!o)throw new zr(`Graph.${t}: could not find an edge for the given path ("${i}" - "${a}").`)}else{if("mixed"!==n)throw new Br(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,o=this._edges.get(e),!o)throw new zr(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if("function"!=typeof r)throw new $r(`Graph.${t}: provided updater is not a function.`);return o.attributes=r(o.attributes),this.emit("edgeAttributesUpdated",{key:o.key,type:"update",attributes:o.attributes}),this}}}],Yr=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function Qr(e,t,n,r){let o=!1;for(const i in t){if(i===r)continue;const a=t[i];if(o=n(a.key,a.attributes,a.source.key,a.target.key,a.source.attributes,a.target.attributes,a.undirected),e&&o)return a.key}}function Zr(e,t,n,r){let o,i,a,s=!1;for(const l in t)if(l!==r){o=t[l];do{if(i=o.source,a=o.target,s=n(o.key,o.attributes,i.key,a.key,i.attributes,a.attributes,o.undirected),e&&s)return o.key;o=o.next}while(void 0!==o)}}function Xr(e,t){const n=Object.keys(e),r=n.length;let o,i=0;return new fr((function(){do{if(o)o=o.next;else{if(i>=r)return{done:!0};const a=n[i++];if(a===t){o=void 0;continue}o=e[a]}}while(!o);return{done:!1,value:{edge:o.key,attributes:o.attributes,source:o.source.key,target:o.target.key,sourceAttributes:o.source.attributes,targetAttributes:o.target.attributes,undirected:o.undirected}}}))}function eo(e,t,n,r){const o=t[n];if(!o)return;const i=o.source,a=o.target;return r(o.key,o.attributes,i.key,a.key,i.attributes,a.attributes,o.undirected)&&e?o.key:void 0}function to(e,t,n,r){let o=t[n];if(!o)return;let i=!1;do{if(i=r(o.key,o.attributes,o.source.key,o.target.key,o.source.attributes,o.target.attributes,o.undirected),e&&i)return o.key;o=o.next}while(void 0!==o)}function no(e,t){let n=e[t];return void 0!==n.next?new fr((function(){if(!n)return{done:!0};const e={edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected};return n=n.next,{done:!1,value:e}})):fr.of({edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected})}function ro(e,t,n,r){if(0===t.size)return;const o="mixed"!==n&&n!==t.type,i="undirected"===n;let a,s,l=!1;const d=t._edges.values();for(;a=d.next(),!0!==a.done;){if(s=a.value,o&&s.undirected!==i)continue;const{key:t,attributes:n,source:d,target:c}=s;if(l=r(t,n,d.key,c.key,d.attributes,c.attributes,s.undirected),e&&l)return t}}function oo(e,t,n,r,o,i){const a=t?Zr:Qr;let s;if("undirected"!==n){if("out"!==r&&(s=a(e,o.in,i),e&&s))return s;if("in"!==r&&(s=a(e,o.out,i,r?void 0:o.key),e&&s))return s}if("directed"!==n&&(s=a(e,o.undirected,i),e&&s))return s}function io(e,t,n,r,o,i,a){const s=n?to:eo;let l;if("undirected"!==t){if(void 0!==o.in&&"out"!==r&&(l=s(e,o.in,i,a),e&&l))return l;if(void 0!==o.out&&"in"!==r&&(r||o.key!==i)&&(l=s(e,o.out,i,a),e&&l))return l}if("directed"!==t&&void 0!==o.undirected&&(l=s(e,o.undirected,i,a),e&&l))return l}function ao(e,t){const{name:n,type:r,direction:o}=t;e.prototype[n]=function(e,t){if("mixed"!==r&&"mixed"!==this.type&&r!==this.type)return[];if(!arguments.length)return function(e,t){if(0===e.size)return[];if("mixed"===t||t===e.type)return"function"==typeof Array.from?Array.from(e._edges.keys()):Nr(e._edges.keys(),e._edges.size);const n="undirected"===t?e.undirectedSize:e.directedSize,r=new Array(n),o="undirected"===t,i=e._edges.values();let a,s,l=0;for(;a=i.next(),!0!==a.done;)s=a.value,s.undirected===o&&(r[l++]=s.key);return r}(this,r);if(1===arguments.length){e=""+e;const t=this._nodes.get(e);if(void 0===t)throw new zr(`Graph.${n}: could not find the "${e}" node in the graph.`);return function(e,t,n,r){const o=[];return oo(!1,e,t,n,r,(function(e){o.push(e)})),o}(this.multi,"mixed"===r?this.type:r,o,t)}if(2===arguments.length){e=""+e,t=""+t;const i=this._nodes.get(e);if(!i)throw new zr(`Graph.${n}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new zr(`Graph.${n}: could not find the "${t}" target node in the graph.`);return function(e,t,n,r,o){const i=[];return io(!1,e,t,n,r,o,(function(e){i.push(e)})),i}(r,this.multi,o,i,t)}throw new $r(`Graph.${n}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function so(e,t){const{name:n,type:r,direction:o}=t,i=n.slice(0,-1)+"Entries";e.prototype[i]=function(e,t){if("mixed"!==r&&"mixed"!==this.type&&r!==this.type)return fr.empty();if(!arguments.length)return function(e,t){if(0===e.size)return fr.empty();const n="mixed"!==t&&t!==e.type,r="undirected"===t,o=e._edges.values();return new fr((function(){let e,t;for(;;){if(e=o.next(),e.done)return e;if(t=e.value,!n||t.undirected===r)break}return{value:{edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected},done:!1}}))}(this,r);if(1===arguments.length){e=""+e;const t=this._nodes.get(e);if(!t)throw new zr(`Graph.${i}: could not find the "${e}" node in the graph.`);return function(e,t,n){let r=fr.empty();return"undirected"!==e&&("out"!==t&&void 0!==n.in&&(r=Cr(r,Xr(n.in))),"in"!==t&&void 0!==n.out&&(r=Cr(r,Xr(n.out,t?void 0:n.key)))),"directed"!==e&&void 0!==n.undirected&&(r=Cr(r,Xr(n.undirected))),r}(r,o,t)}if(2===arguments.length){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new zr(`Graph.${i}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new zr(`Graph.${i}: could not find the "${t}" target node in the graph.`);return function(e,t,n,r){let o=fr.empty();return"undirected"!==e&&(void 0!==n.in&&"out"!==t&&r in n.in&&(o=Cr(o,no(n.in,r))),void 0!==n.out&&"in"!==t&&r in n.out&&(t||n.key!==r)&&(o=Cr(o,no(n.out,r)))),"directed"!==e&&void 0!==n.undirected&&r in n.undirected&&(o=Cr(o,no(n.undirected,r))),o}(r,o,n,t)}throw new $r(`Graph.${i}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}const lo=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function co(){this.A=null,this.B=null}function uo(e,t,n,r,o){for(const i in r){const a=r[i],s=a.source,l=a.target,d=s===n?l:s;if(t&&t.has(d.key))continue;const c=o(d.key,d.attributes);if(e&&c)return d.key}}function po(e,t,n,r,o){if("mixed"!==t){if("undirected"===t)return uo(e,null,r,r.undirected,o);if("string"==typeof n)return uo(e,null,r,r[n],o)}const i=new co;let a;if("undirected"!==t){if("out"!==n){if(a=uo(e,null,r,r.in,o),e&&a)return a;i.wrap(r.in)}if("in"!==n){if(a=uo(e,i,r,r.out,o),e&&a)return a;i.wrap(r.out)}}if("directed"!==t&&(a=uo(e,i,r,r.undirected,o),e&&a))return a}function ho(e,t,n){const r=Object.keys(n),o=r.length;let i=0;return new fr((function(){let a=null;do{if(i>=o)return e&&e.wrap(n),{done:!0};const s=n[r[i++]],l=s.source,d=s.target;a=l===t?d:l,e&&e.has(a.key)&&(a=null)}while(null===a);return{done:!1,value:{neighbor:a.key,attributes:a.attributes}}}))}function go(e,t){const{name:n,type:r,direction:o}=t;e.prototype[n]=function(e){if("mixed"!==r&&"mixed"!==this.type&&r!==this.type)return[];e=""+e;const t=this._nodes.get(e);if(void 0===t)throw new zr(`Graph.${n}: could not find the "${e}" node in the graph.`);return function(e,t,n){if("mixed"!==e){if("undirected"===e)return Object.keys(n.undirected);if("string"==typeof t)return Object.keys(n[t])}const r=[];return po(!1,e,t,n,(function(e){r.push(e)})),r}("mixed"===r?this.type:r,o,t)}}function fo(e,t){const{name:n,type:r,direction:o}=t,i=n.slice(0,-1)+"Entries";e.prototype[i]=function(e){if("mixed"!==r&&"mixed"!==this.type&&r!==this.type)return fr.empty();e=""+e;const t=this._nodes.get(e);if(void 0===t)throw new zr(`Graph.${i}: could not find the "${e}" node in the graph.`);return function(e,t,n){if("mixed"!==e){if("undirected"===e)return ho(null,n,n.undirected);if("string"==typeof t)return ho(null,n,n[t])}let r=fr.empty();const o=new co;return"undirected"!==e&&("out"!==t&&(r=Cr(r,ho(o,n,n.in))),"in"!==t&&(r=Cr(r,ho(o,n,n.out)))),"directed"!==e&&(r=Cr(r,ho(o,n,n.undirected))),r}("mixed"===r?this.type:r,o,t)}}function mo(e,t,n,r,o){const i=r._nodes.values(),a=r.type;let s,l,d,c,u,p;for(;s=i.next(),!0!==s.done;){let e=!1;if(l=s.value,"undirected"!==a)for(d in c=l.out,c){u=c[d];do{p=u.target,e=!0,o(l.key,p.key,l.attributes,p.attributes,u.key,u.attributes,u.undirected),u=u.next}while(u)}if("directed"!==a)for(d in c=l.undirected,c)if(!(t&&l.key>d)){u=c[d];do{p=u.target,p.key!==d&&(p=u.source),e=!0,o(l.key,p.key,l.attributes,p.attributes,u.key,u.attributes,u.undirected),u=u.next}while(u)}n&&!e&&o(l.key,null,l.attributes,null,null,null,null)}}function yo(e){if(!Ar(e))throw new $r('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in e))throw new $r("Graph.import: serialized node is missing its key.");if("attributes"in e&&(!Ar(e.attributes)||null===e.attributes))throw new $r("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function bo(e){if(!Ar(e))throw new $r('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in e))throw new $r("Graph.import: serialized edge is missing its source.");if(!("target"in e))throw new $r("Graph.import: serialized edge is missing its target.");if("attributes"in e&&(!Ar(e.attributes)||null===e.attributes))throw new $r("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in e&&"boolean"!=typeof e.undirected)throw new $r("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}co.prototype.wrap=function(e){null===this.A?this.A=e:null===this.B&&(this.B=e)},co.prototype.has=function(e){return null!==this.A&&e in this.A||null!==this.B&&e in this.B};const vo=function(){let e=255&Math.floor(256*Math.random());return()=>e++}(),wo=new Set(["directed","undirected","mixed"]),xo=new Set(["domain","_events","_eventsCount","_maxListeners"]),So={allowSelfLoops:!0,multi:!1,type:"mixed"};function ko(e,t,n){const r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit("nodeAdded",{key:t,attributes:n}),r}function No(e,t,n,r,o,i,a,s){if(!r&&"undirected"===e.type)throw new Br(`Graph.${t}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(r&&"directed"===e.type)throw new Br(`Graph.${t}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(s&&!Ar(s))throw new $r(`Graph.${t}: invalid attributes. Expecting an object but got "${s}"`);if(i=""+i,a=""+a,s=s||{},!e.allowSelfLoops&&i===a)throw new Br(`Graph.${t}: source & target are the same ("${i}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const l=e._nodes.get(i),d=e._nodes.get(a);if(!l)throw new zr(`Graph.${t}: source node "${i}" not found.`);if(!d)throw new zr(`Graph.${t}: target node "${a}" not found.`);const c={key:null,undirected:r,source:i,target:a,attributes:s};if(n)o=e._edgeKeyGenerator();else if(o=""+o,e._edges.has(o))throw new Br(`Graph.${t}: the "${o}" edge already exists in the graph.`);if(!e.multi&&(r?void 0!==l.undirected[a]:void 0!==l.out[a]))throw new Br(`Graph.${t}: an edge linking "${i}" to "${a}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const u=new Wr(r,o,l,d,s);e._edges.set(o,u);const p=i===a;return r?(l.undirectedDegree++,d.undirectedDegree++,p&&(l.undirectedLoops++,e._undirectedSelfLoopCount++)):(l.outDegree++,d.inDegree++,p&&(l.directedLoops++,e._directedSelfLoopCount++)),e.multi?u.attachMulti():u.attach(),r?e._undirectedSize++:e._directedSize++,c.key=o,e.emit("edgeAdded",c),o}function Ro(e,t,n,r,o,i,a,s,l){if(!r&&"undirected"===e.type)throw new Br(`Graph.${t}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(r&&"directed"===e.type)throw new Br(`Graph.${t}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(s)if(l){if("function"!=typeof s)throw new $r(`Graph.${t}: invalid updater function. Expecting a function but got "${s}"`)}else if(!Ar(s))throw new $r(`Graph.${t}: invalid attributes. Expecting an object but got "${s}"`);let d;if(i=""+i,a=""+a,l&&(d=s,s=void 0),!e.allowSelfLoops&&i===a)throw new Br(`Graph.${t}: source & target are the same ("${i}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let c,u,p=e._nodes.get(i),h=e._nodes.get(a);if(!n&&(c=e._edges.get(o),c)){if(!(c.source.key===i&&c.target.key===a||r&&c.source.key===a&&c.target.key===i))throw new Br(`Graph.${t}: inconsistency detected when attempting to merge the "${o}" edge with "${i}" source & "${a}" target vs. ("${c.source.key}", "${c.target.key}").`);u=c}if(u||e.multi||!p||(u=r?p.undirected[a]:p.out[a]),u){const t=[u.key,!1,!1,!1];if(l?!d:!s)return t;if(l){const t=u.attributes;u.attributes=d(t),e.emit("edgeAttributesUpdated",{type:"replace",key:u.key,attributes:u.attributes})}else jr(u.attributes,s),e.emit("edgeAttributesUpdated",{type:"merge",key:u.key,attributes:u.attributes,data:s});return t}s=s||{},l&&d&&(s=d(s));const g={key:null,undirected:r,source:i,target:a,attributes:s};if(n)o=e._edgeKeyGenerator();else if(o=""+o,e._edges.has(o))throw new Br(`Graph.${t}: the "${o}" edge already exists in the graph.`);let f=!1,m=!1;p||(p=ko(e,i,{}),f=!0,i===a&&(h=p,m=!0)),h||(h=ko(e,a,{}),m=!0),c=new Wr(r,o,p,h,s),e._edges.set(o,c);const y=i===a;return r?(p.undirectedDegree++,h.undirectedDegree++,y&&(p.undirectedLoops++,e._undirectedSelfLoopCount++)):(p.outDegree++,h.inDegree++,y&&(p.directedLoops++,e._directedSelfLoopCount++)),e.multi?c.attachMulti():c.attach(),r?e._undirectedSize++:e._directedSize++,g.key=o,e.emit("edgeAdded",g),[o,!0,f,m]}function _o(e,t){e._edges.delete(t.key);const{source:n,target:r,attributes:o}=t,i=t.undirected,a=n===r;i?(n.undirectedDegree--,r.undirectedDegree--,a&&(n.undirectedLoops--,e._undirectedSelfLoopCount--)):(n.outDegree--,r.inDegree--,a&&(n.directedLoops--,e._directedSelfLoopCount--)),e.multi?t.detachMulti():t.detach(),i?e._undirectedSize--:e._directedSize--,e.emit("edgeDropped",{key:t.key,attributes:o,source:n.key,target:r.key,undirected:i})}class To extends pr.EventEmitter{constructor(e){if(super(),"boolean"!=typeof(e=jr({},So,e)).multi)throw new $r(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${e.multi}".`);if(!wo.has(e.type))throw new $r(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${e.type}".`);if("boolean"!=typeof e.allowSelfLoops)throw new $r(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${e.allowSelfLoops}".`);Er(this,"NodeDataClass","mixed"===e.type?Dr:"directed"===e.type?Gr:Fr);const t="geid_"+vo()+"_";let n=0;Er(this,"_attributes",{}),Er(this,"_nodes",new Map),Er(this,"_edges",new Map),Er(this,"_directedSize",0),Er(this,"_undirectedSize",0),Er(this,"_directedSelfLoopCount",0),Er(this,"_undirectedSelfLoopCount",0),Er(this,"_edgeKeyGenerator",(()=>{let e;do{e=t+n++}while(this._edges.has(e));return e})),Er(this,"_options",e),xo.forEach((e=>Er(this,e,this[e]))),Mr(this,"order",(()=>this._nodes.size)),Mr(this,"size",(()=>this._edges.size)),Mr(this,"directedSize",(()=>this._directedSize)),Mr(this,"undirectedSize",(()=>this._undirectedSize)),Mr(this,"selfLoopCount",(()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount)),Mr(this,"directedSelfLoopCount",(()=>this._directedSelfLoopCount)),Mr(this,"undirectedSelfLoopCount",(()=>this._undirectedSelfLoopCount)),Mr(this,"multi",this._options.multi),Mr(this,"type",this._options.type),Mr(this,"allowSelfLoops",this._options.allowSelfLoops),Mr(this,"implementation",(()=>"graphology"))}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(e){return this._nodes.has(""+e)}hasDirectedEdge(e,t){if("undirected"===this.type)return!1;if(1===arguments.length){const t=""+e,n=this._edges.get(t);return!!n&&!n.undirected}if(2===arguments.length){e=""+e,t=""+t;const n=this._nodes.get(e);return!!n&&n.out.hasOwnProperty(t)}throw new $r(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(e,t){if("directed"===this.type)return!1;if(1===arguments.length){const t=""+e,n=this._edges.get(t);return!!n&&n.undirected}if(2===arguments.length){e=""+e,t=""+t;const n=this._nodes.get(e);return!!n&&n.undirected.hasOwnProperty(t)}throw new $r(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(e,t){if(1===arguments.length){const t=""+e;return this._edges.has(t)}if(2===arguments.length){e=""+e,t=""+t;const n=this._nodes.get(e);return!!n&&(void 0!==n.out&&n.out.hasOwnProperty(t)||void 0!==n.undirected&&n.undirected.hasOwnProperty(t))}throw new $r(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(e,t){if("undirected"===this.type)return;if(e=""+e,t=""+t,this.multi)throw new Br("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const n=this._nodes.get(e);if(!n)throw new zr(`Graph.directedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new zr(`Graph.directedEdge: could not find the "${t}" target node in the graph.`);const r=n.out&&n.out[t]||void 0;return r?r.key:void 0}undirectedEdge(e,t){if("directed"===this.type)return;if(e=""+e,t=""+t,this.multi)throw new Br("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const n=this._nodes.get(e);if(!n)throw new zr(`Graph.undirectedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new zr(`Graph.undirectedEdge: could not find the "${t}" target node in the graph.`);const r=n.undirected&&n.undirected[t]||void 0;return r?r.key:void 0}edge(e,t){if(this.multi)throw new Br("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new zr(`Graph.edge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new zr(`Graph.edge: could not find the "${t}" target node in the graph.`);const r=n.out&&n.out[t]||n.undirected&&n.undirected[t]||void 0;if(r)return r.key}areDirectedNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new zr(`Graph.areDirectedNeighbors: could not find the "${e}" node in the graph.`);return"undirected"!==this.type&&(t in n.in||t in n.out)}areOutNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new zr(`Graph.areOutNeighbors: could not find the "${e}" node in the graph.`);return"undirected"!==this.type&&t in n.out}areInNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new zr(`Graph.areInNeighbors: could not find the "${e}" node in the graph.`);return"undirected"!==this.type&&t in n.in}areUndirectedNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new zr(`Graph.areUndirectedNeighbors: could not find the "${e}" node in the graph.`);return"directed"!==this.type&&t in n.undirected}areNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new zr(`Graph.areNeighbors: could not find the "${e}" node in the graph.`);return"undirected"!==this.type&&(t in n.in||t in n.out)||"directed"!==this.type&&t in n.undirected}areInboundNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new zr(`Graph.areInboundNeighbors: could not find the "${e}" node in the graph.`);return"undirected"!==this.type&&t in n.in||"directed"!==this.type&&t in n.undirected}areOutboundNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new zr(`Graph.areOutboundNeighbors: could not find the "${e}" node in the graph.`);return"undirected"!==this.type&&t in n.out||"directed"!==this.type&&t in n.undirected}inDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new zr(`Graph.inDegree: could not find the "${e}" node in the graph.`);return"undirected"===this.type?0:t.inDegree}outDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new zr(`Graph.outDegree: could not find the "${e}" node in the graph.`);return"undirected"===this.type?0:t.outDegree}directedDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new zr(`Graph.directedDegree: could not find the "${e}" node in the graph.`);return"undirected"===this.type?0:t.inDegree+t.outDegree}undirectedDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new zr(`Graph.undirectedDegree: could not find the "${e}" node in the graph.`);return"directed"===this.type?0:t.undirectedDegree}inboundDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new zr(`Graph.inboundDegree: could not find the "${e}" node in the graph.`);let n=0;return"directed"!==this.type&&(n+=t.undirectedDegree),"undirected"!==this.type&&(n+=t.inDegree),n}outboundDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new zr(`Graph.outboundDegree: could not find the "${e}" node in the graph.`);let n=0;return"directed"!==this.type&&(n+=t.undirectedDegree),"undirected"!==this.type&&(n+=t.outDegree),n}degree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new zr(`Graph.degree: could not find the "${e}" node in the graph.`);let n=0;return"directed"!==this.type&&(n+=t.undirectedDegree),"undirected"!==this.type&&(n+=t.inDegree+t.outDegree),n}inDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new zr(`Graph.inDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return"undirected"===this.type?0:t.inDegree-t.directedLoops}outDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new zr(`Graph.outDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return"undirected"===this.type?0:t.outDegree-t.directedLoops}directedDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new zr(`Graph.directedDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return"undirected"===this.type?0:t.inDegree+t.outDegree-2*t.directedLoops}undirectedDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new zr(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return"directed"===this.type?0:t.undirectedDegree-2*t.undirectedLoops}inboundDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new zr(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,r=0;return"directed"!==this.type&&(n+=t.undirectedDegree,r+=2*t.undirectedLoops),"undirected"!==this.type&&(n+=t.inDegree,r+=t.directedLoops),n-r}outboundDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new zr(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,r=0;return"directed"!==this.type&&(n+=t.undirectedDegree,r+=2*t.undirectedLoops),"undirected"!==this.type&&(n+=t.outDegree,r+=t.directedLoops),n-r}degreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new zr(`Graph.degreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,r=0;return"directed"!==this.type&&(n+=t.undirectedDegree,r+=2*t.undirectedLoops),"undirected"!==this.type&&(n+=t.inDegree+t.outDegree,r+=2*t.directedLoops),n-r}source(e){e=""+e;const t=this._edges.get(e);if(!t)throw new zr(`Graph.source: could not find the "${e}" edge in the graph.`);return t.source.key}target(e){e=""+e;const t=this._edges.get(e);if(!t)throw new zr(`Graph.target: could not find the "${e}" edge in the graph.`);return t.target.key}extremities(e){e=""+e;const t=this._edges.get(e);if(!t)throw new zr(`Graph.extremities: could not find the "${e}" edge in the graph.`);return[t.source.key,t.target.key]}opposite(e,t){e=""+e,t=""+t;const n=this._edges.get(t);if(!n)throw new zr(`Graph.opposite: could not find the "${t}" edge in the graph.`);const r=n.source.key,o=n.target.key;if(e===r)return o;if(e===o)return r;throw new zr(`Graph.opposite: the "${e}" node is not attached to the "${t}" edge (${r}, ${o}).`)}hasExtremity(e,t){e=""+e,t=""+t;const n=this._edges.get(e);if(!n)throw new zr(`Graph.hasExtremity: could not find the "${e}" edge in the graph.`);return n.source.key===t||n.target.key===t}isUndirected(e){e=""+e;const t=this._edges.get(e);if(!t)throw new zr(`Graph.isUndirected: could not find the "${e}" edge in the graph.`);return t.undirected}isDirected(e){e=""+e;const t=this._edges.get(e);if(!t)throw new zr(`Graph.isDirected: could not find the "${e}" edge in the graph.`);return!t.undirected}isSelfLoop(e){e=""+e;const t=this._edges.get(e);if(!t)throw new zr(`Graph.isSelfLoop: could not find the "${e}" edge in the graph.`);return t.source===t.target}addNode(e,t){const n=function(e,t,n){if(n&&!Ar(n))throw new $r(`Graph.addNode: invalid attributes. Expecting an object but got "${n}"`);if(t=""+t,n=n||{},e._nodes.has(t))throw new Br(`Graph.addNode: the "${t}" node already exist in the graph.`);const r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit("nodeAdded",{key:t,attributes:n}),r}(this,e,t);return n.key}mergeNode(e,t){if(t&&!Ar(t))throw new $r(`Graph.mergeNode: invalid attributes. Expecting an object but got "${t}"`);e=""+e,t=t||{};let n=this._nodes.get(e);return n?(t&&(jr(n.attributes,t),this.emit("nodeAttributesUpdated",{type:"merge",key:e,attributes:n.attributes,data:t})),[e,!1]):(n=new this.NodeDataClass(e,t),this._nodes.set(e,n),this.emit("nodeAdded",{key:e,attributes:t}),[e,!0])}updateNode(e,t){if(t&&"function"!=typeof t)throw new $r(`Graph.updateNode: invalid updater function. Expecting a function but got "${t}"`);e=""+e;let n=this._nodes.get(e);if(n){if(t){const r=n.attributes;n.attributes=t(r),this.emit("nodeAttributesUpdated",{type:"replace",key:e,attributes:n.attributes})}return[e,!1]}const r=t?t({}):{};return n=new this.NodeDataClass(e,r),this._nodes.set(e,n),this.emit("nodeAdded",{key:e,attributes:r}),[e,!0]}dropNode(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new zr(`Graph.dropNode: could not find the "${e}" node in the graph.`);let n;if("undirected"!==this.type){for(const e in t.out){n=t.out[e];do{_o(this,n),n=n.next}while(n)}for(const e in t.in){n=t.in[e];do{_o(this,n),n=n.next}while(n)}}if("directed"!==this.type)for(const r in t.undirected){n=t.undirected[r];do{_o(this,n),n=n.next}while(n)}this._nodes.delete(e),this.emit("nodeDropped",{key:e,attributes:t.attributes})}dropEdge(e){let t;if(arguments.length>1){const e=""+arguments[0],n=""+arguments[1];if(t=Lr(this,e,n,this.type),!t)throw new zr(`Graph.dropEdge: could not find the "${e}" -> "${n}" edge in the graph.`)}else if(e=""+e,t=this._edges.get(e),!t)throw new zr(`Graph.dropEdge: could not find the "${e}" edge in the graph.`);return _o(this,t),this}dropDirectedEdge(e,t){if(arguments.length<2)throw new Br("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new Br("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const n=Lr(this,e=""+e,t=""+t,"directed");if(!n)throw new zr(`Graph.dropDirectedEdge: could not find a "${e}" -> "${t}" edge in the graph.`);return _o(this,n),this}dropUndirectedEdge(e,t){if(arguments.length<2)throw new Br("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new Br("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const n=Lr(this,e,t,"undirected");if(!n)throw new zr(`Graph.dropUndirectedEdge: could not find a "${e}" -> "${t}" edge in the graph.`);return _o(this,n),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const e=this._nodes.values();let t;for(;t=e.next(),!0!==t.done;)t.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(e){return this._attributes[e]}getAttributes(){return this._attributes}hasAttribute(e){return this._attributes.hasOwnProperty(e)}setAttribute(e,t){return this._attributes[e]=t,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this}updateAttribute(e,t){if("function"!=typeof t)throw new $r("Graph.updateAttribute: updater should be a function.");const n=this._attributes[e];return this._attributes[e]=t(n),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this}removeAttribute(e){return delete this._attributes[e],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:e}),this}replaceAttributes(e){if(!Ar(e))throw new $r("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=e,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(e){if(!Ar(e))throw new $r("Graph.mergeAttributes: provided attributes are not a plain object.");return jr(this._attributes,e),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:e}),this}updateAttributes(e){if("function"!=typeof e)throw new $r("Graph.updateAttributes: provided updater is not a function.");return this._attributes=e(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(e,t){if("function"!=typeof e)throw new $r("Graph.updateEachNodeAttributes: expecting an updater function.");if(t&&!Pr(t))throw new $r("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const n=this._nodes.values();let r,o;for(;r=n.next(),!0!==r.done;)o=r.value,o.attributes=e(o.key,o.attributes);this.emit("eachNodeAttributesUpdated",{hints:t||null})}updateEachEdgeAttributes(e,t){if("function"!=typeof e)throw new $r("Graph.updateEachEdgeAttributes: expecting an updater function.");if(t&&!Pr(t))throw new $r("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const n=this._edges.values();let r,o,i,a;for(;r=n.next(),!0!==r.done;)o=r.value,i=o.source,a=o.target,o.attributes=e(o.key,o.attributes,i.key,a.key,i.attributes,a.attributes,o.undirected);this.emit("eachEdgeAttributesUpdated",{hints:t||null})}forEachAdjacencyEntry(e){if("function"!=typeof e)throw new $r("Graph.forEachAdjacencyEntry: expecting a callback.");mo(0,!1,!1,this,e)}forEachAdjacencyEntryWithOrphans(e){if("function"!=typeof e)throw new $r("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");mo(0,!1,!0,this,e)}forEachAssymetricAdjacencyEntry(e){if("function"!=typeof e)throw new $r("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");mo(0,!0,!1,this,e)}forEachAssymetricAdjacencyEntryWithOrphans(e){if("function"!=typeof e)throw new $r("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");mo(0,!0,!0,this,e)}nodes(){return"function"==typeof Array.from?Array.from(this._nodes.keys()):Nr(this._nodes.keys(),this._nodes.size)}forEachNode(e){if("function"!=typeof e)throw new $r("Graph.forEachNode: expecting a callback.");const t=this._nodes.values();let n,r;for(;n=t.next(),!0!==n.done;)r=n.value,e(r.key,r.attributes)}findNode(e){if("function"!=typeof e)throw new $r("Graph.findNode: expecting a callback.");const t=this._nodes.values();let n,r;for(;n=t.next(),!0!==n.done;)if(r=n.value,e(r.key,r.attributes))return r.key}mapNodes(e){if("function"!=typeof e)throw new $r("Graph.mapNode: expecting a callback.");const t=this._nodes.values();let n,r;const o=new Array(this.order);let i=0;for(;n=t.next(),!0!==n.done;)r=n.value,o[i++]=e(r.key,r.attributes);return o}someNode(e){if("function"!=typeof e)throw new $r("Graph.someNode: expecting a callback.");const t=this._nodes.values();let n,r;for(;n=t.next(),!0!==n.done;)if(r=n.value,e(r.key,r.attributes))return!0;return!1}everyNode(e){if("function"!=typeof e)throw new $r("Graph.everyNode: expecting a callback.");const t=this._nodes.values();let n,r;for(;n=t.next(),!0!==n.done;)if(r=n.value,!e(r.key,r.attributes))return!1;return!0}filterNodes(e){if("function"!=typeof e)throw new $r("Graph.filterNodes: expecting a callback.");const t=this._nodes.values();let n,r;const o=[];for(;n=t.next(),!0!==n.done;)r=n.value,e(r.key,r.attributes)&&o.push(r.key);return o}reduceNodes(e,t){if("function"!=typeof e)throw new $r("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new $r("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let n=t;const r=this._nodes.values();let o,i;for(;o=r.next(),!0!==o.done;)i=o.value,n=e(n,i.key,i.attributes);return n}nodeEntries(){const e=this._nodes.values();return new fr((()=>{const t=e.next();if(t.done)return t;const n=t.value;return{value:{node:n.key,attributes:n.attributes},done:!1}}))}export(){const e=new Array(this._nodes.size);let t=0;this._nodes.forEach(((n,r)=>{e[t++]=function(e,t){const n={key:e};return Or(t.attributes)||(n.attributes=jr({},t.attributes)),n}(r,n)}));const n=new Array(this._edges.size);return t=0,this._edges.forEach(((e,r)=>{n[t++]=function(e,t,n){const r={key:t,source:n.source.key,target:n.target.key};return Or(n.attributes)||(r.attributes=jr({},n.attributes)),"mixed"===e&&n.undirected&&(r.undirected=!0),r}(this.type,r,e)})),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:e,edges:n}}import(e,t=!1){if(e instanceof To)return e.forEachNode(((e,n)=>{t?this.mergeNode(e,n):this.addNode(e,n)})),e.forEachEdge(((e,n,r,o,i,a,s)=>{t?s?this.mergeUndirectedEdgeWithKey(e,r,o,n):this.mergeDirectedEdgeWithKey(e,r,o,n):s?this.addUndirectedEdgeWithKey(e,r,o,n):this.addDirectedEdgeWithKey(e,r,o,n)})),this;if(!Ar(e))throw new $r("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(e.attributes){if(!Ar(e.attributes))throw new $r("Graph.import: invalid attributes. Expecting a plain object.");t?this.mergeAttributes(e.attributes):this.replaceAttributes(e.attributes)}let n,r,o,i,a;if(e.nodes){if(o=e.nodes,!Array.isArray(o))throw new $r("Graph.import: invalid nodes. Expecting an array.");for(n=0,r=o.length;n{const r=jr({},e.attributes);e=new t.NodeDataClass(n,r),t._nodes.set(n,e)})),t}copy(e){if("string"==typeof(e=e||{}).type&&e.type!==this.type&&"mixed"!==e.type)throw new Br(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${e.type}" because this would mean losing information about the current graph.`);if("boolean"==typeof e.multi&&e.multi!==this.multi&&!0!==e.multi)throw new Br("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if("boolean"==typeof e.allowSelfLoops&&e.allowSelfLoops!==this.allowSelfLoops&&!0!==e.allowSelfLoops)throw new Br("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const t=this.emptyCopy(e),n=this._edges.values();let r,o;for(;r=n.next(),!0!==r.done;)o=r.value,No(t,"copy",!1,o.undirected,o.key,o.source.key,o.target.key,jr({},o.attributes));return t}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const e={};this._nodes.forEach(((t,n)=>{e[n]=t.attributes}));const t={},n={};this._edges.forEach(((e,r)=>{const o=e.undirected?"--":"->";let i,a="",s=e.source.key,l=e.target.key;e.undirected&&s>l&&(i=s,s=l,l=i);const d=`(${s})${o}(${l})`;r.startsWith("geid_")?this.multi&&(void 0===n[d]?n[d]=0:n[d]++,a+=`${n[d]}. `):a+=`[${r}]: `,a+=d,t[a]=e.attributes}));const r={};for(const o in this)this.hasOwnProperty(o)&&!xo.has(o)&&"function"!=typeof this[o]&&"symbol"!=typeof o&&(r[o]=this[o]);return r.attributes=this._attributes,r.nodes=e,r.edges=t,Er(r,"constructor",this.constructor),r}}"undefined"!=typeof Symbol&&(To.prototype[Symbol.for("nodejs.util.inspect.custom")]=To.prototype.inspect),[{name:e=>`${e}Edge`,generateKey:!0},{name:e=>`${e}DirectedEdge`,generateKey:!0,type:"directed"},{name:e=>`${e}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:e=>`${e}EdgeWithKey`},{name:e=>`${e}DirectedEdgeWithKey`,type:"directed"},{name:e=>`${e}UndirectedEdgeWithKey`,type:"undirected"}].forEach((e=>{["add","merge","update"].forEach((t=>{const n=e.name(t),r="add"===t?No:Ro;e.generateKey?To.prototype[n]=function(o,i,a){return r(this,n,!0,"undirected"===(e.type||this.type),null,o,i,a,"update"===t)}:To.prototype[n]=function(o,i,a,s){return r(this,n,!1,"undirected"===(e.type||this.type),o,i,a,s,"update"===t)}}))})),function(e){qr.forEach((function({name:t,attacher:n}){n(e,t("Node"),Ur),n(e,t("Source"),Vr),n(e,t("Target"),2),n(e,t("Opposite"),Hr)}))}(To),function(e){Kr.forEach((function({name:t,attacher:n}){n(e,t("Edge"),"mixed"),n(e,t("DirectedEdge"),"directed"),n(e,t("UndirectedEdge"),"undirected")}))}(To),function(e){Yr.forEach((t=>{ao(e,t),function(e,t){const{name:n,type:r,direction:o}=t,i="forEach"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[i]=function(e,t,n){if("mixed"===r||"mixed"===this.type||r===this.type){if(1===arguments.length)return ro(!1,this,r,n=e);if(2===arguments.length){e=""+e,n=t;const a=this._nodes.get(e);if(void 0===a)throw new zr(`Graph.${i}: could not find the "${e}" node in the graph.`);return oo(!1,this.multi,"mixed"===r?this.type:r,o,a,n)}if(3===arguments.length){e=""+e,t=""+t;const a=this._nodes.get(e);if(!a)throw new zr(`Graph.${i}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new zr(`Graph.${i}: could not find the "${t}" target node in the graph.`);return io(!1,r,this.multi,o,a,t,n)}throw new $r(`Graph.${i}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const a="map"+n[0].toUpperCase()+n.slice(1);e.prototype[a]=function(){const e=Array.prototype.slice.call(arguments),t=e.pop();let n;if(0===e.length){let o=0;"directed"!==r&&(o+=this.undirectedSize),"undirected"!==r&&(o+=this.directedSize),n=new Array(o);let i=0;e.push(((e,r,o,a,s,l,d)=>{n[i++]=t(e,r,o,a,s,l,d)}))}else n=[],e.push(((e,r,o,i,a,s,l)=>{n.push(t(e,r,o,i,a,s,l))}));return this[i].apply(this,e),n};const s="filter"+n[0].toUpperCase()+n.slice(1);e.prototype[s]=function(){const e=Array.prototype.slice.call(arguments),t=e.pop(),n=[];return e.push(((e,r,o,i,a,s,l)=>{t(e,r,o,i,a,s,l)&&n.push(e)})),this[i].apply(this,e),n};const l="reduce"+n[0].toUpperCase()+n.slice(1);e.prototype[l]=function(){let e,t,n=Array.prototype.slice.call(arguments);if(n.length<2||n.length>4)throw new $r(`Graph.${l}: invalid number of arguments (expecting 2, 3 or 4 and got ${n.length}).`);if("function"==typeof n[n.length-1]&&"function"!=typeof n[n.length-2])throw new $r(`Graph.${l}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);2===n.length?(e=n[0],t=n[1],n=[]):3===n.length?(e=n[1],t=n[2],n=[n[0]]):4===n.length&&(e=n[2],t=n[3],n=[n[0],n[1]]);let r=t;return n.push(((t,n,o,i,a,s,l)=>{r=e(r,t,n,o,i,a,s,l)})),this[i].apply(this,n),r}}(e,t),function(e,t){const{name:n,type:r,direction:o}=t,i="find"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[i]=function(e,t,n){if("mixed"!==r&&"mixed"!==this.type&&r!==this.type)return!1;if(1===arguments.length)return ro(!0,this,r,n=e);if(2===arguments.length){e=""+e,n=t;const a=this._nodes.get(e);if(void 0===a)throw new zr(`Graph.${i}: could not find the "${e}" node in the graph.`);return oo(!0,this.multi,"mixed"===r?this.type:r,o,a,n)}if(3===arguments.length){e=""+e,t=""+t;const a=this._nodes.get(e);if(!a)throw new zr(`Graph.${i}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new zr(`Graph.${i}: could not find the "${t}" target node in the graph.`);return io(!0,r,this.multi,o,a,t,n)}throw new $r(`Graph.${i}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const a="some"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[a]=function(){const e=Array.prototype.slice.call(arguments),t=e.pop();return e.push(((e,n,r,o,i,a,s)=>t(e,n,r,o,i,a,s))),!!this[i].apply(this,e)};const s="every"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[s]=function(){const e=Array.prototype.slice.call(arguments),t=e.pop();return e.push(((e,n,r,o,i,a,s)=>!t(e,n,r,o,i,a,s))),!this[i].apply(this,e)}}(e,t),so(e,t)}))}(To),function(e){lo.forEach((t=>{go(e,t),function(e,t){const{name:n,type:r,direction:o}=t,i="forEach"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[i]=function(e,t){if("mixed"!==r&&"mixed"!==this.type&&r!==this.type)return;e=""+e;const n=this._nodes.get(e);if(void 0===n)throw new zr(`Graph.${i}: could not find the "${e}" node in the graph.`);po(!1,"mixed"===r?this.type:r,o,n,t)};const a="map"+n[0].toUpperCase()+n.slice(1);e.prototype[a]=function(e,t){const n=[];return this[i](e,((e,r)=>{n.push(t(e,r))})),n};const s="filter"+n[0].toUpperCase()+n.slice(1);e.prototype[s]=function(e,t){const n=[];return this[i](e,((e,r)=>{t(e,r)&&n.push(e)})),n};const l="reduce"+n[0].toUpperCase()+n.slice(1);e.prototype[l]=function(e,t,n){if(arguments.length<3)throw new $r(`Graph.${l}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let r=n;return this[i](e,((e,n)=>{r=t(r,e,n)})),r}}(e,t),function(e,t){const{name:n,type:r,direction:o}=t,i=n[0].toUpperCase()+n.slice(1,-1),a="find"+i;e.prototype[a]=function(e,t){if("mixed"!==r&&"mixed"!==this.type&&r!==this.type)return;e=""+e;const n=this._nodes.get(e);if(void 0===n)throw new zr(`Graph.${a}: could not find the "${e}" node in the graph.`);return po(!0,"mixed"===r?this.type:r,o,n,t)};const s="some"+i;e.prototype[s]=function(e,t){return!!this[a](e,t)};const l="every"+i;e.prototype[l]=function(e,t){return!this[a](e,((e,n)=>!t(e,n)))}}(e,t),fo(e,t)}))}(To);class Co extends To{constructor(e){const t=jr({type:"directed"},e);if("multi"in t&&!1!==t.multi)throw new $r("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("directed"!==t.type)throw new $r('DirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class jo extends To{constructor(e){const t=jr({type:"undirected"},e);if("multi"in t&&!1!==t.multi)throw new $r("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("undirected"!==t.type)throw new $r('UndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class Lo extends To{constructor(e){const t=jr({multi:!0},e);if("multi"in t&&!0!==t.multi)throw new $r("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(t)}}class Ao extends To{constructor(e){const t=jr({type:"directed",multi:!0},e);if("multi"in t&&!0!==t.multi)throw new $r("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("directed"!==t.type)throw new $r('MultiDirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class Oo extends To{constructor(e){const t=jr({type:"undirected",multi:!0},e);if("multi"in t&&!0!==t.multi)throw new $r("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("undirected"!==t.type)throw new $r('MultiUndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}function Eo(e){e.from=function(t,n){const r=jr({},t.options,n),o=new e(r);return o.import(t),o}}var Mo;Eo(To),Eo(Co),Eo(jo),Eo(Lo),Eo(Ao),Eo(Oo),To.Graph=To,To.DirectedGraph=Co,To.UndirectedGraph=jo,To.MultiGraph=Lo,To.MultiDirectedGraph=Ao,To.MultiUndirectedGraph=Oo,To.InvalidArgumentsGraphError=$r,To.NotFoundGraphError=zr,To.UsageGraphError=Br;var Po=Ee;Mo=Po.createRoot,Po.hydrateRoot;const Io=function(e,t,n){let r=Promise.resolve();function o(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then((t=>{for(const e of t||[])"rejected"===e.status&&o(e.reason);return e().catch(o)}))};var $o=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n0},e.prototype.connect_=function(){zo&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Fo?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){zo&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;Go.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Uo=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),ni="undefined"!=typeof WeakMap?new WeakMap:new $o,ri=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Wo.getInstance(),r=new ti(t,n,this);ni.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){ri.prototype[e]=function(){var t;return(t=ni.get(this))[e].apply(t,arguments)}}));var oi=void 0!==Bo.ResizeObserver?Bo.ResizeObserver:ri;window.ResizeObserver||(window.ResizeObserver=oi);var ii=function(){return ii=Object.assign||function(e){for(var t,n=1,r=arguments.length;n`"});var fi=function(e,t){for(var n,r=0,o=Me.Children.toArray(e);r{var t;return null==(t="string"==typeof e||"number"==typeof e?e:e[Object.keys(e)[0]])?void 0:t.toString()},wi=(e,t)=>"string"!=typeof e||$(t)?e:e.toString().replace(new RegExp(function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(t),"gi"),(e=>`${e}`)),xi=(e,t,n)=>(null==t?void 0:t.toLowerCase().indexOf(null==e?void 0:e.toLowerCase()))>=0||(null==n?void 0:n.toLowerCase().indexOf(null==e?void 0:e.toLowerCase()))>=0||bi(e,t)>=.5||bi(e,n)>=.5,Si=(e,t)=>{const n={},r={},{field:o}=e;return o&&Object.keys(o).forEach((e=>{if(!1===e.startsWith("--input"))n[e]=o[e];else{let t=o[e];const n=e.replace("--input-","").replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}));-1!==t.indexOf(".")&&(t=t.substring(t.indexOf(".")+1)),r[n]=t}})),{...t&&{...n,...r,_focusWithin:e.field._focus,pos:"relative",minH:9,py:1.5,spacing:3},cursor:"text",h:"fit-content"}},ki=(e,t)=>fi(e,(e=>{var n;return"AutoCompleteItem"===(null==(n=null==e?void 0:e.type)?void 0:n.displayName)&&e.props.value===(null==t?void 0:t.value)})),Ni=(e,t)=>fi(e,(e=>{var n;return"AutoCompleteItem"===(null==(n=null==e?void 0:e.type)?void 0:n.displayName)&&e.props.value===(null==t?void 0:t.value)}));function Ri(e){var t,n;let{closeOnBlur:r=!0,creatable:o,emphasize:i,emptyState:a=!0,freeSolo:s,isReadOnly:l,listAllValuesOnFocus:d,maxSuggestions:c,multiple:u,closeOnSelect:h=!u,defaultValue:g,defaultValues:y=(g?[g]:[]),onReady:b,defaultIsOpen:v,disableFilter:w,isLoading:x=!1,placement:S="bottom",restoreOnBlurIfEmpty:k=!s,shouldRenderSuggestions:N=(()=>!0),submitKeys:R=[],suggestWhenEmpty:_,value:T,values:C=(T?"string"==typeof T?[T]:[...T]:void 0)}=e;s=s||!!u||e.freeSolo;const{isOpen:j,onClose:G,onOpen:F}=L({defaultIsOpen:v}),W=p(e.children,{isOpen:j,onClose:G,onOpen:F}),U=(e=>yi(e,(e=>{var t;return"AutoCompleteItem"===(null==(t=null==e?void 0:e.type)?void 0:t.displayName)})).map((e=>{const t=B(e.props,["value","label","fixed","disabled"]),{getValue:n=vi}=e.props,r=n(t.value);return{...D(t.label)?t:{...t,label:r},value:r,originalValue:t.value}})))(W),V=Me.useRef(null),H=Me.useRef(null),J=Me.useRef(null),q=Me.useRef(null),[K,Y]=Me.useState(!1);let Q="";u?Q="":f(y)?f(C)||(Q=C[0]):Q=y[0];const[Z,X]=Me.useState(null!==(t=Q)&&void 0!==t?t:""),ee=w?U:U.filter((t=>t.fixed||p(e.filter||xi,Z,t.value,t.label)||K)).filter(((e,t)=>!c||e.fixed||tnull==e?void 0:e.toString())),value:C,onChange:t=>{const n=ne.find((e=>e.value===t[0])),r=t.map((e=>ne.find((t=>t.value===e))));p(e.onChange,u?t:t[0],u?r:n)}}),[ie,ae]=Me.useState(null==(n=U[0])?void 0:n.value),se=e.maxSelections||re.length+1,le=ne.findIndex((e=>e.value===ie)),de=O(le,ne,!!e.rollNavigation),ce=E(le,ne,!!e.rollNavigation),ue=M(ne),pe=P(ne);I((()=>{ae(null==ue?void 0:ue.value)}),[Z]),Me.useEffect((()=>{var e;j||ae(null==(e=U[0])?void 0:e.value)}),[j]),Me.useEffect((()=>{const t=U.find((e=>e.value===ie));p(e.onOptionFocus,{item:t,focusMethod:q.current,isNewInput:null==t?void 0:t.creatable})}),[ie,e.onOptionFocus]);const he=t=>{var n,r;!re.includes(t)&&re.lengthu?[...e,t]:[t]));const o=ne.find((e=>e.value===t));u&&(null==(n=V.current)||n.focus()),e.focusInputOnSelect&&(null==(r=V.current)||r.focus()),p(e.onSelectOption,{item:o,selectMethod:q.current,isNewInput:null==o?void 0:o.creatable}),null!=o&&o.creatable&&p(e.onCreateOption,{item:m(o,["noFilter"]),selectMethod:q.current});const i=(null==o?void 0:o.label)||(null==o?void 0:o.value);X((()=>u?"":null!=i?i:"")),h&&G()},ge=(t,n)=>{var r;oe((n=>{const r=U.find((e=>e.value===t));return p(e.onTagRemoved,t,r,n),n.filter((e=>e!==t))})),Z===t&&X(""),n&&(null==(r=V.current)||r.focus())},fe=u?re.map((e=>{var t;return{label:(null==(t=U.find((t=>t.value===(null==e?void 0:e.toString()))))?void 0:t.label)||e,onRemove:()=>ge(e)}})):[];return Me.useEffect((()=>{p(b,{tags:fe})}),[re]),{autoCompleteProps:e,children:W,filteredList:ne,filteredResults:ee,focusedValue:ie,getEmptyStateProps:e=>{if(ne.every((e=>e.noFilter))&&a&&!o)return"boolean"==typeof a?e:p(a,{query:Z})},getGroupProps:e=>{const t=((e,t)=>D(fi(e,(e=>{var n,r;const o=p((null==(n=e.props)?void 0:n.getValue)||vi,(null==(r=e.props)?void 0:r.value)||{});return t.some((e=>e.value===o))}))))(e.children,ne);return{divider:{hasFirstChild:ki(e.children,ue),hasLastChild:Ni(e.children,P(ne.filter((e=>f(null==e?void 0:e.noFilter)))))},group:{display:t?"initial":"none"}}},getInputProps:(t,n)=>{const{onBlur:o,onChange:i,onFocus:a,onKeyDown:s,variant:c,...h}=t;return{wrapper:{ref:H,onClick:()=>{var e;null==(e=null==V?void 0:V.current)||e.focus()},...Si(n,u),...h},input:{isReadOnly:l,onFocus:t=>{p(a,t),e.openOnFocus&&!l&&F(),e.selectOnFocus&&t.target.select(),d&&Y(!0)},onBlur:e=>{var t,n;p(o,e);const i=e.relatedTarget===(null==J?void 0:J.current)||(null==(t=J.current)?void 0:t.contains(e.relatedTarget)),a=null==(n=H.current)?void 0:n.contains(e.relatedTarget);if(!i&&!a&&(r&&G(),!re.includes(e.target.value)&&k)){const e=P(re),t=U.find((t=>t.value===e)),n=(null==t?void 0:t.label)||(null==t?void 0:t.value)||"";X(n)}},onChange:e=>{const t=e.target.value;p(i,e),X(t);const n=$(t);!p(N,t)||n&&!_?G():F(),Y(!1)},onKeyDown:e=>{var t;p(s,e),q.current="keyboard";const{key:n}=e,r=ne[le];return["Enter",...R].includes(n)?(!r||null!=r&&r.disabled?null==(t=V.current)||t.focus():he(null==r?void 0:r.value),void e.preventDefault()):"ArrowDown"===n?(j?ae(null==de?void 0:de.value):F(),void e.preventDefault()):"ArrowUp"===n?(j?ae(null==ce?void 0:ce.value):F(),void e.preventDefault()):"Tab"!==n?"Home"===n?(ae(null==ue?void 0:ue.value),void e.preventDefault()):"End"===n?(ae(null==pe?void 0:pe.value),void e.preventDefault()):void("Escape"===n&&(G(),e.preventDefault())):void(!j||!r||null!=r&&r.disabled?G():he(null==r?void 0:r.value))},value:Z,variant:u?"unstyled":c,...h}}},getItemProps:(e,t)=>{var n;const{_fixed:r,_focus:o,children:a,disabled:s,label:l,value:d,fixed:c,getValue:u=vi,onClick:h,onMouseOver:g,sx:f,...m}=e,y=t?d:null==(n=u(d))?void 0:n.toString(),b=y===ie,v=ne.findIndex((e=>e.value===y))>=0,w=a||l||y;return{item:{..."string"==typeof w&&i?{dangerouslySetInnerHTML:{__html:wi(w,Z)}}:{children:w},"aria-selected":re.includes(y),"aria-disabled":s,_disabled:{opacity:.4,cursor:"not-allowed",userSelect:"none"},onClick:e=>{var t;p(h,e),s?null==(t=V.current)||t.focus():he(y)},onMouseOver:e=>{p(g,e),ae(y),q.current="mouse"},sx:{...f,mark:{color:"inherit",bg:"transparent",...z(i)?i:{fontWeight:i?"extrabold":"inherit"}}},...b&&(o||{bg:"whiteAlpha.100",_light:{bg:"gray.200"}}),...c&&r,...m},root:{isValidSuggestion:v,value:y}}},inputRef:V,interactionRef:q,isLoading:x,isOpen:j,itemList:U,listRef:J,onClose:G,onOpen:F,placement:S,query:Z,removeItem:ge,resetItems:e=>{var t;oe([]),e&&(null==(t=V.current)||t.focus())},setQuery:X,tags:fe,values:re}}const _i=c(((e,t)=>{const n=Ri(e),{children:r,isOpen:o,onClose:i,onOpen:a,placement:l,resetItems:d,removeItem:c}=n;return Me.useImperativeHandle(t,(()=>({resetItems:d,removeItem:c}))),pi.jsx(hi,{value:n,children:pi.jsx(h,{isLazy:!0,isOpen:o,onClose:i,onOpen:a,autoFocus:!1,placement:l,closeOnBlur:!0,matchWidth:!0,children:pi.jsx(s.div,{w:"full",ref:t,children:r})})})}));_i.displayName="AutoComplete";const Ti=c(((e,t)=>{const{focusedValue:n,getItemProps:r,interactionRef:o}=gi(),i=Me.useRef(),a=g(t,i),s=r(e),{isValidSuggestion:l,value:d}=s.root,c=n===d;Me.useEffect((()=>{var e;c&&"keyboard"===o.current&&(null==(e=null==i?void 0:i.current)||e.scrollIntoView({behavior:"smooth",block:"center"}))}),[c,o]),Me.useEffect((()=>{"string"!=typeof d&&console.warn("wow"),"string"!=typeof d&&f(e.getValue)&&console.error("You must define the `getValue` prop, when an Item's value is not a string")}),[]);const{children:u,dangerouslySetInnerHTML:p,...h}=s.item,b=m(h,["groupId"]);return l?pi.jsx(y,{ref:a,...Ci,...b,children:u||pi.jsx("span",{dangerouslySetInnerHTML:p})}):null}));Ti.displayName="AutoCompleteItem";const Ci={mx:"2",px:"2",py:"2",rounded:"md",cursor:"pointer"},ji=c(((e,t)=>{const{children:n,showDivider:r,...o}=e,i=m(o,["groupSibling"]),{getGroupProps:a}=gi(),{group:s}=a(e),l=Oi(e);return pi.jsxs(b,{ref:t,...s,...i,children:[pi.jsx(v,{...l.top}),n,pi.jsx(v,{...l.bottom})]})})),Li=c(((e,t)=>pi.jsx(y,{...Ai,...e,ref:t})));ji.displayName="AutoCompleteGroup",Li.displayName="AutoCompleteGroupTitle";const Ai={ml:5,my:1,fontSize:"xs",letterSpacing:"wider",fontWeight:"extrabold",textTransform:"uppercase"},Oi=e=>{const{getGroupProps:t}=gi(),n=e.groupSibling,{divider:{hasFirstChild:r,hasLastChild:o}}=t(e),i={my:2,borderColor:e.dividerColor};return{top:{...i,mb:4,display:!e.showDivider||r?"none":""},bottom:{...i,display:!e.showDivider||o||n?"none":""}}},Ei=c(((e,t)=>{const{isLoading:n}=gi(),{loadingIcon:r,...o}=e;return pi.jsxs(w,{children:[pi.jsx(x,{...o,ref:t}),n&&pi.jsx(S,{children:r||pi.jsx(k,{})})]})})),Mi=c(((e,t)=>{const{autoCompleteProps:n,inputRef:r,getInputProps:o,tags:i,setQuery:a}=gi(),{children:s,isInvalid:l,hidePlaceholder:d,...c}=e,{value:u}=c;Me.useEffect((()=>{void 0!==u&&("string"==typeof u||u instanceof String)&&a(u)}),[u]);const h=N("Input",e);let{wrapper:f,input:m}=o(c,h);const{ref:y,...b}=f,v=g(t,r),w=p(s,{tags:i});d&&(m={...m,placeholder:Array.isArray(w)&&w.length?void 0:m.placeholder});const x=pi.jsx(Ei,{isInvalid:l,...m,ref:v}),S=pi.jsxs(R,{...b,ref:y,children:[w,pi.jsx(_,{as:Ei,...m,ref:v})]});return pi.jsx(T,{children:n.multiple?S:x})}));Mi.displayName="Input",Mi.id="Input";var Pi=Me.createContext({});function Ii(){const e=Me.useContext(Pi);if(void 0===e)throw new Error("useColorMode must be used within a ColorModeProvider");return e}function $i(){const e=Ii(),t=function(){const e=Me.useContext(V);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}();return{...e,theme:t}}Pi.displayName="ColorModeContext";var zi=(...e)=>e.filter(Boolean).join(" ");function Bi(e){const t=typeof e;return null!=e&&("object"===t||"function"===t)&&!Array.isArray(e)}function Di(e,...t){return Gi(e)?e(...t):e}var Gi=e=>"function"==typeof e,Fi={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",l="[object Null]",d="[object Object]",c="[object Proxy]",u="[object Undefined]",p=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,g={};g["[object Float32Array]"]=g["[object Float64Array]"]=g["[object Int8Array]"]=g["[object Int16Array]"]=g["[object Int32Array]"]=g["[object Uint8Array]"]=g["[object Uint8ClampedArray]"]=g["[object Uint16Array]"]=g["[object Uint32Array]"]=!0,g[o]=g["[object Array]"]=g["[object ArrayBuffer]"]=g["[object Boolean]"]=g["[object DataView]"]=g["[object Date]"]=g["[object Error]"]=g[a]=g["[object Map]"]=g["[object Number]"]=g[d]=g["[object RegExp]"]=g["[object Set]"]=g["[object String]"]=g["[object WeakMap]"]=!1;var f="object"==typeof si&&si&&si.Object===Object&&si,m="object"==typeof self&&self&&self.Object===Object&&self,y=f||m||Function("return this")(),b=t&&!t.nodeType&&t,v=b&&e&&!e.nodeType&&e,w=v&&v.exports===b,x=w&&f.process,S=function(){try{return v&&v.require&&v.require("util").types||x&&x.binding&&x.binding("util")}catch{}}(),k=S&&S.isTypedArray,N=Array.prototype,R=Function.prototype,_=Object.prototype,T=y["__core-js_shared__"],C=R.toString,j=_.hasOwnProperty,L=function(){var e=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),A=_.toString,O=C.call(Object),E=RegExp("^"+C.call(j).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=w?y.Buffer:void 0,P=y.Symbol,I=y.Uint8Array;M&&M.allocUnsafe;var $=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object),z=Object.create,B=_.propertyIsEnumerable,D=N.splice,G=P?P.toStringTag:void 0,F=function(){try{var e=pe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),W=M?M.isBuffer:void 0,U=Math.max,V=Date.now,H=pe(y,"Map"),J=pe(Object,"create"),q=function(){function e(){}return function(t){if(!Ne(t))return{};if(z)return z(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function K(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},Y.prototype.set=function(e,t){var n=this.__data__,r=ne(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Q.prototype.clear=function(){this.size=0,this.__data__={hash:new K,map:new(H||Y),string:new K}},Q.prototype.delete=function(e){var t=ue(this,e).delete(e);return this.size-=t?1:0,t},Q.prototype.get=function(e){return ue(this,e).get(e)},Q.prototype.has=function(e){return ue(this,e).has(e)},Q.prototype.set=function(e,t){var n=ue(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Z.prototype.clear=function(){this.__data__=new Y,this.size=0},Z.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Z.prototype.get=function(e){return this.__data__.get(e)},Z.prototype.has=function(e){return this.__data__.has(e)},Z.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Y){var r=n.__data__;if(!H||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Q(r)}return n.set(e,t),this.size=n.size,this};var oe=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}return e};function ie(e){return null==e?void 0===e?u:l:G&&G in Object(e)?function(e){var t=j.call(e,G),n=e[G];try{e[G]=void 0;var r=!0}catch{}var o=A.call(e);return r&&(t?e[G]=n:delete e[G]),o}(e):function(e){return A.call(e)}(e)}function ae(e){return Re(e)&&ie(e)==o}function se(e){return!(!Ne(e)||function(e){return!!L&&L in e}(e))&&(Se(e)?E:p).test(function(e){if(null!=e){try{return C.call(e)}catch{}try{return e+""}catch{}}return""}(e))}function le(e){if(!Ne(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ge(e),n=[];for(var r in e)"constructor"==r&&(t||!j.call(e,r))||n.push(r);return n}function de(e,t,n,r,o){e!==t&&oe(t,(function(i,a){if(o||(o=new Z),Ne(i))!function(e,t,n,r,o,i,a){var s=fe(e,n),l=fe(t,n),c=a.get(l);if(c)ee(e,n,c);else{var u=i?i(s,l,n+"",e,t,a):void 0,p=void 0===u;if(p){var h=ve(l),g=!h&&xe(l),f=!h&&!g&&_e(l);u=l,h||g||f?ve(s)?u=s:function(e){return Re(e)&&we(e)}(s)?u=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(F?function(e,t){return F(e,"toString",{configurable:!0,enumerable:!1,value:je(t),writable:!0})}:Le);function ye(e,t){return e===t||e!=e&&t!=t}var be=ae(function(){return arguments}())?ae:function(e){return Re(e)&&j.call(e,"callee")&&!B.call(e,"callee")},ve=Array.isArray;function we(e){return null!=e&&ke(e.length)&&!Se(e)}var xe=W||function(){return!1};function Se(e){if(!Ne(e))return!1;var t=ie(e);return t==a||t==s||t==i||t==c}function ke(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Ne(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Re(e){return null!=e&&"object"==typeof e}var _e=k?function(e){return function(t){return e(t)}}(k):function(e){return Re(e)&&ke(e.length)&&!!g[ie(e)]};function Te(e){return we(e)?X(e):le(e)}var Ce=function(e){return ce((function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&function(e,t,n){if(!Ne(n))return!1;var r=typeof t;return!!("number"==r?we(n)&&he(t,n.length):"string"==r&&t in n)&&ye(n[t],e)}(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r"string"==typeof e?e.replace(/!(important)?$/,"").trim():e,Vi=(e,t)=>n=>{const r=String(t),o=(e=>/!(important)?$/.test(e))(r),i=Ui(r),a=e?`${e}.${i}`:i;let s=Bi(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=Ui(s),o?`${s} !important`:s};function Hi(e){const{scale:t,transform:n,compose:r}=e;return(e,o)=>{var i;const a=Vi(t,e)(o);let s=null!=(i=null==n?void 0:n(a,o))?i:a;return r&&(s=r(s,o)),s}}var Ji=(...e)=>t=>e.reduce(((e,t)=>t(e)),t);function qi(e,t){return n=>{const r={property:n,scale:e};return r.transform=Hi({scale:e,transform:t}),r}}var Ki=({rtl:e,ltr:t})=>n=>"rtl"===n.direction?e:t,Yi=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"],Qi={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},Zi={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"},Xi={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},ea={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},ta=new Set(Object.values(ea)),na=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),ra=e=>e.trim(),oa=e=>"string"==typeof e&&e.includes("(")&&e.includes(")"),ia=e=>t=>`${e}(${t})`,aa={filter:e=>"auto"!==e?e:Qi,backdropFilter:e=>"auto"!==e?e:Zi,ring:e=>function(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}(aa.px(e)),bgClip:e=>"text"===e?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e},transform:e=>"auto"===e?["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...Yi].join(" "):"auto-gpu"===e?["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...Yi].join(" "):e,vh:e=>"$100vh"===e?"var(--chakra-vh)":e,px(e){if(null==e)return e;const{unitless:t}=(e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}})(e);return t||"number"==typeof e?`${e}px`:e},fraction:e=>"number"!=typeof e||e>1?e:100*e+"%",float:(e,t)=>"rtl"===t.direction?{left:"right",right:"left"}[e]:e,degree(e){if(function(e){return/^var\(--.+\)$/.test(e)}(e)||null==e)return e;const t="string"==typeof e&&!e.endsWith("deg");return"number"==typeof e||t?`${e}deg`:e},gradient:(e,t)=>function(e,t){if(null==e||na.has(e))return e;if(!oa(e)&&!na.has(e))return`url('${e}')`;const n=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),r=null==n?void 0:n[1],o=null==n?void 0:n[2];if(!r||!o)return e;const i=r.includes("-gradient")?r:`${r}-gradient`,[a,...s]=o.split(",").map(ra).filter(Boolean);if(0===(null==s?void 0:s.length))return e;const l=a in ea?ea[a]:a;return s.unshift(l),`${i}(${s.map((e=>{if(ta.has(e))return e;const n=e.indexOf(" "),[r,o]=-1!==n?[e.substr(0,n),e.substr(n+1)]:[e],i=oa(o)?o:o&&o.split(" "),a=`colors.${r}`,s=a in t.__cssMap?t.__cssMap[a].varRef:r;return i?[s,...Array.isArray(i)?i:[i]].join(" "):s})).join(", ")})`}(e,null!=t?t:{}),blur:ia("blur"),opacity:ia("opacity"),brightness:ia("brightness"),contrast:ia("contrast"),dropShadow:ia("drop-shadow"),grayscale:ia("grayscale"),hueRotate:ia("hue-rotate"),invert:ia("invert"),saturate:ia("saturate"),sepia:ia("sepia"),bgImage:e=>null==e||oa(e)||na.has(e)?e:`url(${e})`,outline(e){const t="0"===String(e)||"none"===String(e);return null!==e&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;const{space:n,divide:r}=null!=(t=Xi[e])?t:{},o={flexDirection:e};return n&&(o[n]=1),r&&(o[r]=1),o}},sa={borderWidths:qi("borderWidths"),borderStyles:qi("borderStyles"),colors:qi("colors"),borders:qi("borders"),gradients:qi("gradients",aa.gradient),radii:qi("radii",aa.px),space:qi("space",Ji(aa.vh,aa.px)),spaceT:qi("space",Ji(aa.vh,aa.px)),degreeT:e=>({property:e,transform:aa.degree}),prop:(e,t,n)=>({property:e,scale:t,...t&&{transform:Hi({scale:t,transform:n})}}),propT:(e,t)=>({property:e,transform:t}),sizes:qi("sizes",Ji(aa.vh,aa.px)),sizesT:qi("sizes",Ji(aa.vh,aa.fraction)),shadows:qi("shadows"),logical:function(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:Ki(t),transform:n?Hi({scale:n,compose:r}):r}},blur:qi("blur",aa.blur)},la={background:sa.colors("background"),backgroundColor:sa.colors("backgroundColor"),backgroundImage:sa.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:aa.bgClip},bgSize:sa.prop("backgroundSize"),bgPosition:sa.prop("backgroundPosition"),bg:sa.colors("background"),bgColor:sa.colors("backgroundColor"),bgPos:sa.prop("backgroundPosition"),bgRepeat:sa.prop("backgroundRepeat"),bgAttachment:sa.prop("backgroundAttachment"),bgGradient:sa.gradients("backgroundImage"),bgClip:{transform:aa.bgClip}};Object.assign(la,{bgImage:la.backgroundImage,bgImg:la.backgroundImage});var da={border:sa.borders("border"),borderWidth:sa.borderWidths("borderWidth"),borderStyle:sa.borderStyles("borderStyle"),borderColor:sa.colors("borderColor"),borderRadius:sa.radii("borderRadius"),borderTop:sa.borders("borderTop"),borderBlockStart:sa.borders("borderBlockStart"),borderTopLeftRadius:sa.radii("borderTopLeftRadius"),borderStartStartRadius:sa.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:sa.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:sa.radii("borderTopRightRadius"),borderStartEndRadius:sa.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:sa.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:sa.borders("borderRight"),borderInlineEnd:sa.borders("borderInlineEnd"),borderBottom:sa.borders("borderBottom"),borderBlockEnd:sa.borders("borderBlockEnd"),borderBottomLeftRadius:sa.radii("borderBottomLeftRadius"),borderBottomRightRadius:sa.radii("borderBottomRightRadius"),borderLeft:sa.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:sa.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:sa.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:sa.borders(["borderLeft","borderRight"]),borderInline:sa.borders("borderInline"),borderY:sa.borders(["borderTop","borderBottom"]),borderBlock:sa.borders("borderBlock"),borderTopWidth:sa.borderWidths("borderTopWidth"),borderBlockStartWidth:sa.borderWidths("borderBlockStartWidth"),borderTopColor:sa.colors("borderTopColor"),borderBlockStartColor:sa.colors("borderBlockStartColor"),borderTopStyle:sa.borderStyles("borderTopStyle"),borderBlockStartStyle:sa.borderStyles("borderBlockStartStyle"),borderBottomWidth:sa.borderWidths("borderBottomWidth"),borderBlockEndWidth:sa.borderWidths("borderBlockEndWidth"),borderBottomColor:sa.colors("borderBottomColor"),borderBlockEndColor:sa.colors("borderBlockEndColor"),borderBottomStyle:sa.borderStyles("borderBottomStyle"),borderBlockEndStyle:sa.borderStyles("borderBlockEndStyle"),borderLeftWidth:sa.borderWidths("borderLeftWidth"),borderInlineStartWidth:sa.borderWidths("borderInlineStartWidth"),borderLeftColor:sa.colors("borderLeftColor"),borderInlineStartColor:sa.colors("borderInlineStartColor"),borderLeftStyle:sa.borderStyles("borderLeftStyle"),borderInlineStartStyle:sa.borderStyles("borderInlineStartStyle"),borderRightWidth:sa.borderWidths("borderRightWidth"),borderInlineEndWidth:sa.borderWidths("borderInlineEndWidth"),borderRightColor:sa.colors("borderRightColor"),borderInlineEndColor:sa.colors("borderInlineEndColor"),borderRightStyle:sa.borderStyles("borderRightStyle"),borderInlineEndStyle:sa.borderStyles("borderInlineEndStyle"),borderTopRadius:sa.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:sa.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:sa.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:sa.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(da,{rounded:da.borderRadius,roundedTop:da.borderTopRadius,roundedTopLeft:da.borderTopLeftRadius,roundedTopRight:da.borderTopRightRadius,roundedTopStart:da.borderStartStartRadius,roundedTopEnd:da.borderStartEndRadius,roundedBottom:da.borderBottomRadius,roundedBottomLeft:da.borderBottomLeftRadius,roundedBottomRight:da.borderBottomRightRadius,roundedBottomStart:da.borderEndStartRadius,roundedBottomEnd:da.borderEndEndRadius,roundedLeft:da.borderLeftRadius,roundedRight:da.borderRightRadius,roundedStart:da.borderInlineStartRadius,roundedEnd:da.borderInlineEndRadius,borderStart:da.borderInlineStart,borderEnd:da.borderInlineEnd,borderTopStartRadius:da.borderStartStartRadius,borderTopEndRadius:da.borderStartEndRadius,borderBottomStartRadius:da.borderEndStartRadius,borderBottomEndRadius:da.borderEndEndRadius,borderStartRadius:da.borderInlineStartRadius,borderEndRadius:da.borderInlineEndRadius,borderStartWidth:da.borderInlineStartWidth,borderEndWidth:da.borderInlineEndWidth,borderStartColor:da.borderInlineStartColor,borderEndColor:da.borderInlineEndColor,borderStartStyle:da.borderInlineStartStyle,borderEndStyle:da.borderInlineEndStyle});var ca={color:sa.colors("color"),textColor:sa.colors("color"),fill:sa.colors("fill"),stroke:sa.colors("stroke")},ua={boxShadow:sa.shadows("boxShadow"),mixBlendMode:!0,blendMode:sa.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:sa.prop("backgroundBlendMode"),opacity:!0};Object.assign(ua,{shadow:ua.boxShadow});var pa={filter:{transform:aa.filter},blur:sa.blur("--chakra-blur"),brightness:sa.propT("--chakra-brightness",aa.brightness),contrast:sa.propT("--chakra-contrast",aa.contrast),hueRotate:sa.degreeT("--chakra-hue-rotate"),invert:sa.propT("--chakra-invert",aa.invert),saturate:sa.propT("--chakra-saturate",aa.saturate),dropShadow:sa.propT("--chakra-drop-shadow",aa.dropShadow),backdropFilter:{transform:aa.backdropFilter},backdropBlur:sa.blur("--chakra-backdrop-blur"),backdropBrightness:sa.propT("--chakra-backdrop-brightness",aa.brightness),backdropContrast:sa.propT("--chakra-backdrop-contrast",aa.contrast),backdropHueRotate:sa.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:sa.propT("--chakra-backdrop-invert",aa.invert),backdropSaturate:sa.propT("--chakra-backdrop-saturate",aa.saturate)},ha={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:aa.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:sa.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:sa.space("gap"),rowGap:sa.space("rowGap"),columnGap:sa.space("columnGap")};Object.assign(ha,{flexDir:ha.flexDirection});var ga={gridGap:sa.space("gridGap"),gridColumnGap:sa.space("gridColumnGap"),gridRowGap:sa.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},fa={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:aa.outline},outlineOffset:!0,outlineColor:sa.colors("outlineColor")},ma={width:sa.sizesT("width"),inlineSize:sa.sizesT("inlineSize"),height:sa.sizes("height"),blockSize:sa.sizes("blockSize"),boxSize:sa.sizes(["width","height"]),minWidth:sa.sizes("minWidth"),minInlineSize:sa.sizes("minInlineSize"),minHeight:sa.sizes("minHeight"),minBlockSize:sa.sizes("minBlockSize"),maxWidth:sa.sizes("maxWidth"),maxInlineSize:sa.sizes("maxInlineSize"),maxHeight:sa.sizes("maxHeight"),maxBlockSize:sa.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var n,r,o;return{[`@media screen and (min-width: ${null!=(o=null==(r=null==(n=t.__breakpoints)?void 0:n.get(e))?void 0:r.minW)?o:e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var n,r,o;return{[`@media screen and (max-width: ${null!=(o=null==(r=null==(n=t.__breakpoints)?void 0:n.get(e))?void 0:r._minW)?o:e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:sa.propT("float",aa.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(ma,{w:ma.width,h:ma.height,minW:ma.minWidth,maxW:ma.maxWidth,minH:ma.minHeight,maxH:ma.maxHeight,overscroll:ma.overscrollBehavior,overscrollX:ma.overscrollBehaviorX,overscrollY:ma.overscrollBehaviorY});var ya={listStyleType:!0,listStylePosition:!0,listStylePos:sa.prop("listStylePosition"),listStyleImage:!0,listStyleImg:sa.prop("listStyleImage")},ba=(e=>{const t=new WeakMap;return(n,r,o,i)=>{if(typeof n>"u")return e(n,r,o);t.has(n)||t.set(n,new Map);const a=t.get(n);if(a.has(r))return a.get(r);const s=e(n,r,o,i);return a.set(r,s),s}})((function(e,t,n,r){const o="string"==typeof t?t.split("."):[t];for(r=0;r{const r={},o=ba(e,t,{});for(const i in o)i in n&&null!=n[i]||(r[i]=o[i]);return r},Sa={srOnly:{transform:e=>!0===e?va:"focusable"===e?wa:{}},layerStyle:{processResult:!0,transform:(e,t,n)=>xa(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>xa(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>xa(t,e,n)}},ka={position:!0,pos:sa.prop("position"),zIndex:sa.prop("zIndex","zIndices"),inset:sa.spaceT("inset"),insetX:sa.spaceT(["left","right"]),insetInline:sa.spaceT("insetInline"),insetY:sa.spaceT(["top","bottom"]),insetBlock:sa.spaceT("insetBlock"),top:sa.spaceT("top"),insetBlockStart:sa.spaceT("insetBlockStart"),bottom:sa.spaceT("bottom"),insetBlockEnd:sa.spaceT("insetBlockEnd"),left:sa.spaceT("left"),insetInlineStart:sa.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:sa.spaceT("right"),insetInlineEnd:sa.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(ka,{insetStart:ka.insetInlineStart,insetEnd:ka.insetInlineEnd});var Na={ring:{transform:aa.ring},ringColor:sa.colors("--chakra-ring-color"),ringOffset:sa.prop("--chakra-ring-offset-width"),ringOffsetColor:sa.colors("--chakra-ring-offset-color"),ringInset:sa.prop("--chakra-ring-inset")},Ra={margin:sa.spaceT("margin"),marginTop:sa.spaceT("marginTop"),marginBlockStart:sa.spaceT("marginBlockStart"),marginRight:sa.spaceT("marginRight"),marginInlineEnd:sa.spaceT("marginInlineEnd"),marginBottom:sa.spaceT("marginBottom"),marginBlockEnd:sa.spaceT("marginBlockEnd"),marginLeft:sa.spaceT("marginLeft"),marginInlineStart:sa.spaceT("marginInlineStart"),marginX:sa.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:sa.spaceT("marginInline"),marginY:sa.spaceT(["marginTop","marginBottom"]),marginBlock:sa.spaceT("marginBlock"),padding:sa.space("padding"),paddingTop:sa.space("paddingTop"),paddingBlockStart:sa.space("paddingBlockStart"),paddingRight:sa.space("paddingRight"),paddingBottom:sa.space("paddingBottom"),paddingBlockEnd:sa.space("paddingBlockEnd"),paddingLeft:sa.space("paddingLeft"),paddingInlineStart:sa.space("paddingInlineStart"),paddingInlineEnd:sa.space("paddingInlineEnd"),paddingX:sa.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:sa.space("paddingInline"),paddingY:sa.space(["paddingTop","paddingBottom"]),paddingBlock:sa.space("paddingBlock")};Object.assign(Ra,{m:Ra.margin,mt:Ra.marginTop,mr:Ra.marginRight,me:Ra.marginInlineEnd,marginEnd:Ra.marginInlineEnd,mb:Ra.marginBottom,ml:Ra.marginLeft,ms:Ra.marginInlineStart,marginStart:Ra.marginInlineStart,mx:Ra.marginX,my:Ra.marginY,p:Ra.padding,pt:Ra.paddingTop,py:Ra.paddingY,px:Ra.paddingX,pb:Ra.paddingBottom,pl:Ra.paddingLeft,ps:Ra.paddingInlineStart,paddingStart:Ra.paddingInlineStart,pr:Ra.paddingRight,pe:Ra.paddingInlineEnd,paddingEnd:Ra.paddingInlineEnd});var _a={textDecorationColor:sa.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:sa.shadows("textShadow")},Ta={clipPath:!0,transform:sa.propT("transform",aa.transform),transformOrigin:!0,translateX:sa.spaceT("--chakra-translate-x"),translateY:sa.spaceT("--chakra-translate-y"),skewX:sa.degreeT("--chakra-skew-x"),skewY:sa.degreeT("--chakra-skew-y"),scaleX:sa.prop("--chakra-scale-x"),scaleY:sa.prop("--chakra-scale-y"),scale:sa.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:sa.degreeT("--chakra-rotate")},Ca={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:sa.prop("transitionDuration","transition.duration"),transitionProperty:sa.prop("transitionProperty","transition.property"),transitionTimingFunction:sa.prop("transitionTimingFunction","transition.easing")},ja={fontFamily:sa.prop("fontFamily","fonts"),fontSize:sa.prop("fontSize","fontSizes",aa.px),fontWeight:sa.prop("fontWeight","fontWeights"),lineHeight:sa.prop("lineHeight","lineHeights"),letterSpacing:sa.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(!0===e)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},La={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:sa.spaceT("scrollMargin"),scrollMarginTop:sa.spaceT("scrollMarginTop"),scrollMarginBottom:sa.spaceT("scrollMarginBottom"),scrollMarginLeft:sa.spaceT("scrollMarginLeft"),scrollMarginRight:sa.spaceT("scrollMarginRight"),scrollMarginX:sa.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:sa.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:sa.spaceT("scrollPadding"),scrollPaddingTop:sa.spaceT("scrollPaddingTop"),scrollPaddingBottom:sa.spaceT("scrollPaddingBottom"),scrollPaddingLeft:sa.spaceT("scrollPaddingLeft"),scrollPaddingRight:sa.spaceT("scrollPaddingRight"),scrollPaddingX:sa.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:sa.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function Aa(e){return Bi(e)&&e.reference?e.reference:String(e)}var Oa=(e,...t)=>t.map(Aa).join(` ${e} `).replace(/calc/g,""),Ea=(...e)=>`calc(${Oa("+",...e)})`,Ma=(...e)=>`calc(${Oa("-",...e)})`,Pa=(...e)=>`calc(${Oa("*",...e)})`,Ia=(...e)=>`calc(${Oa("/",...e)})`,$a=e=>{const t=Aa(e);return null==t||Number.isNaN(parseFloat(t))?Pa(t,-1):String(t).startsWith("-")?String(t).slice(1):`-${t}`},za=Object.assign((e=>({add:(...t)=>za(Ea(e,...t)),subtract:(...t)=>za(Ma(e,...t)),multiply:(...t)=>za(Pa(e,...t)),divide:(...t)=>za(Ia(e,...t)),negate:()=>za($a(e)),toString:()=>e.toString()})),{add:Ea,subtract:Ma,multiply:Pa,divide:Ia,negate:$a});function Ba(e){if(null==e)return e;const{unitless:t}=function(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}(e);return t||"number"==typeof e?`${e}px`:e}function Da(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${Ba(e)})`),t&&n.push("and",`(max-width: ${Ba(t)})`),n.join(" ")}var Ga=(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,Fa=(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,Wa=(e,t)=>`${e}:focus-visible ${t}`,Ua=(e,t)=>`${e}:focus-within ${t}`,Va=(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,Ha=(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,Ja=(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,qa=(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,Ka=(e,t)=>`${e}:placeholder-shown ${t}`,Ya=e=>Za((t=>e(t,"&")),"[role=group]","[data-group]",".group"),Qa=e=>Za((t=>e(t,"~ &")),"[data-peer]",".peer"),Za=(e,...t)=>t.map(e).join(", "),Xa={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Ya(Ga),_peerHover:Qa(Ga),_groupFocus:Ya(Fa),_peerFocus:Qa(Fa),_groupFocusVisible:Ya(Wa),_peerFocusVisible:Qa(Wa),_groupActive:Ya(Va),_peerActive:Qa(Va),_groupDisabled:Ya(Ha),_peerDisabled:Qa(Ha),_groupInvalid:Ya(Ja),_peerInvalid:Qa(Ja),_groupChecked:Ya(qa),_peerChecked:Qa(qa),_groupFocusWithin:Ya(Ua),_peerFocusWithin:Qa(Ua),_peerPlaceholderShown:Qa(Ka),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},es=Object.keys(Xa),ts=Wi({},la,da,ca,ha,ma,pa,Na,fa,ga,Sa,ka,ua,Ra,La,ja,_a,Ta,ya,Ca);Object.assign({},Ra,ma,ha,ga,ka);var ns=[...Object.keys(ts),...es],rs={...ts,...Xa},os=(e,t)=>e.startsWith("--")&&"string"==typeof t&&!function(e){return/^var\(--.+\)$/.test(e)}(t),is=(e,t)=>{var n,r;if(null==t)return t;const o=t=>{var n,r;return null==(r=null==(n=e.__cssMap)?void 0:n[t])?void 0:r.varRef},i=e=>{var t;return null!=(t=o(e))?t:e},[a,s]=function(e){const t=[];let n="",r=!1;for(let o=0;o{var a,s,l;const d=Di(e,r),c=(e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:o}=t.__breakpoints,i={};for(const a in e){let s=Di(e[a],t);if(null==s)continue;if(s=Bi(s)&&n(s)?r(s):s,!Array.isArray(s)){i[a]=s;continue}const l=s.slice(0,o.length).length;for(let e=0;e{Wi(s,{[e]:c?g[e]:{[h]:g[e]}})}));continue}if(!u){c?Wi(s,g):s[h]=g;continue}s[h]=g}}return s}}function ds(e){return function(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}(e,["styleConfig","size","variant","colorScheme"])}var cs=typeof Element<"u",us="function"==typeof Map,ps="function"==typeof Set,hs="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function gs(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,o,i;if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(!gs(e[r],t[r]))return!1;return!0}if(us&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!gs(r.value[1],t.get(r.value[0])))return!1;return!0}if(ps&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(hs&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)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&&"function"==typeof e.valueOf&&"function"==typeof t.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof t.toString)return e.toString()===t.toString();if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if(cs&&e instanceof Element)return!1;for(r=n;0!=r--;)if(("_owner"!==o[r]&&"__v"!==o[r]&&"__o"!==o[r]||!e.$$typeof)&&!gs(e[o[r]],t[o[r]]))return!1;return!0}return e!=e&&t!=t}const fs=li((function(e,t){try{return gs(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}));function ms(e,t={}){var n;const{styleConfig:r,...o}=t,{theme:i,colorMode:a}=$i(),s=e?G(i,`components.${e}`):void 0,l=r||s,d=F({theme:i,colorMode:a},null!=(n=null==l?void 0:l.defaultProps)?n:{},W(m(o,["children"]))),c=Me.useRef({});if(l){const e=function(e){return t=>{var n;const{variant:r,size:o,theme:i}=t,a=ls(i);return Wi({},Di(null!=(n=e.baseStyle)?n:{},t),a(e,"sizes",o,t),a(e,"variants",r,t))}}(l)(d);fs(c.current,e)||(c.current=e)}return c.current}var ys=new Set([...ns,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),bs=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function vs(e){return bs.has(e)||!ys.has(e)}var ws,xs=null!=(ws=u.default)?ws:u,Ss=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:o,sx:i,...a}=t,s=U(a,((e,t)=>(e=>e in rs)(t))),l=function(e,...t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");const n={...e};for(const r of t)if(null!=r)for(const e in r)Object.prototype.hasOwnProperty.call(r,e)&&(e in n&&delete n[e],n[e]=r[e]);return n}({},o,p(e,t),W(s),i),d=(e=>t=>as({theme:t,pseudos:Xa,configs:ts})(e))(l)(t.theme);return r?[d,r]:d};function ks(e,t){const{baseStyle:n,...r}=null!=t?t:{};r.shouldForwardProp||(r.shouldForwardProp=vs);const o=Ss({baseStyle:n}),i=xs(e,r)(o);return Pe.forwardRef((function(e,t){const{colorMode:n,forced:r}=Ii();return Pe.createElement(i,{ref:t,"data-theme":r?n:void 0,...e})}))}var Ns=function(){const e=new Map;return new Proxy(ks,{apply:(e,t,n)=>ks(...n),get:(t,n)=>(e.has(n)||e.set(n,ks(n)),e.get(n))})}();function Rs(e){return Me.forwardRef(e)}var _s={path:pi.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[pi.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),pi.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),pi.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Ts=Rs(((e,t)=>{const{as:n,viewBox:r,color:o="currentColor",focusable:i=!1,children:a,className:s,__css:l,...d}=e,c=zi("chakra-icon",s),u=function(e,t={}){return ms(e,t)}("Icon",e),p={ref:t,focusable:i,className:c,__css:{w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o,...l,...u}},h=null!=r?r:_s.viewBox;if(n&&"string"!=typeof n)return pi.jsx(Ns.svg,{as:n,...p,...d});const g=null!=a?a:_s.path;return pi.jsx(Ns.svg,{verticalAlign:"middle",viewBox:h,...p,...d,children:g})}));Ts.displayName="Icon",Rs((function(e,t){const{spacing:n="0.5rem",spacingX:r,spacingY:o,children:i,justify:a,direction:s,align:l,className:d,shouldWrapChildren:c,...u}=e,p=Me.useMemo((()=>c?Me.Children.map(i,((e,t)=>pi.jsx(Cs,{children:e},t))):i),[i,c]);return pi.jsx(Ns.div,{ref:t,className:zi("chakra-wrap",d),...u,children:pi.jsx(Ns.ul,{className:"chakra-wrap__list",__css:{display:"flex",flexWrap:"wrap",justifyContent:a,alignItems:l,flexDirection:s,listStyleType:"none",gap:n,columnGap:r,rowGap:o,padding:"0"},children:p})})})).displayName="Wrap";var Cs=Rs((function(e,t){const{className:n,...r}=e;return pi.jsx(Ns.li,{ref:t,__css:{display:"flex",alignItems:"flex-start"},className:zi("chakra-wrap__listitem",n),...r})}));Cs.displayName="WrapItem";var js=Ns("div");js.displayName="Box";var Ls=Rs((function(e,t){const{size:n,centerContent:r=!0,...o}=e,i=r?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return pi.jsx(js,{ref:t,boxSize:n,__css:{...i,flexShrink:0,flexGrow:0},...o})}));Ls.displayName="Square",Rs((function(e,t){const{size:n,...r}=e;return pi.jsx(Ls,{size:n,ref:t,borderRadius:"9999px",...r})})).displayName="Circle";var As=Rs((function(e,t){const{direction:n,align:r,justify:o,wrap:i,basis:a,grow:s,shrink:l,...d}=e,c={display:"flex",flexDirection:n,alignItems:r,justifyContent:o,flexWrap:i,flexBasis:a,flexGrow:s,flexShrink:l};return pi.jsx(Ns.div,{ref:t,__css:c,...d})}));As.displayName="Flex";const Os=e=>{const{getEmptyStateProps:t}=gi(),n=t(pi.jsx(As,{...Es,children:"No options found!"}));return pi.jsx(js,{...e,children:n})},Es={fontSize:"sm",align:"center",justify:"center",fontWeight:"bold",fontStyle:"italic"},Ms=["AutoCompleteGroup","AutoCompleteItem","AutoCompleteCreatable"],Ps=c(((e,t)=>{const{children:n,loadingState:r,...o}=e,{listRef:i,isLoading:a}=gi(),s=g(t,i),[l,d]=(e=>{const t=Pe.Children.map(e,((t,n)=>{var r;if("AutoCompleteGroup"===(null==(r=null==t?void 0:t.type)?void 0:r.displayName)){const r=Pe.Children.toArray(e)[n+1];return Pe.cloneElement(t,{groupSibling:!!r&&"AutoCompleteGroup"===r.type.displayName})}return t})),n=Pe.Children.toArray(t).filter((e=>{var t;return!Ms.includes(null==(t=null==e?void 0:e.type)?void 0:t.displayName)}));return[Pe.Children.toArray(t).filter((e=>{var t;return Ms.includes(null==(t=null==e?void 0:e.type)?void 0:t.displayName)})),n]})(n);return pi.jsxs(C,{ref:s,w:"inherit",...Is,...o,children:[a&&pi.jsx(j,{children:r||pi.jsx(k,{size:"md"})}),!a&&pi.jsxs(pi.Fragment,{children:[l,pi.jsx(Os,{}),d]})]})}));Ps.displayName="AutoCompleteList";const Is={py:"4",opacity:"0",bg:"#232934",rounded:"md",maxH:"350px",border:"none",shadow:"base",zIndex:"popover",overflowY:"auto",_light:{bg:"#ffffff"},_focus:{boxShadow:"none"}};var[$s,zs]=function(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:i,defaultValue:a}=e,s=Me.createContext(a);return s.displayName=t,[s.Provider,function e(){var t;const a=Me.useContext(s);if(!a&&n){const n=new Error(null!=i?i:function(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}(r,o));throw n.name="ContextError",null==(t=Error.captureStackTrace)||t.call(Error,n,e),n}return a},s]}({name:"TagStylesContext",errorMessage:"useTagStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),Bs=Rs(((e,t)=>{const n=function(e,t={}){return ms(e,t)}("Tag",e),r=ds(e),o={display:"inline-flex",verticalAlign:"top",alignItems:"center",maxWidth:"100%",...n.container};return pi.jsx($s,{value:n,children:pi.jsx(Ns.span,{ref:t,...r,__css:o})})}));Bs.displayName="Tag";var Ds=Rs(((e,t)=>{const n=zs();return pi.jsx(Ns.span,{ref:t,noOfLines:1,...e,__css:n.label})}));Ds.displayName="TagLabel",Rs(((e,t)=>pi.jsx(Ts,{ref:t,verticalAlign:"top",marginEnd:"0.5rem",...e}))).displayName="TagLeftIcon",Rs(((e,t)=>pi.jsx(Ts,{ref:t,verticalAlign:"top",marginStart:"0.5rem",...e}))).displayName="TagRightIcon";var Gs=e=>pi.jsx(Ts,{verticalAlign:"inherit",viewBox:"0 0 512 512",...e,children:pi.jsx("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"})});Gs.displayName="TagCloseIcon";var Fs=Rs(((e,t)=>{const{isDisabled:n,children:r,...o}=e,i={display:"flex",alignItems:"center",justifyContent:"center",outline:"0",...zs().closeButton};return pi.jsx(Ns.button,{ref:t,"aria-label":"close",...o,type:"button",disabled:n,__css:i,children:r||pi.jsx(Gs,{})})}));Fs.displayName="TagCloseButton",Me.memo((e=>{const{label:t,onRemove:n,disabled:r,...o}=e;return pi.jsx(Cs,{children:pi.jsxs(Bs,{borderRadius:"md",fontWeight:"normal",...r&&Ws,...o,children:[pi.jsx(Ds,{children:t}),pi.jsx(Fs,{onClick:()=>!r&&p(n),cursor:"pointer",...r&&Ws})]})})}));const Ws={cursor:"text",userSelect:"none",opacity:.4,_focus:{boxShadow:"none"}};var Us=function(){return Us=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},qs=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},el=e("b1",Me.forwardRef((function(e,t){var n=e.validator,r=e.onDebouncedChange,o=e.delay,a=e.optionList,s=e.defaultValue;e.onChange;var l=Zs(e,["validator","onDebouncedChange","delay","optionList","defaultValue","onChange"]),d=Me.useRef(null),c=g(d,t),u=Me.useRef("datalist-"+(new Date).valueOf()),p=Xs(Me.useState(!1),2),h=p[0],f=p[1],m=Me.useRef();return Me.useEffect((function(){d.current&&(d.current.value=(null==s?void 0:s.toString())||"")}),[s]),i.jsxs(i.Fragment,{children:[i.jsx(x,Qs({ref:c,list:u.current,variant:"flushed",size:"sm",h:6,onChange:function(e){var t=e.target.value;window.clearTimeout(m.current),n&&f(!n(t)),m.current=window.setTimeout((function(){null==r||r(t),m.current=void 0}),null!=o?o:500)},onBlur:function(e){var t=e.target.value;void 0!==m.current&&(window.clearTimeout(m.current),n&&f(!n(t)),null==r||r(t),m.current=void 0)},isInvalid:h},l)),a&&i.jsx("datalist",{id:u.current,children:null==a?void 0:a.map((function(e,t){return i.jsx("option",{children:e},t)}))})]})}))),tl=function(){return tl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},il=function(e){switch(e){case nt.DEV:return"red";case nt.UAT:return"orange";case nt.PRD:return"green"}},al=function(e,t,n){var r=new Blob([n],{type:t});sl(e,r)},sl=function(e,t){var n=window.URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(n)},ll=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function dl(e){var t=e.cancelRef,n=e.isOpen,r=e.onClose,o=ll(Me.useState(!1),2),a=o[0],s=o[1];return i.jsxs(te,{leastDestructiveRef:t,isOpen:n,onClose:r,children:[i.jsx(ne,{}),i.jsxs(re,{children:[i.jsx(oe,{children:"Warning 警告"}),i.jsx(ie,{}),i.jsxs(ae,{sx:{"& p":{my:1}},children:[i.jsx(se,{children:"Are you sure you want to reset the app? The webpage local storage for this app will be cleared. A copy of the local storage will be downloaded and it may be used for restoration (varies with app)."}),i.jsx(se,{children:"確定重設該應用程式嗎?應用程式的網頁本地儲存將會被清除。本地儲存的副本可供下載及用於復原(因應用程式而異)。"}),i.jsx(se,{children:"确定重置本应用程序吗?应用程序的网页本地存储将会被清除。本地存储的拷贝可供下载以及用于还原(因应用程序而異)。"})]}),i.jsxs(le,{children:[i.jsx(J,{ref:t,onClick:r,children:"Cancel"}),i.jsx(J,{isLoading:a,colorScheme:"red",ml:3,onClick:function(){s(!0);var e=qn.storage.getAll(),t=qn.getAppName(),n="".concat(t,"_BACKUP_").concat((new Date).toISOString(),".json");al(n,"application/json",JSON.stringify(e)),qn.storage.clear(),setTimeout((function(){window.location.reload()}),2e3)},children:"Confirm and reload"})]})]})]})}var cl=function(){return cl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function hl(e){var t=e.error,n=e.errorInfo,o=e.allowReset,a=e.sx,s=ul(e,["error","errorInfo","allowReset","sx"]),l=r("RmgErrorBoundary"),d=de("primary.500","primary.300"),c=pl(Me.useState(!1),2),u=c[0],p=c[1],h=Me.useRef(null),g=function(e){return i.jsx(ce,{color:d,role:"button",onClick:function(){return p(!0)},children:e})},f=qn.getAppName(),m=i.jsx(ce,{color:d,href:"https://github.com/railmapgen/".concat(f,"/issues"),isExternal:!0,children:"GitHub Issue"});return i.jsxs(ue,cl({status:"error",sx:cl(cl({},l),a)},s,{children:[i.jsx(pe,{}),i.jsx(he,{children:"Something went wrong!"}),i.jsxs(ge,{children:[i.jsxs(se,{children:["Please try to refresh or re-import your configuration files. If the issue still persists, please consider upgrading your browser",o?i.jsxs(i.Fragment,{children:[" or ",g("reset this app")]}):"",". Should you need any help, please contact us by submitting an issue in ",m," with the details shown below."]}),i.jsxs(se,{children:["請嘗試重新整理或重新上載設定檔。如果問題仍然存在,請考慮更新你的瀏覽器",o?i.jsxs(i.Fragment,{children:["或",g("重設該應用程式")]}):"","。如需協助或與我們聯絡,請前往 ",m," 提交一個 Issue 並附以詳細資料。"]}),i.jsxs(se,{children:["请尝试刷新或者重新上传配置文件。如果问题仍然存在,请考虑更新您的浏览器",o?i.jsxs(i.Fragment,{children:["或者",g("重置本应用程序")]}):"","。如需帮助或者联系我们,请前往 ",m," 提交一个 Issue 并附上详细信息。"]}),i.jsxs(se,{as:"details",children:[null==t?void 0:t.toString(),i.jsx("br",{}),null==n?void 0:n.componentStack]}),o&&i.jsx(dl,{cancelRef:h,isOpen:u,onClose:function(){return p(!1)}})]})]}))}var gl,fl=(gl=function(e,t){return gl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},gl(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}gl(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),ml=function(){return ml=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function Rl(e){var t=e.defaultValue,n=e.options,r=e.disabledOptions,o=kl(e,["defaultValue","options","disabledOptions"]),a=Me.useRef(null);Me.useEffect((function(){a.current&&(a.current.value=(null==t?void 0:t.toString())||"")}),[t]);var s=function(e,t){return i.jsx("option",{value:e,disabled:void 0!==(null==r?void 0:r.find((function(t){return t.toString()===e}))),children:t},e)};return i.jsx(ye,Sl({ref:a,variant:"flushed",size:"sm",h:6},o,{children:Object.entries(n).map((function(e){var t=Nl(e,2),n=t[0],r=t[1];return"object"==typeof r?i.jsx("optgroup",{label:n,children:Object.entries(r).map((function(e){var t=Nl(e,2),n=t[0],r=t[1];return s(n,r)}))},n):s(n,r)}))}))}var _l=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Tl=(e("u",(function(e,t,n){var r=_l(Me.useState(t()),2),o=r[0],i=r[1];return Me.useEffect((function(){e.then((function(){console.debug("[rmg-components] Getter updates finished"),i(t())}))}),[]),o})),function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}),Cl=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function Al(e){var t=e.defaultValue,n=e.min,o=e.max,a=e.step,s=e.onThrottledChange,l=e.leftIcon,d=e.rightIcon,c=r("RmgThrottledSlider"),u=Ll(Me.useState(null!=t?t:0),2),p=u[0],h=u[1];Me.useEffect((function(){void 0!==t&&p!==t&&h(t)}),[t]);var g=jl(null!=s?s:function(){},500);return i.jsxs(y,{sx:c,children:[l&&i.jsx(be,{size:"xs",variant:"ghost","aria-label":"Drag left",icon:l,onClick:function(){var e=Math.max(p-10*(null!=a?a:1),null!=n?n:0);null==s||s(e),h(e)}}),i.jsxs(ve,{value:p,min:n,max:o,step:a,onChange:function(e){g(e),h(e)},children:[i.jsx(we,{children:i.jsx(xe,{})}),i.jsx(Se,{})]}),d&&i.jsx(be,{size:"xs",variant:"ghost","aria-label":"Drag right",icon:d,onClick:function(){var e=Math.min(p+10*(null!=a?a:1),null!=o?o:100);null==s||s(e),h(e)}})]})}var Ol=function(e){var t=e.children,n=e.noWrap,o=r("RmgOutput",{noWrap:n});return i.jsx(s.output,{sx:o,children:t})};function El(e){var t=e.fields,n=e.noLabel,r=e.minW;return i.jsx(y,{wrap:"wrap",children:t.map((function(e,t){if(e.hidden)return i.jsx(Me.Fragment,{},t);var o=e.minW||r,a="full"===o;return i.jsx(xl,{className:a?"mw-full":"",label:e.label,flex:a?void 0:1,minW:a?void 0:o,noLabel:n,oneLine:e.oneLine,children:function(e){switch(e.type){case"input":return i.jsx(el,{placeholder:e.placeholder,defaultValue:e.value,type:e.variant,validator:e.validator,onDebouncedChange:e.onChange,delay:e.debouncedDelay,optionList:e.optionList,isDisabled:e.isDisabled});case"output":return i.jsx(Ol,{noWrap:e.noWrap,children:e.value});case"textarea":return i.jsx(rl,{placeholder:e.placeholder,defaultValue:e.value,onDebouncedChange:e.onChange,isDisabled:e.isDisabled});case"slider":return i.jsx(Al,{defaultValue:e.value,min:e.min,max:e.max,step:e.step,onThrottledChange:e.onChange,leftIcon:e.leftIcon,rightIcon:e.rightIcon,isDisabled:e.isDisabled});case"select":return i.jsx(Rl,{defaultValue:e.value,onChange:function(t){var n,r=t.target.value;return null===(n=e.onChange)||void 0===n?void 0:n.call(e,"number"==typeof e.value?Number(r):r.toString())},options:e.options,disabledOptions:e.disabledOptions,isInvalid:e.isInvalid,isDisabled:e.isDisabled});case"switch":return i.jsx(ke,{isChecked:e.isChecked,isDisabled:e.isDisabled,onChange:function(t){var n,r=t.target.checked;return null===(n=e.onChange)||void 0===n?void 0:n.call(e,r)}});case"custom":return e.component;default:return i.jsx("div",{})}}(e)},t)}))})}var Ml=function(){return Ml=Object.assign||function(e){for(var t,n=1,r=arguments.length;n span:last-of-type":{position:"absolute",right:8}},"& .rmg-multi-select__icon-wrapper":{display:"inline-flex",justifyContent:"center",w:6,h:"100%",position:"absolute",right:2,top:0,fontSize:"xl","& svg":{h:"1em",w:"1em"}},"& .chakra-popover__content":{w:"unset",minW:200},"& .chakra-popover__body":{p:0,"li label":{p:2,w:"100%",_hover:{bg:"dark"===n?"whiteAlpha.200":"gray.100"},_active:{bg:"dark"===n?"whiteAlpha.300":"gray.200"}}}}}},Hl=function(){return Hl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n button:first-of-type":{ml:1}}},RmgLoader:{baseStyle:{w:"100%",h:"100%",position:"absolute",top:0,right:0,alignItems:"center",justifyContent:"center","& .rmg-loader__backdrop":{position:"absolute",w:"100%",h:"100%",zIndex:1500,bg:"blackAlpha.400"},"& .chakra-progress":{zIndex:2e3}}},RmgMultiSelect:Vl,RmgOutput:ql,RmgPage:{baseStyle:{position:"relative",flexDirection:"column",flex:1,overflow:"hidden",background:"inherit"}},RmgPageHeader:{baseStyle:{alignItems:"center",flexWrap:"wrap",pl:2,pr:3,py:1,zIndex:10}},RmgSection:{baseStyle:{position:"relative",background:"inherit"}},RmgSectionHeader:{baseStyle:{display:"flex",alignItems:"center",flexWrap:"wrap",position:"sticky",top:0,background:"inherit",px:2,py:1,zIndex:5}},RmgSidePanel:{baseStyle:function(e){var t=e.colorMode,n=e.width,r=e.alwaysOverlay;return{height:"100%",position:r?"absolute":{base:"absolute",lg:"relative"},right:r?0:{base:0,lg:"unset"},background:"light"===t?"white":"gray.800",boxShadow:"lg",flexShrink:0,flexDirection:"column",transition:"0.3s ease-in-out",maxW:0,visibility:"hidden",zIndex:5,"&.show-side-panel":{maxW:{base:"100%",sm:n},w:{base:"100%",sm:"unset"},visibility:"initial"},"& .rmg-side-panel__inner":{flexDirection:"column",h:"100%",w:{base:"100vw",sm:n}},"& .rmg-side-panel__header":{flexShrink:0,pl:3,pr:1,py:0,"& button":{ml:"auto"}},"& .rmg-side-panel__body":{display:"flex",flexDirection:"column",flex:1,overflowY:"auto",p:1},"& .rmg-side-panel__footer":{display:"flex",justifyContent:"flex-end",p:1}}}},RmgThrottledSlider:{baseStyle:{h:6,alignItems:"center","& .chakra-button:first-of-type":{mr:1},"& .chakra-button:last-of-type":{ml:1}}},RmgWindow:{baseStyle:{position:"relative",flexDirection:"column",height:"100%",overflow:"hidden",background:"inherit"}},RmgWindowHeader:{baseStyle:{px:2,alignItems:"center",zIndex:15,minH:10,transition:"0.3s ease-in-out"}}},Yl=function(){return Yl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n(e.RailMap="railmap",e.Platform="platform",e))(nd||{})),rd=e("aW",(e=>(e.Metro="metro",e.NationalRail="nationalrail",e.LightRail="lightrail",e.Footpath="footpath",e))(rd||{})),od=e("E",(e=>(e.APP_LOAD="APP_LOAD",e.ADD_STATION="ADD_STATION",e.ADD_LINE="ADD_LINE",e.IMPORT_RMG_PARAM="IMPORT_RMG_PARAM",e.IMPORT_WORK_FROM_GALLERY="IMPORT_WORK_FROM_GALLERY",e.DOWNLOAD_PARAM="DOWNLOAD_PARAM",e.DOWNLOAD_IMAGES="DOWNLOAD_IMAGES",e.LOAD_TUTORIAL="LOAD_TUTORIAL",e))(od||{})),id=e("K",(e=>(e.LOGIN_STATE="rmp__login_state",e.APP="rmp__app",e.PARAM="rmp__param",e.PARAM_BACKUP="rmp__param__backup",e.DO_NOT_SHOW_RMT_MSG="rmp__doNotShowRMTMsg",e.ACCOUNT="rmg-home__account",e))(id||{})),ad=e("C",(e=>(e.Other="other",e.Beijing="beijing",e.Berlin="berlin",e.Chongqing="chongqing",e.Foshan="foshan",e.Guangzhou="guangzhou",e.Hongkong="hongkong",e.Kunming="kunming",e.London="london",e.Qingdao="qingdao",e.Shanghai="shanghai",e.Shenzhen="shenzhen",e.Singapore="singapore",e.Suzhou="suzhou",e.Tokyo="tokyo",e))(ad||{})),sd=e("a3",(e=>(e.Shmetro="shmetro",e.Bjsubway="bjsubway",e))(sd||{}));e("aq","https://railmapgen.org/v1/randomStationNames");const ld={RMP_CLOUD:!1,RMP_EXPORT:!1},dd=Ie({name:"account",initialState:{state:"logged-out",activeSubscriptions:ld,token:void 0},reducers:{setState:(e,t)=>{e.state=t.payload},setActiveSubscriptions:(e,t)=>{e.activeSubscriptions=t.payload},setToken:(e,t)=>{e.token=t.payload}}}),{setState:cd,setActiveSubscriptions:ud,setToken:pd}=dd.actions,hd=dd.reducer;var gd;e("M",gd),function(e){e.black="#000",e.white="#fff"}(gd||e("M",gd={}));var fd=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(Hp){i(Hp)}}function s(e){try{l(r.throw(e))}catch(Hp){i(Hp)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};let md={};const yd=(e,t)=>fd(void 0,void 0,void 0,(function*(){return yield((e,t)=>fd(void 0,void 0,void 0,(function*(){if(e in md)return md[e];const n=yield fetch(e,t),r=yield n.json();return md[e]=r,r})))(`/rmg-palette/resources/palettes/${e}.json`,{signal:t})}));var bd=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(Hp){i(Hp)}}function s(e){try{l(r.throw(e))}catch(Hp){i(Hp)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};e("Y",((e,t,n)=>bd(void 0,void 0,void 0,(function*(){const[t,n]=e;if("other"===t)return e;try{const r=(yield yd(t)).find((e=>e.id===n));return r?[t,n,r.colour,r.fg||gd.white]:(console.warn(`[rmg-palette] updateTheme(${t}, ${n}), line does not exist, returning old theme`),e)}catch(Hp){throw console.error(`[rmg-palette] updateTheme(${t}, ${n}), unexpected error occurs`,Hp),Hp}})))),e("ax",(e=>{const t=e.currentTarget.getBoundingClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}})),e("U",((e,t,n,r)=>({x:e*n/100+r.x,y:t*n/100+r.y}))),e("aB",((e,t)=>Math.round(e/t)*t)),e("e",(e=>{let[t,n,r,o]=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MIN_VALUE,Number.MIN_VALUE];return e.forEachNode(((e,i)=>{const a=document.getElementById(e);if(a){const e=vd(a);t=Math.min(e.x,t),n=Math.min(e.y,n),r=Math.max(e.x+e.width,r),o=Math.max(e.y+e.height,o)}})),t-=50,n-=50,r+=100,o+=100,{xMin:t,yMin:n,xMax:r,yMax:o}})),e("p",(e=>{var t,n;return{width:(null!==(t=e.width)&&void 0!==t?t:720)-40,height:(null!==(n=e.height)&&void 0!==n?n:1280)-40}}));const vd=e=>{const t=e.getBBox(),n=e.ownerSVGElement,r=e.parentNode.getScreenCTM().inverse().multiply(e.getScreenCTM()),o=[n.createSVGPoint(),n.createSVGPoint(),n.createSVGPoint(),n.createSVGPoint()];o[0].x=t.x,o[0].y=t.y,o[1].x=t.x+t.width,o[1].y=t.y,o[2].x=t.x+t.width,o[2].y=t.y+t.height,o[3].x=t.x,o[3].y=t.y+t.height;let[i,a,s,l]=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MIN_VALUE,Number.MIN_VALUE];return o.forEach((e=>{e=e.matrixTransform(r),i=Math.min(i,e.x),s=Math.max(s,e.x),a=Math.min(a,e.y),l=Math.max(l,e.y)})),t.x=i,t.width=s-i,t.y=a,t.height=l-a,t},wd=(e("a9",navigator.platform.startsWith("Mac")),async(e,t="SHA-256")=>{const n=(new TextEncoder).encode(e),r=await crypto.subtle.digest(t,n);return Array.from(new Uint8Array(r)).map((e=>e.toString(16).padStart(2,"0"))).join("")});e("b3",(()=>`#${Math.floor(16777215*Math.random()).toString(16).padStart(6,"0")}`)),e("b4",(e=>(299*parseInt(e.slice(1,3),16)+587*parseInt(e.slice(3,5),16)+114*parseInt(e.slice(5,7),16))/1e3>=128?gd.black:gd.white));var xd=e("J",(e=>(e.SAVE_CHANGED="SAVE_CHANGED",e.TOKEN_REQUEST="TOKEN_REQUEST",e))(xd||{}));const Sd=e("B",new BroadcastChannel("rmt-save-manager"));let kd,Nd;const Rd=e("_",(async()=>{Kn.debug("Requesting token from RMT"),Sd.postMessage({type:"TOKEN_REQUEST",from:"rmp"})})),_d=e=>{var t;const n=t=>{if(!t)return Kn.debug("Account string is empty, logging out"),e.dispatch(pd(void 0)),e.dispatch(cd("logged-out")),void e.dispatch(ud(ld));const n=JSON.parse(t),{token:r}=n;(async(e,t)=>{Kn.debug(`Updating token to: ${t}`),e.dispatch(pd(t))})(e,r),(async(e,t)=>{const n=await fetch("https://railmapgen.org/v1/subscription",{headers:{accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${t}`}});if(200!==n.status)return Kn.debug("Token is invalid, expiring the login state"),e.dispatch(cd("expired")),void e.dispatch(ud(ld));e.dispatch(cd("free"));const r=(await n.json()).subscriptions,o=structuredClone(ld);for(const i of r){const t=i.type;t in o&&(e.dispatch(cd("subscriber")),o[t]=!0)}e.dispatch(ud(o)),Kn.debug(`Token is valid, setting active subscriptions: ${JSON.stringify(o)}`)})(e,r)};let r=localStorage.getItem(id.ACCOUNT);n(null!==(t=r)&&void 0!==t?t:void 0),window.onstorage=()=>{const e=localStorage.getItem(id.ACCOUNT);r!==e&&(r=e,Kn.debug(`Account string changed to: ${e}`),n(null!=e?e:void 0))}};let Td=e("n",((e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t}));var Cd=e("k",(e=>(e.Diagonal="diagonal",e.Perpendicular="perpendicular",e.RotatePerpendicular="ro-perp",e.Simple="simple",e))(Cd||{})),jd=e("o",(e=>(e.SingleColor="single-color",e.ShanghaiSuburbanRailway="sh-sub-rwy",e.ShmetroVirtualInt="shmetro-virtual-int",e.GzmtrVirtualInt="gzmtr-virtual-int",e.GZMTRLoop="gzmtr-loop",e.ChinaRailway="china-railway",e.BjsubwaySingleColor="bjsubway-single-color",e.BjsubwayTram="bjsubway-tram",e.BjsubwayDotted="bjsubway-dotted",e.DualColor="dual-color",e.River="river",e.MTRRaceDays="mtr-race-days",e.MTRLightRail="mtr-light-rail",e.MTRUnpaidArea="mtr-unpaid-area",e.MTRPaidArea="mtr-paid-area",e.MRTUnderConstruction="mrt-under-constr",e.MRTSentosaExpress="mrt-sentosa-express",e.JREastSingleColor="jr-east-single-color",e.JREastSingleColorPattern="jr-east-single-color-pattern",e.LRTSingleColor="lrt-single-color",e.LondonTubeTerminal="london-tube-terminal",e.LondonTubeInternalInt="london-tube-internal-int",e.LondonTube10MinWalk="london-tube-10-min-walk",e.LondonRail="london-rail",e.LondonSandwich="london-sandwich",e.LondonLutonAirportDART="london-DART",e.LondonIFSCloudCableCar="london-dangleway",e.GuangdongIntercityRailway="gd-intercity-rwy",e))(jd||{}));e("L",["single-color","bjsubway-single-color","bjsubway-tram","bjsubway-dotted","china-railway","mtr-race-days","mtr-light-rail","mrt-under-constr","jr-east-single-color","jr-east-single-color-pattern","lrt-single-color","london-sandwich","london-DART","london-dangleway"]);const Ld={offset:0},Ad={generatePath:(e,t,n,r,o=Ld)=>{const{offset:i=Ld.offset}=o,a=Math.abs((r-n)/(t-e));if(a===1/0)return`M ${e+i} ${n} L ${t+i} ${r}`;if(0===a)return`M ${e} ${n+i} L ${t} ${r+i}`;{const o=1/a,s=i/Math.sqrt(o*o+1),l=s*o*-Math.sign((t-e)*(r-n));return`M ${e+s} ${n+l} L ${t+s} ${r+l}`}},icon:i.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:i.jsx("path",{d:"M6,18L18,6",stroke:"currentColor",fill:"none"})}),defaultAttrs:Ld,attrsComponent:e=>{var t;const{id:n,attrs:r,handleAttrsUpdate:o}=e,{t:a}=$e(),s=[{type:"input",label:a("panel.details.lines.simple.offset"),value:(null!==(t=r.offset)&&void 0!==t?t:Ld.offset).toString(),variant:"number",onChange:e=>{r.offset=Number(e),o(n,r)},minW:"full"}];return i.jsx(El,{fields:s})},metadata:{displayName:"panel.details.lines.simple.displayName"}},Od=(e("aT",{translateX:0,translateY:0,scale:1,rotate:0}),e("aD",3));var Ed=e("av",(e=>(e.Virtual="virtual",e.ShmetroNumLineBadge="shmetro-num-line-badge",e.ShmetroTextLineBadge="shmetro-text-line-badge",e.GzmtrLineBadge="gzmtr-line-badge",e.BjsubwayNumLineBadge="bjsubway-num-line-badge",e.BjsubwayTextLineBadge="bjsubway-text-line-badge",e.SuzhouRTNumLineBadge="suzhourt-num-line-badge",e.BerlinSBahnLineBadge="berlin-s-bahn-line-badge",e.BerlinUBahnLineBadge="berlin-u-bahn-line-badge",e.ChongqingRTNumLineBadge="chongqingrt-num-line-badge",e.ChongqingRTTextLineBadge="chongqingrt-text-line-badge",e.ShenzhenMetroNumLineBadge="shenzhen-metro-num-line-badge",e.MRTDestinationNumbers="mrt-num-line-badge",e.JREastLineBadge="jr-east-line-badge",e.QingdaoMetroNumLineBadge="qingdao-metro-num-line-badge",e.MRTLineBadge="mrt-line-badge",e.GuangdongIntercityRailwayLineBadge="gd-intercity-rwy-line-badge",e.LondonArrow="london-arrow",e.Facilities="facilities",e.Text="text",e.I18nText="i18n-text",e.Master="master",e))(Ed||{})),Md={en:{},"zh-Hans":{Action:"操作",Apps:"应用程序","Back to list":"返回列表","Background colour":"背景色",Black:"黑",Cancel:"取消",City:"城市",Components:"组件","Configuration file":"配置文件",Confirm:"确定",Continue:"继续","Country/Region":"国家/地区",Copy:"复制",Edit:"编辑","Foreground colour":"前景色","Go back":"返回",Language:"语言/Language",Justification:"理由",Name:"名称",Next:"下一步",Open:"打开",Palette:"调色板","Please select...":"请选择...",Previous:"上一步","Rail Map Generator":"铁路线路图生成器","Rail Map Painter":"地铁线路图绘制器","Rail Map Toolkit":"线路图工具包",Remove:"删除",Reset:"重置","RMG Templates":"RMG 模板","RMP Gallery":"RMP 画廊","RMP Designer":"RMP 设计师","Seed Project":"种子项目",Settings:"设置",Submit:"提交",Translate:"翻译",Upload:"上传",White:"白"},"zh-Hant":{Action:"動作",Apps:"應用程式","Back to list":"返回列表","Background colour":"背景色",Black:"黑",Cancel:"取消",City:"城市",Components:"元件","Configuration file":"設定檔",Confirm:"確定",Continue:"繼續",Copy:"複製","Country/Region":"國家/地區",Edit:"編輯","Foreground colour":"前景色","Go back":"返回",Language:"語言/Language",Justification:"理由",Name:"名稱",Next:"下一步",Open:"開啟",Palette:"調色盤","Please select...":"請選擇...",Previous:"上一步","Rail Map Generator":"鐵路路綫圖產生器","Rail Map Painter":"地鐵路綫圖繪製器","Rail Map Toolkit":"路綫圖工具組",Remove:"移除",Reset:"重設","RMG Templates":"RMG 範本","RMP Gallery":"RMP 畫廊","RMP Designer":"RMP 設計師","Seed Project":"種子項目",Settings:"設定",Submit:"提交",Translate:"翻譯",Upload:"上載",White:"白"},ja:{Language:"言語/Language",Palette:"調色板","Rail Map Generator":"鉄道路線図ジェネレータ","Rail Map Painter":"鉄道路線図画家","Rail Map Toolkit":"路線図ツールキット",Remove:"削除","RMG Templates":"RMG テンプレート","RMP Gallery":"RMP 画廊","RMP Designer":"RMP 図案家"},ko:{Action:"조작",Apps:"앱","Back to list":"다시 목록으로","Background colour":"배경색",Black:"블랙",Cancel:"취소",City:"도시",Components:"요소","Configuration file":"환경 설정 파일",Confirm:"확인",Copy:"복사","Country/Region":"국가/지역",Edit:"편집","Foreground colour":"전경색","Go back":"되돌아가",Language:"언어/Language",Justification:"이유",Name:"명칭",Next:"다음",Open:"열기",Palette:"팔레트","Please select...":"선택해주세요",Previous:"나아가","Rail Map Generator":"철도 노선도 생성기","Rail Map Painter":"지하철 노선도 그리기","Rail Map Toolkit":"노선도 툴킷",Remove:"삭제",Reset:"리셋","RMG Templates":"RMG 템플릿","RMP Gallery":"RMP 갤러리","RMP Designer":"RMP 디자이너","Seed Project":"종자 프로젝트",Settings:"설치",Submit:"제출",Translate:"번역",Upload:"업로드",White:"화이트"}};const Pd={color:"Color",warning:"Warning",cancel:"Cancel",apply:"Apply",remove:"Remove",close:"Close",noShowAgain:"Don't show me again",rmtPromotion:"The all-in-one toolkit you definitely do not want to miss!",panel:{tools:{showLess:"Show less",section:{lineDrawing:"Line drawing",stations:"Stations",miscellaneousNodes:"Miscellaneous nodes"},select:"Select",learnHowToAdd:{station:"Learn how to add your stations!","misc-node":"Learn how to add your nodes!",line:"Learn how to add your line styles!"}},details:{header:"Details",info:{title:"Basic information",id:"ID",zIndex:"Depth",stationType:"Station Type",linePathType:"Line Path Type",lineStyleType:"Line Style Type",type:"Type",parallel:"Parallel line",parallelIndex:"Parallel index"},multipleSelection:{title:"Multiple Selection",change:"Change selected attributes",selected:"Selected Objects:",show:"Show",station:"Stations",miscNode:"MiscNodes",edge:"Lines"},changeStationTypeContent:"Changing station's type will remove all attributes from the station except its names.",changeLineTypeContent:"Changing line's type will remove all attributes from the line.",changeType:"Change Type",nodePosition:{title:"Node Position",pos:{x:"Coordinate X",y:"Coordinate Y"}},lineExtremities:{title:"Line Extremities",source:"Source",target:"Target",sourceName:"Source Name",targetName:"Target Name"},specificAttrsTitle:"Specific Attributes",unknown:{error:"Oops :( We can't recognize this {{category}}. Maybe it is created in a newer version.",node:"node",linePath:"line path",lineStyle:"line style"},nodes:{common:{nameZh:"Line name in Chinese",nameEn:"Line name in English",nameJa:"Line name in Japanese",num:"Line number"},virtual:{displayName:"Virtual node"},shmetroNumLineBadge:{displayName:"Shanghai Metro num line badge"},shmetroTextLineBadge:{displayName:"Shanghai Metro text line badge"},gzmtrLineBadge:{displayName:"Guangzhou Metro line badge",tram:"Tram",span:"Row-spanning digits"},bjsubwayNumLineBadge:{displayName:"Beijing Subway num line badge"},bjsubwayTextLineBadge:{displayName:"Beijing Subway text line badge"},berlinSBahnLineBadge:{displayName:"Berlin S Bahn line badge"},berlinUBahnLineBadge:{displayName:"Berlin U Bahn line badge"},suzhouRTNumLineBadge:{displayName:"Suzhou Rail Transit num line badge",branch:"Is branch line"},chongqingRTNumLineBadge:{displayName:"Chongqing Rail Transit num line badge"},chongqingRTTextLineBadge:{displayName:"Chongqing Rail Transit text line badge"},shenzhenMetroNumLineBadge:{displayName:"Shenzhen Metro num line badge",branch:"Is branch line"},mrtDestinationNumbers:{displayName:"Singapore MRT destination numbers"},mrtLineBadge:{displayName:"Singapore MRT line badge",isTram:"Is LRT line badge"},jrEastLineBadge:{displayName:"JR East line badge",crosshatchPatternFill:"Fill with crosshatch pattern"},qingdaoMetroNumLineBadge:{displayName:"Qingdao Metro Num line badge",numEn:"Line number in English",showText:"Show text"},guangdongIntercityRailwayLineBadge:{displayName:"Guangdong Intercity Railway line badge"},londonArrow:{displayName:"London arrow",type:"Type",continuation:"Continuation",sandwich:"Sandwich",tube:"Tube"},master:{displayName:"Master node",type:"Master node type",undefined:"Undefined"},facilities:{displayName:"Facilities",type:"Type"},text:{displayName:"Arbitrary text",content:"Content",fontSize:"Font size",lineHeight:"Line height",textAnchor:"Text anchor",start:"Start",middle:"Middle",end:"End",auto:"Auto",hanging:"Hanging",dominantBaseline:"Dominant baseline",language:"Font family in which language",zh:"Chinese",en:"English",mtr__zh:"Hongkong MTR Chinese",mtr__en:"Hongkong MTR English",berlin:"Berlin S/U Bahn",mrt:"Singapore MRT",jreast_ja:"JR East Japanese",jreast_en:"JR East English",rotate:"Rotation",italic:"Italic",bold:"Bold"}},stations:{common:{nameZh:"Names in Chinese",nameEn:"Names in English",nameJa:"Names in Japanese",nameOffsetX:"Names offset X",nameOffsetY:"Names offset Y",rotate:"Icon rotation",lineCode:"Line code",stationCode:"Station code",left:"Left",middle:"Middle",right:"Right",top:"Top",bottom:"Bottom"},interchange:{title:"Interchanges",within:"Within-station interchange",outStation:"Out-of-station interchange",outSystem:"Out-of-system interchange",addGroup:"Add interchange group",noInterchanges:"No interchanges",nameZh:"Chinese name",nameEn:"English name",add:"Add interchange",copy:"Copy interchange",remove:"Remove interchange"},shmetroBasic:{displayName:"Shanghai Metro basic station"},shmetroBasic2020:{displayName:"Shanghai Metro basic station (2020)"},shmetroInt:{displayName:"Shanghai Metro interchange station",height:"Icon height",width:"Icon width"},shmetroOsysi:{displayName:"Shanghai Metro out-of-system interchange station"},shanghaiSuburbanRailway:{displayName:"Shanghai Suburban Railway station"},gzmtrBasic:{displayName:"Guangzhou Metro basic station",open:"Is opened",secondaryNameZh:"Secondary name in Chinese",secondaryNameEn:"Secondary name in English",tram:"Tram"},gzmtrInt:{displayName:"Guangzhou Metro interchange station",open:"Is opened",secondaryNameZh:"Secondary name in Chinese",secondaryNameEn:"Secondary name in English",foshan:"Foshan"},gzmtrInt2024:{displayName:"Guangzhou Metro interchange station (2024)",columns:"Columns of stations",topHeavy:"Prefer more stations on the top row",anchorAt:"Anchor at",anchorAtNone:"Center",osiPosition:"Out-of-Station Interchange",osiPositionNone:"None",osiPositionLeft:"Left",osiPositionRight:"Right"},bjsubwayBasic:{displayName:"Beijing Subway basic station",open:"Is opened"},bjsubwayInt:{displayName:"Beijing Subway interchange station",outOfStation:"Out of station interchange"},mtr:{displayName:"Hongkong MTR station",rotate:"Icon rotation"},suzhouRTBasic:{displayName:"Suzhou Rail Transit basic station",textVertical:"Vertical names"},suzhouRTInt:{displayName:"Suzhou Rail Transit interchange station"},kunmingRTBasic:{displayName:"Kunming Rail Transit basic station"},kunmingRTInt:{displayName:"Kunming Rail Transit interchange station"},MRTBasic:{displayName:"Singapore MRT basic station",isTram:"Is LRT station"},MRTInt:{displayName:"Singapore MRT interchange station"},jrEastBasic:{displayName:"JR East basic station",nameOffset:"Names offset",textOneLine:"Names in one line",textVertical:"Vertical names",important:"Important station",lines:"Interchange lines offset"},jrEastImportant:{displayName:"JR East important station",textVertical:"Vertical names",mostImportant:"Most important station",minLength:"Minimal length of the station"},foshanMetroBasic:{displayName:"Foshan Metro basic station",open:"Is opened",secondaryNameZh:"Secondary name in Chinese",secondaryNameEn:"Secondary name in English",tram:"Tram"},qingdaoMetro:{displayName:"Qingdao Metro station",isInt:"Is interchange station"},tokyoMetroBasic:{displayName:"Tokyo Metro basic station",nameOffset:"Names offset",textVertical:"Vertical names",lineCode:"Line code",stationCode:"Station code"},tokyoMetroInt:{displayName:"Tokyo Metro interchange station",mereOffset:{displayName:"Names mere offset",none:"None",left1:"Left (less)",left2:"Left (more)",right1:"Right (less)",right2:"Right (more)",up:"Up",down:"Down"},importance:{displayName:"Station importance",default:"Default",middle:"Middle",high:"High"},align:{displayName:"Icon align",horizontal:"Horizontal",vertical:"Vertical"}},londonTubeCommon:{stepFreeAccess:"Step free access",stepFreeAccessNone:"None",stepFreeAccessTrain:"From street to train",stepFreeAccessPlatform:"From street to platform"},londonTubeBasic:{displayName:"London Tube basic station",terminal:"Terminal station",shareTracks:"Track shares",shareTracksIndex:"Index of the track shares"},londonTubeInt:{displayName:"London Tube interchange station"},londonRiverServicesInt:{displayName:"London river services interchange station"},guangdongIntercityRailway:{displayName:"Guangdong Intercity Railway station"}},lines:{reconcileId:"Reconcile ID",common:{offsetFrom:"Offset From",offsetTo:"Offset To",startFrom:"Start From",from:"From",to:"To",roundCornerFactor:"Round Corner Factor",parallelDisabled:"Some attributes are disabled as this line is parallel.",changeInBaseLine:"Change them in the base line:"},simple:{displayName:"Simple path",offset:"Offset"},diagonal:{displayName:"135° diagonal path"},perpendicular:{displayName:"90° perpendicular path"},rotatePerpendicular:{displayName:"90° rotate perpendicular path"},singleColor:{displayName:"Single color style"},shmetroVirtualInt:{displayName:"Shanghai Metro out-of-station interchange style"},shanghaiSuburbanRailway:{displayName:"Shanghai Suburban Railway style",isEnd:"Is the ending line"},gzmtrVirtualInt:{displayName:"Guangzhou Metro out-of-station interchange style"},gzmtrLoop:{displayName:"Guangzhou Metro loop style"},chinaRailway:{displayName:"China Railway style"},bjsubwaySingleColor:{displayName:"Beijing Subway single color style"},bjsubwayTram:{displayName:"Beijing Subway tram style"},bjsubwayDotted:{displayName:"Beijing Subway dotted style"},dualColor:{displayName:"Dual color style",swap:"Swap color",colorA:"Color A",colorB:"Color B"},river:{displayName:"River style",width:"Width"},mtrRaceDays:{displayName:"Hongkong MTR race days style"},mtrLightRail:{displayName:"Hongkong MTR light rail style"},mtrUnpaidArea:{displayName:"Hongkong MTR unpaid area style"},mtrPaidArea:{displayName:"Hongkong MTR paid area style"},mrtUnderConstruction:{displayName:"Singapore MRT under construction style"},mrtSentosaExpress:{displayName:"Singapore MRT Sentosa Express style"},jrEastSingleColor:{displayName:"JR East single color style"},jrEastSingleColorPattern:{displayName:"JR East single color filled with crosshatch pattern style"},lrtSingleColor:{displayName:"Singapore LRT single color style"},londonTubeInternalInt:{displayName:"London Tube internal interchange style"},londonTube10MinWalk:{displayName:"London Tube under a 10 minute walk interchange style"},londonTubeTerminal:{displayName:"London Tube terminal style"},londonRail:{displayName:"London rail style",limitedService:"Limited service/Peak hours only",colorBackground:"Color background",colorForeground:"Color foreground"},londonSandwich:{displayName:"London sandwich style"},londonLutonAirportDART:{displayName:"London Luton Airport DART style"},londonIFSCloudCableCar:{displayName:"London IFS Cloud Cable Car style"},guangdongIntercityRailway:{displayName:"Guangdong Intercity Railway style"}},edge:{},footer:{duplicate:"Duplicate",copy:"Copy",remove:"Remove"}}},header:{popoverHeader:"You're on <1>{{environment}} environment!",popoverBody:"We are currently testing the latest RMP. If you have any suggestions, feel free to raise at https://github.com/railmapgen/rmp/issues",search:"Search stations",open:{new:"New project",config:"Import project",projectRMG:"Import from RMG project",invalidType:"Invalid file type! Only file in JSON format is accepted.",unknownError:"Unknown error occurred while parsing the uploaded file! Please try again.",gallery:"Import from Gallery",tutorial:"Start tutorial",importFromRMPGallery:"Template {{id}} imported. Not satisfied with this change? Undo via Ctrl + Z or the undo button.",failToImportFromRMPGallery:"Fail to import {{id}} from the gallery. The file can not be found."},download:{config:"Export project",image:"Export image","2rmg":{title:"Export to RMG project",type:{line:"Line",loop:"Loop",branch:"Branch"},placeholder:{chinese:"Chinese name",english:"English name",lineCode:"Line code"},info1:"This function is designed to convert the RMP project into RMG projects.",info2:"The lines in the list following are the available lines for converting. You can enter the Chinese line name in the text box on the left, the English line name in the middle, the line code (for Guangzhou Metro style) on the right, and then click the download button on the right to save your RMG projects.",noline:"No available lines found.",download:"Download",downloadInfo:"Please select one of the following stations as the starting station and click it to download."},format:"Format",png:"PNG",svg:"SVG",svgVersion:"Version","svg1.1":"1.1 (Compatible with Adobe Illustrator)",svg2:"2 (Compatible with modern browsers)",transparent:"Transparency",scale:"Scale",disabledScaleOptions:"Some scale options are disabled due to your browser's canvas limitation.",disabledScaleOptionsWorkarounds:"Possible workarounds include generating the image from svg using this cli tool: ",imageTooBig:"The image is too big for your browser to generate!",useSystemFonts:"Use system fonts instead of fonts previewed in the canvas",shareInfo1:"I will attach ",shareInfo2:" and its link when I share this image.",termsAndConditions:"Terms and Conditions",termsAndConditionsInfo:"I agree to ",period:".",confirm:"Download"},donation:{title:"Donation",openCollective:"Open Collective",viaUSD:"Donate in USD via Paypal or Visa card.",afdian:"爱发电",viaCNY:"Donate in CNY via Alipay or Wechat Pay."},settings:{title:"Settings",pro:"This is a PRO feature and an account with a subscription is required.",proWithTrial:"This is a PRO feature with a limited free trial available.",proLimitExceed:{master:"Master nodes exceed the free tier.",parallel:"Parallel lines exceed the free tier.",solution:"Remove them to dismiss this warning, or subscribe to unlock more!"},subscription:{title:"Subscription Status","logged-out":"You are currently logged out.",free:"Logged In! Subscribe to unlock more features!",subscriber:"Thanks for your subscription! Enjoy all features!",expired:"Login status expired. Please log out and log in again."},preference:{title:"Preference",keepLastPath:"Keep drawing lines until clicking on the background in the next move",autoParallel:"Automatically set new lines to be parallel to existing lines",randomStationNames:{title:"Set station names to random on creation",none:"None",shmetro:"Shanghai",bjsubway:"Beijing"}},shortcuts:{title:"Shortcuts",keys:"Keys",description:"Description",f:"Use the last tool.",s:"Select.",arrows:"Move the canvas a little bit.",ijkl:"Move the selected station(s) a little bit.",shift:"Multiple selection.",alt:"Precise movement.",delete:"Delete the selected station(s).",cut:"Cut.",copy:"Copy.",paste:"Paste.",undo:"Undo.",redo:"Redo."},procedures:{title:"Procedures",translate:{title:"Translate nodes' coordinates",content:"Add the following offset to all nodes' x and y:",x:"X axis",y:"Y axis"},scale:{title:"Scale nodes' coordinates",content:"Multiply the following value to all nodes' x and y:",factor:"Scale factor"},changeType:{title:"Change all objects' attributes",any:"Any"},changeZIndex:"Change depth in batch",changeStationType:{title:"Change stations type in batch",changeFrom:"Change all stations from this type:",changeTo:"To this type:",info:"Changing stations' type will remove all specific attributes from stations except their position and names. SAVE BEFORE CHANGE!"},changeLineStyleType:{title:"Change lines style in batch",changeFrom:"Change all lines from this style:",changeTo:"To this style:",info:"Changing lines' style will remove all specific attributes from lines except their connections. SAVE BEFORE CHANGE!"},changeLinePathType:{title:"Change lines path in batch",changeFrom:"Change all lines from this path:",changeTo:"To this path:"},changeColor:{title:"Change color in batch",changeFrom:"Change all objects from this color:",changeTo:"To this color:",any:"From any color"},removeLines:{title:"Remove lines with single color",content:"Remove lines that have this color: "},updateColor:{title:"Update color",content:"Update all colors with their latest value.",success:"Successfully update all colors.",error:"Error in updating all colors: {{e}}."},unlockSimplePath:{title:"Unlock simple path",content1:"The Rail Map Painter application endeavors to offer an interactive platform conducive to the creation of rail maps while adhering to established conventions. Among these conventions, one particularly renowned style finds its origins in the innovative work of Harry Beck. His pioneering contribution, officially endorsed in the year 1932, garnered instantaneous acclaim from the general populace. Presently, it stands as an exemplar of paramount significance within the realm of information design. This paradigmatic approach has found widespread implementation in transit cartography on a global scale, albeit with varying degrees of success.",content2:"The application inherently conceals the option to utilize a simple path, as its deployment has the potential to contravene established conventions. This particular feature remains discreetly tucked away by default. Additionally, submissions to the Rail Map Painter Gallery are subject to stringent scrutiny, with a categorical rejection of compositions that employ the simple path with a single color style approach.",content3:"Still, we reserve the opportunity to unlock this option and use the simple path when you subscribe. It should be noted that even after acquisition, the use of simple path is limited to single color.",check:"Unlock",unlocked:"Already Unlocked"},masterManager:{title:"Manage all master nodes",id:"Id",label:"Label",type:"Type",types:{MiscNode:"MiscNode",Station:"Station"},importTitle:"Upload master parameter",importFrom:"Use imported styles",importOther:"Import new style",importParam:"Paste configuration"}},telemetry:{title:"Telemetry",info:"To help improve Rail Map Painter and keep contributors motivated to enhance the project, anonymous usage data is collected through Google Analytics. This data is used solely for enhancing the user experience and optimizing the tool's functionality and is never shared with third parties.",essential:"Basic",essentialTooltip:"Change this global setting in Rail Map Toolkit",essentialInfo:"Rail Map Painter collects essential usage data that helps us understand how and when users interact with the tool. Rest assured, no personally identifiable information or data from your projects is ever collected.",essentialLink:"Click this link to see detailed fields that Google Analytics may collect.",additional:"Additional",additionalInfo:"Rail Map Painter also gathers data on interactions, such as project creation or station addition, when you input. These additional data is also anonymous and are only used for statistical analysis to help us make the tool better."}},about:{title:"About",rmp:"Rail Map Painter",railmapgen:"A Rail Map Toolkit project",desc:"Design your own rail map by freely dragging stations from different cities and connecting them with 90 or 135-degree rounded corners lines!",content1:"In memory of all the freedom and equality we once had.",content2:"06/01/2022 in Shanghai",contributors:"Contributors",coreContributors:"Core Contributors",styleContributors:"Style Contributors",langonginc:"Live a life you will remember.","203IhzElttil":"Special thanks for his diligent work in ensuring that the stations of Shanghai Metro match the original design.",Swiftiecott:"Special thanks for his diligent work in ensuring that the stations of Beijing Subway match the original design.",Minwtraft:"Special thanks for his diligent work in ensuring that the stations of Guangzhou Metro match the original design.",contactUs:"Contact Us",github:"Project repository",githubContent:"Face any problems? Search or raise an issue here!",slack:"Slack group",slackContent:"Chat in these Slack channels!"}}},Id={colorA:"Color A",colorB:"Color B",color:"カラー",warning:"警告",cancel:"キャンセル",apply:"適用",remove:"削除",close:"閉じる",noShowAgain:"次回表示しない",rmtPromotion:"絶対に見逃せないオールインワンツールキット!",panel:{tools:{showLess:"表示を減らす",section:{lineDrawing:"路線描画",stations:"駅",miscellaneousNodes:"その他の節点"},select:"選択する",learnHowToAdd:{station:"駅を追加する方法を学ぶ!","misc-node":"節点を追加する方法を学ぶ!",line:"路線風格を追加する方法を学ぶ!"}},details:{header:"詳細",info:{title:"基本情報",id:"ID",zIndex:"深度",stationType:"駅の種類",linePathType:"路線経路の種類",lineStyleType:"路線風格の種類",type:"種類",parallel:"平行路線",parallelIndex:"平行路線索引"},multipleSelection:{title:"複数選択",change:"選択した属性を変更する",selected:"選択されたオブジェクト:",show:"見せる",station:"駅",miscNode:"その他のノード",edge:"ライン"},changeStationTypeContent:"駅の種類を変更すると、駅の名前以外のすべての属性が削除されます。",changeLineTypeContent:"路線の種類を変更すると、すべての属性が削除されます。",changeType:"種類を変更",nodePosition:{title:"節点の位置",pos:{x:"X座標",y:"Y座標"}},lineExtremities:{title:"路線の端点",source:"出発点",target:"到着点",sourceName:"出発点名",targetName:"到着点名"},specificAttrsTitle:"特定の属性",unknown:{error:"おっと :( これは{{category}}を認識できません。おそらくそれは新しいバージョンで作成されました。",node:"節点",linePath:"路線経路",lineStyle:"路線風格"},nodes:{common:{nameZh:"中国語の路線名",nameEn:"英語の路線名",nameJa:"日本語の路線名",num:"路線番号"},virtual:{displayName:"仮想節点"},shmetroNumLineBadge:{displayName:"上海地下鉄路線番号徽章"},shmetroTextLineBadge:{displayName:"上海地下鉄テキスト路線徽章"},gzmtrLineBadge:{displayName:"広州地下鉄路線徽章",tram:"路面電車",span:"行にまたがる数字"},bjsubwayNumLineBadge:{displayName:"北京地下鉄路線番号徽章"},bjsubwayTextLineBadge:{displayName:"北京地下鉄テキスト路線徽章"},berlinSBahnLineBadge:{displayName:"ベルリンSバーン番号徽章"},berlinUBahnLineBadge:{displayName:"ベルリン地下鉄番号徽章"},suzhouRTNumLineBadge:{displayName:"蘇州軌道交通路線番号徽章",branch:"支線"},chongqingRTNumLineBadge:{displayName:"重慶鉄道交通路線番号徽章"},chongqingRTTextLineBadge:{displayName:"重慶鉄道交通テキスト路線徽章"},shenzhenMetroNumLineBadge:{displayName:"深セン地下鉄路線番号徽章",branch:"支線"},mrtDestinationNumbers:{displayName:"シンガポールMRTの目的地番号"},mrtLineBadge:{displayName:"シンガポールMRT路線バッジ",isTram:"LRT路線バッジです"},jrEastLineBadge:{displayName:"JR東日本路線番号徽章",crosshatchPatternFill:"網目模様で塗りつぶす"},qingdaoMetroNumLineBadge:{displayName:"青島地下鉄番号線徽章",numEn:"英語の行番号",showText:"テキストを表示"},guangdongIntercityRailwayLineBadge:{displayName:"広東省都市間鉄道線徽章"},londonArrow:{displayName:"ロンドン矢印",type:"種類",continuation:"継続",sandwich:"サンドイッチ",tube:"地下鉄"},master:{displayName:"大師節点",type:"大師節点種類",undefined:"未定義"},facilities:{displayName:"施設",type:"種類"},text:{displayName:"任意のテキスト",content:"コンテンツ",fontSize:"書体サイズ",lineHeight:"行の高さ",textAnchor:"テキストのアンカー",start:"開始",middle:"中央",end:"終了",auto:"自動",hanging:"吊り下げ",dominantBaseline:"ドミナントベースライン",language:"言語での書体ファミリー",zh:"中国語",en:"英語",mtr__zh:"香港MTR中国語",mtr__en:"香港MTR英語",berlin:"ベルリンS/Uバーン",mrt:"シンガポールMRT",jreast_ja:"JR東日本日本語",jreast_en:"JR東日本英語",rotate:"回転",italic:"イタリック体",bold:"太字"}},stations:{common:{nameZh:"中国語の駅名",nameEn:"英語の駅名",nameJa:"日本語の駅名",nameOffsetX:"駅名補正値X",nameOffsetY:"駅名補正値Y",rotate:"アイコンの回転",lineCode:"路線番号",stationCode:"駅番号",left:"左",middle:"中央",right:"右",top:"上",bottom:"下"},interchange:{title:"乗り換え",within:"駅構内の乗り換え",outStation:"駅外の乗り換え",outSystem:"系統外の乗り換え",addGroup:"乗り換えグループを追加",noInterchanges:"乗り換えなし",nameZh:"中国語の駅名",nameEn:"英語の駅名",add:"乗り換えを追加",copy:"乗り換えをコピー",remove:"乗り換えを削除"},shmetroBasic:{displayName:"上海地下鉄基本駅"},shmetroBasic2020:{displayName:"上海地下鉄基本駅(令和2年)"},shmetroInt:{displayName:"上海地下鉄乗り換え駅",height:"アイコンの高さ",width:"アイコンの幅"},shmetroOsysi:{displayName:"上海地下鉄の系統外乗り換え駅"},shanghaiSuburbanRailway:{displayName:"上海市営鉄道駅"},gzmtrBasic:{displayName:"広州地下鉄基本駅",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",tram:"路面電車"},gzmtrInt:{displayName:"広州地下鉄乗り換え駅",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",foshan:"仏山"},gzmtrInt2024:{displayName:"広州地下鉄乗り換え駅(令和6年)",columns:"駅の列数",topHeavy:"上段に多くの駅を優先配置",anchorAt:"錨位置",anchorAtNone:"中心",osiPosition:"改札外乗り換え",osiPositionNone:"なし",osiPositionLeft:"左",osiPositionRight:"右"},bjsubwayBasic:{displayName:"北京地下鉄基本駅",open:"開業済み"},bjsubwayInt:{displayName:"北京地下鉄乗り換え駅",outOfStation:"改札外乗り換え"},mtr:{displayName:"香港MTR駅",rotate:"アイコンの回転"},suzhouRTBasic:{displayName:"蘇州軌道交通基本駅",textVertical:"垂直の名前"},suzhouRTInt:{displayName:"蘇州軌道交通乗り換え駅"},kunmingRTBasic:{displayName:"昆明軌道交通基本駅"},kunmingRTInt:{displayName:"昆明軌道交通乗り換え駅"},MRTBasic:{displayName:"シンガポールMRT基本駅",isTram:"LRTの駅です"},MRTInt:{displayName:"シンガポールMRT乗り換え駅"},jrEastBasic:{displayName:"JR東日本基本駅",nameOffset:"名前の補正値",textOneLine:"1行での名前",textVertical:"垂直の名前",important:"重要な駅",lines:"乗り換え線の補正値"},jrEastImportant:{displayName:"JR東日本重要駅",textVertical:"垂直の名前",mostImportant:"最も重要な駅",minLength:"駅の最小長"},foshanMetroBasic:{displayName:"仏山地鐵基本車站",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",tram:"路面電車"},qingdaoMetro:{displayName:"地下鉄青島駅",isInt:"乗換駅です"},tokyoMetroBasic:{displayName:"東京メトロの基本駅",nameOffset:"駅名補正値",textVertical:"垂直の名前"},tokyoMetroInt:{displayName:"東京メトロ乗換駅",mereOffset:{displayName:"名前は単なるオフセットです",none:"なし",left1:"左(少ない)",left2:"左(さらに)",right1:"右(少ない)",right2:"右(さらに)",up:"上",down:"下"},importance:{displayName:"駅の重要性",default:"デフォルト",middle:"真ん中",high:"高い"},align:{displayName:"アイコンの整列",horizontal:"水平",vertical:"垂直"}},londonTubeCommon:{stepFreeAccess:"段差のないアクセス",stepFreeAccessNone:"なし",stepFreeAccessTrain:"駅から電車まで",stepFreeAccessPlatform:"駅からプラットフォームまで"},londonTubeBasic:{displayName:"ロンドン地下鉄基本駅",terminal:"終着駅",shareTracks:"線路共有",shareTracksIndex:"線路共有索引"},londonTubeInt:{displayName:"ロンドン地下鉄乗換駅"},londonRiverServicesInt:{displayName:"ロンドン川サービス乗換駅"},guangdongIntercityRailway:{displayName:"広東省都市間鉄道駅"}},lines:{reconcileId:"調整ID",common:{offsetFrom:"補正値(From)",offsetTo:"補正値(To)",startFrom:"開始位置",roundCornerFactor:"角の丸め係数",from:"から",to:"まで",parallelDisabled:"この路線が平行であるため、一部の属性が無効になっています。",changeInBaseLine:"基準線で変更してください:"},simple:{displayName:"簡単な経路",offset:"補正値"},diagonal:{displayName:"135°対角経路"},perpendicular:{displayName:"90°垂直経路"},rotatePerpendicular:{displayName:"90°回転する垂直経路"},singleColor:{displayName:"単色風格"},shmetroVirtualInt:{displayName:"上海地下鉄駅外乗り換え風格"},shanghaiSuburbanRailway:{displayName:"上海市営鉄道風格",isEnd:"終了行"},gzmtrVirtualInt:{displayName:"広州地下鉄駅外乗り換え風格"},gzmtrLoop:{displayName:"広州地下鉄環状線風格"},chinaRailway:{displayName:"中国鉄道風格"},bjsubwaySingleColor:{displayName:"北京地下鉄単色風格"},bjsubwayTram:{displayName:"北京地下鉄路面電車風格"},bjsubwayDotted:{displayName:"北京地下鉄の点線風格"},dualColor:{displayName:"2色風格",swap:"色を交換",colorA:"色A",colorB:"色B"},river:{displayName:"河川風格",width:"幅"},mtrRaceDays:{displayName:"香港MTRレース日風格"},mtrLightRail:{displayName:"香港MTR軽軌風格"},mtrUnpaidArea:{displayName:"香港MTR改札外乗り換え風格"},mtrPaidArea:{displayName:"香港MTR改札内乗り換え風格"},mrtUnderConstruction:{displayName:"シンガポール MRT 工事中風格"},mrtSentosaExpress:{displayName:"シンガポール MRT セントーサ・エクスプレス風格"},jrEastSingleColor:{displayName:"JR東日本単色風格"},jrEastSingleColorPattern:{displayName:"JR東日本単色網目模様風格"},lrtSingleColor:{displayName:"シンガポールLRT単色風格"},londonTubeInternalInt:{displayName:"ロンドン地下鉄内部乗換風格"},londonTube10MinWalk:{displayName:"ロンドン地下鉄10分以内の乗換風格"},londonTubeTerminal:{displayName:"ロンドン地下鉄終着風格"},londonRail:{displayName:"ロンドン鉄道風格",limitedService:"限定サービス/ピーク時のみ",colorBackground:"背景色",colorForeground:"前景色"},londonSandwich:{displayName:"ロンドンサンドイッチ風格"},londonLutonAirportDART:{displayName:"ロンドンルートン空港DART風格"},londonIFSCloudCableCar:{displayName:"ロンドンIF雲索道風格"},guangdongIntercityRailway:{displayName:"広東省都市間鉄道風格"}},edges:{},footer:{duplicate:"重複",copy:"複製",remove:"削除"}}},header:{popoverHeader:"<1>{{environment}} 環境です!",popoverBody:"現在、最新のRMPをテストしています。ご意見がありましたら、https://github.com/railmapgen/rmp/issues で提案してください",search:"駅を探す",open:{new:"新しい作品",config:"作品をインポート",projectRMG:"RMG作品からインポート",invalidType:"無効なファイルタイプです!JSON形式のファイルのみが受け付けられます。",unknownError:"アップロードされたファイルの解析中に不明なエラーが発生しました。もう一度お試しください。",gallery:"ギャラリーからインポート",tutorial:"指導を開始する",importFromRMPGallery:"テンプレート{{id}}がインポートされました。この変更に満足していませんか?Ctrl + Zまたは元に戻すボタンで元に戻せます。",failToImportFromRMPGallery:"ギャラリーから{{id}}のインポートに失敗しました。ファイルが見つかりませんでした。"},download:{config:"作品をエクスポート",image:"画像をエクスポート","2rmg":{title:"RMG作品へエクスポート",type:{line:"直線",loop:"環状線",branch:"支線"},placeholder:{chinese:"中国語のライン名",english:"英語の路線名",lineCode:"路線番号"},info1:"この機能は、RMP作品をRMG作品に変換するために設計されています。",info2:"以下のリストの行は、変換用に利用できます。左側のテキストボックスに中国語の行名、中央に英語の行名、右側に(広州メトロ風格用の)行コードを入力し、ダウンロードボタンをクリックしてRMG作品を保存できます。",noline:"利用可能な回線が見つかりません。",download:"ダウンロード",downloadInfo:"出発駅を選択してクリックしてください。"},format:"フォーマット",png:"PNG",svg:"SVG",svgVersion:"版","svg1.1":"1.1(Adobe Illustratorと互換性あり)",svg2:"2(現代のブラウザと互換性あり)",transparent:"透明性",scale:"スケール",disabledScaleOptions:"ブラウザのキャンバス制限のため、一部のスケールオプションが無効になっています。",disabledScaleOptionsWorkarounds:"回避策として、このCLIツールを使用してSVGから画像を生成する方法が考えられます:",imageTooBig:"画像が大きすぎてブラウザで生成できません!",useSystemFonts:"キャンバスで内覧された書体の代わりに系統書体を使用する",shareInfo1:"この画像を共有する際に、添付ファイル ",shareInfo2:" とリンクを添付します。",termsAndConditions:"利用規約",termsAndConditionsInfo:"以下の利用規約に同意します:",period:"。",confirm:"ダウンロード"},donation:{title:"寄付",openCollective:"Open Collective",viaUSD:"PaypalまたはVisaカードを使用してドルで寄付する。",afdian:"爱发电",viaCNY:"AlipayまたはWechat Payを使用して人民元で寄付する。"},settings:{title:"設定",pro:"これはPRO機能であり、サブスクリプションが必要です。",proWithTrial:"これはPRO機能で、無料の限定トライアルが利用可能です。",proLimitExceed:{master:"大師節点が無料枠を超えています。",parallel:"平行路線が無料枠を超えています。",solution:"これらを削除して警告を解除するか、サブスクリプションに登録してさらに多くの機能を利用してください!"},subscription:{title:"サブスクリプションステータス","logged-out":"現在ログアウトしています。",free:"ログイン済み!さらに多くの機能をアンロックするにはサブスクリプションを登録してください!",subscriber:"サブスクリプションありがとうございます!すべての機能をお楽しみください!",expired:"ログインステータスの有効期限が切れました。ログアウトして再度ログインしてください。"},preference:{title:"設定",keepLastPath:"次の移動で背景をクリックするまで、線を描き続ける",autoParallel:"新しい路線を既存の路線と平行に自動的に設定",randomStationNames:{title:"作成時に駅名を乱数化する",none:"なし",shmetro:"上海",bjsubway:"北京"}},shortcuts:{title:"ショートカット",keys:"キー",description:"説明",f:"最後のツールを使用する。",s:"選択する。",arrows:"キャンバスを少し移動します。",ijkl:"選択した駅を少し移動します。",shift:"複数選択。",alt:"正確な移動。",delete:"選択した駅を削除します。",cut:"切り取る。",copy:"複製する。",paste:"貼り付ける。",undo:"元に戻す。",redo:"やり直す。"},procedures:{title:"手順",translate:{title:"節点の座標を変換",content:"すべての節点のX座標とY座標に次の補正値を追加する:",x:"X軸",y:"Y軸"},scale:{title:"節点の座標をスケーリング",content:"すべての節点のX座標とY座標に次の値を乗算する:",factor:"スケールファクター"},changeType:{title:"すべてのオブジェクトの属性を変更する",any:"どれでも"},changeZIndex:"深度を変更する",changeStationType:{title:"一括で駅の種類を変更",changeFrom:"すべての駅をこの種類から変更する:",changeTo:"この種類に変更する:",info:"駅の種類を変更すると、位置と名前以外の特定の属性がすべて削除されます。変更する前に保存してください!"},changeLineStyleType:{title:"線の風格を一括で変更",changeFrom:"この風格からすべての行を変更します:",changeTo:"この風格に:",info:"線の風格を変更すると、接続を除くすべての特定の属性が線から削除されます。 変更する前に保存してください!"},changeLinePathType:{title:"行のパスを一括で変更する",changeFrom:"このパスのすべての行を変更します:",changeTo:"この道へ:"},changeColor:{title:"一括で色を変更する",changeFrom:"すべてのオブジェクトをこの色から変更します:",changeTo:"この色に:",any:"どの色からも"},removeLines:{title:"単一色の路線を削除",content:"この色を持つ路線を削除する:"},updateColor:{title:"色を更新する",content:"最新の値ですべての色を更新します。",success:"すべての色を正常に更新しました。",error:"すべての色を更新する際にエラーが発生しました: {{e}}。"},unlockSimplePath:{title:"簡単な経路の解除",content1:"「地下鉄路線図画家」は、既存の慣例に従いつつ、鉄道地図の作成を支援するインタラクティブなプラットフォームを提供することを目指しています。その中でも、特に有名な風格の1つは、ハリー・ベックの革新的な作品に由来しています。彼の先駆的な貢献は1932年に正式に認められ、一般大衆から即座に称賛されました。現在では、情報デザインの領域において極めて重要な存在となっています。この典型的なアプローチは、世界規模の公共交通カートグラフィに広く採用されていますが、成功度は異なります。",content2:"アプリケーション自体は、既存の慣例に反する可能性があるため、簡単な経路を利用するオプションをデフォルトで控えめに隠しています。また、「地下鉄路線図画家ギャラリー」への投稿は厳格な審査を受けることになり、簡単な経路を単一の色の風格で使用する作品は断固として拒否されます。",content3:"それでも、このオプションのロックを解除し、寄付時にイージーパスを使用する機会を予約します。 取得後も、単純なパスの使用はモノクロスタイルに限定されることに注意してください。",check:"簡単な経路を解除",unlocked:"既に解除されています"},masterManager:{title:"すべての大師節点を管理する",id:"ID",label:"標識",type:"種類",types:{MiscNode:"その他節点",Station:"駅"},importTitle:"大師引数をアップロード",importFrom:"インポートしたスタイルを使用",importOther:"新しいスタイルをインポート",importParam:"設定情報を貼り付け"}},telemetry:{title:"テレメトリー",info:"鉄道路線図画家を改善し、貢献者がプロジェクトを向上させる意欲を維持するため、Google Analytics を通じて匿名の使用データを収集しています。このデータはユーザー体験の向上とツールの最適化のためだけに使用され、第三者と共有されることはありません。",essential:"基本",essentialTooltip:"鉄道路線図ツールキットでこのグローバル設定を変更する",essentialInfo:"鉄道路線図画家は、ツールがどのように、またいつ使用されるかを理解するための基本的な使用データを収集します。ご安心ください。個人を特定できる情報やプロジェクトデータは一切収集されません。",essentialLink:"Google Analytics が収集する可能性のある詳細フィールドを表示するには、こちらのリンクをクリックしてください。",additional:"追加",additionalInfo:"鉄道路線図画家は、プロジェクトの作成や駅の追加など、入力時のインタラクションに関するデータも収集します。これらの追加データも匿名であり、ツールを改善するための統計分析にのみ使用されます。"}},about:{title:"について",rmp:"地下鉄路線図画家",railmapgen:"地下鉄路線図ツールキットのプロジェクト",desc:"異なる都市の駅を自由にドラッグして、90度または135度の角丸線で接続して独自の鉄道地図を設計しましょう!",content1:"かつて私たちが持っていた自由と平等のすべての記憶に捧げます。",content2:"2022年6月1日、上海",contributors:"貢献者",coreContributors:"主要な貢献者",styleContributors:"風格の貢献者","203IhzElttil":"上海地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",Swiftiecott:"北京地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",Minwtraft:"広州地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",contactUs:"お問い合わせ",github:"プロジェクトリポジトリ",githubContent:"問題が発生しましたか?こちらで検索したり、問題を報告したりしてください!",slack:"Slackグループ",slackContent:"Slackのチャンネルでチャットしましょう!"}}},$d={color:"색깔",warning:"경고",cancel:"취소",apply:"사용",remove:"삭제",close:"다시",noShowAgain:"표시하지 않기",rmtPromotion:"놓치고 싶지 않은 올인원 툴킷! 닫기.",panel:{tools:{showLess:"적게 표시",section:{lineDrawing:"선 그리기",stations:"역",miscellaneousNodes:"기타 노드"},select:"선택하다",learnHowToAdd:{station:"역을 추가하는 방법 배우기!","misc-node":"노드를 추가하는 방법 배우기!",line:"라인 스타일을 추가하는 방법 배우기!"}},details:{header:"상세한 상황",info:{title:"기본정보",id:"고유 식별자",zIndex:"깊이",stationType:"역 유형",linePathType:"선분 경로 유형",lineStyleType:"선분 스타일 유형",type:"유형",parallel:"평행선",parallelIndex:"평행 인덱스"},multipleSelection:{title:"다중 선택",change:"선택한 속성 변경",selected:"선택한 개체:",show:"보여주다",station:"역",miscNode:"기타 노드",edge:"윤곽"},changeStationTypeContent:"역 유형을 변경하면 이름을 제외한 모든 독특한 속성이 제거됩니다.",changeLineTypeContent:"선분 유형을 변경하면 모든 독특한 속성이 제거됩니다.",changeType:"종류 변경",nodePosition:{title:"노드 위치",pos:{x:"가로 좌표",y:"세로 좌표"}},lineExtremities:{title:"선분 양단",source:"시작점",target:"종말점",sourceName:"시작점 명칭",targetName:"종말점 명칭"},specificAttrsTitle:"독특 속성",unknown:{error:"이런 :( 우리는 이 {{category}}를 인식할 수 없습니다. 아마도 더 최근 버전에서 생성되었을 것입니다.",node:"노드",lineType:"선분 경로",lineStyle:"선분 스타일"},nodes:{common:{nameZh:"한자 노선명칭",nameEn:"영문 노선명칭",nameJa:"일본 노선명칭",num:"노선 번호"},virtual:{displayName:"가상 노드"},shmetroNumLineBadge:{displayName:"상해 지하철 디지털 노선 표지"},shmetroTextLineBadge:{displayName:"상해 지하철 문자 노선 표지"},gzmtrLineBadge:{displayName:"광저우 지하철 노선 표지",tram:"시가 전차",span:"행 범위 숫자"},bjsubwayNumLineBadge:{displayName:"베이징 지하철 노선 배지"},bjsubwayTextLineBadge:{displayName:"베이징 지하철 텍스트 라인 배지"},berlinSBahnLineBadge:{displayName:"베를린 S반 노선 배지"},berlinUBahnLineBadge:{displayName:"베를린 U반 노선 배지"},suzhouRTNumLineBadge:{displayName:"수주 철도 번호 라인 배지",branch:"지선입니다"},chongqingRTNumLineBadge:{displayName:"충칭 철도 교통 디지털 노선 식별"},chongqingRTTextLineBadge:{displayName:"충칭 철도 교통 텍스트 라인 표시"},shenzhenMetroNumLineBadge:{displayName:"심천 지하철 번호 라인 배지",branch:"지선입니다"},mrtDestinationNumbers:{displayName:"싱가포르 MRT 목적지 번호"},mrtLineBadge:{displayName:"싱가포르 MRT 노선 배지",isTram:"LRT 노선 배지입니다"},jrEastLineBadge:{displayName:"JR 동일본 라인 배지",crosshatchPatternFill:"크로스해치 패턴으로 채우기"},qingdaoMetroNumLineBadge:{displayName:"칭다오 지하철 번호 라인 배지",numEn:"영어로 된 줄 번호",showText:"텍스트 표시"},guangdongIntercityRailwayLineBadge:{displayName:"광동 시외 철도 노선 표지판"},londonArrow:{displayName:"런던 화살표",type:"유형",continuation:"계속",sandwich:"샌드위치",tube:"튜브"},master:{displayName:"마스터 노드",type:"마스터 노드 유형",undefined:"정의되지 않음"},facilities:{displayName:"시설",type:"유형"},text:{displayName:"임의 글자",content:"내용",fontSize:"글자 대소",lineHeight:"행고도",textAnchor:"글자 앵커",start:"시작",middle:"가운데",end:"끝",auto:"자동",hanging:"매달리는",dominantBaseline:"현성 바셀린",language:"언어로 된 글꼴 종류",zh:"중국어",en:"영어",mtr__zh:"홍콩 MTR 중국어",mtr__en:"홍콩 MTR 영어",berlin:"베를린 S/U Bahn",mrt:"싱가포르 MRT",jreast_ja:"JR 동일본어",jreast_en:"JR 동일본 영어",rotate:"회전",italic:"이탤릭체",bold:"굵게"}},stations:{common:{nameZh:"한자 명칭",nameEn:"영문 명칭",nameJa:"일본 명칭",nameOffsetX:"명칭 가로 이동",nameOffsetY:"명칭 세로 이동",rotate:"역회전각도",lineCode:"노선 번호",stationCode:"역 번호",left:"왼쪽",middle:"가운데",right:"오른쪽",top:"위",bottom:"아래"},interchange:{title:"환승",within:"같은 역에서 환승한",outStation:"역을 나가 환승한",outSystem:"시스템외환승",addGroup:"환승 조합 추가",noInterchanges:"비환승역",nameZh:"한자 명칭",nameEn:"영문 명칭",add:"환승 추가",copy:"환승 복제",remove:"환승 삭제"},shmetroBasic:{displayName:"상해 지하철의 기본 역"},shmetroBasic2020:{displayName:"상해 지하철 기본 역(2020년)"},shmetroInt:{displayName:"상해 지하철 환승역",height:"역 높이",width:"역 폭"},shmetroOsysi:{displayName:"상하이 지하철 시스템 외환승 역"},shanghaiSuburbanRailway:{displayName:"상하이 기차역"},gzmtrBasic:{displayName:"광저우 지하철 기본역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",tram:"시가 전차"},gzmtrInt:{displayName:"광저우 지하철 환승역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",foshan:"포산"},gzmtrInt2024:{displayName:"광저우 지하철 환승역 (2024)",columns:"역 열 수",topHeavy:"상단에 더 많은 역 우선 배치",anchorAt:"앵커 위치",anchorAtNone:"중앙",osiPosition:"역을 나가 환승",osiPositionNone:"없음",osiPositionLeft:"왼쪽",osiPositionRight:"오른쪽"},bjsubwayBasic:{displayName:"베이징 지하철 기본역",open:"개통여부"},bjsubwayInt:{displayName:"베이징 지하철 환승역",outOfStation:"역을 나가 환승"},mtr:{displayName:"홍콩 MTR 역"},suzhouRTBasic:{displayName:"쑤저우 궤도교통 기본역",textVertical:"수직 이름"},suzhouRTInt:{displayName:"쑤저우 궤도교통 환승역"},kunmingRTBasic:{displayName:"쿤밍 궤도교통 기본역"},kunmingRTInt:{displayName:"쿤밍 궤도교통 환승역"},MRTBasic:{displayName:"싱가포르MRT기본역",isTram:"LRT역이에요"},MRTInt:{displayName:"싱가포르MRT환승역"},jrEastBasic:{displayName:"JR 동일본 기본 역",nameOffset:"이름 오프셋",textOneLine:"한 줄로 표시된 이름",textVertical:"수직 이름",important:"중요한 역",lines:"환승 노선 오프셋"},jrEastImportant:{displayName:"JR 동일본 중요 역",textVertical:"수직 이름",mostImportant:"가장 중요한 역",minLength:"스테이션의 최소 길이"},foshanMetroBasic:{displayName:"포산 지하철 기본역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",tram:"시가 전차"},qingdaoMetro:{displayName:"칭다오 지하철역",isInt:"환승역인가"},tokyoMetroBasic:{displayName:"도쿄메트로 기본역",nameOffset:"이름 오프셋",textVertical:"업종명",lineCode:"라인 코드",stationCode:"역 코드"},tokyoMetroInt:{displayName:"도쿄메트로 환승역",mereOffset:{displayName:"단순한 오프셋 이름",none:"없음",left1:"왼쪽(적음)",left2:"왼쪽(더)",right1:"오른쪽(적음)",right2:"맞아요 (더)",up:"위로",down:"아래에"},importance:{displayName:"역 중요성",default:"기본",middle:"가운데",high:"높은"},align:{displayName:"아이콘 정렬",horizontal:"수평의",vertical:"수직의"}},londonTubeCommon:{stepFreeAccess:"단차 없는 접근",stepFreeAccessNone:"없음",stepFreeAccessTrain:"거리에서 열차까지",stepFreeAccessPlatform:"거리에서 플랫폼까지"},londonTubeBasic:{displayName:"런던 지하철 기본역",terminal:"종착역",shareTracks:"선로 공유",shareTracksIndex:"선로 공유 지수"},londonTubeInt:{displayName:"런던 지하철 환승역"},londonRiverServicesInt:{displayName:"런던 강 서비스 환승역"},guangdongIntercityRailway:{displayName:"광둥 시외 기차역"}},lines:{reconcileId:"연결 선분 고유 식별자",common:{offsetFrom:"시작점 오프셋",offsetTo:"끝점 오프셋",startFrom:"여기서부터 시작",roundCornerFactor:"회전원각인자",from:"에서",to:"까지",parallelDisabled:"이 선이 평행하기 때문에 일부 속성이 비활성화되었습니다.",changeInBaseLine:"기본선에서 변경하십시오:"},simple:{displayName:"기본 선분",offset:"오프셋"},diagonal:{displayName:"135° 접힌 선분"},perpendicular:{displayName:"90° 수직 선분"},rotatePerpendicular:{displayName:"90° 수직 경로 회전"},singleColor:{displayName:"단색 스타일"},shmetroVirtualInt:{displayName:"상해 지하철 역 환승 모습"},shanghaiSuburbanRailway:{displayName:"상하이 도시철도 스타일",isEnd:"끝 범위"},gzmtrVirtualInt:{displayName:"광저우 지하철 역 환승 모습"},gzmtrLoop:{displayName:"광저우 지하철 순환선 스타일"},chinaRailway:{displayName:"중국 철도 모습"},bjsubwaySingleColor:{displayName:"베이징 지하철 단색 스타일"},bjsubwayTram:{displayName:"베이징 지하철 노면 전차 모습"},bjsubwayDotted:{displayName:"베이징 지하철 점선 스타일"},dualColor:{displayName:"이색 스타일",swap:"색을 바꾸기",colorA:"색깔 A",colorB:"색깔 B"},river:{displayName:"강 스타일",width:"폭"},mtrRaceDays:{displayName:"홍콩 MTR 경마일 스타일"},mtrLightRail:{displayName:"홍콩 MTR 경전철 스타일"},mtrUnpaidArea:{displayName:"홍콩 MTR 미결제 구역 스타일"},mtrPaidArea:{displayName:"홍콩 MTR 결제완료 구역 스타일"},mrtUnderConstruction:{displayName:"싱가포르 MRT 공사중 스타일"},mrtSentosaExpress:{displayName:"싱가포르 MRT 센토사 익스프레스 스타일"},jrEastSingleColor:{displayName:"JR 동일본 단색 스타일"},jrEastSingleColorPattern:{displayName:"JR 동일본 단색 크로스해치 패턴 스타일"},lrtSingleColor:{displayName:"싱가포르 LRT 단색 스타일"},londonTubeInternalInt:{displayName:"런던 지하철 내부 환승 스타일"},londonTube10MinWalk:{displayName:"런던 지하철 10분 이내 도보 환승 스타일"},londonTubeTerminal:{displayName:"런던 지하철 종착 스타일"},londonRail:{displayName:"런던 철도 스타일",limitedService:"제한 서비스/혼잡 시간대만",colorBackground:"배경 색상",colorForeground:"전경 색상"},londonSandwich:{displayName:"런던 샌드위치 스타일"},londonLutonAirportDART:{displayName:"런던 루튼 공항 DART 스타일"},londonIFSCloudCableCar:{displayName:"런던 IFS 클라우드 케이블카 스타일"},guangdongIntercityRailway:{displayName:"광동성 도시간 철도 스타일"}},edges:{},footer:{duplicate:"복사",copy:"복사",remove:"삭제"}}},header:{popoverHeader:"당신은 환경을<1>{{environment}}탐색하고 있습니다",popoverBody:"최신 RMP를 테스트하고 있습니다.제안 사항이 있으시면 언제든지 https://github.com/railmapgen/rmp/issues에 제출해 주십시오.",search:"방송국 검색",open:{new:"신 프로젝트",config:"프로젝트 가져오기",projectRMG:"RMG 프로젝트에서 가져오기",invalidType:"잘못된 파일 형식입니다! JSON 형식의 파일만 허용됩니다.",unknownError:"업로드된 파일의 파싱 중 알 수 없는 오류가 발생했습니다. 다시 시도해주세요.",gallery:"갤러리에서 가져오기",tutorial:"튜토리얼 시작",importFromRMPGallery:"템플릿 {{id}}가 가져 왔습니다. 이 변경 사항에 만족하지 않으십니까? Ctrl + Z 또는 실행 취소 버튼을 사용하여 실행 취소하세요.",failToImportFromRMPGallery:"갤러리에서 {{id}}를 가져올 수 없습니다. 파일을 찾을 수 없습니다."},download:{config:"프로젝트 내보내기",image:"사진 내보내기","2rmg":{title:"RMG 프로젝트로 내보내기",type:{line:"일직선",loop:"고리",branch:"지선"},placeholder:{chinese:"중국어 라인 이름",english:"영어 줄 이름",lineCode:"노선 번호"},info1:"이 기능은 RMP 프로젝트를 RMG 프로젝트로 변환하는 데 사용됩니다.",info2:"변환할 수 있는 사용 가능한 라인들은 다음과 같습니다. 왼쪽 텍스트 상자에 중국어 라인 이름을 입력하고, 가운데에 영어 라인 이름을 입력하며, 오른쪽에 (광저우 메트로 스타일용) 라인 코드를 입력한 다음, 오른쪽의 다운로드 버튼을 클릭하여 RMG 프로젝트를 저장할 수 있습니다.",noline:"사용 가능한 라인이 없습니다.",download:"다운로드",downloadInfo:"출발 역을 선택하고 클릭하십시오."},format:"파일 종류",png:"PNG 이미지",svg:"SVG 이미지",svgVersion:"버전","svg1.1":"1.1 (Adobe Illustrator 호환)",svg2:"2 (현대 브라우저 호환)",transparent:"투명 배경",scale:"확대/축소",disabledScaleOptions:"브라우저의 캔버스 제한으로 인해 일부 스케일 옵션이 비활성화되었습니다.",disabledScaleOptionsWorkarounds:"가능한 해결 방법으로는 이 CLI 도구를 사용하여 SVG에서 이미지를 생성하는 것이 있습니다:",imageTooBig:"이미지가 너무 크기 때문에 브라우저에서 생성할 수 없습니다!",useSystemFonts:"캔버스에서 미리보기된 글꼴 대신 시스템 글꼴 사용",shareInfo1:"이 사진을 공유할 때",shareInfo2:"링크를 첨부할 것입니다.",termsAndConditions:"약관 및 세칙",termsAndConditionsInfo:"동의",period:".",confirm:"다운로드"},donation:{title:"기부",openCollective:"Open Collective",viaUSD:"Paypal 또는 Visa 카드를 통해 달러로 기부하기.",afdian:"爱发电",viaCNY:"Alipay 또는 Wechat Pay를 통해 인민폐로 기부하기."},settings:{title:"설정",pro:"이것은 PRO 기능이며, 구독이 필요한 계정입니다.",proWithTrial:"이것은 PRO 기능이며, 제한된 무료 체험이 가능합니다.",proLimitExceed:{master:"마스터 노드가 무료 사용 한도를 초과했습니다.",parallel:"평행선이 무료 사용 한도를 초과했습니다.",solution:"경고를 해제하려면 이 항목들을 제거하거나 구독을 통해 더 많은 기능을 잠금 해제하세요!"},subscription:{title:"구독 상태","logged-out":"현재 로그아웃 상태입니다.",free:"로그인 완료! 더 많은 기능을 사용하려면 구독하세요!",subscriber:"구독해주셔서 감사합니다! 모든 기능을 즐기세요!",expired:"로그인 상태가 만료되었습니다. 다시 로그인 해주세요."},preference:{title:"선호",keepLastPath:"다음 이동에서 배경을 클릭할 때까지 계속 선을 그립니다",autoParallel:"새 선을 기존 선과 평행하게 자동으로 설정합니다",randomStationNames:{title:"생성 시 역 이름을 랜덤으로 설정",none:"없음",shmetro:"상하이",bjsubway:"베이징"}},shortcuts:{title:"바로 가기",keys:"키",description:"설명",f:"마지막 도구 사용.",s:"선택하다.",arrows:"캔버스를 약간 이동합니다.",ijkl:"선택한 역을 약간 이동합니다.",shift:"여러 항목 선택.",alt:"정밀한 이동.",delete:"선택한 역을 삭제합니다.",cut:"잘라내기.",copy:"복사하다.",paste:"붙여넣다.",undo:"취소하다.",redo:"다시 하다."},procedures:{title:"절차",translate:{title:"노드 좌표 변환",content:"모든 노드의 x 및 y에 다음 오프셋을 추가:",x:"X축",y:"Y축"},scale:{title:"스케일 노드의 좌표",content:"모든 노드의 x 및 y에 다음 값을 곱하:",factor:"스케일 팩터"},changeType:{title:"모든 객체의 속성 변경",any:"어느"},changeZIndex:"일괄적으로 깊이 변경",changeStationType:{title:"역의 종류를 대량으로 수정",changeFrom:"이 유형의 모든 역:",changeTo:"이 유형의 역으로 변환:",info:"역 유형을 변경하면 이름을 제외한 모든 고유한 속성이 제거됩니다.저장했다가 다시 실행!"},changeLineStyleType:{title:"일괄적으로 선 스타일 변경",changeFrom:"이 스타일의 모든 선을 변경하세요:",changeTo:"이 스타일에:",info:"선 스타일을 변경하면 연결을 제외한 선의 모든 특정 속성이 제거됩니다. 변경하기 전에 저장하세요!"},changeLinePathType:{title:"일괄적으로 라인 경로 변경",changeFrom:"이 경로의 모든 줄을 변경하세요:",changeTo:"이 길로:"},changeColor:{title:"일괄 색상 변경",changeFrom:"이 색상의 모든 개체를 변경합니다.:",changeTo:"이 색상에:",any:"모든 색상에서"},removeLines:{title:"단일 색상의 선 제거",content:"이 색상의 선을 제거하세요: "},updateColor:{title:"색상 업데이트",content:"최신 값으로 모든 색상을 업데이트합니다.",success:"모든 색상을 성공적으로 업데이트했습니다.",error:"모든 색상을 업데이트하는 동안 오류가 발생했습니다: {{e}}."},unlockSimplePath:{title:"간단 경로 잠금 해제",content1:"Rail Map Painter 애플리케이션은 확립된 관례를 준수하면서도 철도지도 작성을 위한 대화식 플랫폼을 제공하기 위해 노력합니다. 이러한 관례 중 하나는 특히 해리 벡의 혁신적인 작업에서 비롯되었습니다. 그의 개척적인 기여는 공식적으로 1932년에 인정받았으며 일반 대중으로부터 즉각적인 찬사를 받았습니다. 현재는 정보 디자인 분야에서 중요한 본보기로 자리 잡고 있습니다. 이 패러다임적인 접근 방식은 전 세계적인 규모의 교통 카토그래피에서 널리 구현되었으나 성공의 정도는 다양합니다.",content2:"이 애플리케이션은 기존 관례에 위배될 가능성이 있기 때문에 간단한 경로를 활용하는 옵션을 기본 설정으로 가려놓았습니다. 또한 Rail Map Painter 갤러리에 제출되는 작품은 엄격한 심사를 받으며, 단일 색상 스타일로 간단한 경로를 사용하는 작품은 명확히 거부됩니다.",content3:"그래도 이 옵션을 잠금 해제하고 기부할 때 Easy Path를 사용할 수 있는 기회를 보유하고 있습니다. 획득 후에도 단순 경로의 사용은 단색 스타일로 제한된다는 점에 유의해야 합니다.",check:"간단한 경로 잠금 해제",unlocked:"이미 해제됨"},masterManager:{title:"모든 마스터 노드를 관리",id:"ID",label:"레이블",type:"유형",types:{MiscNode:"기타 노드",Station:"스테이션"},importTitle:"마스터 매개변수 업로드",importFrom:"가져온 스타일 사용",importOther:"새 스타일 가져오기",importParam:"구성 정보 붙여넣기"}},telemetry:{title:"원격 측정",info:"지하철 노선도 그리기를 개선하고 기여자가 프로젝트를 향상시키는 데 동기를 부여하기 위해 Google Analytics를 통해 익명의 사용 데이터를 수집합니다. 이 데이터는 사용자 경험을 향상하고 도구 기능을 최적화하는 데에만 사용되며, 제3자와 절대 공유되지 않습니다.",essential:"기본",essentialTooltip:"지하철 노선도 툴킷에서 이 전역 설정을 변경하세요",essentialInfo:"지하철 노선도 그리기는 도구를 언제, 어떻게 사용하는지 이해하기 위해 기본적인 사용 데이터를 수집합니다. 안심하세요. 개인 식별이 가능한 정보나 프로젝트 데이터는 절대 수집되지 않습니다.",essentialLink:"Google Analytics에서 수집할 수 있는 세부 필드를 보려면 이 링크를 클릭하세요.",additional:"추가",additionalInfo:"지하철 노선도 그리기는 프로젝트 생성이나 역 추가와 같은 입력 시의 상호작용 데이터도 수집합니다. 이러한 추가 데이터도 익명으로 처리되며, 도구를 개선하기 위한 통계 분석에만 사용됩니다."}},about:{title:"대함",rmp:"지하철 노선도 그리기",railmapgen:"철도 지도 툴킷 프로젝트 노선도 툴킷",desc:"다양한 도시의 역을 자유롭게 끌어서 90도 또는 135도의 둥근 모서리 선으로 연결함으로써 여러분만의 철도 지도를 디자인해요!",content1:"우리가 가졌던 자유와 평등을 기념한다.",content2:"2022년 6월 1일 상해",contributors:"기여자",coreContributors:"핵심 기여자",styleContributors:"스타일 기여자",langonginc:"기억에 남을 삶을 살아보세요.","203IhzElttil":"상하이 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",Swiftiecott:"베이징 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",Minwtraft:"광저우 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",contactUs:"우리에게 연락하기",github:"프로젝트 저장소",githubContent:"무슨 문제라도 있나요? 여기서 문제를 검색하거나 제기하십시오!",slack:"슬랙 그룹",slackContent:"이 슬랙 채널에서 채팅해요!"}}},zd={color:"颜色",warning:"警告",cancel:"取消",apply:"应用",remove:"移除",close:"关闭",noShowAgain:"不再显示",rmtPromotion:"您绝对不想错过的全能工具包!",panel:{tools:{showLess:"显示更少",section:{lineDrawing:"线段绘制",stations:"车站",miscellaneousNodes:"杂项节点"},select:"多选",learnHowToAdd:{station:"了解如何添加车站!","misc-node":"了解如何添加节点!",line:"了解如何添加线段样式!"}},details:{header:"详情",info:{title:"基本信息",id:"唯一识别符",zIndex:"深度",stationType:"车站类型",linePathType:"线段路径类型",lineStyleType:"线段样式类型",type:"类型",parallel:"平行线段",parallelIndex:"平行线段索引"},multipleSelection:{title:"多重选取",change:"修改选中对象的属性",selected:"选中的对象:",show:"显示",station:"车站",miscNode:"杂项节点",edge:"线段"},changeStationTypeContent:"修改车站类型会移除所有独特属性除了名称。",changeLineTypeContent:"修改线段类型会移除所有独特属性。",changeType:"更改类型",nodePosition:{title:"节点位置",pos:{x:"横坐标",y:"纵坐标"}},lineExtremities:{title:"线段两端",source:"起点",target:"终点",sourceName:"起点名称",targetName:"终点名称"},specificAttrsTitle:"独特属性",unknown:{error:"哎呀 :( 我们无法识别此{{category}}。也许它是在更新版本中创建的。",node:"节点",linePath:"线段路径",lineStyle:"线段样式"},nodes:{common:{nameZh:"中文线路名称",nameEn:"英文线路名称",nameJa:"日语线路名称",num:"线路号"},virtual:{displayName:"虚拟节点"},shmetroNumLineBadge:{displayName:"上海地铁数字线路标识"},shmetroTextLineBadge:{displayName:"上海地铁文字线路标识"},gzmtrLineBadge:{displayName:"广州地铁线路标识",tram:"有轨电车",span:"跨行显示数字"},bjsubwayNumLineBadge:{displayName:"北京地铁数字线路标识"},bjsubwayTextLineBadge:{displayName:"北京地铁文字线路标识"},berlinSBahnLineBadge:{displayName:"柏林城市快铁线路标识"},berlinUBahnLineBadge:{displayName:"柏林地铁线路标识"},suzhouRTNumLineBadge:{displayName:"苏州轨道交通数字线路标识",branch:"是否支线"},chongqingRTNumLineBadge:{displayName:"重庆轨道交通数字线路标识"},chongqingRTTextLineBadge:{displayName:"重庆轨道交通文字线路标识"},shenzhenMetroNumLineBadge:{displayName:"深圳地铁数字线路标识",branch:"是否为支线"},mrtDestinationNumbers:{displayName:"新加坡MRT终点数字"},mrtLineBadge:{displayName:"新加坡MRT线路标识",isTram:"是LRT线路标识"},jrEastLineBadge:{displayName:"JR东日本线路标识",crosshatchPatternFill:"用网状图案填充"},qingdaoMetroNumLineBadge:{displayName:"青岛地铁数字线路标识",numEn:"英文线路号",showText:"显示文字"},guangdongIntercityRailwayLineBadge:{displayName:"广东城际铁路线路标识"},londonArrow:{displayName:"伦敦箭头",type:"类型",continuation:"延续",sandwich:"三明治",tube:"地铁"},master:{displayName:"大师节点",type:"大师节点类型",undefined:"未定义"},facilities:{displayName:"设施",type:"类型"},text:{displayName:"任意文字",content:"内容",fontSize:"文字大小",lineHeight:"行高度",textAnchor:"文字锚点",start:"开始",middle:"居中",end:"结束",auto:"自动",hanging:"悬挂",dominantBaseline:"显性基线",language:"哪个语言的字体系列",zh:"中文",en:"英文",mtr__zh:"港铁中文",mtr__en:"港铁英文",berlin:"柏林 S/U Bahn",mrt:"新加坡地铁",jreast_ja:"JR东日本日语",jreast_en:"JR东日本英语",rotate:"旋转",italic:"斜体",bold:"粗体"}},stations:{common:{nameZh:"中文名称",nameEn:"英文名称",nameJa:"日语名称",nameOffsetX:"名称横向偏移",nameOffsetY:"名称纵向偏移",rotate:"车站旋转角度",lineCode:"路线编号",stationCode:"车站编号",left:"左",middle:"中间",right:"右",top:"顶部",bottom:"底部"},interchange:{title:"换乘",within:"同站换乘",outStation:"出站换乘",outSystem:"系统外换乘",addGroup:"添加换乘组合",noInterchanges:"非换乘站",nameZh:"中文名称",nameEn:"英文名称",add:"添加换乘",copy:"复制换乘",remove:"删除换乘"},shmetroBasic:{displayName:"上海地铁基本车站"},shmetroBasic2020:{displayName:"上海地铁基本车站(2020)"},shmetroInt:{displayName:"上海地铁换乘车站",height:"车站高度",width:"车站宽度"},shmetroOsysi:{displayName:"上海地铁转乘车站"},shanghaiSuburbanRailway:{displayName:"上海市域铁路车站"},gzmtrBasic:{displayName:"广州地铁基本车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",tram:"有轨电车"},gzmtrInt:{displayName:"广州地铁换乘车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",foshan:"佛山"},gzmtrInt2024:{displayName:"广州地铁换乘站(2024)",columns:"站点列数",topHeavy:"优先将更多站点放在上方",anchorAt:"锚点位置",anchorAtNone:"居中",osiPosition:"出站换乘",osiPositionNone:"无",osiPositionLeft:"左侧",osiPositionRight:"右侧"},bjsubwayBasic:{displayName:"北京地铁基本车站",open:"是否开通"},bjsubwayInt:{displayName:"北京地铁换乘车站",outOfStation:"出站换乘"},mtr:{displayName:"香港MTR车站"},suzhouRTBasic:{displayName:"苏州轨道交通基本车站",textVertical:"垂直名称"},suzhouRTInt:{displayName:"苏州轨道交通换乘车站"},kunmingRTBasic:{displayName:"昆明轨道交通基本车站"},kunmingRTInt:{displayName:"昆明轨道交通换乘车站"},MRTBasic:{displayName:"新加坡MRT基本车站",isTram:"是LRT车站"},MRTInt:{displayName:"新加坡MRT换乘车站"},jrEastBasic:{displayName:"JR东日本基本车站",nameOffset:"名称偏移",textOneLine:"名称在一行中",textVertical:"垂直名称",important:"重要车站",lines:"换乘线偏移"},jrEastImportant:{displayName:"JR东日本重要车站",textVertical:"垂直名称",mostImportant:"最重要车站",minLength:"车站的最小长度"},foshanMetroBasic:{displayName:"佛山地铁基本车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",tram:"有轨电车"},qingdaoMetro:{displayName:"青岛地铁车站",isInt:"是换乘站"},tokyoMetroBasic:{displayName:"东京地铁基本车站",nameOffset:"名称偏移",textVertical:"垂直站名",lineCode:"线路编号",stationCode:"车站编号"},tokyoMetroInt:{displayName:"东京地铁换乘车站",mereOffset:{displayName:"名称微小偏移",none:"无",left1:"左 (较少)",left2:"左 (较大)",right1:"右 (较少)",right2:"右 (较大)",up:"上",down:"下"},importance:{displayName:"车站重要性",default:"默认",middle:"中",high:"高"},align:{displayName:"图标排列方向",horizontal:"横向",vertical:"纵向"}},londonTubeCommon:{stepFreeAccess:"无障碍通行",stepFreeAccessNone:"无",stepFreeAccessTrain:"从街道到列车",stepFreeAccessPlatform:"从街道到站台"},londonTubeBasic:{displayName:"伦敦地铁基本车站",terminal:"终点站",shareTracks:"轨道共享",shareTracksIndex:"轨道共享索引"},londonTubeInt:{displayName:"伦敦地铁换乘车站"},londonRiverServicesInt:{displayName:"伦敦河流服务换乘站"},guangdongIntercityRailway:{displayName:"广东城际铁路车站"}},lines:{reconcileId:"合并线段唯一标识符",common:{offsetFrom:"起始点偏移",offsetTo:"结束点偏移",startFrom:"从这里开始",roundCornerFactor:"转折圆角因子",from:"从",to:"到",parallelDisabled:"由于此线段是平行的,因此某些属性已被禁用。",changeInBaseLine:"在基准线段中更改它们:"},simple:{displayName:"基本线段",offset:"偏移"},diagonal:{displayName:"135°折线线段"},perpendicular:{displayName:"90°垂直线段"},rotatePerpendicular:{displayName:"90°旋转垂直线段"},singleColor:{displayName:"纯色样式"},shmetroVirtualInt:{displayName:"上海地铁出站换乘样式"},shanghaiSuburbanRailway:{displayName:"上海市域铁路样式",isEnd:"结束区间"},gzmtrVirtualInt:{displayName:"广州地铁出站换乘样式"},gzmtrLoop:{displayName:"广州地铁环线样式"},chinaRailway:{displayName:"中国铁路样式"},bjsubwaySingleColor:{displayName:"北京地铁纯色样式"},bjsubwayTram:{displayName:"北京地铁有轨电车样式"},bjsubwayDotted:{displayName:"北京地铁虚线样式"},dualColor:{displayName:"双色样式",swap:"切换颜色",colorA:"颜色A",colorB:"颜色B"},river:{displayName:"河流样式",width:"宽度"},mtrRaceDays:{displayName:"香港MTR赛马日样式"},mtrLightRail:{displayName:"香港MTR轻铁样式"},mtrUnpaidArea:{displayName:"香港MTR未付费区域样式"},mtrPaidArea:{displayName:"香港MTR付费区域样式"},mrtUnderConstruction:{displayName:"新加坡MRT在建样式"},mrtSentosaExpress:{displayName:"新加坡MRT圣淘沙捷运样式"},jrEastSingleColor:{displayName:"JR东日本单色样式"},jrEastSingleColorPattern:{displayName:"JR东日本单色网状图案样式"},lrtSingleColor:{displayName:"新加坡LRT纯色样式"},londonTubeInternalInt:{displayName:"伦敦地铁内部换乘样式"},londonTube10MinWalk:{displayName:"伦敦地铁10分钟步行换乘样式"},londonTubeTerminal:{displayName:"伦敦地铁终点站样式"},londonRail:{displayName:"伦敦铁路样式",limitedService:"有限服务/仅限高峰时段",colorBackground:"背景颜色",colorForeground:"前景颜色"},londonSandwich:{displayName:"伦敦三明治样式"},londonLutonAirportDART:{displayName:"伦敦卢顿机场DART样式"},londonIFSCloudCableCar:{displayName:"伦敦IFS云缆车样式"},guangdongIntercityRailway:{displayName:"广东城际铁路样式"}},edges:{},footer:{duplicate:"重复",copy:"复制",remove:"移除"}}},header:{popoverHeader:"你正在浏览<1>{{environment}}环境!",popoverBody:"我们正在测试最新的RMP。如果你有任何建议,欢迎在 https://github.com/railmapgen/rmp/issues 上提出。",search:"搜索车站",open:{new:"新项目",config:"导入项目",projectRMG:"从RMG项目中导入",invalidType:"无效的文件类型!仅接受JSON格式的文件。",unknownError:"解析上传文件时发生未知错误!请重试。",gallery:"从画廊中导入",tutorial:"开始教程",importFromRMPGallery:"模板 {{id}} 已导入。对此更改不满意?可通过 Ctrl + Z 或撤销按钮进行撤销。",failToImportFromRMPGallery:"无法从画廊导入{{id}},找不到文件。"},download:{config:"导出项目",image:"导出图片","2rmg":{title:"导出RMG项目",type:{line:"直线",loop:"环线",branch:"支线"},placeholder:{chinese:"中文线路名称",english:"英文线路名称",lineCode:"路线编号"},info1:"这个功能可将RMP项目导出为RMG项目。",info2:"下面的线路将可以被导出,你可以在左侧文本框中输入中文线路名称、在中间输入英文线路名称、右边输入线路编号(广州地铁样式专用),随后点击下载按钮即可导出RMG项目。",noline:"未找到可用线路。",download:"下载",downloadInfo:"请选择一个起始车站,并点击它。"},format:"文件种类",png:"PNG图像",svg:"SVG图像",svgVersion:"版本","svg1.1":"1.1(适用于Adobe Illustrator)",svg2:"2(适用于现代浏览器)",transparent:"透明背景",scale:"缩放",disabledScaleOptions:"由于浏览器的画布限制,部分缩放选项被禁用。",disabledScaleOptionsWorkarounds:"可能的解决方法包括使用此命令行工具从SVG生成图像:",imageTooBig:"图像太大,无法在您的浏览器中生成!",useSystemFonts:"使用系统字体而不是在画布上预览的字体",shareInfo1:"当我分享此图片时我会附上",shareInfo2:"和它的链接。",termsAndConditions:"条款及细则",termsAndConditionsInfo:"我同意",period:"。",confirm:"下载"},donation:{title:"捐赠",openCollective:"Open Collective",viaUSD:"通过Paypal或Visa卡以美元捐赠。",afdian:"爱发电",viaCNY:"通过支付宝或微信支付以人民币捐赠。"},settings:{title:"设置",pro:"这是一个专业功能,需要带有订阅的账户。",proWithTrial:"这是一个PRO功能,并提供有限的免费试用。",proLimitExceed:{master:"大师节点超出了免费额度。",parallel:"平行线段超出了免费额度。",solution:"移除它们以消除此警告,或订阅以解锁更多功能!"},subscription:{title:"订阅状态","logged-out":"您当前已登出。",free:"已登录!订阅以解锁更多功能!",subscriber:"感谢您的订阅!享受所有功能吧!",expired:"登录状态已过期。请登出后重新登录。"},preference:{title:"偏好",keepLastPath:"在下一次操作中持续画线段直到点击背景",autoParallel:"自动将新线段设置为与现有线段平行",randomStationNames:{title:"创建时将站名随机化",none:"无",shmetro:"上海",bjsubway:"北京"}},shortcuts:{title:"快捷键",keys:"键",description:"描述",f:"使用上一个工具。",s:"多选。",arrows:"稍微移动画布。",ijkl:"稍微移动所选站点。",shift:"多选。",alt:"精确移动。",delete:"删除所选站点。",cut:"剪切。",copy:"复制。",paste:"粘贴。",undo:"撤销。",redo:"重做。"},procedures:{title:"过程",translate:{title:"转化节点坐标",content:"将以下偏移加到所有节点的x和y上:",x:"横坐标",y:"纵坐标"},scale:{title:"缩放节点坐标",content:"将所有节点的x和y乘以以下值:",factor:"缩放因子"},changeType:{title:"修改所有对象的属性",any:"任意"},changeZIndex:"批量修改深度",changeStationType:{title:"批量修改车站种类",changeFrom:"将此类型的所有车站:",changeTo:"转换为这个类型的车站:",info:"修改车站类型会移除所有独特属性除了名称。保存再操作!"},changeLineStyleType:{title:"批量修改线段样式",changeFrom:"将此样式的所有线段:",changeTo:"转换为这个样式的线段:",info:"修改线段样式会移除所有独特属性除了连通性。保存再操作!"},changeLinePathType:{title:"批量修改线段类型",changeFrom:"将此类型的所有线段:",changeTo:"转换为这个类型的线段:"},changeColor:{title:"批量修改颜色",changeFrom:"将此颜色的所有对象:",changeTo:"转换为这个颜色:",any:"从任何颜色转换"},removeLines:{title:"移除所有纯色线段",content:"移除具有此颜色的所有线段: "},updateColor:{title:"更新颜色",content:"使用最新值更新所有颜色。",success:"成功更新所有颜色。",error:"更新所有颜色时出错:{{e}}。"},unlockSimplePath:{title:"解锁简单路径",content1:"地铁线路图绘制器应用致力于在遵循既定惯例的前提下,提供一个有利于创建地铁线路图的互动平台。在这些惯例中,一种特别著名的风格源自哈利·贝克的创新工作。他的开创性贡献于1932年得到官方认可,并在大众中迅速赢得了声誉。目前,它在信息设计领域具有重要的示范意义,在全球范围内的交通制图中得到了广泛的实施,尽管成功程度有所不同。",content2:"应用程序固有地隐藏了使用简单路径的选项,因为其部署有可能违反既定的惯例。默认情况下,此特定功能保持隐蔽。此外,提交到地铁线路图绘制器画廊的作品将经过严格的审查,坚决拒绝使用单色风格的简单路径的构图。",content3:"尽管如此,我们仍然保留了解锁此选项的机会,当您订阅后,方可使用简单路径。需要注意的是,即使获得后,简单路径的使用也仅限于单色风格。",check:"解锁简单路径",unlocked:"已解锁"},masterManager:{title:"管理全部大师节点",id:"唯一标识",label:"标签",type:"类型",types:{MiscNode:"杂项节点",Station:"车站"},importTitle:"上传大师节点参数",importFrom:"使用导入的样式",importOther:"导入新样式",importParam:"粘贴配置信息"}},telemetry:{title:"遥测",info:"为了帮助改进地铁线路图绘制器并激励贡献者提升项目,我们通过 Google Analytics 收集匿名使用数据。这些数据仅用于增强用户体验和优化工具功能,绝不会与第三方共享。",essential:"基础",essentialTooltip:"在地铁线路图工具包中更改此全局设置",essentialInfo:"地铁线路图绘制器收集一些基本使用数据,以帮助我们了解用户如何以及何时与工具交互。请放心,我们从不收集任何可识别个人身份的信息或您的项目数据。",essentialLink:"点击此链接查看 Google Analytics 可能收集的详细字段。",additional:"额外",additionalInfo:"地铁线路图绘制器还会收集有关交互的数据,例如项目创建或站点添加等操作。这些额外数据同样是匿名的,仅用于统计分析以帮助我们改进工具。"}},about:{title:"关于",rmp:"地铁线路图绘制器",railmapgen:"一个线路图工具包项目",desc:"通过自由拖动来自不同城市的车站并以 90 或 135 度圆角线段将它们连接起来,设计您自己的铁路地图!",content1:"谨以此纪念我们曾拥有的自由与平等。",content2:"06/01/2022于上海",contributors:"贡献者",coreContributors:"核心贡献者",styleContributors:"样式贡献者",langonginc:"活出值得铭记的人生。","203IhzElttil":"特别感谢他勤勉工作,确保上海地铁站与原始设计相符。",Swiftiecott:"特别感谢他勤勉工作,确保北京地铁站与原始设计相符。",Minwtraft:"特别感谢他勤勉工作,确保广州地铁站与原始设计相符。",contactUs:"联系我们",github:"项目仓库",githubContent:"遇到任何问题?在这里搜索或提出一个问题!",slack:"Slack群组",slackContent:"在这些Slack频道中讨论!"}}},Bd={color:"顏色",warning:"警告",cancel:"取消",apply:"應用",remove:"移除",close:"關閉",noShowAgain:"不要再顯示",rmtPromotion:"絕對不想錯過的多功能工具包!",panel:{tools:{showLess:"顯示更少",section:{lineDrawing:"線段繪製",stations:"車站",miscellaneousNodes:"雜項節點"},select:"多選",learnHowToAdd:{station:"了解如何添加車站!","misc-node":"了解如何添加節點!",line:"了解如何添加線條樣式!"}},details:{header:"詳情",info:{title:"基本信息",id:"唯一識別符",zIndex:"深度",stationType:"車站類型",linePathType:"線段路徑類型",lineStyleType:"線段樣式類型",type:"類型",parallel:"平行線段",parallelIndex:"平行線段索引"},multipleSelection:{title:"多重選取",change:"修改選取物件的屬性",selected:"選取的物件:",show:"顯示",station:"車站",miscNode:"雜項節點",edge:"線段"},changeStationTypeContent:"修改車站類型會移除所有獨特屬性除了名稱。",changeLineTypeContent:"修改線段類型會移除所有獨特屬性。",changeType:"更改類型",nodePosition:{title:"節點位置",pos:{x:"橫坐標",y:"縱坐標"}},lineExtremities:{title:"線段兩端",source:"起點",target:"終點",sourceName:"起點名稱",targetName:"終點名稱"},specificAttrsTitle:"獨特屬性",unknown:{error:"哎呀 :( 我們無法識別此{{category}}。也許它是在更新版本中創建的。",node:"節點",linePath:"線段路徑",lineStyle:"線段樣式"},nodes:{common:{nameZh:"中文線路名稱",nameEn:"英文線路名稱",nameJa:"日語線路名稱",num:"線路號"},virtual:{displayName:"虛擬節點"},shmetroNumLineBadge:{displayName:"上海地鐵數字線路標識"},shmetroTextLineBadge:{displayName:"上海地鐵文字線路標識"},gzmtrLineBadge:{displayName:"廣州地鐵線路標識",tram:"輕軌",span:"跨行顯示數字"},bjsubwayNumLineBadge:{displayName:"北京地鐵數字線路標識"},bjsubwayTextLineBadge:{displayName:"北京地鐵文字線路標識"},berlinSBahnLineBadge:{displayName:"柏林城市快鐵線路標識"},berlinUBahnLineBadge:{displayName:"柏林地鐵線路標識"},suzhouRTNumLineBadge:{displayName:"蘇州軌道交通數字線路標識",branch:"是否支線"},chongqingRTNumLineBadge:{displayName:"重慶軌道交通數字線路標識"},chongqingRTTextLineBadge:{displayName:"重慶軌道交通文字線路標識"},shenzhenMetroNumLineBadge:{displayName:"深圳地鐵數字線路標識",branch:"是否支線"},mrtDestinationNumbers:{displayName:"新加坡MRT終點數字"},mrtLineBadge:{displayName:"新加坡MRT線路標識",isTram:"是LRT線路標識"},jrEastLineBadge:{displayName:"JR東日本線路標識",crosshatchPatternFill:"用網狀圖案填充"},qingdaoMetroNumLineBadge:{displayName:"青島地鐵數位線路標識",numEn:"英文線路號",showText:"顯示文字"},guangdongIntercityRailwayLineBadge:{displayName:"廣東城際鐵路線標識"},londonArrow:{displayName:"倫敦箭頭",type:"類型",continuation:"延續",sandwich:"三明治",tube:"地鐵"},master:{displayName:"大師節點",type:"大師節點類型",undefined:"未定義"},facilities:{displayName:"設施",type:"類型"},text:{displayName:"任意文字",content:"內容",fontSize:"文字大小",lineHeight:"行高度",textAnchor:"文字錨點",start:"開始",middle:"中間",end:"結束",auto:"自動",hanging:"懸吊",dominantBaseline:"顯性基線",language:"哪個語言的字體系列",zh:"中文",en:"英文",mtr__zh:"香港地鐵中文",mtr__en:"香港地鐵英文",berlin:"柏林 S/U 地鐵",mrt:"新加坡地鐵",jreast_ja:"JR 東日本日文",jreast_en:"JR 東日本英文",rotate:"旋轉",italic:"斜體",bold:"粗體"}},stations:{common:{nameZh:"中文名稱",nameEn:"英文名稱",nameJa:"日語名稱",nameOffsetX:"名稱橫向偏移",nameOffsetY:"名稱縱向偏移",rotate:"車站旋轉角度",lineCode:"路綫編碼",stationCode:"車站編碼",left:"左",middle:"中間",right:"右",top:"頂部",bottom:"底部"},interchange:{title:"換乘",within:"同站換乘",outStation:"出站換乘",outSystem:"系統外換乘",addGroup:"添加換乘組合",noInterchanges:"非換乘站",nameZh:"中文名稱",nameEn:"英文名稱",add:"添加換乘",copy:"復製換乘",remove:"刪除換乘"},shmetroBasic:{displayName:"上海地鐵基本車站"},shmetroBasic2020:{displayName:"上海地鐵基本車站(2020)"},shmetroInt:{displayName:"上海地鐵換乘車站",height:"車站高度",width:"車站寬度"},shmetroOsysi:{displayName:"上海地鐵轉乘車站"},shanghaiSuburbanRailway:{displayName:"上海市域鐵路車站"},gzmtrBasic:{displayName:"廣州地鐵基本車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",tram:"輕軌"},gzmtrInt:{displayName:"廣州地鐵換乘車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",foshan:"佛山"},gzmtrInt2024:{displayName:"廣州地鐵換乘站(2024)",columns:"站點列數",topHeavy:"優先將更多站點放在上方",anchorAt:"錨點位置",anchorAtNone:"居中",osiPosition:"出站轉車",osiPositionNone:"無",osiPositionLeft:"左側",osiPositionRight:"右側"},bjsubwayBasic:{displayName:"北京地鐵基本車站",open:"是否開通"},bjsubwayInt:{displayName:"北京地鐵換乘車站",outOfStation:"出站轉車"},mtr:{displayName:"香港MTR車站"},suzhouRTBasic:{displayName:"蘇州軌道交通基本車站",textVertical:"垂直名稱"},suzhouRTInt:{displayName:"蘇州軌道交通換乘車站"},kunmingRTBasic:{displayName:"昆明軌道交通基本車站"},kunmingRTInt:{displayName:"昆明軌道交通換乘車站"},MRTBasic:{displayName:"新加坡MRT基本車站",isTram:"是LRT車站"},MRTInt:{displayName:"新加坡MRT換乘車站"},jrEastBasic:{displayName:"JR東日本基本車站",nameOffset:"名稱偏移",textOneLine:"名稱在一行中",textVertical:"垂直名稱",important:"重要車站",lines:"轉乘線偏移"},jrEastImportant:{displayName:"JR東日本重要車站",textVertical:"垂直名稱",mostImportant:"最重要車站",minLength:"車站的最小長度"},foshanMetroBasic:{displayName:"佛山地鐵基本車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",tram:"輕軌"},qingdaoMetro:{displayName:"青島地鐵基本車站",isInt:"是換乘站"},tokyoMetroBasic:{displayName:"東京地鐵基本車站",nameOffset:"名稱偏移",textVertical:"垂直站名",lineCode:"線路編號",stationCode:"車站編號"},tokyoMetroInt:{displayName:"東京地鐵轉乘車站",mereOffset:{displayName:"名稱微小偏移",none:"無",left1:"左 (较少)",left2:"左 (较大)",right1:"右 (较少)",right2:"右 (较大)",up:"上",down:"下"},importance:{displayName:"車站重要性",default:"預設",middle:"中",high:"高"},align:{displayName:"圖標排列方向",horizontal:"橫向",vertical:"縱向"}},londonTubeCommon:{stepFreeAccess:"無障礙通行",stepFreeAccessNone:"無",stepFreeAccessTrain:"從街道到列車",stepFreeAccessPlatform:"從街道到月台"},londonTubeBasic:{displayName:"倫敦地鐵基本車站",terminal:"終點站",shareTracks:"軌道共享",shareTracksIndex:"軌道共享指數"},londonTubeInt:{displayName:"倫敦地鐵換乘車站"},londonRiverServicesInt:{displayName:"倫敦河流服務換乘站"},guangdongIntercityRailway:{displayName:"廣東城際鐵路車站"}},lines:{reconcileId:"合並線段唯一標識符",common:{offsetFrom:"起始點偏移",offsetTo:"結束點偏移",startFrom:"從這裏開始",roundCornerFactor:"轉折圓角因子",from:"從",to:"到",parallelDisabled:"由於此線段是平行的,因此某些屬性已被禁用。",changeInBaseLine:"在基準線段中更改它們:"},simple:{displayName:"基本線段",offset:"偏移"},diagonal:{displayName:"135°折線線段"},perpendicular:{displayName:"90°垂直線段"},rotatePerpendicular:{displayName:"90°旋轉垂直線段"},singleColor:{displayName:"純色樣式"},shmetroVirtualInt:{displayName:"上海地鐵出站換乘樣式"},shanghaiSuburbanRailway:{displayName:"上海市域鐵路樣式",isEnd:"結束區間"},gzmtrVirtualInt:{displayName:"廣州地鐵出站換乘樣式"},gzmtrLoop:{displayName:"廣州地鐵環線樣式"},chinaRailway:{displayName:"中國鐵路樣式"},bjsubwaySingleColor:{displayName:"北京地鐵純色樣式"},bjsubwayTram:{displayName:"北京地鐵有軌電車樣式"},bjsubwayDotted:{displayName:"北京地鐵虛線樣式"},dualColor:{displayName:"雙色樣式",swap:"切換顏色",colorA:"顏色A",colorB:"顏色B"},river:{displayName:"河流樣式",width:"寬度"},mtrRaceDays:{displayName:"香港MTR賽馬日樣式"},mtrLightRail:{displayName:"香港MTR輕鐵樣式"},mtrUnpaidArea:{displayName:"香港MTR未付費區域樣式"},mtrPaidArea:{displayName:"香港MTR付費區域樣式"},mrtUnderConstruction:{displayName:"新加坡MRT在建樣式"},mrtSentosaExpress:{displayName:"新加坡MRT聖淘沙捷運樣式"},jrEastSingleColor:{displayName:"JR東日本單色樣式"},jrEastSingleColorPattern:{displayName:"JR東日本單色網狀圖案樣式"},lrtSingleColor:{displayName:"新加坡LRT純色樣式"},londonTubeInternalInt:{displayName:"倫敦地鐵內部換乘樣式"},londonTube10MinWalk:{displayName:"倫敦地鐵10分鐘步行換乘樣式"},londonTubeTerminal:{displayName:"倫敦地鐵終點站樣式"},londonRail:{displayName:"倫敦鐵路樣式",limitedService:"有限服務/只限繁忙時段",colorBackground:"背景顏色",colorForeground:"前景顏色"},londonSandwich:{displayName:"倫敦三明治樣式"},londonLutonAirportDART:{displayName:"倫敦盧頓機場DART樣式"},londonIFSCloudCableCar:{displayName:"倫敦IFS雲纜車樣式"},guangdongIntercityRailway:{displayName:"廣東城際鐵路樣式"}},edges:{},footer:{duplicate:"重複",copy:"複製",remove:"移除"}}},header:{popoverHeader:"你正在瀏覽<1>{{environment}}環境!",popoverBody:"我們正在測試最新的RMP。如果妳有任何建議,歡迎在 https://github.com/railmapgen/rmp/issues 上提出。",search:"搜尋車站",open:{new:"新項目",config:"讀入項目",projectRMG:"從RMG專案中讀入",invalidType:"無效的文件類型!僅接受JSON格式的文件。",unknownError:"解析上傳文件時發生未知錯誤!請重試。",gallery:"從畫廊中讀入",tutorial:"開始教程",importFromRMPGallery:"範本 {{id}} 已匯入。對此更改不滿意?可通過 Ctrl + Z 或撤銷按鈕進行撤銷。",failToImportFromRMPGallery:"無法從畫廊導入{{id}},找不到檔案。"},download:{config:"導出項目",image:"導出圖片","2rmg":{title:"導出RMG項目",type:{line:"直線",loop:"環線",branch:"支線"},placeholder:{chinese:"中文線路名稱",english:"英文線路名稱",lineCode:"路綫編碼"},info1:"這個功能可將RMP項目導出為RMG項目。",info2:"下面的線路將可以被導出,你可以在左側文本框中輸入中文線路名稱、在中間輸入英文線路名稱、右邊輸入線路編號(廣州地鐵樣式專用),隨後點擊下載按鈕即可導出RMG項目。",noline:"未找到可用線路。",download:"下載",downloadInfo:"請選擇一個起始車站,並點擊它。"},format:"檔案種類",png:"PNG影像",svg:"SVG影像",svgVersion:"版本","svg1.1":"1.1(適用於Adobe Illustrator)",svg2:"2(適用於現代瀏覽器)",transparent:"透明背景",scale:"縮放",disabledScaleOptions:"由於您的瀏覽器的畫布限制,部分縮放選項已被禁用。",disabledScaleOptionsWorkarounds:"可能的解決方法包括使用此命令行工具從SVG生成圖像:",imageTooBig:"圖像太大,您的瀏覽器無法生成!",useSystemFonts:"使用系統字型而不是在畫布上預覽的字型",shareInfo1:"當我分享此圖片時我會附上",shareInfo2:"和它的鏈接。",termsAndConditions:"條款及細則",termsAndConditionsInfo:"我同意",period:"。",confirm:"下載"},donation:{title:"捐款",openCollective:"Open Collective",viaUSD:"通過Paypal或Visa卡以美元捐款。",afdian:"爱发电",viaCNY:"通過支付寶或微信支付以人民幣捐款。"},settings:{title:"設置",pro:"這是一個專業功能,需要带有訂閱的帳戶。",proWithTrial:"這是一個PRO功能,並提供有限的免費試用。",proLimitExceed:{master:"大師節點超出了免費額度。",parallel:"平行線段超出了免費額度。",solution:"移除它們以解除此警告,或訂閱以解鎖更多功能!"},subscription:{title:"訂閱狀態","logged-out":"您目前已登出。",free:"已登入!訂閱以解鎖更多功能!",subscriber:"感謝您的訂閱!享受所有功能吧!",expired:"登入狀態已過期。請登出後重新登入。"},preference:{title:"偏好",keepLastPath:"在下一次操作中持續畫線段直到點擊背景",autoParallel:"自動將新段線設置為與現有線段平行",randomStationNames:{title:"創建時將站名隨機化",none:"無",shmetro:"上海",bjsubway:"北京"}},shortcuts:{title:"捷徑",keys:"按鍵",description:"描述",f:"使用上一個工具。",s:"多選。",arrows:"稍微移動畫布。",ijkl:"稍微移動所選站點。",shift:"多選。",alt:"精確移動。",delete:"刪除所選站點。",cut:"剪切。",copy:"複製。",paste:"貼上。",undo:"撤銷。",redo:"重做。"},procedures:{title:"過程",translate:{title:"轉化節點坐標",content:"將以下偏移加到所有節點的x和y上:",x:"橫坐標",y:"縱坐標"},scale:{title:"縮放節點坐標",content:"將所有節點的x和y乘以以下值:",factor:"縮放因子"},changeType:{title:"修改所有物件的屬性",any:"任意"},changeZIndex:"批量修改深度",changeStationType:{title:"批量修改車站種類",changeFrom:"將此類型的所有車站:",changeTo:"轉換為這個類型的車站:",info:"修改車站類型會移除所有獨特屬性除了名稱。保存再操作!"},changeLineStyleType:{title:"批量修改線段樣式",changeFrom:"將此樣式的所有線段:",changeTo:"轉換為這個樣式的線段:",info:"修改線段樣式會移除所有獨特屬性除了連通性。保存再操作!"},changeLinePathType:{title:"批量修改線段類型",changeFrom:"將此類型的所有線段:",changeTo:"轉換為這個類型的線段:"},changeColor:{title:"批量修改顏色",changeFrom:"將此顏色的所有對象:",changeTo:"轉換為這個顏色:",any:"從任何顏色轉換"},removeLines:{title:"移除所有純色線段",content:"移除具有此顏色的所有線段: "},updateColor:{title:"更新顏色",content:"使用最新值更新所有顏色。",success:"成功更新所有顏色。",error:"更新所有顏色時發生錯誤:{{e}}。"},unlockSimplePath:{title:"解鎖簡單路徑",content1:"地鐵線路圖繪製器應用致力於在遵循既定慣例的前提下,提供一個有利於創建地鐵線路圖的互動平台。在這些慣例中,一種特別著名的風格源自哈利·貝克的創新工作。他的開創性貢獻於1932年得到官方認可,並在大眾中迅速贏得了聲譽。目前,它在信息設計領域具有重要的示範意義,在全球範圍內的交通製圖中得到了廣泛的實施,儘管成功程度有所不同。",content2:"應用程式固有地隱藏了使用簡單路徑的選項,因為其部署有可能違反既定的慣例。默認情況下,此特定功能保持隱蔽。此外,提交到地鐵線路圖繪製器畫廊的作品將經過嚴格的審查,堅決拒絕使用單色風格的簡單路徑的構圖。",content3:"儘管如此,我們仍然保留瞭解鎖此選項的機會,當您訂閱后,方可使用簡單路徑。 需要注意的是,即使獲得后,簡單路徑的使用也僅限於單色風格。",check:"解鎖簡單路徑",unlocked:"已解鎖"},masterManager:{title:"管理全部大師節點",id:"唯一標識",label:"標籤",type:"類型",types:{MiscNode:"雜項節點",Station:"車站"},importTitle:"上傳大師節點參數",importFrom:"使用匯入的樣式",importOther:"導入新樣式",importParam:"貼上配置信息"}},telemetry:{title:"遙測",info:"為了協助改進地鐵路綫圖繪製器並激勵貢獻者提升項目,我們透過 Google Analytics 收集匿名使用數據。這些數據僅用於提升用戶體驗及優化工具功能,絕不會與第三方共享。",essential:"基本",essentialTooltip:"在地鐵路綫圖工具組中更改此全局設定",essentialInfo:"地鐵路綫圖繪製器收集一些基本使用數據,以協助我們了解用戶如何及何時與工具互動。請放心,我們絕不收集任何可識別個人身份的資訊或您的項目數據。",essentialLink:"點擊此鏈接查看 Google Analytics 可能收集的詳細字段。",additional:"額外",additionalInfo:"地鐵路綫圖繪製器還會收集與互動有關的數據,例如創建項目或新增站點等操作。這些額外數據同樣是匿名的,僅用於統計分析以協助我們改進工具。"}},about:{title:"關於",rmp:"地鐵線路圖繪製器",railmapgen:"一個路綫圖工具組的項目",desc:"通過自由拖動來自不同城市的車站並以 90 或 135 度圓角線段將它們連接起來,設計您自己的鐵路地圖!",content1:"謹以此紀念我們曾擁有的自由與平等。",content2:"06/01/2022於上海",contributors:"貢獻者",coreContributors:"核心貢獻者",styleContributors:"樣式貢獻者",langonginc:"活出值得銘記的人生。","203IhzElttil":"特別感謝他勤奮工作,確保上海地鐵站與原始設計相符。",Swiftiecott:"特別感謝他勤奮工作,確保北京地鐵站與原始設計相符。",Minwtraft:"特別感謝他勤奮工作,確保廣州地鐵站與原始設計相符。",contactUs:"聯繫我們",github:"項目倉庫",githubContent:"遇到任何問題?在這裡搜索或提出一個問題!",slack:"Slack群組",slackContent:"在這些Slack頻道中討論!"}}},Dd=e("aU",(new qn.I18nBuilder).use(ze).withAppName("Rail Map Painter").withLng(qn.getLanguage()).withDefaultResource(Md).withResource("en",Pd).withResource("zh-Hans",zd).withResource("zh-Hant",Bd).withResource("ja",Id).withResource("ko",$d).build()),{abs:Gd,cos:Fd,sin:Wd,acos:Ud,atan2:Vd,sqrt:Hd,pow:Jd}=Math;function qd(e){return e<0?-Jd(-e,1/3):Jd(e,1/3)}const Kd=Math.PI,Yd=2*Kd,Qd=Kd/2,Zd=Number.MAX_SAFE_INTEGER||9007199254740991,Xd=Number.MIN_SAFE_INTEGER||-9007199254740991,ec={x:0,y:0,z:0},tc={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,t){const n=t(e);let r=n.x*n.x+n.y*n.y;return void 0!==n.z&&(r+=n.z*n.z),Hd(r)},compute:function(e,t,n){if(0===e)return t[0].t=0,t[0];const r=t.length-1;if(1===e)return t[r].t=1,t[r];const o=1-e;let i=t;if(0===r)return t[0].t=e,t[0];if(1===r){const t={x:o*i[0].x+e*i[1].x,y:o*i[0].y+e*i[1].y,t:e};return n&&(t.z=o*i[0].z+e*i[1].z),t}if(r<4){let t,a,s,l=o*o,d=e*e,c=0;2===r?(i=[i[0],i[1],i[2],ec],t=l,a=o*e*2,s=d):3===r&&(t=l*o,a=l*e*3,s=o*d*3,c=e*d);const u={x:t*i[0].x+a*i[1].x+s*i[2].x+c*i[3].x,y:t*i[0].y+a*i[1].y+s*i[2].y+c*i[3].y,t:e};return n&&(u.z=t*i[0].z+a*i[1].z+s*i[2].z+c*i[3].z),u}const a=JSON.parse(JSON.stringify(t));for(;a.length>1;){for(let t=0;t1;o--,i--){const e=[];for(let n,o=0;oi.x.min&&(t=i.x.min),n>i.y.min&&(n=i.y.min),r0&&(a.c1=t,a.c2=r,a.s1=e,a.s2=n,i.push(a))}))})),i},makeshape:function(e,t,n){const r=t.points.length,o=e.points.length,i=tc.makeline(t.points[r-1],e.points[0]),a=tc.makeline(e.points[o-1],t.points[0]),s={startcap:i,forward:e,back:t,endcap:a,bbox:tc.findbbox([i,e,t,a]),intersections:function(e){return tc.shapeintersections(s,s.bbox,e,e.bbox,n)}};return s},getminmax:function(e,t,n){if(!n)return{min:0,max:0};let r,o,i=Zd,a=Xd;-1===n.indexOf(0)&&(n=[0].concat(n)),-1===n.indexOf(1)&&n.push(1);for(let s=0,l=n.length;sa&&(a=o[t]);return{min:i,mid:(i+a)/2,max:a,size:a-i}},align:function(e,t){const n=t.p1.x,r=t.p1.y,o=-Vd(t.p2.y-r,t.p2.x-n);return e.map((function(e){return{x:(e.x-n)*Fd(o)-(e.y-r)*Wd(o),y:(e.x-n)*Wd(o)+(e.y-r)*Fd(o)}}))},roots:function(e,t){t=t||{p1:{x:0,y:0},p2:{x:1,y:0}};const n=e.length-1,r=tc.align(e,t),o=function(e){return 0<=e&&e<=1};if(2===n){const e=r[0].y,t=r[1].y,n=r[2].y,i=e-2*t+n;if(0!==i){const r=-Hd(t*t-e*n),a=-e+t;return[-(r+a)/i,-(-r+a)/i].filter(o)}return t!==n&&0===i?[(2*t-n)/(2*t-2*n)].filter(o):[]}const i=r[0].y,a=r[1].y,s=r[2].y;let l=3*a-i-3*s+r[3].y,d=3*i-6*a+3*s,c=-3*i+3*a,u=i;if(tc.approximately(l,0)){if(tc.approximately(d,0))return tc.approximately(c,0)?[]:[-u/c].filter(o);const e=Hd(c*c-4*d*u),t=2*d;return[(e-c)/t,(-c-e)/t].filter(o)}d/=l,c/=l,u/=l;const p=(3*c-d*d)/3,h=p/3,g=(2*d*d*d-9*d*c+27*u)/27,f=g/2,m=f*f+h*h*h;let y,b,v,w,x;if(m<0){const e=-p/3,t=Hd(e*e*e),n=-g/(2*t),r=Ud(n<-1?-1:n>1?1:n),i=2*qd(t);return v=i*Fd(r/3)-d/3,w=i*Fd((r+Yd)/3)-d/3,x=i*Fd((r+2*Yd)/3)-d/3,[v,w,x].filter(o)}if(0===m)return y=f<0?qd(-f):-qd(f),v=2*y-d/3,w=-y-d/3,[v,w].filter(o);{const e=Hd(m);return y=qd(-f+e),b=qd(f+e),[y-b-d/3].filter(o)}},droots:function(e){if(3===e.length){const t=e[0],n=e[1],r=e[2],o=t-2*n+r;if(0!==o){const e=-Hd(n*n-t*r),i=-t+n;return[-(e+i)/o,-(-e+i)/o]}return n!==r&&0===o?[(2*n-r)/(2*(n-r))]:[]}if(2===e.length){const t=e[0],n=e[1];return t!==n?[t/(t-n)]:[]}return[]},curvature:function(e,t,n,r,o){let i,a,s,l,d=0,c=0;const u=tc.compute(e,t),p=tc.compute(e,n),h=u.x*u.x+u.y*u.y;if(r?(i=Hd(Jd(u.y*p.z-p.y*u.z,2)+Jd(u.z*p.x-p.z*u.x,2)+Jd(u.x*p.y-p.x*u.y,2)),a=Jd(h+u.z*u.z,1.5)):(i=u.x*p.y-u.y*p.x,a=Jd(h,1.5)),0===i||0===a)return{k:0,r:0};if(d=i/a,c=a/i,!o){const o=tc.curvature(e-.001,t,n,r,!0).k,i=tc.curvature(e+.001,t,n,r,!0).k;l=(i-d+(d-o))/2,s=(Gd(i-d)+Gd(d-o))/2}return{k:d,r:c,dk:l,adk:s}},inflections:function(e){if(e.length<4)return[];const t=tc.align(e,{p1:e[0],p2:e.slice(-1)[0]}),n=t[2].x*t[1].y,r=t[3].x*t[1].y,o=t[1].x*t[2].y,i=18*(-3*n+2*r+3*o-t[3].x*t[2].y),a=18*(3*n-r-3*o),s=18*(o-n);if(tc.approximately(i,0)){if(!tc.approximately(a,0)){let e=-s/a;if(0<=e&&e<=1)return[e]}return[]}const l=2*i;if(tc.approximately(l,0))return[];const d=a*a-4*i*s;if(d<0)return[];const c=Math.sqrt(d);return[(c-a)/l,-(a+c)/l].filter((function(e){return 0<=e&&e<=1}))},bboxoverlap:function(e,t){const n=["x","y"],r=n.length;for(let o,i,a,s,l=0;l=s)return!1;return!0},expandbox:function(e,t){t.x.mine.x.max&&(e.x.max=t.x.max),t.y.max>e.y.max&&(e.y.max=t.y.max),t.z&&t.z.max>e.z.max&&(e.z.max=t.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,t,n){const r=e.bbox(),o=t.bbox(),i=1e5,a=n||.5;if(r.x.size+r.y.sizek||k>N)&&(S+=Yd),S>N&&(x=N,N=S,S=x)):N4){if(1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");r=!0}}else if(6!==o&&8!==o&&9!==o&&12!==o&&1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const i=this._3d=!r&&(9===o||12===o)||e&&e[0]&&void 0!==e[0].z,a=this.points=[];for(let p=0,h=i?3:2;pe+rc(t.y)),0)0}length(){return tc.length(this.derivative.bind(this))}static getABC(e=2,t,n,r,o=.5){const i=tc.projectionratio(o,e),a=1-i,s={x:i*t.x+a*r.x,y:i*t.y+a*r.y},l=tc.abcratio(o,e);return{A:{x:n.x+(n.x-s.x)/l,y:n.y+(n.y-s.y)/l},B:n,C:s,S:t,E:r}}getABC(e,t){t=t||this.get(e);let n=this.points[0],r=this.points[this.order];return uc.getABC(this.order,n,t,r,e)}getLUT(e){if(this.verify(),e=e||100,this._lut.length===e+1)return this._lut;this._lut=[],e++,this._lut=[];for(let t,n,r=0;r1?1:u,l=this.compute(u),l.t=u,l.d=d,l}get(e){return this.compute(e)}point(e){return this.points[e]}compute(e){return this.ratios?tc.computeWithRatios(e,this.points,this.ratios,this._3d):tc.compute(e,this.points,this._3d,this.ratios)}raise(){const e=this.points,t=[e[0]],n=e.length;for(let r,o,i=1;i1;){n=[];for(let i,a=0,s=t.length-1;a=0&&e<=1})),t=t.concat(e[n].sort(tc.numberSort))}.bind(this)),e.values=t.sort(tc.numberSort).filter((function(e,n){return t.indexOf(e)===n})),e}bbox(){const e=this.extrema(),t={};return this.dims.forEach(function(n){t[n]=tc.getminmax(this,n,e[n])}.bind(this)),t}overlaps(e){const t=this.bbox(),n=e.bbox();return tc.bboxoverlap(t,n)}offset(e,t){if(void 0!==t){const n=this.get(e),r=this.normal(e),o={c:n,n:r,x:n.x+r.x*t,y:n.y+r.y*t};return this._3d&&(o.z=n.z+r.z*t),o}if(this._linear){const t=this.normal(0),n=this.points.map((function(n){const r={x:n.x+e*t.x,y:n.y+e*t.y};return n.z&&t.z&&(r.z=n.z+e*t.z),r}));return[new uc(n)]}return this.reduce().map((function(t){return t._linear?t.offset(e)[0]:t.scale(e)}))}simple(){if(3===this.order){const e=tc.angle(this.points[0],this.points[3],this.points[1]),t=tc.angle(this.points[0],this.points[3],this.points[2]);if(e>0&&t<0||e<0&&t>0)return!1}const e=this.normal(0),t=this.normal(1);let n=e.x*t.x+e.y*t.y;return this._3d&&(n+=e.z*t.z),rc(lc(n))(1-o/r)*t+o/r*n));return new uc(this.points.map(((t,n)=>({x:t.x+e.x*o[n],y:t.y+e.y*o[n]}))))}scale(e){const t=this.order;let n=!1;if("function"==typeof e&&(n=e),n&&2===t)return this.raise().scale(n);const r=this.clockwise,o=this.points;if(this._linear)return this.translate(this.normal(0),n?n(0):e,n?n(1):e);const i=n?n(0):e,a=n?n(1):e,s=[this.offset(0,10),this.offset(1,10)],l=[],d=tc.lli4(s[0],s[0].c,s[1],s[1].c);if(!d)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach((function(e){const n=l[e*t]=tc.copy(o[e*t]);n.x+=(e?a:i)*s[e].n.x,n.y+=(e?a:i)*s[e].n.y})),n?([0,1].forEach((function(i){if(2!==t||!i){var a=o[i+1],s={x:a.x-d.x,y:a.y-d.y},c=n?n((i+1)/t):e;n&&!r&&(c=-c);var u=dc(s.x*s.x+s.y*s.y);s.x/=u,s.y/=u,l[i+1]={x:a.x+c*s.x,y:a.y+c*s.y}}})),new uc(l)):([0,1].forEach((e=>{if(2===t&&e)return;const n=l[e*t],r=this.derivative(e),i={x:n.x+r.x,y:n.y+r.y};l[e+1]=tc.lli4(n,i,d,o[e+1])})),new uc(l))}outline(e,t,n,r){if(t=void 0===t?e:t,this._linear){const o=this.normal(0),i=this.points[0],a=this.points[this.points.length-1];let s,l,d;void 0===n&&(n=e,r=t),s={x:i.x+o.x*e,y:i.y+o.y*e},d={x:a.x+o.x*n,y:a.y+o.y*n},l={x:(s.x+d.x)/2,y:(s.y+d.y)/2};const c=[s,l,d];s={x:i.x-o.x*t,y:i.y-o.y*t},d={x:a.x-o.x*r,y:a.y-o.y*r},l={x:(s.x+d.x)/2,y:(s.y+d.y)/2};const u=[d,l,s],p=tc.makeline(u[2],c[0]),h=tc.makeline(c[2],u[0]),g=[p,new uc(c),h,new uc(u)];return new nc(g)}const o=this.reduce(),i=o.length,a=[];let s,l=[],d=0,c=this.length();const u=void 0!==n&&void 0!==r;function p(e,t,n,r,o){return function(i){const a=r/n,s=(r+o)/n,l=t-e;return tc.map(i,0,1,e+a*l,e+s*l)}}o.forEach((function(o){const i=o.length();u?(a.push(o.scale(p(e,n,c,d,i))),l.push(o.scale(p(-t,-r,c,d,i)))):(a.push(o.scale(e)),l.push(o.scale(-t))),d+=i})),l=l.map((function(e){return s=e.points,s[3]?e.points=[s[3],s[2],s[1],s[0]]:e.points=[s[2],s[1],s[0]],e})).reverse();const h=a[0].points[0],g=a[i-1].points[a[i-1].points.length-1],f=l[i-1].points[l[i-1].points.length-1],m=l[0].points[0],y=tc.makeline(f,h),b=tc.makeline(g,m),v=[y].concat(a).concat([b]).concat(l);return new nc(v)}outlineshapes(e,t,n){t=t||e;const r=this.outline(e,t).curves,o=[];for(let i=1,a=r.length;i1,e.endcap.virtual=i{var i=this.get(e);return tc.between(i.x,t,r)&&tc.between(i.y,n,o)}))}selfintersects(e){const t=this.reduce(),n=t.length-2,r=[];for(let o,i,a,s=0;s0&&(o=o.concat(t))})),o}arcs(e){return e=e||.5,this._iterate(e,[])}_error(e,t,n,r){const o=(r-n)/4,i=this.get(n+o),a=this.get(r-o),s=tc.dist(e,t),l=tc.dist(e,i),d=tc.dist(e,a);return rc(l-s)+rc(d-s)}_iterate(e,t){let n,r=0,o=1;do{n=0,o=1;let i,a,s,l,d,c=this.get(r),u=!1,p=!1,h=o,g=1;do{if(p=u,l=s,h=(r+o)/2,i=this.get(h),a=this.get(o),s=tc.getccenter(c,i,a),s.interval={start:r,end:o},u=this._error(s,c,r,o)<=e,d=p&&!u,d||(g=o),u){if(o>=1){if(s.interval.end=g=1,l=s,o>1){let e={x:s.x+s.r*ac(s.e),y:s.y+s.r*sc(s.e)};s.e+=tc.angle({x:s.x,y:s.y},e,this.get(1))}break}o+=(o-r)/2}else o=h}while(!d&&n++<100);if(n>=100)break;l=l||s,t.push(l),r=g}while(o<1);return t}}const pc=(e,t,n,r)=>{var o;r=null!==(o=r)&&void 0!==o?o:-n;const[i,a]=hc(e);if(!i||!a)return;if(i[0]===a[0]||i[1]===a[1]||t===Cd.Diagonal&&Math.abs(i[1]-a[1])===Math.abs(i[0]-a[0])){const e=Math.abs(n);return gc(i,a,e)}const[s,l]=mc(e);if(!s||!l)return;const d=new uc([...s,...l]),[c,u]=[d.scale(n),d.scale(r)],p=bc(i,s,a,d,c,u);if(!p)return;const{mA:[h,g],mB:[f,m],endA:[y,b],endB:[v,w]}=p;return[`M ${h} ${g} ${c.toSVG().replace("M","L")} L ${y} ${b}`,`M ${f} ${m} ${u.toSVG().replace("M","L")} L ${v} ${w}`]},hc=e=>{var t,n;return[null===(t=e.match(/M\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/))||void 0===t||null===(t=t.at(0))||void 0===t?void 0:t.replace(/M\s*/,"").split(" ").map((e=>Number(e))),null===(n=e.match(/L\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*$/))||void 0===n||null===(n=n.at(0))||void 0===n?void 0:n.replace(/L\s*/,"").split(" ").map((e=>Number(e)))]},gc=(e,t,n)=>{const[r,o,i,a]=[e[0],e[1],t[0],t[1]],s=Math.abs((a-o)/(i-r));if(s===1/0)return[`M ${r+n} ${o} L ${i+n} ${a}`,`M ${r-n} ${o} L ${i-n} ${a}`];if(0===s)return[`M ${r} ${o+n} L ${i} ${a+n}`,`M ${r} ${o-n} L ${i} ${a-n}`];{const e=1/s,t=n/Math.sqrt(e*e+1),l=t*e*-Math.sign((i-r)*(a-o));return[`M ${r+t} ${o+l} L ${i+t} ${a+l}`,`M ${r-t} ${o-l} L ${i-t} ${a-l}`]}},fc=(e,t,n)=>{const[r,o,i,a]=[e[0],e[1],t[0],t[1]],s=Math.abs((a-o)/(i-r));if(s===1/0)return`M ${r+n} ${o} L ${i+n} ${a} L ${i-n} ${a} L ${r-n} ${o} Z`;if(0===s)return`M ${r} ${o+n} L ${i} ${a+n} L ${i} ${a-n} L ${r} ${o-n} Z`;{const e=1/s,t=n/Math.sqrt(e*e+1),l=t*e*-Math.sign((i-r)*(a-o));return`M ${r+t} ${o+l} L ${i+t} ${a+l} L ${i-t} ${a-l} L ${r-t} ${o-l} Z`}},mc=e=>{var t,n;return[null===(t=e.match(/L\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/))||void 0===t||null===(t=t.at(0))||void 0===t?void 0:t.replace(/L\s*/,"").split(" ").map((e=>Number(e))),null===(n=e.match(/C\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/g))||void 0===n||null===(n=n.at(0))||void 0===n?void 0:n.replace(/C\s*/,"").split(" ").map((e=>Number(e)))]},yc=(e,t)=>[[t[4],t[5]],[t[2],t[3],t[0],t[1],e[0],e[1]]],bc=(e,t,n,r,o,i)=>{const a=[o.points.at(0).x,o.points.at(0).y],s=[i.points.at(0).x,i.points.at(0).y];if(!e)return;const[l,d]=vc(e[0],t[0],a[0],e[1],t[1],a[1]),[c,u]=vc(e[0],t[0],s[0],e[1],t[1],s[1]),p=[o.points.at(-1).x,o.points.at(-1).y],h=[i.points.at(-1).x,i.points.at(-1).y],g=[r.points.at(-1).x,r.points.at(-1).y];if(!n)return;const[f,m]=vc(p[0],g[0],n[0],p[1],g[1],n[1]),[y,b]=vc(h[0],g[0],n[0],h[1],g[1],n[1]);return{mA:[l,d],mB:[c,u],endA:[f,m],endB:[y,b]}},vc=(e,t,n,r,o,i)=>{const[a,s]=[e+n,r+i],[l,d]=[a-t,s-o];return[l,d]},wc=(e("as",((e,t)=>{const{type:n,parallelIndex:r}=t.attributes;if(n===Cd.Simple||r<0)return{normal:[t],parallel:[]};const{source:o,target:i}=t,a=[],s=[];for(const l of e.edgeEntries(o,i)){const{type:e,parallelIndex:t}=l.attributes;if(e===Cd.Simple||t<0){a.push(l);continue}const{startFrom:n}=l.attributes[e];wc(e,o,n,l)&&s.push(l)}return{normal:a,parallel:s}})),e("at",(e=>{let t=e.at(0);if(!t)return{};for(const h of e)h.attributes.parallelIndex{let i=!1;if(e===Cd.Diagonal)(Math.abs(r-t)t&&o>n)||Math.abs(r-t)>Math.abs(o-n)&&(r>t&&on))&&(i=!0);else if(e===Cd.Perpendicular)(r>t&&on)&&(i=!0);else if(e===Cd.RotatePerpendicular){const[e,a,s,l]=[t*Math.SQRT1_2+n*Math.SQRT1_2,-t*Math.SQRT1_2+n*Math.SQRT1_2,r*Math.SQRT1_2+o*Math.SQRT1_2,-r*Math.SQRT1_2+o*Math.SQRT1_2];(s>e&&la)&&(i=!0)}return i})(n,i,a,s,l),u={};for(const h of e){var p;const e=h.attributes.parallelIndex>0?h.attributes.parallelIndex:0;if(0===e){u[h.edge]=d;continue}const t=5*e,r=[`M ${i} ${a+t} L ${s} ${l+t}`,`M ${i} ${a-t} L ${s} ${l-t}`],[o,g]=null!==(p=pc(d,n,t))&&void 0!==p?p:r;u[h.edge]=c?o:g}return u})),(e,t,n,r)=>{const o=r.attributes.type;return e===r.attributes.type&&t===r.source&&n===r.attributes[o].startFrom||e===r.attributes.type&&t===r.target&&n!==r.attributes[o].startFrom}),xc=(e("m",((e,t,n,r,o)=>{if(t===Cd.Simple)return-1;const i=[];for(const s of e.edgeEntries(n,r))wc(t,n,o,s)&&i.push(s.attributes.parallelIndex);i.sort();let a=0;for(const s of i){if(s>a)break;a=s+1}return a})),e("ar",((e,t,n)=>{if(t===Cd.Simple)return n;const r=e.getEdgeAttribute(n,"parallelIndex");if(r<0)return n;const{startFrom:o}=e.getEdgeAttribute(n,t),[i,a]=e.extremities(n);let s=r,l=n;for(const d of e.edgeEntries(i,a)){const e=d.attributes;(t===e.type&&i===d.source&&e[t].startFrom===o&&e.parallelIndex>=0&&e.parallelIndex=0&&e.parallelIndex{e.telemetry.app=t.payload},setTelemetryProject:(e,t)=>{e.telemetry.project=t.payload},setUnlockSimplePath:(e,t)=>{e.preference.unlockSimplePathAttempts=t.payload},setToolsPanelExpansion:(e,t)=>{e.preference.toolsPanel.expand=t.payload},setAutoParallel:(e,t)=>{e.preference.autoParallel=t.payload},setRandomStationsNames:(e,t)=>{e.preference.randomStationsNames=t.payload}}}),{setTelemetryApp:Rc,setTelemetryProject:_c,setUnlockSimplePath:Tc,setToolsPanelExpansion:Cc,setAutoParallel:jc,setRandomStationsNames:Lc}=Nc.actions;e({aa:_c,X:Tc,aQ:Cc,a2:jc,ab:Lc});const Ac=Nc.reducer,Oc={present:(new Ao).export(),past:[],future:[],svgViewBoxZoom:100,svgViewBoxMin:{x:0,y:0}},Ec=e("am",De("undo")),Mc=e("an",De("redo")),Pc=Ie({name:"param",initialState:Oc,reducers:{setFullState:(e,t)=>structuredClone(t.payload),saveGraph:(e,t)=>{e.future=[],e.past.push(e.present),e.past.length>49&&e.past.shift(),e.present=structuredClone(t.payload)},setSvgViewBoxZoom:(e,t)=>{e.svgViewBoxZoom=t.payload},setSvgViewBoxMin:(e,t)=>{e.svgViewBoxMin=t.payload}},extraReducers:e=>{e.addCase(Ec,(e=>{if(0===e.past.length)return;const t=e.past.pop();e.future.unshift(e.present),e.present=t,window.graph.clear(),window.graph.import(structuredClone(Be(t)))})).addCase(Mc,(e=>{if(0===e.future.length)return;const t=e.future.shift();e.past.push(e.present),e.present=t,window.graph.clear(),window.graph.import(structuredClone(Be(t)))}))}}),{setFullState:Ic,saveGraph:$c,setSvgViewBoxZoom:zc,setSvgViewBoxMin:Bc}=Pc.actions;e({v:$c,z:zc,A:Bc});const Dc=Pc.reducer,Gc={selected:new Set,active:void 0,refresh:{nodes:Date.now(),edges:Date.now()},mode:"free",lastTool:void 0,keepLastPath:!1,theme:[ad.Shanghai,"sh1","#E3002B",gd.white],paletteAppClip:{input:void 0,output:void 0},masterNodesCount:0,parallelLinesCount:0,stationNames:{},globalAlerts:{}},Fc=e("q",Ge("runtime/refreshNodes",(async(e,{getState:t,dispatch:n})=>{const r=t();n(Zc());let o=0;window.graph.forEachNode(((e,t)=>{t.type===Ed.Master&&(o+=1)})),n(Vc(o));const i=r.account.activeSubscriptions.RMP_CLOUD?1/0:Od;o>i&&n(su({status:"warning",message:`${Dd.t("header.settings.proLimitExceed.master")} ${Dd.t("header.settings.proLimitExceed.solution")}`}))}))),Wc=e("t",Ge("runtime/refreshEdges",(async(e,{getState:t,dispatch:n})=>{const r=t();n(Xc());const o=(e=>{let t=0;for(const n of e.edgeEntries())n.attributes.parallelIndex>=0&&(t+=1);return t})(window.graph);n(Hc(o));const i=r.account.activeSubscriptions.RMP_CLOUD?kc:Sc;o>=i&&n(jc(!1)),o>i&&n(su({status:"warning",message:`${Dd.t("header.settings.proLimitExceed.parallel")} ${Dd.t("header.settings.proLimitExceed.solution")}`}))}))),Uc=Ie({name:"runtime",initialState:Gc,reducers:{setSelected:(e,t)=>{e.selected=t.payload},addSelected:(e,t)=>{e.selected.add(t.payload)},removeSelected:(e,t)=>{e.selected.delete(t.payload)},clearSelected:e=>{e.selected=new Set},setActive:(e,t)=>{e.active=t.payload},setRefreshNodes:e=>{e.refresh.nodes=Date.now()},setRefreshEdges:e=>{e.refresh.edges=Date.now()},setMode:(e,t)=>{"free"!==e.mode&&(e.lastTool=e.mode),e.mode=t.payload},setKeepLastPath:(e,t)=>{e.keepLastPath=t.payload},setTheme:(e,t)=>{e.theme=t.payload},openPaletteAppClip:(e,t)=>{e.paletteAppClip.input=t.payload,e.paletteAppClip.output=void 0},closePaletteAppClip:e=>{e.paletteAppClip.input=void 0},onPaletteAppClipEmit:(e,t)=>{e.paletteAppClip.input=void 0,e.paletteAppClip.output=t.payload},setMasterNodesCount:(e,t)=>{e.masterNodesCount=t.payload},setParallelLinesCount:(e,t)=>{e.parallelLinesCount=t.payload},setStationNames:(e,t)=>{e.stationNames[t.payload.cityName]=t.payload.names},setGlobalAlert:(e,t)=>{const{status:n,message:r,url:o,linkedApp:i}=t.payload;e.globalAlerts[n]={message:r,url:o,linkedApp:i}},closeGlobalAlert:(e,t)=>{delete e.globalAlerts[t.payload]}},extraReducers:e=>{e.addCase(Ec,(e=>{e.refresh.nodes=Date.now(),e.refresh.edges=Date.now()})).addCase(Mc,(e=>{e.refresh.nodes=Date.now(),e.refresh.edges=Date.now()}))}}),{setMasterNodesCount:Vc,setParallelLinesCount:Hc}=Uc.actions,{setSelected:Jc,addSelected:qc,removeSelected:Kc,clearSelected:Yc,setActive:Qc,setRefreshNodes:Zc,setRefreshEdges:Xc,setMode:eu,setKeepLastPath:tu,setTheme:nu,openPaletteAppClip:ru,closePaletteAppClip:ou,onPaletteAppClipEmit:iu,setStationNames:au,setGlobalAlert:su,closeGlobalAlert:lu}=Uc.actions;e({T:Jc,aA:qc,az:Kc,y:Yc,ay:Qc,aw:eu,a1:tu,aM:nu,W:ru,ap:au,j:su,ao:lu});const du=Uc.reducer,cu=(e,t,n)=>0===t?e:function(e,t,n){function r(e,t,n){var r=t.x-e.x,i=t.y-e.y,a=Math.sqrt(r*r+i*i);return o(e,t,Math.min(1,n/a))}function o(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function i(e,t){e.length>2&&(e[e.length-2]=t.x,e[e.length-1]=t.y)}function a(e){return{x:parseFloat(e[e.length-2]),y:parseFloat(e[e.length-1])}}var s=e.split(/[,\s]/).reduce((function(e,t){var n=t.match("([a-zA-Z])(.+)");return n?(e.push(n[1]),e.push(n[2])):e.push(t),e}),[]),l=s.reduce((function(e,t){return parseFloat(t)==t&&e.length?e[e.length-1].push(t):e.push([t]),e}),[]),d=[];if(l.length>1){var c=a(l[0]),u=null;"Z"==l[l.length-1][0]&&l[0].length>2&&(u=["L",c.x,c.y],l[l.length-1]=u),d.push(l[0]);for(var p=1;p2&&"L"==g[0]&&f.length>2&&"L"==f[0]){var m,y,b=a(h),v=a(g),w=a(f);m=r(v,b,t),y=r(v,w,t),i(g,m),g.origPoint=v,d.push(g);var x=o(m,v,.5),S=o(v,y,.5),k=["C",x.x,x.y,S.x,S.y,y.x,y.y];k.origPoint=v,d.push(k)}else d.push(g)}if(u){var N=a(d[d.length-1]);d.push(["Z"]),i(d[0],N)}}else d=l;return d.reduce((function(e,t){return e+t.join(" ")+" "}),"")}(e,t),uu={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:10},pu={generatePath:(e,t,n,r,o=uu)=>{const{startFrom:i=uu.startFrom,offsetFrom:a=uu.offsetFrom,offsetTo:s=uu.offsetTo,roundCornerFactor:l=uu.roundCornerFactor}=o,[d,c,u,p]="from"===i?[e,n,t,r]:[t,r,e,n],h=Math.abs(u-d)0?-1:1):w,R="horizontal"===h?x:k+Math.abs(S-w)*(k-x>0?-1:1),[_,T,C,j]="from"===i?[w,x,S,k]:[S,k,w,x];return cu(`M ${_} ${T} L ${N} ${R} L ${C} ${j}`,l)},icon:i.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:i.jsx("path",{d:"M9,18V12L15,6",stroke:"currentColor",fill:"none"})}),defaultAttrs:uu,attrsComponent:e=>{var t,n,r;const{id:o,attrs:a,handleAttrsUpdate:s,recalculateParallelIndex:l,parallelIndex:d}=e,{t:c}=$e(),u=Pp(),p=xc(window.graph,Cd.Diagonal,o),h=d>=0&&p!==o,g=[{type:"select",label:c("panel.details.lines.common.startFrom"),value:a.startFrom,options:{from:c("panel.details.lines.common.from"),to:c("panel.details.lines.common.to")},onChange:e=>{l(o,e),a.startFrom=e,s(o,a)},minW:"full"},{type:"input",label:c("panel.details.lines.common.offsetFrom"),value:(null!==(t=a.offsetFrom)&&void 0!==t?t:uu.offsetFrom).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),a.offsetFrom=Number(e),s(o,a)},isDisabled:h,minW:"full"},{type:"input",label:c("panel.details.lines.common.offsetTo"),value:(null!==(n=a.offsetTo)&&void 0!==n?n:uu.offsetTo).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),a.offsetTo=Number(e),s(o,a)},isDisabled:h,minW:"full"},{type:"input",label:c("panel.details.lines.common.roundCornerFactor"),value:(null!==(r=null==a?void 0:a.roundCornerFactor)&&void 0!==r?r:uu.roundCornerFactor).toString(),variant:"number",onChange:e=>{(Number.isNaN(e)||Number(e)<0)&&(e="0"),a.roundCornerFactor=Number(e),s(o,a)},isDisabled:h,minW:"full"}];return h&&g.unshift({type:"custom",label:c("panel.details.lines.common.parallelDisabled"),component:i.jsxs(J,{size:"sm",variant:"link",onClick:()=>u(Jc(new Set([p]))),children:[c("panel.details.lines.common.changeInBaseLine")," ",p]})}),i.jsx(El,{fields:g})},metadata:{displayName:"panel.details.lines.diagonal.displayName"}},hu={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:18.33},gu={generatePath:(e,t,n,r,o=hu)=>{const{startFrom:i=hu.startFrom,offsetFrom:a=hu.offsetFrom,offsetTo:s=hu.offsetTo,roundCornerFactor:l=hu.roundCornerFactor}=o,[d,c]="from"===i?[a,s]:[s,a],[u,p,h,g]="from"===i?[0,d,c,0]:[d,0,0,c];return cu(`M ${e+u} ${n+p} L ${"from"===i?t+h:e+u} ${"from"===i?n+p:r+g} L ${t+h} ${r+g}`,l)},icon:i.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:i.jsx("path",{d:"M6,6H18V18",stroke:"currentColor",fill:"none"})}),defaultAttrs:hu,attrsComponent:e=>{var t,n,r;const{id:o,attrs:a,handleAttrsUpdate:s,recalculateParallelIndex:l,parallelIndex:d}=e,{t:c}=$e(),u=Pp(),p=xc(window.graph,Cd.Perpendicular,o),h=d>=0&&p!==o,g=[{type:"select",label:c("panel.details.lines.common.startFrom"),value:a.startFrom,options:{from:c("panel.details.lines.common.from"),to:c("panel.details.lines.common.to")},onChange:e=>{l(o,e),a.startFrom=e,s(o,a)},minW:"full"},{type:"input",label:c("panel.details.lines.common.offsetFrom"),value:(null!==(t=a.offsetFrom)&&void 0!==t?t:hu.offsetFrom).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),a.offsetFrom=Number(e),s(o,a)},isDisabled:h,minW:"full"},{type:"input",label:c("panel.details.lines.common.offsetTo"),value:(null!==(n=a.offsetTo)&&void 0!==n?n:hu.offsetTo).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),a.offsetTo=Number(e),s(o,a)},isDisabled:h,minW:"full"},{type:"input",label:c("panel.details.lines.common.roundCornerFactor"),value:(null!==(r=null==a?void 0:a.roundCornerFactor)&&void 0!==r?r:hu.roundCornerFactor).toString(),variant:"number",onChange:e=>{(Number.isNaN(e)||Number(e)<0)&&(e="0"),a.roundCornerFactor=Number(e),s(o,a)},isDisabled:h,minW:"full"}];return h&&g.unshift({type:"custom",label:c("panel.details.lines.common.parallelDisabled"),component:i.jsxs(J,{size:"sm",variant:"link",onClick:()=>u(Jc(new Set([p]))),children:[c("panel.details.lines.common.changeInBaseLine")," ",p]})}),i.jsx(El,{fields:g})},metadata:{displayName:"panel.details.lines.perpendicular.displayName"}},fu={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:18.33},mu={generatePath:(e,t,n,r,o=fu)=>{const{startFrom:i=fu.startFrom,offsetFrom:a=fu.offsetFrom,offsetTo:s=fu.offsetTo,roundCornerFactor:l=fu.roundCornerFactor}=o,[d,c]="from"===i?[a,s]:[s,a],[u,p,h,g]="from"===i?[0,d,c,0]:[d,0,0,c],[f,m,y,b]=[e*Math.SQRT1_2+n*Math.SQRT1_2,-e*Math.SQRT1_2+n*Math.SQRT1_2,t*Math.SQRT1_2+r*Math.SQRT1_2,-t*Math.SQRT1_2+r*Math.SQRT1_2],[v,w,x,S]=[f+u,m+p,y+h,b+g],[k,N,R,_]=[v*Math.SQRT1_2-w*Math.SQRT1_2,v*Math.SQRT1_2+w*Math.SQRT1_2,x*Math.SQRT1_2-S*Math.SQRT1_2,x*Math.SQRT1_2+S*Math.SQRT1_2],T="from"===i?y+h:f+u,C="from"===i?m+p:b+g,[j,L]=[T*Math.SQRT1_2-C*Math.SQRT1_2,T*Math.SQRT1_2+C*Math.SQRT1_2];return cu(`M ${k} ${N} L ${j} ${L} L ${R} ${_}`,l)},icon:i.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:i.jsx("path",{d:"M9,6L15,12L9,18",stroke:"currentColor",fill:"none"})}),defaultAttrs:fu,attrsComponent:e=>{var t,n,r;const{id:o,attrs:a,handleAttrsUpdate:s,recalculateParallelIndex:l,parallelIndex:d}=e,{t:c}=$e(),u=Pp(),p=xc(window.graph,Cd.RotatePerpendicular,o),h=d>=0&&p!==o,g=[{type:"select",label:c("panel.details.lines.common.startFrom"),value:a.startFrom,options:{from:c("panel.details.lines.common.from"),to:c("panel.details.lines.common.to")},onChange:e=>{l(o,e),a.startFrom=e,s(o,a)},minW:"full"},{type:"input",label:c("panel.details.lines.common.offsetFrom"),value:(null!==(t=a.offsetFrom)&&void 0!==t?t:fu.offsetFrom).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),a.offsetFrom=Number(e),s(o,a)},isDisabled:h,minW:"full"},{type:"input",label:c("panel.details.lines.common.offsetTo"),value:(null!==(n=a.offsetTo)&&void 0!==n?n:fu.offsetTo).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),a.offsetTo=Number(e),s(o,a)},isDisabled:h,minW:"full"},{type:"input",label:c("panel.details.lines.common.roundCornerFactor"),value:(null!==(r=null==a?void 0:a.roundCornerFactor)&&void 0!==r?r:fu.roundCornerFactor).toString(),variant:"number",onChange:e=>{(Number.isNaN(e)||Number(e)<0)&&(e="0"),a.roundCornerFactor=Number(e),s(o,a)},isDisabled:h,minW:"full"}];return h&&g.unshift({type:"custom",label:c("panel.details.lines.common.parallelDisabled"),component:i.jsxs(J,{size:"sm",variant:"link",onClick:()=>u(Jc(new Set([p]))),children:[c("panel.details.lines.common.changeInBaseLine")," ",p]})}),i.jsx(El,{fields:g})},metadata:{displayName:"panel.details.lines.rotatePerpendicular.displayName"}};var yu=e("S",(e=>(e.ShmetroBasic="shmetro-basic",e.ShmetroBasic2020="shmetro-basic-2020",e.ShmetroInt="shmetro-int",e.ShmetroOutOfSystemInt="shmetro-osysi",e.ShanghaiSuburbanRailway="sh-sub-rwy",e.GzmtrBasic="gzmtr-basic",e.GzmtrInt="gzmtr-int",e.GzmtrInt2024="gzmtr-int-2024",e.BjsubwayBasic="bjsubway-basic",e.BjsubwayInt="bjsubway-int",e.MTR="mtr",e.SuzhouRTBasic="suzhourt-basic",e.SuzhouRTInt="suzhourt-int",e.KunmingRTBasic="kunmingrt-basic",e.KunmingRTInt="kunmingrt-int",e.MRTBasic="mrt-basic",e.MRTInt="mrt-int",e.JREastBasic="jr-east-basic",e.JREastImportant="jr-east-imp",e.FoshanMetroBasic="foshan-metro-basic",e.QingdaoMetroStation="qingdao-metro-basic",e.TokyoMetroBasic="tokyo-metro-basic",e.TokyoMetroInt="tokyo-metro-int",e.LondonTubeBasic="london-tube-basic",e.LondonTubeInt="london-tube-int",e.LondonRiverServicesInt="london-river-int",e.GuangdongIntercityRailway="gd-intercity-rwy",e))(yu||{}));e("aL",["shmetro-basic-2020","gzmtr-basic","suzhourt-basic","kunmingrt-basic","mrt-basic","foshan-metro-basic","qingdao-metro-basic"]),e("aX",{names:["车站","Stn"]});class bu{static hexToRgb(e){return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16)]}static fade(e,t){return`rgba(${[...this.hexToRgb(e),t].join(",")})`}static euclideanDistance(e,t){return this.hexToRgb(e).reduce(((e,n,r)=>e+Math.pow(n-this.hexToRgb(t)[r],2)),0)}}function vu(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"},child:[]}]})(e)}function wu(e){return Ae({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3z"},child:[]}]})(e)}function xu(e){const{theme:t,onClick:n}=e,{t:r}=$e();return i.jsx(be,{"aria-label":r("Color"),color:t[3],bg:t[2],size:"md",_hover:{bg:bu.fade(t[2],.7)},icon:i.jsx(vu,{}),onClick:n})}const Su=e("aS",(e=>{var t;const{type:n,colorKey:r="color",defaultTheme:o}=e,a=Pp(),{selected:s,paletteAppClip:{output:l}}=Ip((e=>e.runtime)),[d]=s,c=Pe.useCallback((()=>{a(Fc()),a(Wc()),a($c(u.current.export()))}),[a,Fc,Wc,$c]),u=Pe.useRef(window.graph),[p,h,g]=[].concat(Object.values(yu)).concat(Object.values(Ed)).find((e=>n===e))?[u.current.hasNode,u.current.getNodeAttribute,u.current.mergeNodeAttributes]:[u.current.hasEdge,u.current.getEdgeAttribute,u.current.mergeEdgeAttributes],[f,m]=Pe.useState(!1);Pe.useEffect((()=>{f&&l&&((e=>{if(d&&p.bind(u.current)(d)){const t=h.bind(u.current)(d,n);t[r]=e,g.bind(u.current)(d,{[n]:t}),c()}})(l),m(!1))}),[null==l?void 0:l.toString()]);const y=d&&p.bind(u.current)(d)&&(d.startsWith("stn")||d.startsWith("misc_node")?u.current.getNodeAttribute(d,"type")===n:u.current.getEdgeAttribute(d,"style")===n)?(null!==(t=h.bind(u.current)(d,n))&&void 0!==t?t:{[r]:o})[r]:o;return i.jsx(i.Fragment,{children:i.jsx(xu,{theme:y,onClick:()=>{m(!0),a(ru(y))}})})})),ku={color:[ad.Shanghai,"sh1","#E4002B",gd.white]},Nu=e("aC",{component:e=>{const{id:t,path:n,styleAttrs:r,newLine:o,handlePointerDown:a}=e,{color:s=ku.color}=null!=r?r:ku,l=Pe.useCallback((e=>a(t,e)),[t,a]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:s[2],strokeWidth:"5",strokeLinecap:"round",cursor:"pointer",onPointerDown:o?void 0:l,pointerEvents:o?"none":void 0})},defaultAttrs:ku,attrsComponent:e=>{const{t:t}=$e(),n=[{type:"custom",label:t("color"),component:i.jsx(Su,{type:jd.SingleColor,defaultTheme:ku.color})}];return i.jsx(El,{fields:n})},metadata:{displayName:"panel.details.lines.singleColor.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}}),Ru={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsxs("g",{id:t,onPointerDown:o,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"7",strokeLinecap:"round"}),i.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"4.33",strokeLinecap:"round"})]})},defaultAttrs:{},attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.shmetroVirtualInt.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular,Cd.Simple]}},_u={isEnd:!1},Tu={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("g",{id:t,onPointerDown:o,cursor:"pointer",children:i.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})})},preComponent:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{isEnd:a=_u.isEnd}=r,s=Pe.useCallback((e=>o(t,e)),[t,o]),l=a?"round":void 0;return i.jsx("g",{id:`${t}.pre`,onPointerDown:s,cursor:"pointer",children:i.jsx("path",{d:n,fill:"none",stroke:"#898989",strokeWidth:"5",strokeLinecap:l})})},defaultAttrs:_u,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:r}=e,{t:o}=$e(),a=[{type:"switch",label:o("panel.details.lines.shanghaiSuburbanRailway.isEnd"),isChecked:n.isEnd,onChange:e=>{n.isEnd=e,r(t,n)},oneLine:!0,minW:"full"}];return i.jsx(El,{fields:a})},metadata:{displayName:"panel.details.lines.shanghaiSuburbanRailway.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},Cu={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:"#565656",strokeWidth:"3",strokeDasharray:"3",cursor:"pointer",onPointerDown:o})},defaultAttrs:{},attrsComponent:()=>null,metadata:{displayName:"panel.details.lines.gzmtrVirtualInt.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular,Cd.Simple]}},ju={color:[ad.Guangzhou,"gz11","#ffb00a",gd.black]},Lu={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=ju.color}=null!=r?r:ju,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:11.467170000000001}),i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:9.96138})]})},defaultAttrs:ju,attrsComponent:e=>{const{t:t}=$e(),n=[{type:"custom",label:t("color"),component:i.jsx(Su,{type:jd.GZMTRLoop,defaultTheme:ju.color})}];return i.jsx(El,{fields:n})},metadata:{displayName:"panel.details.lines.gzmtrLoop.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},Au={color:[ad.Shanghai,"jsr","#000000",gd.white]},Ou={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Au.color}=null!=r?r:Au,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),i.jsx("path",{d:n,fill:"none",stroke:a[3],strokeWidth:"4.67",strokeDasharray:"17.5"})]})},defaultAttrs:Au,attrsComponent:e=>{const{t:t}=$e(),n=[{type:"custom",label:t("color"),component:i.jsx(Su,{type:jd.ChinaRailway,defaultTheme:Au.color})}];return i.jsx(El,{fields:n})},metadata:{displayName:"panel.details.lines.chinaRailway.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},Eu={color:[ad.Beijing,"bj1","#c23a30",gd.white]},Mu={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Eu.color}=null!=r?r:Eu,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"6",strokeLinecap:"round"}),i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"})]})},defaultAttrs:Eu,attrsComponent:e=>{$e();const t=[{type:"custom",label:"color",component:i.jsx(Su,{type:jd.BjsubwaySingleColor,defaultTheme:Eu.color})}];return i.jsx(El,{fields:t})},metadata:{displayName:"panel.details.lines.bjsubwaySingleColor.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},Pu=e("aR",(e=>{const{t:t}=$e(),n=Pp(),{selected:r}=Ip((e=>e.runtime)),[o]=r,a=Pe.useRef(window.graph),s=[];if(1===r.size&&a.current.hasNode(o)){const r=a.current.getNodeAttribute(o,"type"),i=a.current.getNodeAttribute(o,r);s.push(...e.fields.filter((e=>"custom"!==e.type)).map((e=>{var s,l,d;return{type:e.type,label:t(e.label),value:null===(s=e.value)||void 0===s?void 0:s.call(e,i),isChecked:null===(l=e.isChecked)||void 0===l?void 0:l.call(e,i),hidden:null===(d=e.hidden)||void 0===d?void 0:d.call(e,i),options:e.options,disabledOptions:e.disabledOptions&&e.disabledOptions(i),validator:e.validator,oneLine:e.oneLine,onChange:s=>{let l;try{l=e.onChange(s,i)}catch(d){return void n(su({status:"error",message:t(`err-code.${d}`)}))}a.current.mergeNodeAttributes(o,{[r]:l}),n(Fc()),n($c(a.current.export()))}}})),...e.fields.filter((e=>"custom"===e.type)).map((e=>({...e,label:t(e.label)}))))}if(1===r.size&&a.current.hasEdge(o)&&"style"!==e.type){const r=a.current.getEdgeAttribute(o,"type"),i=a.current.getEdgeAttribute(o,r);s.push(...e.fields.map((e=>({type:e.type,label:t(e.label),value:e.value(i),options:e.options,disabledOptions:e.disabledOptions&&e.disabledOptions(i),validator:e.validator,onChange:t=>{a.current.mergeEdgeAttributes(o,{[r]:e.onChange(t,i)}),n(Wc()),n($c(a.current.export()))}}))))}if(1===r.size&&a.current.hasEdge(o)&&"style"===e.type){const r=a.current.getEdgeAttribute(o,"style"),i=a.current.getEdgeAttribute(o,r);s.push(...e.fields.filter((e=>"custom"!==e.type)).map((e=>({type:e.type,label:t(e.label),value:e.value(i),options:e.options,disabledOptions:e.disabledOptions&&e.disabledOptions(i),validator:e.validator,onChange:t=>{a.current.mergeEdgeAttributes(o,{[r]:e.onChange(t,i)}),n(Wc()),n($c(a.current.export()))}}))),...e.fields.filter((e=>"custom"===e.type)).map((e=>({...e,label:t(e.label)}))))}return i.jsx(El,{fields:s,minW:276})})),Iu={color:[ad.Beijing,"bj1","#c23a30",gd.white]},$u=[{type:"custom",label:"color",component:i.jsx(Su,{type:jd.BjsubwayTram,defaultTheme:Iu.color})}],zu={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Iu.color}=null!=r?r:Iu,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5"}),i.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"1.67"})]})},defaultAttrs:Iu,attrsComponent:()=>i.jsx(Pu,{fields:$u,type:"style"}),metadata:{displayName:"panel.details.lines.bjsubwayTram.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},Bu={colorA:[ad.Shanghai,"maglevA","#008B9A",gd.white],colorB:[ad.Shanghai,"maglevB","#F5A74E",gd.white]},Du=()=>{const{t:e}=$e(),t=Pp(),{selected:n}=Ip((e=>e.runtime)),[r]=n,o=Pe.useRef(window.graph);return i.jsx(be,{"aria-label":e("panel.details.lines.dualColor.swap"),icon:i.jsx(wu,{}),size:"sm",onClick:()=>{var e;const n=null!==(e=o.current.getEdgeAttribute(r,jd.DualColor))&&void 0!==e?e:Bu,i=n.colorA;n.colorA=n.colorB,n.colorB=i,o.current.mergeEdgeAttributes(r,{[jd.DualColor]:n}),t(Wc()),t($c(o.current.export()))}})},Gu={component:e=>{const{id:t,type:n,path:r,styleAttrs:o,handlePointerDown:a}=e,{colorA:s=Bu.colorA,colorB:l=Bu.colorB}=null!=o?o:Bu,d=Pe.useCallback((e=>a(t,e)),[t,a]),[c,u]=Pe.useState(r),[p,h]=Pe.useState(r);return Pe.useEffect((()=>{const e=pc(r,n,-1.25,1.25);e&&(u(e[0]),h(e[1]))}),[r]),i.jsxs("g",{id:t,onPointerDown:d,cursor:"pointer",children:[i.jsx("path",{d:c,fill:"none",stroke:s[2],strokeWidth:"2.5",strokeLinecap:"round"}),i.jsx("path",{d:p,fill:"none",stroke:l[2],strokeWidth:"2.5",strokeLinecap:"round"})]})},defaultAttrs:Bu,attrsComponent:e=>{const{t:t}=$e(),n=[{type:"custom",label:t("panel.details.lines.dualColor.swap"),component:i.jsx(Du,{})},{type:"custom",label:t("panel.details.lines.dualColor.colorA"),component:i.jsx(Su,{type:jd.DualColor,colorKey:"colorA",defaultTheme:Bu.colorA})},{type:"custom",label:t("panel.details.lines.dualColor.colorB"),component:i.jsx(Su,{type:jd.DualColor,colorKey:"colorB",defaultTheme:Bu.colorB})}];return i.jsx(El,{fields:n})},metadata:{displayName:"panel.details.lines.dualColor.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},Fu={color:[ad.Shanghai,"river","#B9E3F9",gd.white],width:20},Wu=[{type:"input",label:"panel.details.lines.river.width",variant:"number",value:e=>(null!=e?e:Fu).width,onChange:(e,t)=>{const n=null!=t?t:Fu;return n.width=Number(e),n}}],Uu={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Fu.color,width:s=Fu.width}=null!=r?r:Fu,l=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:a[2],strokeWidth:s,strokeLinecap:"round",cursor:"pointer",onPointerDown:l})},defaultAttrs:Fu,attrsComponent:()=>i.jsx(Pu,{fields:Wu,type:"style"}),metadata:{displayName:"panel.details.lines.river.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular,Cd.Simple]}},Vu={color:[ad.Hongkong,"twl","#E2231A",gd.white]},Hu=[{type:"custom",label:"color",component:i.jsx(Su,{type:jd.MTRRaceDays,defaultTheme:Vu.color})}],Ju={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Vu.color}=null!=r?r:Vu,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"butt",strokeDasharray:"5 2.5",cursor:"pointer",onPointerDown:s})},defaultAttrs:Vu,attrsComponent:()=>i.jsx(Pu,{fields:Hu,type:"style"}),metadata:{displayName:"panel.details.lines.mtrRaceDays.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},qu={color:[ad.Hongkong,"lrl","#CD9700",gd.white]},Ku=[{type:"custom",label:"color",component:i.jsx(Su,{type:jd.MTRLightRail,defaultTheme:qu.color})}],Yu={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=qu.color}=null!=r?r:qu,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:a[2],strokeWidth:"2.5",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},defaultAttrs:qu,attrsComponent:()=>i.jsx(Pu,{fields:Ku,type:"style"}),metadata:{displayName:"panel.details.lines.mtrLightRail.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},Qu={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:"black",strokeWidth:"1.33",strokeDasharray:"2.66 1.33",cursor:"pointer",onPointerDown:o})},defaultAttrs:{},attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.mtrUnpaidArea.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular,Cd.Simple]}},Zu={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",cursor:"pointer",onPointerDown:o})},defaultAttrs:{},attrsComponent:()=>i.jsx(Pu,{fields:[],type:"style"}),metadata:{displayName:"panel.details.lines.mtrPaidArea.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular,Cd.Simple]}},Xu={color:[ad.Beijing,"bj1","#c23a30",gd.white]},ep={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Xu.color}=null!=r?r:Xu,s=Pe.useCallback((e=>o(t,e)),[t,o]),l=de("white","var(--chakra-colors-gray-800)");return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeDasharray:"2 2"}),i.jsx("path",{d:n,fill:"none",stroke:l,strokeWidth:"3.4"})]})},defaultAttrs:Xu,attrsComponent:e=>{$e();const t=[{type:"custom",label:"color",component:i.jsx(Su,{type:jd.BjsubwayDotted,defaultTheme:Xu.color})}];return i.jsx(El,{fields:t})},metadata:{displayName:"panel.details.lines.bjsubwayDotted.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},tp={color:[ad.Singapore,"ewl","#009739",gd.white]},np={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=tp.color}=null!=r?r:tp,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeDasharray:"0 10",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},defaultAttrs:tp,attrsComponent:e=>{$e();const t=[{type:"custom",label:"color",component:i.jsx(Su,{type:jd.MRTUnderConstruction,defaultTheme:tp.color})}];return i.jsx(El,{fields:t})},metadata:{displayName:"panel.details.lines.mrtUnderConstruction.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},rp={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:"black",strokeWidth:"5",strokeDasharray:"0 10 10 10",strokeLinecap:"round",cursor:"pointer",onPointerDown:o})},defaultAttrs:{},attrsComponent:e=>null,metadata:{displayName:"panel.details.lines.mrtSentosaExpress.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},op={color:[ad.Tokyo,"jy","#9ACD32",gd.black]},ip={component:e=>{const{id:t,path:n,styleAttrs:r,newLine:o,handlePointerDown:a}=e,{color:s=op.color}=null!=r?r:op,l=Pe.useCallback((e=>a(t,e)),[t,a]);return i.jsxs("g",{id:t,onPointerDown:l,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"5.1"}),i.jsx("path",{d:n,fill:"none",stroke:s[2],strokeWidth:"4.9"})]})},defaultAttrs:op,attrsComponent:e=>{const{t:t}=$e(),n=[{type:"custom",label:t("color"),component:i.jsx(Su,{type:jd.JREastSingleColor,defaultTheme:op.color})}];return i.jsx(El,{fields:n})},metadata:{displayName:"panel.details.lines.jrEastSingleColor.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},ap=5*Math.SQRT1_2,sp=.25,lp=(ap*Math.SQRT2-sp)/2*Math.SQRT2,dp={color:[ad.Tokyo,"jy","#9ACD32",gd.black]},cp={component:e=>{const{id:t,type:n,path:r,styleAttrs:o,newLine:a,handlePointerDown:s}=e,{color:l=dp.color}=null!=o?o:dp,d=Pe.useCallback((e=>s(t,e)),[t,s]),[c,u]=Pe.useState({outline:r,pA:r,pB:r});return Pe.useEffect((()=>{const e=((e,t,n,r)=>{var o;r=null!==(o=r)&&void 0!==o?o:2.5;const[i,a]=hc(e);if(!i||!a)return;if(i[0]===a[0]||i[1]===a[1]||t===Cd.Diagonal&&Math.abs(i[1]-a[1])===Math.abs(i[0]-a[0])){const e=Math.abs(n),[t,r]=gc(i,a,e);return{outline:fc(i,a,e),pA:t,pB:r}}const[s,l]=mc(e);if(!s||!l)return;const d=new uc([...s,...l]),[c,u]=[d.scale(n),d.scale(r)],p=bc(i,s,a,d,c,u);if(!p)return;const{mA:[h,g],mB:[f,m],endA:[y,b],endB:[v,w]}=p,[x,S]=mc(u.toSVG().replace("M","L")),[k,N]=yc(x,S);return{outline:`M ${h} ${g} ${c.toSVG().replace("M","L")} L ${y} ${b} L ${v} ${w} L ${k.join(" ")} C ${N.join(" ")} L ${f} ${m} Z`,pA:`M ${h} ${g} ${c.toSVG().replace("M","L")} L ${y} ${b}`,pB:`M ${f} ${m} ${u.toSVG().replace("M","L")} L ${v} ${w}`}})(r,n,-2.5,2.5);e&&u(e)}),[r]),i.jsxs("g",{id:t,onPointerDown:d,cursor:"pointer",children:[i.jsxs("defs",{children:[i.jsxs("clipPath",{id:"jr_east_fill_pattern_clip_path",patternUnits:"userSpaceOnUse",children:[i.jsx("polygon",{points:`0,0 0,${lp} ${lp},0`}),i.jsx("polygon",{points:`${ap},${ap} ${ap-lp},${ap} ${ap},${ap-lp}`})]}),i.jsxs("pattern",{id:`jr_east_${t}_fill_pattern_${l[2]}`,width:ap,height:ap,patternUnits:"userSpaceOnUse",children:[i.jsx("rect",{width:ap,height:ap,fill:l[2]}),i.jsx("line",{x1:"0",y1:"0",x2:ap,y2:ap,stroke:"white",strokeWidth:sp,strokeOpacity:"50%",clipPath:"url(#jr_east_fill_pattern_clip_path)"}),i.jsx("line",{x1:ap,y1:"0",x2:"0",y2:ap,stroke:"white",strokeWidth:sp,strokeOpacity:"50%"})]})]}),i.jsx("path",{d:c.outline,fill:`url(#jr_east_${t}_fill_pattern_${l[2]})`}),i.jsx("path",{d:c.pA,fill:"none",stroke:"black",strokeWidth:"0.1"}),i.jsx("path",{d:c.pB,fill:"none",stroke:"black",strokeWidth:"0.1"})]})},defaultAttrs:dp,attrsComponent:e=>{const{t:t}=$e(),n=[{type:"custom",label:t("color"),component:i.jsx(Su,{type:jd.JREastSingleColorPattern,defaultTheme:dp.color})}];return i.jsx(El,{fields:n})},metadata:{displayName:"panel.details.lines.jrEastSingleColorPattern.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},up={color:[ad.Singapore,"lrt","#708573",gd.white]},pp={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=up.color}=null!=r?r:up,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:a[2],strokeWidth:"2.157",strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},defaultAttrs:up,attrsComponent:e=>{const t=[{type:"custom",label:"color",component:i.jsx(Su,{type:jd.LRTSingleColor,defaultTheme:up.color})}];return i.jsx(El,{fields:t})},metadata:{displayName:"panel.details.lines.lrtSingleColor.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},hp={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("g",{id:t,onPointerDown:o,cursor:"pointer",children:i.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"2.5",strokeLinecap:"round"})})},preComponent:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("g",{id:`${t}.pre`,onPointerDown:o,cursor:"pointer",children:i.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"7.5",strokeLinecap:"round"})})},defaultAttrs:{},attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.londonTubeInternalInt.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},gp={component:e=>{const{id:t,path:n,handlePointerDown:r}=e,o=Pe.useCallback((e=>r(t,e)),[t,r]);return i.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"5",strokeDasharray:"5 2.5",cursor:"pointer",onPointerDown:o})},defaultAttrs:{},attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.londonTube10MinWalk.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},fp={color:[ad.London,"central","#DC241F",gd.white]},mp={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=fp.color}=null!=r?r:fp,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("path",{id:t,d:n,fill:"none",stroke:a[2],strokeWidth:"5",cursor:"pointer",onPointerDown:s})},defaultAttrs:fp,attrsComponent:e=>{const{t:t}=$e(),n=[{type:"custom",label:t("color"),component:i.jsx(Su,{type:jd.LondonTubeTerminal,defaultTheme:fp.color})}];return i.jsx(El,{fields:n})},metadata:{displayName:"panel.details.lines.londonTubeTerminal.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},yp={colorBackground:[ad.London,"thameslink","#d28db0",gd.white],colorForeground:[ad.London,"white","#ffffff",gd.black],limitedService:!1},bp={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{colorBackground:a=yp.colorBackground,colorForeground:s=yp.colorForeground,limitedService:l=yp.limitedService}=null!=r?r:yp,d=Pe.useCallback((e=>o(t,e)),[t,o]);return l?i.jsxs("g",{id:t,onPointerDown:d,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),i.jsx("path",{d:n,fill:"none",stroke:s[2],strokeWidth:"4.25",strokeLinecap:"round"}),i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"2",strokeDasharray:"7 3"})]}):i.jsxs("g",{id:t,onPointerDown:d,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),i.jsx("path",{d:n,fill:"none",stroke:s[2],strokeWidth:"2",strokeDasharray:"7 3"})]})},defaultAttrs:yp,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:r}=e,{t:o}=$e(),a=[{type:"switch",label:o("panel.details.lines.londonRail.limitedService"),oneLine:!0,isChecked:n.limitedService,onChange:e=>{n.limitedService=e,r(t,n)},minW:"full"},{type:"custom",label:o("panel.details.lines.londonRail.colorBackground"),component:i.jsx(Su,{type:jd.LondonRail,colorKey:"colorBackground",defaultTheme:yp.colorBackground})},{type:"custom",label:o("panel.details.lines.londonRail.colorForeground"),component:i.jsx(Su,{type:jd.LondonRail,colorKey:"colorForeground",defaultTheme:yp.colorForeground})}];return i.jsx(El,{fields:a})},metadata:{displayName:"panel.details.lines.londonRail.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},vp={color:[ad.London,"elizabeth","#9364cc",gd.white]},wp={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=vp.color}=null!=r?r:vp,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("g",{id:t,onPointerDown:s,cursor:"pointer",children:i.jsx("path",{d:n,fill:"none",stroke:a[3],strokeWidth:"1.67",strokeLinecap:"round"})})},preComponent:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=vp.color}=null!=r?r:vp,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsx("g",{id:`${t}.pre`,onPointerDown:s,cursor:"pointer",children:i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5"})})},defaultAttrs:vp,attrsComponent:e=>{const{t:t}=$e(),n=[{type:"custom",label:t("color"),component:i.jsx(Su,{type:jd.LondonSandwich,defaultTheme:vp.color})}];return i.jsx(El,{fields:n})},metadata:{displayName:"panel.details.lines.londonSandwich.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},xp={color:[ad.London,"rail","#d6ae00",gd.white]},Sp={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=xp.color}=null!=r?r:xp,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),i.jsx("path",{d:n,fill:"none",stroke:a[3],strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"0.001 6"})]})},defaultAttrs:xp,attrsComponent:e=>{const{t:t}=$e(),n=[{type:"custom",label:t("color"),component:i.jsx(Su,{type:jd.LondonLutonAirportDART,defaultTheme:xp.color})}];return i.jsx(El,{fields:n})},metadata:{displayName:"panel.details.lines.londonLutonAirportDART.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},kp={color:[ad.London,"dangleway","#dc241f",gd.white]},Np={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=kp.color}=null!=r?r:kp,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5"}),i.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"3"}),i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"1"})]})},defaultAttrs:kp,attrsComponent:e=>{const{t:t}=$e(),n=[{type:"custom",label:t("color"),component:i.jsx(Su,{type:jd.LondonIFSCloudCableCar,defaultTheme:kp.color})}];return i.jsx(El,{fields:n})},metadata:{displayName:"panel.details.lines.londonIFSCloudCableCar.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},Rp={color:[ad.Guangzhou,"ir","#2559a8",gd.white]},_p={component:e=>{const{id:t,path:n,styleAttrs:r,handlePointerDown:o}=e,{color:a=Rp.color}=null!=r?r:Rp,s=Pe.useCallback((e=>o(t,e)),[t,o]);return i.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[i.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round"}),i.jsx("path",{d:n,fill:"none",stroke:a[3],strokeWidth:"2.5",strokeDasharray:"7.5"})]})},defaultAttrs:Rp,attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.guangdongIntercityRailway.displayName",supportLinePathType:[Cd.Diagonal,Cd.Perpendicular,Cd.RotatePerpendicular]}},Tp=e("l",{[Cd.Diagonal]:pu,[Cd.Perpendicular]:gu,[Cd.RotatePerpendicular]:mu,[Cd.Simple]:Ad}),Cp=e("au",{[jd.SingleColor]:Nu,[jd.ShmetroVirtualInt]:Ru,[jd.ShanghaiSuburbanRailway]:Tu,[jd.GzmtrVirtualInt]:Cu,[jd.GZMTRLoop]:Lu,[jd.ChinaRailway]:Ou,[jd.BjsubwaySingleColor]:Mu,[jd.BjsubwayTram]:zu,[jd.BjsubwayDotted]:ep,[jd.DualColor]:Gu,[jd.River]:Uu,[jd.MTRRaceDays]:Ju,[jd.MTRLightRail]:Yu,[jd.MTRUnpaidArea]:Qu,[jd.MTRPaidArea]:Zu,[jd.MRTUnderConstruction]:np,[jd.MRTSentosaExpress]:rp,[jd.JREastSingleColor]:ip,[jd.JREastSingleColorPattern]:cp,[jd.LRTSingleColor]:pp,[jd.LondonTubeTerminal]:mp,[jd.LondonTubeInternalInt]:hp,[jd.LondonTube10MinWalk]:gp,[jd.LondonRail]:bp,[jd.LondonSandwich]:wp,[jd.LondonLutonAirportDART]:Sp,[jd.LondonIFSCloudCableCar]:Np,[jd.GuangdongIntercityRailway]:_p}),jp=e("I",(async()=>JSON.stringify((await Io((async()=>{const{default:e}=await n.import("./tutorial-legacy-DHxnaVOs.js");return{default:e}}))).default))),Lp=e("x",(async e=>{let t=!1;e||(e=await jp(),t=!0);let n=JSON.parse(e);"version"in n&&Number.isInteger(n.version)||(n=JSON.parse(await jp()),t=!0);let r=Number(n.version),o=JSON.stringify(n);for(;r in Op;)o=Op[r](o),r=Number(JSON.parse(o).version),t=!0;return t&&(console.warn(`Upgrade save from version: ${n.version} to version: ${r}`),localStorage.setItem(id.PARAM_BACKUP,e)),o})),Ap=e("s",(e=>{const{present:t,past:n,future:r,...o}=e,i={...o,graph:t,version:43};return JSON.stringify(i)})),Op={0:e=>{var t;return JSON.stringify({version:1,graph:null===(t=JSON.parse(e))||void 0===t?void 0:t.graph,svgViewBoxZoom:100,svgViewBoxMin:{x:0,y:0}})},1:e=>{const t=JSON.parse(e),n=new Ao;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&t.type!==yu.GzmtrInt)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r&&"transfer"in r&&delete r.transfer,n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:2,graph:n.export()})},2:e=>{const t=JSON.parse(e),n=new Ao;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn"))).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);"middle"===(null==r?void 0:r.nameOffsetX)&&"middle"===(null==r?void 0:r.nameOffsetY)&&(r.nameOffsetX="right",r.nameOffsetY="top"),"up"===(null==r?void 0:r.nameOffsetY)&&(r.nameOffsetY="top"),n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:3,graph:n.export()})},3:e=>{const t=JSON.parse(e),n=new Ao;return n.import(null==t?void 0:t.graph),n.filterEdges(((e,t,n,r,o,i,a)=>e.startsWith("line"))).forEach((e=>{const t=n.getEdgeAttribute(e,"color");n.removeEdgeAttribute(e,"color"),n.mergeEdgeAttributes(e,{style:jd.SingleColor,[jd.SingleColor]:{color:t}})})),n.filterEdges(((e,t,n,r,o,i,a)=>e.startsWith("misc_edge"))).forEach((e=>{const t=`line_${Td(10)}`,[r,o]=n.extremities(e),i=n.getEdgeAttribute(e,"type"),a=i;n.addDirectedEdgeWithKey(t,r,o,{visible:!0,zIndex:0,type:Cd.Simple,[i]:structuredClone(Tp[Cd.Simple].defaultAttrs),style:a,[a]:structuredClone(Cp[a].defaultAttrs),reconcileId:""}),n.dropEdge(e)})),JSON.stringify({...t,version:4,graph:n.export()})},4:e=>{const t=JSON.parse(e),n=new Ao;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&(t.type===yu.GzmtrBasic||t.type===yu.GzmtrInt))).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.open=!0,r.secondaryNames=["",""],n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:5,graph:n.export()})},5:e=>{const t=JSON.parse(e),n=new Ao;return n.import(null==t?void 0:t.graph),n.filterEdges(((e,t,n,r,o,i,a)=>e.startsWith("line")&&t.type===Cd.Simple)).forEach((e=>{var t;const r=null!==(t=n.getEdgeAttribute(e,Cd.Simple))&&void 0!==t?t:{offset:0};r.offset=0,n.mergeEdgeAttributes(e,{[Cd.Simple]:r})})),JSON.stringify({...t,version:6,graph:n.export()})},6:e=>{const t=JSON.parse(e),n=new Ao;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&t.type===yu.GzmtrBasic)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.tram=!1,n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:7,graph:n.export()})},7:e=>JSON.stringify({...JSON.parse(e),version:8}),8:e=>JSON.stringify({...JSON.parse(e),version:9}),9:e=>JSON.stringify({...JSON.parse(e),version:10}),10:e=>{const t=JSON.parse(e),n=new Ao;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===Ed.Text)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.color=[ad.Shanghai,"jsr","#000000",gd.white],n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:11,graph:n.export()})},11:e=>JSON.stringify({...JSON.parse(e),version:12}),12:e=>{const t=JSON.parse(e),n=new Ao;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===Ed.Text)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.rotate=0,r.italic=!1,n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:13,graph:n.export()})},13:e=>JSON.stringify({...JSON.parse(e),version:14}),14:e=>JSON.stringify({...JSON.parse(e),version:15}),15:e=>{const t=JSON.parse(e),n=new Ao;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===Ed.Text)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.italic=r.italic?"italic":"normal",r.bold="normal",n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:16,graph:n.export()})},16:e=>{const t=JSON.parse(e),n=new Ao;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===Ed.Facilities)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);let o=0;switch(r.type){case"airport":case"maglev":case"disney":case"railway":o+=12.5;break;case"hsr":case"airport_hk":case"disney_hk":o+=9.5}n.updateNodeAttribute(e,"y",(e=>(null!=e?e:0)+o))})),JSON.stringify({...t,version:17,graph:n.export()})},17:e=>JSON.stringify({...JSON.parse(e),version:18}),18:e=>JSON.stringify({...JSON.parse(e),version:19}),19:e=>JSON.stringify({...JSON.parse(e),version:20}),20:e=>JSON.stringify({...JSON.parse(e),version:21}),21:e=>JSON.stringify({...JSON.parse(e),version:22}),22:e=>JSON.stringify({...JSON.parse(e),version:23}),23:e=>JSON.stringify({...JSON.parse(e),version:24}),24:e=>{const t=JSON.parse(e),n=new Ao;return n.import(t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&t.type===yu.GzmtrInt||e.startsWith("misc_node")&&t.type===Ed.GzmtrLineBadge)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.tram=!1,n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:25,graph:n.export()})},25:e=>JSON.stringify({...JSON.parse(e),version:26}),26:e=>{const t=JSON.parse(e),n=new Ao;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===Ed.GzmtrLineBadge)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.span=!0,n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:27,graph:n.export()})},27:e=>{const t=JSON.parse(e),n=new Ao;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&t.type===yu.GzmtrInt)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);for(let n=0;nJSON.stringify({...JSON.parse(e),version:29}),29:e=>JSON.stringify({...JSON.parse(e),version:30}),30:e=>JSON.stringify({...JSON.parse(e),version:31}),31:e=>{const t=JSON.parse(e),n=new Ao;return n.import(null==t?void 0:t.graph),n.filterEdges(((e,t)=>t.style===jd.ChinaRailway)).forEach((e=>{const t=n.getEdgeAttributes(e)[jd.ChinaRailway];n.mergeEdgeAttributes(e,{[jd.ChinaRailway]:{...t,color:[ad.Shanghai,"jsr","#000000",gd.white]}})})),JSON.stringify({...t,version:32,graph:n.export()})},32:e=>JSON.stringify({...JSON.parse(e),version:33}),33:e=>{const t=JSON.parse(e),n=new Ao;return n.import(null==t?void 0:t.graph),n.forEachDirectedEdge((e=>{n.setEdgeAttribute(e,"parallelIndex",-1),n.updateEdgeAttribute(e,"zIndex",(e=>Math.max(-10,(null!=e?e:0)-5)))})),n.forEachNode((e=>{n.updateNodeAttribute(e,"zIndex",(e=>Math.min(10,(null!=e?e:0)+5)))})),JSON.stringify({...t,version:34,graph:n.export()})},34:e=>JSON.stringify({...JSON.parse(e),version:35}),35:e=>JSON.stringify({...JSON.parse(e),version:36}),36:e=>JSON.stringify({...JSON.parse(e),version:37}),37:e=>JSON.stringify({...JSON.parse(e),version:38}),38:e=>JSON.stringify({...JSON.parse(e),version:39}),39:e=>{const t=JSON.parse(e),n=new Ao;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===Ed.Facilities)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);"qingdao_airport"===r.type?r.type="airport_qingdao":"qingdao_coach_station"===r.type?r.type="coach_station_qingdao":"qingdao_cruise_terminal"===r.type?r.type="cruise_terminal_qingdao":"qingdao_railway"===r.type?r.type="railway_qingdao":"qingdao_tram"===r.type&&(r.type="tram_qingdao"),n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:40,graph:n.export()})},40:e=>JSON.stringify({...JSON.parse(e),version:41}),41:e=>{const t=JSON.parse(e),n=new Ao;n.import(null==t?void 0:t.graph);const r=e=>e.map((e=>e.replaceAll("\\","\n")));return n.forEachNode(((e,t)=>{const o=n.getNodeAttribute(e,"type");let i;(o===yu.BjsubwayBasic||o===yu.BjsubwayInt||o===yu.FoshanMetroBasic||o===yu.GuangdongIntercityRailway||o===yu.GzmtrBasic||o===yu.GzmtrInt||o===yu.JREastBasic||o===yu.JREastImportant||o===yu.KunmingRTBasic||o===yu.KunmingRTInt||o===yu.MRTBasic||o===yu.MRTInt||o===yu.MTR||o===yu.ShanghaiSuburbanRailway||o===yu.ShmetroBasic2020||o===yu.ShmetroBasic||o===yu.ShmetroInt||o===yu.ShmetroOutOfSystemInt||o===yu.SuzhouRTBasic||o===yu.SuzhouRTInt||o===yu.TokyoMetroBasic||o===yu.TokyoMetroInt)&&(i=r(t[o].names)),i&&(t[o].names=i,n.mergeNodeAttributes(e,t))})),JSON.stringify({...t,version:42,graph:n.export()})},42:e=>{const t=JSON.parse(e),n=new Ao;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&t.type===yu.GzmtrInt2024)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),r=n.getNodeAttribute(e,t);r.columns=2,r.topHeavy=!1,r.osiPosition="none",r.preferVertical&&2===r.transfer.flat().length&&(r.columns=1),delete r.preferVertical,n.mergeNodeAttributes(e,{[t]:r})})),JSON.stringify({...t,version:43,graph:n.export()})}};He();const Ep=Fe({account:hd,app:Ac,param:Dc,runtime:du}),Mp=((e={})=>We({reducer:Ep,middleware:e=>e({serializableCheck:!1}),preloadedState:e}))();Mp.subscribe((async()=>{await(async e=>{if(!Nd){const e=(new Ao).export();Nd=await wd(JSON.stringify(e)),Kn.debug(`Default graph hash: ${Nd}`)}const t=await wd(JSON.stringify(e));kd&&kd!==Nd&&kd!==t&&(Kn.debug(`Notify RMP save change, hash: ${t}`),Sd.postMessage({type:"SAVE_CHANGED",key:id.PARAM,from:"rmp"})),kd=t})(Mp.getState().param.present),localStorage.setItem(id.PARAM,Ap(Mp.getState().param)),localStorage.setItem(id.APP,JSON.stringify(Mp.getState().app)),localStorage.setItem(id.LOGIN_STATE,JSON.stringify(Mp.getState().account))}));const Pp=e("c",(()=>Ue())),Ip=e("d",Ve),$p=Pe.lazy((()=>Io((()=>n.import("./page-header-legacy-D9UDrK14.js"))))),zp=Pe.lazy((()=>Io((()=>n.import("./tools-legacy-vh8FZzIz.js"))))),Bp=Pe.lazy((()=>Io((()=>n.import("./svg-wrapper-legacy-Cp6skDP9.js"))))),Dp=Pe.lazy((()=>Io((()=>n.import("./details-legacy-C-XI805-.js"))))),Gp=Pe.lazy((()=>Io((()=>n.import("./rmg-palette-app-clip-legacy-DxtS-LUQ.js")))));function Fp(){const e=Pp(),{paletteAppClip:{input:t}}=Ip((e=>e.runtime)),{t:n}=$e(),[r,o]=Pe.useState(!1);Pe.useEffect((()=>{qn.isStandaloneWindow()&&!window.localStorage.getItem(id.DO_NOT_SHOW_RMT_MSG)&&o(!0)}),[]);const a=new Date,s=`${a.getFullYear()}${String(a.getMonth()+1).padStart(2,"0")}01`,l=`${String(a.getFullYear()).slice(-2)}.${a.getMonth()+1}.1`;return i.jsx(ed,{children:i.jsx(Il,{children:i.jsxs(Pe.Suspense,{fallback:i.jsxs(i.Fragment,{children:[i.jsx("p",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:"Rail Map Toolkit protocol... checked"}),i.jsxs("p",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",fontSize:"small",color:"gray"},children:["Seeing this page for too long? Try another mirror"," ",i.jsx("a",{href:"https://railmapgen.github.io/?app=rmp",target:"_blank",rel:"noreferrer",children:"GitHub"})," ",i.jsx("a",{href:"https://railmapgen.gitlab.io/?app=rmp",target:"_blank",rel:"noreferrer",children:"Gitlab"})," ","or the"," ",i.jsx("a",{href:"https://github.com/railmapgen/railmapgen.github.io/releases",target:"_blank",rel:"noreferrer",children:"offline application"})," ",".",i.jsx("br",{}),i.jsx("br",{}),"Offline applications also available via ghfast.top"," ",i.jsx("a",{href:`https://ghfast.top/https://github.com/railmapgen/railmapgen.github.io/releases/download/tauri-${s}/railmapgen_${l}_x64-setup.exe`,children:"Windows"})," ",i.jsx("a",{href:`https://ghfast.top/https://github.com/railmapgen/railmapgen.github.io/releases/download/tauri-${s}/railmapgen_${l}_aarch64.dmg`,children:"MacOS"})," ",i.jsx("a",{href:`https://ghfast.top/https://github.com/railmapgen/railmapgen.github.io/releases/download/tauri-${s}/railmapgen_${l}_amd64.deb`,children:"Linux"})," ","if you are blocked by GFW :)"]})]}),children:[i.jsx($p,{}),r&&i.jsxs(ue,{status:"info",variant:"solid",size:"xs",pl:3,pr:1,py:1,zIndex:"1",children:[i.jsx(pe,{}),i.jsxs(se,{children:[i.jsx(ce,{href:"/?app=rmp",isExternal:!0,fontWeight:"bold",children:n("rmtPromotion")})," ",i.jsx(ce,{as:"button",ml:"auto",textDecoration:"underline",onClick:()=>o(!1),children:n("close")})," | ",i.jsx(ce,{as:"button",textDecoration:"underline",onClick:()=>{o(!1),window.localStorage.setItem(id.DO_NOT_SHOW_RMT_MSG,"true")},children:n("noShowAgain")})]})]}),i.jsx(bl,{allowReset:!0,children:i.jsxs(y,{direction:"row",height:"100%",overflow:"hidden",sx:{position:"relative"},children:[i.jsx(zp,{}),i.jsx(Bp,{}),i.jsx(Dp,{})]})}),i.jsx(Gp,{isOpen:!!t,onClose:()=>e(ou()),defaultTheme:t,onSelect:t=>e(iu(t))})]})})})}const Wp=JSON.parse(null!==(Ke=localStorage.getItem(id.LOGIN_STATE))&&void 0!==Ke?Ke:"{}"),Up=JSON.parse(null!==(Ye=localStorage.getItem(id.APP))&&void 0!==Ye?Ye:"{}"),Vp=localStorage.getItem(id.PARAM);"telemetry"in Up&&("app"in Up.telemetry&&Mp.dispatch(Rc(Up.telemetry.app)),"project"in Up.telemetry&&Mp.dispatch(_c(Up.telemetry.project))),"preference"in Up&&("unlockSimplePathAttempts"in Up.preference&&Mp.dispatch(Tc(Up.preference.unlockSimplePathAttempts)),"toolsPanel"in Up.preference&&"expand"in Up.preference.toolsPanel&&Mp.dispatch(Cc(Up.preference.toolsPanel.expand)),"autoParallel"in Up.preference&&Mp.dispatch(jc(Up.preference.autoParallel)),"randomStationsNames"in Up.preference&&Mp.dispatch(Lc(Up.preference.randomStationsNames))),"state"in Wp&&Mp.dispatch(cd(Wp.state)),"activeSubscriptions"in Wp&&Mp.dispatch(ud(Wp.activeSubscriptions)),Lp(Vp).then((e=>{const{version:t,graph:n,...r}=JSON.parse(e);window.graph=Ao.from(n);const o={...r,present:n,past:[],future:[]};Mp.dispatch(Ic(o)),Mp.dispatch(Fc()),Mp.dispatch(Wc()),Mo(document.getElementById("root")).render(i.jsx(Pe.StrictMode,{children:i.jsx(Je,{store:Mp,children:i.jsx(qe,{i18n:Dd,children:i.jsx(Fp,{})})})})),qn.injectUITools(),_d(Mp),Rd(),window.setInterval((()=>Rd()),9e5)}))}}})); diff --git a/assets/index-legacy-CP4zwhgZ.js b/assets/index-legacy-CP4zwhgZ.js new file mode 100644 index 00000000..4e7a6fc1 --- /dev/null +++ b/assets/index-legacy-CP4zwhgZ.js @@ -0,0 +1 @@ +!function(){const e=["onBlur","onChange","onFocus","onKeyDown","variant"],n=["_fixed","_focus","children","disabled","label","value","fixed","getValue","onClick","onMouseOver","sx"],o=["children","dangerouslySetInnerHTML"],i=["children","showDivider"],r=["loadingIcon"],a=["children","isInvalid","hidePlaceholder"],s=["ref"],l=["children","loadingState"],d=["label","onRemove","disabled"],c=["present","past","future"],u=["version","graph"];function h(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==t.indexOf(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o{m=e.u,y=e.a,b=e.j,v=e.P,w=e.c,x=e.F,S=e.f,N=e.W,k=e.T,C=e.b,R=e.d,L=e.e,T=e.g,j=e.h,A=e.B,O=e.D,_=e.i,M=e.k,E=e.l,P=e.m,I=e.C,$=e.S,z=e.n,D=e.o,B=e.p,G=e.I,F=e.q,U=e.r,V=e.s,W=e.t,J=e.v,H=e.w,K=e.x,q=e.y,Q=e.z,Z=e.A,Y=e.E,X=e.G,ee=e.M,te=e.H,ne=e.J,oe=e.K,ie=e.L,re=e.N,ae=e.O,se=e.Q,le=e.R,de=e.U,ce=e.V,ue=e.X,he=e.Y,pe=e.Z,ge=e._,fe=e.$,me=e.a0,ye=e.a1,be=e.a2,ve=e.a3,we=e.a4,xe=e.a5,Se=e.a6,Ne=e.a7,ke=e.a8,Ce=e.a9,Re=e.aa,Le=e.ab,Te=e.ac,je=e.ad,Ae=e.ae,Oe=e.af},e=>{_e=e.e,Me=e.a,Ee=e.b,Pe=e.f,Ie=e.u,$e=e.i,ze=e.h,De=e.o,Be=e.j,Ge=e.k,Fe=e.l,Ue=e.m,Ve=e.n,We=e.p,Je=e.P,He=e.I}],execute:function(){var Ke,qe,Qe=document.createElement("style");Qe.textContent=":root{background-color:#fff}@media (prefers-color-scheme: dark){:root{background-color:#1a202c;color:#fff}}html{height:100%}body{margin:0;overflow:hidden;height:100%;width:100%;width:-webkit-fill-available;padding:env(safe-area-inset-top,20px) env(safe-area-inset-right,20px) env(safe-area-inset-bottom,20px) env(safe-area-inset-left,20px)}div#root{height:100%;width:100%}*{box-sizing:border-box}.tools::-webkit-scrollbar{display:none}.tools{-ms-overflow-style:none;scrollbar-width:none}.rmp-name-outline{paint-order:stroke;stroke:#fff;stroke-linejoin:round}\n/*$vite$:1*/",document.head.appendChild(Qe),p({D:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 20h14v-2H5v2zm0-10h4v6h6v-6h4l-7-7-7 7z"},child:[]}]})(e)},F:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 14h-3v3h-2v-3H8v-2h3v-3h2v3h3v2zm-3-7V3.5L18.5 9H13z"},child:[]}]})(e)},G:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"},child:[]}]})(e)},H:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3 1 9l11 6 9-4.91V17h2V9L12 3z"},child:[]}]})(e)},O:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)},Q:function(e){var t=e.data,n=e.displayHandler,o=e.filter,i=e.value,r=e.onChange,a=e.InputProps,s=e.InputPropsByState,l=e.ListProps,d=e.ItemProps,c=Sr(e,["data","displayHandler","filter","value","onChange","InputProps","InputPropsByState","ListProps","ItemProps"]);return b.jsx(ar,xr({value:i,filter:function(e,n){if(!o)return!0;var i=t.find((function(e){return e.id===n}));return!!i&&o(e,i)},onChange:function(e,t){var n;Array.isArray(t)?null==r||r(null===(n=t[0])||void 0===n?void 0:n.originalValue):null==r||r(t.originalValue)},suggestWhenEmpty:!0,openOnFocus:!0},c,{children:function(e){var o,r=e.isOpen;return b.jsxs(b.Fragment,{children:[b.jsx(Nr,xr({variant:"flushed",size:"sm",h:6,autoComplete:"off",value:i},null!==(o=null==s?void 0:s(r))&&void 0!==o?o:a)),b.jsx(br,xr({role:"menu",py:1},l,{children:t.map((function(e){return b.jsx(sr,xr({value:e,label:e.value,role:"menuitem",fontSize:"sm",p:1,mx:1},d,{children:n?n(e):e.value}),e.id)}))}))]})}}))},V:Zl,Z:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(e)},a:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"},child:[]}]})(e)},a$:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"},child:[]}]})(e)},a4:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M13 7h9v2h-9zM13 15h9v2h-9zM16 11h6v2h-6zM13 12 8 7v4H2v2h6v4z"},child:[]}]})(e)},a5:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"},child:[]}]})(e)},a6:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"},child:[]}]})(e)},a7:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)},a8:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"},child:[]}]})(e)},aE:function(e){var t=e.selections,n=e.defaultValue,o=e.onChange,i=e.multiSelect,r=kr(Me.useState(n),2),a=r[0],s=r[1];Me.useEffect((function(){n.toString()&&s(n)}),[n.toString()]);return b.jsx(V,{size:"xs",isAttached:!0,colorScheme:"primary",variant:"outline",children:t.map((function(e,n){var r="object"==typeof a&&a.includes(e.value)||a===e.value,l=n===t.length-1||r?void 0:"-px";return b.jsx(W,{role:"checkbox","aria-checked":r,variant:r?"solid":"outline",mr:l,flex:1,isDisabled:e.disabled,onClick:function(){return function(e){if(i){var t=a,n=t.includes(e)?t.filter((function(t){return t!==e})):Cr(Cr([],kr(t),!1),[e],!1);s(n),null==o||o(n)}else s(e),null==o||o(e)}(e.value)},children:e.label},e.value.toString())}))})},aF:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 13h2v-2H3v2zm4 8h2v-2H7v2zm6-18h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zm8 4h2v-2h-2v2zm8-8h2v-2h-2v2zm0-4h2V7h-2v2zm-4-4h2V3h-2v2zM7.83 5 7 4.17V3h2v2H7.83zm12 12-.83-.83V15h2v2h-1.17zm1.36 4.19L2.81 2.81 1.39 4.22 4.17 7H3v2h2V7.83l2 2V17h7.17l2 2H15v2h2v-1.17l2.78 2.78 1.41-1.42zM9 15v-3.17L12.17 15H9zm6-2.83V9h-3.17l-2-2H17v7.17l-2-2z"},child:[]}]})(e)},aG:na,aN:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(e)},aO:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)},aP:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"},child:[]}]})(e)},aZ:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"},child:[]}]})(e)},a_:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},child:[]}]})(e)},ac:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]},{tag:"path",attr:{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"},child:[]}]})(e)},ad:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"},child:[]}]})(e)},ag:function(e){var t=e.environment,n=e.version,o=e.popoverHeader,i=e.popoverBody,r=Pr(Me.useState(!1),2),a=r[0],s=r[1];return b.jsxs(L,{isOpen:a,onOpen:function(){return o&&s(!0)},onClose:function(){return s(!1)},children:[b.jsx(H,{children:b.jsx(K,{ml:1,colorScheme:Ir(t),title:"".concat(t,": ").concat(n),cursor:o?"pointer":"help",children:t===tt.PRD?n:t})}),b.jsxs(P,{children:[b.jsx(q,{}),b.jsx(Q,{}),b.jsx(Z,{children:o}),b.jsx(Y,{children:i})]})]})},ah:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"},child:[]}]})(e)},ai:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 0 1 7.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"},child:[]}]})(e)},aj:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12.87 15.07-2.54-2.51.03-.03A17.52 17.52 0 0 0 14.07 6H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7 1.62-4.33L19.12 17h-3.24z"},child:[]}]})(e)},ak:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.488.488 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"},child:[]}]})(e)},al:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},child:[]}]})(e)},b:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"},child:[]}]})(e)},b0:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 13H5v-2h14v2z"},child:[]}]})(e)},b2:la,f:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"},child:[]}]})(e)},g:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 12.4V7l-4-4H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7.4l8.6-8.6zM15 15c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zM6 6h9v4H6V6zm13.99 10.25 1.77 1.77L16.77 23H15v-1.77l4.99-4.98zm3.26.26-.85.85-1.77-1.77.85-.85c.2-.2.51-.2.71 0l1.06 1.06c.2.2.2.52 0 .71z"},child:[]}]})(e)},h:function(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"},child:[]}]})(e)},i:ca});var Ze=function(e,t,n,o){return new(n||(n=Promise))((function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((o=o.apply(e,t||[])).next())}))};const Ye=e=>new Promise((t=>{setTimeout(t,e,`Timeout after ${e/1e3} seconds`)})),Xe=e=>{let t=0;for(let n=0;n{const t=(16777215&e).toString(16).toUpperCase();return"#"+"00000".substring(0,6-t.length)+t};var tt;p("ae",tt),function(e){e.DEV="DEV",e.UAT="UAT",e.PRD="PRD"}(tt||p("ae",tt={}));const nt="rmg-runtime__language",ot="rmg-runtime__colourMode",it="rmg-runtime__allowAnalytics",rt="rmg-unknown";let at=rt,st=et(Xe(rt));const lt=()=>`[${at}]`,dt=()=>st,ct=(e,t,n)=>(...o)=>{"string"==typeof o[0]?e(`%c${t()}%c ${o[0]}`,`color: ${n()}`,"",...o.slice(1)):e(`%c${t()}%c`,`color: ${n()}`,"",...o)},ut={debug:ct(console.debug,lt,dt),info:ct(console.info,lt,dt),warn:ct(console.warn,lt,dt),error:ct(console.error,lt,dt)},ht=()=>at===rt?"[runtime]":`[runtime@${at}]`,pt=et(Xe("runtime")),gt=()=>pt,ft={setup:e=>{at=e,st=et(Xe(e))},logger:ut,debug:ct(console.debug,ht,gt),info:ct(console.info,ht,gt),warn:ct(console.warn,ht,gt),error:ct(console.error,ht,gt),group:ct(console.group,ht,gt),groupEnd:console.groupEnd};var mt=function(e,t,n,o){return new(n||(n=Promise))((function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((o=o.apply(e,t||[])).next())}))};let yt,bt,vt,wt,xt;const St=()=>{yt=!1,bt=rt,vt="unknown",wt=tt.PRD,xt="unknown"},Nt=()=>"railmapgen.github.io"===bt;St();const kt={loadWithTimeout:()=>mt(void 0,void 0,void 0,(function*(){try{ft.group("Loading config...");const e=yield Promise.race([mt(void 0,void 0,void 0,(function*(){const e=window.location.pathname.split("/")[1],t=e?`/${e}/info.json`:"/info.json",n=yield fetch(t);if(!n.ok)throw new Error(`Failed to fetch config from ${t}`);{const e=yield n.json();ft.info("Received info.json",e),bt=e.component,vt=e.version,wt=e.environment,xt=e.instance}})),Ye(1e4)]);e?ft.error("❌ Failed to load config.",e):(yt=!0,ft.info("✅ Config loaded!"))}catch(e){ft.error("❌ Failed to load config.",e)}finally{ft.groupEnd()}})),isInitialised:()=>yt,getComponent:()=>Nt()?"rmg-home":bt,getVersion:()=>vt,getEnvironment:()=>wt,getInstance:()=>xt,isRMT:Nt,_resetConfig:St};window.dataLayer=window.dataLayer||[];function Ct(...e){if(kt.getEnvironment()!==tt.DEV)return window.dataLayer.push(arguments);ft.info("Not going to send event in DEV environment",e)}const Rt={init:()=>{(()=>{const e=document.createElement("script");e.async=!0,e.src="https://www.googletagmanager.com/gtag/js?id=G-2HP8Y4MRRQ",document.head.append(e)})(),Ct("js",new Date),Ct("config","G-2HP8Y4MRRQ",{appName:kt.getComponent(),version:kt.getVersion(),environment:kt.getEnvironment(),instance:kt.getInstance()})},customEvent:(e,t={})=>{Ct("event",e,t)}},Lt={};let Tt;try{Tt=new BroadcastChannel("rmg-runtime-channel"),Tt.onmessage=e=>{var t;const{event:n,data:o,frameId:i}=e.data;null===(t=Lt[n])||void 0===t||t.forEach((e=>e(o,i)))}}catch(Sc){ft.warn("Failed to initiate broadcast channel. Some features may be unavailable.",Sc)}const jt={postEvent:(e,t)=>{var n;ft.debug(`Broadcasting event ${e} with data`,t),null==Tt||Tt.postMessage({event:e,data:t,frameId:null===(n=window.frameElement)||void 0===n?void 0:n.id})},onMessage:(e,t)=>{var n;e in Lt?null===(n=Lt[e])||void 0===n||n.push(t):Lt[e]=[t]}},At="TOGGLE_NAV_MENU",Ot="OPEN_APP",_t="CLOSE_APP",Mt="UPDATE_APP_METADATA",Et="UPDATE_URL",Pt=()=>!window.frameElement,It={isStandaloneWindow:Pt,injectUITools:()=>{if(!Pt()){const e=document.createElement("style");e.textContent="body{padding: 0;}",document.head.appendChild(e)}const e=document.createElement("style");var t;e.textContent=".rmg-window__header:not(.rmg-window__app-clip-header){margin-left: 40px;}",Pt()||(null===(t=window.frameElement)||void 0===t?void 0:t.closest(".show-menu"))||document.head.appendChild(e),Pt()||jt.onMessage(At,(t=>{if(t)try{document.head.removeChild(e)}catch(Sc){ft.warn("Unable to remove indent style from RmgWindowHeader",Sc)}else document.head.appendChild(e)}))},openApp:e=>{jt.postEvent(Ot,e)},onAppOpen:e=>{jt.onMessage(Ot,e)},closeApp:e=>{jt.postEvent(_t,e)},onAppClose:e=>{jt.onMessage(_t,e)},updateAppMetadata:e=>{jt.postEvent(Mt,e)},onAppMetadataUpdate:e=>{jt.onMessage(Mt,e)},updateUrl:e=>{jt.postEvent(Et,e)},onUrlUpdate:e=>{jt.onMessage(Et,e)},toggleNavMenu:e=>{jt.postEvent(At,e)}},$t="SET_LANGUAGE",zt="SET_COLOUR_MODE",Dt=["light","dark","system"],Bt=()=>"true"===window.localStorage.getItem(it),Gt={setLanguage:e=>{jt.postEvent($t,e),window.localStorage.setItem(nt,e)},getLanguage:()=>window.localStorage.getItem(nt)||"en",onLanguageChange:e=>{jt.onMessage($t,e)},setColourMode:e=>{Dt.includes(e)&&(jt.postEvent(zt,e),window.localStorage.setItem(ot,e))},getColourMode:()=>{const e=window.localStorage.getItem(ot);return t=e,Boolean(t&&Dt.includes(t))?e:"system";var t},onColourModeChange:e=>{jt.onMessage(zt,e)},isAnalyticsQADone:()=>null!==window.localStorage.getItem(it),isAllowAnalytics:Bt,allowAnalytics:e=>{const t=Bt();return e?(t||(window.localStorage.setItem(it,e.toString()),Rt.init()),{refreshRequired:!1}):t?(window.localStorage.setItem(it,e.toString()),{refreshRequired:!0}):{refreshRequired:!1}}},Ft=(new Date).getTime();const Ut={getMsSinceStartUp:function(){const e=kt.getComponent(),t=window.localStorage.getItem(e+"__startTime");return null===t?(new Date).getTime()-Ft:(new Date).getTime()-Number(t)}},Vt={},Wt=()=>{const e=kt.getComponent();if(e===rt)throw new Error("Unable to clear storage for unknown app");return e};window.addEventListener("storage",(e=>{var t;const{key:n,newValue:o}=e;n&&(null===(t=Vt[n])||void 0===t||t.forEach((e=>e(o))))}));const Jt={on:(e,t)=>{var n;const o=`${Wt()}__${e}`;o in Vt?null===(n=Vt[o])||void 0===n||n.push(t):Vt[o]=[t]},get:e=>{const t=Wt();return window.localStorage.getItem(`${t}__${e}`)},getAll:()=>{const e=Wt(),t={};let n=0;for(;n{const n=Wt();window.localStorage.setItem(`${n}__${e}`,t)},remove:e=>{const t=Wt();window.localStorage.removeItem(`${t}__${e}`)},clear:()=>{const e=Wt();let t=0;for(;t"string"==typeof e,Kt=()=>{let e,t;const n=new Promise(((n,o)=>{e=n,t=o}));return n.resolve=e,n.reject=t,n},qt=e=>null==e?"":""+e,Qt=/###/g,Zt=e=>e&&e.indexOf("###")>-1?e.replace(Qt,"."):e,Yt=e=>!e||Ht(e),Xt=(e,t,n)=>{const o=Ht(t)?t.split("."):t;let i=0;for(;i{const{obj:o,k:i}=Xt(e,t,Object);if(void 0!==o||1===t.length)return void(o[i]=n);let r=t[t.length-1],a=t.slice(0,t.length-1),s=Xt(e,a,Object);for(;void 0===s.obj&&a.length;)r=`${a[a.length-1]}.${r}`,a=a.slice(0,a.length-1),s=Xt(e,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${r}`]&&(s.obj=void 0);s.obj[`${s.k}.${r}`]=n},tn=(e,t)=>{const{obj:n,k:o}=Xt(e,t);if(n)return n[o]},nn=(e,t,n)=>{for(const o in t)"__proto__"!==o&&"constructor"!==o&&(o in e?Ht(e[o])||e[o]instanceof String||Ht(t[o])||t[o]instanceof String?n&&(e[o]=t[o]):nn(e[o],t[o],n):e[o]=t[o]);return e},on=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var rn={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const an=e=>Ht(e)?e.replace(/[&<>"'\/]/g,(e=>rn[e])):e;const sn=[" ",",","?","!",";"],ln=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),dn=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const o=t.split(n);let i=e;for(let r=0;r-1&&ae&&e.replace("_","-"),un={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class hn{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||un,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o{let[t,o]=e;for(let i=0;i{let[o,i]=t;for(let r=0;r1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,r=void 0!==o.ignoreJSONStructure?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):Ht(n)&&i?a.push(...n.split(i)):a.push(n)));const s=tn(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&r&&Ht(n)?dn(this.data&&this.data[e]&&this.data[e][t],n,i):s}addResource(e,t,n,o){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const r=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(r?n.split(r):n)),e.indexOf(".")>-1&&(a=e.split("."),o=t,t=a[1]),this.addNamespaces(t),en(this.data,a,o),i.silent||this.emit("added",e,t,n,o)}addResources(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const i in n)(Ht(n[i])||Array.isArray(n[i]))&&this.addResource(e,t,i,n[i],{silent:!0});o.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,o,i){let r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),o=n,n=t,t=a[1]),this.addNamespaces(t);let s=tn(this.data,a)||{};r.skipCopy||(n=JSON.parse(JSON.stringify(n))),o?nn(s,n,i):s=g(g({},s),n),en(this.data,a,s),r.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?g(g({},{}),this.getResource(e,t)):this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var mn={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,o,i){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,n,o,i))})),t}};const yn={};class bn extends gn{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,n)=>{e.forEach((e=>{t[e]&&(n[e]=t[e])}))})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=pn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const r=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const o=sn.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===o.length)return!0;const i=ln.getRegExp(`(${o.map((e=>"?"===e?"\\?":e)).join("|")})`);let r=!i.test(e);if(!r){const t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(r=!0)}return r})(e,n,o));if(r&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Ht(i)?[i]:i};const r=e.split(n);(n!==o||n===o&&this.options.ns.indexOf(r[0])>-1)&&(i=r.shift()),e=r.join(o)}return{key:e,namespaces:Ht(i)?[i]:i}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t=g({},t)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const o=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:r,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],l=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(d){const e=t.nsSeparator||this.options.nsSeparator;return o?{res:`${s}${e}${r}`,usedKey:r,exactUsedKey:r,usedLng:l,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${r}`}return o?{res:r,usedKey:r,exactUsedKey:r,usedLng:l,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:r}const c=this.resolve(e,t);let u=c&&c.res;const h=c&&c.usedKey||r,p=c&&c.exactUsedKey||r,f=Object.prototype.toString.apply(u),m=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=!Ht(u)&&"boolean"!=typeof u&&"number"!=typeof u;if(!(y&&u&&b&&["[object Number]","[object Function]","[object RegExp]"].indexOf(f)<0)||Ht(m)&&Array.isArray(u))if(y&&Ht(m)&&Array.isArray(u))u=u.join(m),u&&(u=this.extendTranslation(u,e,t,n));else{let o=!1,a=!1;const d=void 0!==t.count&&!Ht(t.count),h=bn.hasDefaultValue(t),p=d?this.pluralResolver.getSuffix(l,t.count,t):"",f=t.ordinal&&d?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",m=d&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),y=m&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${p}`]||t[`defaultValue${f}`]||t.defaultValue;!this.isValidLookup(u)&&h&&(o=!0,u=y),this.isValidLookup(u)||(a=!0,u=r);const b=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:u,v=h&&y!==u&&this.options.updateMissing;if(a||o||v){if(this.logger.log(v?"updateKey":"missingKey",l,s,r,v?y:u),i){const e=this.resolve(r,g(g({},t),{},{keySeparator:!1}));e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t{const i=h&&o!==u?o:b;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,i,v,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,i,v,t),this.emit("missingKey",e,s,n,u)};this.options.saveMissing&&(this.options.saveMissingPlurals&&d?e.forEach((e=>{const n=this.pluralResolver.getSuffixes(e,t);m&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach((n=>{o([e],r+n,t[`defaultValue${n}`]||y)}))})):o(e,r,y))}u=this.extendTranslation(u,e,t,c,n),a&&u===r&&this.options.appendNamespaceToMissingKey&&(u=`${s}:${r}`),(a||o)&&this.options.parseMissingKeyHandler&&(u="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${r}`:r,o?u:void 0):this.options.parseMissingKeyHandler(u))}else{if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,u,g(g({},t),{},{ns:a})):`key '${r} (${this.language})' returned an object instead of string.`;return o?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(i){const e=Array.isArray(u),n=e?[]:{},o=e?p:h;for(const r in u)if(Object.prototype.hasOwnProperty.call(u,r)){const e=`${o}${i}${r}`;n[r]=this.translate(e,g(g({},t),{joinArrays:!1,ns:a})),n[r]===e&&(n[r]=u[r])}u=n}}return o?(c.res=u,c.usedParams=this.getUsedParamsDetails(t),c):u}extendTranslation(e,t,n,o,i){var r=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,g(g({},this.options.interpolation.defaultVariables),n),n.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(g(g({},n),{interpolation:g(g({},this.options.interpolation),n.interpolation)}));const a=Ht(e)&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let l=n.replace&&!Ht(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=g(g({},this.options.interpolation.defaultVariables),l)),e=this.interpolator.interpolate(e,l,n.lng||this.language||o.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&o&&o.res&&(n.lng=this.language||o.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,o=new Array(e),a=0;a1&&void 0!==arguments[1]?arguments[1]:{};return Ht(e)&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),l=s.key;n=l;let d=s.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const c=void 0!==a.count&&!Ht(a.count),u=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),h=void 0!==a.context&&(Ht(a.context)||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);d.forEach((e=>{this.isValidLookup(t)||(r=e,!yn[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(r)&&(yn[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((n=>{if(this.isValidLookup(t))return;i=n;const r=[l];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(r,l,n,e,a);else{let e;c&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(r.push(l+e),a.ordinal&&0===e.indexOf(o)&&r.push(l+e.replace(o,this.options.pluralSeparator)),u&&r.push(l+t)),h){const n=`${l}${this.options.contextSeparator}${a.context}`;r.push(n),c&&(r.push(n+e),a.ordinal&&0===e.indexOf(o)&&r.push(n+e.replace(o,this.options.pluralSeparator)),u&&r.push(n+t))}}let s;for(;s=r.pop();)this.isValidLookup(t)||(o=s,t=this.getResource(n,e,s,a))})))}))})),{res:t,usedKey:n,exactUsedKey:o,usedLng:i,usedNS:r}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,o):this.resourceStore.getResource(e,t,n,o)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Ht(e.replace);let o=n?e.replace:e;if(n&&void 0!==e.count&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o=g(g({},this.options.interpolation.defaultVariables),o)),!n){o=g({},o);for(const e of t)delete o[e]}return o}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}const vn=e=>e.charAt(0).toUpperCase()+e.slice(1);class wn{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=pn.create("languageUtils")}getScriptPartFromCode(e){if(!(e=cn(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=cn(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Ht(e)&&e.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let t=Intl.getCanonicalLocales(e)[0];if(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)return t}catch(Sc){}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map((e=>e.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=vn(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=vn(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=vn(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),Ht(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=e=>{e&&(this.isSupportedCode(e)?o.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Ht(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):Ht(e)&&i(this.formatLanguageCode(e)),n.forEach((e=>{o.indexOf(e)<0&&i(this.formatLanguageCode(e))})),o}}let xn=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Sn={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)};const Nn=["v1","v2","v3"],kn=["v4"],Cn={zero:0,one:1,two:2,few:3,many:4,other:5};class Rn{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=pn.create("pluralResolver"),this.options.compatibilityJSON&&!kn.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const e={};return xn.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:Sn[t.fc]}}))})),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi()){const o=cn("dev"===e?"en":e),i=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:o,type:i});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let a;try{a=new Intl.PluralRules(o,{type:i})}catch(n){if(!e.match(/-|_/))return;const o=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(o,t)}return this.pluralRulesCache[r]=a,a}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((e,t)=>Cn[e]-Cn[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):n.numbers.map((n=>this.getSuffix(e,n,t))):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=this.getRule(e,n);return o?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o.select(t)}`:this.getSuffixRetroCompatible(o,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let o=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));const i=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?`_plural_${o.toString()}`:i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Nn.includes(this.options.compatibilityJSON)}}const Ln=function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=((e,t,n)=>{const o=tn(e,n);return void 0!==o?o:tn(t,n)})(e,t,n);return!r&&i&&Ht(n)&&(r=dn(e,n,o),void 0===r&&(r=dn(t,n,o))),r},Tn=e=>e.replace(/\$/g,"$$$$");class jn{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=pn.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:o,prefix:i,prefixEscaped:r,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:d,unescapePrefix:c,nestingPrefix:u,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:y}=e.interpolation;this.escape=void 0!==t?t:an,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==o&&o,this.prefix=i?on(i):r||"{{",this.suffix=a?on(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=d?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=u?on(u):h||on("$t("),this.nestingSuffix=p?on(p):g||on(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,o){let i,r,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const i=Ln(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,g(g(g({},o),t),{},{interpolationkey:e})):i}const i=e.split(this.formatSeparator),r=i.shift().trim(),a=i.join(this.formatSeparator).trim();return this.format(Ln(t,s,r,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,g(g(g({},o),t),{},{interpolationkey:r}))};this.resetRegExp();const d=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,c=o&&o.interpolation&&void 0!==o.interpolation.skipOnVariables?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Tn(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Tn(this.escape(e)):Tn(e)}].forEach((t=>{for(a=0;i=t.regex.exec(e);){const n=i[1].trim();if(r=l(n),void 0===r)if("function"==typeof d){const t=d(e,i,o);r=Ht(t)?t:""}else if(o&&Object.prototype.hasOwnProperty.call(o,n))r="";else{if(c){r=i[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),r=""}else Ht(r)||this.useRawValueToEscape||(r=qt(r));const s=t.safeValue(r);if(e=e.replace(i[0],s),c?(t.regex.lastIndex+=r.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,o,i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const o=e.split(new RegExp(`${n}[ ]*{`));let r=`{${o[1]}`;e=o[0],r=this.interpolate(r,i);const a=r.match(/'/g),s=r.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(r=r.replace(/'/g,'"'));try{i=JSON.parse(r),t&&(i=g(g({},t),i))}catch(Sc){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,Sc),`${e}${n}${r}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];i=g({},r),i=i.replace&&!Ht(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let l=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),s=e,l=!0}if(o=t(a.call(this,n[1].trim(),i),i),o&&n[0]===e&&!Ht(o))return o;Ht(o)||(o=qt(o)),o||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),o=""),l&&(o=s.reduce(((e,t)=>this.format(e,t,r.lng,g(g({},r),{},{interpolationkey:n[1].trim()}))),o.trim())),e=e.replace(n[0],o),this.regexp.lastIndex=0}return e}}const An=e=>{const t={};return(n,o,i)=>{let r=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(r=g(g({},r),{},{[i.interpolationkey]:void 0}));const a=o+JSON.stringify(r);let s=t[a];return s||(s=e(cn(o),i),t[a]=s),s(n)}};class On{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=pn.create("formatter"),this.options=e,this.formats={number:An(((e,t)=>{const n=new Intl.NumberFormat(e,g({},t));return e=>n.format(e)})),currency:An(((e,t)=>{const n=new Intl.NumberFormat(e,g(g({},t),{},{style:"currency"}));return e=>n.format(e)})),datetime:An(((e,t)=>{const n=new Intl.DateTimeFormat(e,g({},t));return e=>n.format(e)})),relativetime:An(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,g({},t));return e=>n.format(e,t.range||"day")})),list:An(((e,t)=>{const n=new Intl.ListFormat(e,g({},t));return e=>n.format(e)}))},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=An(t)}format(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find((e=>e.indexOf(")")>-1))){const e=i.findIndex((e=>e.indexOf(")")>-1));i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce(((e,t)=>{const{formatName:i,formatOptions:r}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const o=e.split("(");t=o[0].toLowerCase().trim();const i=o[1].substring(0,o[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach((e=>{if(e){const[t,...o]=e.split(":"),i=o.join(":").trim().replace(/^'+|'+$/g,""),r=t.trim();n[r]||(n[r]=i),"false"===i&&(n[r]=!1),"true"===i&&(n[r]=!0),isNaN(i)||(n[r]=parseInt(i,10))}}))}return{formatName:t,formatOptions:n}})(t);if(this.formats[i]){let t=e;try{const a=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},s=a.locale||a.lng||o.locale||o.lng||n;t=this.formats[i](e,s,g(g(g({},r),o),a))}catch(a){this.logger.warn(a)}return t}return this.logger.warn(`there was no format function for ${i}`),e}),e)}}class _n extends gn{constructor(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=o,this.logger=pn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,o.backend,o)}queueLoad(e,t,n,o){const i={},r={},a={},s={};return e.forEach((e=>{let o=!0;t.forEach((t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===r[a]&&(r[a]=!0):(this.state[a]=1,o=!1,void 0===r[a]&&(r[a]=!0),void 0===i[a]&&(i[a]=!0),void 0===s[t]&&(s[t]=!0)))})),o||(a[e]=!0)})),(Object.keys(i).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(r),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const o=e.split("|"),i=o[0],r=o[1];t&&this.emit("failedLoading",i,r,t),!t&&n&&this.store.addResourceBundle(i,r,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach((n=>{((e,t,n,o)=>{const{obj:i,k:r}=Xt(e,t,Object);i[r]=i[r]||[],i[r].push(n)})(n.loaded,[i],r),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,r=arguments.length>5?arguments[5]:void 0;if(!e.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:o,wait:i,callback:r});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&o{this.read.call(this,e,t,n,o+1,2*i,r)}),i):r(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(l){a(l)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();Ht(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Ht(t)&&(t=[t]);const i=this.queueLoad(e,t,n,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),o=n[0],i=n[1];this.read(o,i,"read",void 0,void 0,((n,r)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${o} failed`,n),!n&&r&&this.logger.log(`${t}loaded namespace ${i} for language ${o}`,r),this.loaded(e,n,r)}))}saveMissing(e,t,n,o,i){let r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const l=g(g({},r),{},{isUpdate:i}),d=this.backend.create.bind(this.backend);if(d.length<6)try{let i;i=5===d.length?d(e,t,n,o,l):d(e,t,n,o),i&&"function"==typeof i.then?i.then((e=>a(null,e))).catch(a):a(null,i)}catch(s){a(s)}else d(e,t,n,o,a,l)}e&&e[0]&&this.store.addResource(e[0],t,n,o)}}}const Mn=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),Ht(e[1])&&(t.defaultValue=e[1]),Ht(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),En=e=>(Ht(e.ns)&&(e.ns=[e.ns]),Ht(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ht(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Pn=()=>{};class In extends gn{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=En(e),this.services={},this.logger=pn,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&(Ht(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const o=Mn();this.options=g(g(g({},o),this.options),En(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=g(g({},o.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?pn.init(i(this.modules.logger),this.options):pn.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=On);const n=new wn(this.options);this.store=new fn(this.options.resources,this.options);const r=this.services;r.logger=pn,r.resourceStore=this.store,r.languageUtils=n,r.pluralResolver=new Rn(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==o.interpolation.format||(r.formatter=i(t),r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new jn(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new _n(i(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=Pn),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const r=Kt(),a=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),r.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),r}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pn;const n=Ht(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],o=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)o(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>o(e)))}this.options.preload&&this.options.preload.forEach((e=>o(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const o=Kt();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Pn),this.services.backendConnector.reload(e,t,(e=>{o.resolve(),n(e)})),o}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&mn.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const o=Kt();this.emit("languageChanging",e);const i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},r=(e,r)=>{r?(i(r),this.translator.changeLanguage(r),this.isLanguageChangingTo=void 0,this.emit("languageChanged",r),this.logger.log("languageChanged",r)):this.isLanguageChangingTo=void 0,o.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n=Ht(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||i(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(e=>{r(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),o}getFixedT(e,t,n){var o=this;const i=function(e,t){let r;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l`${r.keyPrefix}${d}${e}`)):r.keyPrefix?`${r.keyPrefix}${d}${e}`:e,o.t(c,r)};return Ht(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const r=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,r);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!r(n,e)||o&&!r(i,e)))}loadNamespaces(e,t){const n=Kt();return this.options.ns?(Ht(e)&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Kt();Ht(e)&&(e=[e]);const o=this.options.preload||[],i=e.filter((e=>o.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return i.length?(this.options.preload=o.concat(i),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new wn(Mn());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new In(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pn;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const o=g(g(g({},this.options),e),{isClone:!0}),i=new In(o);void 0===e.debug&&void 0===e.prefix||(i.logger=i.logger.clone(e));return["store","services","language"].forEach((e=>{i[e]=this[e]})),i.services=g({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n&&(i.store=new fn(this.store.data,o),i.services.resourceStore=i.store),i.translator=new bn(i.services,o),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;oe.source.startsWith("local"),Un=(e,t)=>{var n;return`@font-face {\n font-family: '${e}';\n src: ${t.source};\n ${Object.entries(null!==(n=t.descriptors)&&void 0!==n?n:{}).map((([e,t])=>`${e}: ${t};`)).join("\n")}\n}`};let Vn=(e=>{let t,n=!1;return o=>Ze(void 0,void 0,void 0,(function*(){return!t||!n&&o?(t=e(),n=!0,t.then((e=>(n=!1,e))).catch((e=>{throw t=null,e}))):t}))})((()=>fetch("/fonts/config.json").then((e=>e.json()))));const Wn=(e,t,n)=>Dn(void 0,void 0,void 0,(function*(){try{const o=new FontFace(e,t.source,t.descriptors);return Fn(t)?yield o.load():o.loaded.then(n),document.fonts.add(o),Bn[e]={configs:[Object.assign(Object.assign({},t),{font:o})]},!0}catch(Sc){return ft.warn(`Failed to load font ${e} with source ${t.source}`,Sc),!1}})),Jn=(e,t,n)=>Dn(void 0,void 0,void 0,(function*(){if(t.some(Fn))return ft.error(`Unable to load multiple FontFace for the same family ${e}`),!1;const o=[];return t.forEach((t=>{const i=new FontFace(e,t.source,t.descriptors);i.loaded.then(n),document.fonts.add(i),o.push(Object.assign(Object.assign({},t),{font:i}))})),Bn[e]={configs:o},!0})),Hn={getAllFonts:Vn,getLoadedFonts:()=>Bn,loadFont:(e,t)=>Dn(void 0,void 0,void 0,(function*(){if(e in Bn)return Bn[e];let n;if(t)n=t;else try{n=(yield Vn())[e]}catch(Sc){const n=Sc instanceof Error?" due to "+Sc.message:"";throw new Error("Unable to load font definition of "+e+n)}const o=()=>{((e,t)=>{jt.postEvent(Gn,{family:e,definition:t})})(e,n)};for(const t of n.configs){if(Array.isArray(t)?yield Jn(e,t,o):yield Wn(e,t,o))break}const i=Bn[e];return i?(i.displayName=n.displayName,i.url=n.url,Bn[e]):void 0})),getFontCSS:e=>Dn(void 0,void 0,void 0,(function*(){const t=Bn[e];if(!t)throw new Error(`Font family ${e} is not loaded`);const n=yield Promise.all(t.configs.filter((t=>{const n="loaded"===t.font.status;return n||ft.warn(`Font family ${e} is not loaded completely. Some FontFaceRules may be missing`),n})).map((t=>Dn(void 0,void 0,void 0,(function*(){if(Fn(t))return Un(e,t);const n=(e=>{var t;const n=null===(t=e.source.match(/url\(['"](\S+)['"]\)/))||void 0===t?void 0:t[1];if(!n)throw new Error("Invalid URL in source "+e.source);return new URL(n,window.location.href)})(t),o=yield fetch(n),i=yield(r=yield o.blob(),new Promise((e=>{const t=new FileReader;t.onloadend=()=>e(t.result),t.readAsDataURL(r)})));var r;return Un(e,Object.assign(Object.assign({},t),{source:`url('${i}')`}))})))));return n.join("\n\n")})),onRemoteFontLoaded:e=>{jt.onMessage(Gn,e)}},Kn=()=>{if("PRD"!==kt.getEnvironment()||!kt.isRMT())if(document.querySelector('meta[name="robots"]'))ft.info("Noindex meta tag already presents.");else{ft.info("Injecting noindex meta tag as this app is not PRD RMT.");const e=document.createElement("meta");e.name="robots",e.content="noindex",document.head.appendChild(e)}};var qn=function(e,t,n,o){return new(n||(n=Promise))((function(i,r){function a(e){try{l(o.next(e))}catch(Sc){r(Sc)}}function s(e){try{l(o.throw(e))}catch(Sc){r(Sc)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((o=o.apply(e,t||[])).next())}))};let Qn=!1;const Zn=p("r",{ready:()=>qn(void 0,void 0,void 0,(function*(){let e=0;for(;e<=10&&!Qn;)yield Ye(1e3),e+=1})),getAppName:kt.getComponent,getAppVersion:kt.getVersion,getEnv:kt.getEnvironment,getInstance:kt.getInstance,event:Rt.customEvent,isStandaloneWindow:It.isStandaloneWindow,injectUITools:It.injectUITools,openApp:It.openApp,onAppOpen:It.onAppOpen,closeApp:It.closeApp,onAppClose:It.onAppClose,updateAppMetadata:It.updateAppMetadata,onAppMetadataUpdate:It.onAppMetadataUpdate,updateUrl:It.updateUrl,onUrlUpdate:It.onUrlUpdate,toggleNavMenu:It.toggleNavMenu,postEvent:jt.postEvent,onMessage:jt.onMessage,setLanguage:Gt.setLanguage,getLanguage:Gt.getLanguage,onLanguageChange:Gt.onLanguageChange,setColourMode:Gt.setColourMode,getColourMode:Gt.getColourMode,onColourModeChange:Gt.onColourModeChange,isAnalyticsQADone:Gt.isAnalyticsQADone,isAllowAnalytics:Gt.isAllowAnalytics,allowAnalytics:Gt.allowAnalytics,storage:{on:Jt.on,get:Jt.get,getAll:Jt.getAll,set:Jt.set,remove:Jt.remove,clear:Jt.clear},getMsSinceStartUp:Ut.getMsSinceStartUp,I18nBuilder:class{constructor(){this._appName="RMG",this._lng=void 0,this._defaultResources={},this._resources={}}use(e){return $n.use(e),this}withAppName(e){return this._appName=e,this}withLng(e){return this._lng=e,this}withDefaultResource(e){return Object.entries(e).forEach((([e,t])=>{this._defaultResources[e]=t})),this}withResource(e,t){return this._resources[e]=t,this}combineResource(){const e={};return Object.entries(this._defaultResources).forEach((([t,n])=>{e[t]={translation:n}})),Object.entries(this._resources).forEach((([t,n])=>{t in e?e[t].translation=Object.assign(Object.assign({},e[t].translation),n):e[t]={translation:n}})),e}build(){return zn=$n.createInstance({lng:this._lng,fallbackLng:{"zh-CN":["zh-Hans","zh-Hant","en"],"zh-HK":["zh-Hant","zh-Hans","en"],"zh-TW":["zh-Hant","zh-Hans","en"],default:["en"]},resources:this.combineResource()},((e,t)=>{var n;e?ft.error("unexpected error occurs while initialising i18n",e):(document.title=t(this._appName),document.documentElement.lang=null!==(n=this._lng)&&void 0!==n?n:"en")})),zn.on("languageChanged",(e=>{document.title=zn.t(this._appName),document.documentElement.lang=e})),(e=>{Gt.onLanguageChange((t=>e.changeLanguage(t)))})(zn),zn}},getI18nInstance:()=>zn,getAllFonts:Hn.getAllFonts,getLoadedFonts:Hn.getLoadedFonts,loadFont:Hn.loadFont,getFontCSS:Hn.getFontCSS,onRemoteFontLoaded:Hn.onRemoteFontLoaded});qn(void 0,void 0,void 0,(function*(){yield kt.loadWithTimeout(),ft.setup(kt.getComponent()),Kn(),Gt.isAnalyticsQADone()?Gt.isAllowAnalytics()&&(ft.info("User has previously allowed GA"),Rt.init()):It.isStandaloneWindow()&&!kt.isRMT()&&(ft.warn("App is opened in standalone window but analytics Q&A is not finished. GA will be init by default."),Rt.init()),Qn=!0})).then(),window.rmgRuntime=Zn;const Yn=p("N",ft.logger);var Xn,eo={exports:{}};var to=function(){if(Xn)return eo.exports;Xn=1;var e,t="object"==typeof Reflect?Reflect:null,n=t&&"function"==typeof t.apply?t.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};e=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}eo.exports=i,eo.exports.once=function(e,t){return new Promise((function(n,o){function i(n){e.removeListener(t,r),o(n)}function r(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}g(e,t,r,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,n)}(e,i,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var r=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function s(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function l(e,t,n,o){var i,r,l;if(a(n),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),r=e._events),l=r[t]),void 0===l)l=r[t]=n,++e._eventsCount;else if("function"==typeof l?l=r[t]=o?[n,l]:[l,n]:o?l.unshift(n):l.push(n),(i=s(e))>0&&l.length>i&&!l.warned){l.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=l.length,function(e){console&&console.warn&&console.warn(e)}(d)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(e,t,n){var o={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=d.bind(o);return i.listener=n,o.wrapFn=i,i}function u(e,t,n){var o=e._events;if(void 0===o)return[];var i=o[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=r[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var d=l.length,c=p(l,d);for(o=0;o=0;r--)if(n[r]===t||n[r].listener===t){s=n[r].listener,i=r;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;o--)this.removeListener(e,t[o]);return this},i.prototype.listeners=function(e){return u(this,e,!0)},i.prototype.rawListeners=function(e){return u(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},i.prototype.listenerCount=h,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},eo.exports}();let no=function(){const e=arguments[0];for(let t=1,n=arguments.length;t=e.length)return{done:!0};t=e[n][Symbol.iterator]()}if(o=t.next(),!o.done)break;t=null}return o}}}function uo(){return{[Symbol.iterator](){return this},next:()=>({done:!0})}}"function"==typeof Object.assign&&(no=Object.assign);class ho extends Error{constructor(e){super(),this.name="GraphError",this.message=e}}class po extends ho{constructor(e){super(e),this.name="InvalidArgumentsGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,po.prototype.constructor)}}class go extends ho{constructor(e){super(e),this.name="NotFoundGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,go.prototype.constructor)}}class fo extends ho{constructor(e){super(e),this.name="UsageGraphError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,fo.prototype.constructor)}}function mo(e,t){this.key=e,this.attributes=t,this.clear()}function yo(e,t){this.key=e,this.attributes=t,this.clear()}function bo(e,t){this.key=e,this.attributes=t,this.clear()}function vo(e,t,n,o,i){this.key=t,this.attributes=i,this.undirected=e,this.source=n,this.target=o}mo.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}},yo.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}},bo.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}},vo.prototype.attach=function(){let e="out",t="in";this.undirected&&(e=t="undirected");const n=this.source.key,o=this.target.key;this.source[e][o]=this,this.undirected&&n===o||(this.target[t][n]=this)},vo.prototype.attachMulti=function(){let e="out",t="in";const n=this.source.key,o=this.target.key;this.undirected&&(e=t="undirected");const i=this.source[e],r=i[o];if(void 0===r)return i[o]=this,void(this.undirected&&n===o||(this.target[t][n]=this));r.previous=this,this.next=r,i[o]=this,this.target[t][n]=this},vo.prototype.detach=function(){const e=this.source.key,t=this.target.key;let n="out",o="in";this.undirected&&(n=o="undirected"),delete this.source[n][t],delete this.target[o][e]},vo.prototype.detachMulti=function(){const e=this.source.key,t=this.target.key;let n="out",o="in";this.undirected&&(n=o="undirected"),void 0===this.previous?void 0===this.next?(delete this.source[n][t],delete this.target[o][e]):(this.next.previous=void 0,this.source[n][t]=this.next,this.target[o][e]=this.next):(this.previous.next=this.next,void 0!==this.next&&(this.next.previous=this.previous))};const wo=0,xo=1,So=3;function No(e,t,n,o,i,r,a){let s,l,d,c;if(o=""+o,n===wo){if(s=e._nodes.get(o),!s)throw new go(`Graph.${t}: could not find the "${o}" node in the graph.`);d=i,c=r}else if(n===So){if(i=""+i,l=e._edges.get(i),!l)throw new go(`Graph.${t}: could not find the "${i}" edge in the graph.`);const n=l.source.key,u=l.target.key;if(o===n)s=l.target;else{if(o!==u)throw new go(`Graph.${t}: the "${o}" node is not attached to the "${i}" edge (${n}, ${u}).`);s=l.source}d=r,c=a}else{if(l=e._edges.get(o),!l)throw new go(`Graph.${t}: could not find the "${o}" edge in the graph.`);s=n===xo?l.source:l.target,d=i,c=r}return[s,d,c]}const ko=[{name:e=>`get${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,o,i){const[r,a]=No(this,t,n,e,o,i);return r.attributes[a]}}},{name:e=>`get${e}Attributes`,attacher:function(e,t,n){e.prototype[t]=function(e,o){const[i]=No(this,t,n,e,o);return i.attributes}}},{name:e=>`has${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,o,i){const[r,a]=No(this,t,n,e,o,i);return r.attributes.hasOwnProperty(a)}}},{name:e=>`set${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,o,i,r){const[a,s,l]=No(this,t,n,e,o,i,r);return a.attributes[s]=l,this.emit("nodeAttributesUpdated",{key:a.key,type:"set",attributes:a.attributes,name:s}),this}}},{name:e=>`update${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,o,i,r){const[a,s,l]=No(this,t,n,e,o,i,r);if("function"!=typeof l)throw new po(`Graph.${t}: updater should be a function.`);const d=a.attributes,c=l(d[s]);return d[s]=c,this.emit("nodeAttributesUpdated",{key:a.key,type:"set",attributes:a.attributes,name:s}),this}}},{name:e=>`remove${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,o,i){const[r,a]=No(this,t,n,e,o,i);return delete r.attributes[a],this.emit("nodeAttributesUpdated",{key:r.key,type:"remove",attributes:r.attributes,name:a}),this}}},{name:e=>`replace${e}Attributes`,attacher:function(e,t,n){e.prototype[t]=function(e,o,i){const[r,a]=No(this,t,n,e,o,i);if(!io(a))throw new po(`Graph.${t}: provided attributes are not a plain object.`);return r.attributes=a,this.emit("nodeAttributesUpdated",{key:r.key,type:"replace",attributes:r.attributes}),this}}},{name:e=>`merge${e}Attributes`,attacher:function(e,t,n){e.prototype[t]=function(e,o,i){const[r,a]=No(this,t,n,e,o,i);if(!io(a))throw new po(`Graph.${t}: provided attributes are not a plain object.`);return no(r.attributes,a),this.emit("nodeAttributesUpdated",{key:r.key,type:"merge",attributes:r.attributes,data:a}),this}}},{name:e=>`update${e}Attributes`,attacher:function(e,t,n){e.prototype[t]=function(e,o,i){const[r,a]=No(this,t,n,e,o,i);if("function"!=typeof a)throw new po(`Graph.${t}: provided updater is not a function.`);return r.attributes=a(r.attributes),this.emit("nodeAttributesUpdated",{key:r.key,type:"update",attributes:r.attributes}),this}}}];const Co=[{name:e=>`get${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,o){let i;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new fo(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new fo(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const r=""+e,a=""+o;if(o=arguments[2],i=oo(this,r,a,n),!i)throw new go(`Graph.${t}: could not find an edge for the given path ("${r}" - "${a}").`)}else{if("mixed"!==n)throw new fo(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,i=this._edges.get(e),!i)throw new go(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return i.attributes[o]}}},{name:e=>`get${e}Attributes`,attacher:function(e,t,n){e.prototype[t]=function(e){let o;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new fo(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new fo(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const i=""+e,r=""+arguments[1];if(o=oo(this,i,r,n),!o)throw new go(`Graph.${t}: could not find an edge for the given path ("${i}" - "${r}").`)}else{if("mixed"!==n)throw new fo(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,o=this._edges.get(e),!o)throw new go(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return o.attributes}}},{name:e=>`has${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,o){let i;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new fo(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new fo(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const r=""+e,a=""+o;if(o=arguments[2],i=oo(this,r,a,n),!i)throw new go(`Graph.${t}: could not find an edge for the given path ("${r}" - "${a}").`)}else{if("mixed"!==n)throw new fo(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,i=this._edges.get(e),!i)throw new go(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return i.attributes.hasOwnProperty(o)}}},{name:e=>`set${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,o,i){let r;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new fo(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new fo(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+e,s=""+o;if(o=arguments[2],i=arguments[3],r=oo(this,a,s,n),!r)throw new go(`Graph.${t}: could not find an edge for the given path ("${a}" - "${s}").`)}else{if("mixed"!==n)throw new fo(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,r=this._edges.get(e),!r)throw new go(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return r.attributes[o]=i,this.emit("edgeAttributesUpdated",{key:r.key,type:"set",attributes:r.attributes,name:o}),this}}},{name:e=>`update${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,o,i){let r;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new fo(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new fo(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+e,s=""+o;if(o=arguments[2],i=arguments[3],r=oo(this,a,s,n),!r)throw new go(`Graph.${t}: could not find an edge for the given path ("${a}" - "${s}").`)}else{if("mixed"!==n)throw new fo(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,r=this._edges.get(e),!r)throw new go(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if("function"!=typeof i)throw new po(`Graph.${t}: updater should be a function.`);return r.attributes[o]=i(r.attributes[o]),this.emit("edgeAttributesUpdated",{key:r.key,type:"set",attributes:r.attributes,name:o}),this}}},{name:e=>`remove${e}Attribute`,attacher:function(e,t,n){e.prototype[t]=function(e,o){let i;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new fo(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new fo(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const r=""+e,a=""+o;if(o=arguments[2],i=oo(this,r,a,n),!i)throw new go(`Graph.${t}: could not find an edge for the given path ("${r}" - "${a}").`)}else{if("mixed"!==n)throw new fo(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,i=this._edges.get(e),!i)throw new go(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return delete i.attributes[o],this.emit("edgeAttributesUpdated",{key:i.key,type:"remove",attributes:i.attributes,name:o}),this}}},{name:e=>`replace${e}Attributes`,attacher:function(e,t,n){e.prototype[t]=function(e,o){let i;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new fo(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new fo(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const r=""+e,a=""+o;if(o=arguments[2],i=oo(this,r,a,n),!i)throw new go(`Graph.${t}: could not find an edge for the given path ("${r}" - "${a}").`)}else{if("mixed"!==n)throw new fo(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,i=this._edges.get(e),!i)throw new go(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(!io(o))throw new po(`Graph.${t}: provided attributes are not a plain object.`);return i.attributes=o,this.emit("edgeAttributesUpdated",{key:i.key,type:"replace",attributes:i.attributes}),this}}},{name:e=>`merge${e}Attributes`,attacher:function(e,t,n){e.prototype[t]=function(e,o){let i;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new fo(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new fo(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const r=""+e,a=""+o;if(o=arguments[2],i=oo(this,r,a,n),!i)throw new go(`Graph.${t}: could not find an edge for the given path ("${r}" - "${a}").`)}else{if("mixed"!==n)throw new fo(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,i=this._edges.get(e),!i)throw new go(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(!io(o))throw new po(`Graph.${t}: provided attributes are not a plain object.`);return no(i.attributes,o),this.emit("edgeAttributesUpdated",{key:i.key,type:"merge",attributes:i.attributes,data:o}),this}}},{name:e=>`update${e}Attributes`,attacher:function(e,t,n){e.prototype[t]=function(e,o){let i;if("mixed"!==this.type&&"mixed"!==n&&n!==this.type)throw new fo(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new fo(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const r=""+e,a=""+o;if(o=arguments[2],i=oo(this,r,a,n),!i)throw new go(`Graph.${t}: could not find an edge for the given path ("${r}" - "${a}").`)}else{if("mixed"!==n)throw new fo(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=""+e,i=this._edges.get(e),!i)throw new go(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if("function"!=typeof o)throw new po(`Graph.${t}: provided updater is not a function.`);return i.attributes=o(i.attributes),this.emit("edgeAttributesUpdated",{key:i.key,type:"update",attributes:i.attributes}),this}}}];const Ro=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function Lo(e,t,n,o){let i=!1;for(const r in t){if(r===o)continue;const a=t[r];if(i=n(a.key,a.attributes,a.source.key,a.target.key,a.source.attributes,a.target.attributes,a.undirected),e&&i)return a.key}}function To(e,t,n,o){let i,r,a,s=!1;for(const l in t)if(l!==o){i=t[l];do{if(r=i.source,a=i.target,s=n(i.key,i.attributes,r.key,a.key,r.attributes,a.attributes,i.undirected),e&&s)return i.key;i=i.next}while(void 0!==i)}}function jo(e,t){const n=Object.keys(e),o=n.length;let i,r=0;return{[Symbol.iterator](){return this},next(){do{if(i)i=i.next;else{if(r>=o)return{done:!0};const a=n[r++];if(a===t){i=void 0;continue}i=e[a]}}while(!i);return{done:!1,value:{edge:i.key,attributes:i.attributes,source:i.source.key,target:i.target.key,sourceAttributes:i.source.attributes,targetAttributes:i.target.attributes,undirected:i.undirected}}}}}function Ao(e,t,n,o){const i=t[n];if(!i)return;const r=i.source,a=i.target;return o(i.key,i.attributes,r.key,a.key,r.attributes,a.attributes,i.undirected)&&e?i.key:void 0}function Oo(e,t,n,o){let i=t[n];if(!i)return;let r=!1;do{if(r=o(i.key,i.attributes,i.source.key,i.target.key,i.source.attributes,i.target.attributes,i.undirected),e&&r)return i.key;i=i.next}while(void 0!==i)}function _o(e,t){let n=e[t];if(void 0!==n.next)return{[Symbol.iterator](){return this},next(){if(!n)return{done:!0};const e={edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected};return n=n.next,{done:!1,value:e}}};let o=!1;return{[Symbol.iterator](){return this},next:()=>!0===o?{done:!0}:(o=!0,{done:!1,value:{edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected}})}}function Mo(e,t,n,o){if(0===t.size)return;const i="mixed"!==n&&n!==t.type,r="undirected"===n;let a,s,l=!1;const d=t._edges.values();for(;a=d.next(),!0!==a.done;){if(s=a.value,i&&s.undirected!==r)continue;const{key:t,attributes:n,source:d,target:c}=s;if(l=o(t,n,d.key,c.key,d.attributes,c.attributes,s.undirected),e&&l)return t}}function Eo(e,t,n,o,i,r){const a=t?To:Lo;let s;if("undirected"!==n){if("out"!==o&&(s=a(e,i.in,r),e&&s))return s;if("in"!==o&&(s=a(e,i.out,r,o?void 0:i.key),e&&s))return s}if("directed"!==n&&(s=a(e,i.undirected,r),e&&s))return s}function Po(e,t,n,o,i,r,a){const s=n?Oo:Ao;let l;if("undirected"!==t){if(void 0!==i.in&&"out"!==o&&(l=s(e,i.in,r,a),e&&l))return l;if(void 0!==i.out&&"in"!==o&&(o||i.key!==r)&&(l=s(e,i.out,r,a),e&&l))return l}if("directed"!==t&&void 0!==i.undirected&&(l=s(e,i.undirected,r,a),e&&l))return l}function Io(e,t){const{name:n,type:o,direction:i}=t;e.prototype[n]=function(e,t){if("mixed"!==o&&"mixed"!==this.type&&o!==this.type)return[];if(!arguments.length)return function(e,t){if(0===e.size)return[];if("mixed"===t||t===e.type)return Array.from(e._edges.keys());const n="undirected"===t?e.undirectedSize:e.directedSize,o=new Array(n),i="undirected"===t,r=e._edges.values();let a,s,l=0;for(;a=r.next(),!0!==a.done;)s=a.value,s.undirected===i&&(o[l++]=s.key);return o}(this,o);if(1===arguments.length){e=""+e;const t=this._nodes.get(e);if(void 0===t)throw new go(`Graph.${n}: could not find the "${e}" node in the graph.`);return function(e,t,n,o){const i=[];return Eo(!1,e,t,n,o,(function(e){i.push(e)})),i}(this.multi,"mixed"===o?this.type:o,i,t)}if(2===arguments.length){e=""+e,t=""+t;const r=this._nodes.get(e);if(!r)throw new go(`Graph.${n}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new go(`Graph.${n}: could not find the "${t}" target node in the graph.`);return function(e,t,n,o,i){const r=[];return Po(!1,e,t,n,o,i,(function(e){r.push(e)})),r}(o,this.multi,i,r,t)}throw new po(`Graph.${n}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function $o(e,t){const{name:n,type:o,direction:i}=t,r=n.slice(0,-1)+"Entries";e.prototype[r]=function(e,t){if("mixed"!==o&&"mixed"!==this.type&&o!==this.type)return uo();if(!arguments.length)return function(e,t){if(0===e.size)return uo();const n="mixed"!==t&&t!==e.type,o="undirected"===t,i=e._edges.values();return{[Symbol.iterator](){return this},next(){let e,t;for(;;){if(e=i.next(),e.done)return e;if(t=e.value,!n||t.undirected===o)break}return{value:{edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected},done:!1}}}}(this,o);if(1===arguments.length){e=""+e;const t=this._nodes.get(e);if(!t)throw new go(`Graph.${r}: could not find the "${e}" node in the graph.`);return function(e,t,n){let o=uo();return"undirected"!==e&&("out"!==t&&void 0!==n.in&&(o=co(o,jo(n.in))),"in"!==t&&void 0!==n.out&&(o=co(o,jo(n.out,t?void 0:n.key)))),"directed"!==e&&void 0!==n.undirected&&(o=co(o,jo(n.undirected))),o}(o,i,t)}if(2===arguments.length){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new go(`Graph.${r}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new go(`Graph.${r}: could not find the "${t}" target node in the graph.`);return function(e,t,n,o){let i=uo();return"undirected"!==e&&(void 0!==n.in&&"out"!==t&&o in n.in&&(i=co(i,_o(n.in,o))),void 0!==n.out&&"in"!==t&&o in n.out&&(t||n.key!==o)&&(i=co(i,_o(n.out,o)))),"directed"!==e&&void 0!==n.undirected&&o in n.undirected&&(i=co(i,_o(n.undirected,o))),i}(o,i,n,t)}throw new po(`Graph.${r}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}const zo=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function Do(){this.A=null,this.B=null}function Bo(e,t,n,o,i){for(const r in o){const a=o[r],s=a.source,l=a.target,d=s===n?l:s;if(t&&t.has(d.key))continue;const c=i(d.key,d.attributes);if(e&&c)return d.key}}function Go(e,t,n,o,i){if("mixed"!==t){if("undirected"===t)return Bo(e,null,o,o.undirected,i);if("string"==typeof n)return Bo(e,null,o,o[n],i)}const r=new Do;let a;if("undirected"!==t){if("out"!==n){if(a=Bo(e,null,o,o.in,i),e&&a)return a;r.wrap(o.in)}if("in"!==n){if(a=Bo(e,r,o,o.out,i),e&&a)return a;r.wrap(o.out)}}if("directed"!==t&&(a=Bo(e,r,o,o.undirected,i),e&&a))return a}function Fo(e,t,n){const o=Object.keys(n),i=o.length;let r=0;return{[Symbol.iterator](){return this},next(){let a=null;do{if(r>=i)return e&&e.wrap(n),{done:!0};const s=n[o[r++]],l=s.source,d=s.target;a=l===t?d:l,e&&e.has(a.key)&&(a=null)}while(null===a);return{done:!1,value:{neighbor:a.key,attributes:a.attributes}}}}}function Uo(e,t){const{name:n,type:o,direction:i}=t;e.prototype[n]=function(e){if("mixed"!==o&&"mixed"!==this.type&&o!==this.type)return[];e=""+e;const t=this._nodes.get(e);if(void 0===t)throw new go(`Graph.${n}: could not find the "${e}" node in the graph.`);return function(e,t,n){if("mixed"!==e){if("undirected"===e)return Object.keys(n.undirected);if("string"==typeof t)return Object.keys(n[t])}const o=[];return Go(!1,e,t,n,(function(e){o.push(e)})),o}("mixed"===o?this.type:o,i,t)}}function Vo(e,t){const{name:n,type:o,direction:i}=t,r=n.slice(0,-1)+"Entries";e.prototype[r]=function(e){if("mixed"!==o&&"mixed"!==this.type&&o!==this.type)return uo();e=""+e;const t=this._nodes.get(e);if(void 0===t)throw new go(`Graph.${r}: could not find the "${e}" node in the graph.`);return function(e,t,n){if("mixed"!==e){if("undirected"===e)return Fo(null,n,n.undirected);if("string"==typeof t)return Fo(null,n,n[t])}let o=uo();const i=new Do;return"undirected"!==e&&("out"!==t&&(o=co(o,Fo(i,n,n.in))),"in"!==t&&(o=co(o,Fo(i,n,n.out)))),"directed"!==e&&(o=co(o,Fo(i,n,n.undirected))),o}("mixed"===o?this.type:o,i,t)}}function Wo(e,t,n,o,i){const r=o._nodes.values(),a=o.type;let s,l,d,c,u,h;for(;s=r.next(),!0!==s.done;){let e=!1;if(l=s.value,"undirected"!==a)for(d in c=l.out,c){u=c[d];do{h=u.target,e=!0,i(l.key,h.key,l.attributes,h.attributes,u.key,u.attributes,u.undirected),u=u.next}while(u)}if("directed"!==a)for(d in c=l.undirected,c)if(!(t&&l.key>d)){u=c[d];do{h=u.target,h.key!==d&&(h=u.source),e=!0,i(l.key,h.key,l.attributes,h.attributes,u.key,u.attributes,u.undirected),u=u.next}while(u)}n&&!e&&i(l.key,null,l.attributes,null,null,null,null)}}function Jo(e){if(!io(e))throw new po('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in e))throw new po("Graph.import: serialized node is missing its key.");if("attributes"in e&&(!io(e.attributes)||null===e.attributes))throw new po("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function Ho(e){if(!io(e))throw new po('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in e))throw new po("Graph.import: serialized edge is missing its source.");if(!("target"in e))throw new po("Graph.import: serialized edge is missing its target.");if("attributes"in e&&(!io(e.attributes)||null===e.attributes))throw new po("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in e&&"boolean"!=typeof e.undirected)throw new po("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}Do.prototype.wrap=function(e){null===this.A?this.A=e:null===this.B&&(this.B=e)},Do.prototype.has=function(e){return null!==this.A&&e in this.A||null!==this.B&&e in this.B};const Ko=function(){let e=255&Math.floor(256*Math.random());return()=>e++}(),qo=new Set(["directed","undirected","mixed"]),Qo=new Set(["domain","_events","_eventsCount","_maxListeners"]),Zo={allowSelfLoops:!0,multi:!1,type:"mixed"};function Yo(e,t,n){const o=new e.NodeDataClass(t,n);return e._nodes.set(t,o),e.emit("nodeAdded",{key:t,attributes:n}),o}function Xo(e,t,n,o,i,r,a,s){if(!o&&"undirected"===e.type)throw new fo(`Graph.${t}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(o&&"directed"===e.type)throw new fo(`Graph.${t}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(s&&!io(s))throw new po(`Graph.${t}: invalid attributes. Expecting an object but got "${s}"`);if(r=""+r,a=""+a,s=s||{},!e.allowSelfLoops&&r===a)throw new fo(`Graph.${t}: source & target are the same ("${r}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const l=e._nodes.get(r),d=e._nodes.get(a);if(!l)throw new go(`Graph.${t}: source node "${r}" not found.`);if(!d)throw new go(`Graph.${t}: target node "${a}" not found.`);const c={key:null,undirected:o,source:r,target:a,attributes:s};if(n)i=e._edgeKeyGenerator();else if(i=""+i,e._edges.has(i))throw new fo(`Graph.${t}: the "${i}" edge already exists in the graph.`);if(!e.multi&&(o?void 0!==l.undirected[a]:void 0!==l.out[a]))throw new fo(`Graph.${t}: an edge linking "${r}" to "${a}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const u=new vo(o,i,l,d,s);e._edges.set(i,u);const h=r===a;return o?(l.undirectedDegree++,d.undirectedDegree++,h&&(l.undirectedLoops++,e._undirectedSelfLoopCount++)):(l.outDegree++,d.inDegree++,h&&(l.directedLoops++,e._directedSelfLoopCount++)),e.multi?u.attachMulti():u.attach(),o?e._undirectedSize++:e._directedSize++,c.key=i,e.emit("edgeAdded",c),i}function ei(e,t,n,o,i,r,a,s,l){if(!o&&"undirected"===e.type)throw new fo(`Graph.${t}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(o&&"directed"===e.type)throw new fo(`Graph.${t}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(s)if(l){if("function"!=typeof s)throw new po(`Graph.${t}: invalid updater function. Expecting a function but got "${s}"`)}else if(!io(s))throw new po(`Graph.${t}: invalid attributes. Expecting an object but got "${s}"`);let d;if(r=""+r,a=""+a,l&&(d=s,s=void 0),!e.allowSelfLoops&&r===a)throw new fo(`Graph.${t}: source & target are the same ("${r}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let c,u,h=e._nodes.get(r),p=e._nodes.get(a);if(!n&&(c=e._edges.get(i),c)){if(!(c.source.key===r&&c.target.key===a||o&&c.source.key===a&&c.target.key===r))throw new fo(`Graph.${t}: inconsistency detected when attempting to merge the "${i}" edge with "${r}" source & "${a}" target vs. ("${c.source.key}", "${c.target.key}").`);u=c}if(u||e.multi||!h||(u=o?h.undirected[a]:h.out[a]),u){const t=[u.key,!1,!1,!1];if(l?!d:!s)return t;if(l){const t=u.attributes;u.attributes=d(t),e.emit("edgeAttributesUpdated",{type:"replace",key:u.key,attributes:u.attributes})}else no(u.attributes,s),e.emit("edgeAttributesUpdated",{type:"merge",key:u.key,attributes:u.attributes,data:s});return t}s=s||{},l&&d&&(s=d(s));const g={key:null,undirected:o,source:r,target:a,attributes:s};if(n)i=e._edgeKeyGenerator();else if(i=""+i,e._edges.has(i))throw new fo(`Graph.${t}: the "${i}" edge already exists in the graph.`);let f=!1,m=!1;h||(h=Yo(e,r,{}),f=!0,r===a&&(p=h,m=!0)),p||(p=Yo(e,a,{}),m=!0),c=new vo(o,i,h,p,s),e._edges.set(i,c);const y=r===a;return o?(h.undirectedDegree++,p.undirectedDegree++,y&&(h.undirectedLoops++,e._undirectedSelfLoopCount++)):(h.outDegree++,p.inDegree++,y&&(h.directedLoops++,e._directedSelfLoopCount++)),e.multi?c.attachMulti():c.attach(),o?e._undirectedSize++:e._directedSize++,g.key=i,e.emit("edgeAdded",g),[i,!0,f,m]}function ti(e,t){e._edges.delete(t.key);const{source:n,target:o,attributes:i}=t,r=t.undirected,a=n===o;r?(n.undirectedDegree--,o.undirectedDegree--,a&&(n.undirectedLoops--,e._undirectedSelfLoopCount--)):(n.outDegree--,o.inDegree--,a&&(n.directedLoops--,e._directedSelfLoopCount--)),e.multi?t.detachMulti():t.detach(),r?e._undirectedSize--:e._directedSize--,e.emit("edgeDropped",{key:t.key,attributes:i,source:n.key,target:o.key,undirected:r})}class ni extends to.EventEmitter{constructor(e){if(super(),"boolean"!=typeof(e=no({},Zo,e)).multi)throw new po(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${e.multi}".`);if(!qo.has(e.type))throw new po(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${e.type}".`);if("boolean"!=typeof e.allowSelfLoops)throw new po(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${e.allowSelfLoops}".`);ao(this,"NodeDataClass","mixed"===e.type?mo:"directed"===e.type?yo:bo);const t="geid_"+Ko()+"_";let n=0;ao(this,"_attributes",{}),ao(this,"_nodes",new Map),ao(this,"_edges",new Map),ao(this,"_directedSize",0),ao(this,"_undirectedSize",0),ao(this,"_directedSelfLoopCount",0),ao(this,"_undirectedSelfLoopCount",0),ao(this,"_edgeKeyGenerator",(()=>{let e;do{e=t+n++}while(this._edges.has(e));return e})),ao(this,"_options",e),Qo.forEach((e=>ao(this,e,this[e]))),so(this,"order",(()=>this._nodes.size)),so(this,"size",(()=>this._edges.size)),so(this,"directedSize",(()=>this._directedSize)),so(this,"undirectedSize",(()=>this._undirectedSize)),so(this,"selfLoopCount",(()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount)),so(this,"directedSelfLoopCount",(()=>this._directedSelfLoopCount)),so(this,"undirectedSelfLoopCount",(()=>this._undirectedSelfLoopCount)),so(this,"multi",this._options.multi),so(this,"type",this._options.type),so(this,"allowSelfLoops",this._options.allowSelfLoops),so(this,"implementation",(()=>"graphology"))}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(e){return this._nodes.has(""+e)}hasDirectedEdge(e,t){if("undirected"===this.type)return!1;if(1===arguments.length){const t=""+e,n=this._edges.get(t);return!!n&&!n.undirected}if(2===arguments.length){e=""+e,t=""+t;const n=this._nodes.get(e);return!!n&&n.out.hasOwnProperty(t)}throw new po(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(e,t){if("directed"===this.type)return!1;if(1===arguments.length){const t=""+e,n=this._edges.get(t);return!!n&&n.undirected}if(2===arguments.length){e=""+e,t=""+t;const n=this._nodes.get(e);return!!n&&n.undirected.hasOwnProperty(t)}throw new po(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(e,t){if(1===arguments.length){const t=""+e;return this._edges.has(t)}if(2===arguments.length){e=""+e,t=""+t;const n=this._nodes.get(e);return!!n&&(void 0!==n.out&&n.out.hasOwnProperty(t)||void 0!==n.undirected&&n.undirected.hasOwnProperty(t))}throw new po(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(e,t){if("undirected"===this.type)return;if(e=""+e,t=""+t,this.multi)throw new fo("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const n=this._nodes.get(e);if(!n)throw new go(`Graph.directedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new go(`Graph.directedEdge: could not find the "${t}" target node in the graph.`);const o=n.out&&n.out[t]||void 0;return o?o.key:void 0}undirectedEdge(e,t){if("directed"===this.type)return;if(e=""+e,t=""+t,this.multi)throw new fo("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const n=this._nodes.get(e);if(!n)throw new go(`Graph.undirectedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new go(`Graph.undirectedEdge: could not find the "${t}" target node in the graph.`);const o=n.undirected&&n.undirected[t]||void 0;return o?o.key:void 0}edge(e,t){if(this.multi)throw new fo("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new go(`Graph.edge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new go(`Graph.edge: could not find the "${t}" target node in the graph.`);const o=n.out&&n.out[t]||n.undirected&&n.undirected[t]||void 0;if(o)return o.key}areDirectedNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new go(`Graph.areDirectedNeighbors: could not find the "${e}" node in the graph.`);return"undirected"!==this.type&&(t in n.in||t in n.out)}areOutNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new go(`Graph.areOutNeighbors: could not find the "${e}" node in the graph.`);return"undirected"!==this.type&&t in n.out}areInNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new go(`Graph.areInNeighbors: could not find the "${e}" node in the graph.`);return"undirected"!==this.type&&t in n.in}areUndirectedNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new go(`Graph.areUndirectedNeighbors: could not find the "${e}" node in the graph.`);return"directed"!==this.type&&t in n.undirected}areNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new go(`Graph.areNeighbors: could not find the "${e}" node in the graph.`);return"undirected"!==this.type&&(t in n.in||t in n.out)||"directed"!==this.type&&t in n.undirected}areInboundNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new go(`Graph.areInboundNeighbors: could not find the "${e}" node in the graph.`);return"undirected"!==this.type&&t in n.in||"directed"!==this.type&&t in n.undirected}areOutboundNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new go(`Graph.areOutboundNeighbors: could not find the "${e}" node in the graph.`);return"undirected"!==this.type&&t in n.out||"directed"!==this.type&&t in n.undirected}inDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new go(`Graph.inDegree: could not find the "${e}" node in the graph.`);return"undirected"===this.type?0:t.inDegree}outDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new go(`Graph.outDegree: could not find the "${e}" node in the graph.`);return"undirected"===this.type?0:t.outDegree}directedDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new go(`Graph.directedDegree: could not find the "${e}" node in the graph.`);return"undirected"===this.type?0:t.inDegree+t.outDegree}undirectedDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new go(`Graph.undirectedDegree: could not find the "${e}" node in the graph.`);return"directed"===this.type?0:t.undirectedDegree}inboundDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new go(`Graph.inboundDegree: could not find the "${e}" node in the graph.`);let n=0;return"directed"!==this.type&&(n+=t.undirectedDegree),"undirected"!==this.type&&(n+=t.inDegree),n}outboundDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new go(`Graph.outboundDegree: could not find the "${e}" node in the graph.`);let n=0;return"directed"!==this.type&&(n+=t.undirectedDegree),"undirected"!==this.type&&(n+=t.outDegree),n}degree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new go(`Graph.degree: could not find the "${e}" node in the graph.`);let n=0;return"directed"!==this.type&&(n+=t.undirectedDegree),"undirected"!==this.type&&(n+=t.inDegree+t.outDegree),n}inDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new go(`Graph.inDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return"undirected"===this.type?0:t.inDegree-t.directedLoops}outDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new go(`Graph.outDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return"undirected"===this.type?0:t.outDegree-t.directedLoops}directedDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new go(`Graph.directedDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return"undirected"===this.type?0:t.inDegree+t.outDegree-2*t.directedLoops}undirectedDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new go(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return"directed"===this.type?0:t.undirectedDegree-2*t.undirectedLoops}inboundDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new go(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,o=0;return"directed"!==this.type&&(n+=t.undirectedDegree,o+=2*t.undirectedLoops),"undirected"!==this.type&&(n+=t.inDegree,o+=t.directedLoops),n-o}outboundDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new go(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,o=0;return"directed"!==this.type&&(n+=t.undirectedDegree,o+=2*t.undirectedLoops),"undirected"!==this.type&&(n+=t.outDegree,o+=t.directedLoops),n-o}degreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new go(`Graph.degreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,o=0;return"directed"!==this.type&&(n+=t.undirectedDegree,o+=2*t.undirectedLoops),"undirected"!==this.type&&(n+=t.inDegree+t.outDegree,o+=2*t.directedLoops),n-o}source(e){e=""+e;const t=this._edges.get(e);if(!t)throw new go(`Graph.source: could not find the "${e}" edge in the graph.`);return t.source.key}target(e){e=""+e;const t=this._edges.get(e);if(!t)throw new go(`Graph.target: could not find the "${e}" edge in the graph.`);return t.target.key}extremities(e){e=""+e;const t=this._edges.get(e);if(!t)throw new go(`Graph.extremities: could not find the "${e}" edge in the graph.`);return[t.source.key,t.target.key]}opposite(e,t){e=""+e,t=""+t;const n=this._edges.get(t);if(!n)throw new go(`Graph.opposite: could not find the "${t}" edge in the graph.`);const o=n.source.key,i=n.target.key;if(e===o)return i;if(e===i)return o;throw new go(`Graph.opposite: the "${e}" node is not attached to the "${t}" edge (${o}, ${i}).`)}hasExtremity(e,t){e=""+e,t=""+t;const n=this._edges.get(e);if(!n)throw new go(`Graph.hasExtremity: could not find the "${e}" edge in the graph.`);return n.source.key===t||n.target.key===t}isUndirected(e){e=""+e;const t=this._edges.get(e);if(!t)throw new go(`Graph.isUndirected: could not find the "${e}" edge in the graph.`);return t.undirected}isDirected(e){e=""+e;const t=this._edges.get(e);if(!t)throw new go(`Graph.isDirected: could not find the "${e}" edge in the graph.`);return!t.undirected}isSelfLoop(e){e=""+e;const t=this._edges.get(e);if(!t)throw new go(`Graph.isSelfLoop: could not find the "${e}" edge in the graph.`);return t.source===t.target}addNode(e,t){const n=function(e,t,n){if(n&&!io(n))throw new po(`Graph.addNode: invalid attributes. Expecting an object but got "${n}"`);if(t=""+t,n=n||{},e._nodes.has(t))throw new fo(`Graph.addNode: the "${t}" node already exist in the graph.`);const o=new e.NodeDataClass(t,n);return e._nodes.set(t,o),e.emit("nodeAdded",{key:t,attributes:n}),o}(this,e,t);return n.key}mergeNode(e,t){if(t&&!io(t))throw new po(`Graph.mergeNode: invalid attributes. Expecting an object but got "${t}"`);e=""+e,t=t||{};let n=this._nodes.get(e);return n?(t&&(no(n.attributes,t),this.emit("nodeAttributesUpdated",{type:"merge",key:e,attributes:n.attributes,data:t})),[e,!1]):(n=new this.NodeDataClass(e,t),this._nodes.set(e,n),this.emit("nodeAdded",{key:e,attributes:t}),[e,!0])}updateNode(e,t){if(t&&"function"!=typeof t)throw new po(`Graph.updateNode: invalid updater function. Expecting a function but got "${t}"`);e=""+e;let n=this._nodes.get(e);if(n){if(t){const o=n.attributes;n.attributes=t(o),this.emit("nodeAttributesUpdated",{type:"replace",key:e,attributes:n.attributes})}return[e,!1]}const o=t?t({}):{};return n=new this.NodeDataClass(e,o),this._nodes.set(e,n),this.emit("nodeAdded",{key:e,attributes:o}),[e,!0]}dropNode(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new go(`Graph.dropNode: could not find the "${e}" node in the graph.`);let n;if("undirected"!==this.type){for(const e in t.out){n=t.out[e];do{ti(this,n),n=n.next}while(n)}for(const e in t.in){n=t.in[e];do{ti(this,n),n=n.next}while(n)}}if("directed"!==this.type)for(const o in t.undirected){n=t.undirected[o];do{ti(this,n),n=n.next}while(n)}this._nodes.delete(e),this.emit("nodeDropped",{key:e,attributes:t.attributes})}dropEdge(e){let t;if(arguments.length>1){const e=""+arguments[0],n=""+arguments[1];if(t=oo(this,e,n,this.type),!t)throw new go(`Graph.dropEdge: could not find the "${e}" -> "${n}" edge in the graph.`)}else if(e=""+e,t=this._edges.get(e),!t)throw new go(`Graph.dropEdge: could not find the "${e}" edge in the graph.`);return ti(this,t),this}dropDirectedEdge(e,t){if(arguments.length<2)throw new fo("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new fo("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const n=oo(this,e=""+e,t=""+t,"directed");if(!n)throw new go(`Graph.dropDirectedEdge: could not find a "${e}" -> "${t}" edge in the graph.`);return ti(this,n),this}dropUndirectedEdge(e,t){if(arguments.length<2)throw new fo("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new fo("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const n=oo(this,e,t,"undirected");if(!n)throw new go(`Graph.dropUndirectedEdge: could not find a "${e}" -> "${t}" edge in the graph.`);return ti(this,n),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const e=this._nodes.values();let t;for(;t=e.next(),!0!==t.done;)t.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(e){return this._attributes[e]}getAttributes(){return this._attributes}hasAttribute(e){return this._attributes.hasOwnProperty(e)}setAttribute(e,t){return this._attributes[e]=t,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this}updateAttribute(e,t){if("function"!=typeof t)throw new po("Graph.updateAttribute: updater should be a function.");const n=this._attributes[e];return this._attributes[e]=t(n),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this}removeAttribute(e){return delete this._attributes[e],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:e}),this}replaceAttributes(e){if(!io(e))throw new po("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=e,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(e){if(!io(e))throw new po("Graph.mergeAttributes: provided attributes are not a plain object.");return no(this._attributes,e),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:e}),this}updateAttributes(e){if("function"!=typeof e)throw new po("Graph.updateAttributes: provided updater is not a function.");return this._attributes=e(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(e,t){if("function"!=typeof e)throw new po("Graph.updateEachNodeAttributes: expecting an updater function.");if(t&&!lo(t))throw new po("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const n=this._nodes.values();let o,i;for(;o=n.next(),!0!==o.done;)i=o.value,i.attributes=e(i.key,i.attributes);this.emit("eachNodeAttributesUpdated",{hints:t||null})}updateEachEdgeAttributes(e,t){if("function"!=typeof e)throw new po("Graph.updateEachEdgeAttributes: expecting an updater function.");if(t&&!lo(t))throw new po("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const n=this._edges.values();let o,i,r,a;for(;o=n.next(),!0!==o.done;)i=o.value,r=i.source,a=i.target,i.attributes=e(i.key,i.attributes,r.key,a.key,r.attributes,a.attributes,i.undirected);this.emit("eachEdgeAttributesUpdated",{hints:t||null})}forEachAdjacencyEntry(e){if("function"!=typeof e)throw new po("Graph.forEachAdjacencyEntry: expecting a callback.");Wo(0,!1,!1,this,e)}forEachAdjacencyEntryWithOrphans(e){if("function"!=typeof e)throw new po("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");Wo(0,!1,!0,this,e)}forEachAssymetricAdjacencyEntry(e){if("function"!=typeof e)throw new po("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");Wo(0,!0,!1,this,e)}forEachAssymetricAdjacencyEntryWithOrphans(e){if("function"!=typeof e)throw new po("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");Wo(0,!0,!0,this,e)}nodes(){return Array.from(this._nodes.keys())}forEachNode(e){if("function"!=typeof e)throw new po("Graph.forEachNode: expecting a callback.");const t=this._nodes.values();let n,o;for(;n=t.next(),!0!==n.done;)o=n.value,e(o.key,o.attributes)}findNode(e){if("function"!=typeof e)throw new po("Graph.findNode: expecting a callback.");const t=this._nodes.values();let n,o;for(;n=t.next(),!0!==n.done;)if(o=n.value,e(o.key,o.attributes))return o.key}mapNodes(e){if("function"!=typeof e)throw new po("Graph.mapNode: expecting a callback.");const t=this._nodes.values();let n,o;const i=new Array(this.order);let r=0;for(;n=t.next(),!0!==n.done;)o=n.value,i[r++]=e(o.key,o.attributes);return i}someNode(e){if("function"!=typeof e)throw new po("Graph.someNode: expecting a callback.");const t=this._nodes.values();let n,o;for(;n=t.next(),!0!==n.done;)if(o=n.value,e(o.key,o.attributes))return!0;return!1}everyNode(e){if("function"!=typeof e)throw new po("Graph.everyNode: expecting a callback.");const t=this._nodes.values();let n,o;for(;n=t.next(),!0!==n.done;)if(o=n.value,!e(o.key,o.attributes))return!1;return!0}filterNodes(e){if("function"!=typeof e)throw new po("Graph.filterNodes: expecting a callback.");const t=this._nodes.values();let n,o;const i=[];for(;n=t.next(),!0!==n.done;)o=n.value,e(o.key,o.attributes)&&i.push(o.key);return i}reduceNodes(e,t){if("function"!=typeof e)throw new po("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new po("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let n=t;const o=this._nodes.values();let i,r;for(;i=o.next(),!0!==i.done;)r=i.value,n=e(n,r.key,r.attributes);return n}nodeEntries(){const e=this._nodes.values();return{[Symbol.iterator](){return this},next(){const t=e.next();if(t.done)return t;const n=t.value;return{value:{node:n.key,attributes:n.attributes},done:!1}}}}export(){const e=new Array(this._nodes.size);let t=0;this._nodes.forEach(((n,o)=>{e[t++]=function(e,t){const n={key:e};return ro(t.attributes)||(n.attributes=no({},t.attributes)),n}(o,n)}));const n=new Array(this._edges.size);return t=0,this._edges.forEach(((e,o)=>{n[t++]=function(e,t,n){const o={key:t,source:n.source.key,target:n.target.key};return ro(n.attributes)||(o.attributes=no({},n.attributes)),"mixed"===e&&n.undirected&&(o.undirected=!0),o}(this.type,o,e)})),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:e,edges:n}}import(e,t=!1){if(e instanceof ni)return e.forEachNode(((e,n)=>{t?this.mergeNode(e,n):this.addNode(e,n)})),e.forEachEdge(((e,n,o,i,r,a,s)=>{t?s?this.mergeUndirectedEdgeWithKey(e,o,i,n):this.mergeDirectedEdgeWithKey(e,o,i,n):s?this.addUndirectedEdgeWithKey(e,o,i,n):this.addDirectedEdgeWithKey(e,o,i,n)})),this;if(!io(e))throw new po("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(e.attributes){if(!io(e.attributes))throw new po("Graph.import: invalid attributes. Expecting a plain object.");t?this.mergeAttributes(e.attributes):this.replaceAttributes(e.attributes)}let n,o,i,r,a;if(e.nodes){if(i=e.nodes,!Array.isArray(i))throw new po("Graph.import: invalid nodes. Expecting an array.");for(n=0,o=i.length;n{const o=no({},e.attributes);e=new t.NodeDataClass(n,o),t._nodes.set(n,e)})),t}copy(e){if("string"==typeof(e=e||{}).type&&e.type!==this.type&&"mixed"!==e.type)throw new fo(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${e.type}" because this would mean losing information about the current graph.`);if("boolean"==typeof e.multi&&e.multi!==this.multi&&!0!==e.multi)throw new fo("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if("boolean"==typeof e.allowSelfLoops&&e.allowSelfLoops!==this.allowSelfLoops&&!0!==e.allowSelfLoops)throw new fo("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const t=this.emptyCopy(e),n=this._edges.values();let o,i;for(;o=n.next(),!0!==o.done;)i=o.value,Xo(t,"copy",!1,i.undirected,i.key,i.source.key,i.target.key,no({},i.attributes));return t}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const e={};this._nodes.forEach(((t,n)=>{e[n]=t.attributes}));const t={},n={};this._edges.forEach(((e,o)=>{const i=e.undirected?"--":"->";let r,a="",s=e.source.key,l=e.target.key;e.undirected&&s>l&&(r=s,s=l,l=r);const d=`(${s})${i}(${l})`;o.startsWith("geid_")?this.multi&&(void 0===n[d]?n[d]=0:n[d]++,a+=`${n[d]}. `):a+=`[${o}]: `,a+=d,t[a]=e.attributes}));const o={};for(const i in this)this.hasOwnProperty(i)&&!Qo.has(i)&&"function"!=typeof this[i]&&"symbol"!=typeof i&&(o[i]=this[i]);return o.attributes=this._attributes,o.nodes=e,o.edges=t,ao(o,"constructor",this.constructor),o}}"undefined"!=typeof Symbol&&(ni.prototype[Symbol.for("nodejs.util.inspect.custom")]=ni.prototype.inspect),[{name:e=>`${e}Edge`,generateKey:!0},{name:e=>`${e}DirectedEdge`,generateKey:!0,type:"directed"},{name:e=>`${e}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:e=>`${e}EdgeWithKey`},{name:e=>`${e}DirectedEdgeWithKey`,type:"directed"},{name:e=>`${e}UndirectedEdgeWithKey`,type:"undirected"}].forEach((e=>{["add","merge","update"].forEach((t=>{const n=e.name(t),o="add"===t?Xo:ei;e.generateKey?ni.prototype[n]=function(i,r,a){return o(this,n,!0,"undirected"===(e.type||this.type),null,i,r,a,"update"===t)}:ni.prototype[n]=function(i,r,a,s){return o(this,n,!1,"undirected"===(e.type||this.type),i,r,a,s,"update"===t)}}))})),function(e){ko.forEach((function({name:t,attacher:n}){n(e,t("Node"),wo),n(e,t("Source"),xo),n(e,t("Target"),2),n(e,t("Opposite"),So)}))}(ni),function(e){Co.forEach((function({name:t,attacher:n}){n(e,t("Edge"),"mixed"),n(e,t("DirectedEdge"),"directed"),n(e,t("UndirectedEdge"),"undirected")}))}(ni),function(e){Ro.forEach((t=>{Io(e,t),function(e,t){const{name:n,type:o,direction:i}=t,r="forEach"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[r]=function(e,t,n){if("mixed"===o||"mixed"===this.type||o===this.type){if(1===arguments.length)return Mo(!1,this,o,n=e);if(2===arguments.length){e=""+e,n=t;const a=this._nodes.get(e);if(void 0===a)throw new go(`Graph.${r}: could not find the "${e}" node in the graph.`);return Eo(!1,this.multi,"mixed"===o?this.type:o,i,a,n)}if(3===arguments.length){e=""+e,t=""+t;const a=this._nodes.get(e);if(!a)throw new go(`Graph.${r}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new go(`Graph.${r}: could not find the "${t}" target node in the graph.`);return Po(!1,o,this.multi,i,a,t,n)}throw new po(`Graph.${r}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const a="map"+n[0].toUpperCase()+n.slice(1);e.prototype[a]=function(){const e=Array.prototype.slice.call(arguments),t=e.pop();let n;if(0===e.length){let i=0;"directed"!==o&&(i+=this.undirectedSize),"undirected"!==o&&(i+=this.directedSize),n=new Array(i);let r=0;e.push(((e,o,i,a,s,l,d)=>{n[r++]=t(e,o,i,a,s,l,d)}))}else n=[],e.push(((e,o,i,r,a,s,l)=>{n.push(t(e,o,i,r,a,s,l))}));return this[r].apply(this,e),n};const s="filter"+n[0].toUpperCase()+n.slice(1);e.prototype[s]=function(){const e=Array.prototype.slice.call(arguments),t=e.pop(),n=[];return e.push(((e,o,i,r,a,s,l)=>{t(e,o,i,r,a,s,l)&&n.push(e)})),this[r].apply(this,e),n};const l="reduce"+n[0].toUpperCase()+n.slice(1);e.prototype[l]=function(){let e,t,n=Array.prototype.slice.call(arguments);if(n.length<2||n.length>4)throw new po(`Graph.${l}: invalid number of arguments (expecting 2, 3 or 4 and got ${n.length}).`);if("function"==typeof n[n.length-1]&&"function"!=typeof n[n.length-2])throw new po(`Graph.${l}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);2===n.length?(e=n[0],t=n[1],n=[]):3===n.length?(e=n[1],t=n[2],n=[n[0]]):4===n.length&&(e=n[2],t=n[3],n=[n[0],n[1]]);let o=t;return n.push(((t,n,i,r,a,s,l)=>{o=e(o,t,n,i,r,a,s,l)})),this[r].apply(this,n),o}}(e,t),function(e,t){const{name:n,type:o,direction:i}=t,r="find"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[r]=function(e,t,n){if("mixed"!==o&&"mixed"!==this.type&&o!==this.type)return!1;if(1===arguments.length)return Mo(!0,this,o,n=e);if(2===arguments.length){e=""+e,n=t;const a=this._nodes.get(e);if(void 0===a)throw new go(`Graph.${r}: could not find the "${e}" node in the graph.`);return Eo(!0,this.multi,"mixed"===o?this.type:o,i,a,n)}if(3===arguments.length){e=""+e,t=""+t;const a=this._nodes.get(e);if(!a)throw new go(`Graph.${r}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new go(`Graph.${r}: could not find the "${t}" target node in the graph.`);return Po(!0,o,this.multi,i,a,t,n)}throw new po(`Graph.${r}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const a="some"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[a]=function(){const e=Array.prototype.slice.call(arguments),t=e.pop();return e.push(((e,n,o,i,r,a,s)=>t(e,n,o,i,r,a,s))),!!this[r].apply(this,e)};const s="every"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[s]=function(){const e=Array.prototype.slice.call(arguments),t=e.pop();return e.push(((e,n,o,i,r,a,s)=>!t(e,n,o,i,r,a,s))),!this[r].apply(this,e)}}(e,t),$o(e,t)}))}(ni),function(e){zo.forEach((t=>{Uo(e,t),function(e,t){const{name:n,type:o,direction:i}=t,r="forEach"+n[0].toUpperCase()+n.slice(1,-1);e.prototype[r]=function(e,t){if("mixed"!==o&&"mixed"!==this.type&&o!==this.type)return;e=""+e;const n=this._nodes.get(e);if(void 0===n)throw new go(`Graph.${r}: could not find the "${e}" node in the graph.`);Go(!1,"mixed"===o?this.type:o,i,n,t)};const a="map"+n[0].toUpperCase()+n.slice(1);e.prototype[a]=function(e,t){const n=[];return this[r](e,((e,o)=>{n.push(t(e,o))})),n};const s="filter"+n[0].toUpperCase()+n.slice(1);e.prototype[s]=function(e,t){const n=[];return this[r](e,((e,o)=>{t(e,o)&&n.push(e)})),n};const l="reduce"+n[0].toUpperCase()+n.slice(1);e.prototype[l]=function(e,t,n){if(arguments.length<3)throw new po(`Graph.${l}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let o=n;return this[r](e,((e,n)=>{o=t(o,e,n)})),o}}(e,t),function(e,t){const{name:n,type:o,direction:i}=t,r=n[0].toUpperCase()+n.slice(1,-1),a="find"+r;e.prototype[a]=function(e,t){if("mixed"!==o&&"mixed"!==this.type&&o!==this.type)return;e=""+e;const n=this._nodes.get(e);if(void 0===n)throw new go(`Graph.${a}: could not find the "${e}" node in the graph.`);return Go(!0,"mixed"===o?this.type:o,i,n,t)};const s="some"+r;e.prototype[s]=function(e,t){return!!this[a](e,t)};const l="every"+r;e.prototype[l]=function(e,t){return!this[a](e,((e,n)=>!t(e,n)))}}(e,t),Vo(e,t)}))}(ni);class oi extends ni{constructor(e){const t=no({type:"directed"},e);if("multi"in t&&!1!==t.multi)throw new po("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("directed"!==t.type)throw new po('DirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class ii extends ni{constructor(e){const t=no({type:"undirected"},e);if("multi"in t&&!1!==t.multi)throw new po("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if("undirected"!==t.type)throw new po('UndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class ri extends ni{constructor(e){const t=no({multi:!0},e);if("multi"in t&&!0!==t.multi)throw new po("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(t)}}class ai extends ni{constructor(e){const t=no({type:"directed",multi:!0},e);if("multi"in t&&!0!==t.multi)throw new po("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("directed"!==t.type)throw new po('MultiDirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class si extends ni{constructor(e){const t=no({type:"undirected",multi:!0},e);if("multi"in t&&!0!==t.multi)throw new po("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if("undirected"!==t.type)throw new po('MultiUndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}function li(e){e.from=function(t,n){const o=no({},t.options,n),i=new e(o);return i.import(t),i}}li(ni),li(oi),li(ii),li(ri),li(ai),li(si),ni.Graph=ni,ni.DirectedGraph=oi,ni.UndirectedGraph=ii,ni.MultiGraph=ri,ni.MultiDirectedGraph=ai,ni.MultiUndirectedGraph=si,ni.InvalidArgumentsGraphError=po,ni.NotFoundGraphError=go,ni.UsageGraphError=fo;var di,ci={};var ui=function(){if(di)return ci;di=1;var e=_e();return ci.createRoot=e.createRoot,ci.hydrateRoot=e.hydrateRoot,ci}();const hi=function(e,t,n){let o=Promise.resolve();function i(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return o.then((t=>{for(const e of t||[])"rejected"===e.status&&i(e.reason);return e().catch(i)}))};var pi=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,o){return e[0]===t&&(n=o,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(t,n){var o=e(this.__entries__,t);~o?this.__entries__[o][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,o=e(n,t);~o&&n.splice(o,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,o=this.__entries__;n0},e.prototype.connect_=function(){gi&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),bi?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){gi&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;yi.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),wi=function(e,t){for(var n=0,o=Object.keys(t);n0},e}(),_i="undefined"!=typeof WeakMap?new WeakMap:new pi,Mi=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=vi.getInstance(),o=new Oi(t,n,this);_i.set(this,o)};["observe","unobserve","disconnect"].forEach((function(e){Mi.prototype[e]=function(){var t;return(t=_i.get(this))[e].apply(t,arguments)}}));var Ei=void 0!==fi.ResizeObserver?fi.ResizeObserver:Mi;window.ResizeObserver||(window.ResizeObserver=Ei);var Pi=function(){return Pi=Object.assign||function(e){for(var t,n=1,o=arguments.length;n`";if(!o){const e=new Error(i);throw e.name="ContextError",null==(n=Error.captureStackTrace)||n.call(Error,e,t),e}return o},e]}();function Di(e){return null!=e&&e.length?e[e.length-1]:void 0}function Bi(e,t,n=1,o=!0){if(0===t)return-1;let i=e+n;return-1===e&&(i=n>0?0:t-1),i=o?(i%t+t)%t:Math.max(0,Math.min(i,t-1)),i}function Gi(e,t,n=!0){const o=function(e,t,n=!0){return Bi(e,t,-1,n)}(e,t.length,n);return t[o]}function Fi(e){return Array.isArray(e)}function Ui(e){return null!==e&&"object"==typeof e&&!Fi(e)}function Vi(e){return Fi(e)?function(e){return Fi(e)&&0===e.length}(e):Ui(e)?function(e){return Ui(e)&&0===Object.keys(e).length}(e):null==e||""===e}function Wi(e){return typeof e>"u"}function Ji(e){return typeof e<"u"}function Hi(e,t){const n=g({},e);return t.forEach((e=>{delete n[e]})),n}function Ki(e,...t){return function(e){return"function"==typeof e}(e)?e(...t):e}var qi=function(e,t){for(var n,o=0,i=Me.Children.toArray(e);o{var t;return null==(t="string"==typeof e||"number"==typeof e?e:e[Object.keys(e)[0]])?void 0:t.toString()},er=(e,t)=>"string"!=typeof e||Vi(t)?e:e.toString().replace(new RegExp(function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}(t),"gi"),(e=>`${e}`)),tr=(e,t,n)=>(null==t?void 0:t.toLowerCase().indexOf(null==e?void 0:e.toLowerCase()))>=0||(null==n?void 0:n.toLowerCase().indexOf(null==e?void 0:e.toLowerCase()))>=0||Yi(e,t)>=.5||Yi(e,n)>=.5;const nr=(e,t)=>qi(e,(e=>{var n;return"AutoCompleteItem"===(null==(n=null==e?void 0:e.type)?void 0:n.displayName)&&e.props.value===(null==t?void 0:t.value)})),or=(e,t)=>qi(e,(e=>{var n;return"AutoCompleteItem"===(null==(n=null==e?void 0:e.type)?void 0:n.displayName)&&e.props.value===(null==t?void 0:t.value)})),ir=(e,t)=>{const n={},o={},{field:i}=e;return i&&Object.keys(i).forEach((e=>{if(!1===e.startsWith("--input"))n[e]=i[e];else{let t=i[e];const n=e.replace("--input-","").replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}));-1!==t.indexOf(".")&&(t=t.substring(t.indexOf(".")+1)),o[n]=t}})),g(g({},t&&g(g(g({},n),o),{},{_focusWithin:e.field._focus,pos:"relative",minH:9,py:1.5,spacing:3})),{},{cursor:"text",h:"fit-content"})};function rr(t){var o;let{prefocusFirstItem:i=!0,closeOnBlur:r=!0,creatable:a,emphasize:s,emptyState:l=!0,defaultEmptyStateProps:d={},freeSolo:c,isReadOnly:u,listAllValuesOnFocus:p,maxSuggestions:f,multiple:m,closeOnSelect:y=!m,defaultValue:b,defaultValues:v=(b?[b]:[]),onReady:w,defaultIsOpen:x,disableFilter:S,isLoading:N=!1,placement:k="bottom",restoreOnBlurIfEmpty:C=!c,shouldRenderSuggestions:R=(()=>!0),submitKeys:L=[],suggestWhenEmpty:T,value:j,values:A=(j?"string"==typeof j?[j]:[...j]:void 0)}=t;c=c||!!m||t.freeSolo;const{isOpen:O,onClose:_,onOpen:M}=z({defaultIsOpen:x}),E=Me.useMemo((()=>Ki(t.children,{isOpen:O,onClose:_,onOpen:M})),[t.children,O]),P=Me.useMemo((()=>(e=>Zi(e,(e=>{var t;return"AutoCompleteItem"===(null==(t=null==e?void 0:e.type)?void 0:t.displayName)})).map((e=>{const t=function(e,t){const n={};return["value","label","fixed","disabled"].forEach((t=>{t in e&&(n[t]=e[t])})),n}(e.props),{getValue:n=Xi}=e.props,o=n(t.value);return g(g({},Ji(t.label)?t:g(g({},t),{},{label:o})),{},{value:o,originalValue:t.value})})))(E)),[E]),I=Me.useRef(null),$=Me.useRef(null),G=Me.useRef(null),F=Me.useRef(null),[U,V]=Me.useState(!1);let W="";m?W="":Wi(v)?Wi(A)||(W=A[0]):W=v[0];const[J,H]=Me.useState(null!=W?W:""),K=Me.useMemo((()=>S?P:P.filter((e=>e.fixed||Ki(t.filter||tr,J,e.value,e.label)||U)).filter(((e,t)=>!f||(e.fixed||t[...K,...q]),[K,q]),[Z,Y]=D({defaultValue:v.map((e=>null==e?void 0:e.toString())),value:A,onChange:e=>{const n=Q.find((t=>t.value===e[0]));if(!n)return;const o=e.map((e=>Q.find((t=>t.value===e))));Ki(t.onChange,m?e:e[0],m?o:n)}});Me.useEffect((()=>{0===Q.length&&!l&&O&&_()}),[Q.length,l,O]);const[X,ee]=Me.useState(i?null==(o=P[0])?void 0:o.value:null),te=t.maxSelections||Z.length+1,ne=Q.findIndex((e=>e.value===X)),oe=function(e,t,n=!0){return t[Bi(e,t.length,1,n)]}(ne,Q,!!t.rollNavigation),ie=Gi(ne,Q,!!t.rollNavigation),re=function(e){return null==e?void 0:e[0]}(Q),ae=Di(Q),se=!Q.some((e=>e.value===X));Me.useEffect((()=>{var e;se&&ee(i?null==(e=P[0])?void 0:e.value:null)}),[se]),B((()=>{i&&ee(null==re?void 0:re.value)}),[J,null==re?void 0:re.value]),Me.useEffect((()=>{var e;!O&&i&&ee(null==(e=P[0])?void 0:e.value)}),[O]),Me.useEffect((()=>{O&&p&&V(!0)}),[O,p,V]),Me.useEffect((()=>{const e=P.find((e=>e.value===X));Ki(t.onOptionFocus,{item:e,focusMethod:F.current,isNewInput:null==e?void 0:e.creatable})}),[X,t.onOptionFocus]);const le=e=>{var n,o;const i=Q.find((t=>t.value===e)),r=(null==i?void 0:i.label)||(null==i?void 0:i.value);H((()=>m?"":null!=r?r:"")),!Z.includes(e)&&Z.lengthm?[...t,e]:[e])),m&&(null==(n=I.current)||n.focus()),t.focusInputOnSelect&&(null==(o=I.current)||o.focus()),Ki(t.onSelectOption,{item:i,selectMethod:F.current,isNewInput:null==i?void 0:i.creatable}),null!=i&&i.creatable&&Ki(t.onCreateOption,{item:Hi(i,["noFilter"]),selectMethod:F.current}),y&&_()},de=(e,n)=>{var o;Y((n=>{const o=P.find((t=>t.value===e));return o?(Ki(t.onTagRemoved,e,o,n),n.filter((t=>t!==e))):n}));const i=P.find((t=>t.value===e)),r=(null==i?void 0:i.label)||(null==i?void 0:i.value);J===r&&H(""),n&&(null==(o=I.current)||o.focus())},ce=m?Z.map((e=>{var t;return{label:(null==(t=P.find((t=>t.value===(null==e?void 0:e.toString()))))?void 0:t.label)||e,onRemove:()=>de(e)}})):[];return Me.useEffect((()=>{Ki(w,{tags:ce})}),[Z]),{autoCompleteProps:t,children:E,filteredList:Q,filteredResults:K,focusedValue:X,defaultEmptyStateProps:d,getEmptyStateProps:e=>{if(Q.every((e=>e.noFilter))&&l&&!a)return"boolean"==typeof l?e:Ki(l,{query:J})},getGroupProps:e=>{const t=((e,t)=>Ji(qi(e,(e=>{var n,o;const i=Ki((null==(n=e.props)?void 0:n.getValue)||Xi,(null==(o=e.props)?void 0:o.value)||{});return t.some((e=>e.value===i))}))))(e.children,Q);return{divider:{hasFirstChild:nr(e.children,re),hasLastChild:or(e.children,Di(Q.filter((e=>Wi(null==e?void 0:e.noFilter)))))},group:{display:t?"initial":"none"}}},getInputProps:(n,o)=>{const{onBlur:i,onChange:a,onFocus:s,onKeyDown:l,variant:d}=n,c=h(n,e);return{wrapper:g(g({ref:$,onClick:()=>{var e;null==(e=null==I?void 0:I.current)||e.focus()}},ir(o,m)),c),input:g({isReadOnly:u,onFocus:e=>{Ki(s,e),t.openOnFocus&&!u&&M(),t.selectOnFocus&&e.target.select(),p&&V(!0)},onBlur:e=>{var t,n;Ki(i,e);const o=e.relatedTarget===(null==G?void 0:G.current)||(null==(t=G.current)?void 0:t.contains(e.relatedTarget)),a=null==(n=$.current)?void 0:n.contains(e.relatedTarget);if(!o&&!a&&(r&&_(),!Z.includes(e.target.value)&&C)){const e=Di(Z),t=P.find((t=>t.value===e)),n=(null==t?void 0:t.label)||(null==t?void 0:t.value)||"";H(n)}},onChange:e=>{const t=e.target.value;Ki(a,e),H(t);const n=Vi(t);!Ki(R,t)||n&&!T?_():M(),V(!1)},onKeyDown:e=>{var t;Ki(l,e),F.current="keyboard";const{key:n}=e,o=Q[ne];return["Enter",...L].includes(n)?(!o||null!=o&&o.disabled||!O?null==(t=I.current)||t.focus():le(null==o?void 0:o.value),void e.preventDefault()):"ArrowDown"===n?(O?ee(null==oe?void 0:oe.value):M(),void e.preventDefault()):"ArrowUp"===n?(O?ee(null==ie?void 0:ie.value):M(),void e.preventDefault()):"Tab"!==n?"Home"===n?(ee(null==re?void 0:re.value),void e.preventDefault()):"End"===n?(ee(null==ae?void 0:ae.value),void e.preventDefault()):void("Escape"===n&&(_(),e.preventDefault())):void(!O||!o||null!=o&&o.disabled?_():le(null==o?void 0:o.value))},value:J,variant:m?"unstyled":d},c)}},getItemProps:(e,t)=>{var o;const{_fixed:i,_focus:r,children:a,disabled:l,label:d,value:c,fixed:u,getValue:p=Xi,onClick:f,onMouseOver:m,sx:y}=e,b=h(e,n),v=t?c:null==(o=p(c))?void 0:o.toString(),w=v===X,x=Q.findIndex((e=>e.value===v))>=0,S=a||d||v;return{item:g(g(g(g({},"string"==typeof S&&s?{dangerouslySetInnerHTML:{__html:er(S,J)}}:{children:S}),{},{"aria-selected":Z.includes(v),"aria-disabled":l,_disabled:{opacity:.4,cursor:"not-allowed",userSelect:"none"},onClick:e=>{var t;Ki(f,e),l?null==(t=I.current)||t.focus():le(v)},onMouseOver:e=>{Ki(m,e),ee(v),F.current="mouse"},sx:g(g({},y),{},{mark:g({color:"inherit",bg:"transparent"},Ui(s)?s:{fontWeight:s?"extrabold":"inherit"})})},w&&(r||{bg:"whiteAlpha.100",_light:{bg:"gray.200"}})),u&&i),b),root:{isValidSuggestion:x,value:v}}},inputRef:I,interactionRef:F,isLoading:N,isOpen:O,itemList:P,listRef:G,onClose:_,onOpen:M,placement:k,query:J,removeItem:de,resetItems:e=>{var t;Y([]),e&&(null==(t=I.current)||t.focus())},setQuery:H,tags:ce,value:j,values:Z}}const ar=S(((e,t)=>{const n=rr(e),{children:o,isOpen:i,onClose:r,onOpen:a,placement:s,resetItems:l,removeItem:d}=n;Me.useImperativeHandle(t,(()=>({resetItems:l,removeItem:d})));const{matchWidth:c=!0}=n.autoCompleteProps;return b.jsx($i,{value:n,children:b.jsx(L,{isLazy:!0,isOpen:i,autoFocus:!1,placement:s,closeOnBlur:!0,matchWidth:c,children:b.jsx(w.div,{w:"full",ref:t,children:o})})})}));ar.displayName="AutoComplete";const sr=S(((e,t)=>{const{focusedValue:n,getItemProps:i,interactionRef:r}=zi(),a=Me.useRef(),s=T(t,a),l=i(e),{isValidSuggestion:d,value:c}=l.root,u=n===c;Me.useEffect((()=>{var e;u&&"keyboard"===r.current&&(null==(e=null==a?void 0:a.current)||e.scrollIntoView({behavior:"smooth",block:"nearest"}))}),[u,r]),Me.useEffect((()=>{"string"!=typeof c&&console.warn("wow"),"string"!=typeof c&&Wi(e.getValue)&&console.error("You must define the `getValue` prop, when an Item's value is not a string")}),[]);const p=l.item,{children:f,dangerouslySetInnerHTML:m}=p,y=Hi(h(p,o),["groupId"]);return d?b.jsx(j,g(g(g({ref:s},lr),y),{},{children:f||b.jsx("span",{dangerouslySetInnerHTML:m})})):null}));sr.displayName="AutoCompleteItem";const lr={mx:"2",px:"2",py:"2",rounded:"md",cursor:"pointer"},dr=S(((e,t)=>{const{children:n,showDivider:o}=e,r=Hi(h(e,i),["groupSibling"]),{getGroupProps:a}=zi(),{group:s}=a(e),l=hr(e);return b.jsxs(A,g(g(g({ref:t},s),r),{},{children:[b.jsx(O,g({},l.top)),n,b.jsx(O,g({},l.bottom))]}))})),cr=S(((e,t)=>b.jsx(j,g(g(g({},ur),e),{},{ref:t}))));dr.displayName="AutoCompleteGroup",cr.displayName="AutoCompleteGroupTitle";const ur={ml:5,my:1,fontSize:"xs",letterSpacing:"wider",fontWeight:"extrabold",textTransform:"uppercase"},hr=e=>{const{getGroupProps:t}=zi(),n=e.groupSibling,{divider:{hasFirstChild:o,hasLastChild:i}}=t(e),r={my:2,borderColor:e.dividerColor};return{top:g(g({},r),{},{mb:4,display:!e.showDivider||o?"none":""}),bottom:g(g({},r),{},{display:!e.showDivider||i||n?"none":""})}},pr=S(((e,t)=>{const{isLoading:n}=zi(),{loadingIcon:o}=e,i=h(e,r);return b.jsxs(G,{children:[b.jsx(F,g(g({},i),{},{ref:t})),n&&b.jsx(U,{children:o||b.jsx($,{})})]})})),gr=S(((e,t)=>{const{autoCompleteProps:n,inputRef:o,getInputProps:i,tags:r,setQuery:l,value:d,itemList:c}=zi(),{children:u,isInvalid:p,hidePlaceholder:f}=e,m=h(e,a),{value:y}=m;Me.useEffect((()=>{if(void 0!==d&&("string"==typeof d||d instanceof String)){const e=c.find((e=>e.value===d)),t=void 0===e?d:e.label;l(t)}}),[d]),Me.useEffect((()=>{void 0!==y&&("string"==typeof y||y instanceof String)&&l(y)}),[y]);const v=_("Input",e);let{wrapper:w,input:x}=i(m,v);const{ref:S}=w,k=h(w,s),C=T(t,o),R=Ki(u,{tags:r});f&&(x=g(g({},x),{},{placeholder:Array.isArray(R)&&R.length?void 0:x.placeholder}));const L=b.jsx(pr,g(g({isInvalid:p},x),{},{ref:C})),j=b.jsxs(M,g(g({"aria-invalid":p},k),{},{ref:S,children:[R,b.jsx(N,g(g({as:pr},x),{},{ref:C}))]}));return b.jsx(E,{children:n.multiple?j:L})}));gr.displayName="Input",gr.id="Input";const fr=e=>{const{getEmptyStateProps:t,defaultEmptyStateProps:n}=zi(),o=t(b.jsx(j,g(g(g({},mr),n),{},{children:"No options found!"})));return b.jsx(A,g(g({},e),{},{children:o}))},mr={fontSize:"sm",align:"center",justify:"center",fontWeight:"bold",fontStyle:"italic"},yr=["AutoCompleteGroup","AutoCompleteItem","AutoCompleteCreatable"],br=S(((e,t)=>{const{children:n,loadingState:o}=e,i=h(e,l),{listRef:r,isLoading:a}=zi(),s=T(t,r),[d,c]=(e=>{const t=Ee.Children.map(e,((t,n)=>{var o;if("AutoCompleteGroup"===(null==(o=null==t?void 0:t.type)?void 0:o.displayName)){const o=Ee.Children.toArray(e)[n+1];return Ee.cloneElement(t,{groupSibling:!!o&&"AutoCompleteGroup"===o.type.displayName})}return t})),n=Ee.Children.toArray(t).filter((e=>{var t;return!yr.includes(null==(t=null==e?void 0:e.type)?void 0:t.displayName)}));return[Ee.Children.toArray(t).filter((e=>{var t;return yr.includes(null==(t=null==e?void 0:e.type)?void 0:t.displayName)})),n]})(n);return b.jsxs(P,g(g(g({ref:s,w:"inherit"},vr),i),{},{children:[a&&b.jsx(I,{children:o||b.jsx($,{size:"md"})}),!a&&b.jsxs(b.Fragment,{children:[d,b.jsx(fr,{}),c]})]}))}));br.displayName="AutoCompleteList";const vr={py:"4",opacity:"0",bg:"#232934",rounded:"md",maxH:"350px",border:"none",shadow:"base",zIndex:"popover",overflowY:"auto",_light:{bg:"#ffffff"},_focus:{boxShadow:"none"}};Me.memo((e=>{const{label:t,onRemove:n,disabled:o}=e,i=h(e,d);return b.jsx(N,{children:b.jsxs(k,g(g(g({borderRadius:"md",fontWeight:"normal"},o&&wr),i),{},{children:[b.jsx(C,{children:t}),b.jsx(R,g({onClick:()=>!o&&Ki(n),cursor:"pointer"},o&&wr))]}))})}));const wr={cursor:"text",userSelect:"none",opacity:.4,_focus:{boxShadow:"none"}};var xr=function(){return xr=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0)&&!(o=r.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a},Cr=function(e,t,n){if(n||2===arguments.length)for(var o,i=0,r=t.length;i0)&&!(o=r.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a},Or=p("b1",Me.forwardRef((function(e,t){var n=e.validator,o=e.onDebouncedChange,i=e.delay,r=e.optionList,a=e.defaultValue;e.onChange;var s=jr(e,["validator","onDebouncedChange","delay","optionList","defaultValue","onChange"]),l=Me.useRef(null),d=T(l,t),c=Me.useRef("datalist-"+(new Date).valueOf()),u=Ar(Me.useState(!1),2),h=u[0],p=u[1],g=Me.useRef();Me.useEffect((function(){l.current&&(l.current.value=(null==a?void 0:a.toString())||"")}),[a]);return b.jsxs(b.Fragment,{children:[b.jsx(F,Tr({ref:d,list:c.current,variant:"flushed",size:"sm",h:6,onChange:function(e){var t=e.target.value;window.clearTimeout(g.current),n&&p(!n(t)),g.current=window.setTimeout((function(){null==o||o(t),g.current=void 0}),null!=i?i:500)},onBlur:function(e){var t=e.target.value;void 0!==g.current&&(window.clearTimeout(g.current),n&&p(!n(t)),null==o||o(t),g.current=void 0)},isInvalid:h},s)),r&&b.jsx("datalist",{id:c.current,children:null==r?void 0:r.map((function(e,t){return b.jsx("option",{children:e},t)}))})]})}))),_r=function(){return _r=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0)&&!(o=r.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a},Ir=function(e){switch(e){case tt.DEV:return"red";case tt.UAT:return"orange";case tt.PRD:return"green"}};var $r=function(e,t,n){var o=new Blob([n],{type:t});zr(e,o)},zr=function(e,t){var n=window.URL.createObjectURL(t),o=document.createElement("a");o.href=n,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(n)},Dr=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,i,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a};function Br(e){var t=e.cancelRef,n=e.isOpen,o=e.onClose,i=Dr(Me.useState(!1),2),r=i[0],a=i[1];return b.jsxs(X,{leastDestructiveRef:t,isOpen:n,onClose:o,children:[b.jsx(ee,{}),b.jsxs(te,{children:[b.jsx(ne,{children:"Warning 警告"}),b.jsx(oe,{}),b.jsxs(ie,{sx:{"& p":{my:1}},children:[b.jsx(re,{children:"Are you sure you want to reset the app? The webpage local storage for this app will be cleared. A copy of the local storage will be downloaded and it may be used for restoration (varies with app)."}),b.jsx(re,{children:"確定重設該應用程式嗎?應用程式的網頁本地儲存將會被清除。本地儲存的副本可供下載及用於復原(因應用程式而異)。"}),b.jsx(re,{children:"确定重置本应用程序吗?应用程序的网页本地存储将会被清除。本地存储的拷贝可供下载以及用于还原(因应用程序而異)。"})]}),b.jsxs(ae,{children:[b.jsx(W,{ref:t,onClick:o,children:"Cancel"}),b.jsx(W,{isLoading:r,colorScheme:"red",ml:3,onClick:function(){a(!0);var e=Zn.storage.getAll(),t=Zn.getAppName(),n="".concat(t,"_BACKUP_").concat((new Date).toISOString(),".json");$r(n,"application/json",JSON.stringify(e)),Zn.storage.clear(),setTimeout((function(){window.location.reload()}),2e3)},children:"Confirm and reload"})]})]})]})}var Gr=function(){return Gr=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0)&&!(o=r.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a};function Vr(e){var t=e.error,n=e.errorInfo,o=e.allowReset,i=e.sx,r=Fr(e,["error","errorInfo","allowReset","sx"]),a=m("RmgErrorBoundary"),s=se("primary.500","primary.300"),l=Ur(Me.useState(!1),2),d=l[0],c=l[1],u=Me.useRef(null),h=function(e){return b.jsx(le,{color:s,role:"button",onClick:function(){return c(!0)},children:e})},p=Zn.getAppName(),g=b.jsx(le,{color:s,href:"https://github.com/railmapgen/".concat("rmg-home"===p?"railmapgen.github.io":p,"/issues"),isExternal:!0,children:"GitHub Issue"});return b.jsxs(de,Gr({status:"error",sx:Gr(Gr({},a),i)},r,{children:[b.jsx(ce,{}),b.jsx(ue,{children:"Something went wrong!"}),b.jsxs(he,{children:[b.jsxs(re,{children:["Please try to refresh or re-import your configuration files. If the issue still persists, please consider upgrading your browser",o?b.jsxs(b.Fragment,{children:[" or ",h("reset this app")]}):"",". Should you need any help, please contact us by submitting an issue in ",g," with the details shown below."]}),b.jsxs(re,{children:["請嘗試重新整理或重新上載設定檔。如果問題仍然存在,請考慮更新你的瀏覽器",o?b.jsxs(b.Fragment,{children:["或",h("重設該應用程式")]}):"","。如需協助或與我們聯絡,請前往 ",g," 提交一個 Issue 並附以詳細資料。"]}),b.jsxs(re,{children:["请尝试刷新或者重新上传配置文件。如果问题仍然存在,请考虑更新您的浏览器",o?b.jsxs(b.Fragment,{children:["或者",h("重置本应用程序")]}):"","。如需帮助或者联系我们,请前往 ",g," 提交一个 Issue 并附上详细信息。"]}),b.jsxs(re,{as:"details",children:[null==t?void 0:t.toString(),b.jsx("br",{}),null==n?void 0:n.componentStack]}),o&&b.jsx(Br,{cancelRef:u,isOpen:d,onClose:function(){return c(!1)}})]})]}))}var Wr,Jr=(Wr=function(e,t){return Wr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Wr(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Wr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Hr=function(){return Hr=Object.assign||function(e){for(var t,n=1,o=arguments.length;n0)&&!(o=r.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a};function na(e){var t=e.defaultValue,n=e.options,o=e.disabledOptions,i=ea(e,["defaultValue","options","disabledOptions"]),r=Me.useRef(null);Me.useEffect((function(){r.current&&(r.current.value=(null==t?void 0:t.toString())||"")}),[t]);var a=function(e,t){return b.jsx("option",{value:e,disabled:void 0!==(null==o?void 0:o.find((function(t){return t.toString()===e}))),children:t},e)};return b.jsx(ye,Xr({ref:r,variant:"flushed",size:"sm",h:6},i,{children:Object.entries(n).map((function(e){var t=ta(e,2),n=t[0],o=t[1];return"object"==typeof o?b.jsx("optgroup",{label:n,children:Object.entries(o).map((function(e){var t=ta(e,2),n=t[0],o=t[1];return a(n,o)}))},n):a(n,o)}))}))}var oa=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,i,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a},ia=(p("u",(function(e,t,n){var o=oa(Me.useState(t()),2),i=o[0],r=o[1];return Me.useEffect((function(){e.then((function(){console.debug("[rmg-components] Getter updates finished"),r(t())}))}),[]),i})),function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,i,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}),ra=function(e,t,n){if(n||2===arguments.length)for(var o,i=0,r=t.length;i0)&&!(o=r.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a};function la(e){var t=e.defaultValue,n=e.min,o=e.max,i=e.step,r=e.onThrottledChange,a=e.leftIcon,s=e.rightIcon,l=m("RmgThrottledSlider"),d=sa(Me.useState(null!=t?t:0),2),c=d[0],u=d[1];Me.useEffect((function(){void 0!==t&&c!==t&&u(t)}),[t]);var h=aa(null!=r?r:function(){},500);return b.jsxs(j,{sx:l,children:[a&&b.jsx(be,{size:"xs",variant:"ghost","aria-label":"Drag left",icon:a,onClick:function(){var e=Math.max(c-10*(null!=i?i:1),null!=n?n:0);null==r||r(e),u(e)}}),b.jsxs(ve,{value:c,min:n,max:o,step:i,onChange:function(e){h(e),u(e)},children:[b.jsx(we,{children:b.jsx(xe,{})}),b.jsx(Se,{})]}),s&&b.jsx(be,{size:"xs",variant:"ghost","aria-label":"Drag right",icon:s,onClick:function(){var e=Math.min(c+10*(null!=i?i:1),null!=o?o:100);null==r||r(e),u(e)}})]})}var da=function(e){var t=e.children,n=e.noWrap,o=m("RmgOutput",{noWrap:n});return b.jsx(w.output,{sx:o,children:t})};function ca(e){var t=e.fields,n=e.noLabel,o=e.minW;return b.jsx(j,{wrap:"wrap",children:t.map((function(e,t){if(e.hidden)return b.jsx(Me.Fragment,{},t);var i=e.minW||o,r="full"===i;return b.jsx(Yr,{className:r?"mw-full":"",label:e.label,flex:r?void 0:1,minW:r?void 0:i,noLabel:n,oneLine:e.oneLine,helper:e.helper,errorMessage:e.errorMessage,children:function(e){switch(e.type){case"input":return b.jsx(Or,{placeholder:e.placeholder,defaultValue:e.value,type:e.variant,validator:e.validator,onDebouncedChange:e.onChange,delay:e.debouncedDelay,optionList:e.optionList,isDisabled:e.isDisabled});case"output":return b.jsx(da,{noWrap:e.noWrap,children:e.value});case"textarea":return b.jsx(Er,{placeholder:e.placeholder,defaultValue:e.value,onDebouncedChange:e.onChange,isDisabled:e.isDisabled});case"slider":return b.jsx(la,{defaultValue:e.value,min:e.min,max:e.max,step:e.step,onThrottledChange:e.onChange,leftIcon:e.leftIcon,rightIcon:e.rightIcon,isDisabled:e.isDisabled});case"select":return b.jsx(na,{defaultValue:e.value,onChange:function(t){var n,o=t.target.value;return null===(n=e.onChange)||void 0===n?void 0:n.call(e,"number"==typeof e.value?Number(o):o.toString())},options:e.options,disabledOptions:e.disabledOptions,isInvalid:e.isInvalid,isDisabled:e.isDisabled});case"switch":return b.jsx(Ne,{isChecked:e.isChecked,isDisabled:e.isDisabled,onChange:function(t){var n,o=t.target.checked;return null===(n=e.onChange)||void 0===n?void 0:n.call(e,o)}});case"custom":return e.component;default:return b.jsx("div",{})}}(e)},t)}))})}var ua=function(){return ua=Object.assign||function(e){for(var t,n=1,o=arguments.length;n span:last-of-type":{position:"absolute",right:8}},"& .rmg-multi-select__icon-wrapper":{display:"inline-flex",justifyContent:"center",w:6,h:"100%",position:"absolute",right:2,top:0,fontSize:"xl","& svg":{h:"1em",w:"1em"}},"& .chakra-popover__content":{w:"unset",minW:200},"& .chakra-popover__body":{p:0,"li label":{p:2,w:"100%",_hover:{bg:"dark"===n?"whiteAlpha.200":"gray.100"},_active:{bg:"dark"===n?"whiteAlpha.300":"gray.200"}}}}}},Na=function(){return Na=Object.assign||function(e){for(var t,n=1,o=arguments.length;n button:first-of-type":{ml:1}}},RmgLoader:{baseStyle:{w:"100%",h:"100%",position:"absolute",top:0,right:0,alignItems:"center",justifyContent:"center","& .rmg-loader__backdrop":{position:"absolute",w:"100%",h:"100%",zIndex:1500,bg:"blackAlpha.400"},"& .chakra-progress":{zIndex:2e3}}},RmgMultiSelect:Sa,RmgOutput:{baseStyle:function(e){var t=e.noWrap;return Na({minH:6,fontSize:"sm"},t?ka:{textWrap:"pretty"})}},RmgPage:{baseStyle:{position:"relative",flexDirection:"column",flex:1,overflow:"hidden",background:"inherit"}},RmgPageHeader:{baseStyle:{alignItems:"center",flexWrap:"wrap",pl:2,pr:3,py:1,zIndex:10}},RmgSection:{baseStyle:{position:"relative",background:"inherit"}},RmgSectionHeader:{baseStyle:{display:"flex",alignItems:"center",flexWrap:"wrap",position:"sticky",top:0,background:"inherit",px:2,py:1,zIndex:5}},RmgSidePanel:{baseStyle:function(e){var t=e.colorMode,n=e.width,o=e.alwaysOverlay;return{height:"100%",position:o?"absolute":{base:"absolute",lg:"relative"},right:o?0:{base:0,lg:"unset"},background:"light"===t?"white":"gray.800",boxShadow:"lg",flexShrink:0,flexDirection:"column",transition:"0.3s ease-in-out",maxW:0,visibility:"hidden",zIndex:5,"&.show-side-panel":{maxW:{base:"100%",sm:n},w:{base:"100%",sm:"unset"},visibility:"initial"},"& .rmg-side-panel__inner":{flexDirection:"column",h:"100%",w:{base:"100vw",sm:n}},"& .rmg-side-panel__header":{flexShrink:0,pl:3,pr:1,py:0,"& button":{ml:"auto"}},"& .rmg-side-panel__body":{display:"flex",flexDirection:"column",flex:1,overflowY:"auto",p:1},"& .rmg-side-panel__footer":{display:"flex",justifyContent:"flex-end",p:1}}}},RmgThrottledSlider:{baseStyle:{h:6,alignItems:"center","& .chakra-button:first-of-type":{mr:1},"& .chakra-button:last-of-type":{ml:1}}},RmgWindow:{baseStyle:{position:"relative",flexDirection:"column",height:"100%",overflow:"hidden",background:"inherit"}},RmgWindowHeader:{baseStyle:{px:2,alignItems:"center",zIndex:15,minH:10,transition:"0.3s ease-in-out"}}},Ra=function(){return Ra=Object.assign||function(e){for(var t,n=1,o=arguments.length;n(e.RailMap="railmap",e.Platform="platform",e))(_a||{})),Ma=p("aV",(e=>(e.Metro="metro",e.NationalRail="nationalrail",e.LightRail="lightrail",e.Footpath="footpath",e))(Ma||{})),Ea=p("E",(e=>(e.APP_LOAD="APP_LOAD",e.ADD_STATION="ADD_STATION",e.ADD_LINE="ADD_LINE",e.IMPORT_RMG_PARAM="IMPORT_RMG_PARAM",e.IMPORT_WORK_FROM_GALLERY="IMPORT_WORK_FROM_GALLERY",e.DOWNLOAD_PARAM="DOWNLOAD_PARAM",e.DOWNLOAD_IMAGES="DOWNLOAD_IMAGES",e.LOAD_TUTORIAL="LOAD_TUTORIAL",e))(Ea||{})),Pa=p("K",(e=>(e.LOGIN_STATE="rmp__login_state",e.APP="rmp__app",e.PARAM="rmp__param",e.PARAM_BACKUP="rmp__param__backup",e.DO_NOT_SHOW_RMT_MSG="rmp__doNotShowRMTMsg",e.ACCOUNT="rmg-home__account",e))(Pa||{})),Ia=p("C",(e=>(e.Other="other",e.Beijing="beijing",e.Berlin="berlin",e.Chongqing="chongqing",e.Foshan="foshan",e.Guangzhou="guangzhou",e.Hongkong="hongkong",e.Kunming="kunming",e.London="london",e.Qingdao="qingdao",e.Shanghai="shanghai",e.Shenzhen="shenzhen",e.Singapore="singapore",e.Suzhou="suzhou",e.Tokyo="tokyo",e))(Ia||{})),$a=p("a3",(e=>(e.Shmetro="shmetro",e.Bjsubway="bjsubway",e))($a||{}));p("aq","https://railmapgen.org/v1/randomStationNames");const za={RMP_CLOUD:!1,RMP_EXPORT:!1},Da=Pe({name:"account",initialState:{state:"logged-out",activeSubscriptions:za,token:void 0},reducers:{setState:(e,t)=>{e.state=t.payload},setActiveSubscriptions:(e,t)=>{e.activeSubscriptions=t.payload},setToken:(e,t)=>{e.token=t.payload}}}),{setState:Ba,setActiveSubscriptions:Ga,setToken:Fa}=Da.actions,Ua=Da.reducer;var Va;p("M",Va),function(e){e.black="#000",e.white="#fff"}(Va||p("M",Va={}));var Wa=function(e,t,n,o){return new(n||(n=Promise))((function(i,r){function a(e){try{l(o.next(e))}catch(Sc){r(Sc)}}function s(e){try{l(o.throw(e))}catch(Sc){r(Sc)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((o=o.apply(e,t||[])).next())}))};let Ja={};const Ha=(e,t)=>Wa(void 0,void 0,void 0,(function*(){return yield((e,t)=>Wa(void 0,void 0,void 0,(function*(){if(e in Ja)return Ja[e];const n=yield fetch(e,t),o=yield n.json();return Ja[e]=o,o})))(`/rmg-palette/resources/palettes/${e}.json`,{signal:t})}));var Ka=function(e,t,n,o){return new(n||(n=Promise))((function(i,r){function a(e){try{l(o.next(e))}catch(Sc){r(Sc)}}function s(e){try{l(o.throw(e))}catch(Sc){r(Sc)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((o=o.apply(e,t||[])).next())}))};p("Y",((e,t,n)=>Ka(void 0,void 0,void 0,(function*(){const[t,n]=e;if("other"===t)return e;try{const o=(yield Ha(t)).find((e=>e.id===n));return o?[t,n,o.colour,o.fg||Va.white]:(console.warn(`[rmg-palette] updateTheme(${t}, ${n}), line does not exist, returning old theme`),e)}catch(Sc){throw console.error(`[rmg-palette] updateTheme(${t}, ${n}), unexpected error occurs`,Sc),Sc}})))),p("aw",(e=>{const t=e.currentTarget.getBoundingClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}})),p("U",((e,t,n,o)=>({x:e*n/100+o.x,y:t*n/100+o.y}))),p("aA",((e,t)=>Math.round(e/t)*t)),p("e",(e=>{let[t,n,o,i]=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MIN_VALUE,Number.MIN_VALUE];return e.forEachNode(((e,r)=>{const a=document.getElementById(e);if(a){const e=qa(a);t=Math.min(e.x,t),n=Math.min(e.y,n),o=Math.max(e.x+e.width,o),i=Math.max(e.y+e.height,i)}})),t-=50,n-=50,o+=100,i+=100,{xMin:t,yMin:n,xMax:o,yMax:i}})),p("p",(e=>{var t,n;return{width:(null!==(t=e.width)&&void 0!==t?t:720)-40,height:(null!==(n=e.height)&&void 0!==n?n:1280)-40}}));const qa=e=>{const t=e.getBBox(),n=e.ownerSVGElement,o=e.parentNode.getScreenCTM().inverse().multiply(e.getScreenCTM()),i=[n.createSVGPoint(),n.createSVGPoint(),n.createSVGPoint(),n.createSVGPoint()];i[0].x=t.x,i[0].y=t.y,i[1].x=t.x+t.width,i[1].y=t.y,i[2].x=t.x+t.width,i[2].y=t.y+t.height,i[3].x=t.x,i[3].y=t.y+t.height;let[r,a,s,l]=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MIN_VALUE,Number.MIN_VALUE];return i.forEach((e=>{e=e.matrixTransform(o),r=Math.min(r,e.x),s=Math.max(s,e.x),a=Math.min(a,e.y),l=Math.max(l,e.y)})),t.x=r,t.width=s-r,t.y=a,t.height=l-a,t},Qa=(p("a9",navigator.platform.startsWith("Mac")),async(e,t="SHA-256")=>{const n=(new TextEncoder).encode(e),o=await crypto.subtle.digest(t,n);return Array.from(new Uint8Array(o)).map((e=>e.toString(16).padStart(2,"0"))).join("")});p("b3",(()=>`#${Math.floor(16777215*Math.random()).toString(16).padStart(6,"0")}`)),p("b4",(e=>(299*parseInt(e.slice(1,3),16)+587*parseInt(e.slice(3,5),16)+114*parseInt(e.slice(5,7),16))/1e3>=128?Va.black:Va.white));var Za=p("J",(e=>(e.SAVE_CHANGED="SAVE_CHANGED",e.TOKEN_REQUEST="TOKEN_REQUEST",e))(Za||{}));const Ya=p("B",new BroadcastChannel("rmt-save-manager"));let Xa,es;const ts=p("_",(async()=>{Yn.debug("Requesting token from RMT"),Ya.postMessage({type:"TOKEN_REQUEST",from:"rmp"})})),ns=e=>{const t=t=>{if(!t)return Yn.debug("Account string is empty, logging out"),e.dispatch(Fa(void 0)),e.dispatch(Ba("logged-out")),void e.dispatch(Ga(za));const n=JSON.parse(t),{token:o}=n;(async(e,t)=>{Yn.debug(`Updating token to: ${t}`),e.dispatch(Fa(t))})(e,o),(async(e,t)=>{const n=await fetch("https://railmapgen.org/v1/subscription",{headers:{accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${t}`}});if(200!==n.status)return Yn.debug("Token is invalid, expiring the login state"),e.dispatch(Ba("expired")),void e.dispatch(Ga(za));e.dispatch(Ba("free"));const o=(await n.json()).subscriptions,i=structuredClone(za);for(const r of o){const t=r.type;t in i&&(e.dispatch(Ba("subscriber")),i[t]=!0)}e.dispatch(Ga(i)),Yn.debug(`Token is valid, setting active subscriptions: ${JSON.stringify(i)}`)})(e,o)};let n=localStorage.getItem(Pa.ACCOUNT);t(null!=n?n:void 0),window.onstorage=()=>{const e=localStorage.getItem(Pa.ACCOUNT);n!==e&&(n=e,Yn.debug(`Account string changed to: ${e}`),t(null!=e?e:void 0))}};let os=p("n",((e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t}));var is=p("k",(e=>(e.Diagonal="diagonal",e.Perpendicular="perpendicular",e.RotatePerpendicular="ro-perp",e.Simple="simple",e))(is||{})),rs=p("l",(e=>(e.SingleColor="single-color",e.ShanghaiSuburbanRailway="sh-sub-rwy",e.ShmetroVirtualInt="shmetro-virtual-int",e.GzmtrVirtualInt="gzmtr-virtual-int",e.GZMTRLoop="gzmtr-loop",e.ChinaRailway="china-railway",e.BjsubwaySingleColor="bjsubway-single-color",e.BjsubwayTram="bjsubway-tram",e.BjsubwayDotted="bjsubway-dotted",e.DualColor="dual-color",e.River="river",e.MTRRaceDays="mtr-race-days",e.MTRLightRail="mtr-light-rail",e.MTRUnpaidArea="mtr-unpaid-area",e.MTRPaidArea="mtr-paid-area",e.MRTUnderConstruction="mrt-under-constr",e.MRTSentosaExpress="mrt-sentosa-express",e.JREastSingleColor="jr-east-single-color",e.JREastSingleColorPattern="jr-east-single-color-pattern",e.LRTSingleColor="lrt-single-color",e.LondonTubeTerminal="london-tube-terminal",e.LondonTubeInternalInt="london-tube-internal-int",e.LondonTube10MinWalk="london-tube-10-min-walk",e.LondonRail="london-rail",e.LondonSandwich="london-sandwich",e.LondonLutonAirportDART="london-DART",e.LondonIFSCloudCableCar="london-dangleway",e.GuangdongIntercityRailway="gd-intercity-rwy",e))(rs||{}));p("L",["single-color","bjsubway-single-color","bjsubway-tram","bjsubway-dotted","china-railway","mtr-race-days","mtr-light-rail","mrt-under-constr","jr-east-single-color","jr-east-single-color-pattern","lrt-single-color","london-sandwich","london-DART","london-dangleway"]);const as={offset:0},ss={generatePath:(e,t,n,o,i=as)=>{const{offset:r=as.offset}=i,a=Math.abs((o-n)/(t-e));if(a===1/0)return`M ${e+r} ${n} L ${t+r} ${o}`;if(0===a)return`M ${e} ${n+r} L ${t} ${o+r}`;{const i=1/a,s=r/Math.sqrt(i*i+1),l=s*i*-Math.sign((t-e)*(o-n));return`M ${e+s} ${n+l} L ${t+s} ${o+l}`}},icon:b.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:b.jsx("path",{d:"M6,18L18,6",stroke:"currentColor",fill:"none"})}),defaultAttrs:as,attrsComponent:e=>{var t;const{id:n,attrs:o,handleAttrsUpdate:i}=e,{t:r}=Ie(),a=[{type:"input",label:r("panel.details.lines.simple.offset"),value:(null!==(t=o.offset)&&void 0!==t?t:as.offset).toString(),variant:"number",onChange:e=>{o.offset=Number(e),i(n,o)},minW:"full"}];return b.jsx(ca,{fields:a})},metadata:{displayName:"panel.details.lines.simple.displayName"}},ls=(p("aT",{translateX:0,translateY:0,scale:1,rotate:0}),p("aD",3));var ds=p("aB",(e=>(e.Virtual="virtual",e.ShmetroNumLineBadge="shmetro-num-line-badge",e.ShmetroTextLineBadge="shmetro-text-line-badge",e.GzmtrLineBadge="gzmtr-line-badge",e.BjsubwayNumLineBadge="bjsubway-num-line-badge",e.BjsubwayTextLineBadge="bjsubway-text-line-badge",e.SuzhouRTNumLineBadge="suzhourt-num-line-badge",e.BerlinSBahnLineBadge="berlin-s-bahn-line-badge",e.BerlinUBahnLineBadge="berlin-u-bahn-line-badge",e.ChongqingRTNumLineBadge="chongqingrt-num-line-badge",e.ChongqingRTTextLineBadge="chongqingrt-text-line-badge",e.ShenzhenMetroNumLineBadge="shenzhen-metro-num-line-badge",e.MRTDestinationNumbers="mrt-num-line-badge",e.JREastLineBadge="jr-east-line-badge",e.QingdaoMetroNumLineBadge="qingdao-metro-num-line-badge",e.MRTLineBadge="mrt-line-badge",e.GuangdongIntercityRailwayLineBadge="gd-intercity-rwy-line-badge",e.LondonArrow="london-arrow",e.Facilities="facilities",e.Text="text",e.I18nText="i18n-text",e.Master="master",e))(ds||{}));var cs={en:{},"zh-Hans":{Action:"操作",Apps:"应用程序","Back to list":"返回列表","Background colour":"背景色",Black:"黑",Cancel:"取消",City:"城市",Components:"组件","Configuration file":"配置文件",Confirm:"确定",Continue:"继续","Country/Region":"国家/地区",Copy:"复制",Edit:"编辑","Foreground colour":"前景色","Go back":"返回",Language:"语言/Language",Justification:"理由",Name:"名称",Next:"下一步",Open:"打开",Palette:"调色板","Please select...":"请选择...",Previous:"上一步","Rail Map Generator":"铁路线路图生成器","Rail Map Painter":"地铁线路图绘制器","Rail Map Toolkit":"线路图工具包",Remove:"删除",Reset:"重置","RMG Templates":"RMG 模板","RMP Gallery":"RMP 画廊","RMP Designer":"RMP 设计师","Seed Project":"种子项目",Settings:"设置",Submit:"提交",Translate:"翻译",Upload:"上传",White:"白"},"zh-Hant":{Action:"動作",Apps:"應用程式","Back to list":"返回列表","Background colour":"背景色",Black:"黑",Cancel:"取消",City:"城市",Components:"元件","Configuration file":"設定檔",Confirm:"確定",Continue:"繼續",Copy:"複製","Country/Region":"國家/地區",Edit:"編輯","Foreground colour":"前景色","Go back":"返回",Language:"語言/Language",Justification:"理由",Name:"名稱",Next:"下一步",Open:"開啟",Palette:"調色盤","Please select...":"請選擇...",Previous:"上一步","Rail Map Generator":"鐵路路綫圖產生器","Rail Map Painter":"地鐵路綫圖繪製器","Rail Map Toolkit":"路綫圖工具組",Remove:"移除",Reset:"重設","RMG Templates":"RMG 範本","RMP Gallery":"RMP 畫廊","RMP Designer":"RMP 設計師","Seed Project":"種子項目",Settings:"設定",Submit:"提交",Translate:"翻譯",Upload:"上載",White:"白"},ja:{Language:"言語/Language",Palette:"調色板","Rail Map Generator":"鉄道路線図ジェネレータ","Rail Map Painter":"鉄道路線図画家","Rail Map Toolkit":"路線図ツールキット",Remove:"削除","RMG Templates":"RMG テンプレート","RMP Gallery":"RMP 画廊","RMP Designer":"RMP 図案家"},ko:{Action:"조작",Apps:"앱","Back to list":"다시 목록으로","Background colour":"배경색",Black:"블랙",Cancel:"취소",City:"도시",Components:"요소","Configuration file":"환경 설정 파일",Confirm:"확인",Copy:"복사","Country/Region":"국가/지역",Edit:"편집","Foreground colour":"전경색","Go back":"되돌아가",Language:"언어/Language",Justification:"이유",Name:"명칭",Next:"다음",Open:"열기",Palette:"팔레트","Please select...":"선택해주세요",Previous:"나아가","Rail Map Generator":"철도 노선도 생성기","Rail Map Painter":"지하철 노선도 그리기","Rail Map Toolkit":"노선도 툴킷",Remove:"삭제",Reset:"리셋","RMG Templates":"RMG 템플릿","RMP Gallery":"RMP 갤러리","RMP Designer":"RMP 디자이너","Seed Project":"종자 프로젝트",Settings:"설치",Submit:"제출",Translate:"번역",Upload:"업로드",White:"화이트"}};const us={color:"Color",warning:"Warning",cancel:"Cancel",apply:"Apply",remove:"Remove",close:"Close",noShowAgain:"Don't show me again",rmtPromotion:"The all-in-one toolkit you definitely do not want to miss!",panel:JSON.parse('{"tools":{"showLess":"Show less","section":{"lineDrawing":"Line drawing","stations":"Stations","miscellaneousNodes":"Miscellaneous nodes"},"select":"Select","learnHowToAdd":{"station":"Learn how to add your stations!","misc-node":"Learn how to add your nodes!","line":"Learn how to add your line styles!"}},"details":{"header":"Details","info":{"title":"Basic information","id":"ID","zIndex":"Depth","stationType":"Station Type","linePathType":"Line Path Type","lineStyleType":"Line Style Type","type":"Type","parallel":"Parallel line","parallelIndex":"Parallel index"},"multipleSelection":{"title":"Multiple Selection","change":"Change selected attributes","selected":"Selected Objects:","show":"Show","station":"Stations","miscNode":"MiscNodes","edge":"Lines"},"changeStationTypeContent":"Changing station\'s type will remove all attributes from the station except its names.","changeLineTypeContent":"Changing line\'s type will remove all attributes from the line.","changeType":"Change Type","nodePosition":{"title":"Node Position","pos":{"x":"Coordinate X","y":"Coordinate Y"}},"lineExtremities":{"title":"Line Extremities","source":"Source","target":"Target","sourceName":"Source Name","targetName":"Target Name"},"specificAttrsTitle":"Specific Attributes","unknown":{"error":"Oops :( We can\'t recognize this {{category}}. Maybe it is created in a newer version.","node":"node","linePath":"line path","lineStyle":"line style"},"nodes":{"common":{"nameZh":"Line name in Chinese","nameEn":"Line name in English","nameJa":"Line name in Japanese","num":"Line number"},"virtual":{"displayName":"Virtual node"},"shmetroNumLineBadge":{"displayName":"Shanghai Metro num line badge"},"shmetroTextLineBadge":{"displayName":"Shanghai Metro text line badge"},"gzmtrLineBadge":{"displayName":"Guangzhou Metro line badge","tram":"Tram","span":"Row-spanning digits"},"bjsubwayNumLineBadge":{"displayName":"Beijing Subway num line badge"},"bjsubwayTextLineBadge":{"displayName":"Beijing Subway text line badge"},"berlinSBahnLineBadge":{"displayName":"Berlin S Bahn line badge"},"berlinUBahnLineBadge":{"displayName":"Berlin U Bahn line badge"},"suzhouRTNumLineBadge":{"displayName":"Suzhou Rail Transit num line badge","branch":"Is branch line"},"chongqingRTNumLineBadge":{"displayName":"Chongqing Rail Transit num line badge"},"chongqingRTTextLineBadge":{"displayName":"Chongqing Rail Transit text line badge"},"shenzhenMetroNumLineBadge":{"displayName":"Shenzhen Metro num line badge","branch":"Is branch line"},"mrtDestinationNumbers":{"displayName":"Singapore MRT destination numbers"},"mrtLineBadge":{"displayName":"Singapore MRT line badge","isTram":"Is LRT line badge"},"jrEastLineBadge":{"displayName":"JR East line badge","crosshatchPatternFill":"Fill with crosshatch pattern"},"qingdaoMetroNumLineBadge":{"displayName":"Qingdao Metro Num line badge","numEn":"Line number in English","showText":"Show text"},"guangdongIntercityRailwayLineBadge":{"displayName":"Guangdong Intercity Railway line badge"},"londonArrow":{"displayName":"London arrow","type":"Type","continuation":"Continuation","sandwich":"Sandwich","tube":"Tube"},"master":{"displayName":"Master node","type":"Master node type","undefined":"Undefined"},"facilities":{"displayName":"Facilities","type":"Type"},"text":{"displayName":"Arbitrary text","content":"Content","fontSize":"Font size","lineHeight":"Line height","textAnchor":"Text anchor","start":"Start","middle":"Middle","end":"End","auto":"Auto","hanging":"Hanging","dominantBaseline":"Dominant baseline","language":"Font family in which language","zh":"Chinese","en":"English","mtr__zh":"Hongkong MTR Chinese","mtr__en":"Hongkong MTR English","berlin":"Berlin S/U Bahn","mrt":"Singapore MRT","jreast_ja":"JR East Japanese","jreast_en":"JR East English","rotate":"Rotation","italic":"Italic","bold":"Bold"}},"stations":{"common":{"nameZh":"Names in Chinese","nameEn":"Names in English","nameJa":"Names in Japanese","nameOffsetX":"Names offset X","nameOffsetY":"Names offset Y","rotate":"Icon rotation","lineCode":"Line code","stationCode":"Station code","left":"Left","middle":"Middle","right":"Right","top":"Top","bottom":"Bottom"},"interchange":{"title":"Interchanges","within":"Within-station interchange","outStation":"Out-of-station interchange","outSystem":"Out-of-system interchange","addGroup":"Add interchange group","noInterchanges":"No interchanges","nameZh":"Chinese name","nameEn":"English name","add":"Add interchange","copy":"Copy interchange","remove":"Remove interchange"},"shmetroBasic":{"displayName":"Shanghai Metro basic station"},"shmetroBasic2020":{"displayName":"Shanghai Metro basic station (2020)"},"shmetroInt":{"displayName":"Shanghai Metro interchange station","height":"Icon height","width":"Icon width"},"shmetroOsysi":{"displayName":"Shanghai Metro out-of-system interchange station"},"shanghaiSuburbanRailway":{"displayName":"Shanghai Suburban Railway station"},"gzmtrBasic":{"displayName":"Guangzhou Metro basic station","open":"Is opened","secondaryNameZh":"Secondary name in Chinese","secondaryNameEn":"Secondary name in English","tram":"Tram"},"gzmtrInt":{"displayName":"Guangzhou Metro interchange station","open":"Is opened","secondaryNameZh":"Secondary name in Chinese","secondaryNameEn":"Secondary name in English","foshan":"Foshan"},"gzmtrInt2024":{"displayName":"Guangzhou Metro interchange station (2024)","columns":"Columns of stations","topHeavy":"Prefer more stations on the top row","anchorAt":"Anchor at","anchorAtNone":"Center","osiPosition":"Out-of-Station Interchange","osiPositionNone":"None","osiPositionLeft":"Left","osiPositionRight":"Right"},"bjsubwayBasic":{"displayName":"Beijing Subway basic station","open":"Is opened"},"bjsubwayInt":{"displayName":"Beijing Subway interchange station","outOfStation":"Out of station interchange"},"mtr":{"displayName":"Hongkong MTR station","rotate":"Icon rotation"},"suzhouRTBasic":{"displayName":"Suzhou Rail Transit basic station","textVertical":"Vertical names"},"suzhouRTInt":{"displayName":"Suzhou Rail Transit interchange station"},"kunmingRTBasic":{"displayName":"Kunming Rail Transit basic station"},"kunmingRTInt":{"displayName":"Kunming Rail Transit interchange station"},"MRTBasic":{"displayName":"Singapore MRT basic station","isTram":"Is LRT station"},"MRTInt":{"displayName":"Singapore MRT interchange station"},"jrEastBasic":{"displayName":"JR East basic station","nameOffset":"Names offset","textOneLine":"Names in one line","textVertical":"Vertical names","important":"Important station","lines":"Interchange lines offset"},"jrEastImportant":{"displayName":"JR East important station","textVertical":"Vertical names","mostImportant":"Most important station","minLength":"Minimal length of the station"},"foshanMetroBasic":{"displayName":"Foshan Metro basic station","open":"Is opened","secondaryNameZh":"Secondary name in Chinese","secondaryNameEn":"Secondary name in English","tram":"Tram"},"qingdaoMetro":{"displayName":"Qingdao Metro station","isInt":"Is interchange station"},"tokyoMetroBasic":{"displayName":"Tokyo Metro basic station","nameOffset":"Names offset","textVertical":"Vertical names","lineCode":"Line code","stationCode":"Station code"},"tokyoMetroInt":{"displayName":"Tokyo Metro interchange station","mereOffset":{"displayName":"Names mere offset","none":"None","left1":"Left (less)","left2":"Left (more)","right1":"Right (less)","right2":"Right (more)","up":"Up","down":"Down"},"importance":{"displayName":"Station importance","default":"Default","middle":"Middle","high":"High"},"align":{"displayName":"Icon align","horizontal":"Horizontal","vertical":"Vertical"}},"londonTubeCommon":{"stepFreeAccess":"Step free access","stepFreeAccessNone":"None","stepFreeAccessTrain":"From street to train","stepFreeAccessPlatform":"From street to platform"},"londonTubeBasic":{"displayName":"London Tube basic station","terminal":"Terminal station","shareTracks":"Track shares","shareTracksIndex":"Index of the track shares"},"londonTubeInt":{"displayName":"London Tube interchange station"},"londonRiverServicesInt":{"displayName":"London river services interchange station"},"guangdongIntercityRailway":{"displayName":"Guangdong Intercity Railway station"}},"lines":{"reconcileId":"Reconcile ID","common":{"offsetFrom":"Offset From","offsetTo":"Offset To","startFrom":"Start From","from":"From","to":"To","roundCornerFactor":"Round Corner Factor","parallelDisabled":"Some attributes are disabled as this line is parallel.","changeInBaseLine":"Change them in the base line:"},"simple":{"displayName":"Simple path","offset":"Offset"},"diagonal":{"displayName":"135° diagonal path"},"perpendicular":{"displayName":"90° perpendicular path"},"rotatePerpendicular":{"displayName":"90° rotate perpendicular path"},"singleColor":{"displayName":"Single color style"},"shmetroVirtualInt":{"displayName":"Shanghai Metro out-of-station interchange style"},"shanghaiSuburbanRailway":{"displayName":"Shanghai Suburban Railway style","isEnd":"Is the ending line"},"gzmtrVirtualInt":{"displayName":"Guangzhou Metro out-of-station interchange style"},"gzmtrLoop":{"displayName":"Guangzhou Metro loop style"},"chinaRailway":{"displayName":"China Railway style"},"bjsubwaySingleColor":{"displayName":"Beijing Subway single color style"},"bjsubwayTram":{"displayName":"Beijing Subway tram style"},"bjsubwayDotted":{"displayName":"Beijing Subway dotted style"},"dualColor":{"displayName":"Dual color style","swap":"Swap color","colorA":"Color A","colorB":"Color B"},"river":{"displayName":"River style","width":"Width"},"mtrRaceDays":{"displayName":"Hongkong MTR race days style"},"mtrLightRail":{"displayName":"Hongkong MTR light rail style"},"mtrUnpaidArea":{"displayName":"Hongkong MTR unpaid area style"},"mtrPaidArea":{"displayName":"Hongkong MTR paid area style"},"mrtUnderConstruction":{"displayName":"Singapore MRT under construction style"},"mrtSentosaExpress":{"displayName":"Singapore MRT Sentosa Express style"},"jrEastSingleColor":{"displayName":"JR East single color style"},"jrEastSingleColorPattern":{"displayName":"JR East single color filled with crosshatch pattern style"},"lrtSingleColor":{"displayName":"Singapore LRT single color style"},"londonTubeInternalInt":{"displayName":"London Tube internal interchange style"},"londonTube10MinWalk":{"displayName":"London Tube under a 10 minute walk interchange style"},"londonTubeTerminal":{"displayName":"London Tube terminal style"},"londonRail":{"displayName":"London rail style","limitedService":"Limited service/Peak hours only","colorBackground":"Color background","colorForeground":"Color foreground"},"londonSandwich":{"displayName":"London sandwich style"},"londonLutonAirportDART":{"displayName":"London Luton Airport DART style"},"londonIFSCloudCableCar":{"displayName":"London IFS Cloud Cable Car style"},"guangdongIntercityRailway":{"displayName":"Guangdong Intercity Railway style"}},"edge":{},"footer":{"duplicate":"Duplicate","copy":"Copy","remove":"Remove"}}}'),header:{popoverHeader:"You're on <1>{{environment}} environment!",popoverBody:"We are currently testing the latest RMP. If you have any suggestions, feel free to raise at https://github.com/railmapgen/rmp/issues",search:"Search stations",open:{new:"New project",config:"Import project",projectRMG:"Import from RMG project",invalidType:"Invalid file type! Only file in JSON format is accepted.",unknownError:"Unknown error occurred while parsing the uploaded file! Please try again.",gallery:"Import from Gallery",tutorial:"Start tutorial",importFromRMPGallery:"Template {{id}} imported. Not satisfied with this change? Undo via Ctrl + Z or the undo button.",failToImportFromRMPGallery:"Fail to import {{id}} from the gallery. The file can not be found."},download:{config:"Export project",image:"Export image","2rmg":{title:"Export to RMG project",type:{line:"Line",loop:"Loop",branch:"Branch"},placeholder:{chinese:"Chinese name",english:"English name",lineCode:"Line code"},info1:"This function is designed to convert the RMP project into RMG projects.",info2:"The lines in the list following are the available lines for converting. You can enter the Chinese line name in the text box on the left, the English line name in the middle, the line code (for Guangzhou Metro style) on the right, and then click the download button on the right to save your RMG projects.",noline:"No available lines found.",download:"Download",downloadInfo:"Please select one of the following stations as the starting station and click it to download."},format:"Format",png:"PNG",svg:"SVG",svgVersion:"Version","svg1.1":"1.1 (Compatible with Adobe Illustrator)",svg2:"2 (Compatible with modern browsers)",transparent:"Transparency",scale:"Scale",disabledScaleOptions:"Some scale options are disabled due to your browser's canvas limitation.",disabledScaleOptionsWorkarounds:"Possible workarounds include generating the image from svg using this cli tool: ",imageTooBig:"The image is too big for your browser to generate!",useSystemFonts:"Use system fonts instead of fonts previewed in the canvas",shareInfo1:"I will attach ",shareInfo2:" and its link when I share this image.",termsAndConditions:"Terms and Conditions",termsAndConditionsInfo:"I agree to ",period:".",confirm:"Download"},donation:{title:"Donation",openCollective:"Open Collective",viaUSD:"Donate in USD via Paypal or Visa card.",afdian:"爱发电",viaCNY:"Donate in CNY via Alipay or Wechat Pay."},settings:{title:"Settings",pro:"This is a PRO feature and an account with a subscription is required.",proWithTrial:"This is a PRO feature with a limited free trial available.",proLimitExceed:{master:"Master nodes exceed the free tier.",parallel:"Parallel lines exceed the free tier.",solution:"Remove them to dismiss this warning, or subscribe to unlock more!"},subscription:{title:"Subscription Status","logged-out":"You are currently logged out.",free:"Logged In! Subscribe to unlock more features!",subscriber:"Thanks for your subscription! Enjoy all features!",expired:"Login status expired. Please log out and log in again."},preference:{title:"Preference",keepLastPath:"Keep drawing lines until clicking on the background in the next move",autoParallel:"Automatically set new lines to be parallel to existing lines",randomStationNames:{title:"Set station names to random on creation",none:"None",shmetro:"Shanghai",bjsubway:"Beijing"}},shortcuts:{title:"Shortcuts",keys:"Keys",description:"Description",f:"Use the last tool.",s:"Select.",arrows:"Move the canvas a little bit.",ijkl:"Move the selected station(s) a little bit.",shift:"Multiple selection.",alt:"Precise movement.",delete:"Delete the selected station(s).",cut:"Cut.",copy:"Copy.",paste:"Paste.",undo:"Undo.",redo:"Redo."},procedures:{title:"Procedures",translate:{title:"Translate nodes' coordinates",content:"Add the following offset to all nodes' x and y:",x:"X axis",y:"Y axis"},scale:{title:"Scale nodes' coordinates",content:"Multiply the following value to all nodes' x and y:",factor:"Scale factor"},changeType:{title:"Change all objects' attributes",any:"Any"},changeZIndex:"Change depth in batch",changeStationType:{title:"Change stations type in batch",changeFrom:"Change all stations from this type:",changeTo:"To this type:",info:"Changing stations' type will remove all specific attributes from stations except their position and names. SAVE BEFORE CHANGE!"},changeLineStyleType:{title:"Change lines style in batch",changeFrom:"Change all lines from this style:",changeTo:"To this style:",info:"Changing lines' style will remove all specific attributes from lines except their connections. SAVE BEFORE CHANGE!"},changeLinePathType:{title:"Change lines path in batch",changeFrom:"Change all lines from this path:",changeTo:"To this path:"},changeColor:{title:"Change color in batch",changeFrom:"Change all objects from this color:",changeTo:"To this color:",any:"From any color"},removeLines:{title:"Remove lines with single color",content:"Remove lines that have this color: "},updateColor:{title:"Update color",content:"Update all colors with their latest value.",success:"Successfully update all colors.",error:"Error in updating all colors: {{e}}."},unlockSimplePath:{title:"Unlock simple path",content1:"The Rail Map Painter application endeavors to offer an interactive platform conducive to the creation of rail maps while adhering to established conventions. Among these conventions, one particularly renowned style finds its origins in the innovative work of Harry Beck. His pioneering contribution, officially endorsed in the year 1932, garnered instantaneous acclaim from the general populace. Presently, it stands as an exemplar of paramount significance within the realm of information design. This paradigmatic approach has found widespread implementation in transit cartography on a global scale, albeit with varying degrees of success.",content2:"The application inherently conceals the option to utilize a simple path, as its deployment has the potential to contravene established conventions. This particular feature remains discreetly tucked away by default. Additionally, submissions to the Rail Map Painter Gallery are subject to stringent scrutiny, with a categorical rejection of compositions that employ the simple path with a single color style approach.",content3:"Still, we reserve the opportunity to unlock this option and use the simple path when you subscribe. It should be noted that even after acquisition, the use of simple path is limited to single color.",check:"Unlock",unlocked:"Already Unlocked"},masterManager:{title:"Manage all master nodes",id:"Id",label:"Label",type:"Type",types:{MiscNode:"MiscNode",Station:"Station"},importTitle:"Upload master parameter",importFrom:"Use imported styles",importOther:"Import new style",importParam:"Paste configuration"}},telemetry:{title:"Telemetry",info:"To help improve Rail Map Painter and keep contributors motivated to enhance the project, anonymous usage data is collected through Google Analytics. This data is used solely for enhancing the user experience and optimizing the tool's functionality and is never shared with third parties.",essential:"Basic",essentialTooltip:"Change this global setting in Rail Map Toolkit",essentialInfo:"Rail Map Painter collects essential usage data that helps us understand how and when users interact with the tool. Rest assured, no personally identifiable information or data from your projects is ever collected.",essentialLink:"Click this link to see detailed fields that Google Analytics may collect.",additional:"Additional",additionalInfo:"Rail Map Painter also gathers data on interactions, such as project creation or station addition, when you input. These additional data is also anonymous and are only used for statistical analysis to help us make the tool better."}},about:{title:"About",rmp:"Rail Map Painter",railmapgen:"A Rail Map Toolkit project",desc:"Design your own rail map by freely dragging stations from different cities and connecting them with 90 or 135-degree rounded corners lines!",content1:"In memory of all the freedom and equality we once had.",content2:"06/01/2022 in Shanghai",contributors:"Contributors",coreContributors:"Core Contributors",styleContributors:"Style Contributors",langonginc:"Live a life you will remember.","203IhzElttil":"Special thanks for his diligent work in ensuring that the stations of Shanghai Metro match the original design.",Swiftiecott:"Special thanks for his diligent work in ensuring that the stations of Beijing Subway match the original design.",Minwtraft:"Special thanks for his diligent work in ensuring that the stations of Guangzhou Metro match the original design.",contactUs:"Contact Us",github:"Project repository",githubContent:"Face any problems? Search or raise an issue here!",slack:"Slack group",slackContent:"Chat in these Slack channels!"}}},hs={colorA:"Color A",colorB:"Color B",color:"カラー",warning:"警告",cancel:"キャンセル",apply:"適用",remove:"削除",close:"閉じる",noShowAgain:"次回表示しない",rmtPromotion:"絶対に見逃せないオールインワンツールキット!",panel:{tools:{showLess:"表示を減らす",section:{lineDrawing:"路線描画",stations:"駅",miscellaneousNodes:"その他の節点"},select:"選択する",learnHowToAdd:{station:"駅を追加する方法を学ぶ!","misc-node":"節点を追加する方法を学ぶ!",line:"路線風格を追加する方法を学ぶ!"}},details:{header:"詳細",info:{title:"基本情報",id:"ID",zIndex:"深度",stationType:"駅の種類",linePathType:"路線経路の種類",lineStyleType:"路線風格の種類",type:"種類",parallel:"平行路線",parallelIndex:"平行路線索引"},multipleSelection:{title:"複数選択",change:"選択した属性を変更する",selected:"選択されたオブジェクト:",show:"見せる",station:"駅",miscNode:"その他のノード",edge:"ライン"},changeStationTypeContent:"駅の種類を変更すると、駅の名前以外のすべての属性が削除されます。",changeLineTypeContent:"路線の種類を変更すると、すべての属性が削除されます。",changeType:"種類を変更",nodePosition:{title:"節点の位置",pos:{x:"X座標",y:"Y座標"}},lineExtremities:{title:"路線の端点",source:"出発点",target:"到着点",sourceName:"出発点名",targetName:"到着点名"},specificAttrsTitle:"特定の属性",unknown:{error:"おっと :( これは{{category}}を認識できません。おそらくそれは新しいバージョンで作成されました。",node:"節点",linePath:"路線経路",lineStyle:"路線風格"},nodes:{common:{nameZh:"中国語の路線名",nameEn:"英語の路線名",nameJa:"日本語の路線名",num:"路線番号"},virtual:{displayName:"仮想節点"},shmetroNumLineBadge:{displayName:"上海地下鉄路線番号徽章"},shmetroTextLineBadge:{displayName:"上海地下鉄テキスト路線徽章"},gzmtrLineBadge:{displayName:"広州地下鉄路線徽章",tram:"路面電車",span:"行にまたがる数字"},bjsubwayNumLineBadge:{displayName:"北京地下鉄路線番号徽章"},bjsubwayTextLineBadge:{displayName:"北京地下鉄テキスト路線徽章"},berlinSBahnLineBadge:{displayName:"ベルリンSバーン番号徽章"},berlinUBahnLineBadge:{displayName:"ベルリン地下鉄番号徽章"},suzhouRTNumLineBadge:{displayName:"蘇州軌道交通路線番号徽章",branch:"支線"},chongqingRTNumLineBadge:{displayName:"重慶鉄道交通路線番号徽章"},chongqingRTTextLineBadge:{displayName:"重慶鉄道交通テキスト路線徽章"},shenzhenMetroNumLineBadge:{displayName:"深セン地下鉄路線番号徽章",branch:"支線"},mrtDestinationNumbers:{displayName:"シンガポールMRTの目的地番号"},mrtLineBadge:{displayName:"シンガポールMRT路線バッジ",isTram:"LRT路線バッジです"},jrEastLineBadge:{displayName:"JR東日本路線番号徽章",crosshatchPatternFill:"網目模様で塗りつぶす"},qingdaoMetroNumLineBadge:{displayName:"青島地下鉄番号線徽章",numEn:"英語の行番号",showText:"テキストを表示"},guangdongIntercityRailwayLineBadge:{displayName:"広東省都市間鉄道線徽章"},londonArrow:{displayName:"ロンドン矢印",type:"種類",continuation:"継続",sandwich:"サンドイッチ",tube:"地下鉄"},master:{displayName:"大師節点",type:"大師節点種類",undefined:"未定義"},facilities:{displayName:"施設",type:"種類"},text:{displayName:"任意のテキスト",content:"コンテンツ",fontSize:"書体サイズ",lineHeight:"行の高さ",textAnchor:"テキストのアンカー",start:"開始",middle:"中央",end:"終了",auto:"自動",hanging:"吊り下げ",dominantBaseline:"ドミナントベースライン",language:"言語での書体ファミリー",zh:"中国語",en:"英語",mtr__zh:"香港MTR中国語",mtr__en:"香港MTR英語",berlin:"ベルリンS/Uバーン",mrt:"シンガポールMRT",jreast_ja:"JR東日本日本語",jreast_en:"JR東日本英語",rotate:"回転",italic:"イタリック体",bold:"太字"}},stations:{common:{nameZh:"中国語の駅名",nameEn:"英語の駅名",nameJa:"日本語の駅名",nameOffsetX:"駅名補正値X",nameOffsetY:"駅名補正値Y",rotate:"アイコンの回転",lineCode:"路線番号",stationCode:"駅番号",left:"左",middle:"中央",right:"右",top:"上",bottom:"下"},interchange:{title:"乗り換え",within:"駅構内の乗り換え",outStation:"駅外の乗り換え",outSystem:"系統外の乗り換え",addGroup:"乗り換えグループを追加",noInterchanges:"乗り換えなし",nameZh:"中国語の駅名",nameEn:"英語の駅名",add:"乗り換えを追加",copy:"乗り換えをコピー",remove:"乗り換えを削除"},shmetroBasic:{displayName:"上海地下鉄基本駅"},shmetroBasic2020:{displayName:"上海地下鉄基本駅(令和2年)"},shmetroInt:{displayName:"上海地下鉄乗り換え駅",height:"アイコンの高さ",width:"アイコンの幅"},shmetroOsysi:{displayName:"上海地下鉄の系統外乗り換え駅"},shanghaiSuburbanRailway:{displayName:"上海市営鉄道駅"},gzmtrBasic:{displayName:"広州地下鉄基本駅",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",tram:"路面電車"},gzmtrInt:{displayName:"広州地下鉄乗り換え駅",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",foshan:"仏山"},gzmtrInt2024:{displayName:"広州地下鉄乗り換え駅(令和6年)",columns:"駅の列数",topHeavy:"上段に多くの駅を優先配置",anchorAt:"錨位置",anchorAtNone:"中心",osiPosition:"改札外乗り換え",osiPositionNone:"なし",osiPositionLeft:"左",osiPositionRight:"右"},bjsubwayBasic:{displayName:"北京地下鉄基本駅",open:"開業済み"},bjsubwayInt:{displayName:"北京地下鉄乗り換え駅",outOfStation:"改札外乗り換え"},mtr:{displayName:"香港MTR駅",rotate:"アイコンの回転"},suzhouRTBasic:{displayName:"蘇州軌道交通基本駅",textVertical:"垂直の名前"},suzhouRTInt:{displayName:"蘇州軌道交通乗り換え駅"},kunmingRTBasic:{displayName:"昆明軌道交通基本駅"},kunmingRTInt:{displayName:"昆明軌道交通乗り換え駅"},MRTBasic:{displayName:"シンガポールMRT基本駅",isTram:"LRTの駅です"},MRTInt:{displayName:"シンガポールMRT乗り換え駅"},jrEastBasic:{displayName:"JR東日本基本駅",nameOffset:"名前の補正値",textOneLine:"1行での名前",textVertical:"垂直の名前",important:"重要な駅",lines:"乗り換え線の補正値"},jrEastImportant:{displayName:"JR東日本重要駅",textVertical:"垂直の名前",mostImportant:"最も重要な駅",minLength:"駅の最小長"},foshanMetroBasic:{displayName:"仏山地鐵基本車站",open:"開業済み",secondaryNameZh:"中国語の補助駅名",secondaryNameEn:"英語の補助駅名",tram:"路面電車"},qingdaoMetro:{displayName:"地下鉄青島駅",isInt:"乗換駅です"},tokyoMetroBasic:{displayName:"東京メトロの基本駅",nameOffset:"駅名補正値",textVertical:"垂直の名前"},tokyoMetroInt:{displayName:"東京メトロ乗換駅",mereOffset:{displayName:"名前は単なるオフセットです",none:"なし",left1:"左(少ない)",left2:"左(さらに)",right1:"右(少ない)",right2:"右(さらに)",up:"上",down:"下"},importance:{displayName:"駅の重要性",default:"デフォルト",middle:"真ん中",high:"高い"},align:{displayName:"アイコンの整列",horizontal:"水平",vertical:"垂直"}},londonTubeCommon:{stepFreeAccess:"段差のないアクセス",stepFreeAccessNone:"なし",stepFreeAccessTrain:"駅から電車まで",stepFreeAccessPlatform:"駅からプラットフォームまで"},londonTubeBasic:{displayName:"ロンドン地下鉄基本駅",terminal:"終着駅",shareTracks:"線路共有",shareTracksIndex:"線路共有索引"},londonTubeInt:{displayName:"ロンドン地下鉄乗換駅"},londonRiverServicesInt:{displayName:"ロンドン川サービス乗換駅"},guangdongIntercityRailway:{displayName:"広東省都市間鉄道駅"}},lines:{reconcileId:"調整ID",common:{offsetFrom:"補正値(From)",offsetTo:"補正値(To)",startFrom:"開始位置",roundCornerFactor:"角の丸め係数",from:"から",to:"まで",parallelDisabled:"この路線が平行であるため、一部の属性が無効になっています。",changeInBaseLine:"基準線で変更してください:"},simple:{displayName:"簡単な経路",offset:"補正値"},diagonal:{displayName:"135°対角経路"},perpendicular:{displayName:"90°垂直経路"},rotatePerpendicular:{displayName:"90°回転する垂直経路"},singleColor:{displayName:"単色風格"},shmetroVirtualInt:{displayName:"上海地下鉄駅外乗り換え風格"},shanghaiSuburbanRailway:{displayName:"上海市営鉄道風格",isEnd:"終了行"},gzmtrVirtualInt:{displayName:"広州地下鉄駅外乗り換え風格"},gzmtrLoop:{displayName:"広州地下鉄環状線風格"},chinaRailway:{displayName:"中国鉄道風格"},bjsubwaySingleColor:{displayName:"北京地下鉄単色風格"},bjsubwayTram:{displayName:"北京地下鉄路面電車風格"},bjsubwayDotted:{displayName:"北京地下鉄の点線風格"},dualColor:{displayName:"2色風格",swap:"色を交換",colorA:"色A",colorB:"色B"},river:{displayName:"河川風格",width:"幅"},mtrRaceDays:{displayName:"香港MTRレース日風格"},mtrLightRail:{displayName:"香港MTR軽軌風格"},mtrUnpaidArea:{displayName:"香港MTR改札外乗り換え風格"},mtrPaidArea:{displayName:"香港MTR改札内乗り換え風格"},mrtUnderConstruction:{displayName:"シンガポール MRT 工事中風格"},mrtSentosaExpress:{displayName:"シンガポール MRT セントーサ・エクスプレス風格"},jrEastSingleColor:{displayName:"JR東日本単色風格"},jrEastSingleColorPattern:{displayName:"JR東日本単色網目模様風格"},lrtSingleColor:{displayName:"シンガポールLRT単色風格"},londonTubeInternalInt:{displayName:"ロンドン地下鉄内部乗換風格"},londonTube10MinWalk:{displayName:"ロンドン地下鉄10分以内の乗換風格"},londonTubeTerminal:{displayName:"ロンドン地下鉄終着風格"},londonRail:{displayName:"ロンドン鉄道風格",limitedService:"限定サービス/ピーク時のみ",colorBackground:"背景色",colorForeground:"前景色"},londonSandwich:{displayName:"ロンドンサンドイッチ風格"},londonLutonAirportDART:{displayName:"ロンドンルートン空港DART風格"},londonIFSCloudCableCar:{displayName:"ロンドンIF雲索道風格"},guangdongIntercityRailway:{displayName:"広東省都市間鉄道風格"}},edges:{},footer:{duplicate:"重複",copy:"複製",remove:"削除"}}},header:{popoverHeader:"<1>{{environment}} 環境です!",popoverBody:"現在、最新のRMPをテストしています。ご意見がありましたら、https://github.com/railmapgen/rmp/issues で提案してください",search:"駅を探す",open:{new:"新しい作品",config:"作品をインポート",projectRMG:"RMG作品からインポート",invalidType:"無効なファイルタイプです!JSON形式のファイルのみが受け付けられます。",unknownError:"アップロードされたファイルの解析中に不明なエラーが発生しました。もう一度お試しください。",gallery:"ギャラリーからインポート",tutorial:"指導を開始する",importFromRMPGallery:"テンプレート{{id}}がインポートされました。この変更に満足していませんか?Ctrl + Zまたは元に戻すボタンで元に戻せます。",failToImportFromRMPGallery:"ギャラリーから{{id}}のインポートに失敗しました。ファイルが見つかりませんでした。"},download:{config:"作品をエクスポート",image:"画像をエクスポート","2rmg":{title:"RMG作品へエクスポート",type:{line:"直線",loop:"環状線",branch:"支線"},placeholder:{chinese:"中国語のライン名",english:"英語の路線名",lineCode:"路線番号"},info1:"この機能は、RMP作品をRMG作品に変換するために設計されています。",info2:"以下のリストの行は、変換用に利用できます。左側のテキストボックスに中国語の行名、中央に英語の行名、右側に(広州メトロ風格用の)行コードを入力し、ダウンロードボタンをクリックしてRMG作品を保存できます。",noline:"利用可能な回線が見つかりません。",download:"ダウンロード",downloadInfo:"出発駅を選択してクリックしてください。"},format:"フォーマット",png:"PNG",svg:"SVG",svgVersion:"版","svg1.1":"1.1(Adobe Illustratorと互換性あり)",svg2:"2(現代のブラウザと互換性あり)",transparent:"透明性",scale:"スケール",disabledScaleOptions:"ブラウザのキャンバス制限のため、一部のスケールオプションが無効になっています。",disabledScaleOptionsWorkarounds:"回避策として、このCLIツールを使用してSVGから画像を生成する方法が考えられます:",imageTooBig:"画像が大きすぎてブラウザで生成できません!",useSystemFonts:"キャンバスで内覧された書体の代わりに系統書体を使用する",shareInfo1:"この画像を共有する際に、添付ファイル ",shareInfo2:" とリンクを添付します。",termsAndConditions:"利用規約",termsAndConditionsInfo:"以下の利用規約に同意します:",period:"。",confirm:"ダウンロード"},donation:{title:"寄付",openCollective:"Open Collective",viaUSD:"PaypalまたはVisaカードを使用してドルで寄付する。",afdian:"爱发电",viaCNY:"AlipayまたはWechat Payを使用して人民元で寄付する。"},settings:{title:"設定",pro:"これはPRO機能であり、サブスクリプションが必要です。",proWithTrial:"これはPRO機能で、無料の限定トライアルが利用可能です。",proLimitExceed:{master:"大師節点が無料枠を超えています。",parallel:"平行路線が無料枠を超えています。",solution:"これらを削除して警告を解除するか、サブスクリプションに登録してさらに多くの機能を利用してください!"},subscription:{title:"サブスクリプションステータス","logged-out":"現在ログアウトしています。",free:"ログイン済み!さらに多くの機能をアンロックするにはサブスクリプションを登録してください!",subscriber:"サブスクリプションありがとうございます!すべての機能をお楽しみください!",expired:"ログインステータスの有効期限が切れました。ログアウトして再度ログインしてください。"},preference:{title:"設定",keepLastPath:"次の移動で背景をクリックするまで、線を描き続ける",autoParallel:"新しい路線を既存の路線と平行に自動的に設定",randomStationNames:{title:"作成時に駅名を乱数化する",none:"なし",shmetro:"上海",bjsubway:"北京"}},shortcuts:{title:"ショートカット",keys:"キー",description:"説明",f:"最後のツールを使用する。",s:"選択する。",arrows:"キャンバスを少し移動します。",ijkl:"選択した駅を少し移動します。",shift:"複数選択。",alt:"正確な移動。",delete:"選択した駅を削除します。",cut:"切り取る。",copy:"複製する。",paste:"貼り付ける。",undo:"元に戻す。",redo:"やり直す。"},procedures:{title:"手順",translate:{title:"節点の座標を変換",content:"すべての節点のX座標とY座標に次の補正値を追加する:",x:"X軸",y:"Y軸"},scale:{title:"節点の座標をスケーリング",content:"すべての節点のX座標とY座標に次の値を乗算する:",factor:"スケールファクター"},changeType:{title:"すべてのオブジェクトの属性を変更する",any:"どれでも"},changeZIndex:"深度を変更する",changeStationType:{title:"一括で駅の種類を変更",changeFrom:"すべての駅をこの種類から変更する:",changeTo:"この種類に変更する:",info:"駅の種類を変更すると、位置と名前以外の特定の属性がすべて削除されます。変更する前に保存してください!"},changeLineStyleType:{title:"線の風格を一括で変更",changeFrom:"この風格からすべての行を変更します:",changeTo:"この風格に:",info:"線の風格を変更すると、接続を除くすべての特定の属性が線から削除されます。 変更する前に保存してください!"},changeLinePathType:{title:"行のパスを一括で変更する",changeFrom:"このパスのすべての行を変更します:",changeTo:"この道へ:"},changeColor:{title:"一括で色を変更する",changeFrom:"すべてのオブジェクトをこの色から変更します:",changeTo:"この色に:",any:"どの色からも"},removeLines:{title:"単一色の路線を削除",content:"この色を持つ路線を削除する:"},updateColor:{title:"色を更新する",content:"最新の値ですべての色を更新します。",success:"すべての色を正常に更新しました。",error:"すべての色を更新する際にエラーが発生しました: {{e}}。"},unlockSimplePath:{title:"簡単な経路の解除",content1:"「地下鉄路線図画家」は、既存の慣例に従いつつ、鉄道地図の作成を支援するインタラクティブなプラットフォームを提供することを目指しています。その中でも、特に有名な風格の1つは、ハリー・ベックの革新的な作品に由来しています。彼の先駆的な貢献は1932年に正式に認められ、一般大衆から即座に称賛されました。現在では、情報デザインの領域において極めて重要な存在となっています。この典型的なアプローチは、世界規模の公共交通カートグラフィに広く採用されていますが、成功度は異なります。",content2:"アプリケーション自体は、既存の慣例に反する可能性があるため、簡単な経路を利用するオプションをデフォルトで控えめに隠しています。また、「地下鉄路線図画家ギャラリー」への投稿は厳格な審査を受けることになり、簡単な経路を単一の色の風格で使用する作品は断固として拒否されます。",content3:"それでも、このオプションのロックを解除し、寄付時にイージーパスを使用する機会を予約します。 取得後も、単純なパスの使用はモノクロスタイルに限定されることに注意してください。",check:"簡単な経路を解除",unlocked:"既に解除されています"},masterManager:{title:"すべての大師節点を管理する",id:"ID",label:"標識",type:"種類",types:{MiscNode:"その他節点",Station:"駅"},importTitle:"大師引数をアップロード",importFrom:"インポートしたスタイルを使用",importOther:"新しいスタイルをインポート",importParam:"設定情報を貼り付け"}},telemetry:{title:"テレメトリー",info:"鉄道路線図画家を改善し、貢献者がプロジェクトを向上させる意欲を維持するため、Google Analytics を通じて匿名の使用データを収集しています。このデータはユーザー体験の向上とツールの最適化のためだけに使用され、第三者と共有されることはありません。",essential:"基本",essentialTooltip:"鉄道路線図ツールキットでこのグローバル設定を変更する",essentialInfo:"鉄道路線図画家は、ツールがどのように、またいつ使用されるかを理解するための基本的な使用データを収集します。ご安心ください。個人を特定できる情報やプロジェクトデータは一切収集されません。",essentialLink:"Google Analytics が収集する可能性のある詳細フィールドを表示するには、こちらのリンクをクリックしてください。",additional:"追加",additionalInfo:"鉄道路線図画家は、プロジェクトの作成や駅の追加など、入力時のインタラクションに関するデータも収集します。これらの追加データも匿名であり、ツールを改善するための統計分析にのみ使用されます。"}},about:{title:"について",rmp:"地下鉄路線図画家",railmapgen:"地下鉄路線図ツールキットのプロジェクト",desc:"異なる都市の駅を自由にドラッグして、90度または135度の角丸線で接続して独自の鉄道地図を設計しましょう!",content1:"かつて私たちが持っていた自由と平等のすべての記憶に捧げます。",content2:"2022年6月1日、上海",contributors:"貢献者",coreContributors:"主要な貢献者",styleContributors:"風格の貢献者","203IhzElttil":"上海地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",Swiftiecott:"北京地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",Minwtraft:"広州地下鉄の駅がオリジナルの設計と一致するように、彼の勤勉な仕事に特別な感謝を述べます。",contactUs:"お問い合わせ",github:"プロジェクトリポジトリ",githubContent:"問題が発生しましたか?こちらで検索したり、問題を報告したりしてください!",slack:"Slackグループ",slackContent:"Slackのチャンネルでチャットしましょう!"}}},ps={color:"색깔",warning:"경고",cancel:"취소",apply:"사용",remove:"삭제",close:"다시",noShowAgain:"표시하지 않기",rmtPromotion:"놓치고 싶지 않은 올인원 툴킷! 닫기.",panel:{tools:{showLess:"적게 표시",section:{lineDrawing:"선 그리기",stations:"역",miscellaneousNodes:"기타 노드"},select:"선택하다",learnHowToAdd:{station:"역을 추가하는 방법 배우기!","misc-node":"노드를 추가하는 방법 배우기!",line:"라인 스타일을 추가하는 방법 배우기!"}},details:{header:"상세한 상황",info:{title:"기본정보",id:"고유 식별자",zIndex:"깊이",stationType:"역 유형",linePathType:"선분 경로 유형",lineStyleType:"선분 스타일 유형",type:"유형",parallel:"평행선",parallelIndex:"평행 인덱스"},multipleSelection:{title:"다중 선택",change:"선택한 속성 변경",selected:"선택한 개체:",show:"보여주다",station:"역",miscNode:"기타 노드",edge:"윤곽"},changeStationTypeContent:"역 유형을 변경하면 이름을 제외한 모든 독특한 속성이 제거됩니다.",changeLineTypeContent:"선분 유형을 변경하면 모든 독특한 속성이 제거됩니다.",changeType:"종류 변경",nodePosition:{title:"노드 위치",pos:{x:"가로 좌표",y:"세로 좌표"}},lineExtremities:{title:"선분 양단",source:"시작점",target:"종말점",sourceName:"시작점 명칭",targetName:"종말점 명칭"},specificAttrsTitle:"독특 속성",unknown:{error:"이런 :( 우리는 이 {{category}}를 인식할 수 없습니다. 아마도 더 최근 버전에서 생성되었을 것입니다.",node:"노드",lineType:"선분 경로",lineStyle:"선분 스타일"},nodes:{common:{nameZh:"한자 노선명칭",nameEn:"영문 노선명칭",nameJa:"일본 노선명칭",num:"노선 번호"},virtual:{displayName:"가상 노드"},shmetroNumLineBadge:{displayName:"상해 지하철 디지털 노선 표지"},shmetroTextLineBadge:{displayName:"상해 지하철 문자 노선 표지"},gzmtrLineBadge:{displayName:"광저우 지하철 노선 표지",tram:"시가 전차",span:"행 범위 숫자"},bjsubwayNumLineBadge:{displayName:"베이징 지하철 노선 배지"},bjsubwayTextLineBadge:{displayName:"베이징 지하철 텍스트 라인 배지"},berlinSBahnLineBadge:{displayName:"베를린 S반 노선 배지"},berlinUBahnLineBadge:{displayName:"베를린 U반 노선 배지"},suzhouRTNumLineBadge:{displayName:"수주 철도 번호 라인 배지",branch:"지선입니다"},chongqingRTNumLineBadge:{displayName:"충칭 철도 교통 디지털 노선 식별"},chongqingRTTextLineBadge:{displayName:"충칭 철도 교통 텍스트 라인 표시"},shenzhenMetroNumLineBadge:{displayName:"심천 지하철 번호 라인 배지",branch:"지선입니다"},mrtDestinationNumbers:{displayName:"싱가포르 MRT 목적지 번호"},mrtLineBadge:{displayName:"싱가포르 MRT 노선 배지",isTram:"LRT 노선 배지입니다"},jrEastLineBadge:{displayName:"JR 동일본 라인 배지",crosshatchPatternFill:"크로스해치 패턴으로 채우기"},qingdaoMetroNumLineBadge:{displayName:"칭다오 지하철 번호 라인 배지",numEn:"영어로 된 줄 번호",showText:"텍스트 표시"},guangdongIntercityRailwayLineBadge:{displayName:"광동 시외 철도 노선 표지판"},londonArrow:{displayName:"런던 화살표",type:"유형",continuation:"계속",sandwich:"샌드위치",tube:"튜브"},master:{displayName:"마스터 노드",type:"마스터 노드 유형",undefined:"정의되지 않음"},facilities:{displayName:"시설",type:"유형"},text:{displayName:"임의 글자",content:"내용",fontSize:"글자 대소",lineHeight:"행고도",textAnchor:"글자 앵커",start:"시작",middle:"가운데",end:"끝",auto:"자동",hanging:"매달리는",dominantBaseline:"현성 바셀린",language:"언어로 된 글꼴 종류",zh:"중국어",en:"영어",mtr__zh:"홍콩 MTR 중국어",mtr__en:"홍콩 MTR 영어",berlin:"베를린 S/U Bahn",mrt:"싱가포르 MRT",jreast_ja:"JR 동일본어",jreast_en:"JR 동일본 영어",rotate:"회전",italic:"이탤릭체",bold:"굵게"}},stations:{common:{nameZh:"한자 명칭",nameEn:"영문 명칭",nameJa:"일본 명칭",nameOffsetX:"명칭 가로 이동",nameOffsetY:"명칭 세로 이동",rotate:"역회전각도",lineCode:"노선 번호",stationCode:"역 번호",left:"왼쪽",middle:"가운데",right:"오른쪽",top:"위",bottom:"아래"},interchange:{title:"환승",within:"같은 역에서 환승한",outStation:"역을 나가 환승한",outSystem:"시스템외환승",addGroup:"환승 조합 추가",noInterchanges:"비환승역",nameZh:"한자 명칭",nameEn:"영문 명칭",add:"환승 추가",copy:"환승 복제",remove:"환승 삭제"},shmetroBasic:{displayName:"상해 지하철의 기본 역"},shmetroBasic2020:{displayName:"상해 지하철 기본 역(2020년)"},shmetroInt:{displayName:"상해 지하철 환승역",height:"역 높이",width:"역 폭"},shmetroOsysi:{displayName:"상하이 지하철 시스템 외환승 역"},shanghaiSuburbanRailway:{displayName:"상하이 기차역"},gzmtrBasic:{displayName:"광저우 지하철 기본역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",tram:"시가 전차"},gzmtrInt:{displayName:"광저우 지하철 환승역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",foshan:"포산"},gzmtrInt2024:{displayName:"광저우 지하철 환승역 (2024)",columns:"역 열 수",topHeavy:"상단에 더 많은 역 우선 배치",anchorAt:"앵커 위치",anchorAtNone:"중앙",osiPosition:"역을 나가 환승",osiPositionNone:"없음",osiPositionLeft:"왼쪽",osiPositionRight:"오른쪽"},bjsubwayBasic:{displayName:"베이징 지하철 기본역",open:"개통여부"},bjsubwayInt:{displayName:"베이징 지하철 환승역",outOfStation:"역을 나가 환승"},mtr:{displayName:"홍콩 MTR 역"},suzhouRTBasic:{displayName:"쑤저우 궤도교통 기본역",textVertical:"수직 이름"},suzhouRTInt:{displayName:"쑤저우 궤도교통 환승역"},kunmingRTBasic:{displayName:"쿤밍 궤도교통 기본역"},kunmingRTInt:{displayName:"쿤밍 궤도교통 환승역"},MRTBasic:{displayName:"싱가포르MRT기본역",isTram:"LRT역이에요"},MRTInt:{displayName:"싱가포르MRT환승역"},jrEastBasic:{displayName:"JR 동일본 기본 역",nameOffset:"이름 오프셋",textOneLine:"한 줄로 표시된 이름",textVertical:"수직 이름",important:"중요한 역",lines:"환승 노선 오프셋"},jrEastImportant:{displayName:"JR 동일본 중요 역",textVertical:"수직 이름",mostImportant:"가장 중요한 역",minLength:"스테이션의 최소 길이"},foshanMetroBasic:{displayName:"포산 지하철 기본역",open:"개통여부",secondaryNameZh:"한자 제2명칭",secondaryNameEn:"영문 제2명칭",tram:"시가 전차"},qingdaoMetro:{displayName:"칭다오 지하철역",isInt:"환승역인가"},tokyoMetroBasic:{displayName:"도쿄메트로 기본역",nameOffset:"이름 오프셋",textVertical:"업종명",lineCode:"라인 코드",stationCode:"역 코드"},tokyoMetroInt:{displayName:"도쿄메트로 환승역",mereOffset:{displayName:"단순한 오프셋 이름",none:"없음",left1:"왼쪽(적음)",left2:"왼쪽(더)",right1:"오른쪽(적음)",right2:"맞아요 (더)",up:"위로",down:"아래에"},importance:{displayName:"역 중요성",default:"기본",middle:"가운데",high:"높은"},align:{displayName:"아이콘 정렬",horizontal:"수평의",vertical:"수직의"}},londonTubeCommon:{stepFreeAccess:"단차 없는 접근",stepFreeAccessNone:"없음",stepFreeAccessTrain:"거리에서 열차까지",stepFreeAccessPlatform:"거리에서 플랫폼까지"},londonTubeBasic:{displayName:"런던 지하철 기본역",terminal:"종착역",shareTracks:"선로 공유",shareTracksIndex:"선로 공유 지수"},londonTubeInt:{displayName:"런던 지하철 환승역"},londonRiverServicesInt:{displayName:"런던 강 서비스 환승역"},guangdongIntercityRailway:{displayName:"광둥 시외 기차역"}},lines:{reconcileId:"연결 선분 고유 식별자",common:{offsetFrom:"시작점 오프셋",offsetTo:"끝점 오프셋",startFrom:"여기서부터 시작",roundCornerFactor:"회전원각인자",from:"에서",to:"까지",parallelDisabled:"이 선이 평행하기 때문에 일부 속성이 비활성화되었습니다.",changeInBaseLine:"기본선에서 변경하십시오:"},simple:{displayName:"기본 선분",offset:"오프셋"},diagonal:{displayName:"135° 접힌 선분"},perpendicular:{displayName:"90° 수직 선분"},rotatePerpendicular:{displayName:"90° 수직 경로 회전"},singleColor:{displayName:"단색 스타일"},shmetroVirtualInt:{displayName:"상해 지하철 역 환승 모습"},shanghaiSuburbanRailway:{displayName:"상하이 도시철도 스타일",isEnd:"끝 범위"},gzmtrVirtualInt:{displayName:"광저우 지하철 역 환승 모습"},gzmtrLoop:{displayName:"광저우 지하철 순환선 스타일"},chinaRailway:{displayName:"중국 철도 모습"},bjsubwaySingleColor:{displayName:"베이징 지하철 단색 스타일"},bjsubwayTram:{displayName:"베이징 지하철 노면 전차 모습"},bjsubwayDotted:{displayName:"베이징 지하철 점선 스타일"},dualColor:{displayName:"이색 스타일",swap:"색을 바꾸기",colorA:"색깔 A",colorB:"색깔 B"},river:{displayName:"강 스타일",width:"폭"},mtrRaceDays:{displayName:"홍콩 MTR 경마일 스타일"},mtrLightRail:{displayName:"홍콩 MTR 경전철 스타일"},mtrUnpaidArea:{displayName:"홍콩 MTR 미결제 구역 스타일"},mtrPaidArea:{displayName:"홍콩 MTR 결제완료 구역 스타일"},mrtUnderConstruction:{displayName:"싱가포르 MRT 공사중 스타일"},mrtSentosaExpress:{displayName:"싱가포르 MRT 센토사 익스프레스 스타일"},jrEastSingleColor:{displayName:"JR 동일본 단색 스타일"},jrEastSingleColorPattern:{displayName:"JR 동일본 단색 크로스해치 패턴 스타일"},lrtSingleColor:{displayName:"싱가포르 LRT 단색 스타일"},londonTubeInternalInt:{displayName:"런던 지하철 내부 환승 스타일"},londonTube10MinWalk:{displayName:"런던 지하철 10분 이내 도보 환승 스타일"},londonTubeTerminal:{displayName:"런던 지하철 종착 스타일"},londonRail:{displayName:"런던 철도 스타일",limitedService:"제한 서비스/혼잡 시간대만",colorBackground:"배경 색상",colorForeground:"전경 색상"},londonSandwich:{displayName:"런던 샌드위치 스타일"},londonLutonAirportDART:{displayName:"런던 루튼 공항 DART 스타일"},londonIFSCloudCableCar:{displayName:"런던 IFS 클라우드 케이블카 스타일"},guangdongIntercityRailway:{displayName:"광동성 도시간 철도 스타일"}},edges:{},footer:{duplicate:"복사",copy:"복사",remove:"삭제"}}},header:{popoverHeader:"당신은 환경을<1>{{environment}}탐색하고 있습니다",popoverBody:"최신 RMP를 테스트하고 있습니다.제안 사항이 있으시면 언제든지 https://github.com/railmapgen/rmp/issues에 제출해 주십시오.",search:"방송국 검색",open:{new:"신 프로젝트",config:"프로젝트 가져오기",projectRMG:"RMG 프로젝트에서 가져오기",invalidType:"잘못된 파일 형식입니다! JSON 형식의 파일만 허용됩니다.",unknownError:"업로드된 파일의 파싱 중 알 수 없는 오류가 발생했습니다. 다시 시도해주세요.",gallery:"갤러리에서 가져오기",tutorial:"튜토리얼 시작",importFromRMPGallery:"템플릿 {{id}}가 가져 왔습니다. 이 변경 사항에 만족하지 않으십니까? Ctrl + Z 또는 실행 취소 버튼을 사용하여 실행 취소하세요.",failToImportFromRMPGallery:"갤러리에서 {{id}}를 가져올 수 없습니다. 파일을 찾을 수 없습니다."},download:{config:"프로젝트 내보내기",image:"사진 내보내기","2rmg":{title:"RMG 프로젝트로 내보내기",type:{line:"일직선",loop:"고리",branch:"지선"},placeholder:{chinese:"중국어 라인 이름",english:"영어 줄 이름",lineCode:"노선 번호"},info1:"이 기능은 RMP 프로젝트를 RMG 프로젝트로 변환하는 데 사용됩니다.",info2:"변환할 수 있는 사용 가능한 라인들은 다음과 같습니다. 왼쪽 텍스트 상자에 중국어 라인 이름을 입력하고, 가운데에 영어 라인 이름을 입력하며, 오른쪽에 (광저우 메트로 스타일용) 라인 코드를 입력한 다음, 오른쪽의 다운로드 버튼을 클릭하여 RMG 프로젝트를 저장할 수 있습니다.",noline:"사용 가능한 라인이 없습니다.",download:"다운로드",downloadInfo:"출발 역을 선택하고 클릭하십시오."},format:"파일 종류",png:"PNG 이미지",svg:"SVG 이미지",svgVersion:"버전","svg1.1":"1.1 (Adobe Illustrator 호환)",svg2:"2 (현대 브라우저 호환)",transparent:"투명 배경",scale:"확대/축소",disabledScaleOptions:"브라우저의 캔버스 제한으로 인해 일부 스케일 옵션이 비활성화되었습니다.",disabledScaleOptionsWorkarounds:"가능한 해결 방법으로는 이 CLI 도구를 사용하여 SVG에서 이미지를 생성하는 것이 있습니다:",imageTooBig:"이미지가 너무 크기 때문에 브라우저에서 생성할 수 없습니다!",useSystemFonts:"캔버스에서 미리보기된 글꼴 대신 시스템 글꼴 사용",shareInfo1:"이 사진을 공유할 때",shareInfo2:"링크를 첨부할 것입니다.",termsAndConditions:"약관 및 세칙",termsAndConditionsInfo:"동의",period:".",confirm:"다운로드"},donation:{title:"기부",openCollective:"Open Collective",viaUSD:"Paypal 또는 Visa 카드를 통해 달러로 기부하기.",afdian:"爱发电",viaCNY:"Alipay 또는 Wechat Pay를 통해 인민폐로 기부하기."},settings:{title:"설정",pro:"이것은 PRO 기능이며, 구독이 필요한 계정입니다.",proWithTrial:"이것은 PRO 기능이며, 제한된 무료 체험이 가능합니다.",proLimitExceed:{master:"마스터 노드가 무료 사용 한도를 초과했습니다.",parallel:"평행선이 무료 사용 한도를 초과했습니다.",solution:"경고를 해제하려면 이 항목들을 제거하거나 구독을 통해 더 많은 기능을 잠금 해제하세요!"},subscription:{title:"구독 상태","logged-out":"현재 로그아웃 상태입니다.",free:"로그인 완료! 더 많은 기능을 사용하려면 구독하세요!",subscriber:"구독해주셔서 감사합니다! 모든 기능을 즐기세요!",expired:"로그인 상태가 만료되었습니다. 다시 로그인 해주세요."},preference:{title:"선호",keepLastPath:"다음 이동에서 배경을 클릭할 때까지 계속 선을 그립니다",autoParallel:"새 선을 기존 선과 평행하게 자동으로 설정합니다",randomStationNames:{title:"생성 시 역 이름을 랜덤으로 설정",none:"없음",shmetro:"상하이",bjsubway:"베이징"}},shortcuts:{title:"바로 가기",keys:"키",description:"설명",f:"마지막 도구 사용.",s:"선택하다.",arrows:"캔버스를 약간 이동합니다.",ijkl:"선택한 역을 약간 이동합니다.",shift:"여러 항목 선택.",alt:"정밀한 이동.",delete:"선택한 역을 삭제합니다.",cut:"잘라내기.",copy:"복사하다.",paste:"붙여넣다.",undo:"취소하다.",redo:"다시 하다."},procedures:{title:"절차",translate:{title:"노드 좌표 변환",content:"모든 노드의 x 및 y에 다음 오프셋을 추가:",x:"X축",y:"Y축"},scale:{title:"스케일 노드의 좌표",content:"모든 노드의 x 및 y에 다음 값을 곱하:",factor:"스케일 팩터"},changeType:{title:"모든 객체의 속성 변경",any:"어느"},changeZIndex:"일괄적으로 깊이 변경",changeStationType:{title:"역의 종류를 대량으로 수정",changeFrom:"이 유형의 모든 역:",changeTo:"이 유형의 역으로 변환:",info:"역 유형을 변경하면 이름을 제외한 모든 고유한 속성이 제거됩니다.저장했다가 다시 실행!"},changeLineStyleType:{title:"일괄적으로 선 스타일 변경",changeFrom:"이 스타일의 모든 선을 변경하세요:",changeTo:"이 스타일에:",info:"선 스타일을 변경하면 연결을 제외한 선의 모든 특정 속성이 제거됩니다. 변경하기 전에 저장하세요!"},changeLinePathType:{title:"일괄적으로 라인 경로 변경",changeFrom:"이 경로의 모든 줄을 변경하세요:",changeTo:"이 길로:"},changeColor:{title:"일괄 색상 변경",changeFrom:"이 색상의 모든 개체를 변경합니다.:",changeTo:"이 색상에:",any:"모든 색상에서"},removeLines:{title:"단일 색상의 선 제거",content:"이 색상의 선을 제거하세요: "},updateColor:{title:"색상 업데이트",content:"최신 값으로 모든 색상을 업데이트합니다.",success:"모든 색상을 성공적으로 업데이트했습니다.",error:"모든 색상을 업데이트하는 동안 오류가 발생했습니다: {{e}}."},unlockSimplePath:{title:"간단 경로 잠금 해제",content1:"Rail Map Painter 애플리케이션은 확립된 관례를 준수하면서도 철도지도 작성을 위한 대화식 플랫폼을 제공하기 위해 노력합니다. 이러한 관례 중 하나는 특히 해리 벡의 혁신적인 작업에서 비롯되었습니다. 그의 개척적인 기여는 공식적으로 1932년에 인정받았으며 일반 대중으로부터 즉각적인 찬사를 받았습니다. 현재는 정보 디자인 분야에서 중요한 본보기로 자리 잡고 있습니다. 이 패러다임적인 접근 방식은 전 세계적인 규모의 교통 카토그래피에서 널리 구현되었으나 성공의 정도는 다양합니다.",content2:"이 애플리케이션은 기존 관례에 위배될 가능성이 있기 때문에 간단한 경로를 활용하는 옵션을 기본 설정으로 가려놓았습니다. 또한 Rail Map Painter 갤러리에 제출되는 작품은 엄격한 심사를 받으며, 단일 색상 스타일로 간단한 경로를 사용하는 작품은 명확히 거부됩니다.",content3:"그래도 이 옵션을 잠금 해제하고 기부할 때 Easy Path를 사용할 수 있는 기회를 보유하고 있습니다. 획득 후에도 단순 경로의 사용은 단색 스타일로 제한된다는 점에 유의해야 합니다.",check:"간단한 경로 잠금 해제",unlocked:"이미 해제됨"},masterManager:{title:"모든 마스터 노드를 관리",id:"ID",label:"레이블",type:"유형",types:{MiscNode:"기타 노드",Station:"스테이션"},importTitle:"마스터 매개변수 업로드",importFrom:"가져온 스타일 사용",importOther:"새 스타일 가져오기",importParam:"구성 정보 붙여넣기"}},telemetry:{title:"원격 측정",info:"지하철 노선도 그리기를 개선하고 기여자가 프로젝트를 향상시키는 데 동기를 부여하기 위해 Google Analytics를 통해 익명의 사용 데이터를 수집합니다. 이 데이터는 사용자 경험을 향상하고 도구 기능을 최적화하는 데에만 사용되며, 제3자와 절대 공유되지 않습니다.",essential:"기본",essentialTooltip:"지하철 노선도 툴킷에서 이 전역 설정을 변경하세요",essentialInfo:"지하철 노선도 그리기는 도구를 언제, 어떻게 사용하는지 이해하기 위해 기본적인 사용 데이터를 수집합니다. 안심하세요. 개인 식별이 가능한 정보나 프로젝트 데이터는 절대 수집되지 않습니다.",essentialLink:"Google Analytics에서 수집할 수 있는 세부 필드를 보려면 이 링크를 클릭하세요.",additional:"추가",additionalInfo:"지하철 노선도 그리기는 프로젝트 생성이나 역 추가와 같은 입력 시의 상호작용 데이터도 수집합니다. 이러한 추가 데이터도 익명으로 처리되며, 도구를 개선하기 위한 통계 분석에만 사용됩니다."}},about:{title:"대함",rmp:"지하철 노선도 그리기",railmapgen:"철도 지도 툴킷 프로젝트 노선도 툴킷",desc:"다양한 도시의 역을 자유롭게 끌어서 90도 또는 135도의 둥근 모서리 선으로 연결함으로써 여러분만의 철도 지도를 디자인해요!",content1:"우리가 가졌던 자유와 평등을 기념한다.",content2:"2022년 6월 1일 상해",contributors:"기여자",coreContributors:"핵심 기여자",styleContributors:"스타일 기여자",langonginc:"기억에 남을 삶을 살아보세요.","203IhzElttil":"상하이 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",Swiftiecott:"베이징 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",Minwtraft:"광저우 지하철의 역들이 원래 디자인과 일치하도록 확실한 작업을 해준 그에게 특별한 감사의 말씀을 전합니다.",contactUs:"우리에게 연락하기",github:"프로젝트 저장소",githubContent:"무슨 문제라도 있나요? 여기서 문제를 검색하거나 제기하십시오!",slack:"슬랙 그룹",slackContent:"이 슬랙 채널에서 채팅해요!"}}},gs={color:"颜色",warning:"警告",cancel:"取消",apply:"应用",remove:"移除",close:"关闭",noShowAgain:"不再显示",rmtPromotion:"您绝对不想错过的全能工具包!",panel:{tools:{showLess:"显示更少",section:{lineDrawing:"线段绘制",stations:"车站",miscellaneousNodes:"杂项节点"},select:"多选",learnHowToAdd:{station:"了解如何添加车站!","misc-node":"了解如何添加节点!",line:"了解如何添加线段样式!"}},details:{header:"详情",info:{title:"基本信息",id:"唯一识别符",zIndex:"深度",stationType:"车站类型",linePathType:"线段路径类型",lineStyleType:"线段样式类型",type:"类型",parallel:"平行线段",parallelIndex:"平行线段索引"},multipleSelection:{title:"多重选取",change:"修改选中对象的属性",selected:"选中的对象:",show:"显示",station:"车站",miscNode:"杂项节点",edge:"线段"},changeStationTypeContent:"修改车站类型会移除所有独特属性除了名称。",changeLineTypeContent:"修改线段类型会移除所有独特属性。",changeType:"更改类型",nodePosition:{title:"节点位置",pos:{x:"横坐标",y:"纵坐标"}},lineExtremities:{title:"线段两端",source:"起点",target:"终点",sourceName:"起点名称",targetName:"终点名称"},specificAttrsTitle:"独特属性",unknown:{error:"哎呀 :( 我们无法识别此{{category}}。也许它是在更新版本中创建的。",node:"节点",linePath:"线段路径",lineStyle:"线段样式"},nodes:{common:{nameZh:"中文线路名称",nameEn:"英文线路名称",nameJa:"日语线路名称",num:"线路号"},virtual:{displayName:"虚拟节点"},shmetroNumLineBadge:{displayName:"上海地铁数字线路标识"},shmetroTextLineBadge:{displayName:"上海地铁文字线路标识"},gzmtrLineBadge:{displayName:"广州地铁线路标识",tram:"有轨电车",span:"跨行显示数字"},bjsubwayNumLineBadge:{displayName:"北京地铁数字线路标识"},bjsubwayTextLineBadge:{displayName:"北京地铁文字线路标识"},berlinSBahnLineBadge:{displayName:"柏林城市快铁线路标识"},berlinUBahnLineBadge:{displayName:"柏林地铁线路标识"},suzhouRTNumLineBadge:{displayName:"苏州轨道交通数字线路标识",branch:"是否支线"},chongqingRTNumLineBadge:{displayName:"重庆轨道交通数字线路标识"},chongqingRTTextLineBadge:{displayName:"重庆轨道交通文字线路标识"},shenzhenMetroNumLineBadge:{displayName:"深圳地铁数字线路标识",branch:"是否为支线"},mrtDestinationNumbers:{displayName:"新加坡MRT终点数字"},mrtLineBadge:{displayName:"新加坡MRT线路标识",isTram:"是LRT线路标识"},jrEastLineBadge:{displayName:"JR东日本线路标识",crosshatchPatternFill:"用网状图案填充"},qingdaoMetroNumLineBadge:{displayName:"青岛地铁数字线路标识",numEn:"英文线路号",showText:"显示文字"},guangdongIntercityRailwayLineBadge:{displayName:"广东城际铁路线路标识"},londonArrow:{displayName:"伦敦箭头",type:"类型",continuation:"延续",sandwich:"三明治",tube:"地铁"},master:{displayName:"大师节点",type:"大师节点类型",undefined:"未定义"},facilities:{displayName:"设施",type:"类型"},text:{displayName:"任意文字",content:"内容",fontSize:"文字大小",lineHeight:"行高度",textAnchor:"文字锚点",start:"开始",middle:"居中",end:"结束",auto:"自动",hanging:"悬挂",dominantBaseline:"显性基线",language:"哪个语言的字体系列",zh:"中文",en:"英文",mtr__zh:"港铁中文",mtr__en:"港铁英文",berlin:"柏林 S/U Bahn",mrt:"新加坡地铁",jreast_ja:"JR东日本日语",jreast_en:"JR东日本英语",rotate:"旋转",italic:"斜体",bold:"粗体"}},stations:{common:{nameZh:"中文名称",nameEn:"英文名称",nameJa:"日语名称",nameOffsetX:"名称横向偏移",nameOffsetY:"名称纵向偏移",rotate:"车站旋转角度",lineCode:"路线编号",stationCode:"车站编号",left:"左",middle:"中间",right:"右",top:"顶部",bottom:"底部"},interchange:{title:"换乘",within:"同站换乘",outStation:"出站换乘",outSystem:"系统外换乘",addGroup:"添加换乘组合",noInterchanges:"非换乘站",nameZh:"中文名称",nameEn:"英文名称",add:"添加换乘",copy:"复制换乘",remove:"删除换乘"},shmetroBasic:{displayName:"上海地铁基本车站"},shmetroBasic2020:{displayName:"上海地铁基本车站(2020)"},shmetroInt:{displayName:"上海地铁换乘车站",height:"车站高度",width:"车站宽度"},shmetroOsysi:{displayName:"上海地铁转乘车站"},shanghaiSuburbanRailway:{displayName:"上海市域铁路车站"},gzmtrBasic:{displayName:"广州地铁基本车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",tram:"有轨电车"},gzmtrInt:{displayName:"广州地铁换乘车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",foshan:"佛山"},gzmtrInt2024:{displayName:"广州地铁换乘站(2024)",columns:"站点列数",topHeavy:"优先将更多站点放在上方",anchorAt:"锚点位置",anchorAtNone:"居中",osiPosition:"出站换乘",osiPositionNone:"无",osiPositionLeft:"左侧",osiPositionRight:"右侧"},bjsubwayBasic:{displayName:"北京地铁基本车站",open:"是否开通"},bjsubwayInt:{displayName:"北京地铁换乘车站",outOfStation:"出站换乘"},mtr:{displayName:"香港MTR车站"},suzhouRTBasic:{displayName:"苏州轨道交通基本车站",textVertical:"垂直名称"},suzhouRTInt:{displayName:"苏州轨道交通换乘车站"},kunmingRTBasic:{displayName:"昆明轨道交通基本车站"},kunmingRTInt:{displayName:"昆明轨道交通换乘车站"},MRTBasic:{displayName:"新加坡MRT基本车站",isTram:"是LRT车站"},MRTInt:{displayName:"新加坡MRT换乘车站"},jrEastBasic:{displayName:"JR东日本基本车站",nameOffset:"名称偏移",textOneLine:"名称在一行中",textVertical:"垂直名称",important:"重要车站",lines:"换乘线偏移"},jrEastImportant:{displayName:"JR东日本重要车站",textVertical:"垂直名称",mostImportant:"最重要车站",minLength:"车站的最小长度"},foshanMetroBasic:{displayName:"佛山地铁基本车站",open:"是否开通",secondaryNameZh:"中文第二名称",secondaryNameEn:"英文第二名称",tram:"有轨电车"},qingdaoMetro:{displayName:"青岛地铁车站",isInt:"是换乘站"},tokyoMetroBasic:{displayName:"东京地铁基本车站",nameOffset:"名称偏移",textVertical:"垂直站名",lineCode:"线路编号",stationCode:"车站编号"},tokyoMetroInt:{displayName:"东京地铁换乘车站",mereOffset:{displayName:"名称微小偏移",none:"无",left1:"左 (较少)",left2:"左 (较大)",right1:"右 (较少)",right2:"右 (较大)",up:"上",down:"下"},importance:{displayName:"车站重要性",default:"默认",middle:"中",high:"高"},align:{displayName:"图标排列方向",horizontal:"横向",vertical:"纵向"}},londonTubeCommon:{stepFreeAccess:"无障碍通行",stepFreeAccessNone:"无",stepFreeAccessTrain:"从街道到列车",stepFreeAccessPlatform:"从街道到站台"},londonTubeBasic:{displayName:"伦敦地铁基本车站",terminal:"终点站",shareTracks:"轨道共享",shareTracksIndex:"轨道共享索引"},londonTubeInt:{displayName:"伦敦地铁换乘车站"},londonRiverServicesInt:{displayName:"伦敦河流服务换乘站"},guangdongIntercityRailway:{displayName:"广东城际铁路车站"}},lines:{reconcileId:"合并线段唯一标识符",common:{offsetFrom:"起始点偏移",offsetTo:"结束点偏移",startFrom:"从这里开始",roundCornerFactor:"转折圆角因子",from:"从",to:"到",parallelDisabled:"由于此线段是平行的,因此某些属性已被禁用。",changeInBaseLine:"在基准线段中更改它们:"},simple:{displayName:"基本线段",offset:"偏移"},diagonal:{displayName:"135°折线线段"},perpendicular:{displayName:"90°垂直线段"},rotatePerpendicular:{displayName:"90°旋转垂直线段"},singleColor:{displayName:"纯色样式"},shmetroVirtualInt:{displayName:"上海地铁出站换乘样式"},shanghaiSuburbanRailway:{displayName:"上海市域铁路样式",isEnd:"结束区间"},gzmtrVirtualInt:{displayName:"广州地铁出站换乘样式"},gzmtrLoop:{displayName:"广州地铁环线样式"},chinaRailway:{displayName:"中国铁路样式"},bjsubwaySingleColor:{displayName:"北京地铁纯色样式"},bjsubwayTram:{displayName:"北京地铁有轨电车样式"},bjsubwayDotted:{displayName:"北京地铁虚线样式"},dualColor:{displayName:"双色样式",swap:"切换颜色",colorA:"颜色A",colorB:"颜色B"},river:{displayName:"河流样式",width:"宽度"},mtrRaceDays:{displayName:"香港MTR赛马日样式"},mtrLightRail:{displayName:"香港MTR轻铁样式"},mtrUnpaidArea:{displayName:"香港MTR未付费区域样式"},mtrPaidArea:{displayName:"香港MTR付费区域样式"},mrtUnderConstruction:{displayName:"新加坡MRT在建样式"},mrtSentosaExpress:{displayName:"新加坡MRT圣淘沙捷运样式"},jrEastSingleColor:{displayName:"JR东日本单色样式"},jrEastSingleColorPattern:{displayName:"JR东日本单色网状图案样式"},lrtSingleColor:{displayName:"新加坡LRT纯色样式"},londonTubeInternalInt:{displayName:"伦敦地铁内部换乘样式"},londonTube10MinWalk:{displayName:"伦敦地铁10分钟步行换乘样式"},londonTubeTerminal:{displayName:"伦敦地铁终点站样式"},londonRail:{displayName:"伦敦铁路样式",limitedService:"有限服务/仅限高峰时段",colorBackground:"背景颜色",colorForeground:"前景颜色"},londonSandwich:{displayName:"伦敦三明治样式"},londonLutonAirportDART:{displayName:"伦敦卢顿机场DART样式"},londonIFSCloudCableCar:{displayName:"伦敦IFS云缆车样式"},guangdongIntercityRailway:{displayName:"广东城际铁路样式"}},edges:{},footer:{duplicate:"重复",copy:"复制",remove:"移除"}}},header:{popoverHeader:"你正在浏览<1>{{environment}}环境!",popoverBody:"我们正在测试最新的RMP。如果你有任何建议,欢迎在 https://github.com/railmapgen/rmp/issues 上提出。",search:"搜索车站",open:{new:"新项目",config:"导入项目",projectRMG:"从RMG项目中导入",invalidType:"无效的文件类型!仅接受JSON格式的文件。",unknownError:"解析上传文件时发生未知错误!请重试。",gallery:"从画廊中导入",tutorial:"开始教程",importFromRMPGallery:"模板 {{id}} 已导入。对此更改不满意?可通过 Ctrl + Z 或撤销按钮进行撤销。",failToImportFromRMPGallery:"无法从画廊导入{{id}},找不到文件。"},download:{config:"导出项目",image:"导出图片","2rmg":{title:"导出RMG项目",type:{line:"直线",loop:"环线",branch:"支线"},placeholder:{chinese:"中文线路名称",english:"英文线路名称",lineCode:"路线编号"},info1:"这个功能可将RMP项目导出为RMG项目。",info2:"下面的线路将可以被导出,你可以在左侧文本框中输入中文线路名称、在中间输入英文线路名称、右边输入线路编号(广州地铁样式专用),随后点击下载按钮即可导出RMG项目。",noline:"未找到可用线路。",download:"下载",downloadInfo:"请选择一个起始车站,并点击它。"},format:"文件种类",png:"PNG图像",svg:"SVG图像",svgVersion:"版本","svg1.1":"1.1(适用于Adobe Illustrator)",svg2:"2(适用于现代浏览器)",transparent:"透明背景",scale:"缩放",disabledScaleOptions:"由于浏览器的画布限制,部分缩放选项被禁用。",disabledScaleOptionsWorkarounds:"可能的解决方法包括使用此命令行工具从SVG生成图像:",imageTooBig:"图像太大,无法在您的浏览器中生成!",useSystemFonts:"使用系统字体而不是在画布上预览的字体",shareInfo1:"当我分享此图片时我会附上",shareInfo2:"和它的链接。",termsAndConditions:"条款及细则",termsAndConditionsInfo:"我同意",period:"。",confirm:"下载"},donation:{title:"捐赠",openCollective:"Open Collective",viaUSD:"通过Paypal或Visa卡以美元捐赠。",afdian:"爱发电",viaCNY:"通过支付宝或微信支付以人民币捐赠。"},settings:{title:"设置",pro:"这是一个专业功能,需要带有订阅的账户。",proWithTrial:"这是一个PRO功能,并提供有限的免费试用。",proLimitExceed:{master:"大师节点超出了免费额度。",parallel:"平行线段超出了免费额度。",solution:"移除它们以消除此警告,或订阅以解锁更多功能!"},subscription:{title:"订阅状态","logged-out":"您当前已登出。",free:"已登录!订阅以解锁更多功能!",subscriber:"感谢您的订阅!享受所有功能吧!",expired:"登录状态已过期。请登出后重新登录。"},preference:{title:"偏好",keepLastPath:"在下一次操作中持续画线段直到点击背景",autoParallel:"自动将新线段设置为与现有线段平行",randomStationNames:{title:"创建时将站名随机化",none:"无",shmetro:"上海",bjsubway:"北京"}},shortcuts:{title:"快捷键",keys:"键",description:"描述",f:"使用上一个工具。",s:"多选。",arrows:"稍微移动画布。",ijkl:"稍微移动所选站点。",shift:"多选。",alt:"精确移动。",delete:"删除所选站点。",cut:"剪切。",copy:"复制。",paste:"粘贴。",undo:"撤销。",redo:"重做。"},procedures:{title:"过程",translate:{title:"转化节点坐标",content:"将以下偏移加到所有节点的x和y上:",x:"横坐标",y:"纵坐标"},scale:{title:"缩放节点坐标",content:"将所有节点的x和y乘以以下值:",factor:"缩放因子"},changeType:{title:"修改所有对象的属性",any:"任意"},changeZIndex:"批量修改深度",changeStationType:{title:"批量修改车站种类",changeFrom:"将此类型的所有车站:",changeTo:"转换为这个类型的车站:",info:"修改车站类型会移除所有独特属性除了名称。保存再操作!"},changeLineStyleType:{title:"批量修改线段样式",changeFrom:"将此样式的所有线段:",changeTo:"转换为这个样式的线段:",info:"修改线段样式会移除所有独特属性除了连通性。保存再操作!"},changeLinePathType:{title:"批量修改线段类型",changeFrom:"将此类型的所有线段:",changeTo:"转换为这个类型的线段:"},changeColor:{title:"批量修改颜色",changeFrom:"将此颜色的所有对象:",changeTo:"转换为这个颜色:",any:"从任何颜色转换"},removeLines:{title:"移除所有纯色线段",content:"移除具有此颜色的所有线段: "},updateColor:{title:"更新颜色",content:"使用最新值更新所有颜色。",success:"成功更新所有颜色。",error:"更新所有颜色时出错:{{e}}。"},unlockSimplePath:{title:"解锁简单路径",content1:"地铁线路图绘制器应用致力于在遵循既定惯例的前提下,提供一个有利于创建地铁线路图的互动平台。在这些惯例中,一种特别著名的风格源自哈利·贝克的创新工作。他的开创性贡献于1932年得到官方认可,并在大众中迅速赢得了声誉。目前,它在信息设计领域具有重要的示范意义,在全球范围内的交通制图中得到了广泛的实施,尽管成功程度有所不同。",content2:"应用程序固有地隐藏了使用简单路径的选项,因为其部署有可能违反既定的惯例。默认情况下,此特定功能保持隐蔽。此外,提交到地铁线路图绘制器画廊的作品将经过严格的审查,坚决拒绝使用单色风格的简单路径的构图。",content3:"尽管如此,我们仍然保留了解锁此选项的机会,当您订阅后,方可使用简单路径。需要注意的是,即使获得后,简单路径的使用也仅限于单色风格。",check:"解锁简单路径",unlocked:"已解锁"},masterManager:{title:"管理全部大师节点",id:"唯一标识",label:"标签",type:"类型",types:{MiscNode:"杂项节点",Station:"车站"},importTitle:"上传大师节点参数",importFrom:"使用导入的样式",importOther:"导入新样式",importParam:"粘贴配置信息"}},telemetry:{title:"遥测",info:"为了帮助改进地铁线路图绘制器并激励贡献者提升项目,我们通过 Google Analytics 收集匿名使用数据。这些数据仅用于增强用户体验和优化工具功能,绝不会与第三方共享。",essential:"基础",essentialTooltip:"在地铁线路图工具包中更改此全局设置",essentialInfo:"地铁线路图绘制器收集一些基本使用数据,以帮助我们了解用户如何以及何时与工具交互。请放心,我们从不收集任何可识别个人身份的信息或您的项目数据。",essentialLink:"点击此链接查看 Google Analytics 可能收集的详细字段。",additional:"额外",additionalInfo:"地铁线路图绘制器还会收集有关交互的数据,例如项目创建或站点添加等操作。这些额外数据同样是匿名的,仅用于统计分析以帮助我们改进工具。"}},about:{title:"关于",rmp:"地铁线路图绘制器",railmapgen:"一个线路图工具包项目",desc:"通过自由拖动来自不同城市的车站并以 90 或 135 度圆角线段将它们连接起来,设计您自己的铁路地图!",content1:"谨以此纪念我们曾拥有的自由与平等。",content2:"06/01/2022于上海",contributors:"贡献者",coreContributors:"核心贡献者",styleContributors:"样式贡献者",langonginc:"活出值得铭记的人生。","203IhzElttil":"特别感谢他勤勉工作,确保上海地铁站与原始设计相符。",Swiftiecott:"特别感谢他勤勉工作,确保北京地铁站与原始设计相符。",Minwtraft:"特别感谢他勤勉工作,确保广州地铁站与原始设计相符。",contactUs:"联系我们",github:"项目仓库",githubContent:"遇到任何问题?在这里搜索或提出一个问题!",slack:"Slack群组",slackContent:"在这些Slack频道中讨论!"}}},fs={color:"顏色",warning:"警告",cancel:"取消",apply:"應用",remove:"移除",close:"關閉",noShowAgain:"不要再顯示",rmtPromotion:"絕對不想錯過的多功能工具包!",panel:{tools:{showLess:"顯示更少",section:{lineDrawing:"線段繪製",stations:"車站",miscellaneousNodes:"雜項節點"},select:"多選",learnHowToAdd:{station:"了解如何添加車站!","misc-node":"了解如何添加節點!",line:"了解如何添加線條樣式!"}},details:{header:"詳情",info:{title:"基本信息",id:"唯一識別符",zIndex:"深度",stationType:"車站類型",linePathType:"線段路徑類型",lineStyleType:"線段樣式類型",type:"類型",parallel:"平行線段",parallelIndex:"平行線段索引"},multipleSelection:{title:"多重選取",change:"修改選取物件的屬性",selected:"選取的物件:",show:"顯示",station:"車站",miscNode:"雜項節點",edge:"線段"},changeStationTypeContent:"修改車站類型會移除所有獨特屬性除了名稱。",changeLineTypeContent:"修改線段類型會移除所有獨特屬性。",changeType:"更改類型",nodePosition:{title:"節點位置",pos:{x:"橫坐標",y:"縱坐標"}},lineExtremities:{title:"線段兩端",source:"起點",target:"終點",sourceName:"起點名稱",targetName:"終點名稱"},specificAttrsTitle:"獨特屬性",unknown:{error:"哎呀 :( 我們無法識別此{{category}}。也許它是在更新版本中創建的。",node:"節點",linePath:"線段路徑",lineStyle:"線段樣式"},nodes:{common:{nameZh:"中文線路名稱",nameEn:"英文線路名稱",nameJa:"日語線路名稱",num:"線路號"},virtual:{displayName:"虛擬節點"},shmetroNumLineBadge:{displayName:"上海地鐵數字線路標識"},shmetroTextLineBadge:{displayName:"上海地鐵文字線路標識"},gzmtrLineBadge:{displayName:"廣州地鐵線路標識",tram:"輕軌",span:"跨行顯示數字"},bjsubwayNumLineBadge:{displayName:"北京地鐵數字線路標識"},bjsubwayTextLineBadge:{displayName:"北京地鐵文字線路標識"},berlinSBahnLineBadge:{displayName:"柏林城市快鐵線路標識"},berlinUBahnLineBadge:{displayName:"柏林地鐵線路標識"},suzhouRTNumLineBadge:{displayName:"蘇州軌道交通數字線路標識",branch:"是否支線"},chongqingRTNumLineBadge:{displayName:"重慶軌道交通數字線路標識"},chongqingRTTextLineBadge:{displayName:"重慶軌道交通文字線路標識"},shenzhenMetroNumLineBadge:{displayName:"深圳地鐵數字線路標識",branch:"是否支線"},mrtDestinationNumbers:{displayName:"新加坡MRT終點數字"},mrtLineBadge:{displayName:"新加坡MRT線路標識",isTram:"是LRT線路標識"},jrEastLineBadge:{displayName:"JR東日本線路標識",crosshatchPatternFill:"用網狀圖案填充"},qingdaoMetroNumLineBadge:{displayName:"青島地鐵數位線路標識",numEn:"英文線路號",showText:"顯示文字"},guangdongIntercityRailwayLineBadge:{displayName:"廣東城際鐵路線標識"},londonArrow:{displayName:"倫敦箭頭",type:"類型",continuation:"延續",sandwich:"三明治",tube:"地鐵"},master:{displayName:"大師節點",type:"大師節點類型",undefined:"未定義"},facilities:{displayName:"設施",type:"類型"},text:{displayName:"任意文字",content:"內容",fontSize:"文字大小",lineHeight:"行高度",textAnchor:"文字錨點",start:"開始",middle:"中間",end:"結束",auto:"自動",hanging:"懸吊",dominantBaseline:"顯性基線",language:"哪個語言的字體系列",zh:"中文",en:"英文",mtr__zh:"香港地鐵中文",mtr__en:"香港地鐵英文",berlin:"柏林 S/U 地鐵",mrt:"新加坡地鐵",jreast_ja:"JR 東日本日文",jreast_en:"JR 東日本英文",rotate:"旋轉",italic:"斜體",bold:"粗體"}},stations:{common:{nameZh:"中文名稱",nameEn:"英文名稱",nameJa:"日語名稱",nameOffsetX:"名稱橫向偏移",nameOffsetY:"名稱縱向偏移",rotate:"車站旋轉角度",lineCode:"路綫編碼",stationCode:"車站編碼",left:"左",middle:"中間",right:"右",top:"頂部",bottom:"底部"},interchange:{title:"換乘",within:"同站換乘",outStation:"出站換乘",outSystem:"系統外換乘",addGroup:"添加換乘組合",noInterchanges:"非換乘站",nameZh:"中文名稱",nameEn:"英文名稱",add:"添加換乘",copy:"復製換乘",remove:"刪除換乘"},shmetroBasic:{displayName:"上海地鐵基本車站"},shmetroBasic2020:{displayName:"上海地鐵基本車站(2020)"},shmetroInt:{displayName:"上海地鐵換乘車站",height:"車站高度",width:"車站寬度"},shmetroOsysi:{displayName:"上海地鐵轉乘車站"},shanghaiSuburbanRailway:{displayName:"上海市域鐵路車站"},gzmtrBasic:{displayName:"廣州地鐵基本車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",tram:"輕軌"},gzmtrInt:{displayName:"廣州地鐵換乘車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",foshan:"佛山"},gzmtrInt2024:{displayName:"廣州地鐵換乘站(2024)",columns:"站點列數",topHeavy:"優先將更多站點放在上方",anchorAt:"錨點位置",anchorAtNone:"居中",osiPosition:"出站轉車",osiPositionNone:"無",osiPositionLeft:"左側",osiPositionRight:"右側"},bjsubwayBasic:{displayName:"北京地鐵基本車站",open:"是否開通"},bjsubwayInt:{displayName:"北京地鐵換乘車站",outOfStation:"出站轉車"},mtr:{displayName:"香港MTR車站"},suzhouRTBasic:{displayName:"蘇州軌道交通基本車站",textVertical:"垂直名稱"},suzhouRTInt:{displayName:"蘇州軌道交通換乘車站"},kunmingRTBasic:{displayName:"昆明軌道交通基本車站"},kunmingRTInt:{displayName:"昆明軌道交通換乘車站"},MRTBasic:{displayName:"新加坡MRT基本車站",isTram:"是LRT車站"},MRTInt:{displayName:"新加坡MRT換乘車站"},jrEastBasic:{displayName:"JR東日本基本車站",nameOffset:"名稱偏移",textOneLine:"名稱在一行中",textVertical:"垂直名稱",important:"重要車站",lines:"轉乘線偏移"},jrEastImportant:{displayName:"JR東日本重要車站",textVertical:"垂直名稱",mostImportant:"最重要車站",minLength:"車站的最小長度"},foshanMetroBasic:{displayName:"佛山地鐵基本車站",open:"是否開通",secondaryNameZh:"中文第二名稱",secondaryNameEn:"英文第二名稱",tram:"輕軌"},qingdaoMetro:{displayName:"青島地鐵基本車站",isInt:"是換乘站"},tokyoMetroBasic:{displayName:"東京地鐵基本車站",nameOffset:"名稱偏移",textVertical:"垂直站名",lineCode:"線路編號",stationCode:"車站編號"},tokyoMetroInt:{displayName:"東京地鐵轉乘車站",mereOffset:{displayName:"名稱微小偏移",none:"無",left1:"左 (较少)",left2:"左 (较大)",right1:"右 (较少)",right2:"右 (较大)",up:"上",down:"下"},importance:{displayName:"車站重要性",default:"預設",middle:"中",high:"高"},align:{displayName:"圖標排列方向",horizontal:"橫向",vertical:"縱向"}},londonTubeCommon:{stepFreeAccess:"無障礙通行",stepFreeAccessNone:"無",stepFreeAccessTrain:"從街道到列車",stepFreeAccessPlatform:"從街道到月台"},londonTubeBasic:{displayName:"倫敦地鐵基本車站",terminal:"終點站",shareTracks:"軌道共享",shareTracksIndex:"軌道共享指數"},londonTubeInt:{displayName:"倫敦地鐵換乘車站"},londonRiverServicesInt:{displayName:"倫敦河流服務換乘站"},guangdongIntercityRailway:{displayName:"廣東城際鐵路車站"}},lines:{reconcileId:"合並線段唯一標識符",common:{offsetFrom:"起始點偏移",offsetTo:"結束點偏移",startFrom:"從這裏開始",roundCornerFactor:"轉折圓角因子",from:"從",to:"到",parallelDisabled:"由於此線段是平行的,因此某些屬性已被禁用。",changeInBaseLine:"在基準線段中更改它們:"},simple:{displayName:"基本線段",offset:"偏移"},diagonal:{displayName:"135°折線線段"},perpendicular:{displayName:"90°垂直線段"},rotatePerpendicular:{displayName:"90°旋轉垂直線段"},singleColor:{displayName:"純色樣式"},shmetroVirtualInt:{displayName:"上海地鐵出站換乘樣式"},shanghaiSuburbanRailway:{displayName:"上海市域鐵路樣式",isEnd:"結束區間"},gzmtrVirtualInt:{displayName:"廣州地鐵出站換乘樣式"},gzmtrLoop:{displayName:"廣州地鐵環線樣式"},chinaRailway:{displayName:"中國鐵路樣式"},bjsubwaySingleColor:{displayName:"北京地鐵純色樣式"},bjsubwayTram:{displayName:"北京地鐵有軌電車樣式"},bjsubwayDotted:{displayName:"北京地鐵虛線樣式"},dualColor:{displayName:"雙色樣式",swap:"切換顏色",colorA:"顏色A",colorB:"顏色B"},river:{displayName:"河流樣式",width:"寬度"},mtrRaceDays:{displayName:"香港MTR賽馬日樣式"},mtrLightRail:{displayName:"香港MTR輕鐵樣式"},mtrUnpaidArea:{displayName:"香港MTR未付費區域樣式"},mtrPaidArea:{displayName:"香港MTR付費區域樣式"},mrtUnderConstruction:{displayName:"新加坡MRT在建樣式"},mrtSentosaExpress:{displayName:"新加坡MRT聖淘沙捷運樣式"},jrEastSingleColor:{displayName:"JR東日本單色樣式"},jrEastSingleColorPattern:{displayName:"JR東日本單色網狀圖案樣式"},lrtSingleColor:{displayName:"新加坡LRT純色樣式"},londonTubeInternalInt:{displayName:"倫敦地鐵內部換乘樣式"},londonTube10MinWalk:{displayName:"倫敦地鐵10分鐘步行換乘樣式"},londonTubeTerminal:{displayName:"倫敦地鐵終點站樣式"},londonRail:{displayName:"倫敦鐵路樣式",limitedService:"有限服務/只限繁忙時段",colorBackground:"背景顏色",colorForeground:"前景顏色"},londonSandwich:{displayName:"倫敦三明治樣式"},londonLutonAirportDART:{displayName:"倫敦盧頓機場DART樣式"},londonIFSCloudCableCar:{displayName:"倫敦IFS雲纜車樣式"},guangdongIntercityRailway:{displayName:"廣東城際鐵路樣式"}},edges:{},footer:{duplicate:"重複",copy:"複製",remove:"移除"}}},header:{popoverHeader:"你正在瀏覽<1>{{environment}}環境!",popoverBody:"我們正在測試最新的RMP。如果妳有任何建議,歡迎在 https://github.com/railmapgen/rmp/issues 上提出。",search:"搜尋車站",open:{new:"新項目",config:"讀入項目",projectRMG:"從RMG專案中讀入",invalidType:"無效的文件類型!僅接受JSON格式的文件。",unknownError:"解析上傳文件時發生未知錯誤!請重試。",gallery:"從畫廊中讀入",tutorial:"開始教程",importFromRMPGallery:"範本 {{id}} 已匯入。對此更改不滿意?可通過 Ctrl + Z 或撤銷按鈕進行撤銷。",failToImportFromRMPGallery:"無法從畫廊導入{{id}},找不到檔案。"},download:{config:"導出項目",image:"導出圖片","2rmg":{title:"導出RMG項目",type:{line:"直線",loop:"環線",branch:"支線"},placeholder:{chinese:"中文線路名稱",english:"英文線路名稱",lineCode:"路綫編碼"},info1:"這個功能可將RMP項目導出為RMG項目。",info2:"下面的線路將可以被導出,你可以在左側文本框中輸入中文線路名稱、在中間輸入英文線路名稱、右邊輸入線路編號(廣州地鐵樣式專用),隨後點擊下載按鈕即可導出RMG項目。",noline:"未找到可用線路。",download:"下載",downloadInfo:"請選擇一個起始車站,並點擊它。"},format:"檔案種類",png:"PNG影像",svg:"SVG影像",svgVersion:"版本","svg1.1":"1.1(適用於Adobe Illustrator)",svg2:"2(適用於現代瀏覽器)",transparent:"透明背景",scale:"縮放",disabledScaleOptions:"由於您的瀏覽器的畫布限制,部分縮放選項已被禁用。",disabledScaleOptionsWorkarounds:"可能的解決方法包括使用此命令行工具從SVG生成圖像:",imageTooBig:"圖像太大,您的瀏覽器無法生成!",useSystemFonts:"使用系統字型而不是在畫布上預覽的字型",shareInfo1:"當我分享此圖片時我會附上",shareInfo2:"和它的鏈接。",termsAndConditions:"條款及細則",termsAndConditionsInfo:"我同意",period:"。",confirm:"下載"},donation:{title:"捐款",openCollective:"Open Collective",viaUSD:"通過Paypal或Visa卡以美元捐款。",afdian:"爱发电",viaCNY:"通過支付寶或微信支付以人民幣捐款。"},settings:{title:"設置",pro:"這是一個專業功能,需要带有訂閱的帳戶。",proWithTrial:"這是一個PRO功能,並提供有限的免費試用。",proLimitExceed:{master:"大師節點超出了免費額度。",parallel:"平行線段超出了免費額度。",solution:"移除它們以解除此警告,或訂閱以解鎖更多功能!"},subscription:{title:"訂閱狀態","logged-out":"您目前已登出。",free:"已登入!訂閱以解鎖更多功能!",subscriber:"感謝您的訂閱!享受所有功能吧!",expired:"登入狀態已過期。請登出後重新登入。"},preference:{title:"偏好",keepLastPath:"在下一次操作中持續畫線段直到點擊背景",autoParallel:"自動將新段線設置為與現有線段平行",randomStationNames:{title:"創建時將站名隨機化",none:"無",shmetro:"上海",bjsubway:"北京"}},shortcuts:{title:"捷徑",keys:"按鍵",description:"描述",f:"使用上一個工具。",s:"多選。",arrows:"稍微移動畫布。",ijkl:"稍微移動所選站點。",shift:"多選。",alt:"精確移動。",delete:"刪除所選站點。",cut:"剪切。",copy:"複製。",paste:"貼上。",undo:"撤銷。",redo:"重做。"},procedures:{title:"過程",translate:{title:"轉化節點坐標",content:"將以下偏移加到所有節點的x和y上:",x:"橫坐標",y:"縱坐標"},scale:{title:"縮放節點坐標",content:"將所有節點的x和y乘以以下值:",factor:"縮放因子"},changeType:{title:"修改所有物件的屬性",any:"任意"},changeZIndex:"批量修改深度",changeStationType:{title:"批量修改車站種類",changeFrom:"將此類型的所有車站:",changeTo:"轉換為這個類型的車站:",info:"修改車站類型會移除所有獨特屬性除了名稱。保存再操作!"},changeLineStyleType:{title:"批量修改線段樣式",changeFrom:"將此樣式的所有線段:",changeTo:"轉換為這個樣式的線段:",info:"修改線段樣式會移除所有獨特屬性除了連通性。保存再操作!"},changeLinePathType:{title:"批量修改線段類型",changeFrom:"將此類型的所有線段:",changeTo:"轉換為這個類型的線段:"},changeColor:{title:"批量修改顏色",changeFrom:"將此顏色的所有對象:",changeTo:"轉換為這個顏色:",any:"從任何顏色轉換"},removeLines:{title:"移除所有純色線段",content:"移除具有此顏色的所有線段: "},updateColor:{title:"更新顏色",content:"使用最新值更新所有顏色。",success:"成功更新所有顏色。",error:"更新所有顏色時發生錯誤:{{e}}。"},unlockSimplePath:{title:"解鎖簡單路徑",content1:"地鐵線路圖繪製器應用致力於在遵循既定慣例的前提下,提供一個有利於創建地鐵線路圖的互動平台。在這些慣例中,一種特別著名的風格源自哈利·貝克的創新工作。他的開創性貢獻於1932年得到官方認可,並在大眾中迅速贏得了聲譽。目前,它在信息設計領域具有重要的示範意義,在全球範圍內的交通製圖中得到了廣泛的實施,儘管成功程度有所不同。",content2:"應用程式固有地隱藏了使用簡單路徑的選項,因為其部署有可能違反既定的慣例。默認情況下,此特定功能保持隱蔽。此外,提交到地鐵線路圖繪製器畫廊的作品將經過嚴格的審查,堅決拒絕使用單色風格的簡單路徑的構圖。",content3:"儘管如此,我們仍然保留瞭解鎖此選項的機會,當您訂閱后,方可使用簡單路徑。 需要注意的是,即使獲得后,簡單路徑的使用也僅限於單色風格。",check:"解鎖簡單路徑",unlocked:"已解鎖"},masterManager:{title:"管理全部大師節點",id:"唯一標識",label:"標籤",type:"類型",types:{MiscNode:"雜項節點",Station:"車站"},importTitle:"上傳大師節點參數",importFrom:"使用匯入的樣式",importOther:"導入新樣式",importParam:"貼上配置信息"}},telemetry:{title:"遙測",info:"為了協助改進地鐵路綫圖繪製器並激勵貢獻者提升項目,我們透過 Google Analytics 收集匿名使用數據。這些數據僅用於提升用戶體驗及優化工具功能,絕不會與第三方共享。",essential:"基本",essentialTooltip:"在地鐵路綫圖工具組中更改此全局設定",essentialInfo:"地鐵路綫圖繪製器收集一些基本使用數據,以協助我們了解用戶如何及何時與工具互動。請放心,我們絕不收集任何可識別個人身份的資訊或您的項目數據。",essentialLink:"點擊此鏈接查看 Google Analytics 可能收集的詳細字段。",additional:"額外",additionalInfo:"地鐵路綫圖繪製器還會收集與互動有關的數據,例如創建項目或新增站點等操作。這些額外數據同樣是匿名的,僅用於統計分析以協助我們改進工具。"}},about:{title:"關於",rmp:"地鐵線路圖繪製器",railmapgen:"一個路綫圖工具組的項目",desc:"通過自由拖動來自不同城市的車站並以 90 或 135 度圓角線段將它們連接起來,設計您自己的鐵路地圖!",content1:"謹以此紀念我們曾擁有的自由與平等。",content2:"06/01/2022於上海",contributors:"貢獻者",coreContributors:"核心貢獻者",styleContributors:"樣式貢獻者",langonginc:"活出值得銘記的人生。","203IhzElttil":"特別感謝他勤奮工作,確保上海地鐵站與原始設計相符。",Swiftiecott:"特別感謝他勤奮工作,確保北京地鐵站與原始設計相符。",Minwtraft:"特別感謝他勤奮工作,確保廣州地鐵站與原始設計相符。",contactUs:"聯繫我們",github:"項目倉庫",githubContent:"遇到任何問題?在這裡搜索或提出一個問題!",slack:"Slack群組",slackContent:"在這些Slack頻道中討論!"}}},ms=p("aU",(new Zn.I18nBuilder).use($e).withAppName("Rail Map Painter").withLng(Zn.getLanguage()).withDefaultResource(cs).withResource("en",us).withResource("zh-Hans",gs).withResource("zh-Hant",fs).withResource("ja",hs).withResource("ko",ps).build()),{abs:ys,cos:bs,sin:vs,acos:ws,atan2:xs,sqrt:Ss,pow:Ns}=Math;function ks(e){return e<0?-Ns(-e,1/3):Ns(e,1/3)}const Cs=Math.PI,Rs=2*Cs,Ls=Cs/2,Ts=Number.MAX_SAFE_INTEGER||9007199254740991,js=Number.MIN_SAFE_INTEGER||-9007199254740991,As={x:0,y:0,z:0},Os={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,t){const n=t(e);let o=n.x*n.x+n.y*n.y;return void 0!==n.z&&(o+=n.z*n.z),Ss(o)},compute:function(e,t,n){if(0===e)return t[0].t=0,t[0];const o=t.length-1;if(1===e)return t[o].t=1,t[o];const i=1-e;let r=t;if(0===o)return t[0].t=e,t[0];if(1===o){const t={x:i*r[0].x+e*r[1].x,y:i*r[0].y+e*r[1].y,t:e};return n&&(t.z=i*r[0].z+e*r[1].z),t}if(o<4){let t,a,s,l=i*i,d=e*e,c=0;2===o?(r=[r[0],r[1],r[2],As],t=l,a=i*e*2,s=d):3===o&&(t=l*i,a=l*e*3,s=i*d*3,c=e*d);const u={x:t*r[0].x+a*r[1].x+s*r[2].x+c*r[3].x,y:t*r[0].y+a*r[1].y+s*r[2].y+c*r[3].y,t:e};return n&&(u.z=t*r[0].z+a*r[1].z+s*r[2].z+c*r[3].z),u}const a=JSON.parse(JSON.stringify(t));for(;a.length>1;){for(let t=0;t1;i--,r--){const e=[];for(let n,i=0;ir.x.min&&(t=r.x.min),n>r.y.min&&(n=r.y.min),o0&&(a.c1=t,a.c2=o,a.s1=e,a.s2=n,r.push(a))}))})),r},makeshape:function(e,t,n){const o=t.points.length,i=e.points.length,r=Os.makeline(t.points[o-1],e.points[0]),a=Os.makeline(e.points[i-1],t.points[0]),s={startcap:r,forward:e,back:t,endcap:a,bbox:Os.findbbox([r,e,t,a]),intersections:function(e){return Os.shapeintersections(s,s.bbox,e,e.bbox,n)}};return s},getminmax:function(e,t,n){if(!n)return{min:0,max:0};let o,i,r=Ts,a=js;-1===n.indexOf(0)&&(n=[0].concat(n)),-1===n.indexOf(1)&&n.push(1);for(let s=0,l=n.length;sa&&(a=i[t]);return{min:r,mid:(r+a)/2,max:a,size:a-r}},align:function(e,t){const n=t.p1.x,o=t.p1.y,i=-xs(t.p2.y-o,t.p2.x-n);return e.map((function(e){return{x:(e.x-n)*bs(i)-(e.y-o)*vs(i),y:(e.x-n)*vs(i)+(e.y-o)*bs(i)}}))},roots:function(e,t){t=t||{p1:{x:0,y:0},p2:{x:1,y:0}};const n=e.length-1,o=Os.align(e,t),i=function(e){return 0<=e&&e<=1};if(2===n){const e=o[0].y,t=o[1].y,n=o[2].y,r=e-2*t+n;if(0!==r){const o=-Ss(t*t-e*n),a=-e+t;return[-(o+a)/r,-(-o+a)/r].filter(i)}return t!==n&&0===r?[(2*t-n)/(2*t-2*n)].filter(i):[]}const r=o[0].y,a=o[1].y,s=o[2].y;let l=3*a-r-3*s+o[3].y,d=3*r-6*a+3*s,c=-3*r+3*a,u=r;if(Os.approximately(l,0)){if(Os.approximately(d,0))return Os.approximately(c,0)?[]:[-u/c].filter(i);const e=Ss(c*c-4*d*u),t=2*d;return[(e-c)/t,(-c-e)/t].filter(i)}d/=l,c/=l,u/=l;const h=(3*c-d*d)/3,p=h/3,g=(2*d*d*d-9*d*c+27*u)/27,f=g/2,m=f*f+p*p*p;let y,b,v,w,x;if(m<0){const e=-h/3,t=Ss(e*e*e),n=-g/(2*t),o=ws(n<-1?-1:n>1?1:n),r=2*ks(t);return v=r*bs(o/3)-d/3,w=r*bs((o+Rs)/3)-d/3,x=r*bs((o+2*Rs)/3)-d/3,[v,w,x].filter(i)}if(0===m)return y=f<0?ks(-f):-ks(f),v=2*y-d/3,w=-y-d/3,[v,w].filter(i);{const e=Ss(m);return y=ks(-f+e),b=ks(f+e),[y-b-d/3].filter(i)}},droots:function(e){if(3===e.length){const t=e[0],n=e[1],o=e[2],i=t-2*n+o;if(0!==i){const e=-Ss(n*n-t*o),r=-t+n;return[-(e+r)/i,-(-e+r)/i]}return n!==o&&0===i?[(2*n-o)/(2*(n-o))]:[]}if(2===e.length){const t=e[0],n=e[1];return t!==n?[t/(t-n)]:[]}return[]},curvature:function(e,t,n,o,i){let r,a,s,l,d=0,c=0;const u=Os.compute(e,t),h=Os.compute(e,n),p=u.x*u.x+u.y*u.y;if(o?(r=Ss(Ns(u.y*h.z-h.y*u.z,2)+Ns(u.z*h.x-h.z*u.x,2)+Ns(u.x*h.y-h.x*u.y,2)),a=Ns(p+u.z*u.z,1.5)):(r=u.x*h.y-u.y*h.x,a=Ns(p,1.5)),0===r||0===a)return{k:0,r:0};if(d=r/a,c=a/r,!i){const i=Os.curvature(e-.001,t,n,o,!0).k,r=Os.curvature(e+.001,t,n,o,!0).k;l=(r-d+(d-i))/2,s=(ys(r-d)+ys(d-i))/2}return{k:d,r:c,dk:l,adk:s}},inflections:function(e){if(e.length<4)return[];const t=Os.align(e,{p1:e[0],p2:e.slice(-1)[0]}),n=t[2].x*t[1].y,o=t[3].x*t[1].y,i=t[1].x*t[2].y,r=18*(-3*n+2*o+3*i-t[3].x*t[2].y),a=18*(3*n-o-3*i),s=18*(i-n);if(Os.approximately(r,0)){if(!Os.approximately(a,0)){let e=-s/a;if(0<=e&&e<=1)return[e]}return[]}const l=2*r;if(Os.approximately(l,0))return[];const d=a*a-4*r*s;if(d<0)return[];const c=Math.sqrt(d);return[(c-a)/l,-(a+c)/l].filter((function(e){return 0<=e&&e<=1}))},bboxoverlap:function(e,t){const n=["x","y"],o=n.length;for(let i,r,a,s,l=0;l=s)return!1;return!0},expandbox:function(e,t){t.x.mine.x.max&&(e.x.max=t.x.max),t.y.max>e.y.max&&(e.y.max=t.y.max),t.z&&t.z.max>e.z.max&&(e.z.max=t.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,t,n){const o=e.bbox(),i=t.bbox(),r=1e5,a=n||.5;if(o.x.size+o.y.sizeN||N>k)&&(S+=Rs),S>k&&(x=k,k=S,S=x)):k4){if(1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");o=!0}}else if(6!==i&&8!==i&&9!==i&&12!==i&&1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const r=this._3d=!o&&(9===i||12===i)||e&&e[0]&&void 0!==e[0].z,a=this.points=[];for(let h=0,p=r?3:2;he+Ms(t.y)),0)0}length(){return Os.length(this.derivative.bind(this))}static getABC(e=2,t,n,o,i=.5){const r=Os.projectionratio(i,e),a=1-r,s={x:r*t.x+a*o.x,y:r*t.y+a*o.y},l=Os.abcratio(i,e);return{A:{x:n.x+(n.x-s.x)/l,y:n.y+(n.y-s.y)/l},B:n,C:s,S:t,E:o}}getABC(e,t){t=t||this.get(e);let n=this.points[0],o=this.points[this.order];return Gs.getABC(this.order,n,t,o,e)}getLUT(e){if(this.verify(),e=e||100,this._lut.length===e+1)return this._lut;this._lut=[],e++,this._lut=[];for(let t,n,o=0;o1?1:u,l=this.compute(u),l.t=u,l.d=d,l}get(e){return this.compute(e)}point(e){return this.points[e]}compute(e){return this.ratios?Os.computeWithRatios(e,this.points,this.ratios,this._3d):Os.compute(e,this.points,this._3d,this.ratios)}raise(){const e=this.points,t=[e[0]],n=e.length;for(let o,i,r=1;r1;){n=[];for(let r,a=0,s=t.length-1;a=0&&e<=1})),t=t.concat(e[n].sort(Os.numberSort))}.bind(this)),e.values=t.sort(Os.numberSort).filter((function(e,n){return t.indexOf(e)===n})),e}bbox(){const e=this.extrema(),t={};return this.dims.forEach(function(n){t[n]=Os.getminmax(this,n,e[n])}.bind(this)),t}overlaps(e){const t=this.bbox(),n=e.bbox();return Os.bboxoverlap(t,n)}offset(e,t){if(void 0!==t){const n=this.get(e),o=this.normal(e),i={c:n,n:o,x:n.x+o.x*t,y:n.y+o.y*t};return this._3d&&(i.z=n.z+o.z*t),i}if(this._linear){const t=this.normal(0),n=this.points.map((function(n){const o={x:n.x+e*t.x,y:n.y+e*t.y};return n.z&&t.z&&(o.z=n.z+e*t.z),o}));return[new Gs(n)]}return this.reduce().map((function(t){return t._linear?t.offset(e)[0]:t.scale(e)}))}simple(){if(3===this.order){const e=Os.angle(this.points[0],this.points[3],this.points[1]),t=Os.angle(this.points[0],this.points[3],this.points[2]);if(e>0&&t<0||e<0&&t>0)return!1}const e=this.normal(0),t=this.normal(1);let n=e.x*t.x+e.y*t.y;return this._3d&&(n+=e.z*t.z),Ms(zs(n))(1-i/o)*t+i/o*n));return new Gs(this.points.map(((t,n)=>({x:t.x+e.x*i[n],y:t.y+e.y*i[n]}))))}scale(e){const t=this.order;let n=!1;if("function"==typeof e&&(n=e),n&&2===t)return this.raise().scale(n);const o=this.clockwise,i=this.points;if(this._linear)return this.translate(this.normal(0),n?n(0):e,n?n(1):e);const r=n?n(0):e,a=n?n(1):e,s=[this.offset(0,10),this.offset(1,10)],l=[],d=Os.lli4(s[0],s[0].c,s[1],s[1].c);if(!d)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach((function(e){const n=l[e*t]=Os.copy(i[e*t]);n.x+=(e?a:r)*s[e].n.x,n.y+=(e?a:r)*s[e].n.y})),n?([0,1].forEach((function(r){if(2!==t||!r){var a=i[r+1],s={x:a.x-d.x,y:a.y-d.y},c=n?n((r+1)/t):e;n&&!o&&(c=-c);var u=Ds(s.x*s.x+s.y*s.y);s.x/=u,s.y/=u,l[r+1]={x:a.x+c*s.x,y:a.y+c*s.y}}})),new Gs(l)):([0,1].forEach((e=>{if(2===t&&e)return;const n=l[e*t],o=this.derivative(e),r={x:n.x+o.x,y:n.y+o.y};l[e+1]=Os.lli4(n,r,d,i[e+1])})),new Gs(l))}outline(e,t,n,o){if(t=void 0===t?e:t,this._linear){const i=this.normal(0),r=this.points[0],a=this.points[this.points.length-1];let s,l,d;void 0===n&&(n=e,o=t),s={x:r.x+i.x*e,y:r.y+i.y*e},d={x:a.x+i.x*n,y:a.y+i.y*n},l={x:(s.x+d.x)/2,y:(s.y+d.y)/2};const c=[s,l,d];s={x:r.x-i.x*t,y:r.y-i.y*t},d={x:a.x-i.x*o,y:a.y-i.y*o},l={x:(s.x+d.x)/2,y:(s.y+d.y)/2};const u=[d,l,s],h=Os.makeline(u[2],c[0]),p=Os.makeline(c[2],u[0]),g=[h,new Gs(c),p,new Gs(u)];return new _s(g)}const i=this.reduce(),r=i.length,a=[];let s,l=[],d=0,c=this.length();const u=void 0!==n&&void 0!==o;function h(e,t,n,o,i){return function(r){const a=o/n,s=(o+i)/n,l=t-e;return Os.map(r,0,1,e+a*l,e+s*l)}}i.forEach((function(i){const r=i.length();u?(a.push(i.scale(h(e,n,c,d,r))),l.push(i.scale(h(-t,-o,c,d,r)))):(a.push(i.scale(e)),l.push(i.scale(-t))),d+=r})),l=l.map((function(e){return s=e.points,s[3]?e.points=[s[3],s[2],s[1],s[0]]:e.points=[s[2],s[1],s[0]],e})).reverse();const p=a[0].points[0],g=a[r-1].points[a[r-1].points.length-1],f=l[r-1].points[l[r-1].points.length-1],m=l[0].points[0],y=Os.makeline(f,p),b=Os.makeline(g,m),v=[y].concat(a).concat([b]).concat(l);return new _s(v)}outlineshapes(e,t,n){t=t||e;const o=this.outline(e,t).curves,i=[];for(let r=1,a=o.length;r1,e.endcap.virtual=r{var r=this.get(e);return Os.between(r.x,t,o)&&Os.between(r.y,n,i)}))}selfintersects(e){const t=this.reduce(),n=t.length-2,o=[];for(let i,r,a,s=0;s0&&(i=i.concat(t))})),i}arcs(e){return e=e||.5,this._iterate(e,[])}_error(e,t,n,o){const i=(o-n)/4,r=this.get(n+i),a=this.get(o-i),s=Os.dist(e,t),l=Os.dist(e,r),d=Os.dist(e,a);return Ms(l-s)+Ms(d-s)}_iterate(e,t){let n,o=0,i=1;do{n=0,i=1;let r,a,s,l,d,c=this.get(o),u=!1,h=!1,p=i,g=1;do{if(h=u,l=s,p=(o+i)/2,r=this.get(p),a=this.get(i),s=Os.getccenter(c,r,a),s.interval={start:o,end:i},u=this._error(s,c,o,i)<=e,d=h&&!u,d||(g=i),u){if(i>=1){if(s.interval.end=g=1,l=s,i>1){let e={x:s.x+s.r*Is(s.e),y:s.y+s.r*$s(s.e)};s.e+=Os.angle({x:s.x,y:s.y},e,this.get(1))}break}i+=(i-o)/2}else i=p}while(!d&&n++<100);if(n>=100)break;l=l||s,t.push(l),o=g}while(i<1);return t}}const Fs=(e,t,n,o)=>{o=null!=o?o:-n;const[i,r]=Us(e);if(!i||!r)return;if(i[0]===r[0]||i[1]===r[1]||t===is.Diagonal&&Math.abs(i[1]-r[1])===Math.abs(i[0]-r[0])){const e=Math.abs(n);return Vs(i,r,e)}const[a,s]=Js(e);if(!a||!s)return;const l=new Gs([...a,...s]),[d,c]=[l.scale(n),l.scale(o)],u=Ks(i,a,r,l,d,c);if(!u)return;const{mA:[h,p],mB:[g,f],endA:[m,y],endB:[b,v]}=u;return[`M ${h} ${p} ${d.toSVG().replace("M","L")} L ${m} ${y}`,`M ${g} ${f} ${c.toSVG().replace("M","L")} L ${b} ${v}`]},Us=e=>{var t,n;return[null===(t=e.match(/M\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/))||void 0===t||null===(t=t.at(0))||void 0===t?void 0:t.replace(/M\s*/,"").split(" ").map((e=>Number(e))),null===(n=e.match(/L\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*$/))||void 0===n||null===(n=n.at(0))||void 0===n?void 0:n.replace(/L\s*/,"").split(" ").map((e=>Number(e)))]},Vs=(e,t,n)=>{const[o,i,r,a]=[e[0],e[1],t[0],t[1]],s=Math.abs((a-i)/(r-o));if(s===1/0)return[`M ${o+n} ${i} L ${r+n} ${a}`,`M ${o-n} ${i} L ${r-n} ${a}`];if(0===s)return[`M ${o} ${i+n} L ${r} ${a+n}`,`M ${o} ${i-n} L ${r} ${a-n}`];{const e=1/s,t=n/Math.sqrt(e*e+1),l=t*e*-Math.sign((r-o)*(a-i));return[`M ${o+t} ${i+l} L ${r+t} ${a+l}`,`M ${o-t} ${i-l} L ${r-t} ${a-l}`]}},Ws=(e,t,n)=>{const[o,i,r,a]=[e[0],e[1],t[0],t[1]],s=Math.abs((a-i)/(r-o));if(s===1/0)return`M ${o+n} ${i} L ${r+n} ${a} L ${r-n} ${a} L ${o-n} ${i} Z`;if(0===s)return`M ${o} ${i+n} L ${r} ${a+n} L ${r} ${a-n} L ${o} ${i-n} Z`;{const e=1/s,t=n/Math.sqrt(e*e+1),l=t*e*-Math.sign((r-o)*(a-i));return`M ${o+t} ${i+l} L ${r+t} ${a+l} L ${r-t} ${a-l} L ${o-t} ${i-l} Z`}},Js=e=>{var t,n;return[null===(t=e.match(/L\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/))||void 0===t||null===(t=t.at(0))||void 0===t?void 0:t.replace(/L\s*/,"").split(" ").map((e=>Number(e))),null===(n=e.match(/C\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+\s*[+-]?([0-9]*[.])?[0-9]+/g))||void 0===n||null===(n=n.at(0))||void 0===n?void 0:n.replace(/C\s*/,"").split(" ").map((e=>Number(e)))]},Hs=(e,t)=>[[t[4],t[5]],[t[2],t[3],t[0],t[1],e[0],e[1]]],Ks=(e,t,n,o,i,r)=>{const a=[i.points.at(0).x,i.points.at(0).y],s=[r.points.at(0).x,r.points.at(0).y];if(!e)return;const[l,d]=qs(e[0],t[0],a[0],e[1],t[1],a[1]),[c,u]=qs(e[0],t[0],s[0],e[1],t[1],s[1]),h=[i.points.at(-1).x,i.points.at(-1).y],p=[r.points.at(-1).x,r.points.at(-1).y],g=[o.points.at(-1).x,o.points.at(-1).y];if(!n)return;const[f,m]=qs(h[0],g[0],n[0],h[1],g[1],n[1]),[y,b]=qs(p[0],g[0],n[0],p[1],g[1],n[1]);return{mA:[l,d],mB:[c,u],endA:[f,m],endB:[y,b]}},qs=(e,t,n,o,i,r)=>{const[a,s]=[e+n,o+r],[l,d]=[a-t,s-i];return[l,d]},Qs=(p("as",((e,t)=>{const{type:n,parallelIndex:o}=t.attributes;if(n===is.Simple||o<0)return{normal:[t],parallel:[]};const{source:i,target:r}=t,a=[],s=[];for(const l of e.edgeEntries(i,r)){const{type:e,parallelIndex:t}=l.attributes;if(e===is.Simple||t<0){a.push(l);continue}const{startFrom:n}=l.attributes[e];Qs(e,i,n,l)&&s.push(l)}return{normal:a,parallel:s}})),p("at",(e=>{let t=e.at(0);if(!t)return{};for(const p of e)p.attributes.parallelIndex{let r=!1;if(e===is.Diagonal)(Math.abs(o-t)t&&i>n)||Math.abs(o-t)>Math.abs(i-n)&&(o>t&&in))&&(r=!0);else if(e===is.Perpendicular)(o>t&&in)&&(r=!0);else if(e===is.RotatePerpendicular){const[e,a,s,l]=[t*Math.SQRT1_2+n*Math.SQRT1_2,-t*Math.SQRT1_2+n*Math.SQRT1_2,o*Math.SQRT1_2+i*Math.SQRT1_2,-o*Math.SQRT1_2+i*Math.SQRT1_2];(s>e&&la)&&(r=!0)}return r})(n,r,a,s,l),u={};for(const p of e){var h;const e=p.attributes.parallelIndex>0?p.attributes.parallelIndex:0;if(0===e){u[p.edge]=d;continue}const t=5*e,o=[`M ${r} ${a+t} L ${s} ${l+t}`,`M ${r} ${a-t} L ${s} ${l-t}`],[i,g]=null!==(h=Fs(d,n,t))&&void 0!==h?h:o;u[p.edge]=c?i:g}return u})),(e,t,n,o)=>{const i=o.attributes.type;return e===o.attributes.type&&t===o.source&&n===o.attributes[i].startFrom||e===o.attributes.type&&t===o.target&&n!==o.attributes[i].startFrom}),Zs=(p("m",((e,t,n,o,i)=>{if(t===is.Simple)return-1;const r=[];for(const s of e.edgeEntries(n,o))Qs(t,n,i,s)&&r.push(s.attributes.parallelIndex);r.sort();let a=0;for(const s of r){if(s>a)break;a=s+1}return a})),p("ar",((e,t,n)=>{if(t===is.Simple)return n;const o=e.getEdgeAttribute(n,"parallelIndex");if(o<0)return n;const{startFrom:i}=e.getEdgeAttribute(n,t),[r,a]=e.extremities(n);let s=o,l=n;for(const d of e.edgeEntries(r,a)){const e=d.attributes;(t===e.type&&r===d.source&&e[t].startFrom===i&&e.parallelIndex>=0&&e.parallelIndex=0&&e.parallelIndex{e.telemetry.app=t.payload},setTelemetryProject:(e,t)=>{e.telemetry.project=t.payload},setUnlockSimplePath:(e,t)=>{e.preference.unlockSimplePathAttempts=t.payload},setToolsPanelExpansion:(e,t)=>{e.preference.toolsPanel.expand=t.payload},setAutoParallel:(e,t)=>{e.preference.autoParallel=t.payload},setRandomStationsNames:(e,t)=>{e.preference.randomStationsNames=t.payload}}}),{setTelemetryApp:tl,setTelemetryProject:nl,setUnlockSimplePath:ol,setToolsPanelExpansion:il,setAutoParallel:rl,setRandomStationsNames:al}=el.actions;p({ab:nl,X:ol,aQ:il,a2:rl,aa:al});const sl=el.reducer,ll={present:(new ai).export(),past:[],future:[],svgViewBoxZoom:100,svgViewBoxMin:{x:0,y:0}},dl=p("am",ze("undo")),cl=p("an",ze("redo")),ul=Pe({name:"param",initialState:ll,reducers:{setFullState:(e,t)=>structuredClone(t.payload),saveGraph:(e,t)=>{e.future=[],e.past.push(e.present),e.past.length>49&&e.past.shift(),e.present=structuredClone(t.payload)},setSvgViewBoxZoom:(e,t)=>{e.svgViewBoxZoom=t.payload},setSvgViewBoxMin:(e,t)=>{e.svgViewBoxMin=t.payload}},extraReducers:e=>{e.addCase(dl,(e=>{if(0===e.past.length)return;const t=e.past.pop();e.future.unshift(e.present),e.present=t,window.graph.clear(),window.graph.import(structuredClone(De(t)))})).addCase(cl,(e=>{if(0===e.future.length)return;const t=e.future.shift();e.past.push(e.present),e.present=t,window.graph.clear(),window.graph.import(structuredClone(De(t)))}))}}),{setFullState:hl,saveGraph:pl,setSvgViewBoxZoom:gl,setSvgViewBoxMin:fl}=ul.actions;p({v:pl,z:gl,A:fl});const ml=ul.reducer,yl={selected:new Set,active:void 0,refresh:{nodes:Date.now(),edges:Date.now()},mode:"free",lastTool:void 0,keepLastPath:!1,theme:[Ia.Shanghai,"sh1","#E3002B",Va.white],paletteAppClip:{input:void 0,output:void 0},masterNodesCount:0,parallelLinesCount:0,stationNames:{},globalAlerts:{}},bl=p("q",Be("runtime/refreshNodes",(async(e,{getState:t,dispatch:n})=>{const o=t();n(Tl());let i=0;window.graph.forEachNode(((e,t)=>{t.type===ds.Master&&(i+=1)})),n(xl(i));const r=o.account.activeSubscriptions.RMP_CLOUD?Infinity:ls;i>r&&n($l({status:"warning",message:`${ms.t("header.settings.proLimitExceed.master")} ${ms.t("header.settings.proLimitExceed.solution")}`}))}))),vl=p("t",Be("runtime/refreshEdges",(async(e,{getState:t,dispatch:n})=>{const o=t();n(jl());const i=(e=>{let t=0;for(const n of e.edgeEntries())n.attributes.parallelIndex>=0&&(t+=1);return t})(window.graph);n(Sl(i));const r=o.account.activeSubscriptions.RMP_CLOUD?Xs:Ys;i>=r&&n(rl(!1)),i>r&&n($l({status:"warning",message:`${ms.t("header.settings.proLimitExceed.parallel")} ${ms.t("header.settings.proLimitExceed.solution")}`}))}))),wl=Pe({name:"runtime",initialState:yl,reducers:{setSelected:(e,t)=>{e.selected=t.payload},addSelected:(e,t)=>{e.selected.add(t.payload)},removeSelected:(e,t)=>{e.selected.delete(t.payload)},clearSelected:e=>{e.selected=new Set},setActive:(e,t)=>{e.active=t.payload},setRefreshNodes:e=>{e.refresh.nodes=Date.now()},setRefreshEdges:e=>{e.refresh.edges=Date.now()},setMode:(e,t)=>{"free"!==e.mode&&(e.lastTool=e.mode),e.mode=t.payload},setKeepLastPath:(e,t)=>{e.keepLastPath=t.payload},setTheme:(e,t)=>{e.theme=t.payload},openPaletteAppClip:(e,t)=>{e.paletteAppClip.input=t.payload,e.paletteAppClip.output=void 0},closePaletteAppClip:e=>{e.paletteAppClip.input=void 0},onPaletteAppClipEmit:(e,t)=>{e.paletteAppClip.input=void 0,e.paletteAppClip.output=t.payload},setMasterNodesCount:(e,t)=>{e.masterNodesCount=t.payload},setParallelLinesCount:(e,t)=>{e.parallelLinesCount=t.payload},setStationNames:(e,t)=>{e.stationNames[t.payload.cityName]=t.payload.names},setGlobalAlert:(e,t)=>{const{status:n,message:o,url:i,linkedApp:r}=t.payload;e.globalAlerts[n]={message:o,url:i,linkedApp:r}},closeGlobalAlert:(e,t)=>{delete e.globalAlerts[t.payload]}},extraReducers:e=>{e.addCase(dl,(e=>{e.refresh.nodes=Date.now(),e.refresh.edges=Date.now()})).addCase(cl,(e=>{e.refresh.nodes=Date.now(),e.refresh.edges=Date.now()}))}}),{setMasterNodesCount:xl,setParallelLinesCount:Sl}=wl.actions,{setSelected:Nl,addSelected:kl,removeSelected:Cl,clearSelected:Rl,setActive:Ll,setRefreshNodes:Tl,setRefreshEdges:jl,setMode:Al,setKeepLastPath:Ol,setTheme:_l,openPaletteAppClip:Ml,closePaletteAppClip:El,onPaletteAppClipEmit:Pl,setStationNames:Il,setGlobalAlert:$l,closeGlobalAlert:zl}=wl.actions;p({T:Nl,az:kl,ay:Cl,y:Rl,ax:Ll,av:Al,a1:Ol,aM:_l,W:Ml,ap:Il,j:$l,ao:zl});const Dl=wl.reducer,Bl=(e,t,n)=>0===t?e:function(e,t,n){function o(e,t,n){var o=t.x-e.x,r=t.y-e.y,a=Math.sqrt(o*o+r*r);return i(e,t,Math.min(1,n/a))}function i(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function r(e,t){e.length>2&&(e[e.length-2]=t.x,e[e.length-1]=t.y)}function a(e){return{x:parseFloat(e[e.length-2]),y:parseFloat(e[e.length-1])}}var s=e.split(/[,\s]/).reduce((function(e,t){var n=t.match("([a-zA-Z])(.+)");return n?(e.push(n[1]),e.push(n[2])):e.push(t),e}),[]),l=s.reduce((function(e,t){return parseFloat(t)==t&&e.length?e[e.length-1].push(t):e.push([t]),e}),[]),d=[];if(l.length>1){var c=a(l[0]),u=null;"Z"==l[l.length-1][0]&&l[0].length>2&&(u=["L",c.x,c.y],l[l.length-1]=u),d.push(l[0]);for(var h=1;h2&&"L"==g[0]&&f.length>2&&"L"==f[0]){var m,y,b=a(p),v=a(g),w=a(f);m=o(v,b,t),y=o(v,w,t),r(g,m),g.origPoint=v,d.push(g);var x=i(m,v,.5),S=i(v,y,.5),N=["C",x.x,x.y,S.x,S.y,y.x,y.y];N.origPoint=v,d.push(N)}else d.push(g)}if(u){var k=a(d[d.length-1]);d.push(["Z"]),r(d[0],k)}}else d=l;return d.reduce((function(e,t){return e+t.join(" ")+" "}),"")}(e,t);const Gl={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:10},Fl={generatePath:(e,t,n,o,i=Gl)=>{const{startFrom:r=Gl.startFrom,offsetFrom:a=Gl.offsetFrom,offsetTo:s=Gl.offsetTo,roundCornerFactor:l=Gl.roundCornerFactor}=i,[d,c,u,h]="from"===r?[e,n,t,o]:[t,o,e,n],p=Math.abs(u-d)0?-1:1):w,C="horizontal"===p?x:N+Math.abs(S-w)*(N-x>0?-1:1),[R,L,T,j]="from"===r?[w,x,S,N]:[S,N,w,x];return Bl(`M ${R} ${L} L ${k} ${C} L ${T} ${j}`,l)},icon:b.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:b.jsx("path",{d:"M9,18V12L15,6",stroke:"currentColor",fill:"none"})}),defaultAttrs:Gl,attrsComponent:e=>{var t,n,o;const{id:i,attrs:r,handleAttrsUpdate:a,recalculateParallelIndex:s,parallelIndex:l}=e,{t:d}=Ie(),c=uc(),u=Zs(window.graph,is.Diagonal,i),h=l>=0&&u!==i,p=[{type:"select",label:d("panel.details.lines.common.startFrom"),value:r.startFrom,options:{from:d("panel.details.lines.common.from"),to:d("panel.details.lines.common.to")},onChange:e=>{s(i,e),r.startFrom=e,a(i,r)},minW:"full"},{type:"input",label:d("panel.details.lines.common.offsetFrom"),value:(null!==(t=r.offsetFrom)&&void 0!==t?t:Gl.offsetFrom).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),r.offsetFrom=Number(e),a(i,r)},isDisabled:h,minW:"full"},{type:"input",label:d("panel.details.lines.common.offsetTo"),value:(null!==(n=r.offsetTo)&&void 0!==n?n:Gl.offsetTo).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),r.offsetTo=Number(e),a(i,r)},isDisabled:h,minW:"full"},{type:"input",label:d("panel.details.lines.common.roundCornerFactor"),value:(null!==(o=null==r?void 0:r.roundCornerFactor)&&void 0!==o?o:Gl.roundCornerFactor).toString(),variant:"number",onChange:e=>{(Number.isNaN(e)||Number(e)<0)&&(e="0"),r.roundCornerFactor=Number(e),a(i,r)},isDisabled:h,minW:"full"}];return h&&p.unshift({type:"custom",label:d("panel.details.lines.common.parallelDisabled"),component:b.jsxs(W,{size:"sm",variant:"link",onClick:()=>c(Nl(new Set([u]))),children:[d("panel.details.lines.common.changeInBaseLine")," ",u]})}),b.jsx(ca,{fields:p})},metadata:{displayName:"panel.details.lines.diagonal.displayName"}},Ul={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:18.33},Vl={generatePath:(e,t,n,o,i=Ul)=>{const{startFrom:r=Ul.startFrom,offsetFrom:a=Ul.offsetFrom,offsetTo:s=Ul.offsetTo,roundCornerFactor:l=Ul.roundCornerFactor}=i,[d,c]="from"===r?[a,s]:[s,a],[u,h,p,g]="from"===r?[0,d,c,0]:[d,0,0,c];return Bl(`M ${e+u} ${n+h} L ${"from"===r?t+p:e+u} ${"from"===r?n+h:o+g} L ${t+p} ${o+g}`,l)},icon:b.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:b.jsx("path",{d:"M6,6H18V18",stroke:"currentColor",fill:"none"})}),defaultAttrs:Ul,attrsComponent:e=>{var t,n,o;const{id:i,attrs:r,handleAttrsUpdate:a,recalculateParallelIndex:s,parallelIndex:l}=e,{t:d}=Ie(),c=uc(),u=Zs(window.graph,is.Perpendicular,i),h=l>=0&&u!==i,p=[{type:"select",label:d("panel.details.lines.common.startFrom"),value:r.startFrom,options:{from:d("panel.details.lines.common.from"),to:d("panel.details.lines.common.to")},onChange:e=>{s(i,e),r.startFrom=e,a(i,r)},minW:"full"},{type:"input",label:d("panel.details.lines.common.offsetFrom"),value:(null!==(t=r.offsetFrom)&&void 0!==t?t:Ul.offsetFrom).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),r.offsetFrom=Number(e),a(i,r)},isDisabled:h,minW:"full"},{type:"input",label:d("panel.details.lines.common.offsetTo"),value:(null!==(n=r.offsetTo)&&void 0!==n?n:Ul.offsetTo).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),r.offsetTo=Number(e),a(i,r)},isDisabled:h,minW:"full"},{type:"input",label:d("panel.details.lines.common.roundCornerFactor"),value:(null!==(o=null==r?void 0:r.roundCornerFactor)&&void 0!==o?o:Ul.roundCornerFactor).toString(),variant:"number",onChange:e=>{(Number.isNaN(e)||Number(e)<0)&&(e="0"),r.roundCornerFactor=Number(e),a(i,r)},isDisabled:h,minW:"full"}];return h&&p.unshift({type:"custom",label:d("panel.details.lines.common.parallelDisabled"),component:b.jsxs(W,{size:"sm",variant:"link",onClick:()=>c(Nl(new Set([u]))),children:[d("panel.details.lines.common.changeInBaseLine")," ",u]})}),b.jsx(ca,{fields:p})},metadata:{displayName:"panel.details.lines.perpendicular.displayName"}},Wl={startFrom:"from",offsetFrom:0,offsetTo:0,roundCornerFactor:18.33},Jl={generatePath:(e,t,n,o,i=Wl)=>{const{startFrom:r=Wl.startFrom,offsetFrom:a=Wl.offsetFrom,offsetTo:s=Wl.offsetTo,roundCornerFactor:l=Wl.roundCornerFactor}=i,[d,c]="from"===r?[a,s]:[s,a],[u,h,p,g]="from"===r?[0,d,c,0]:[d,0,0,c],[f,m,y,b]=[e*Math.SQRT1_2+n*Math.SQRT1_2,-e*Math.SQRT1_2+n*Math.SQRT1_2,t*Math.SQRT1_2+o*Math.SQRT1_2,-t*Math.SQRT1_2+o*Math.SQRT1_2],[v,w,x,S]=[f+u,m+h,y+p,b+g],[N,k,C,R]=[v*Math.SQRT1_2-w*Math.SQRT1_2,v*Math.SQRT1_2+w*Math.SQRT1_2,x*Math.SQRT1_2-S*Math.SQRT1_2,x*Math.SQRT1_2+S*Math.SQRT1_2],L="from"===r?y+p:f+u,T="from"===r?m+h:b+g,[j,A]=[L*Math.SQRT1_2-T*Math.SQRT1_2,L*Math.SQRT1_2+T*Math.SQRT1_2];return Bl(`M ${N} ${k} L ${j} ${A} L ${C} ${R}`,l)},icon:b.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:b.jsx("path",{d:"M9,6L15,12L9,18",stroke:"currentColor",fill:"none"})}),defaultAttrs:Wl,attrsComponent:e=>{var t,n,o;const{id:i,attrs:r,handleAttrsUpdate:a,recalculateParallelIndex:s,parallelIndex:l}=e,{t:d}=Ie(),c=uc(),u=Zs(window.graph,is.RotatePerpendicular,i),h=l>=0&&u!==i,p=[{type:"select",label:d("panel.details.lines.common.startFrom"),value:r.startFrom,options:{from:d("panel.details.lines.common.from"),to:d("panel.details.lines.common.to")},onChange:e=>{s(i,e),r.startFrom=e,a(i,r)},minW:"full"},{type:"input",label:d("panel.details.lines.common.offsetFrom"),value:(null!==(t=r.offsetFrom)&&void 0!==t?t:Wl.offsetFrom).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),r.offsetFrom=Number(e),a(i,r)},isDisabled:h,minW:"full"},{type:"input",label:d("panel.details.lines.common.offsetTo"),value:(null!==(n=r.offsetTo)&&void 0!==n?n:Wl.offsetTo).toString(),variant:"number",onChange:e=>{Number.isNaN(e)&&(e="0"),r.offsetTo=Number(e),a(i,r)},isDisabled:h,minW:"full"},{type:"input",label:d("panel.details.lines.common.roundCornerFactor"),value:(null!==(o=null==r?void 0:r.roundCornerFactor)&&void 0!==o?o:Wl.roundCornerFactor).toString(),variant:"number",onChange:e=>{(Number.isNaN(e)||Number(e)<0)&&(e="0"),r.roundCornerFactor=Number(e),a(i,r)},isDisabled:h,minW:"full"}];return h&&p.unshift({type:"custom",label:d("panel.details.lines.common.parallelDisabled"),component:b.jsxs(W,{size:"sm",variant:"link",onClick:()=>c(Nl(new Set([u]))),children:[d("panel.details.lines.common.changeInBaseLine")," ",u]})}),b.jsx(ca,{fields:p})},metadata:{displayName:"panel.details.lines.rotatePerpendicular.displayName"}};var Hl=p("S",(e=>(e.ShmetroBasic="shmetro-basic",e.ShmetroBasic2020="shmetro-basic-2020",e.ShmetroInt="shmetro-int",e.ShmetroOutOfSystemInt="shmetro-osysi",e.ShanghaiSuburbanRailway="sh-sub-rwy",e.GzmtrBasic="gzmtr-basic",e.GzmtrInt="gzmtr-int",e.GzmtrInt2024="gzmtr-int-2024",e.BjsubwayBasic="bjsubway-basic",e.BjsubwayInt="bjsubway-int",e.MTR="mtr",e.SuzhouRTBasic="suzhourt-basic",e.SuzhouRTInt="suzhourt-int",e.KunmingRTBasic="kunmingrt-basic",e.KunmingRTInt="kunmingrt-int",e.MRTBasic="mrt-basic",e.MRTInt="mrt-int",e.JREastBasic="jr-east-basic",e.JREastImportant="jr-east-imp",e.FoshanMetroBasic="foshan-metro-basic",e.QingdaoMetroStation="qingdao-metro-basic",e.TokyoMetroBasic="tokyo-metro-basic",e.TokyoMetroInt="tokyo-metro-int",e.LondonTubeBasic="london-tube-basic",e.LondonTubeInt="london-tube-int",e.LondonRiverServicesInt="london-river-int",e.GuangdongIntercityRailway="gd-intercity-rwy",e))(Hl||{}));p("aL",["shmetro-basic-2020","gzmtr-basic","suzhourt-basic","kunmingrt-basic","mrt-basic","foshan-metro-basic","qingdao-metro-basic"]),p("aX",{names:["车站","Stn"]});function Kl(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"},child:[]}]})(e)}function ql(e){return Oe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3z"},child:[]}]})(e)}class Ql{static hexToRgb(e){return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16)]}static fade(e,t){return`rgba(${[...this.hexToRgb(e),t].join(",")})`}static euclideanDistance(e,t){return this.hexToRgb(e).reduce(((e,n,o)=>e+Math.pow(n-this.hexToRgb(t)[o],2)),0)}}function Zl(e){const{theme:t,onClick:n}=e,{t:o}=Ie();return b.jsx(be,{"aria-label":o("Color"),color:t[3],bg:t[2],size:"md",_hover:{bg:Ql.fade(t[2],.7)},icon:b.jsx(Kl,{}),onClick:n})}const Yl=p("aS",(e=>{var t;const{type:n,colorKey:o="color",defaultTheme:i}=e,r=uc(),{selected:a,paletteAppClip:{output:s}}=hc((e=>e.runtime)),[l]=a,d=Ee.useCallback((()=>{r(bl()),r(vl()),r(pl(c.current.export()))}),[r,bl,vl,pl]),c=Ee.useRef(window.graph),[u,h,p]=[].concat(Object.values(Hl)).concat(Object.values(ds)).find((e=>n===e))?[c.current.hasNode,c.current.getNodeAttribute,c.current.mergeNodeAttributes]:[c.current.hasEdge,c.current.getEdgeAttribute,c.current.mergeEdgeAttributes],[g,f]=Ee.useState(!1);Ee.useEffect((()=>{g&&s&&((e=>{if(l&&u.bind(c.current)(l)){const t=h.bind(c.current)(l,n);t[o]=e,p.bind(c.current)(l,{[n]:t}),d()}})(s),f(!1))}),[null==s?void 0:s.toString()]);const m=l&&u.bind(c.current)(l)&&(l.startsWith("stn")||l.startsWith("misc_node")?c.current.getNodeAttribute(l,"type")===n:c.current.getEdgeAttribute(l,"style")===n)?(null!==(t=h.bind(c.current)(l,n))&&void 0!==t?t:{[o]:i})[o]:i;return b.jsx(b.Fragment,{children:b.jsx(Zl,{theme:m,onClick:()=>{f(!0),r(Ml(m))}})})})),Xl={color:[Ia.Shanghai,"sh1","#E4002B",Va.white]},ed=p("aC",{component:e=>{const{id:t,path:n,styleAttrs:o,newLine:i,handlePointerDown:r}=e,{color:a=Xl.color}=null!=o?o:Xl,s=Ee.useCallback((e=>r(t,e)),[t,r]);return b.jsx("path",{id:t,d:n,fill:"none",stroke:a[2],strokeWidth:"5",strokeLinecap:"round",cursor:"pointer",onPointerDown:i?void 0:s,pointerEvents:i?"none":void 0})},defaultAttrs:Xl,attrsComponent:e=>{const{t:t}=Ie(),n=[{type:"custom",label:t("color"),component:b.jsx(Yl,{type:rs.SingleColor,defaultTheme:Xl.color})}];return b.jsx(ca,{fields:n})},metadata:{displayName:"panel.details.lines.singleColor.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}}),td={component:e=>{const{id:t,path:n,handlePointerDown:o}=e,i=Ee.useCallback((e=>o(t,e)),[t,o]);return b.jsxs("g",{id:t,onPointerDown:i,cursor:"pointer",children:[b.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"7",strokeLinecap:"round"}),b.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"4.33",strokeLinecap:"round"})]})},defaultAttrs:{},attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.shmetroVirtualInt.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular,is.Simple]}},nd={isEnd:!1},od={component:e=>{const{id:t,path:n,handlePointerDown:o}=e,i=Ee.useCallback((e=>o(t,e)),[t,o]);return b.jsx("g",{id:t,onPointerDown:i,cursor:"pointer",children:b.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})})},preComponent:e=>{const{id:t,path:n,styleAttrs:o,handlePointerDown:i}=e,{isEnd:r=nd.isEnd}=o,a=Ee.useCallback((e=>i(t,e)),[t,i]),s=r?"round":void 0;return b.jsx("g",{id:`${t}.pre`,onPointerDown:a,cursor:"pointer",children:b.jsx("path",{d:n,fill:"none",stroke:"#898989",strokeWidth:"5",strokeLinecap:s})})},defaultAttrs:nd,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:o}=e,{t:i}=Ie(),r=[{type:"switch",label:i("panel.details.lines.shanghaiSuburbanRailway.isEnd"),isChecked:n.isEnd,onChange:e=>{n.isEnd=e,o(t,n)},oneLine:!0,minW:"full"}];return b.jsx(ca,{fields:r})},metadata:{displayName:"panel.details.lines.shanghaiSuburbanRailway.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},id={component:e=>{const{id:t,path:n,handlePointerDown:o}=e,i=Ee.useCallback((e=>o(t,e)),[t,o]);return b.jsx("path",{id:t,d:n,fill:"none",stroke:"#565656",strokeWidth:"3",strokeDasharray:"3",cursor:"pointer",onPointerDown:i})},defaultAttrs:{},attrsComponent:()=>null,metadata:{displayName:"panel.details.lines.gzmtrVirtualInt.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular,is.Simple]}},rd={color:[Ia.Guangzhou,"gz11","#ffb00a",Va.black]},ad={component:e=>{const{id:t,path:n,styleAttrs:o,handlePointerDown:i}=e,{color:r=rd.color}=null!=o?o:rd,a=Ee.useCallback((e=>i(t,e)),[t,i]);return b.jsxs("g",{id:t,onPointerDown:a,cursor:"pointer",children:[b.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:11.467170000000001}),b.jsx("path",{d:n,fill:"none",stroke:r[2],strokeWidth:9.96138})]})},defaultAttrs:rd,attrsComponent:e=>{const{t:t}=Ie(),n=[{type:"custom",label:t("color"),component:b.jsx(Yl,{type:rs.GZMTRLoop,defaultTheme:rd.color})}];return b.jsx(ca,{fields:n})},metadata:{displayName:"panel.details.lines.gzmtrLoop.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},sd={color:[Ia.Shanghai,"jsr","#000000",Va.white]},ld={component:e=>{const{id:t,path:n,styleAttrs:o,handlePointerDown:i}=e,{color:r=sd.color}=null!=o?o:sd,a=Ee.useCallback((e=>i(t,e)),[t,i]);return b.jsxs("g",{id:t,onPointerDown:a,cursor:"pointer",children:[b.jsx("path",{d:n,fill:"none",stroke:r[2],strokeWidth:"5",strokeLinecap:"round"}),b.jsx("path",{d:n,fill:"none",stroke:r[3],strokeWidth:"4.67",strokeDasharray:"17.5"})]})},defaultAttrs:sd,attrsComponent:e=>{const{t:t}=Ie(),n=[{type:"custom",label:t("color"),component:b.jsx(Yl,{type:rs.ChinaRailway,defaultTheme:sd.color})}];return b.jsx(ca,{fields:n})},metadata:{displayName:"panel.details.lines.chinaRailway.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},dd={color:[Ia.Beijing,"bj1","#c23a30",Va.white]},cd={component:e=>{const{id:t,path:n,styleAttrs:o,handlePointerDown:i}=e,{color:r=dd.color}=null!=o?o:dd,a=Ee.useCallback((e=>i(t,e)),[t,i]);return b.jsxs("g",{id:t,onPointerDown:a,cursor:"pointer",children:[b.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"6",strokeLinecap:"round"}),b.jsx("path",{d:n,fill:"none",stroke:r[2],strokeWidth:"5",strokeLinecap:"round"})]})},defaultAttrs:dd,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:o}=e,{t:i}=Ie(),r=[{type:"custom",label:"color",component:b.jsx(Yl,{type:rs.BjsubwaySingleColor,defaultTheme:dd.color})}];return b.jsx(ca,{fields:r})},metadata:{displayName:"panel.details.lines.bjsubwaySingleColor.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},ud=p("aR",(e=>{const{t:t}=Ie(),n=uc(),{selected:o}=hc((e=>e.runtime)),[i]=o,r=Ee.useRef(window.graph),a=[];if(1===o.size&&r.current.hasNode(i)){const o=r.current.getNodeAttribute(i,"type"),s=r.current.getNodeAttribute(i,o);a.push(...e.fields.filter((e=>"custom"!==e.type)).map((e=>{var a,l,d;return{type:e.type,label:t(e.label),value:null===(a=e.value)||void 0===a?void 0:a.call(e,s),isChecked:null===(l=e.isChecked)||void 0===l?void 0:l.call(e,s),hidden:null===(d=e.hidden)||void 0===d?void 0:d.call(e,s),options:e.options,disabledOptions:e.disabledOptions&&e.disabledOptions(s),validator:e.validator,oneLine:e.oneLine,onChange:a=>{let l;try{l=e.onChange(a,s)}catch(d){return void n($l({status:"error",message:t(`err-code.${d}`)}))}r.current.mergeNodeAttributes(i,{[o]:l}),n(bl()),n(pl(r.current.export()))}}})),...e.fields.filter((e=>"custom"===e.type)).map((e=>g(g({},e),{},{label:t(e.label)}))))}if(1===o.size&&r.current.hasEdge(i)&&"style"!==e.type){const o=r.current.getEdgeAttribute(i,"type"),s=r.current.getEdgeAttribute(i,o);a.push(...e.fields.map((e=>({type:e.type,label:t(e.label),value:e.value(s),options:e.options,disabledOptions:e.disabledOptions&&e.disabledOptions(s),validator:e.validator,onChange:t=>{r.current.mergeEdgeAttributes(i,{[o]:e.onChange(t,s)}),n(vl()),n(pl(r.current.export()))}}))))}if(1===o.size&&r.current.hasEdge(i)&&"style"===e.type){const o=r.current.getEdgeAttribute(i,"style"),s=r.current.getEdgeAttribute(i,o);a.push(...e.fields.filter((e=>"custom"!==e.type)).map((e=>({type:e.type,label:t(e.label),value:e.value(s),options:e.options,disabledOptions:e.disabledOptions&&e.disabledOptions(s),validator:e.validator,onChange:t=>{r.current.mergeEdgeAttributes(i,{[o]:e.onChange(t,s)}),n(vl()),n(pl(r.current.export()))}}))),...e.fields.filter((e=>"custom"===e.type)).map((e=>g(g({},e),{},{label:t(e.label)}))))}return b.jsx(ca,{fields:a,minW:276})})),hd={color:[Ia.Beijing,"bj1","#c23a30",Va.white]},pd=[{type:"custom",label:"color",component:b.jsx(Yl,{type:rs.BjsubwayTram,defaultTheme:hd.color})}],gd={component:e=>{const{id:t,path:n,styleAttrs:o,handlePointerDown:i}=e,{color:r=hd.color}=null!=o?o:hd,a=Ee.useCallback((e=>i(t,e)),[t,i]);return b.jsxs("g",{id:t,onPointerDown:a,cursor:"pointer",children:[b.jsx("path",{d:n,fill:"none",stroke:r[2],strokeWidth:"5"}),b.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"1.67"})]})},defaultAttrs:hd,attrsComponent:()=>b.jsx(ud,{fields:pd,type:"style"}),metadata:{displayName:"panel.details.lines.bjsubwayTram.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},fd={colorA:[Ia.Shanghai,"maglevA","#008B9A",Va.white],colorB:[Ia.Shanghai,"maglevB","#F5A74E",Va.white]},md=()=>{const{t:e}=Ie(),t=uc(),{selected:n}=hc((e=>e.runtime)),[o]=n,i=Ee.useRef(window.graph);return b.jsx(be,{"aria-label":e("panel.details.lines.dualColor.swap"),icon:b.jsx(ql,{}),size:"sm",onClick:()=>{var e;const n=null!==(e=i.current.getEdgeAttribute(o,rs.DualColor))&&void 0!==e?e:fd,r=n.colorA;n.colorA=n.colorB,n.colorB=r,i.current.mergeEdgeAttributes(o,{[rs.DualColor]:n}),t(vl()),t(pl(i.current.export()))}})},yd={component:e=>{const{id:t,type:n,path:o,styleAttrs:i,handlePointerDown:r}=e,{colorA:a=fd.colorA,colorB:s=fd.colorB}=null!=i?i:fd,l=Ee.useCallback((e=>r(t,e)),[t,r]),[d,c]=Ee.useState(o),[u,h]=Ee.useState(o);return Ee.useEffect((()=>{const e=Fs(o,n,-1.25,1.25);e&&(c(e[0]),h(e[1]))}),[o]),b.jsxs("g",{id:t,onPointerDown:l,cursor:"pointer",children:[b.jsx("path",{d:d,fill:"none",stroke:a[2],strokeWidth:"2.5",strokeLinecap:"round"}),b.jsx("path",{d:u,fill:"none",stroke:s[2],strokeWidth:"2.5",strokeLinecap:"round"})]})},defaultAttrs:fd,attrsComponent:e=>{const{t:t}=Ie(),n=[{type:"custom",label:t("panel.details.lines.dualColor.swap"),component:b.jsx(md,{})},{type:"custom",label:t("panel.details.lines.dualColor.colorA"),component:b.jsx(Yl,{type:rs.DualColor,colorKey:"colorA",defaultTheme:fd.colorA})},{type:"custom",label:t("panel.details.lines.dualColor.colorB"),component:b.jsx(Yl,{type:rs.DualColor,colorKey:"colorB",defaultTheme:fd.colorB})}];return b.jsx(ca,{fields:n})},metadata:{displayName:"panel.details.lines.dualColor.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},bd={color:[Ia.Shanghai,"river","#B9E3F9",Va.white],width:20},vd=[{type:"input",label:"panel.details.lines.river.width",variant:"number",value:e=>(null!=e?e:bd).width,onChange:(e,t)=>{const n=null!=t?t:bd;return n.width=Number(e),n}}],wd={component:e=>{const{id:t,path:n,styleAttrs:o,handlePointerDown:i}=e,{color:r=bd.color,width:a=bd.width}=null!=o?o:bd,s=Ee.useCallback((e=>i(t,e)),[t,i]);return b.jsx("path",{id:t,d:n,fill:"none",stroke:r[2],strokeWidth:a,strokeLinecap:"round",cursor:"pointer",onPointerDown:s})},defaultAttrs:bd,attrsComponent:()=>b.jsx(ud,{fields:vd,type:"style"}),metadata:{displayName:"panel.details.lines.river.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular,is.Simple]}},xd={color:[Ia.Hongkong,"twl","#E2231A",Va.white]},Sd=[{type:"custom",label:"color",component:b.jsx(Yl,{type:rs.MTRRaceDays,defaultTheme:xd.color})}],Nd={component:e=>{const{id:t,path:n,styleAttrs:o,handlePointerDown:i}=e,{color:r=xd.color}=null!=o?o:xd,a=Ee.useCallback((e=>i(t,e)),[t,i]);return b.jsx("path",{id:t,d:n,fill:"none",stroke:r[2],strokeWidth:"5",strokeLinecap:"butt",strokeDasharray:"5 2.5",cursor:"pointer",onPointerDown:a})},defaultAttrs:xd,attrsComponent:()=>b.jsx(ud,{fields:Sd,type:"style"}),metadata:{displayName:"panel.details.lines.mtrRaceDays.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},kd={color:[Ia.Hongkong,"lrl","#CD9700",Va.white]},Cd=[{type:"custom",label:"color",component:b.jsx(Yl,{type:rs.MTRLightRail,defaultTheme:kd.color})}],Rd={component:e=>{const{id:t,path:n,styleAttrs:o,handlePointerDown:i}=e,{color:r=kd.color}=null!=o?o:kd,a=Ee.useCallback((e=>i(t,e)),[t,i]);return b.jsx("path",{id:t,d:n,fill:"none",stroke:r[2],strokeWidth:"2.5",strokeLinecap:"round",cursor:"pointer",onPointerDown:a})},defaultAttrs:kd,attrsComponent:()=>b.jsx(ud,{fields:Cd,type:"style"}),metadata:{displayName:"panel.details.lines.mtrLightRail.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},Ld={component:e=>{const{id:t,path:n,handlePointerDown:o}=e,i=Ee.useCallback((e=>o(t,e)),[t,o]);return b.jsx("path",{id:t,d:n,fill:"none",stroke:"black",strokeWidth:"1.33",strokeDasharray:"2.66 1.33",cursor:"pointer",onPointerDown:i})},defaultAttrs:{},attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.mtrUnpaidArea.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular,is.Simple]}},Td={component:e=>{const{id:t,path:n,handlePointerDown:o}=e,i=Ee.useCallback((e=>o(t,e)),[t,o]);return b.jsx("path",{id:t,d:n,fill:"none",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",cursor:"pointer",onPointerDown:i})},defaultAttrs:{},attrsComponent:()=>b.jsx(ud,{fields:[],type:"style"}),metadata:{displayName:"panel.details.lines.mtrPaidArea.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular,is.Simple]}},jd={color:[Ia.Beijing,"bj1","#c23a30",Va.white]},Ad={component:e=>{const{id:t,path:n,styleAttrs:o,handlePointerDown:i}=e,{color:r=jd.color}=null!=o?o:jd,a=Ee.useCallback((e=>i(t,e)),[t,i]),s=se("white","var(--chakra-colors-gray-800)");return b.jsxs("g",{id:t,onPointerDown:a,cursor:"pointer",children:[b.jsx("path",{d:n,fill:"none",stroke:r[2],strokeWidth:"5",strokeDasharray:"2 2"}),b.jsx("path",{d:n,fill:"none",stroke:s,strokeWidth:"3.4"})]})},defaultAttrs:jd,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:o}=e,{t:i}=Ie(),r=[{type:"custom",label:"color",component:b.jsx(Yl,{type:rs.BjsubwayDotted,defaultTheme:jd.color})}];return b.jsx(ca,{fields:r})},metadata:{displayName:"panel.details.lines.bjsubwayDotted.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},Od={color:[Ia.Singapore,"ewl","#009739",Va.white]},_d={component:e=>{const{id:t,path:n,styleAttrs:o,handlePointerDown:i}=e,{color:r=Od.color}=null!=o?o:Od,a=Ee.useCallback((e=>i(t,e)),[t,i]);return b.jsx("path",{id:t,d:n,fill:"none",stroke:r[2],strokeWidth:"5",strokeDasharray:"0 10",strokeLinecap:"round",cursor:"pointer",onPointerDown:a})},defaultAttrs:Od,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:o}=e,{t:i}=Ie(),r=[{type:"custom",label:"color",component:b.jsx(Yl,{type:rs.MRTUnderConstruction,defaultTheme:Od.color})}];return b.jsx(ca,{fields:r})},metadata:{displayName:"panel.details.lines.mrtUnderConstruction.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},Md={component:e=>{const{id:t,path:n,handlePointerDown:o}=e,i=Ee.useCallback((e=>o(t,e)),[t,o]);return b.jsx("path",{id:t,d:n,fill:"none",stroke:"black",strokeWidth:"5",strokeDasharray:"0 10 10 10",strokeLinecap:"round",cursor:"pointer",onPointerDown:i})},defaultAttrs:{},attrsComponent:e=>null,metadata:{displayName:"panel.details.lines.mrtSentosaExpress.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},Ed={color:[Ia.Tokyo,"jy","#9ACD32",Va.black]},Pd={component:e=>{const{id:t,path:n,styleAttrs:o,newLine:i,handlePointerDown:r}=e,{color:a=Ed.color}=null!=o?o:Ed,s=Ee.useCallback((e=>r(t,e)),[t,r]);return b.jsxs("g",{id:t,onPointerDown:s,cursor:"pointer",children:[b.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"5.1"}),b.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"4.9"})]})},defaultAttrs:Ed,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:o}=e,{t:i}=Ie(),r=[{type:"custom",label:i("color"),component:b.jsx(Yl,{type:rs.JREastSingleColor,defaultTheme:Ed.color})}];return b.jsx(ca,{fields:r})},metadata:{displayName:"panel.details.lines.jrEastSingleColor.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},Id=5*Math.SQRT1_2,$d=.25,zd=(Id*Math.SQRT2-$d)/2*Math.SQRT2,Dd={color:[Ia.Tokyo,"jy","#9ACD32",Va.black]},Bd={component:e=>{const{id:t,type:n,path:o,styleAttrs:i,newLine:r,handlePointerDown:a}=e,{color:s=Dd.color}=null!=i?i:Dd,l=Ee.useCallback((e=>a(t,e)),[t,a]),[d,c]=Ee.useState({outline:o,pA:o,pB:o});return Ee.useEffect((()=>{const e=((e,t,n,o)=>{o=null!=o?o:2.5;const[i,r]=Us(e);if(!i||!r)return;if(i[0]===r[0]||i[1]===r[1]||t===is.Diagonal&&Math.abs(i[1]-r[1])===Math.abs(i[0]-r[0])){const e=Math.abs(n),[t,o]=Vs(i,r,e);return{outline:Ws(i,r,e),pA:t,pB:o}}const[a,s]=Js(e);if(!a||!s)return;const l=new Gs([...a,...s]),[d,c]=[l.scale(n),l.scale(o)],u=Ks(i,a,r,l,d,c);if(!u)return;const{mA:[h,p],mB:[g,f],endA:[m,y],endB:[b,v]}=u,[w,x]=Js(c.toSVG().replace("M","L")),[S,N]=Hs(w,x);return{outline:`M ${h} ${p} ${d.toSVG().replace("M","L")} L ${m} ${y} L ${b} ${v} L ${S.join(" ")} C ${N.join(" ")} L ${g} ${f} Z`,pA:`M ${h} ${p} ${d.toSVG().replace("M","L")} L ${m} ${y}`,pB:`M ${g} ${f} ${c.toSVG().replace("M","L")} L ${b} ${v}`}})(o,n,-2.5,2.5);e&&c(e)}),[o]),b.jsxs("g",{id:t,onPointerDown:l,cursor:"pointer",children:[b.jsxs("defs",{children:[b.jsxs("clipPath",{id:"jr_east_fill_pattern_clip_path",patternUnits:"userSpaceOnUse",children:[b.jsx("polygon",{points:`0,0 0,${zd} ${zd},0`}),b.jsx("polygon",{points:`${Id},${Id} ${Id-zd},${Id} ${Id},${Id-zd}`})]}),b.jsxs("pattern",{id:`jr_east_${t}_fill_pattern_${s[2]}`,width:Id,height:Id,patternUnits:"userSpaceOnUse",children:[b.jsx("rect",{width:Id,height:Id,fill:s[2]}),b.jsx("line",{x1:"0",y1:"0",x2:Id,y2:Id,stroke:"white",strokeWidth:$d,strokeOpacity:"50%",clipPath:"url(#jr_east_fill_pattern_clip_path)"}),b.jsx("line",{x1:Id,y1:"0",x2:"0",y2:Id,stroke:"white",strokeWidth:$d,strokeOpacity:"50%"})]})]}),b.jsx("path",{d:d.outline,fill:`url(#jr_east_${t}_fill_pattern_${s[2]})`}),b.jsx("path",{d:d.pA,fill:"none",stroke:"black",strokeWidth:"0.1"}),b.jsx("path",{d:d.pB,fill:"none",stroke:"black",strokeWidth:"0.1"})]})},defaultAttrs:Dd,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:o}=e,{t:i}=Ie(),r=[{type:"custom",label:i("color"),component:b.jsx(Yl,{type:rs.JREastSingleColorPattern,defaultTheme:Dd.color})}];return b.jsx(ca,{fields:r})},metadata:{displayName:"panel.details.lines.jrEastSingleColorPattern.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},Gd={color:[Ia.Singapore,"lrt","#708573",Va.white]},Fd={component:e=>{const{id:t,path:n,styleAttrs:o,handlePointerDown:i}=e,{color:r=Gd.color}=null!=o?o:Gd,a=Ee.useCallback((e=>i(t,e)),[t,i]);return b.jsx("path",{id:t,d:n,fill:"none",stroke:r[2],strokeWidth:"2.157",strokeLinecap:"round",cursor:"pointer",onPointerDown:a})},defaultAttrs:Gd,attrsComponent:e=>{const t=[{type:"custom",label:"color",component:b.jsx(Yl,{type:rs.LRTSingleColor,defaultTheme:Gd.color})}];return b.jsx(ca,{fields:t})},metadata:{displayName:"panel.details.lines.lrtSingleColor.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},Ud={component:e=>{const{id:t,path:n,handlePointerDown:o}=e,i=Ee.useCallback((e=>o(t,e)),[t,o]);return b.jsx("g",{id:t,onPointerDown:i,cursor:"pointer",children:b.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"2.5",strokeLinecap:"round"})})},preComponent:e=>{const{id:t,path:n,handlePointerDown:o}=e,i=Ee.useCallback((e=>o(t,e)),[t,o]);return b.jsx("g",{id:`${t}.pre`,onPointerDown:i,cursor:"pointer",children:b.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"7.5",strokeLinecap:"round"})})},defaultAttrs:{},attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.londonTubeInternalInt.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},Vd={component:e=>{const{id:t,path:n,handlePointerDown:o}=e,i=Ee.useCallback((e=>o(t,e)),[t,o]);return b.jsx("path",{d:n,fill:"none",stroke:"black",strokeWidth:"5",strokeDasharray:"5 2.5",cursor:"pointer",onPointerDown:i})},defaultAttrs:{},attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.londonTube10MinWalk.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},Wd={color:[Ia.London,"central","#DC241F",Va.white]},Jd={component:e=>{const{id:t,path:n,styleAttrs:o,handlePointerDown:i}=e,{color:r=Wd.color}=null!=o?o:Wd,a=Ee.useCallback((e=>i(t,e)),[t,i]);return b.jsx("path",{id:t,d:n,fill:"none",stroke:r[2],strokeWidth:"5",cursor:"pointer",onPointerDown:a})},defaultAttrs:Wd,attrsComponent:e=>{const{t:t}=Ie(),n=[{type:"custom",label:t("color"),component:b.jsx(Yl,{type:rs.LondonTubeTerminal,defaultTheme:Wd.color})}];return b.jsx(ca,{fields:n})},metadata:{displayName:"panel.details.lines.londonTubeTerminal.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},Hd={colorBackground:[Ia.London,"thameslink","#d28db0",Va.white],colorForeground:[Ia.London,"white","#ffffff",Va.black],limitedService:!1},Kd={component:e=>{const{id:t,path:n,styleAttrs:o,handlePointerDown:i}=e,{colorBackground:r=Hd.colorBackground,colorForeground:a=Hd.colorForeground,limitedService:s=Hd.limitedService}=null!=o?o:Hd,l=Ee.useCallback((e=>i(t,e)),[t,i]);return s?b.jsxs("g",{id:t,onPointerDown:l,cursor:"pointer",children:[b.jsx("path",{d:n,fill:"none",stroke:r[2],strokeWidth:"5",strokeLinecap:"round"}),b.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"4.25",strokeLinecap:"round"}),b.jsx("path",{d:n,fill:"none",stroke:r[2],strokeWidth:"2",strokeDasharray:"7 3"})]}):b.jsxs("g",{id:t,onPointerDown:l,cursor:"pointer",children:[b.jsx("path",{d:n,fill:"none",stroke:r[2],strokeWidth:"5",strokeLinecap:"round"}),b.jsx("path",{d:n,fill:"none",stroke:a[2],strokeWidth:"2",strokeDasharray:"7 3"})]})},defaultAttrs:Hd,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:o}=e,{t:i}=Ie(),r=[{type:"switch",label:i("panel.details.lines.londonRail.limitedService"),oneLine:!0,isChecked:n.limitedService,onChange:e=>{n.limitedService=e,o(t,n)},minW:"full"},{type:"custom",label:i("panel.details.lines.londonRail.colorBackground"),component:b.jsx(Yl,{type:rs.LondonRail,colorKey:"colorBackground",defaultTheme:Hd.colorBackground})},{type:"custom",label:i("panel.details.lines.londonRail.colorForeground"),component:b.jsx(Yl,{type:rs.LondonRail,colorKey:"colorForeground",defaultTheme:Hd.colorForeground})}];return b.jsx(ca,{fields:r})},metadata:{displayName:"panel.details.lines.londonRail.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},qd={color:[Ia.London,"elizabeth","#9364cc",Va.white]},Qd={component:e=>{const{id:t,path:n,styleAttrs:o,handlePointerDown:i}=e,{color:r=qd.color}=null!=o?o:qd,a=Ee.useCallback((e=>i(t,e)),[t,i]);return b.jsx("g",{id:t,onPointerDown:a,cursor:"pointer",children:b.jsx("path",{d:n,fill:"none",stroke:r[3],strokeWidth:"1.67",strokeLinecap:"round"})})},preComponent:e=>{const{id:t,path:n,styleAttrs:o,handlePointerDown:i}=e,{color:r=qd.color}=null!=o?o:qd,a=Ee.useCallback((e=>i(t,e)),[t,i]);return b.jsx("g",{id:`${t}.pre`,onPointerDown:a,cursor:"pointer",children:b.jsx("path",{d:n,fill:"none",stroke:r[2],strokeWidth:"5"})})},defaultAttrs:qd,attrsComponent:e=>{const{t:t}=Ie(),n=[{type:"custom",label:t("color"),component:b.jsx(Yl,{type:rs.LondonSandwich,defaultTheme:qd.color})}];return b.jsx(ca,{fields:n})},metadata:{displayName:"panel.details.lines.londonSandwich.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},Zd={color:[Ia.London,"rail","#d6ae00",Va.white]},Yd={component:e=>{const{id:t,path:n,styleAttrs:o,handlePointerDown:i}=e,{color:r=Zd.color}=null!=o?o:Zd,a=Ee.useCallback((e=>i(t,e)),[t,i]);return b.jsxs("g",{id:t,onPointerDown:a,cursor:"pointer",children:[b.jsx("path",{d:n,fill:"none",stroke:r[2],strokeWidth:"5",strokeLinecap:"round"}),b.jsx("path",{d:n,fill:"none",stroke:r[3],strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"0.001 6"})]})},defaultAttrs:Zd,attrsComponent:e=>{const{t:t}=Ie(),n=[{type:"custom",label:t("color"),component:b.jsx(Yl,{type:rs.LondonLutonAirportDART,defaultTheme:Zd.color})}];return b.jsx(ca,{fields:n})},metadata:{displayName:"panel.details.lines.londonLutonAirportDART.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},Xd={color:[Ia.London,"dangleway","#dc241f",Va.white]},ec={component:e=>{const{id:t,path:n,styleAttrs:o,handlePointerDown:i}=e,{color:r=Xd.color}=null!=o?o:Xd,a=Ee.useCallback((e=>i(t,e)),[t,i]);return b.jsxs("g",{id:t,onPointerDown:a,cursor:"pointer",children:[b.jsx("path",{d:n,fill:"none",stroke:r[2],strokeWidth:"5"}),b.jsx("path",{d:n,fill:"none",stroke:"white",strokeWidth:"3"}),b.jsx("path",{d:n,fill:"none",stroke:r[2],strokeWidth:"1"})]})},defaultAttrs:Xd,attrsComponent:e=>{const{t:t}=Ie(),n=[{type:"custom",label:t("color"),component:b.jsx(Yl,{type:rs.LondonIFSCloudCableCar,defaultTheme:Xd.color})}];return b.jsx(ca,{fields:n})},metadata:{displayName:"panel.details.lines.londonIFSCloudCableCar.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},tc={color:[Ia.Guangzhou,"ir","#2559a8",Va.white]},nc={component:e=>{const{id:t,path:n,styleAttrs:o,handlePointerDown:i}=e,{color:r=tc.color}=null!=o?o:tc,a=Ee.useCallback((e=>i(t,e)),[t,i]);return b.jsxs("g",{id:t,onPointerDown:a,cursor:"pointer",children:[b.jsx("path",{d:n,fill:"none",stroke:r[2],strokeWidth:"5",strokeLinecap:"round"}),b.jsx("path",{d:n,fill:"none",stroke:r[3],strokeWidth:"2.5",strokeDasharray:"7.5"})]})},defaultAttrs:tc,attrsComponent:()=>{},metadata:{displayName:"panel.details.lines.guangdongIntercityRailway.displayName",supportLinePathType:[is.Diagonal,is.Perpendicular,is.RotatePerpendicular]}},oc=p("o",{[is.Diagonal]:Fl,[is.Perpendicular]:Vl,[is.RotatePerpendicular]:Jl,[is.Simple]:ss}),ic=p("au",{[rs.SingleColor]:ed,[rs.ShmetroVirtualInt]:td,[rs.ShanghaiSuburbanRailway]:od,[rs.GzmtrVirtualInt]:id,[rs.GZMTRLoop]:ad,[rs.ChinaRailway]:ld,[rs.BjsubwaySingleColor]:cd,[rs.BjsubwayTram]:gd,[rs.BjsubwayDotted]:Ad,[rs.DualColor]:yd,[rs.River]:wd,[rs.MTRRaceDays]:Nd,[rs.MTRLightRail]:Rd,[rs.MTRUnpaidArea]:Ld,[rs.MTRPaidArea]:Td,[rs.MRTUnderConstruction]:_d,[rs.MRTSentosaExpress]:Md,[rs.JREastSingleColor]:Pd,[rs.JREastSingleColorPattern]:Bd,[rs.LRTSingleColor]:Fd,[rs.LondonTubeTerminal]:Jd,[rs.LondonTubeInternalInt]:Ud,[rs.LondonTube10MinWalk]:Vd,[rs.LondonRail]:Kd,[rs.LondonSandwich]:Qd,[rs.LondonLutonAirportDART]:Yd,[rs.LondonIFSCloudCableCar]:ec,[rs.GuangdongIntercityRailway]:nc}),rc=p("I",(async()=>JSON.stringify((await hi((async()=>{const{default:e}=await f.import("./tutorial-legacy-vF7BXoa9.js");return{default:e}}))).default))),ac=p("x",(async e=>{let t=!1;e||(e=await rc(),t=!0);let n=JSON.parse(e);"version"in n&&Number.isInteger(n.version)||(n=JSON.parse(await rc()),t=!0);let o=Number(n.version),i=JSON.stringify(n);for(;o in lc;)i=lc[o](i),o=Number(JSON.parse(i).version),t=!0;return t&&(console.warn(`Upgrade save from version: ${n.version} to version: ${o}`),localStorage.setItem(Pa.PARAM_BACKUP,e)),i})),sc=p("s",(e=>{const{present:t,past:n,future:o}=e,i=g(g({},h(e,c)),{},{graph:t,version:43});return JSON.stringify(i)})),lc={0:e=>{var t;return JSON.stringify({version:1,graph:null===(t=JSON.parse(e))||void 0===t?void 0:t.graph,svgViewBoxZoom:100,svgViewBoxMin:{x:0,y:0}})},1:e=>{const t=JSON.parse(e),n=new ai;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&t.type!==Hl.GzmtrInt)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),o=n.getNodeAttribute(e,t);o&&"transfer"in o&&delete o.transfer,n.mergeNodeAttributes(e,{[t]:o})})),JSON.stringify(g(g({},t),{},{version:2,graph:n.export()}))},2:e=>{const t=JSON.parse(e),n=new ai;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn"))).forEach((e=>{const t=n.getNodeAttribute(e,"type"),o=n.getNodeAttribute(e,t);"middle"===(null==o?void 0:o.nameOffsetX)&&"middle"===(null==o?void 0:o.nameOffsetY)&&(o.nameOffsetX="right",o.nameOffsetY="top"),"up"===(null==o?void 0:o.nameOffsetY)&&(o.nameOffsetY="top"),n.mergeNodeAttributes(e,{[t]:o})})),JSON.stringify(g(g({},t),{},{version:3,graph:n.export()}))},3:e=>{const t=JSON.parse(e),n=new ai;return n.import(null==t?void 0:t.graph),n.filterEdges(((e,t,n,o,i,r,a)=>e.startsWith("line"))).forEach((e=>{const t=n.getEdgeAttribute(e,"color");n.removeEdgeAttribute(e,"color"),n.mergeEdgeAttributes(e,{style:rs.SingleColor,[rs.SingleColor]:{color:t}})})),n.filterEdges(((e,t,n,o,i,r,a)=>e.startsWith("misc_edge"))).forEach((e=>{const t=`line_${os(10)}`,[o,i]=n.extremities(e),r=n.getEdgeAttribute(e,"type"),a=r;n.addDirectedEdgeWithKey(t,o,i,{visible:!0,zIndex:0,type:is.Simple,[r]:structuredClone(oc[is.Simple].defaultAttrs),style:a,[a]:structuredClone(ic[a].defaultAttrs),reconcileId:""}),n.dropEdge(e)})),JSON.stringify(g(g({},t),{},{version:4,graph:n.export()}))},4:e=>{const t=JSON.parse(e),n=new ai;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&(t.type===Hl.GzmtrBasic||t.type===Hl.GzmtrInt))).forEach((e=>{const t=n.getNodeAttribute(e,"type"),o=n.getNodeAttribute(e,t);o.open=!0,o.secondaryNames=["",""],n.mergeNodeAttributes(e,{[t]:o})})),JSON.stringify(g(g({},t),{},{version:5,graph:n.export()}))},5:e=>{const t=JSON.parse(e),n=new ai;return n.import(null==t?void 0:t.graph),n.filterEdges(((e,t,n,o,i,r,a)=>e.startsWith("line")&&t.type===is.Simple)).forEach((e=>{var t;const o=null!==(t=n.getEdgeAttribute(e,is.Simple))&&void 0!==t?t:{offset:0};o.offset=0,n.mergeEdgeAttributes(e,{[is.Simple]:o})})),JSON.stringify(g(g({},t),{},{version:6,graph:n.export()}))},6:e=>{const t=JSON.parse(e),n=new ai;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&t.type===Hl.GzmtrBasic)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),o=n.getNodeAttribute(e,t);o.tram=!1,n.mergeNodeAttributes(e,{[t]:o})})),JSON.stringify(g(g({},t),{},{version:7,graph:n.export()}))},7:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:8})),8:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:9})),9:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:10})),10:e=>{const t=JSON.parse(e),n=new ai;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===ds.Text)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),o=n.getNodeAttribute(e,t);o.color=[Ia.Shanghai,"jsr","#000000",Va.white],n.mergeNodeAttributes(e,{[t]:o})})),JSON.stringify(g(g({},t),{},{version:11,graph:n.export()}))},11:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:12})),12:e=>{const t=JSON.parse(e),n=new ai;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===ds.Text)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),o=n.getNodeAttribute(e,t);o.rotate=0,o.italic=!1,n.mergeNodeAttributes(e,{[t]:o})})),JSON.stringify(g(g({},t),{},{version:13,graph:n.export()}))},13:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:14})),14:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:15})),15:e=>{const t=JSON.parse(e),n=new ai;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===ds.Text)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),o=n.getNodeAttribute(e,t);o.italic=o.italic?"italic":"normal",o.bold="normal",n.mergeNodeAttributes(e,{[t]:o})})),JSON.stringify(g(g({},t),{},{version:16,graph:n.export()}))},16:e=>{const t=JSON.parse(e),n=new ai;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===ds.Facilities)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),o=n.getNodeAttribute(e,t);let i=0;switch(o.type){case"airport":case"maglev":case"disney":case"railway":i+=12.5;break;case"hsr":case"airport_hk":case"disney_hk":i+=9.5}n.updateNodeAttribute(e,"y",(e=>(null!=e?e:0)+i))})),JSON.stringify(g(g({},t),{},{version:17,graph:n.export()}))},17:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:18})),18:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:19})),19:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:20})),20:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:21})),21:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:22})),22:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:23})),23:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:24})),24:e=>{const t=JSON.parse(e),n=new ai;return n.import(t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&t.type===Hl.GzmtrInt||e.startsWith("misc_node")&&t.type===ds.GzmtrLineBadge)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),o=n.getNodeAttribute(e,t);o.tram=!1,n.mergeNodeAttributes(e,{[t]:o})})),JSON.stringify(g(g({},t),{},{version:25,graph:n.export()}))},25:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:26})),26:e=>{const t=JSON.parse(e),n=new ai;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===ds.GzmtrLineBadge)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),o=n.getNodeAttribute(e,t);o.span=!0,n.mergeNodeAttributes(e,{[t]:o})})),JSON.stringify(g(g({},t),{},{version:27,graph:n.export()}))},27:e=>{const t=JSON.parse(e),n=new ai;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&t.type===Hl.GzmtrInt)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),o=n.getNodeAttribute(e,t);for(let n=0;nJSON.stringify(g(g({},JSON.parse(e)),{},{version:29})),29:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:30})),30:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:31})),31:e=>{const t=JSON.parse(e),n=new ai;return n.import(null==t?void 0:t.graph),n.filterEdges(((e,t)=>t.style===rs.ChinaRailway)).forEach((e=>{const t=n.getEdgeAttributes(e)[rs.ChinaRailway];n.mergeEdgeAttributes(e,{[rs.ChinaRailway]:g(g({},t),{},{color:[Ia.Shanghai,"jsr","#000000",Va.white]})})})),JSON.stringify(g(g({},t),{},{version:32,graph:n.export()}))},32:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:33})),33:e=>{const t=JSON.parse(e),n=new ai;return n.import(null==t?void 0:t.graph),n.forEachDirectedEdge((e=>{n.setEdgeAttribute(e,"parallelIndex",-1),n.updateEdgeAttribute(e,"zIndex",(e=>Math.max(-10,(null!=e?e:0)-5)))})),n.forEachNode((e=>{n.updateNodeAttribute(e,"zIndex",(e=>Math.min(10,(null!=e?e:0)+5)))})),JSON.stringify(g(g({},t),{},{version:34,graph:n.export()}))},34:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:35})),35:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:36})),36:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:37})),37:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:38})),38:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:39})),39:e=>{const t=JSON.parse(e),n=new ai;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("misc_node")&&t.type===ds.Facilities)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),o=n.getNodeAttribute(e,t);"qingdao_airport"===o.type?o.type="airport_qingdao":"qingdao_coach_station"===o.type?o.type="coach_station_qingdao":"qingdao_cruise_terminal"===o.type?o.type="cruise_terminal_qingdao":"qingdao_railway"===o.type?o.type="railway_qingdao":"qingdao_tram"===o.type&&(o.type="tram_qingdao"),n.mergeNodeAttributes(e,{[t]:o})})),JSON.stringify(g(g({},t),{},{version:40,graph:n.export()}))},40:e=>JSON.stringify(g(g({},JSON.parse(e)),{},{version:41})),41:e=>{const t=JSON.parse(e),n=new ai;n.import(null==t?void 0:t.graph);const o=e=>e.map((e=>e.replaceAll("\\","\n")));return n.forEachNode(((e,t)=>{const i=n.getNodeAttribute(e,"type");let r;(i===Hl.BjsubwayBasic||i===Hl.BjsubwayInt||i===Hl.FoshanMetroBasic||i===Hl.GuangdongIntercityRailway||i===Hl.GzmtrBasic||i===Hl.GzmtrInt||i===Hl.JREastBasic||i===Hl.JREastImportant||i===Hl.KunmingRTBasic||i===Hl.KunmingRTInt||i===Hl.MRTBasic||i===Hl.MRTInt||i===Hl.MTR||i===Hl.ShanghaiSuburbanRailway||i===Hl.ShmetroBasic2020||i===Hl.ShmetroBasic||i===Hl.ShmetroInt||i===Hl.ShmetroOutOfSystemInt||i===Hl.SuzhouRTBasic||i===Hl.SuzhouRTInt||i===Hl.TokyoMetroBasic||i===Hl.TokyoMetroInt)&&(r=o(t[i].names)),r&&(t[i].names=r,n.mergeNodeAttributes(e,t))})),JSON.stringify(g(g({},t),{},{version:42,graph:n.export()}))},42:e=>{const t=JSON.parse(e),n=new ai;return n.import(null==t?void 0:t.graph),n.filterNodes(((e,t)=>e.startsWith("stn")&&t.type===Hl.GzmtrInt2024)).forEach((e=>{const t=n.getNodeAttribute(e,"type"),o=n.getNodeAttribute(e,t);o.columns=2,o.topHeavy=!1,o.osiPosition="none",o.preferVertical&&2===o.transfer.flat().length&&(o.columns=1),delete o.preferVertical,n.mergeNodeAttributes(e,{[t]:o})})),JSON.stringify(g(g({},t),{},{version:43,graph:n.export()}))}};Ue();const dc=Ve({account:Ua,app:sl,param:ml,runtime:Dl}),cc=((e={})=>We({reducer:dc,middleware:e=>e({serializableCheck:!1}),preloadedState:e}))();cc.subscribe((async()=>{await(async e=>{if(!es){const e=(new ai).export();es=await Qa(JSON.stringify(e)),Yn.debug(`Default graph hash: ${es}`)}const t=await Qa(JSON.stringify(e));Xa&&Xa!==es&&Xa!==t&&(Yn.debug(`Notify RMP save change, hash: ${t}`),Ya.postMessage({type:"SAVE_CHANGED",key:Pa.PARAM,from:"rmp"})),Xa=t})(cc.getState().param.present),localStorage.setItem(Pa.PARAM,sc(cc.getState().param)),localStorage.setItem(Pa.APP,JSON.stringify(cc.getState().app)),localStorage.setItem(Pa.LOGIN_STATE,JSON.stringify(cc.getState().account))}));const uc=p("c",(()=>Ge())),hc=p("d",Fe),pc=Ee.lazy((()=>hi((()=>f.import("./page-header-legacy-DbtpRsfW.js"))))),gc=Ee.lazy((()=>hi((()=>f.import("./tools-legacy-DgamdWyG.js"))))),fc=Ee.lazy((()=>hi((()=>f.import("./svg-wrapper-legacy-CiPXEZA7.js"))))),mc=Ee.lazy((()=>hi((()=>f.import("./details-legacy-BmTVwGJQ.js"))))),yc=Ee.lazy((()=>hi((()=>f.import("./rmg-palette-app-clip-legacy-CI8NAU9x.js")))));function bc(){const e=uc(),{paletteAppClip:{input:t}}=hc((e=>e.runtime)),{t:n}=Ie(),[o,i]=Ee.useState(!1);return Ee.useEffect((()=>{Zn.isStandaloneWindow()&&!window.localStorage.getItem(Pa.DO_NOT_SHOW_RMT_MSG)&&i(!0)}),[]),b.jsx(Aa,{children:b.jsx(pa,{children:b.jsxs(Ee.Suspense,{fallback:b.jsx("p",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:"Rail Map Painter protocol... checked"}),children:[b.jsx(pc,{}),o&&b.jsxs(de,{status:"info",variant:"solid",size:"xs",pl:3,pr:1,py:1,zIndex:"1",children:[b.jsx(ce,{}),b.jsxs(re,{children:[b.jsx(le,{href:"/?app=rmp",isExternal:!0,fontWeight:"bold",children:n("rmtPromotion")})," ",b.jsx(le,{as:"button",ml:"auto",textDecoration:"underline",onClick:()=>i(!1),children:n("close")})," | ",b.jsx(le,{as:"button",textDecoration:"underline",onClick:()=>{i(!1),window.localStorage.setItem(Pa.DO_NOT_SHOW_RMT_MSG,"true")},children:n("noShowAgain")})]})]}),b.jsx(qr,{allowReset:!0,children:b.jsxs(j,{direction:"row",height:"100%",overflow:"hidden",sx:{position:"relative"},children:[b.jsx(gc,{}),b.jsx(fc,{}),b.jsx(mc,{})]})}),b.jsx(yc,{isOpen:!!t,onClose:()=>e(El()),defaultTheme:t,onSelect:t=>e(Pl(t))})]})})})}const vc=JSON.parse(null!==(Ke=localStorage.getItem(Pa.LOGIN_STATE))&&void 0!==Ke?Ke:"{}"),wc=JSON.parse(null!==(qe=localStorage.getItem(Pa.APP))&&void 0!==qe?qe:"{}"),xc=localStorage.getItem(Pa.PARAM);"telemetry"in wc&&("app"in wc.telemetry&&cc.dispatch(tl(wc.telemetry.app)),"project"in wc.telemetry&&cc.dispatch(nl(wc.telemetry.project))),"preference"in wc&&("unlockSimplePathAttempts"in wc.preference&&cc.dispatch(ol(wc.preference.unlockSimplePathAttempts)),"toolsPanel"in wc.preference&&"expand"in wc.preference.toolsPanel&&cc.dispatch(il(wc.preference.toolsPanel.expand)),"autoParallel"in wc.preference&&cc.dispatch(rl(wc.preference.autoParallel)),"randomStationsNames"in wc.preference&&cc.dispatch(al(wc.preference.randomStationsNames))),"state"in vc&&cc.dispatch(Ba(vc.state)),"activeSubscriptions"in vc&&cc.dispatch(Ga(vc.activeSubscriptions)),ac(xc).then((e=>{const t=JSON.parse(e),{version:n,graph:o}=t,i=h(t,u);window.graph=ai.from(o);const r=g(g({},i),{},{present:o,past:[],future:[]});cc.dispatch(hl(r)),cc.dispatch(bl()),cc.dispatch(vl()),ui.createRoot(document.getElementById("root")).render(b.jsx(Ee.StrictMode,{children:b.jsx(Je,{store:cc,children:b.jsx(He,{i18n:ms,children:b.jsx(bc,{})})})})),Zn.injectUITools(),ns(cc),ts(),window.setInterval((()=>ts()),9e5)}))}}}))}(); diff --git a/assets/master-manager-BoebmmSV.js b/assets/master-manager-BoebmmSV.js deleted file mode 100644 index bc2ff750..00000000 --- a/assets/master-manager-BoebmmSV.js +++ /dev/null @@ -1 +0,0 @@ -import{b as x,u as D,r as $}from"./react-D-_si4LB.js";import{i as L,S as k,av as K,r as ma,C as B,M as W,aS as Ee,L as Ra,e as Wa,aU as Da,aV as V,aW as G,aX as T,c as it,d as lt,aY as jn,aZ as De,P as ue,V as Ht,W as Ut,a_ as On,a$ as vt,b0 as Xa,aR as vn,q as Ct,v as yt,b1 as Bn,b2 as La,Q as Ya,R as nn,w as Ha,b3 as Ua,b4 as Fa,aT as Va,D as Ga,a as Za}from"./index-BiHghyID.js";import{j as a,aK as Ke,a4 as _n,af as Ne,ax as et,B as wn,a6 as qa,ad as Ft,O as ye,g as Wt,b0 as In,b1 as Pn,aL as Qa,at as fa,$ as ha,au as ua,a1 as pa,a2 as ga,a3 as xa,Q as Ja,a5 as Ca,al as Ka}from"./chakra-xNcrfRXW.js";var ya=(s=>(s.Airport="airport",s.Airport2024="airport_2024",s.Maglev="maglev",s.Disney="disney",s.Railway="railway",s.Railway2024="railway_2024",s.HSR="hsr",s.AirportHK="airport_hk",s.DisneyHK="disney_hk",s.NgongPing360="ngong_ping_360",s.Tiananmen="tiananmen",s.AirportBJ="airport_bj",s.BusTerminalSuzhou="bus_terminal_suzhou",s.RailwaySuzhou="railway_suzhou",s.BusInterchange="bus_interchange",s.AirportSG="airport_sg",s.CruiseCentre="cruise_centre",s.SentosaExpress="sentosa_express",s.CableCar="cable_car",s.Merlion="merlion",s.MarinaBaySands="marina_bay_sands",s.GardensByTheBay="gardens_by_the_bay",s.SingaporeFlyer="singapore_flyer",s.Esplanade="esplanade",s.AirportQingdao="airport_qingdao",s.CoachStationQingdao="coach_station_qingdao",s.CruiseTerminalQingdao="cruise_terminal_qingdao",s.RailwayQingdao="railway_qingdao",s.TramQingdao="tram_qingdao",s.AirportGuangzhou="airport_guangzhou",s.RailwayGuangzhou="railway_guangzhou",s.IntercityGuangzhou="intercity_guangzhou",s.RiverCraftLondon="river_craft",s.AirportLondon="airport_london",s.CoachStationLondon="coach_station_london",s))(ya||{});const es=s=>{const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{type:m=an.type}=n!=null?n:an,r=x.useRef(null),[l,h]=x.useState({width:25,height:25});x.useEffect(()=>h(r.current.getBBox()),[m,h,r]);const u=x.useCallback(g=>d(t,g),[t,d]),c=x.useCallback(g=>i(t,g),[t,i]),p=x.useCallback(g=>f(t,g),[t,f]);return a.jsx("g",{id:t,transform:"translate(".concat(e-l.width/2,", ").concat(o-l.height/2,")"),onPointerDown:u,onPointerMove:c,onPointerUp:p,style:{cursor:"move"},children:a.jsx("image",{ref:r,href:"/rmp/images/facilities/".concat(m,".svg"),onLoad:()=>h(r.current.getBBox())})})},an={type:"airport"},ts=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"select",label:n("panel.details.nodes.facilities.type"),value:e.type,options:{airport:"Airport",airport_2024:"Airport 2024",maglev:"Maglev",disney:"Disney",railway:"Railway",railway_2024:"Railway 2024",hsr:"HSR",airport_hk:"Airport Hongkong",disney_hk:"Disney Hongkong",ngong_ping_360:"Ngong Ping 360",tiananmen:"Tiananmen",airport_bj:"Airport Beijing",bus_terminal_suzhou:"Bus Terminal Suzhou",railway_suzhou:"Railway Suzhou",bus_interchange:"Bus Interchange",airport_sg:"Changi Airport",cruise_centre:"Cruise Centre",sentosa_express:"Sentosa Express",cable_car:"Cable Car",merlion:"Merlion",marina_bay_sands:"Marina Bay Sands",gardens_by_the_bay:"Gardens by the Bay",singapore_flyer:"Singapore Flyer",esplanade:"Esplanade",airport_qingdao:"Airport Qingdao",railway_qingdao:"Railway Qingdao",coach_station_qingdao:"Coach Station Qingdao",cruise_terminal_qingdao:"Cruise Terminal Qingdao",tram_qingdao:"Tram Qingdao",airport_guangzhou:"Airport Guangzhou",railway_guangzhou:"Railway Guangzhou",intercity_guangzhou:"Intercity Guangzhou",river_craft:"River services interchange",airport_london:"Airport London",coach_station_london:"Victoria Coach Station"},onChange:i=>{e.type=i,o(t,e)}}];return a.jsx(L,{fields:d,minW:"full"})},ns=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsxs("g",{transform:"translate(12, 0)scale(0.4)",children:[a.jsx("circle",{cx:"0",cy:"29.33899",r:"29.33899",fill:"currentColor"}),a.jsx("path",{id:"airport",d:"M28.9769,6.60134c1.711.013,3.111,2.53205,3.111,4.241v10.337s17.106,15.435,17.358,15.666a1.145,1.145,0,0,1,.488,1.152v2.833c0,.651-.451.61-.695.467-.334-.119-17.151-8.863-17.151-8.863-.004,1.458-.797,9.006-1.326,13.304,0,0,4.61,2.457,4.699,2.521.334.268.352.359.352.852v2.001c0,.477-.352.428-.51.324-.183-.062-5.693-1.921-5.693-1.921a2.56018,2.56018,0,0,0-.633-.127,2.31654,2.31654,0,0,0-.666.127s-5.477,1.859-5.672,1.921c-.185.104-.523.153-.523-.324v-2.001c0-.493.029-.584.367-.852.086-.064,4.678-2.521,4.678-2.521-.524-4.298-1.307-11.846-1.325-13.304,0,0-16.822,8.744-17.148,8.863-.217.143-.69.184-.69-.467v-2.833a1.16206,1.16206,0,0,1,.473-1.152c.276-.231,17.365-15.666,17.365-15.666v-10.337c0-1.709,1.403-4.228,3.14105-4.241",transform:"translate(-28.9697,0.14347)",fill:"white"})]})}),ol={component:es,icon:ns,defaultAttrs:an,attrsComponent:ts,metadata:{displayName:"panel.details.nodes.facilities.displayName",tags:[]}},il=()=>navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome"),zt={source:'url("./fonts/LTAIdentity-Medium.woff")',descriptors:{display:"swap"}},ct={source:'url("./fonts/Mplus2-Medium.otf")',descriptors:{display:"swap"}},Tn={source:'url("./fonts/Roboto-Bold.ttf")',descriptors:{display:"swap"}},$n={source:'url("./fonts/MontaguSlab.ttf")',descriptors:{display:"swap"}},En={source:'url("./fonts/Railway-PlyE.otf")',descriptors:{display:"swap"}},Pt={[k.MTR]:{className:[".rmp-name__mtr__zh",".rmp-name__mtr__en"],cssFont:{"MyriadPro-Semibold":void 0,"Vegur-Bold":void 0,"GenYoMinTW-SB":void 0},cssName:"fonts_mtr"},[k.MRTBasic]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:zt},cssName:"fonts_mrt"},[k.MRTInt]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:zt},cssName:"fonts_mrt"},[k.JREastBasic]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{"M PLUS 2":ct},cssName:"fonts_jreast"},[k.JREastImportant]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{"M PLUS 2":ct},cssName:"fonts_jreast"},[K.BerlinSBahnLineBadge]:{className:[".rmp-name__berlin"],cssFont:{Roboto:Tn},cssName:"fonts_berlin"},[K.BerlinUBahnLineBadge]:{className:[".rmp-name__berlin"],cssFont:{Roboto:Tn},cssName:"fonts_berlin"},[K.JREastLineBadge]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{'"M PLUS 2"':ct},cssName:"fonts_jreast"},[K.MRTDestinationNumbers]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:zt},cssName:"fonts_mrt"},[K.MRTLineBadge]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:zt},cssName:"fonts_mrt"},[k.TokyoMetroBasic]:{className:[".rmp-name__tokyo_en",".rmp-name__jreast_ja"],cssFont:{MontaguSlab:$n,"M PLUS 2":ct},cssName:"fonts_tokyo"},[k.TokyoMetroInt]:{className:[".rmp-name__tokyo_en",".rmp-name__jreast_ja"],cssFont:{MontaguSlab:$n,"M PLUS 2":ct},cssName:"fonts_tokyo"},[k.LondonTubeBasic]:{className:[".rmp-name__tube"],cssFont:{Railway:En},cssName:"fonts_tube"},[k.LondonTubeInt]:{className:[".rmp-name__tube"],cssFont:{Railway:En},cssName:"fonts_tube"}},Rn=[],as=async s=>{const t=Pt[s];if(!t)return;const{cssFont:e,cssName:o}=t;if(Rn.includes(o))return;Rn.push(o),await Promise.all(Object.entries(e).map(([d,i])=>ma.loadFont(d,i&&{configs:[i]})));const n=document.createElement("link");n.rel="stylesheet",n.id=o,n.href="/rmp/styles/".concat(o,".css"),document.head.append(n)},ss=async(s,t)=>{var d;const e=document.createElement("style");for(let i=document.styleSheets.length-1;i>=0;i=i-1)if((d=document.styleSheets[i].href)!=null&&d.endsWith("styles/".concat(t,".css"))){e.textContent=[...document.styleSheets[i].cssRules].map(f=>f.cssText).filter(f=>!f.startsWith("@font-face")).join("\n");break}e.textContent+="\n";const n=(await Promise.allSettled(Object.keys(s).map(ma.getFontCSS))).filter(i=>i.status==="fulfilled").map(i=>i.value);return e.textContent+=n.join("\n"),e},I=x.forwardRef((s,t)=>{const{text:e,lineHeight:o,grow:n,dominantBaseline:d=n==="up"?"auto":n==="down"?"hanging":"middle",baseOffset:i=2,funcDX:f=l=>0,...m}=s,r=n==="bidirectional"?-((e.length-1)*o)/2:0;return a.jsx("g",{ref:t,children:(n==="up"?[...e].reverse():e).map((l,h,u)=>a.jsx("text",{dy:(h*o+i)*(n==="up"?-1:1)+r,dx:f(h),dominantBaseline:d,...m,children:l},"".concat(l).concat(h)))})});I.displayName="MultilineText";const Wn={zh:16,en:10},ee={top:{namesPos:1,lineHeight:Wn.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:Wn.zh,polarity:1}},ba={zh:k.ShmetroBasic,en:k.ShmetroBasic,mtr__zh:k.MTR,mtr__en:k.MTR,berlin:K.BerlinSBahnLineBadge,mrt:k.MRTBasic,jreast_ja:k.JREastBasic,jreast_en:k.JREastBasic,tokyo_en:k.TokyoMetroBasic,tube:k.LondonTubeBasic},os=s=>{const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{content:m=oe.content,fontSize:r=oe.fontSize,lineHeight:l=oe.lineHeight,textAnchor:h=oe.textAnchor,dominantBaseline:u=oe.dominantBaseline,language:c=oe.language,color:p=oe.color,rotate:g=oe.rotate,italic:C=oe.italic,bold:y=oe.bold}=n!=null?n:oe,j=x.useRef(null),[b,_]=x.useState({x:0,y:0,width:32,height:16});x.useEffect(()=>_(j.current.getBBox()),[m,r,l,h,u,c,g,C,y,_,j]),x.useEffect(()=>{const v=ba[c];v&&as(v)},[c]);const O=x.useCallback(v=>d(t,v),[t,d]),N=x.useCallback(v=>i(t,v),[t,i]),w=x.useCallback(v=>f(t,v),[t,f]);return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(g,")"),onPointerDown:O,onPointerMove:N,onPointerUp:w,style:{cursor:"move"},children:[a.jsx("rect",{className:"removeMe",fill:"gray",fillOpacity:"0.1",x:b.x-1.5,y:b.y-1.5,width:b.width+3,height:b.height+3}),a.jsx(I,{ref:j,text:m.split("\n"),lineHeight:l,grow:"down",className:"rmp-name__".concat(c),fontSize:r,textAnchor:h,dominantBaseline:u,fill:p[2],fontStyle:C,fontWeight:y})]})},oe={content:"Enter your text here",fontSize:16,lineHeight:16,textAnchor:"middle",dominantBaseline:"middle",language:"en",color:[B.Shanghai,"jsr","#000000",W.white],rotate:0,italic:"normal",bold:"normal"},is=s=>{var i,f,m,r,l,h,u;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.nodes.text.content"),value:(i=e.content)!=null?i:oe.content,onChange:c=>{e.content=c.toString(),o(t,e)},minW:"full"},{type:"input",label:n("panel.details.nodes.text.fontSize"),value:((f=e.fontSize)!=null?f:oe.fontSize).toString(),validator:c=>Number.isInteger(c)&&Number(c)>0,onChange:c=>{e.fontSize=Number(c),o(t,e)},minW:"full"},{type:"input",label:n("panel.details.nodes.text.lineHeight"),value:((m=e.lineHeight)!=null?m:oe.lineHeight).toString(),validator:c=>Number.isInteger(c)&&Number(c)>0,onChange:c=>{e.lineHeight=Number(c),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.nodes.text.textAnchor"),value:(r=e.textAnchor)!=null?r:oe.textAnchor,options:{start:n("panel.details.nodes.text.start"),middle:n("panel.details.nodes.text.middle"),end:n("panel.details.nodes.text.end")},onChange:c=>{e.textAnchor=c,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.nodes.text.dominantBaseline"),value:(l=e.dominantBaseline)!=null?l:oe.dominantBaseline,options:{auto:n("panel.details.nodes.text.auto"),middle:n("panel.details.nodes.text.middle"),hanging:n("panel.details.nodes.text.hanging")},onChange:c=>{e.dominantBaseline=c,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.nodes.text.language"),value:(h=e.language)!=null?h:oe.language,options:{zh:n("panel.details.nodes.text.zh"),en:n("panel.details.nodes.text.en"),mtr__zh:n("panel.details.nodes.text.mtr__zh"),mtr__en:n("panel.details.nodes.text.mtr__en"),berlin:n("panel.details.nodes.text.berlin"),mrt:n("panel.details.nodes.text.mrt"),jreast_ja:n("panel.details.nodes.text.jreast_ja"),jreast_en:n("panel.details.nodes.text.jreast_en"),tokyo_en:n("panel.details.nodes.text.tokyo_en"),tube:n("panel.details.nodes.text.tube")},onChange:c=>{e.language=c.toString(),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.nodes.text.rotate"),value:(u=e.rotate)!=null?u:oe.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:c=>{e.rotate=Number(c),o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.nodes.text.italic"),isChecked:e.italic==="italic",onChange:c=>{e.italic=c?"italic":"normal",o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.nodes.text.bold"),isChecked:e.bold==="bold",onChange:c=>{e.bold=c?"bold":"normal",o(t,e)},minW:"full"},{type:"custom",label:n("color"),component:a.jsx(Ee,{type:K.Text,defaultTheme:oe.color})}];return a.jsx(L,{fields:d})},ls=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"middle",fontSize:"10",children:"Text"})}),ll={component:os,icon:ls,defaultAttrs:oe,attrsComponent:is,metadata:{displayName:"panel.details.nodes.text.displayName",tags:[]}},rl=(s,t)=>s.filterEdges((e,o,n,d,i,f,m)=>t.has(n)&&t.has(d)),rs=s=>{const t=Object.fromEntries([...Object.values(k),Object.values(K)].map(e=>[e,!1]));return s.forEachNode(e=>{const o=s.getNodeAttribute(e,"type");t[o]=!0}),t},cs=(s,t,e,o,n,d)=>s<=n&&n<=e&&t<=d&&d<=o,cl=(s,t,e,o,n)=>{const d=t<=o?t:o,i=e<=n?e:n,f=t<=o?o:t,m=e<=n?n:e;return s.filterNodes((r,l)=>cs(d,i,f,m,l.x,l.y))},dl=(s,t,e)=>{const o=[],n=new Set;return t.forEach(d=>{const i=s.getNodeAttributes(d).type,f=s.getNodeAttribute(d,i);if(f.color!==void 0){const m=f.color;n.has(m.toString())||(o.push(m),n.add(m.toString()))}}),e.filter(d=>Ra.includes(s.getEdgeAttribute(d,"style"))).forEach(d=>{const i=s.getEdgeAttributes(d),f=i[i.style].color;n.has(f.toString())||(o.push(f),n.add(f.toString()))}),o},ja=s=>{const t=[],e=new Set;return s.filterNodes(o=>s.getNodeAttribute(o,"type")===K.Master).forEach(o=>{const n=s.getNodeAttributes(o)[K.Master];e.has(n.randomId)||(e.add(n.randomId),t.push(n))}),t},ds=(s,t,e)=>{const o=new Blob([e],{type:t});ms(s,o)},ms=(s,t)=>{const e=window.URL.createObjectURL(t),o=document.createElement("a");o.href=e,o.download=s,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(e)},ml=async(s,t,e,o)=>{const{xMin:n,yMin:d,xMax:i,yMax:f}=Wa(s),[m,r]=[i-n,f-d],l=document.getElementById("canvas").cloneNode(!0);t||l.appendChild(await us(i-400,f-120)),l.setAttribute("viewBox","".concat(n," ").concat(d," ").concat(m," ").concat(r)),l.setAttribute("width",m.toString()),l.setAttribute("height",r.toString()),Object.entries({".rmp-name-outline":["paint-order","stroke","stroke-linejoin"]}).forEach(([u,c])=>{const p=document.querySelector(u);if(p===null)return;const g=window.getComputedStyle(p);l.querySelectorAll(u).forEach(C=>{if(u===".rmp-name-outline"&&o===1.1){const y=C.insertAdjacentElement("afterend",C.cloneNode(!0));y&&(y.classList.remove(u.slice(1)),y.classList.length===0&&C.removeAttribute("class"),y.removeAttribute("stroke-width"))}c.forEach(y=>{C.setAttribute(y,g.getPropertyValue(y))}),C.classList.remove(u.slice(1)),C.classList.length===0&&C.removeAttribute("class")})}),l.querySelectorAll('[fill="url(#opaque)"]').forEach(u=>{u.remove()}),l.querySelectorAll(".removeMe").forEach(u=>{u.remove()});const h=rs(s);return await fs(l,s,h,e),await hs(l,s,h),{elem:l,width:m,height:r}},fs=async(s,t,e,o)=>{var d;const n=new Set;if(Object.keys(Pt).filter(i=>e[i]).forEach(i=>n.add(i)),t.filterNodes((i,f)=>i.startsWith("misc_node_")&&f.type===K.Text).map(i=>t.getNodeAttribute(i,K.Text).language).map(i=>ba[i]).filter(i=>i!==k.ShmetroBasic).forEach(i=>n.add(i)),o)[".rmp-name__zh",".rmp-name__en"].forEach(i=>{s.querySelectorAll(i).forEach(f=>{f.classList.remove(i.slice(1)),f.classList.length===0&&f.removeAttribute("class")})}),n.forEach(i=>{Pt[i].className.forEach(f=>{s.querySelectorAll(f).forEach(m=>{m.classList.remove(f.slice(1)),m.classList.length===0&&m.removeAttribute("class")})})});else{const i=document.createElement("style");for(let f=0;fm.cssText).join("\n");break}s.prepend(i),await Promise.all([...n.values()].map(f=>Pt[f]).map(async({cssName:f,cssFont:m})=>{try{s.prepend(await ss(m,f))}catch(r){alert("Failed to load fonts. Fonts in the exported PNG will be missing."),console.error(r)}}))}},hs=async(s,t,e)=>{if(e[K.Facilities]){const o=t.filterNodes((f,m)=>m.type===K.Facilities),n=Object.fromEntries(Object.values(ya).map(f=>[f,[]]));o.forEach(f=>{var r;const m=(r=t.getNodeAttribute(f,K.Facilities))==null?void 0:r.type;m&&n[m].push(f)});const d=Object.entries(n).filter(([f,m])=>m.length>0).map(([f,m])=>f),i=await Promise.all((await Promise.all(d.map(async f=>await fetch("/rmp//images/facilities/".concat(f,".svg"))))).map(f=>f.text()));d.forEach((f,m)=>{const r=document.createElement("div");r.innerHTML=i[m];const l=r.querySelector("svg"),h=document.createElementNS("http://www.w3.org/2000/svg","symbol");for(const u of l.attributes)h.setAttribute(u.name,u.value);for(;l.firstChild;)h.appendChild(l.firstChild);l.replaceWith(h),h.id=f,s.appendChild(h),n[f].forEach(u=>{const c=s.querySelector("#".concat(u)),p=c==null?void 0:c.querySelector("image");if(p){c.removeChild(p);const g=document.createElementNS("http://www.w3.org/2000/svg","use");g.setAttribute("href","#".concat(f)),g.setAttribute("height",h.getAttribute("height")),g.setAttribute("width",h.getAttribute("width")),c.appendChild(g)}}),r.remove()})}},us=async(s,t)=>{const e=document.createElementNS("http://www.w3.org/2000/svg","g");e.setAttribute("transform","translate(".concat(s,", ").concat(t,")scale(2)"));const n=await(await fetch("/rmp//logo.svg")).text(),d=document.createElement("div");d.innerHTML=n;const i=d.querySelector("svg"),f=document.createElement("g");f.setAttribute("transform","translate(-60, -25)scale(0.1)"),f.setAttribute("font-family","Arial, sans-serif"),f.innerHTML=i.innerHTML,e.appendChild(f);const m=document.createElementNS("http://www.w3.org/2000/svg","text");m.setAttribute("font-family","Arial, sans-serif"),m.setAttribute("font-size","16");const r=Da.t("Rail Map Painter");m.appendChild(document.createTextNode(r));const l=document.createElementNS("http://www.w3.org/2000/svg","text");l.setAttribute("font-family","Arial, sans-serif"),l.setAttribute("font-size","10"),l.setAttribute("y","10");const h=window.location.origin;let u="https://railmapgen.org/";return h.includes("github")?u="https://railmapgen.github.io/":h.includes("gitlab")&&(u="https://railmapgen.gitlab.io/"),u+="?app=rmp",l.appendChild(document.createTextNode(u)),e.appendChild(f),e.appendChild(m),e.appendChild(l),e},fl=()=>{const[s,t]=$.useState({width:void 0,height:void 0});return $.useEffect(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[]),s};function hl(){const{i18n:s}=D();return t=>{var e,o;return(o=(e=s.languages.map(n=>t[n]).find(n=>n!==void 0))!=null?e:t.en)!=null?o:"(Translation Error)"}}const st={top:{lineHeight:6.67,offset:3.5+1.5+5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:-.17+1+5}},ps=s=>{var y;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Tt.nameOffsetX,nameOffsetY:l=Tt.nameOffsetY}=(y=n[k.ShmetroBasic])!=null?y:Tt,h=x.useCallback(j=>d(t,j),[t,d]),u=x.useCallback(j=>i(t,j),[t,i]),c=x.useCallback(j=>f(t,j),[t,f]),p=r==="left"?-13.33:r==="right"?13.33:0,g=(m[ee[l].namesPos].split("\n").length*st[l].lineHeight+st[l].offset)*ee[l].polarity,C=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("circle",{id:"stn_core_".concat(t),r:5,stroke:"#393332",strokeWidth:"1",fill:"white",onPointerDown:h,onPointerMove:u,onPointerUp:c,style:{cursor:"move"}}),a.jsxs("g",{transform:"translate(".concat(p,", ").concat(g,")"),textAnchor:C,className:"rmp-name-outline",strokeWidth:"1",children:[a.jsx(I,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...m,r,l,h,u,c])},Tt={...T,nameOffsetX:"right",nameOffsetY:"top"},gs=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},xs=a.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:a.jsx("circle",{cx:"12",cy:"12",r:"5",stroke:"currentColor",fill:"none"})}),Cs={component:ps,icon:xs,defaultAttrs:Tt,attrsComponent:gs,metadata:{displayName:"panel.details.stations.shmetroBasic.displayName",cities:[B.Shanghai],canvas:[V.RailMap],categories:[G.Metro],tags:[]}},Ce={0:{textDx:0,textDy:-17.5,textAnchor:"middle",namesPos:1,lineHeight:6.67,polarity:-1},45:{textDx:1,textDy:-16.25,textAnchor:"start",namesPos:1,lineHeight:6.67,polarity:-1},90:{textDx:12,textDy:0,textAnchor:"start",namesPos:0,lineHeight:0,polarity:0},135:{textDx:5,textDy:21,textAnchor:"start",namesPos:0,lineHeight:12.67,polarity:1},180:{textDx:0,textDy:22.5,textAnchor:"middle",namesPos:0,lineHeight:12.67,polarity:1},225:{textDx:-5,textDy:21,textAnchor:"end",namesPos:0,lineHeight:12.67,polarity:1},270:{textDx:-12,textDy:0,textAnchor:"end",namesPos:0,lineHeight:0,polarity:0},315:{textDx:-1,textDy:-16.25,textAnchor:"end",namesPos:1,lineHeight:6.67,polarity:-1}},ys=s=>{var g;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,color:r=bt.color,rotate:l=bt.rotate}=(g=n[k.ShmetroBasic2020])!=null?g:bt,h=Ce[l].textDy+(m[Ce[l].namesPos].split("\n").length-1)*Ce[l].lineHeight*Ce[l].polarity,u=x.useCallback(C=>d(t,C),[t,d]),c=x.useCallback(C=>i(t,C),[t,i]),p=x.useCallback(C=>f(t,C),[t,f]);return x.useMemo(()=>a.jsxs("g",{id:t,children:[a.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(l,")"),children:a.jsx("rect",{id:"stn_core_".concat(t),x:"-2",y:"-7.83",width:"4",height:"7.83",stroke:"none",fill:r[2],onPointerDown:u,onPointerMove:c,onPointerUp:p,style:{cursor:"move"}})}),a.jsxs("g",{transform:"translate(".concat(e+Ce[l].textDx,", ").concat(o+h,")"),textAnchor:Ce[l].textAnchor,className:"rmp-name-outline",strokeWidth:"1",children:[a.jsx(I,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),dx:l>=45&&l<=135?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...m,l,r,u,c,p])},bt={...T,rotate:0,color:[B.Shanghai,"sh1","#E4002B",W.white]},bs=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:i=>{e.rotate=Number(i),o(t,e)},minW:"full"},{type:"custom",label:n("color"),component:a.jsx(Ee,{type:k.ShmetroBasic2020,defaultTheme:bt.color})}];return a.jsx(L,{fields:d})},js=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),Os={component:ys,icon:js,defaultAttrs:bt,attrsComponent:bs,metadata:{displayName:"panel.details.stations.shmetroBasic2020.displayName",cities:[B.Shanghai],canvas:[V.RailMap],categories:[G.Metro],tags:[]}},Dn={top:{lineHeight:6.67,offset:3.5+1.5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:-.17+1}},vs=s=>{var v;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Ge.nameOffsetX,nameOffsetY:l=Ge.nameOffsetY,rotate:h=Ge.rotate,width:u=Ge.width,height:c=Ge.height}=(v=n[k.ShmetroInt])!=null?v:Ge,p=x.useCallback(A=>d(t,A),[t,d]),g=x.useCallback(A=>i(t,A),[t,i]),C=x.useCallback(A=>f(t,A),[t,f]),y=h===0||h===180?u:h===90||h===270?c:u*Math.SQRT1_2,j=h===0||h===180?c:h===90||h===270?u:u*Math.SQRT1_2,b=r==="left"?-6.83:r==="right"?6.83:0,_=(Math.abs(b)+y/2)*Math.sign(b),O=(m[ee[l].namesPos].split("\n").length*Dn[l].lineHeight+Dn[l].offset)*ee[l].polarity,N=(Math.abs(O)+j/2)*Math.sign(O),w=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>a.jsxs("g",{id:t,children:[a.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(h,")"),children:a.jsx("rect",{id:"stn_core_".concat(t),x:-u/2,y:-c/2,height:c,width:u,ry:c/2,stroke:"#393332",strokeWidth:"1",fill:"white",onPointerDown:p,onPointerMove:g,onPointerUp:C,style:{cursor:"move"}})}),a.jsxs("g",{transform:"translate(".concat(e+_,", ").concat(o+N,")"),textAnchor:w,className:"rmp-name-outline",strokeWidth:"1",children:[a.jsx(I,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...m,r,l,h,u,c,p,g,C])},Ge={...T,nameOffsetX:"right",nameOffsetY:"top",rotate:0,height:10,width:13},_s=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.shmetroInt.height"),value:e.height.toString(),validator:i=>Number.isInteger(i),onChange:i=>{e.height=Number(i),o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.shmetroInt.width"),value:e.width.toString(),validator:i=>Number.isInteger(i),onChange:i=>{e.width=Number(i),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:i=>{e.rotate=Number(i),o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},ws=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("rect",{x:"4.5",y:"7",height:"10",width:"15",ry:"5",stroke:"currentColor",fill:"none"})}),Ss={component:vs,icon:ws,defaultAttrs:Ge,attrsComponent:_s,metadata:{displayName:"panel.details.stations.shmetroInt.displayName",cities:[B.Shanghai],canvas:[V.RailMap],categories:[G.Metro],tags:["interchange"]}},Ns=s=>{var y;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=$t.nameOffsetX,nameOffsetY:l=$t.nameOffsetY}=(y=n[k.ShmetroOutOfSystemInt])!=null?y:$t,h=x.useCallback(j=>d(t,j),[t,d]),u=x.useCallback(j=>i(t,j),[t,i]),c=x.useCallback(j=>f(t,j),[t,f]),p=r==="left"?-13.33:r==="right"?13.33:0,g=(m[ee[l].namesPos].split("\n").length*st[l].lineHeight+st[l].offset)*ee[l].polarity,C=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("circle",{r:5,stroke:"#393332",strokeWidth:"1.33",fill:"white"}),a.jsx("circle",{r:2.3,stroke:"#393332",strokeWidth:"1.33",fill:"white"}),a.jsx("circle",{id:"stn_core_".concat(t),r:5+1.33/2,fill:"white",fillOpacity:"0",onPointerDown:h,onPointerMove:u,onPointerUp:c,style:{cursor:"move"},className:"removeMe"}),a.jsxs("g",{transform:"translate(".concat(p,", ").concat(g,")"),textAnchor:C,className:"rmp-name-outline",strokeWidth:"1",children:[a.jsx(I,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...m,r,l,h,u,c])},$t={...T,nameOffsetX:"right",nameOffsetY:"top"},ks=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},Ms=a.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[a.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.67",fill:"white"}),a.jsx("circle",{cx:"12",cy:"12",r:"4.6",stroke:"currentColor",strokeWidth:"2.67",fill:"white"})]}),As={component:Ns,icon:Ms,defaultAttrs:$t,attrsComponent:ks,metadata:{displayName:"panel.details.stations.shmetroOsysi.displayName",cities:[B.Shanghai],canvas:[V.RailMap],categories:[G.Metro],tags:[]}},zs=s=>{var p;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,rotate:r=sn.rotate}=(p=n[k.ShanghaiSuburbanRailway])!=null?p:sn,l=Ce[r].textDy+(m[Ce[r].namesPos].split("\n").length-1)*Ce[r].lineHeight*Ce[r].polarity,h=x.useCallback(g=>d(t,g),[t,d]),u=x.useCallback(g=>i(t,g),[t,i]),c=x.useCallback(g=>f(t,g),[t,f]);return x.useMemo(()=>a.jsxs("g",{id:t,children:[a.jsxs("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(r,")"),children:[a.jsx("rect",{x:"-2",y:"-7.83",width:"4",height:"7.83",stroke:"none",fill:"#898989"}),a.jsx("rect",{x:"-3.5",y:"-1",width:"7",height:"2",stroke:"none",fill:"white"}),a.jsx("rect",{x:-2+1.1675,y:-7.83+1.5,width:4*2/5,height:7.83-1.5,stroke:"none",fill:"white"}),a.jsx("rect",{id:"stn_core_".concat(t),x:"-2",y:"-7.83",width:"4",height:7.83+1.25,stroke:"none",fill:"white",fillOpacity:"0",onPointerDown:h,onPointerMove:u,onPointerUp:c,style:{cursor:"move"},className:"removeMe"})]}),a.jsxs("g",{transform:"translate(".concat(e+Ce[r].textDx,", ").concat(o+l,")"),textAnchor:Ce[r].textAnchor,className:"rmp-name-outline",strokeWidth:"2.5",children:[a.jsx(I,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),dx:r>=45&&r<=135?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...m,r,h,u,c])},sn={...T,rotate:0},Bs=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:i=>{e.rotate=Number(i),o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},Is=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),Ps={component:zs,icon:Is,defaultAttrs:sn,attrsComponent:Bs,metadata:{displayName:"panel.details.stations.shanghaiSuburbanRailway.displayName",cities:[B.Shanghai],canvas:[V.RailMap],categories:[G.Metro],tags:[]}};var Xe=1.3,Oa=1.7,Vt=18.5,Ts=Vt+Xe,Sn=Vt*2+Xe;var Et=45,ze=Et-3,va=function(s,t){var e=[s,t].map(function(o){return o.match(/^(\w+).+$/)});if(e[0]&&e[1]&&e[0][1]===e[1][1])return e[0][1]},Nn=function(s){var t=s.match(/^(\d+)\D+$/);return t==null?void 0:t[1]},on=function(){return on=Object.assign||function(s){for(var t,e=1,o=arguments.length;e0)&&!(n=o.next()).done;)d.push(n.value)}catch(f){i={error:f}}finally{try{n&&!n.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return d},Ws=function(s,t){var e=Nn(s);if(e)return{isDigit:!0,spanningPart:e};var o=va(s,t);return o?{isDigit:!1,spanningPart:o}:{isDigit:!1,spanningPart:""}};function Xn(s){var t=s.zhName,e=s.enName,o=s.foregroundColour,n=s.backgroundColour,d=s.zhClassName,i=s.enClassName,f=s.passed,m=s.children,r=Es(s,["zhName","enName","foregroundColour","backgroundColour","zhClassName","enClassName","passed","children"]),l=Ws(t,e),h=l.isDigit,u=l.spanningPart,c=$.useRef(null),p=Rs($.useState({x:0,height:0,width:0}),2),g=p[0],C=p[1];$.useEffect(function(){c.current&&C(c.current.getBBox())},[t,e]);var y=ze/Math.max(ze,g.width),j=(-g.x-g.width/2)*y,b=g.height*(1-y)/2;return a.jsxs("g",ln({textAnchor:"middle",fill:f?W.white:o},r,{children:[a.jsx(Gt,{fill:f?"#aaa":n}),a.jsx("g",{ref:c,transform:"translate(".concat(j,",").concat(b,")scale(").concat(y,")"),children:a.jsxs("text",{className:d,fontSize:21,x:-1,y:12,textAnchor:"end",dominantBaseline:"central",children:[u,a.jsx("tspan",{className:d,fontSize:10,x:0,dy:-4,textAnchor:"start",dominantBaseline:"central",children:t.slice(u.length).trim()}),a.jsx("tspan",{className:i,fontSize:6.5,letterSpacing:-.1,x:0,dy:10,textAnchor:"start",dominantBaseline:"middle",children:h?e:e.slice(u.length).trim()})]})}),m]}))}var rn=function(){return rn=Object.assign||function(s){for(var t,e=1,o=arguments.length;e0)&&!(n=o.next()).done;)d.push(n.value)}catch(f){i={error:f}}finally{try{n&&!n.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return d};function Xs(s){var t,e=s.zhName,o=s.enName,n=s.foregroundColour,d=s.backgroundColour,i=s.zhClassName,f=s.enClassName,m=s.passed,r=s.children,l=Ds(s,["zhName","enName","foregroundColour","backgroundColour","zhClassName","enClassName","passed","children"]),h=(t=Nn(e))!==null&&t!==void 0?t:"",u=$.useRef(null),c=$.useRef(null),p=Ln($.useState({width:0}),2),g=p[0],C=p[1],y=Ln($.useState({width:0}),2),j=y[0],b=y[1];$.useEffect(function(){u.current&&C(u.current.getBBox()),c.current&&b(c.current.getBBox())},[e,o]);var _=ze/Math.max(ze,g.width),O=ze/Math.max(ze,j.width),N={nameZh:{y:7.3+13.5*(1-_)*_/2},nameEn:{y:19.5-9*(1-O)*O/2}};return a.jsxs("g",rn({textAnchor:"middle",fill:m?W.white:n},l,{children:[a.jsx(Gt,{fill:m?"#aaa":d}),a.jsxs("text",{ref:u,className:i,fontSize:12,transform:"translate(0,".concat(N.nameZh.y,")scale(").concat(_,")"),dominantBaseline:"central",children:[a.jsx("tspan",{fontSize:16,dy:.7,dominantBaseline:"central",children:h}),a.jsx("tspan",{dy:-.7,dominantBaseline:"central",children:e.slice(h.length)})]}),a.jsx("text",{ref:c,className:f,fontSize:8,transform:"translate(0,".concat(N.nameEn.y,")scale(").concat(O,")"),dominantBaseline:"middle",children:o}),r]}))}var cn=function(){return cn=Object.assign||function(s){for(var t,e=1,o=arguments.length;e0)&&!(n=o.next()).done;)d.push(n.value)}catch(f){i={error:f}}finally{try{n&&!n.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return d};function Hs(s){var t=s.zhName,e=s.enName,o=s.foregroundColour,n=s.backgroundColour,d=s.zhClassName,i=s.enClassName,f=s.passed,m=s.children,r=Ls(s,["zhName","enName","foregroundColour","backgroundColour","zhClassName","enClassName","passed","children"]),l=$.useRef(null),h=Ys($.useState({width:0}),2),u=h[0],c=h[1];$.useEffect(function(){l.current&&c(l.current.getBBox())},[t,e]);var p=Math.max(45,u.width+4);return a.jsxs("g",cn({textAnchor:"middle",fill:f?W.white:o},r,{children:[a.jsx(Gt,{customWidth:p,fill:f?"#aaa":n}),a.jsxs("g",{ref:l,children:[a.jsx("text",{className:d,fontSize:8.5,y:8,dominantBaseline:"central",children:t}),a.jsx("text",{className:i,fontSize:5.5,y:18,dominantBaseline:"middle",children:e})]}),m]}))}var dn=function(){return dn=Object.assign||function(s){for(var t,e=1,o=arguments.length;e0)&&!(n=o.next()).done;)d.push(n.value)}catch(f){i={error:f}}finally{try{n&&!n.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return d};function Fs(s){var t=s.zhName,e=s.enName,o=s.foregroundColour,n=s.backgroundColour,d=s.zhClassName,i=s.enClassName,f=s.passed,m=s.children,r=Us(s,["zhName","enName","foregroundColour","backgroundColour","zhClassName","enClassName","passed","children"]),l=$.useRef(null),h=$.useRef(null),u=Yn($.useState({width:0}),2),c=u[0],p=u[1],g=Yn($.useState({width:0}),2),C=g[0],y=g[1];$.useEffect(function(){l.current&&p(l.current.getBBox()),h.current&&y(h.current.getBBox())},[t,e]);var j=ze/Math.max(ze,c.width),b=ze/Math.max(ze,C.width),_={nameZh:{y:7.3+13.5*(1-j)*j/2},nameEn:{y:19.5-9*(1-b)*b/2}};return a.jsxs("g",dn({textAnchor:"middle",fill:f?W.white:o},r,{children:[a.jsx(Gt,{fill:f?"#aaa":n}),a.jsx("text",{ref:l,className:d,fontSize:12,transform:"translate(0,".concat(_.nameZh.y,")scale(").concat(j,")"),dominantBaseline:"central",children:t}),a.jsx("text",{ref:h,className:i,fontSize:8,transform:"translate(0,".concat(_.nameEn.y,")scale(").concat(b,")"),dominantBaseline:"middle",children:e}),m]}))}var qe=function(){return qe=Object.assign||function(s){for(var t,e=1,o=arguments.length;e=5?a.jsx(Hs,qe({},t)):a.jsx(Fs,qe({},t))}});var Vs=function(s,t){var e=Nn(s);if(e!==void 0)return 1;var o=va(s,t);return o!==void 0?2:3},mn=function(){return mn=Object.assign||function(s){for(var t,e=1,o=arguments.length;e0)&&!(n=o.next()).done;)d.push(n.value)}catch(f){i={error:f}}finally{try{n&&!n.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return d},Bt=17,Sa=$.forwardRef(function(t,e){var o=t.Icon,n=t.lineNum,d=t.stnNum,i=t.strokeColour,f=t.passed,m=t.size,r=t.textClassName,l=t.bolderBorder,h=t.useSameScale,u=t.children,c=Qs(t,["Icon","lineNum","stnNum","strokeColour","passed","size","textClassName","bolderBorder","useSameScale","children"]),p=$.useContext(kn).updateId,g=$.useRef(null),C=$.useRef(null),y=Fn($.useState({width:0}),2),j=y[0],b=y[1],_=Fn($.useState({width:0}),2),O=_[0],N=_[1];$.useEffect(function(){g.current&&b(g.current.getBBox()),C.current&&N(C.current.getBBox())},[n,d,p]);var w=n&&n.length>2;$.useEffect(function(){h&&w&&console.warn("GenericStationNumber(), useSameScale props does not work when lineNum has more than 2 characters")},[h,w]);var v=Bt/Math.max(Bt,j.width),A=h&&(n==null?void 0:n.length)===2?v:Bt/Math.max(Bt,O.width),M=m==="sm"?"0.7":m==="lg"?"1.4":1;return a.jsxs("g",hn({ref:e},c,{children:[a.jsxs("g",{transform:"scale(".concat(M,")"),children:[a.jsx(o,{stroke:f?"#aaa":i,filled:!n&&!d,bolder:l}),(n||d)&&a.jsxs("g",{textAnchor:"middle",fontSize:13.5,fill:f?"#aaa":"#000",children:[a.jsx("g",{transform:"translate(-9.25,0)scale(".concat(v,")"),children:a.jsx("text",{ref:g,className:r,dominantBaseline:"central",x:.5,children:n})}),a.jsx("g",{transform:"translate(9.25,0)scale(".concat(A,")"),children:a.jsx("text",{ref:C,className:r,dominantBaseline:"central",children:d})})]})]}),u]}))}),un=function(){return un=Object.assign||function(s){for(var t,e=1,o=arguments.length;e0)&&!(n=o.next()).done;)d.push(n.value)}catch(f){i={error:f}}finally{try{n&&!n.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return d},Qt=function(s,t){return Array.from(Array(s).keys()).map(function(e){return(e-(s-1)/2)*t})},Ks=function(s,t,e){if(s<=0)return[];if(s===1)return[[0,0]];for(var o=t>s?s:t,n=Sn,d=Ts,i=Qt(o,n),f=Math.ceil(s/o),m=Qt(f,d),r=s%o,l=[],h=0;h=u.length)return console.warn(", anchor index ".concat(m," is out of bound")),[0,0];var b=Zn(u[m],2),_=b[0],O=b[1];return[-_,-O]},[u,m]),2),p=c[0],g=c[1],C=$.useRef(null),y=$.useRef([]);$.useEffect(function(){y.current=y.current.slice(0,o.length)},[o.length]);var j=o.length===2&&i===1&&!!r;return $.useImperativeHandle(e,function(){return{target:C.current,children:y.current,getCoordinates:function(){return u},getCorrectedBBox:function(){var b,_,O=(_=(b=C.current)===null||b===void 0?void 0:b.getBBox())!==null&&_!==void 0?_:{x:0,y:0,width:0,height:0};return O.y-=Fe/2,O.height+=Fe,j?(r==="left"?O.x-=Jt/2:O.x-=Fe/2,O.width+=Jt/2+Fe/2):(O.x-=Fe/2,O.width+=Fe),O},getTranslate:function(){return[p,g]}}},[u,p,g,C.current,y.current,r]),a.jsxs("g",Dt({ref:C,transform:"translate(".concat(p,",").concat(g,")")},h,{children:[o.map(function(b,_){var O=b.style,N=qn(O);return a.jsx(N,{stroke:"#aaa",filled:!0,strokeWidth:Fe,transform:"translate(".concat(u[_][0],",").concat(u[_][1],")")},_)}),j&&a.jsx(Vn,{position:r,r:Sn/2.9,strokeWidth:Jt,strokeDasharray:void 0}),o.map(function(b,_){var O=b.style,N=qn(O);return a.jsx(N,{stroke:"white",filled:!0,strokeWidth:Xe*2.6,transform:"translate(".concat(u[_][0],",").concat(u[_][1],")")},_)}),j&&a.jsx(Vn,{position:r}),o.length&&a.jsx("rect",{fill:"white",x:-12,y:u[0][1],width:24,height:-u[0][1]*2}),o.map(function(b,_){var O=b.style,N=Gn(b,["style"]),w=O==="fmetro"?Zt:ot;return a.jsx(w,Dt({ref:function(v){return y.current[_]=v},transform:"translate(".concat(u[_][0],",").concat(u[_][1],")"),textClassName:n},N),_)}),l]}))}),xn=function(){return xn=Object.assign||function(s){for(var t,e=1,o=arguments.length;e{var ie,E,H;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=ve.nameOffsetX,nameOffsetY:l=ve.nameOffsetY,color:h=ve.color,lineCode:u=ve.lineCode,stationCode:c=ve.stationCode,open:p=ve.open,secondaryNames:g=ve.secondaryNames,tram:C=ve.tram}=(ie=n[k.GzmtrBasic])!=null?ie:ve,y=x.useCallback(R=>d(t,R),[t,d]),j=x.useCallback(R=>i(t,R),[t,i]),b=x.useCallback(R=>f(t,R),[t,f]),_=x.useRef(null);(H=(E=_.current)==null?void 0:E.querySelector("path"))==null||H.setAttribute("id","stn_core_".concat(t));const O={en:C?5.08:6.56,zh:C?7.29:13.13},N={top:{namesPos:1,lineHeight:O.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:O.zh,polarity:1}},w=C?11:15,v=r==="left"?-w:r==="right"?w:0,A=C?8:10,M=(m[N[l].namesPos].split("\n").length*N[l].lineHeight+A)*N[l].polarity,S=r==="left"?"end":r==="right"?"start":!p&&r==="middle"&&g.join("")===""?"end":"middle",z=x.useRef(null),[P,Y]=x.useState(0);x.useEffect(()=>{var R,Z;return Y((Z=(R=z.current)==null?void 0:R.getBBox().width)!=null?Z:0)},[...g,C]);const U=x.useRef(null),[q,X]=x.useState(0);x.useEffect(()=>{var R,Z;return X((Z=(R=U.current)==null?void 0:R.getBBox().width)!=null?Z:0)},[...m,C]);const se=r==="middle"?q/2+(P+12*2)/2:(q+(P+12*2)/2)*(r==="left"?-1:1),ae=r==="middle"&&g.join("")!==""?q/2+(P+12*2):(q+P+(P!==0?12*2:0))*(r==="left"?-1:r==="right"?1:0);return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("g",{transform:"scale(".concat(.57915*(C?.729:1),")"),onPointerDown:y,onPointerMove:j,onPointerUp:b,style:{cursor:"move"},ref:_,children:a.jsx(ot,{id:"stn_core_".concat(t),strokeColour:h[2],lineNum:u===""?void 0:u,stnNum:c===""?void 0:c,textClassName:"rmp-name__zh"})}),a.jsxs("g",{ref:U,transform:"translate(".concat(v,", ").concat(M,")"),textAnchor:S,children:[a.jsx(I,{text:m[0].split("\n"),fontSize:O.zh,lineHeight:O.zh,grow:"up",className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),fontSize:O.en,lineHeight:O.en,grow:"down",className:"rmp-name__en"})]}),g.join("")!==""&&a.jsxs("g",{transform:"translate(".concat(v+se,", ").concat(M,")"),textAnchor:"middle",children:[a.jsx("text",{fontSize:"13.13",dx:-(P+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),a.jsx("text",{fontSize:"13.13",dx:(P+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),a.jsxs("g",{ref:z,children:[a.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:g[0]}),a.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:g[1]})]})]}),!p&&a.jsxs("g",{transform:"translate(".concat(v+ae,", ").concat(M,")"),textAnchor:r==="middle"?"start":S,children:[a.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),a.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},ve={...T,nameOffsetX:"right",nameOffsetY:"top",color:[B.Guangzhou,"gz1","#F3D03E",W.black],lineCode:"1",stationCode:"01",open:!0,secondaryNames:["",""],tram:!1},oo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"custom",label:n("color"),component:a.jsx(Ee,{type:k.GzmtrBasic,defaultTheme:ve.color})},{type:"input",label:n("panel.details.stations.common.lineCode"),value:e.lineCode,onChange:i=>{e.lineCode=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.common.stationCode"),value:e.stationCode,onChange:i=>{e.stationCode=i,o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.gzmtrBasic.open"),oneLine:!0,isChecked:e.open,onChange:i=>{e.open=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.gzmtrBasic.secondaryNameZh"),value:e.secondaryNames[0],onChange:i=>{e.secondaryNames[0]=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.gzmtrBasic.secondaryNameEn"),value:e.secondaryNames[1],onChange:i=>{e.secondaryNames[1]=i,o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.gzmtrBasic.tram"),oneLine:!0,isChecked:e.tram,onChange:i=>{e.tram=i,o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},io=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("g",{transform:"translate(12,12)scale(0.45)",children:a.jsx(ot,{strokeColour:"#000",lineNum:"1",stnNum:"01"})})}),lo={component:so,icon:io,defaultAttrs:ve,attrsComponent:oo,metadata:{displayName:"panel.details.stations.gzmtrBasic.displayName",cities:[B.Guangzhou],canvas:[V.RailMap],categories:[G.Metro],tags:[]}},Xt=[B.Guangzhou,"","#AAAAAA",W.white,"","","gz"];function Ma(s){const{interchangeList:t,onAdd:e,onDelete:o,onUpdate:n}=s,d=it(),{paletteAppClip:{output:i}}=lt(u=>u.runtime),{t:f}=D(),[m,r]=x.useState();x.useEffect(()=>{m!==void 0&&i&&(n==null||n(m,[...i,t[m][4],t[m][5],t[m][6]]),r(void 0))},[i==null?void 0:i.toString()]);const l=t.map((u,c)=>[{type:"input",label:f("panel.details.stations.common.lineCode"),value:u[4],minW:"80px",onChange:p=>n==null?void 0:n(c,[u[0],u[1],u[2],u[3],p,u[5],u[6]])},{type:"input",label:f("panel.details.stations.common.stationCode"),value:u[5],minW:"80px",onChange:p=>n==null?void 0:n(c,[u[0],u[1],u[2],u[3],u[4],p,u[6]])}]),h=(u,c,p)=>n==null?void 0:n(c,[u[0],u[1],u[2],u[3],u[4],u[5],p?"fs":"gz"]);return a.jsxs(jn,{direction:"column",children:[t.length===0&&a.jsxs(Ke,{spacing:.5,"data-testid":"interchange-card-stack",children:[a.jsx(_n,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:f("panel.details.stations.interchange.noInterchanges")}),a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.add"),onClick:()=>e==null?void 0:e(Xt),icon:a.jsx(De,{})})]}),t.map((u,c)=>a.jsxs(Ke,{spacing:.5,"data-testid":"interchange-card-stack-".concat(c),children:[a.jsx(ue,{label:f("color"),minW:"40px",noLabel:c!==0,children:a.jsx(Ht,{theme:[u[0],u[1],u[2],u[3]],onClick:()=>{r(c),d(Ut([u[0],u[1],u[2],u[3]]))}})}),a.jsx(L,{fields:l[c],noLabel:c!==0}),a.jsxs(et,{children:[e&&c===l.length-1?a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.copy"),onClick:()=>e==null?void 0:e(t.slice(-1)[0]),icon:a.jsx(On,{})}):a.jsx(wn,{minW:8}),o&&a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.remove"),onClick:()=>o==null?void 0:o(c),icon:a.jsx(vt,{})}),a.jsx(L,{fields:[{type:"switch",label:f("panel.details.stations.gzmtrInt.foshan"),isChecked:u[6]==="fs",onChange:p=>h(u,c,p)}]})]})]},c))]})}const Jn=[[[0,0]],[[0,0]],[[-21,0],[21,0]],[[-21.65,-12.5],[21.65,-12.5],[0,25]],[[-23,-18],[22,-16],[23,18],[-22,16]]],ro=s=>{var E,H,R,Z,pe,he,Le,be,ge,Ye,He,Ue,te,je,tt,wt,St,Nt,kt,rt,ce,Mt,An,zn;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Pe.nameOffsetX,nameOffsetY:l=Pe.nameOffsetY,transfer:h=Pe.transfer,open:u=Pe.open,secondaryNames:c=Pe.secondaryNames,tram:p=Pe.tram}=(E=n[k.GzmtrInt])!=null?E:Pe,g=x.useCallback(F=>d(t,F),[t,d]),C=x.useCallback(F=>i(t,F),[t,i]),y=x.useCallback(F=>f(t,F),[t,f]),j=qa("white","var(--chakra-colors-gray-800)"),b={en:p?5.08:6.56,zh:p?7.29:13.13},_={top:{namesPos:1,lineHeight:b.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:b.zh,polarity:1}},O=p?18:25,N=(r==="left"?-O:r==="right"?O:0)*(l==="middle"?1.1:1),w=p?14:18,v=(m[_[l].namesPos].split("\n").length*_[l].lineHeight+w*(r==="middle"?1.1:1))*_[l].polarity,A=r==="left"?"end":r==="right"?"start":!u&&r==="middle"&&c.join("")===""?"end":"middle",M=h.flat().slice(0,4),S=[["black","black"],[(R=(H=M.at(0))==null?void 0:H.at(2))!=null?R:"black",(pe=(Z=M.at(0))==null?void 0:Z.at(2))!=null?pe:"black"],[(Le=(he=M.at(0))==null?void 0:he.at(2))!=null?Le:"black",(ge=(be=M.at(1))==null?void 0:be.at(2))!=null?ge:"black"],[(He=(Ye=M.at(0))==null?void 0:Ye.at(2))!=null?He:"black",(te=(Ue=M.at(1))==null?void 0:Ue.at(2))!=null?te:"black",(tt=(je=M.at(2))==null?void 0:je.at(2))!=null?tt:"black"],[(St=(wt=M.at(0))==null?void 0:wt.at(2))!=null?St:"black",(kt=(Nt=M.at(1))==null?void 0:Nt.at(2))!=null?kt:"black",(ce=(rt=M.at(2))==null?void 0:rt.at(2))!=null?ce:"black",(An=(Mt=M.at(3))==null?void 0:Mt.at(2))!=null?An:"black"]],z=x.useRef(null),[P,Y]=x.useState(0);x.useEffect(()=>{var F,Oe;return Y((Oe=(F=z.current)==null?void 0:F.getBBox().width)!=null?Oe:0)},[...c]);const U=x.useRef(null),[q,X]=x.useState(0);x.useEffect(()=>{var F,Oe;return X((Oe=(F=U.current)==null?void 0:F.getBBox().width)!=null?Oe:0)},[...m]);const se=(q+(P+12*2)/2)*(r==="left"?-1:1),ae=(q+P+(P!==0?12*2:0))*(r==="left"?-1:r==="right"||P!==0?1:0),ie=r==="middle"?"start":A;return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[M.map(F=>F[2]).filter((F,Oe,At)=>At.indexOf(F)===Oe).map(F=>a.jsx("marker",{id:"gzmtr_int_arrow_".concat(F),markerWidth:"5",markerHeight:"5",refX:"1",refY:"1.25",orient:"auto",children:a.jsx("polygon",{points:"0.25,0 0.25,2.5 2.25,1.25",fill:F})},"gzmtr_int_arrow_".concat(F))),a.jsxs("g",{transform:"scale(".concat(.57915*(p?.729:1),")"),children:[M.length<=2&&a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M -21,-15 A 28 28 0 0 1 21,-15 L 21,15 A 28 28 0 0 1 -21,15 Z",fill:j}),a.jsx("path",{d:"M -21,-15 A 28 28 0 0 1 21,-15",fill:"none",stroke:S[M.length][0],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][0],")")}),a.jsx("path",{d:"M 21,15 A 28 28 0 0 1 -21,15",fill:"none",stroke:S[M.length][1],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][1],")")})]}),M.length===3&&a.jsxs(a.Fragment,{children:[a.jsx("circle",{r:"25",fill:j}),a.jsx("path",{d:"M -21.65,12.5 A 25 25 0 0 1 0,-25",fill:"none",stroke:S[M.length][0],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][0],")")}),a.jsx("path",{d:"M 0,-25 A 25 25 0 0 1 21.65,12.5",fill:"none",stroke:S[M.length][1],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][1],")")}),a.jsx("path",{d:"M 21.65,12.5 A 25 25 0 0 1 -21.65,12.5",fill:"none",stroke:S[M.length][2],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][2],")")}),a.jsx("path",{d:"M -21.65,12.5 A 25 25 0 0 1 0,-25",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][0],")")}),a.jsx("path",{d:"M 0,-25 A 25 25 0 0 1 21.65,12.5",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][1],")")})]}),M.length>=4&&a.jsxs(a.Fragment,{children:[a.jsx("circle",{r:"25",fill:j}),a.jsx("path",{d:"M -25,0 A 25 25 0 0 1 0,-25",fill:"none",stroke:S[M.length][0],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][0],")")}),a.jsx("path",{d:"M 0,-25 A 25 25 0 0 1 25,0",fill:"none",stroke:S[M.length][1],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][1],")")}),a.jsx("path",{d:"M 25,0 A 25 25 0 0 1 0,25",fill:"none",stroke:S[M.length][2],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][2],")")}),a.jsx("path",{d:"M 0,25 A 25 25 0 0 1 -25,0",fill:"none",stroke:S[M.length][3],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][3],")")}),a.jsx("path",{d:"M -25,0 A 25 25 0 0 1 0,-25",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][0],")")}),a.jsx("path",{d:"M 0,-25 A 25 25 0 0 1 25,0",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][1],")")}),a.jsx("path",{d:"M 25,0 A 25 25 0 0 1 0,25",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][2],")")})]}),(zn=h[0])==null?void 0:zn.map((F,Oe,At)=>a.jsx("g",{transform:"translate(".concat(Jn[At.length][Oe][0],",").concat(Jn[At.length][Oe][1],")"),children:F[6]==="gz"?a.jsx(ot,{strokeColour:F[2],lineNum:F[4],stnNum:F[5],textClassName:"rmp-name__zh"}):a.jsx(Zt,{strokeColour:F[2],lineNum:F[4],stnNum:F[5],textClassName:"rmp-name__zh"})},"gzmtr_int_".concat(t,"_stn_").concat(Oe))),a.jsx("circle",{id:"stn_core_".concat(t),r:"25",fill:"white",fillOpacity:"0",onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"},className:"removeMe"})]}),a.jsxs("g",{ref:U,transform:"translate(".concat(N,", ").concat(v,")"),textAnchor:A,children:[a.jsx(I,{text:m[0].split("\\"),fontSize:b.zh,lineHeight:b.zh,grow:"up",className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\\"),fontSize:b.en,lineHeight:b.en,grow:"down",className:"rmp-name__en"})]}),c.join("")!==""&&a.jsxs("g",{transform:"translate(".concat(N+se,", ").concat(v,")"),textAnchor:"middle",children:[a.jsx("text",{fontSize:"13.13",dx:-(P+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),a.jsx("text",{fontSize:"13.13",dx:(P+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),a.jsxs("g",{ref:z,children:[a.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:c[0]}),a.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:c[1]})]})]}),!u&&a.jsxs("g",{transform:"translate(".concat(N+ae,", ").concat(v,")"),textAnchor:ie,children:[a.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),a.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},Pe={...T,nameOffsetX:"right",nameOffsetY:"top",transfer:[[],[]],open:!0,secondaryNames:["",""],tram:!1},co=s=>{var u;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:c=>{e.names[0]=c,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:c=>{e.names[1]=c,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:c=>{e.nameOffsetX=c,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:c=>{e.nameOffsetY=c,o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.gzmtrInt.open"),oneLine:!0,isChecked:e.open,onChange:c=>{e.open=c,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.gzmtrInt.secondaryNameZh"),value:e.secondaryNames[0],onChange:c=>{e.secondaryNames[0]=c,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.gzmtrInt.secondaryNameEn"),value:e.secondaryNames[1],onChange:c=>{e.secondaryNames[1]=c.toString(),o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.gzmtrBasic.tram"),oneLine:!0,isChecked:e.tram,onChange:c=>{e.tram=c,o(t,e)},minW:"full"}],i=[4,4,0],f=(u=e.transfer)!=null?u:Pe.transfer,m=c=>p=>{const g=structuredClone(f);if(g.length<=c)for(let C=g.length;C<=c;C++)g[C]=[Xt];g[c].push(p),e.transfer=g,o(t,e)},r=c=>p=>{if(f.length>c&&f[c].length>p){const g=f.map((C,y)=>y===c?C.filter((j,b)=>b!==p):C);e.transfer=g,o(t,e)}},l=c=>(p,g)=>{if(f.length>c&&f[c].length>p){const C=f.map((y,j)=>j===c?y.map((b,_)=>_===p?[0,1,2,3,4,5,6].map(O=>g[O]===void 0?b[O]:g[O]):b):y);e.transfer=C,o(t,e)}},h=()=>m(f.length)(Xt);return a.jsxs(a.Fragment,{children:[a.jsx(L,{fields:d}),a.jsx(ue,{label:n("panel.details.stations.interchange.title"),children:a.jsxs(et,{align:"flex-start",children:[f.map((c,p)=>a.jsxs(x.Fragment,{children:[a.jsx(Ft,{size:"xs",children:n(p===0?"panel.details.stations.interchange.within":p===1?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),a.jsx(Ma,{interchangeList:c,onAdd:i[p]>c.length?m(p):void 0,onDelete:r(p),onUpdate:l(p)})]},p)),i[f.length]>0&&a.jsx(ye,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:a.jsx(De,{}),onClick:h,children:n("panel.details.stations.interchange.addGroup")})]})})]})},mo=a.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[a.jsx("g",{transform:"translate(6,12)scale(0.3)",children:a.jsx(ot,{strokeColour:"currentColor",lineNum:"1",stnNum:"09"})}),a.jsx("g",{transform:"translate(18,12)scale(0.3)",children:a.jsx(ot,{strokeColour:"currentColor",lineNum:"2",stnNum:"13"})}),a.jsx("marker",{id:"arrow",markerWidth:"5",markerHeight:"5",refX:"1",refY:"1.25",orient:"auto",children:a.jsx("polygon",{points:"0,0 0,3 2,1.5"})}),a.jsx("path",{d:"M 6,6 A 8 8 0 0 1 18,6",fill:"none",stroke:"currentColor",strokeWidth:"2",markerEnd:"url(#arrow)"}),a.jsx("path",{d:"M 18,18 A 8 8 0 0 1 6,18",fill:"none",stroke:"currentColor",strokeWidth:"2",markerEnd:"url(#arrow)"})]}),fo={component:ro,icon:mo,defaultAttrs:Pe,attrsComponent:co,metadata:{displayName:"panel.details.stations.gzmtrInt.displayName",cities:[B.Guangzhou],canvas:[V.RailMap],categories:[G.Metro],tags:[]}};var ho=function(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var o=e.call(s),n,d=[],i;try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)d.push(n.value)}catch(f){i={error:f}}finally{try{n&&!n.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return d};function pl(s){var t=s.children,e=ho($.useState(Math.random()),2),o=e[0],n=e[1];return a.jsx(kn.Provider,{value:{updateId:o,update:function(){return n(Math.random())}},children:t})}const Aa={en:6.56,zh:13.13},Ot=structuredClone(ee);Ot.top.lineHeight=Aa.en;Ot.bottom.lineHeight=Aa.zh;const uo=.56,Kn=.6,po=s=>{var he,Le,be,ge,Ye,He,Ue;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=xe.nameOffsetX,nameOffsetY:l=xe.nameOffsetY,transfer:h=xe.transfer,open:u=xe.open,secondaryNames:c=xe.secondaryNames,columns:p=xe.columns,topHeavy:g=xe.topHeavy,anchorAt:C=xe.anchorAt,osiPosition:y=xe.osiPosition}=(he=n[k.GzmtrInt2024])!=null?he:xe,j=x.useCallback(te=>d(t,te),[t,d]),b=x.useCallback(te=>i(t,te),[t,i]),_=x.useCallback(te=>f(t,te),[t,f]),O=h.flat().slice(0,5),N=O.map(te=>({style:te[6]==="gz"?"gzmtr":"fmetro",lineNum:te[4],stnNum:te[5],strokeColour:te[2]})),[w,v]=x.useState(),[A,M]=x.useState([0,0]),S=x.useRef(null);x.useEffect(()=>{S.current&&(v(S.current.getCorrectedBBox()),M(S.current.getTranslate()))},[S.current,O.length,p,g,C]);const z={x1:((Le=w==null?void 0:w.x)!=null?Le:0)+A[0],y1:((be=w==null?void 0:w.y)!=null?be:0)+A[1],x2:((ge=w==null?void 0:w.x)!=null?ge:0)+((Ye=w==null?void 0:w.width)!=null?Ye:0)+A[0],y2:((He=w==null?void 0:w.y)!=null?He:0)+((Ue=w==null?void 0:w.height)!=null?Ue:0)+A[1]},{update:P}=x.useContext(kn);x.useEffect(()=>{document.fonts.load("12px Arial","ABCDEFG123456").finally(()=>setTimeout(P,100))},[]);const Y=(r==="left"?z.x1:r==="right"?z.x2:0)*Kn,U=m[Ot[l].namesPos].split("\n").length*Ot[l].lineHeight*Ot[l].polarity+(l==="top"?z.y1:l==="bottom"?z.y2:0)*Kn,q=r==="left"?"end":r==="right"?"start":!u&&r==="middle"&&c.join("")===""?"end":"middle",X=x.useRef(null),[se,ae]=x.useState(0);x.useEffect(()=>{var te,je;return ae((je=(te=X.current)==null?void 0:te.getBBox().width)!=null?je:0)},[...c]);const ie=x.useRef(null),[E,H]=x.useState(0);x.useEffect(()=>{var te,je;return H((je=(te=ie.current)==null?void 0:te.getBBox().width)!=null?je:0)},[...m]);const R=(E+(se+12*2)/2)*(r==="left"?-1:1),Z=(E+se+(se!==0?12*2:0))*(r==="left"?-1:r==="right"||se!==0?1:0),pe=r==="middle"?"start":q;return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsxs("g",{transform:"scale(".concat(uo,")"),children:[a.jsx(Na,{ref:S,stations:N,textClassName:"rmp-name__zh",columns:p,topHeavy:g,anchorAt:C>=0?C:void 0,osiPosition:h.flat().length===2&&p===1&&y!=="none"?y:void 0}),a.jsx("rect",{id:"stn_core_".concat(t),x:z.x1,y:z.y1,width:z.x2-z.x1,height:z.y2-z.y1,fill:"white",fillOpacity:"0",onPointerDown:j,onPointerMove:b,onPointerUp:_,style:{cursor:"move"},className:"removeMe"})]}),a.jsxs("g",{ref:ie,transform:"translate(".concat(Y,", ").concat(U,")"),textAnchor:q,children:[a.jsx(I,{text:m[0].split("\n"),fontSize:13.13,lineHeight:13.13,grow:"up",className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),fontSize:6.56,lineHeight:6.56,grow:"down",className:"rmp-name__en"})]}),c.join("")!==""&&a.jsxs("g",{transform:"translate(".concat(Y+R,", ").concat(U,")"),textAnchor:"middle",children:[a.jsx("text",{fontSize:"13.13",dx:-(se+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),a.jsx("text",{fontSize:"13.13",dx:(se+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),a.jsxs("g",{ref:X,children:[a.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:c[0]}),a.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:c[1]})]})]}),!u&&a.jsxs("g",{transform:"translate(".concat(Y+Z,", ").concat(U,")"),textAnchor:pe,children:[a.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),a.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},xe={...T,nameOffsetX:"right",nameOffsetY:"top",transfer:[[[B.Guangzhou,"gz1","#F3D03E",W.white,"1","14","gz"],[B.Guangzhou,"gz3","#ECA154",W.white,"3","11","gz"]]],open:!0,secondaryNames:["",""],columns:2,topHeavy:!1,anchorAt:-1,osiPosition:"none"},go=s=>{var h,u;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:c=>{e.names[0]=c,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:c=>{e.names[1]=c,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:c=>{e.nameOffsetX=c,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:c=>{e.nameOffsetY=c,o(t,e)},minW:"full"},{type:"slider",label:n("panel.details.stations.gzmtrInt2024.columns"),value:e.columns,min:1,max:Math.min(5,e.transfer.flat().length),step:1,onChange:c=>{e.columns=c,o(t,e)},leftIcon:a.jsx(Xa,{}),rightIcon:a.jsx(De,{}),minW:"full"},{type:"switch",label:n("panel.details.stations.gzmtrInt2024.topHeavy"),oneLine:!0,isChecked:e.topHeavy,onChange:c=>{e.topHeavy=c,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.gzmtrInt2024.anchorAt"),value:(h=e.anchorAt)!=null?h:"-1",options:{"-1":n("panel.details.stations.gzmtrInt2024.anchorAtNone"),...Object.fromEntries(Array.from({length:Math.min(e.transfer.flat().length,4)},(c,p)=>[p.toString(),p]))},onChange:c=>{e.anchorAt=Number(c),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.gzmtrInt2024.osiPosition"),value:e.osiPosition,options:{none:n("panel.details.stations.gzmtrInt2024.osiPositionNone"),left:n("panel.details.stations.gzmtrInt2024.osiPositionLeft"),right:n("panel.details.stations.gzmtrInt2024.osiPositionRight")},onChange:c=>{e.osiPosition=c,o(t,e)},hidden:!(e.transfer.flat().length===2&&e.columns===1),minW:"full"},{type:"switch",label:n("panel.details.stations.gzmtrInt.open"),oneLine:!0,isChecked:e.open,onChange:c=>{e.open=c,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.gzmtrInt.secondaryNameZh"),value:e.secondaryNames[0],onChange:c=>{e.secondaryNames[0]=c,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.gzmtrInt.secondaryNameEn"),value:e.secondaryNames[1],onChange:c=>{e.secondaryNames[1]=c.toString(),o(t,e)},minW:"full"}],i=[5,0,0],f=(u=e.transfer)!=null?u:xe.transfer,m=c=>p=>{const g=structuredClone(f);if(g.length<=c)for(let C=g.length;C<=c;C++)g[C]=[Xt];g[c].push(p),e.transfer=g,o(t,e)},r=c=>p=>{if(f.length>c&&f[c].length>p){const g=f.map((C,y)=>y===c?C.filter((j,b)=>b!==p):C);e.transfer=g,e.anchorAt=-1,o(t,e)}},l=c=>(p,g)=>{if(f.length>c&&f[c].length>p){const C=f.map((y,j)=>j===c?y.map((b,_)=>_===p?[0,1,2,3,4,5,6].map(O=>g[O]===void 0?b[O]:g[O]):b):y);e.transfer=C,o(t,e)}};return a.jsxs(a.Fragment,{children:[a.jsx(L,{fields:d}),a.jsx(ue,{label:n("panel.details.stations.interchange.title"),children:a.jsx(et,{align:"flex-start",children:f.map((c,p)=>a.jsxs(x.Fragment,{children:[a.jsx(Ft,{size:"xs",children:n(p===0?"panel.details.stations.interchange.within":p===1?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),a.jsx(Ma,{interchangeList:c,onAdd:i[p]>c.length?m(p):void 0,onDelete:r(p),onUpdate:l(p)})]},p))})})]})},xo=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx(Na,{stations:[{strokeColour:"currentColor",lineNum:"3",stnNum:"03"},{strokeColour:"currentColor",lineNum:"7",stnNum:"05"}],textClassName:"rmp-name__zh",columns:1,transform:"translate(12,12)scale(0.3)"})}),Co={component:po,icon:xo,defaultAttrs:xe,attrsComponent:go,metadata:{displayName:"panel.details.stations.gzmtrInt2024.displayName",cities:[B.Guangzhou],canvas:[V.RailMap],categories:[G.Metro],tags:[]}},ne={zh:9,en:6.2,top:6.2+1,middle:0,bottom:10},yo=s=>{var b;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=me.nameOffsetX,nameOffsetY:l=me.nameOffsetY,open:h=me.open}=(b=n[k.BjsubwayBasic])!=null?b:me,u=x.useCallback(_=>d(t,_),[t,d]),c=x.useCallback(_=>i(t,_),[t,i]),p=x.useCallback(_=>f(t,_),[t,f]),g=(_,O)=>_==="left"&&O==="top"?[-4,-(m[1].split("\n").length+(h?0:1))*ne[O]-1]:_==="middle"&&O==="top"?[0,-(m[1].split("\n").length+(h?0:1))*ne[O]-4]:_==="right"&&O==="top"?[4,-(m[1].split("\n").length+(h?0:1))*ne[O]-1]:_==="left"&&O==="bottom"?[-4,m[0].split("\n").length*ne[O]+1]:_==="middle"&&O==="bottom"?[0,m[0].split("\n").length*ne[O]+4]:_==="right"&&O==="bottom"?[4,m[0].split("\n").length*ne[O]+1]:_==="left"&&O==="middle"?[-5,0]:_==="right"&&O==="middle"?[5,0]:[0,0],[C,y]=g(r,l),j=r==="left"?"end":r==="right"?"start":"middle";return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("circle",{id:"stn_core_".concat(t),r:"4",stroke:"black",strokeWidth:"0.5",strokeDasharray:h?void 0:"1.5",fill:"white",onPointerDown:u,onPointerMove:c,onPointerUp:p,style:{cursor:"move"}}),a.jsxs("g",{transform:"translate(".concat(C,", ").concat(y,")"),textAnchor:j,children:[a.jsx(I,{text:m[0].split("\n"),fontSize:ne.zh,lineHeight:ne.zh,grow:"up",className:"rmp-name__zh",baseOffset:1}),a.jsx(I,{text:m[1].split("\n"),fontSize:ne.en,lineHeight:ne.en,grow:"down",className:"rmp-name__en",baseOffset:1}),!h&&a.jsx("text",{dy:m[1].split("\n").length*ne.en+2,fontSize:ne.en,dominantBaseline:"hanging",className:"rmp-name__zh",children:"(暂缓开通)"})]})]})},me={...T,nameOffsetX:"right",nameOffsetY:"top",open:!0},bo=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:s=>(s!=null?s:me).names[0],onChange:(s,t)=>{const e=t!=null?t:me;return e.names[0]=s.toString(),e}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:s=>(s!=null?s:me).names[1],onChange:(s,t)=>{const e=t!=null?t:me;return e.names[1]=s.toString(),e}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:s=>(s!=null?s:me).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:s=>(s==null?void 0:s.nameOffsetY)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:me;return e.nameOffsetX=s,e}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:s=>(s!=null?s:me).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:s=>(s==null?void 0:s.nameOffsetX)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:me;return e.nameOffsetY=s,e}},{type:"switch",label:"panel.details.stations.bjsubwayBasic.open",oneLine:!0,isChecked:s=>(s!=null?s:me).open,onChange:(s,t)=>{const e=t!=null?t:me;return e.open=s,e}}],jo=()=>a.jsx(vn,{fields:bo}),Oo=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none"})}),vo={component:yo,icon:Oo,defaultAttrs:me,attrsComponent:jo,metadata:{displayName:"panel.details.stations.bjsubwayBasic.displayName",cities:[B.Beijing],canvas:[V.RailMap],categories:[G.Metro],tags:[]}},za="M 8.359893 4.159288 C 8.368828 4.168825 8.460953 4.26852 8.57038 4.386985 C 8.679807 4.505449 8.860802 4.701382 8.972592 4.822389 C 9.084381 4.943397 9.238666 5.110407 9.315445 5.193521 C 9.392224 5.276636 9.519867 5.414817 9.599094 5.500589 C 9.678323 5.58636 9.801023 5.719209 9.871761 5.795812 C 9.942499 5.872413 10.000208 5.935256 9.999999 5.935465 C 9.999792 5.935671 9.975513 5.928466 9.946045 5.919453 C 9.916577 5.910439 9.831826 5.88438 9.757708 5.861543 C 9.683591 5.838706 9.532284 5.791997 9.421472 5.757746 C 9.310658 5.723495 9.190374 5.686309 9.154173 5.675113 C 9.11797 5.663918 9.048485 5.642428 8.99976 5.627359 C 8.951035 5.612291 8.910275 5.599729 8.909181 5.599446 C 8.907193 5.59893 8.907193 5.59893 8.907135 5.798288 C 8.907103 5.907935 8.906695 6.128369 8.906229 6.288144 C 8.905446 6.555825 8.905249 6.580968 8.903705 6.608245 C 8.902784 6.624527 8.90139 6.647987 8.900606 6.660379 C 8.899822 6.672773 8.898192 6.695836 8.896983 6.711632 C 8.895774 6.727427 8.893582 6.753074 8.892114 6.768627 C 8.890645 6.784179 8.888061 6.80923 8.88637 6.824296 C 8.884679 6.839362 8.88172 6.864065 8.879793 6.879189 C 8.877868 6.894315 8.874691 6.917777 8.872734 6.931325 C 8.870777 6.944874 8.867386 6.967292 8.865197 6.981143 C 8.863009 6.994995 8.859045 7.018654 8.856388 7.03372 C 8.853731 7.048786 8.849344 7.072617 8.84664 7.086676 C 8.843935 7.100736 8.839338 7.1236 8.836424 7.137486 C 8.833509 7.151371 8.828584 7.174065 8.825479 7.187916 C 8.822371 7.201767 8.817014 7.224831 8.81357 7.239167 C 8.810127 7.253505 8.80431 7.276767 8.800644 7.29086 C 8.796978 7.304955 8.791035 7.327222 8.787437 7.340344 C 8.78384 7.353467 8.77752 7.375735 8.773395 7.389829 C 8.769268 7.403923 8.762319 7.426986 8.757952 7.441081 C 8.753583 7.455174 8.746363 7.47784 8.741903 7.491448 C 8.737446 7.505056 8.729829 7.527523 8.724978 7.541374 C 8.720126 7.555225 8.712182 7.577493 8.707321 7.590858 C 8.702462 7.604224 8.6948 7.624901 8.690294 7.636807 C 8.68579 7.648715 8.677304 7.670452 8.671437 7.685113 C 8.665571 7.699773 8.656536 7.721842 8.651362 7.734155 C 8.646187 7.746468 8.63796 7.765688 8.63308 7.776865 C 8.628201 7.788043 8.620145 7.806136 8.615178 7.817071 C 8.610211 7.828006 8.60083 7.848286 8.594332 7.862138 C 8.587832 7.875988 8.573873 7.904618 8.563307 7.92576 C 8.552743 7.946901 8.537873 7.975929 8.530265 7.990266 C 8.522656 8.004602 8.511053 8.026075 8.504479 8.037983 C 8.497905 8.04989 8.486739 8.069772 8.479666 8.082165 C 8.472593 8.094558 8.460988 8.11444 8.453878 8.126348 C 8.446768 8.138254 8.435438 8.156944 8.428702 8.167879 C 8.421966 8.178814 8.410628 8.196906 8.403507 8.208085 C 8.396386 8.219262 8.384013 8.238349 8.37601 8.2505 C 8.36801 8.26265 8.354345 8.282929 8.345645 8.295566 C 8.336946 8.308201 8.322885 8.328276 8.314397 8.340175 C 8.305909 8.352074 8.292209 8.37096 8.283951 8.382147 C 8.275693 8.393333 8.261178 8.41259 8.251695 8.42494 C 8.242211 8.437289 8.225837 8.458165 8.215304 8.471332 C 8.204773 8.484497 8.189062 8.503819 8.18039 8.514267 C 8.17172 8.524716 8.157459 8.541616 8.148703 8.551823 C 8.139945 8.562029 8.125004 8.579116 8.115499 8.589793 C 8.105992 8.600471 8.091457 8.616575 8.083197 8.625581 C 8.074937 8.634586 8.060843 8.649709 8.05188 8.659185 C 8.042916 8.668662 8.018659 8.69335 7.997974 8.714046 C 7.977291 8.734741 7.953162 8.758432 7.944355 8.766693 C 7.935549 8.774953 7.920821 8.788638 7.911628 8.797104 C 7.902433 8.805571 7.887569 8.819082 7.878597 8.827129 C 7.869623 8.835177 7.853733 8.849096 7.843284 8.858062 C 7.832834 8.867027 7.816133 8.881153 7.806171 8.889453 C 7.796208 8.897753 7.779904 8.911098 7.769942 8.919111 C 7.759978 8.927123 7.743874 8.939848 7.734154 8.947388 C 7.724434 8.954926 7.708329 8.96721 7.698366 8.974683 C 7.688403 8.982156 7.673093 8.993497 7.664346 8.999885 C 7.655598 9.006271 7.637505 9.019163 7.62414 9.02853 C 7.610775 9.037899 7.588109 9.053377 7.573772 9.062926 C 7.559434 9.072475 7.538474 9.086151 7.527194 9.093318 C 7.515913 9.100485 7.497422 9.112045 7.486104 9.119009 C 7.474786 9.125973 7.454846 9.137918 7.441793 9.145553 C 7.428741 9.153188 7.405677 9.166317 7.390542 9.174728 C 7.375406 9.18314 7.352087 9.19579 7.338722 9.20284 C 7.325357 9.209889 7.303686 9.221025 7.290564 9.227587 C 7.277442 9.234147 7.256366 9.2444 7.243731 9.250369 C 7.231095 9.256339 7.211213 9.265569 7.199549 9.27088 C 7.187884 9.27619 7.168797 9.28464 7.157134 9.289659 C 7.145469 9.294676 7.124792 9.303333 7.111184 9.308895 C 7.097576 9.31446 7.075367 9.323255 7.061831 9.328442 C 7.048295 9.333629 7.027816 9.341289 7.016323 9.345462 C 7.00483 9.349636 6.978328 9.358748 6.95743 9.365711 C 6.936532 9.372675 6.906311 9.382359 6.890272 9.38723 C 6.874235 9.392101 6.849581 9.399302 6.835486 9.403231 C 6.821393 9.40716 6.796739 9.413705 6.7807 9.417776 C 6.764662 9.421847 6.740208 9.427785 6.726356 9.430971 C 6.712505 9.434157 6.689641 9.439174 6.675548 9.442118 C 6.661452 9.445063 6.639384 9.449434 6.626504 9.451833 C 6.613625 9.454231 6.591038 9.458187 6.57631 9.460623 C 6.561581 9.463058 6.538518 9.46664 6.525058 9.468584 C 6.511598 9.470528 6.487662 9.473704 6.471867 9.475644 C 6.456071 9.477583 6.433207 9.480169 6.421057 9.481392 C 6.408907 9.482615 6.387236 9.4846 6.372898 9.485805 C 6.358561 9.487008 6.333112 9.488794 6.316345 9.489771 C 6.299578 9.490749 6.276316 9.491956 6.264652 9.492452 C 6.252987 9.492949 6.216803 9.493517 6.18424 9.493716 C 6.151678 9.493916 6.114499 9.493756 6.10162 9.493363 C 6.088739 9.49297 6.06866 9.492202 6.056995 9.491656 C 6.045331 9.491112 6.026046 9.490059 6.014138 9.489319 C 6.002231 9.488579 5.982548 9.487186 5.970398 9.486226 C 5.958248 9.485266 5.939956 9.483668 5.92975 9.482677 C 5.919544 9.481687 5.902445 9.479897 5.891753 9.478702 C 5.881061 9.477505 5.864443 9.475529 5.854823 9.47431 C 5.845204 9.47309 5.827708 9.470707 5.815943 9.469012 C 5.804178 9.467319 5.784412 9.464314 5.77202 9.462336 C 5.759627 9.460358 5.745908 9.458071 5.741535 9.457253 C 5.733583 9.455767 5.733583 9.455767 5.750813 9.451963 C 5.76029 9.449871 5.778183 9.445793 5.790576 9.442902 C 5.802969 9.440009 5.82305 9.435088 5.8352 9.431966 C 5.847351 9.428843 5.867067 9.423503 5.879014 9.420099 C 5.890961 9.416695 5.911639 9.410524 5.924964 9.406386 C 5.938288 9.402248 5.960324 9.395124 5.973932 9.390556 C 5.98754 9.385988 6.008053 9.378835 6.019516 9.374659 C 6.030978 9.370483 6.050462 9.363131 6.062815 9.358321 C 6.075166 9.353508 6.094417 9.34577 6.105595 9.341125 C 6.116774 9.336478 6.135264 9.328524 6.146685 9.323448 C 6.158106 9.318373 6.177591 9.309499 6.189984 9.303728 C 6.202377 9.297957 6.224247 9.287379 6.238585 9.280221 C 6.252921 9.273063 6.273399 9.262563 6.284092 9.256887 C 6.294784 9.251213 6.314865 9.240225 6.328716 9.232468 C 6.342567 9.224712 6.361654 9.213777 6.371131 9.208166 C 6.380608 9.202557 6.396514 9.192982 6.406477 9.18689 C 6.41644 9.180798 6.432345 9.170843 6.441822 9.164769 C 6.4513 9.158695 6.467404 9.14816 6.47761 9.141357 C 6.487816 9.134555 6.50392 9.123611 6.513398 9.117039 C 6.522875 9.110467 6.539177 9.098936 6.549627 9.091415 C 6.560077 9.083895 6.577971 9.070704 6.589391 9.062101 C 6.600812 9.053498 6.618895 9.039583 6.629575 9.031179 C 6.640255 9.022773 6.656757 9.009534 6.666247 9.001758 C 6.675736 8.993981 6.692227 8.980227 6.702893 8.971191 C 6.713559 8.962157 6.730458 8.94742 6.740448 8.938442 C 6.750437 8.929464 6.766562 8.914768 6.776282 8.905784 C 6.786003 8.896801 6.803698 8.880239 6.815604 8.868983 C 6.827512 8.857727 6.843456 8.842402 6.851037 8.834927 C 6.858617 8.827451 6.873728 8.812176 6.884615 8.800982 C 6.895503 8.789788 6.912683 8.77174 6.922792 8.760878 C 6.932902 8.750012 6.949699 8.731606 6.960117 8.719973 C 6.970537 8.70834 6.986147 8.690599 6.994807 8.68055 C 7.003467 8.670501 7.017852 8.65353 7.026772 8.642838 C 7.035693 8.632146 7.053 8.610872 7.065231 8.595562 C 7.077464 8.580254 7.09533 8.557407 7.104936 8.544792 C 7.114541 8.532177 7.129989 8.511499 7.139265 8.498842 C 7.14854 8.486185 7.164221 8.464337 7.174109 8.450293 C 7.183999 8.436249 7.199718 8.413383 7.209044 8.399484 C 7.218369 8.385583 7.232209 8.364666 7.2398 8.353003 C 7.247391 8.341338 7.260236 8.321177 7.268346 8.3082 C 7.276455 8.295223 7.289493 8.27395 7.297318 8.260925 C 7.305143 8.247901 7.317313 8.227304 7.32436 8.215153 C 7.331408 8.203004 7.344023 8.180735 7.352394 8.165669 C 7.360765 8.150602 7.372812 8.128534 7.379167 8.116627 C 7.385522 8.104719 7.396764 8.083248 7.404151 8.06891 C 7.411537 8.054573 7.422352 8.0331 7.428184 8.021194 C 7.434016 8.009287 7.443347 7.990001 7.448918 7.978336 C 7.45449 7.966672 7.463351 7.947784 7.468609 7.936364 C 7.473868 7.924943 7.482234 7.906453 7.4872 7.895274 C 7.492166 7.884096 7.500586 7.86481 7.505909 7.852417 C 7.511233 7.840024 7.519759 7.819808 7.524855 7.807493 C 7.529951 7.795179 7.538242 7.7747 7.543279 7.761986 C 7.548316 7.749271 7.556671 7.727735 7.561847 7.714127 C 7.567022 7.700519 7.57545 7.677853 7.580575 7.663759 C 7.585701 7.649664 7.594637 7.624414 7.600433 7.607646 C 7.60623 7.59088 7.615365 7.563642 7.620735 7.547118 C 7.626104 7.530593 7.634661 7.503554 7.63975 7.48703 C 7.644838 7.470506 7.653173 7.442472 7.658273 7.424733 C 7.663371 7.406994 7.671309 7.378562 7.675913 7.361553 C 7.680518 7.344542 7.688414 7.314123 7.69346 7.293953 C 7.698508 7.273784 7.705483 7.244955 7.708961 7.229889 C 7.712439 7.214823 7.717614 7.19176 7.720461 7.178638 C 7.723308 7.165516 7.728016 7.143247 7.730923 7.129154 C 7.733829 7.115059 7.738621 7.090804 7.74157 7.075251 C 7.74452 7.0597 7.749294 7.033455 7.752179 7.016931 C 7.755066 7.000407 7.759431 6.974154 7.761884 6.958592 C 7.764333 6.94303 7.768123 6.917978 7.770304 6.902922 C 7.772485 6.887866 7.775877 6.86322 7.777843 6.848155 C 7.779809 6.833088 7.783001 6.807043 7.784938 6.790275 C 7.786876 6.773509 7.789651 6.74806 7.791106 6.733722 C 7.792561 6.719385 7.794953 6.693936 7.796421 6.677169 C 7.797888 6.660402 7.800071 6.632964 7.801272 6.616198 C 7.802474 6.599431 7.804076 6.575174 7.804832 6.562295 C 7.80559 6.549416 7.806592 6.532119 7.807061 6.523856 C 7.807529 6.515595 7.80835 6.421553 7.808886 6.314875 C 7.809421 6.208197 7.809724 6.003942 7.80956 5.860975 C 7.809398 5.718009 7.809015 5.600789 7.808712 5.600486 C 7.808408 5.600182 7.68663 5.63752 7.538092 5.68346 C 7.389553 5.7294 7.213946 5.783698 7.147853 5.804122 C 7.08176 5.824546 6.974794 5.857548 6.910151 5.877461 C 6.845508 5.897371 6.776261 5.918652 6.75627 5.924749 C 6.736279 5.930848 6.719744 5.935658 6.719525 5.93544 C 6.719306 5.935221 6.790938 5.857274 6.878708 5.762224 C 6.966477 5.667175 7.110461 5.511271 7.198671 5.415771 C 7.286881 5.320272 7.433807 5.161213 7.525173 5.062309 C 7.616539 4.963404 7.76605 4.801562 7.857421 4.702663 C 7.948792 4.603762 8.093983 4.446596 8.180069 4.353404 C 8.266154 4.260212 8.341831 4.178411 8.34824 4.171626 L 8.359893 4.159288 Z M 3.639928 8.15987 C 3.639606 8.15984 3.567056 8.081517 3.478708 7.985821 C 3.390359 7.890125 3.197014 7.680786 3.049051 7.520623 C 2.901089 7.36046 2.662314 7.101986 2.518441 6.946236 C 2.374568 6.790486 2.198977 6.60038 2.128238 6.523779 C 2.0575 6.447177 1.999793 6.384333 2 6.384126 C 2.000208 6.383919 2.024487 6.391125 2.053954 6.40014 C 2.083422 6.409154 2.157237 6.431839 2.217988 6.450549 C 2.278738 6.469259 2.375968 6.499262 2.434052 6.517222 C 2.492137 6.535182 2.553174 6.55407 2.569692 6.559195 C 2.586209 6.564321 2.709718 6.602509 2.844157 6.644057 C 2.978595 6.685606 3.089538 6.719839 3.090698 6.72013 C 3.092807 6.72066 3.092807 6.72066 3.092866 6.520418 C 3.092898 6.410285 3.093306 6.18985 3.093772 6.030562 C 3.094553 5.763748 3.094752 5.738617 3.096295 5.711344 C 3.097217 5.695064 3.098611 5.671603 3.099395 5.659211 C 3.100178 5.646816 3.101808 5.623754 3.103017 5.607958 C 3.104227 5.592164 3.106418 5.566515 3.107887 5.550963 C 3.109355 5.535411 3.111941 5.51036 3.113633 5.495295 C 3.115324 5.480227 3.118114 5.456767 3.119833 5.443159 C 3.121551 5.429551 3.124544 5.407283 3.126484 5.393674 C 3.128424 5.380066 3.13179 5.357599 3.133963 5.343748 C 3.136135 5.329897 3.139918 5.307034 3.142369 5.292939 C 3.144819 5.278845 3.149205 5.254788 3.152116 5.239479 C 3.155027 5.224168 3.159971 5.199397 3.163101 5.184428 C 3.16623 5.169459 3.171352 5.145801 3.174481 5.131851 C 3.17761 5.117902 3.182986 5.094759 3.18643 5.080422 C 3.189873 5.066085 3.19569 5.042824 3.199356 5.028729 C 3.203022 5.014635 3.208965 4.992367 3.212563 4.979245 C 3.21616 4.966123 3.222479 4.943855 3.226605 4.929761 C 3.230732 4.915667 3.237681 4.892604 3.242049 4.878509 C 3.246417 4.864415 3.253638 4.84175 3.258096 4.828142 C 3.262555 4.814533 3.270171 4.792067 3.275023 4.778216 C 3.279873 4.764364 3.287818 4.742096 3.292678 4.728731 C 3.297538 4.715366 3.3052 4.694689 3.309704 4.682783 C 3.31421 4.670875 3.322696 4.649137 3.328563 4.634478 C 3.33443 4.619817 3.343463 4.597748 3.348639 4.585434 C 3.353813 4.573122 3.36204 4.553902 3.36692 4.542725 C 3.371799 4.531547 3.379856 4.513454 3.384823 4.502518 C 3.389789 4.491583 3.39917 4.471303 3.405668 4.457452 C 3.412167 4.443601 3.426129 4.414971 3.436694 4.39383 C 3.44726 4.372689 3.461914 4.344058 3.469262 4.330207 C 3.476608 4.316357 3.488427 4.294487 3.495524 4.281607 C 3.502622 4.268728 3.514584 4.247454 3.522105 4.234332 C 3.529628 4.22121 3.541034 4.201699 3.547455 4.190976 C 3.553874 4.180251 3.564621 4.162556 3.571336 4.151653 C 3.578052 4.14075 3.589372 4.122683 3.596493 4.111505 C 3.603614 4.100327 3.615987 4.081241 3.623989 4.069091 C 3.631991 4.056941 3.645655 4.036661 3.654354 4.024024 C 3.663054 4.011388 3.677115 3.991314 3.685603 3.979416 C 3.694091 3.967517 3.707792 3.948628 3.716049 3.937443 C 3.724308 3.926256 3.738823 3.906999 3.748305 3.89465 C 3.757787 3.882301 3.774164 3.861424 3.784696 3.848259 C 3.795227 3.835093 3.810939 3.815771 3.81961 3.805323 C 3.828281 3.794872 3.84254 3.777973 3.851297 3.767766 C 3.860054 3.757562 3.874996 3.740475 3.884502 3.729796 C 3.894008 3.719119 3.908543 3.703013 3.916803 3.694009 C 3.925064 3.685003 3.939156 3.669882 3.94812 3.660404 C 3.957083 3.650928 3.981341 3.626241 4.002025 3.605544 C 4.02271 3.584848 4.046838 3.561157 4.055645 3.552897 C 4.064451 3.544637 4.079179 3.530951 4.088373 3.522486 C 4.097566 3.514019 4.11243 3.500508 4.121404 3.49246 C 4.130376 3.484412 4.146267 3.470493 4.156716 3.461528 C 4.167165 3.452562 4.183867 3.438437 4.19383 3.430137 C 4.203792 3.421837 4.220096 3.408491 4.230059 3.400478 C 4.240022 3.392467 4.256126 3.379735 4.265846 3.372187 C 4.275566 3.364638 4.294852 3.349997 4.308703 3.33965 C 4.322554 3.329302 4.342636 3.314602 4.353327 3.306981 C 4.364019 3.299361 4.382311 3.28654 4.393975 3.27849 C 4.405639 3.270441 4.42466 3.257609 4.436245 3.249977 C 4.447829 3.242345 4.465922 3.230637 4.476451 3.223961 C 4.486979 3.217284 4.504342 3.206445 4.515034 3.199872 C 4.525727 3.193299 4.545155 3.181674 4.558207 3.174039 C 4.571259 3.166403 4.594323 3.153273 4.609458 3.14486 C 4.624594 3.13645 4.647913 3.123799 4.661278 3.11675 C 4.674643 3.1097 4.696314 3.098564 4.709436 3.092004 C 4.722558 3.085442 4.74403 3.075004 4.757153 3.068806 C 4.770275 3.062607 4.791488 3.052789 4.804292 3.046986 C 4.817096 3.041182 4.837177 3.03234 4.848916 3.027336 C 4.860656 3.022333 4.879611 3.014428 4.89104 3.009769 C 4.902469 3.00511 4.923146 2.996942 4.93699 2.991619 C 4.950833 2.986296 4.971702 2.978476 4.983366 2.97424 C 4.99503 2.970004 5.021672 2.960841 5.042571 2.953878 C 5.063468 2.946914 5.093689 2.937231 5.109727 2.93236 C 5.125765 2.927489 5.150419 2.920288 5.164514 2.916359 C 5.178607 2.912431 5.203261 2.905885 5.219299 2.901814 C 5.235338 2.897742 5.259793 2.891805 5.273643 2.888619 C 5.287495 2.885432 5.310359 2.880417 5.324453 2.877472 C 5.338548 2.874528 5.360616 2.870155 5.373496 2.867757 C 5.386374 2.865358 5.408962 2.861403 5.42369 2.858968 C 5.438418 2.856532 5.461482 2.85295 5.474941 2.851007 C 5.488403 2.849062 5.512338 2.845885 5.528134 2.843946 C 5.543929 2.842007 5.566793 2.83942 5.578943 2.838198 C 5.591094 2.836976 5.612764 2.83499 5.627101 2.833786 C 5.641439 2.832582 5.666887 2.830797 5.683655 2.829821 C 5.700423 2.828844 5.724281 2.827635 5.736673 2.827131 C 5.749067 2.826628 5.779487 2.825963 5.804273 2.825654 C 5.831717 2.825312 5.864715 2.825499 5.888661 2.826133 C 5.910288 2.826705 5.935936 2.827562 5.945656 2.828037 C 5.955376 2.828513 5.97327 2.829513 5.98542 2.830258 C 5.99757 2.831004 6.017452 2.832401 6.029602 2.833363 C 6.041752 2.834323 6.060044 2.83592 6.07025 2.836912 C 6.080456 2.837903 6.097554 2.839693 6.108246 2.840889 C 6.118938 2.842084 6.135557 2.84406 6.145177 2.84528 C 6.154796 2.846498 6.172292 2.848883 6.184057 2.850577 C 6.195822 2.852271 6.215388 2.855248 6.227539 2.857194 C 6.239688 2.859139 6.253395 2.861429 6.257997 2.862283 C 6.266363 2.863834 6.266363 2.863834 6.249159 2.867633 C 6.239698 2.869721 6.221817 2.873796 6.209424 2.876689 C 6.197031 2.87958 6.17695 2.884501 6.1648 2.887624 C 6.152649 2.890747 6.132933 2.896087 6.120986 2.899491 C 6.109038 2.902895 6.088361 2.909066 6.075037 2.913204 C 6.061712 2.917341 6.039675 2.924465 6.026067 2.929032 C 6.012459 2.933601 5.991946 2.940756 5.980484 2.944931 C 5.969021 2.949106 5.949537 2.95646 5.937186 2.961273 C 5.924834 2.966085 5.905422 2.973896 5.894048 2.978628 C 5.882673 2.983361 5.864182 2.991314 5.852958 2.996302 C 5.841733 3.001288 5.822409 3.010091 5.810017 3.015862 C 5.797623 3.021632 5.775753 3.032209 5.761416 3.039369 C 5.747078 3.046527 5.726601 3.057027 5.715909 3.062701 C 5.705216 3.068377 5.685135 3.079366 5.671284 3.087121 C 5.657433 3.094877 5.638347 3.105814 5.628869 3.111423 C 5.619392 3.117034 5.603487 3.126609 5.593524 3.1327 C 5.58356 3.138793 5.567655 3.148746 5.558177 3.15482 C 5.5487 3.160895 5.532596 3.171429 5.522389 3.178233 C 5.512184 3.185035 5.496079 3.195978 5.486602 3.202551 C 5.477125 3.209123 5.460822 3.220655 5.450372 3.228179 C 5.439923 3.235703 5.423421 3.247832 5.413702 3.255136 C 5.403981 3.262436 5.386883 3.27556 5.375705 3.284297 C 5.364527 3.293035 5.346831 3.307168 5.336382 3.315704 C 5.325933 3.32424 5.308455 3.338784 5.297544 3.348024 C 5.286631 3.357265 5.269532 3.372169 5.259547 3.381148 C 5.249561 3.390125 5.233438 3.404821 5.223718 3.413807 C 5.213998 3.422791 5.196302 3.439351 5.184396 3.450605 C 5.172488 3.461862 5.156544 3.477188 5.148963 3.484664 C 5.141382 3.492139 5.126272 3.507414 5.115385 3.518608 C 5.104497 3.529801 5.087317 3.547848 5.077208 3.558713 C 5.067098 3.569577 5.050301 3.587983 5.039882 3.599617 C 5.029463 3.61125 5.013853 3.62899 5.005193 3.639039 C 4.996532 3.649089 4.982148 3.666059 4.973228 3.676752 C 4.964307 3.687445 4.947 3.708717 4.934769 3.724027 C 4.922537 3.739336 4.90467 3.762184 4.895064 3.774798 C 4.885458 3.787414 4.870011 3.808089 4.860735 3.820748 C 4.85146 3.833405 4.835779 3.855252 4.825891 3.869297 C 4.816002 3.883342 4.800281 3.906206 4.790956 3.920107 C 4.781631 3.934007 4.767791 3.954923 4.760201 3.966587 C 4.75261 3.978251 4.739764 3.998412 4.731654 4.01139 C 4.723545 4.024366 4.710507 4.04564 4.702682 4.058664 C 4.694856 4.071689 4.682687 4.092286 4.67564 4.104437 C 4.668592 4.116586 4.655977 4.138854 4.647606 4.15392 C 4.639235 4.168986 4.627187 4.191055 4.620833 4.202963 C 4.614478 4.214869 4.603237 4.236342 4.59585 4.250679 C 4.588463 4.265017 4.577648 4.286489 4.571816 4.298396 C 4.565984 4.310304 4.556654 4.329589 4.551082 4.341253 C 4.54551 4.352918 4.536649 4.371806 4.53139 4.383226 C 4.526132 4.394647 4.517766 4.413137 4.512801 4.424315 C 4.507834 4.435493 4.499414 4.45478 4.494091 4.467174 C 4.488767 4.479566 4.480241 4.499781 4.475145 4.512096 C 4.470048 4.524411 4.461758 4.544889 4.456721 4.557603 C 4.451684 4.570319 4.443329 4.591855 4.438153 4.605463 C 4.432978 4.619071 4.42455 4.641737 4.419425 4.65583 C 4.414299 4.669925 4.405364 4.695175 4.399567 4.711941 C 4.393771 4.72871 4.384635 4.755947 4.379265 4.772473 C 4.373896 4.788996 4.365339 4.816035 4.36025 4.83256 C 4.355162 4.849085 4.346827 4.877117 4.341728 4.894857 C 4.336629 4.912596 4.328691 4.941027 4.324087 4.958037 C 4.319483 4.975048 4.311586 5.005467 4.30654 5.025636 C 4.301492 5.045806 4.294517 5.074635 4.291039 5.0897 C 4.287562 5.104767 4.282386 5.12783 4.279539 5.140952 C 4.276692 5.154074 4.271984 5.176342 4.269077 5.190436 C 4.266171 5.20453 4.261379 5.228786 4.25843 5.244339 C 4.25548 5.259891 4.250707 5.286135 4.24782 5.302659 C 4.244935 5.319183 4.240569 5.345436 4.238118 5.360997 C 4.235666 5.37656 4.231877 5.40161 4.229696 5.416667 C 4.227515 5.431724 4.224122 5.456368 4.222157 5.471435 C 4.220191 5.486501 4.216998 5.512547 4.215061 5.529314 C 4.213124 5.546082 4.210349 5.571529 4.208893 5.585867 C 4.207439 5.600204 4.205048 5.625653 4.20358 5.642421 C 4.202112 5.659187 4.199928 5.686625 4.198727 5.703393 C 4.197526 5.720159 4.195924 5.744415 4.195167 5.757294 C 4.194409 5.770174 4.193407 5.787471 4.192938 5.795733 C 4.192471 5.803995 4.19165 5.898036 4.191115 6.004715 C 4.19058 6.111393 4.190277 6.315648 4.190439 6.458614 C 4.190602 6.601581 4.190984 6.718802 4.191288 6.719105 C 4.191591 6.719408 4.313371 6.682069 4.461908 6.636129 C 4.610447 6.590189 4.786054 6.535892 4.852147 6.515468 C 4.91824 6.495043 5.025205 6.462041 5.089849 6.442131 C 5.154491 6.422219 5.223739 6.400939 5.243729 6.39484 C 5.263721 6.388742 5.280256 6.383932 5.280475 6.38415 C 5.280694 6.384369 5.209062 6.462315 5.121291 6.557364 C 5.033521 6.652413 4.889537 6.808317 4.801327 6.903816 C 4.713117 6.999316 4.56619 7.158374 4.474826 7.25728 C 4.383461 7.356185 4.23395 7.518026 4.14258 7.616927 C 4.051209 7.715828 3.906015 7.872994 3.819926 7.966186 C 3.733837 8.059378 3.658251 8.141094 3.651957 8.147776 C 3.645663 8.154458 3.64025 8.159901 3.639928 8.15987 Z",_o=s=>{var b;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=fe.nameOffsetX,nameOffsetY:l=fe.nameOffsetY,outOfStation:h=fe.outOfStation}=(b=n[k.BjsubwayInt])!=null?b:fe,u=x.useCallback(_=>d(t,_),[t,d]),c=x.useCallback(_=>i(t,_),[t,i]),p=x.useCallback(_=>f(t,_),[t,f]),g=(_,O)=>_==="left"&&O==="top"?[-5,-m[1].split("\n").length*ne[O]-4]:_==="middle"&&O==="top"?[0,-m[1].split("\n").length*ne[O]-7]:_==="right"&&O==="top"?[5,-m[1].split("\n").length*ne[O]-4]:_==="left"&&O==="bottom"?[-5,m[0].split("\n").length*ne[O]+4]:_==="middle"&&O==="bottom"?[0,m[0].split("\n").length*ne[O]+7]:_==="right"&&O==="bottom"?[5,m[0].split("\n").length*ne[O]+4]:_==="left"&&O==="middle"?[-8,0]:_==="right"&&O==="middle"?[8,0]:[0,0],[C,y]=g(r,l),j=r==="left"?"end":r==="right"?"start":"middle";return a.jsxs("g",{id:t,children:[a.jsxs("g",{transform:"translate(".concat(e-6,", ").concat(o-6,")"),children:[a.jsx("circle",{cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",fill:"white"}),a.jsx("path",{d:za,fill:h?"#898989":"black",stroke:h?"#898989":"black",strokeWidth:"0.533618",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("circle",{id:"stn_core_".concat(t),cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",strokeOpacity:"0",fill:"white",fillOpacity:"0",onPointerDown:u,onPointerMove:c,onPointerUp:p,style:{cursor:"move"},className:"removeMe"})]}),a.jsxs("g",{transform:"translate(".concat(e+C,", ").concat(o+y,")"),textAnchor:j,children:[a.jsx(I,{text:m[0].split("\n"),fontSize:ne.zh,lineHeight:ne.zh,grow:"up",className:"rmp-name__zh",baseOffset:1}),a.jsx(I,{text:m[1].split("\n"),fontSize:ne.en,lineHeight:ne.en,grow:"down",className:"rmp-name__en",baseOffset:1})]})]})},fe={...T,nameOffsetX:"right",nameOffsetY:"top",outOfStation:!1},wo=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:s=>(s!=null?s:fe).names[0],onChange:(s,t)=>{const e=t!=null?t:fe;return e.names[0]=s.toString(),e}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:s=>(s!=null?s:fe).names[1],onChange:(s,t)=>{const e=t!=null?t:fe;return e.names[1]=s.toString(),e}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:s=>(s!=null?s:fe).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:s=>(s==null?void 0:s.nameOffsetY)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:fe;return e.nameOffsetX=s,e}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:s=>(s!=null?s:fe).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:s=>(s==null?void 0:s.nameOffsetX)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:fe;return e.nameOffsetY=s,e}},{type:"switch",label:"panel.details.stations.bjsubwayInt.outOfStation",oneLine:!0,isChecked:s=>(s!=null?s:fe).outOfStation,onChange:(s,t)=>{const e=t!=null?t:fe;return e.outOfStation=s,e}}],So=()=>a.jsx(vn,{fields:wo}),No=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsxs("g",{transform:"translate(6, 6)",children:[a.jsx("circle",{cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",fill:"white"}),a.jsx("path",{d:za,stroke:"black",strokeWidth:"0.533618",strokeLinecap:"round",strokeLinejoin:"round"})]})}),ko={component:_o,icon:No,defaultAttrs:fe,attrsComponent:So,metadata:{displayName:"panel.details.stations.bjsubwayInt.displayName",cities:[B.Beijing],canvas:[V.RailMap],categories:[G.Metro],tags:["interchange"]}};function Mo(s){const{interchangeList:t,onAdd:e,onDelete:o,onUpdate:n}=s,d=it(),{paletteAppClip:{output:i}}=lt(h=>h.runtime),{t:f}=D(),[m,r]=x.useState();x.useEffect(()=>{m!==void 0&&i&&(n==null||n(m,[...i,t[m][4],t[m][5]]),r(void 0))},[i==null?void 0:i.toString()]);const l=t.map((h,u)=>[{type:"input",label:f("panel.details.stations.common.lineCode"),value:h[4],minW:"80px",onChange:c=>n==null?void 0:n(u,[h[0],h[1],h[2],h[3],c,h[5]])},{type:"input",label:f("panel.details.stations.common.stationCode"),value:h[5],minW:"80px",onChange:c=>n==null?void 0:n(u,[h[0],h[1],h[2],h[3],h[4],c])}]);return a.jsxs(jn,{direction:"column",children:[t.length===0&&a.jsxs(Ke,{spacing:.5,"data-testid":"interchange-card-stack",children:[a.jsx(_n,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:f("panel.details.stations.interchange.noInterchanges")}),a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.add"),onClick:()=>e==null?void 0:e([B.Shanghai,"","#aaaaaa",W.white,"",""]),icon:a.jsx(De,{})})]}),t.map((h,u)=>a.jsxs(Ke,{spacing:.5,"data-testid":"interchange-card-stack-".concat(u),children:[a.jsx(ue,{label:f("color"),minW:"40px",noLabel:u!==0,children:a.jsx(Ht,{theme:[h[0],h[1],h[2],h[3]],onClick:()=>{r(u),d(Ut([h[0],h[1],h[2],h[3]]))}})}),a.jsx(L,{fields:l[u],noLabel:u!==0}),e&&u===l.length-1?a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.copy"),onClick:()=>e==null?void 0:e(t.slice(-1)[0]),icon:a.jsx(On,{})}):a.jsx(wn,{minW:8}),o&&a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.remove"),onClick:()=>o==null?void 0:o(u),icon:a.jsx(vt,{})})]},u))]})}const qt=s=>{var C;const{stationType:t,defaultAttrs:e,maximumTransfers:o}=s,{t:n}=D(),d=it(),i=x.useCallback(()=>{d(Ct()),d(yt(r.current.export()))},[d,Ct,yt]),{selected:f}=lt(y=>y.runtime),[m]=f,r=x.useRef(window.graph),l=m&&r.current.hasNode(m)&&r.current.getNodeAttribute(m,"type")===t?r.current.getNodeAttribute(m,t):e,h=(C=l.transfer)!=null?C:e.transfer,u=y=>j=>{const b=structuredClone(h);if(b.length<=y)for(let _=b.length;_<=y;_++)b[_]=[];b[y].push(j),l.transfer=b,r.current.mergeNodeAttributes(m,{[t]:l}),i()},c=y=>j=>{if(h.length>y&&h[y].length>j){const b=h.map((_,O)=>O===y?_.filter((N,w)=>w!==j):_);l.transfer=b,r.current.mergeNodeAttributes(m,{[t]:l}),i()}},p=y=>(j,b)=>{if(h.length>y&&h[y].length>j){const _=h.map((O,N)=>N===y?O.map((w,v)=>v===j?[0,1,2,3,4,5].map(A=>b[A]===void 0?w[A]:b[A]):w):O);l.transfer=_,r.current.mergeNodeAttributes(m,{[t]:l}),i()}},g=()=>u(l.transfer.length)([B.Guangzhou,"","#AAAAAA",W.white,"",""]);return a.jsxs(et,{align:"flex-start",children:[l.transfer.map((y,j)=>a.jsxs(x.Fragment,{children:[a.jsx(Ft,{size:"xs",children:n(j===0?"panel.details.stations.interchange.within":j===1?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),a.jsx(Mo,{interchangeList:y,onAdd:o[j]>y.length?u(j):void 0,onDelete:c(j),onUpdate:p(j)})]},j)),o[l.transfer.length]>0&&a.jsx(ye,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:a.jsx(De,{}),onClick:g,children:n("panel.details.stations.interchange.addGroup")})]})},pt=5,Kt=5,Ao={top:7.5+1,middle:0,bottom:11},zo=(s,t=pt,e=[])=>{const o=Math.sqrt(s*s-t*t/4),n=e.length<2?e.length+1:e.length;let d="M -5,0 A ".concat(s,",").concat(s,",0,0,1,").concat(-t/2,",-").concat(o," ");for(let i=0;i=0;i=i-1)d+="A ".concat(s,",").concat(s,",0,0,1,").concat(i*t-t/2,",").concat(o," ");return d+="A ".concat(s,",").concat(s,",0,0,1,-5,0 Z"),d},Bo=s=>{var M;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=re.nameOffsetX,nameOffsetY:l=re.nameOffsetY,transfer:h=re.transfer,rotate:u=re.rotate}=(M=n[k.MTR])!=null?M:re,c=x.useCallback(S=>d(t,S),[t,d]),p=x.useCallback(S=>i(t,S),[t,i]),g=x.useCallback(S=>f(t,S),[t,f]),C=h.at(0),y=zo(Kt,pt,C),j=C.length===0?0:C.length<=2?1:C.length-1,b=Math.cos(u*Math.PI/180)*j*Kt,_=Math.sin(u*Math.PI/180)*j*Kt,O=r==="left"?-8:r==="right"?8:0,N=Math.sign(b)===Math.sign(O)?b+O:O,w=(m[ee[l].namesPos].split("\n").length*Ao[l]+6)*ee[l].polarity,v=Math.sign(_)===Math.sign(w)?_+w:w,A=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("path",{transform:"rotate(".concat(u,")"),d:y,stroke:"#001f50",strokeWidth:"1.5",fill:"white",onPointerDown:c,onPointerMove:p,onPointerUp:g,style:{cursor:"move"}}),h.at(0).length>1&&h.at(0).map(S=>S[2]).map((S,z)=>a.jsx("line",{transform:"rotate(".concat(u,")"),x1:-5/2+z*pt,x2:pt/2+z*pt,stroke:S,strokeWidth:"2"},"".concat(z,"_").concat(S))),a.jsx("path",{id:"stn_core_".concat(t),transform:"rotate(".concat(u,")"),d:y,fill:"white",fillOpacity:"0",onPointerDown:c,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},className:"removeMe"}),a.jsxs("g",{transform:"translate(".concat(N,", ").concat(v,")"),textAnchor:A,className:"rmp-name-outline",strokeWidth:"1.25",children:[a.jsx(I,{text:m[0].split("\n"),fontSize:10,lineHeight:10,grow:"up",baseOffset:1,fill:"#001f50",className:"rmp-name__mtr__zh"}),a.jsx(I,{text:m[1].split("\n"),fontSize:7.5,lineHeight:7.5,grow:"down",baseOffset:1,fill:"#001f50",className:"rmp-name__mtr__en"})]})]}),[t,e,o,...m,u,JSON.stringify(h),r,l,c,p,g])},re={names:["車站","Stn"],nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[]]},Io=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:s=>(s!=null?s:re).names[0],onChange:(s,t)=>{const e=t!=null?t:re;return e.names[0]=s.toString(),e}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:s=>(s!=null?s:re).names[1],onChange:(s,t)=>{const e=t!=null?t:re;return e.names[1]=s.toString(),e}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:s=>(s!=null?s:re).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:s=>(s==null?void 0:s.nameOffsetY)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:re;return e.nameOffsetX=s,e}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:s=>(s!=null?s:re).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:s=>(s==null?void 0:s.nameOffsetX)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:re;return e.nameOffsetY=s,e}},{type:"select",label:"panel.details.stations.common.rotate",value:s=>{var t;return(t=s==null?void 0:s.rotate)!=null?t:re.rotate},hidden:s=>{var t,e,o;return((o=(e=(t=s==null?void 0:s.transfer)==null?void 0:t.flat())==null?void 0:e.length)!=null?o:0)===0},options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:(s,t)=>{const e=t!=null?t:re;return e.rotate=Number(s),e}},{type:"custom",label:"panel.details.stations.interchange.title",component:a.jsx(qt,{stationType:k.MTR,defaultAttrs:re,maximumTransfers:[99,0,0]})}],Po=()=>a.jsx(vn,{fields:Io}),To=a.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:a.jsx("circle",{cx:"12",cy:"12",r:"5",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})}),$o={component:Bo,icon:To,defaultAttrs:re,attrsComponent:Po,metadata:{displayName:"panel.details.stations.mtr.displayName",cities:[B.Hongkong],canvas:[V.RailMap],categories:[G.Metro],tags:[]}},_t=x.forwardRef((s,t)=>{const{text:e,lineWidth:o,grow:n,dominantBaseline:d=n==="left"?"hanging":n==="right"?"auto":"central",baseOffset:i=2,baseDY:f=0,...m}=s,r=n==="bidirectional"?-((e.length-1)*o)/2:0;return a.jsx("g",{ref:t,children:[...e].reverse().map((l,h,u)=>a.jsx("text",{x:(h*o+i)*(n==="left"?-1:1)+r,dy:(h-(u.length-1)/2)*f,writingMode:"vertical-rl",dominantBaseline:d,...m,children:l},"".concat(l).concat(h)))})});_t.displayName="MultilineTextVertical";const le={zh:{size:10,baseOffset:1},en:{size:5,baseOffset:1.5}},en={top:{lineHeight:5,offset:1+le.en.baseOffset+2.5,polarity:-1},middle:{lineHeight:0,offset:le.zh.size/2,polarity:1},bottom:{lineHeight:10,offset:0+le.zh.baseOffset+2.5,polarity:1}},Eo=s=>{var N;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,color:r=Me.color,nameOffsetX:l=Me.nameOffsetX,nameOffsetY:h=Me.nameOffsetY,textVertical:u=Me.textVertical}=(N=n[k.SuzhouRTBasic])!=null?N:Me,c=x.useCallback(w=>d(t,w),[t,d]),p=x.useCallback(w=>i(t,w),[t,i]),g=x.useCallback(w=>f(t,w),[t,f]),C=l==="left"?-5:l==="right"?5:0,y=(m[ee[h].namesPos].split("\n").length*en[h].lineHeight+en[h].offset)*en[h].polarity,j=l==="left"?"end":l==="right"?"start":"middle",b=h==="top"?-2.5-2:2.5+2,_=h==="top"?"end":"start",O=m[0].split("\n").length*le.zh.size/2+le.en.baseOffset;return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("circle",{id:"stn_core_".concat(t),r:3,stroke:r[2],strokeWidth:"1",fill:"white",onPointerDown:c,onPointerMove:p,onPointerUp:g,style:{cursor:"move"}}),u?a.jsxs(a.Fragment,{children:[a.jsx("g",{transform:"translate(-1, ".concat(b,")"),textAnchor:_,children:a.jsx(_t,{text:m[0].split("\n"),fontSize:le.zh.size,lineWidth:le.zh.size,grow:"bidirectional",baseOffset:le.zh.baseOffset,dominantBaseline:"central",className:"rmp-name__zh"})}),a.jsx("g",{transform:"translate(".concat(O,", ").concat(b,")rotate(90)"),textAnchor:_,children:a.jsx(I,{text:m[1].split("\n"),fontSize:le.en.size,lineHeight:le.en.size,grow:"up",baseOffset:le.en.baseOffset,className:"rmp-name__en",dominantBaseline:"central",fill:"gray"})})]}):a.jsxs("g",{transform:"translate(".concat(C,", ").concat(y,")"),textAnchor:j,children:[a.jsx(I,{text:m[0].split("\n"),fontSize:le.zh.size,lineHeight:le.zh.size,grow:"up",baseOffset:le.zh.baseOffset,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),fontSize:le.en.size,lineHeight:le.en.size,grow:"down",baseOffset:le.en.baseOffset,className:"rmp-name__en",fill:"gray"})]})]})},Me={...T,color:[B.Suzhou,"sz1","#78BA25",W.white],nameOffsetX:"right",nameOffsetY:"top",textVertical:!1},Ro=s=>{var i,f,m;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:r=>{e.names[0]=r,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:r=>{e.names[1]=r,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:(i=e.nameOffsetX)!=null?i:Me.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:r=>{e.nameOffsetX=r,e.nameOffsetX!=="middle"&&(e.textVertical=!1),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:(f=e.nameOffsetY)!=null?f:Me.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:r=>{e.nameOffsetY=r,e.nameOffsetY==="middle"&&(e.textVertical=!1),o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.suzhouRTBasic.textVertical"),isChecked:(m=e.textVertical)!=null?m:Me.textVertical,isDisabled:e.nameOffsetY==="middle"||e.nameOffsetX!=="middle",onChange:r=>{e.textVertical=r,o(t,e)},oneLine:!0,minW:"full"},{type:"custom",label:n("color"),component:a.jsx(Ee,{type:k.SuzhouRTBasic,defaultTheme:Me.color})}];return a.jsx(L,{fields:d})},Wo=a.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:a.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",fill:"none"})}),Do={component:Eo,icon:Wo,defaultAttrs:Me,attrsComponent:Ro,metadata:{displayName:"panel.details.stations.suzhouRTBasic.displayName",cities:[B.Suzhou],canvas:[V.RailMap],categories:[G.Metro],tags:[]}},dt=6,we={zh:{size:10,baseOffset:1},en:{size:5,baseOffset:1.5}},tn={top:{lineHeight:we.en.size,offset:0+we.en.baseOffset+3,polarity:-1},middle:{lineHeight:0,offset:we.zh.size/2,polarity:1},bottom:{lineHeight:we.zh.size,offset:0+we.zh.baseOffset+3,polarity:1}},Xo=s=>{var w,v;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Ae.nameOffsetX,nameOffsetY:l=Ae.nameOffsetY,rotate:h=Ae.rotate,transfer:u=Ae.transfer}=(w=n[k.SuzhouRTInt])!=null?w:Ae,c=x.useCallback(A=>d(t,A),[t,d]),p=x.useCallback(A=>i(t,A),[t,i]),g=x.useCallback(A=>f(t,A),[t,f]),C=(dt-1)*u.at(0).length+1,y=Math.abs(Math.cos(h*Math.PI/180)*C),j=Math.abs(Math.sin(h*Math.PI/180)*C),b=r==="left"?-1:r==="right"?1:0,_=(y/2+5)*b,O=(m[ee[l].namesPos].split("\n").length*tn[l].lineHeight+tn[l].offset+(l==="middle"?0:j/2))*tn[l].polarity,N=r==="left"?"end":r==="right"?"start":"middle";return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsxs("g",{transform:"rotate(".concat(h,")"),onPointerDown:c,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:[a.jsx("rect",{x:-C/2,y:-6/2,width:C,height:dt,ry:dt/2,stroke:"#616161",strokeWidth:"1",fill:"white"}),((v=u.at(0))!=null?v:[]).length>0&&u.at(0).map(A=>A[2]).map((A,M)=>a.jsx("circle",{r:2,cx:-C/2+3+M*5,fill:A},"".concat(M,"_").concat(A))),a.jsx("rect",{id:"stn_core_".concat(t),x:-C/2-.5,y:-6/2-.5,width:C+1,height:dt+1,ry:dt/2,fill:"white",opacity:"0"})]}),a.jsxs("g",{transform:"translate(".concat(_,", ").concat(O,")"),textAnchor:N,children:[a.jsx(I,{text:m[0].split("\n"),fontSize:we.zh.size,lineHeight:we.zh.size,grow:"up",baseOffset:we.zh.baseOffset,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),fontSize:we.en.size,lineHeight:we.en.size,grow:"down",baseOffset:we.en.baseOffset,className:"rmp-name__en",fill:"gray"})]})]})},Ae={...T,nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[[B.Suzhou,"sz1","#78BA25",W.white,"",""],[B.Suzhou,"sz2","#ED3240",W.white,"",""]]]},Lo=s=>{var i,f,m,r,l,h;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:u=>{e.names[0]=u,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:u=>{e.names[1]=u,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:(i=e.nameOffsetX)!=null?i:Ae.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:u=>{e.nameOffsetX=u,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:(f=e.nameOffsetY)!=null?f:Ae.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:u=>{e.nameOffsetY=u,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.rotate"),value:(m=e.rotate)!=null?m:Ae.rotate,hidden:((h=(l=(r=e==null?void 0:e.transfer)==null?void 0:r.flat())==null?void 0:l.length)!=null?h:0)===0,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:u=>{e.rotate=Number(u),o(t,e)},minW:"full"},{type:"custom",label:n("panel.details.stations.interchange.title"),component:a.jsx(qt,{stationType:k.SuzhouRTInt,defaultAttrs:Ae,maximumTransfers:[99,0,0]})}];return a.jsx(L,{fields:d})},Yo=a.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[a.jsx("rect",{x:"6",y:"9",width:"12",height:"6",ry:"3",stroke:"currentColor",fill:"none"}),a.jsx("circle",{r:"2",cx:"9.5",cy:"12",fill:"currentColor"}),a.jsx("circle",{r:"2",cx:"14.5",cy:"12",fill:"currentColor"})]}),Ho={component:Xo,icon:Yo,defaultAttrs:Ae,attrsComponent:Lo,metadata:{displayName:"panel.details.stations.suzhouRTInt.displayName",cities:[B.Suzhou],canvas:[V.RailMap],categories:[G.Metro],tags:[]}},ea={top:{lineHeight:6.67,offset:3.5+1.5+5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:-.17+1+5}},Uo=s=>{var j;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=nt.nameOffsetX,nameOffsetY:l=nt.nameOffsetY,color:h=nt.color}=(j=n[k.KunmingRTBasic])!=null?j:nt,u=x.useCallback(b=>d(t,b),[t,d]),c=x.useCallback(b=>i(t,b),[t,i]),p=x.useCallback(b=>f(t,b),[t,f]),g=r==="left"?-13.33:r==="right"?13.33:0,C=(m[ee[l].namesPos].split("\n").length*ea[l].lineHeight+ea[l].offset)*ee[l].polarity,y=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),onPointerDown:u,onPointerMove:c,onPointerUp:p,style:{cursor:"move"},children:[a.jsx("circle",{id:"stn_core_".concat(t),r:"5",stroke:h[2],strokeWidth:"1.33",fill:"white"}),a.jsxs("g",{transform:"translate(".concat(g,", ").concat(C,")"),textAnchor:y,className:"rmp-name-outline",strokeWidth:"2.5",children:[a.jsx(I,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...m,r,l,h,u,c,p])},nt={...T,nameOffsetX:"right",nameOffsetY:"top",color:[B.Kunming,"km1","#ea3222",W.white]},Fo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"custom",label:n("color"),component:a.jsx(Ee,{type:k.KunmingRTBasic,defaultTheme:nt.color})}];return a.jsx(L,{fields:d})},Vo=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("circle",{r:"5",cx:"12",cy:"12",stroke:"currentColor",strokeWidth:"1.33",fill:"none"})}),Go={component:Uo,icon:Vo,defaultAttrs:nt,attrsComponent:Fo,metadata:{displayName:"panel.details.stations.kunmingRTBasic.displayName",cities:[B.Kunming],canvas:[V.RailMap],categories:[G.Metro],tags:["interchange"]}},[It,ta]=[15,9],na={top:{lineHeight:6.67,offset:3.5+1.5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:-.17+1}},Zo=s=>{var w,v,A,M,S;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Qe.nameOffsetX,nameOffsetY:l=Qe.nameOffsetY,rotate:h=Qe.rotate,transfer:u=Qe.transfer}=(w=n[k.KunmingRTInt])!=null?w:Qe,c=x.useCallback(z=>d(t,z),[t,d]),p=x.useCallback(z=>i(t,z),[t,i]),g=x.useCallback(z=>f(t,z),[t,f]),C=h===0||h===180?It:h===90||h===270?ta:It*Math.SQRT1_2,y=h===0||h===180?ta:h===90||h===270?It:It*Math.SQRT1_2,j=r==="left"?-6.83:r==="right"?6.83:0,b=(Math.abs(j)+C/2)*Math.sign(j),_=(m[ee[l].namesPos].split("\n").length*na[l].lineHeight+na[l].offset)*ee[l].polarity,O=(Math.abs(_)+y/2)*Math.sign(_),N=r==="left"?"end":r==="right"?"start":"middle";return a.jsxs("g",{id:t,children:[a.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(h,")"),onPointerDown:c,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:u.at(0).length<=2?a.jsxs("g",{transform:"translate(-7.5,-4.5)",children:[a.jsx("rect",{id:"stn_core_".concat(t),height:"9",width:"15",ry:"4",stroke:"#393332",strokeWidth:"1",fill:"white"}),a.jsx("path",{fill:(A=(v=u.at(0).at(0))==null?void 0:v.at(2))!=null?A:"#ea3222",fillRule:"evenodd",stroke:"none",d:"M 3.833333 6.375 C 2.820813 6.375 2 5.535532 2 4.5 C 2 3.464468 2.820813 2.625 3.833333 2.625 L 4.444445 2.625 L 4.444445 2 L 6.888889 2.9375 L 4.444445 3.875 L 4.444445 3.25 L 3.833333 3.25 C 3.158321 3.25 2.611111 3.809647 2.611111 4.5 C 2.611111 5.190353 3.158321 5.75 3.833333 5.75 L 7.5 5.75 L 7.5 6.375 L 3.833333 6.375 Z"}),a.jsx("path",{fill:(S=(M=u.at(0).at(1))==null?void 0:M.at(2))!=null?S:"#03619e",fillRule:"evenodd",stroke:"none",d:"M 11.166667 2.625 C 12.179187 2.625 13 3.464468 13 4.5 C 13 5.535532 12.179187 6.375 11.166667 6.375 L 10.555555 6.375 L 10.555555 7 L 8.111111 6.0625 L 10.555555 5.125 L 10.555555 5.75 L 11.166667 5.75 C 11.841679 5.75 12.388889 5.190353 12.388889 4.5 C 12.388889 3.809647 11.841679 3.25 11.166667 3.25 L 7.5 3.25 L 7.5 2.625 L 11.166667 2.625 Z"})]}):a.jsxs("g",{transform:"translate(-8.5,-8.5)",children:[a.jsx("circle",{id:"stn_core_".concat(t),r:"8.5",cx:"8.5",cy:"8.5",stroke:"#000000",strokeWidth:"1",fill:"white"}),a.jsx("path",{fill:u.at(0).at(0).at(2),fillRule:"evenodd",stroke:"none",d:"M 8.900812 14 L 10.286572 11.992442 L 10.63521 12.569632 C 12.188999 11.790696 13.24999 10.23524 13.24999 8.441039 C 13.24999 8.070708 13.203481 7.710487 13.118152 7.365112 L 13.887206 7.365112 C 13.960998 7.712721 14 8.072591 14 8.441039 C 14 10.500518 12.789013 12.288074 11.01168 13.191653 L 11.411587 13.855702 L 8.900812 14 Z"}),a.jsx("path",{fill:u.at(0).at(1).at(2),fillRule:"evenodd",stroke:"none",d:"M 8 13.974609 C 5.462755 13.73554 3.426537 11.698185 3.0625 9.090137 L 2.5 9.090137 L 3.5 7 L 4.5 9.090137 L 4.074219 9.090137 C 4.422903 11.120208 6.015293 12.696354 8 12.925459 L 8 13.974609 Z"}),a.jsx("path",{fill:u.at(0).at(2).at(2),fillRule:"evenodd",stroke:"none",d:"M 12.68764 6.50351 L 10.588492 5.178213 L 11.35608 4.753726 C 10.531951 4.143034 9.498575 3.778666 8.375084 3.778666 C 6.644794 3.778666 5.125485 4.640751 4.260284 5.940329 L 3.718284 5.421978 C 4.730131 3.997121 6.438381 3.061381 8.375084 3.061381 C 9.781034 3.061381 11.063435 3.556896 12.04896 4.372667 L 12.536759 4.102285 L 12.68764 6.50351 Z"})]})}),a.jsxs("g",{transform:"translate(".concat(e+b,", ").concat(o+O,")"),textAnchor:N,className:"rmp-name-outline",strokeWidth:"2.5",children:[a.jsx(I,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})},Qe={...T,nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[[B.Kunming,"km1","#ea3222",W.white,"",""],[B.Kunming,"km2","#03619e",W.white,"",""],[B.Kunming,"km3","#a13187",W.white,"",""]]]},qo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:i=>{e.rotate=Number(i),o(t,e)},minW:"full"},{type:"custom",label:n("panel.details.stations.interchange.title"),component:a.jsx(qt,{stationType:k.KunmingRTInt,defaultAttrs:Qe,maximumTransfers:[3,0,0]})}];return a.jsx(L,{fields:d})},Qo=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsxs("g",{transform:"translate(3.5, 3.5)",children:[a.jsx("circle",{r:"8.5",cx:"8.5",cy:"8.5",stroke:"currentColor",strokeWidth:"1",fill:"none"}),a.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 8.900812 14 L 10.286572 11.992442 L 10.63521 12.569632 C 12.188999 11.790696 13.24999 10.23524 13.24999 8.441039 C 13.24999 8.070708 13.203481 7.710487 13.118152 7.365112 L 13.887206 7.365112 C 13.960998 7.712721 14 8.072591 14 8.441039 C 14 10.500518 12.789013 12.288074 11.01168 13.191653 L 11.411587 13.855702 L 8.900812 14 Z"}),a.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 8 13.974609 C 5.462755 13.73554 3.426537 11.698185 3.0625 9.090137 L 2.5 9.090137 L 3.5 7 L 4.5 9.090137 L 4.074219 9.090137 C 4.422903 11.120208 6.015293 12.696354 8 12.925459 L 8 13.974609 Z"}),a.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 12.68764 6.50351 L 10.588492 5.178213 L 11.35608 4.753726 C 10.531951 4.143034 9.498575 3.778666 8.375084 3.778666 C 6.644794 3.778666 5.125485 4.640751 4.260284 5.940329 L 3.718284 5.421978 C 4.730131 3.997121 6.438381 3.061381 8.375084 3.061381 C 9.781034 3.061381 11.063435 3.556896 12.04896 4.372667 L 12.536759 4.102285 L 12.68764 6.50351 Z"})]})}),Jo={component:Zo,icon:Qo,defaultAttrs:Qe,attrsComponent:qo,metadata:{displayName:"panel.details.stations.kunmingRTInt.displayName",cities:[B.Kunming],canvas:[V.RailMap],categories:[G.Metro],tags:["interchange"]}},aa=5.2,Lt=8.2628,yn=0,sa={top:{offset:Lt+yn,polarity:-1},middle:{offset:0,polarity:0},bottom:{offset:Lt+yn,polarity:1}},Ko=s=>{var v;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Te.nameOffsetX,nameOffsetY:l=Te.nameOffsetY,color:h=Te.color,lineCode:u=Te.lineCode,stationCode:c=Te.stationCode,isTram:p=Te.isTram}=(v=n[k.MRTBasic])!=null?v:Te,g=x.useCallback(A=>d(t,A),[t,d]),C=x.useCallback(A=>i(t,A),[t,i]),y=x.useCallback(A=>f(t,A),[t,f]),j=22.85,b=12.935,_=r==="left"?-1:r==="right"?1:0,O=(j/2+5)*_,N=sa[l].offset*sa[l].polarity,w=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,") ").concat(p?"scale(0.81)":""),children:[a.jsxs("g",{onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"},children:[a.jsx("rect",{x:-22.85/2,y:-12.935/2,rx:"3",ry:"6",width:j,height:b,fill:h[2],stroke:"white",strokeWidth:"1"}),a.jsx("text",{fontSize:aa,dx:"-4",dy:"0.5",className:"rmp-name__mrt",fill:h[3],textAnchor:"middle",dominantBaseline:"middle",children:u}),a.jsx("text",{fontSize:aa,dx:"4",dy:"0.5",className:"rmp-name__mrt",fill:h[3],textAnchor:"middle",dominantBaseline:"middle",children:c}),a.jsx("rect",{id:"stn_core_".concat(t),x:-22.85/2,y:-12.935/2,rx:"3",ry:"6",width:j,height:b,fill:"white",opacity:"0"})]}),a.jsx("g",{transform:"translate(".concat(O,", ").concat(N,")"),textAnchor:w,children:a.jsx(I,{text:m[0].split("\n"),fontSize:Lt,lineHeight:Lt,grow:l==="top"?"up":l==="middle"?"bidirectional":"down",baseOffset:yn,className:"rmp-name__mrt"})})]}),[t,e,o,...m,r,l,h,u,c,p,g,C,y])},Te={names:["Marina South Pier"],nameOffsetX:"right",nameOffsetY:"top",lineCode:"NS",stationCode:"28",isTram:!1,color:[B.Singapore,"nsl","#DA291C",W.white]},ei=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.common.lineCode"),value:e.lineCode,onChange:i=>{e.lineCode=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.common.stationCode"),value:e.stationCode,onChange:i=>{e.stationCode=i,o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.MRTBasic.isTram"),isChecked:e.isTram,onChange:i=>{e.isTram=i,o(t,e)},minW:"full",oneLine:!0},{type:"custom",label:n("color"),component:a.jsx(Ee,{type:k.MRTBasic,defaultTheme:Te.color})}];return a.jsx(L,{fields:d})},ti=a.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[a.jsx("rect",{x:"6",y:"8.6035",rx:"1.575",ry:"3.151",width:"12",height:"6.793",fill:"currentColor"}),a.jsx("text",{fontSize:"3.5",dx:"10",dy:"13",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"NS"}),a.jsx("text",{fontSize:"3.5",dx:"15",dy:"13",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"28"})]}),ni={component:Ko,icon:ti,defaultAttrs:Te,attrsComponent:ei,metadata:{displayName:"panel.details.stations.MRTBasic.displayName",cities:[B.Singapore],canvas:[V.RailMap],categories:[G.Metro],tags:[]}},oa=6.9,Yt=8.2628,ia=2.5,la={top:{offset:Yt+ia,polarity:-1},middle:{offset:0,polarity:0},bottom:{offset:Yt+ia,polarity:1}},ai=s=>{var w;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=at.nameOffsetX,nameOffsetY:l=at.nameOffsetY,transfer:h=at.transfer}=(w=n[k.MRTInt])!=null?w:at,u=x.useCallback(v=>d(t,v),[t,d]),c=x.useCallback(v=>i(t,v),[t,i]),p=x.useCallback(v=>f(t,v),[t,f]),g=h.at(0),C=(g.length-2)*29.625+57.8,y=16.77,j=[];for(let v=1;va.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("g",{onPointerDown:u,onPointerMove:c,onPointerUp:p,style:{cursor:"move"},children:h.map(v=>({info:v,width:(v.length-2)*29.625+57.8})).map(({info:v,width:A},M)=>a.jsxs(x.Fragment,{children:[a.jsx("rect",{x:-A/2,y:-16.77/2,rx:"4.5",ry:"8",width:A,height:y,fill:"url(#".concat(t,"_grad_").concat(M,")"),stroke:"white",strokeWidth:"1"}),a.jsx("linearGradient",{id:"".concat(t,"_grad_").concat(M),y1:"0%",y2:"0%",x1:"0%",x2:"100%",children:v.map((S,z)=>a.jsxs(x.Fragment,{children:[a.jsx("stop",{offset:"".concat(100/v.length*z,"%"),stopColor:S[2]}),a.jsx("stop",{offset:"".concat(100/v.length*(z+1),"%"),stopColor:S[2]})]},S[2]))}),j.map(S=>a.jsx("line",{x1:S/v.length*A-A/2,x2:S/v.length*A-A/2,y1:-16.77/2,y2:y/2,stroke:"white",strokeWidth:"1"},S)),v.map((S,z,P)=>a.jsxs(x.Fragment,{children:[a.jsx("text",{fontSize:oa,dx:(S[5]!==""?-5:-2)+A/P.length/2*(z*2+1)-A/2+1,dy:"0.5",className:"rmp-name__mrt",fill:S[3],textAnchor:"middle",dominantBaseline:"middle",children:S[4]}),a.jsx("text",{fontSize:oa,dx:5+A/P.length/2*(z*2+1)-A/2+1,dy:"0.5",className:"rmp-name__mrt",fill:S[3],textAnchor:"middle",dominantBaseline:"middle",children:S[5]})]},S[2])),a.jsx("rect",{id:"stn_core_".concat(t),x:-A/2,y:-16.77/2,rx:"4.5",ry:"8",width:A,height:y,fill:"white",opacity:"0"})]},v.map(S=>S[2]).join("_")))}),a.jsx("g",{transform:"translate(".concat(_,", ").concat(O,")"),textAnchor:N,children:a.jsx(I,{text:m[0].split("\n"),fontSize:Yt,lineHeight:Yt,grow:l==="top"?"up":l==="middle"?"bidirectional":"down",baseOffset:0,className:"rmp-name__mrt"})})]}),[t,e,o,...m,r,l,JSON.stringify(h),u,c,p])},at={names:["Chinatown"],nameOffsetX:"right",nameOffsetY:"top",transfer:[[[B.Singapore,"nel","#9B26B6",W.white,"NE","4"],[B.Singapore,"dtl","#0057B7",W.white,"DT","19"]]]},si=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"custom",label:n("panel.details.stations.interchange.title"),component:a.jsx(qt,{stationType:k.MRTInt,defaultAttrs:at,maximumTransfers:[1/0,0,0]})}];return a.jsx(L,{fields:d})},oi=a.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[a.jsx("rect",{x:"2",y:"9.0985",rx:"1.038",ry:"2.076",width:"20",height:"5.803",fill:"currentColor"}),a.jsx("text",{fontSize:"3",dx:"5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"NE"}),a.jsx("text",{fontSize:"3",dx:"9.5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"4"}),a.jsx("text",{fontSize:"3",dx:"14.5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"DT"}),a.jsx("text",{fontSize:"3",dx:"19",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"19"})]}),ii={component:ai,icon:oi,defaultAttrs:at,attrsComponent:si,metadata:{displayName:"panel.details.stations.MRTInt.displayName",cities:[B.Singapore],canvas:[V.RailMap],categories:[G.Metro],tags:[]}},Q={ja:{size:10,baseOffset:1},en:{size:5,baseOffset:1.5}},de=5,li=s=>{var rt;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Be.nameOffsetX,nameOffsetY:l=Be.nameOffsetY,rotate:h=Be.rotate,textOneLine:u=Be.textOneLine,textVertical:c=Be.textVertical,important:p=Be.important,lines:g=Be.lines}=(rt=n[k.JREastBasic])!=null?rt:Be,C=x.useCallback(ce=>d(t,ce),[t,d]),y=x.useCallback(ce=>i(t,ce),[t,i]),j=x.useCallback(ce=>f(t,ce),[t,f]),b=(Math.max(...g)-Math.min(...g)+1)*de,_=(Math.min(...g)-.5)*de,O=Math.abs(Math.cos(h*Math.PI/180))*de*Math.min(...g)-de/2-1,N=Math.abs(Math.cos(h*Math.PI/180))*de*Math.max(...g)+de/2+1,w=Math.abs(Math.sin(h*Math.PI/180))*de*Math.min(...g)-de/2,v=Math.abs(Math.sin(h*Math.PI/180))*de*Math.max(...g)+de/2,A=r==="left"?O:r==="right"?N:0,M=m[0].split("\n").length*(l==="middle"?0:Q.ja.size),S=(l==="middle"?0:l==="top"?2:1)+Q.ja.baseOffset,z=(M+S)*ee[l].polarity+(l==="middle"?0:l==="top"?w:v),P=r==="left"?"end":r==="right"?"start":"middle",Y={ja:l==="top"?"down":l==="bottom"?"up":"bidirectional",en:l==="top"||u?"up":"down"},U={ja:Q.ja.baseOffset,en:(l==="middle"?u?-m[0].split("\n").length*Q.ja.size/2-1:m[0].split("\n").length*Q.ja.size/2:0)+(p&&!u?2:0)+Q.en.baseOffset},q=x.useRef(null),[X,se]=x.useState({width:0});x.useEffect(()=>se(q.current.getBBox()),[m[0],c,se,q]);const ae=(c?.2:.7)*Q.ja.size,ie={left:-ae/2,middle:0,right:ae/2}[r],E={top:-2,middle:0,bottom:2}[l],H=h%90!==0&&r!=="middle"?(r==="left"?O:N)*Math.SQRT2:0,R=(p&&r!=="middle"?ie:0)+H,Z={0:0,45:-1,90:0,135:1,180:0,225:-1,270:0,315:1}[h],pe=Z*Q.ja.size,he=u?(Math.abs(R)+X.width+1+(p?ae:0))*(r==="left"?-1:1):h%90!==0&&r!=="middle"?m[0].split("\n").length/2*Z*Q.ja.size+(r==="left"?-1:1)*Q.ja.size:0,Le=(p?2:0)*ee[l].polarity,be=X.width,ge=X.height,Ye={left:-(be+ae)+H,middle:-(be+ae)/2,right:H}[r],He={top:-2-U.ja,middle:-ge/2,bottom:-ge+3+U.ja}[l],Ue={top:-ge+3-U.ja,middle:0,bottom:-3+U.ja}[l],te=(l==="top"?w-Q.en.baseOffset:v+Q.en.baseOffset)+((p?ae:0)+(h%90!==0?Q.ja.size/2:0))*ee[l].polarity,je={ja:l==="top"?"end":"start",en:l==="top"?"start":"end"},tt={0:0,45:-1,90:0,135:1,180:0,225:-1,270:0,315:1}[h],wt=tt*Q.ja.size,St=m[0].split("\n").length*Q.ja.size/2+Q.en.baseOffset,Nt=(p?1:0)*ee[l].polarity*-1,kt=(m[0].split("\n").length-0)/2*(l==="top"?-1:1)*tt*Q.ja.size+(p?2:0)*ee[l].polarity*-1;return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("g",{transform:"rotate(".concat(h,")"),children:g.map((ce,Mt)=>a.jsx("circle",{cx:de*ce,cy:"0",r:"1.5",stroke:"black",strokeWidth:"0.2",fill:"white"},"stn_core_".concat(t,"_").concat(Mt)))}),c?a.jsxs(a.Fragment,{children:[a.jsxs("g",{transform:"translate(0, ".concat(te,")"),textAnchor:je.ja,children:[p&&a.jsx("rect",{x:-(be-8)/2,y:Ue,width:be-8,height:ge,rx:(be-8)/2,fill:"black"}),a.jsx(_t,{ref:q,text:m[0].split("\n"),fontSize:Q.ja.size,lineWidth:Q.ja.size,grow:"bidirectional",baseOffset:0,baseDY:wt,y:p?2.75*ee[l].polarity:0,className:"rmp-name__jreast_ja",fill:p?"white":"black"})]}),a.jsx("g",{transform:"translate(".concat(Nt,", ").concat(te+kt,")rotate(270)"),textAnchor:je.en,children:a.jsx(I,{text:m[1].split("\n"),fontSize:Q.en.size,lineHeight:Q.en.size,grow:l==="top"?"down":"up",baseOffset:St,funcDX:ce=>ce*de*Math.SQRT1_2*tt*(l==="top"?-1:1),className:"rmp-name__jreast_en"})})]}):a.jsxs("g",{transform:"translate(".concat(A,", ").concat(z,")"),textAnchor:P,children:[p&&a.jsx("rect",{x:Ye,y:He+1.75,width:X.width+ae,height:ge-3.5,ry:(ge-3.5)/2,fill:"black"}),a.jsx(I,{ref:q,x:R,y:p&&l!=="middle"?E:0,text:m[0].split("\n"),fontSize:Q.ja.size,lineHeight:Q.ja.size,grow:Y.ja,baseOffset:U.ja,funcDX:ce=>(ce-(m[0].split("\n").length-1)/2)*pe,className:"rmp-name__jreast_ja",fill:p?"white":"black"}),a.jsx(I,{text:m[1].split("\n"),x:he,y:Le,fontSize:Q.en.size,lineHeight:Q.en.size,grow:Y.en,baseOffset:U.en,funcDX:ce=>ce*de*Math.SQRT1_2*Z,className:"rmp-name__jreast_en"})]}),a.jsx("g",{transform:"rotate(".concat(h,")"),children:a.jsx("rect",{id:"stn_core_".concat(t),fill:"url(#opaque)",fillOpacity:"50%",x:_,y:-5/2,rx:de/2,width:b,height:de,onPointerDown:C,onPointerMove:y,onPointerUp:j,style:{cursor:"move"}})})]})},Be={names:["新宿","Shinjuku"],nameOffsetX:"right",nameOffsetY:"middle",rotate:0,textOneLine:!1,textVertical:!1,important:!1,lines:[-1,0,1]},ri=s=>{var r;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameJa"),value:e.names[0],onChange:l=>{e.names[0]=l.toString(),e.names[0].length>1&&(e.textOneLine=!1,e.important=!1),o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:l=>{e.names[1]=l.toString(),e.names[1].length>1&&(e.textOneLine=!1,e.important=!1),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.jrEastBasic.nameOffset"),value:e.nameOffsetX!=="middle"?e.nameOffsetX:e.nameOffsetY,options:{left:n("panel.details.stations.common.left"),right:n("panel.details.stations.common.right"),top:n("panel.details.stations.common.top"),bottom:n("panel.details.stations.common.bottom")},onChange:l=>{l==="left"||l==="right"?(e.nameOffsetX=l,e.nameOffsetY="middle",e.textVertical=!1):(e.nameOffsetX="middle",e.nameOffsetY=l,e.textOneLine=!1),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:l=>{e.rotate=Number(l),o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.jrEastBasic.textOneLine"),isChecked:e.textOneLine,isDisabled:e.nameOffsetY!=="middle"||e.names.some(l=>l.split("\n").length>1),onChange:l=>{e.textOneLine=l,o(t,e)},oneLine:!0,minW:"full"},{type:"switch",label:n("panel.details.stations.jrEastBasic.textVertical"),isChecked:e.textVertical,isDisabled:e.nameOffsetX!=="middle",onChange:l=>{e.textVertical=l,o(t,e)},oneLine:!0,minW:"full"},{type:"switch",label:n("panel.details.stations.jrEastBasic.important"),isChecked:(r=e.important)!=null?r:!1,isDisabled:e.names.some(l=>l.split("\n").length>1),onChange:l=>{e.important=l,o(t,e)},oneLine:!0,minW:"full"}],i=l=>{const h=l==="-"?-1:Number(l);Number.isNaN(h)||(e.lines.push(h),o(t,e))},f=(l,h)=>{if((l===""||l==="-")&&e.lines.length>1)e.lines.splice(h,1);else{const u=Number(l);if(Number.isNaN(u))return;e.lines[h]=u}o(t,e)},m=l=>{l.key==="Backspace"&&e.lines.length>1&&(e.lines.pop(),o(t,e))};return a.jsxs(a.Fragment,{children:[a.jsx(L,{fields:d}),a.jsx(ue,{label:n("panel.details.stations.jrEastBasic.lines"),children:a.jsxs(Wt,{flexWrap:"wrap",flexDirection:"row",pt:"1",children:[e.lines.map((l,h)=>a.jsx(In,{width:"80px",inputMode:"numeric",mr:"2",mb:"2",value:l,onChange:u=>f(u,h),children:a.jsx(Pn,{})},h)),a.jsx(In,{width:"80px",inputMode:"numeric",mr:"2",mb:"2",value:"",onChange:l=>i(l),onKeyDown:l=>m(l),children:a.jsx(Pn,{})})]})})]})},ci=a.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[a.jsx("circle",{cx:"6",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"}),a.jsx("circle",{cx:"12",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"}),a.jsx("circle",{cx:"18",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"})]}),di={component:li,icon:ci,defaultAttrs:Be,attrsComponent:ri,metadata:{displayName:"panel.details.stations.jrEastBasic.displayName",cities:[B.Tokyo],canvas:[V.RailMap],categories:[G.NationalRail],tags:[]}},Ve={ja:{size:10,baseOffset:1},en:{size:5,baseOffset:1.5}},ra=1,mi=s=>{var P;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Ze.nameOffsetX,nameOffsetY:l=Ze.nameOffsetY,textVertical:h=Ze.textVertical,mostImportant:u=Ze.mostImportant,minLength:c=Ze.minLength}=(P=n[k.JREastImportant])!=null?P:Ze,p=x.useCallback(Y=>d(t,Y),[t,d]),g=x.useCallback(Y=>i(t,Y),[t,i]),C=x.useCallback(Y=>f(t,Y),[t,f]),y=x.useRef(null),[j,b]=x.useState({height:0,width:0});x.useEffect(()=>b(y.current.getBBox()),[m[0],h,b,y]);const _=Math.max(j.width,j.height),O=(h?.1:.7)*Ve.ja.size,N=Math.max(_+O,c),w=h?Ve.ja.size+ra:N,v=h?N-5:Ve.ja.size+ra,A={left:-w/2-1,middle:0,right:w/2+1}[r],M={top:-v/2-1,middle:0,bottom:v/2+1}[l],S={left:"end",middle:"middle",right:"start"}[r],z=u?1.5:1;return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsxs("g",{transform:"scale(".concat(z,")"),children:[a.jsx("rect",{fill:"black",x:-w/2,y:-v/2,rx:h?void 0:v/2,ry:h?w/2:void 0,width:w,height:v}),h?a.jsx("text",{ref:y,className:"rmp-name__jreast_ja",textAnchor:"middle",writingMode:"vertical-rl",fontSize:Ve.ja.size,fill:"white",dominantBaseline:"central",children:m[0]}):a.jsx("text",{ref:y,y:"-1",className:"rmp-name__jreast_ja",textAnchor:"middle",fontSize:Ve.ja.size,fill:"white",dominantBaseline:"central",children:m[0]}),a.jsx("rect",{id:"stn_core_".concat(t),fill:"black",fillOpacity:"0",x:-w/2,y:-v/2,rx:h?void 0:w/2,ry:h?v/2:void 0,width:w,height:v,onPointerDown:p,onPointerMove:g,onPointerUp:C,style:{cursor:"move"},className:"removeMe"})]}),a.jsx("g",{transform:"translate(".concat(A*z,", ").concat(M*z,")"),textAnchor:S,children:a.jsx(I,{text:m[1].split("\n"),fontSize:Ve.en.size,lineHeight:Ve.en.size,grow:l==="top"?"up":l==="middle"?"bidirectional":"down",baseOffset:0,className:"rmp-name__jreast_en"})})]})},Ze={names:["東京","Tōkyō"],nameOffsetX:"left",nameOffsetY:"middle",textVertical:!1,mostImportant:!1,minLength:0},fi=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"input",label:n("panel.details.stations.common.nameJa"),value:e.names[0],onChange:i=>{e.names[0]=i.toString(),o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i.toString(),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.jrEastImportant.textVertical"),isChecked:e.textVertical,onChange:i=>{e.textVertical=i,o(t,e)},oneLine:!0,minW:"full"},{type:"switch",label:n("panel.details.stations.jrEastImportant.mostImportant"),isChecked:e.mostImportant,onChange:i=>{e.mostImportant=i,o(t,e)},oneLine:!0,minW:"full"},{type:"input",label:n("panel.details.stations.jrEastImportant.minLength"),value:e.minLength.toString(),onChange:i=>{Number.isNaN(i)?e.minLength=0:e.minLength=Number(i),o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},hi=a.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[a.jsx("rect",{x:"3",y:"7.5",rx:"4.5",width:"18",height:"9",stroke:"currentColor",fill:"currentColor"}),a.jsx("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"middle",fontSize:"6",fill:"white",children:"東京"}),a.jsx("text",{x:"12",y:"20.25",textAnchor:"middle",dominantBaseline:"middle",fontSize:"3",children:"Tōkyō"})]}),ui={component:mi,icon:hi,defaultAttrs:Ze,attrsComponent:fi,metadata:{displayName:"panel.details.stations.jrEastImportant.displayName",cities:[B.Tokyo],canvas:[V.RailMap],categories:[G.NationalRail],tags:[]}},pi=s=>{var ie,E,H;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=_e.nameOffsetX,nameOffsetY:l=_e.nameOffsetY,color:h=_e.color,lineCode:u=_e.lineCode,stationCode:c=_e.stationCode,open:p=_e.open,secondaryNames:g=_e.secondaryNames,tram:C=_e.tram}=(ie=n[k.FoshanMetroBasic])!=null?ie:_e,y=x.useCallback(R=>d(t,R),[t,d]),j=x.useCallback(R=>i(t,R),[t,i]),b=x.useCallback(R=>f(t,R),[t,f]),_=x.useRef(null);(H=(E=_.current)==null?void 0:E.querySelector("path"))==null||H.setAttribute("id","stn_core_".concat(t));const O={en:C?5.08:6.56,zh:C?7.29:13.13},N={top:{namesPos:1,lineHeight:O.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:O.zh,polarity:1}},w=C?11:15,v=r==="left"?-w:r==="right"?w:0,A=C?8:10,M=(m[N[l].namesPos].split("\n").length*N[l].lineHeight+A)*N[l].polarity,S=r==="left"?"end":r==="right"?"start":!p&&r==="middle"&&g.join("")===""?"end":"middle",z=x.useRef(null),[P,Y]=x.useState(0);x.useEffect(()=>{var R,Z;return Y((Z=(R=z.current)==null?void 0:R.getBBox().width)!=null?Z:0)},[...g]);const U=x.useRef(null),[q,X]=x.useState(0);x.useEffect(()=>{var R,Z;return X((Z=(R=U.current)==null?void 0:R.getBBox().width)!=null?Z:0)},[...m]);const se=r==="middle"?q/2+(P+12*2)/2:(q+(P+12*2)/2)*(r==="left"?-1:1),ae=r==="middle"&&g.join("")!==""?q/2+(P+12*2):(q+P+(P!==0?12*2:0))*(r==="left"?-1:r==="right"?1:0);return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("g",{transform:"scale(".concat(.57915*(C?.729:1),")"),onPointerDown:y,onPointerMove:j,onPointerUp:b,style:{cursor:"move"},ref:_,children:a.jsx(Zt,{id:"stn_core_".concat(t),strokeColour:h[2],lineNum:u===""?void 0:u,stnNum:c===""?void 0:c,textClassName:"rmp-name__zh"})}),a.jsxs("g",{ref:U,transform:"translate(".concat(v,", ").concat(M,")"),textAnchor:S,children:[a.jsx(I,{text:m[0].split("\n"),fontSize:O.zh,lineHeight:O.zh,grow:"up",className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),fontSize:O.en,lineHeight:O.en,grow:"down",className:"rmp-name__en"})]}),g.join("")!==""&&a.jsxs("g",{transform:"translate(".concat(v+se,", ").concat(M,")"),textAnchor:"middle",children:[a.jsx("text",{fontSize:"13.13",dx:-(P+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),a.jsx("text",{fontSize:"13.13",dx:(P+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),a.jsxs("g",{ref:z,children:[a.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:g[0]}),a.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:g[1]})]})]}),!p&&a.jsxs("g",{transform:"translate(".concat(v+ae,", ").concat(M,")"),textAnchor:r==="middle"?"start":S,children:[a.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),a.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},_e={...T,nameOffsetX:"right",nameOffsetY:"top",color:[B.Foshan,"fs1","#C4D600",W.black],lineCode:"GF",stationCode:"01",open:!0,secondaryNames:["",""],tram:!1},gi=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"custom",label:n("color"),component:a.jsx(Ee,{type:k.FoshanMetroBasic,defaultTheme:_e.color})},{type:"input",label:n("panel.details.stations.common.lineCode"),value:e.lineCode,onChange:i=>{e.lineCode=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.common.stationCode"),value:e.stationCode,onChange:i=>{e.stationCode=i,o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.foshanMetroBasic.open"),oneLine:!0,isChecked:e.open,onChange:i=>{e.open=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.foshanMetroBasic.secondaryNameZh"),value:e.secondaryNames[0],onChange:i=>{e.secondaryNames[0]=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.foshanMetroBasic.secondaryNameEn"),value:e.secondaryNames[1],onChange:i=>{e.secondaryNames[1]=i,o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.foshanMetroBasic.tram"),oneLine:!0,isChecked:e.tram,onChange:i=>{e.tram=i,o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},xi=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("g",{transform:"translate(12,12)scale(0.45)",children:a.jsx(Zt,{strokeColour:"#000",lineNum:"1",stnNum:"01"})})}),Ci={component:pi,icon:xi,defaultAttrs:_e,attrsComponent:gi,metadata:{displayName:"panel.details.stations.foshanMetroBasic.displayName",cities:[B.Foshan],canvas:[V.RailMap],categories:[G.Metro],tags:[]}},Re={top:3.75,middle:0,bottom:8},yi=s=>{var O;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,color:r=Se.color,nameOffsetX:l=Se.nameOffsetX,nameOffsetY:h=Se.nameOffsetY,isInt:u=Se.isInt}=(O=n[k.QingdaoMetroStation])!=null?O:Se,c=x.useCallback(N=>d(t,N),[t,d]),p=x.useCallback(N=>i(t,N),[t,i]),g=x.useCallback(N=>f(t,N),[t,f]),C=(N,w)=>{const v=N==="left"?-6:N==="right"?6:0;return w==="top"?[v,-m[1].split("\n").length*Re[w]-5.5]:w==="bottom"?[v,m[0].split("\n").length*Re[w]+4]:[v,2]},y=(N,w)=>N==="left"&&w==="top"?[-6,-m[1].split("\n").length*Re[w]-6]:N==="middle"&&w==="top"?[0,-m[1].split("\n").length*Re[w]-10]:N==="right"&&w==="top"?[6,-m[1].split("\n").length*Re[w]-6]:N==="left"&&w==="bottom"?[-6,m[0].split("\n").length*Re[w]+6]:N==="middle"&&w==="bottom"?[0,m[0].split("\n").length*Re[w]+7]:N==="right"&&w==="bottom"?[6,m[0].split("\n").length*Re[w]+6]:N==="left"&&w==="middle"?[-8,2]:N==="right"&&w==="middle"?[8,2]:[0,0],[j,b]=u?y(l,h):C(l,h),_=l==="left"?"end":l==="right"?"start":"middle";return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("circle",{id:"stn_core_".concat(t),r:u?6:2.7,stroke:u?"black":r[2],strokeWidth:u?1.5:.2,fill:"white",onPointerDown:c,onPointerMove:p,onPointerUp:g,style:{cursor:"move"}}),a.jsxs("g",{transform:"translate(".concat(j,", ").concat(b,")"),textAnchor:_,children:[a.jsx(I,{text:m[0].split("\n"),fontSize:8,lineHeight:8,grow:"up",baseOffset:1,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),fontSize:3.75,lineHeight:3.75,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})},Se={...T,color:[B.Qingdao,"qd1","#f7b000",W.white],nameOffsetX:"right",nameOffsetY:"top",isInt:!1},bi=s=>{var i,f,m,r;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:(i=e.names[0])!=null?i:Se.names[0],onChange:l=>{e.names[0]=l.toString(),o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:(f=e.names[1])!=null?f:Se.names[1],onChange:l=>{e.names[1]=l.toString(),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:(m=e.nameOffsetX)!=null?m:Se.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:l=>{e.nameOffsetX=l,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:(r=e.nameOffsetY)!=null?r:Se.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:l=>{e.nameOffsetY=l,o(t,e)},minW:"full"},{type:"custom",label:n("color"),component:a.jsx(Ee,{type:k.QingdaoMetroStation,defaultTheme:Se.color}),minW:"full"},{type:"switch",label:n("panel.details.stations.qingdaoMetro.isInt"),isChecked:e.isInt,oneLine:!0,onChange:l=>{e.isInt=l,o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},ji=a.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:a.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",strokeWidth:"0.6",fill:"none"})}),Oi={component:yi,icon:ji,defaultAttrs:Se,attrsComponent:bi,metadata:{displayName:"panel.details.stations.qingdaoMetro.displayName",cities:[B.Qingdao],canvas:[V.RailMap],categories:[G.Metro],tags:[]}},bn=s=>{const{lineCode:t,stationCode:e,color:o,stroke:n}=s,[d,i,f]=[10,15,.8];return a.jsxs(a.Fragment,{children:[n&&a.jsx("rect",{x:-d/2-f,y:-i/2-f,width:d+2*f,height:i+2*f,rx:2.5,strokeWidth:f,stroke:"white",fill:"white"}),a.jsx("rect",{x:-d/2,y:-i/2,width:d,height:i,rx:2,strokeWidth:1.5,stroke:o[2],fill:"white"}),a.jsx("text",{x:0,y:t.length===1?-.75:-1.5,textAnchor:"middle",className:"rmp-name__tokyo_en",fontSize:t.length===1?7:4.5,fill:"black",children:t}),a.jsx("text",{x:e.length===1?0:-.4/e.length,y:5.5,textAnchor:"middle",className:"rmp-name__en",fontSize:7,fontWeight:"bold",letterSpacing:"-0.4",fill:"black",children:e})]})},vi=s=>{var A;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=$e.nameOffsetX,nameOffsetY:l=$e.nameOffsetY,textVertical:h=$e.textVertical,lineCode:u=$e.lineCode,stationCode:c=$e.stationCode,color:p=$e.color}=(A=n[k.TokyoMetroBasic])!=null?A:$e,g=x.useCallback(M=>d(t,M),[t,d]),C=x.useCallback(M=>i(t,M),[t,i]),y=x.useCallback(M=>f(t,M),[t,f]),[j,b]=x.useState(0);x.useEffect(()=>{let M=0;m[0].split("\n").forEach(S=>{M=Math.max(M,S.length)}),b(M)},[m[0]]);const _=r==="left"?-7:r==="right"?7:0,O=r==="left"?-12:r==="right"?12:0,N=l==="bottom"?20:l==="top"?-9:5.5,w=l==="bottom"?9+j*5:l==="top"?-9-j*5:-5,v=r==="left"?"end":r==="right"?"start":"middle";return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx(bn,{lineCode:u,stationCode:c,color:p}),a.jsx("rect",{id:"stn_core_".concat(t),x:-5.8,y:-8.2,width:11.6,height:16.4,rx:2.5,opacity:0,onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"}}),a.jsx("g",{textAnchor:v,className:"rmp-name-outline",strokeWidth:"1",children:h?a.jsx("g",{transform:"translate(".concat(O,", ").concat(w,")"),textAnchor:v,children:a.jsx(_t,{text:m[0].split("\n"),fontSize:10,lineWidth:10,grow:"bidirectional",baseOffset:0,baseDY:0,className:"rmp-name__jreast_ja",fill:"black"})}):a.jsx("g",{transform:"translate(".concat(_,", ").concat(N,")"),textAnchor:v,children:a.jsx(I,{text:m[0].split("\n"),fontSize:10,lineHeight:10,grow:"up",funcDX:M=>(M-(m[0].split("\n").length-1)/2)*10,className:"rmp-name__jreast_ja",fill:"black"})})})]})},$e={names:["京橋"],nameOffsetX:"right",nameOffsetY:"middle",textVertical:!1,lineCode:"G",stationCode:"10",color:[B.Tokyo,"g","#f9a328",W.white]},_i=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameJa"),value:e.names[0],onChange:i=>{e.names[0]=i.toString(),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.tokyoMetroBasic.nameOffset"),value:e.nameOffsetX!=="middle"?e.nameOffsetX:e.nameOffsetY,options:{left:n("panel.details.stations.common.left"),right:n("panel.details.stations.common.right"),top:n("panel.details.stations.common.top"),bottom:n("panel.details.stations.common.bottom")},onChange:i=>{i==="left"||i==="right"?(e.nameOffsetX=i,e.nameOffsetY="middle",e.textVertical=!1):(e.nameOffsetX="middle",e.nameOffsetY=i),o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.tokyoMetroBasic.textVertical"),isChecked:e.textVertical,isDisabled:e.nameOffsetX!=="middle",onChange:i=>{e.textVertical=i,o(t,e)},oneLine:!0,minW:"full"},{type:"input",label:n("panel.details.stations.common.lineCode"),value:e.lineCode,onChange:i=>{e.lineCode=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.common.stationCode"),value:e.stationCode,onChange:i=>{e.stationCode=i,o(t,e)},minW:"full"},{type:"custom",label:n("color"),component:a.jsx(Ee,{type:k.TokyoMetroBasic,defaultTheme:$e.color}),minW:"full"}];return a.jsx(L,{fields:d})},wi=a.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[a.jsx("rect",{x:"6.5",y:"4.5",rx:"1.5",width:"10",height:"15",stroke:"currentColor",fill:"none"}),a.jsx("text",{x:"9",y:"11",fontSize:"7",fill:"currentColor",children:"G"}),a.jsx("text",{x:"7.75",y:"18",fontSize:"7",letterSpacing:"-0.8",fill:"currentColor",children:"10"})]}),Si={component:vi,icon:wi,defaultAttrs:$e,attrsComponent:_i,metadata:{displayName:"panel.details.stations.tokyoMetroBasic.displayName",cities:[B.Tokyo],canvas:[V.RailMap],categories:[G.Metro],tags:[]}},Ni=s=>{var ie;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Ie.nameOffsetX,nameOffsetY:l=Ie.nameOffsetY,textVertical:h=Ie.textVertical,interchanges:u=Ie.interchanges,align:c=Ie.align,importance:p=Ie.importance,mereOffset:g=Ie.mereOffset}=(ie=n[k.TokyoMetroInt])!=null?ie:Ie,C=x.useCallback(E=>d(t,E),[t,d]),y=x.useCallback(E=>i(t,E),[t,i]),j=x.useCallback(E=>f(t,E),[t,f]),[b,_]=x.useState(0);x.useEffect(()=>{let E=0;m[0].split("\n").forEach(H=>{E=Math.max(E,H.length)}),_(E)},[m[0]]);const O=13,N=18,w=c==="horizontal"?u.length*O:0,v=c==="vertical"?u.length*N:0,S=r==="left"?-(c==="horizontal"?4:10)-w/2:r==="right"?(c==="horizontal"?2:9)+w/2:g==="left2"?-5:g==="right2"?5:0,z=()=>{const E=c==="vertical"?1:10,H=c==="vertical"?3:12,R=c==="vertical"?1:13,Z=c==="vertical"?3:12,pe=g==="left1"?-4:g==="left2"?-10:g==="right1"?4:g==="right2"?10:0,he=g==="up"?3:g==="down"?10:0;return{fontSize:10,textXVer:(r==="left"?-12:r==="right"?12:-2)+pe,textY:l==="bottom"?E+v/2:l==="top"?-H-v/2:-7.5+he,textYVer:l==="bottom"?Z+v/2+b*5:l==="top"?-R-v/2-b*5:-5}},P=()=>{const E=c==="vertical"?1:10,H=c==="vertical"?3:13,R=c==="vertical"?4:13,Z=c==="vertical"?3:13,pe=g==="left1"?-8:g==="left2"?-13:g==="right1"?8:g==="right2"?13:0,he=g==="up"?4:g==="down"?12:0;return{fontSize:15,textXVer:(r==="left"?-12:r==="right"?12:-2)+pe,textY:l==="bottom"?E+v/2:l==="top"?-H-v/2:-10+he,textYVer:l==="bottom"?Z+v/2+b*7.5:l==="top"?-R-v/2-b*7.5:-5}},Y=()=>{const E=c==="vertical"?1:13,H=c==="vertical"?3:10,R=c==="vertical"?5:13,Z=c==="vertical"?4:13,pe=g==="left1"?-10:g==="left2"?-16:g==="right1"?10:g==="right2"?16:0,he=g==="up"?6:g==="down"?15:0;return{fontSize:20,textXVer:(r==="left"?-12:r==="right"?12:-2)+pe,textY:l==="bottom"?H+v/2:l==="top"?-E-v/2:-13+he,textYVer:l==="bottom"?Z+v/2+b*10:l==="top"?-R-v/2-b*10:-5}},{fontSize:U,textXVer:q,textY:X,textYVer:se}=p==="default"?z():p==="high"?Y():P(),ae=r==="left"||g==="left1"||g==="left2"?"end":r==="right"||g==="right1"||g==="right2"?"start":"middle";return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[c==="horizontal"?a.jsxs(a.Fragment,{children:[a.jsx("rect",{x:-(w+3)/2,y:-10.5,width:w+3,height:21,rx:3,fill:"#808285",stroke:"black",strokeWidth:"0.5"}),u.map((E,H)=>a.jsx("g",{transform:"translate(".concat(H*O-(w-O)/2,", 0)"),children:a.jsx(bn,{lineCode:E.lineCode,stationCode:E.stationCode,color:E.color,stroke:!0})},H)),a.jsx("rect",{id:"stn_core_".concat(t),x:-(w+3)/2,y:-10.5,width:w+3,height:21,rx:3,opacity:0,onPointerDown:C,onPointerMove:y,onPointerUp:j,style:{cursor:"move"}})]}):a.jsxs(a.Fragment,{children:[a.jsx("rect",{x:-8,y:-(v+3)/2,width:16,height:v+3,rx:3,fill:"#808285",stroke:"black",strokeWidth:"0.5"}),u.map((E,H)=>a.jsx("g",{transform:"translate(0, ".concat(H*N-(v-N)/2,")"),children:a.jsx(bn,{lineCode:E.lineCode,stationCode:E.stationCode,color:E.color,stroke:!0})},H)),a.jsx("rect",{id:"stn_core_".concat(t),x:-8,y:-(v+3)/2,width:16,height:v+3,rx:3,opacity:0,onPointerDown:C,onPointerMove:y,onPointerUp:j,style:{cursor:"move"}})]}),a.jsx("g",{textAnchor:ae,className:"rmp-name-outline",strokeWidth:"1",children:h?a.jsx("g",{transform:"translate(".concat(q,", ").concat(se,")"),textAnchor:"middle",children:a.jsx(_t,{text:m[0].split("\n"),fontSize:U,lineWidth:U,grow:"bidirectional",className:"rmp-name__jreast_ja",fill:"black",fontWeight:p!=="default"?"bold":"normal"})}):a.jsx("g",{transform:"translate(".concat(S,", ").concat(X,")"),textAnchor:ae,children:a.jsx(I,{text:m[0].split("\n"),fontSize:U,lineHeight:U,grow:l==="top"||g==="up"?"up":"down",className:"rmp-name__jreast_ja",fill:"black",fontWeight:p!=="default"?"bold":"normal"})})})]})},Ie={names:["日本橋"],nameOffsetX:"right",nameOffsetY:"middle",mereOffset:"none",textVertical:!1,interchanges:[{lineCode:"G",stationCode:"11",color:[B.Tokyo,"g","#f9a328",W.white]},{lineCode:"T",stationCode:"10",color:[B.Tokyo,"t","#00a4db",W.white]},{lineCode:"A",stationCode:"13",color:[B.Tokyo,"a","#dd4231",W.white]}],align:"horizontal",importance:"default"},ca={lineCode:"",stationCode:"",color:[B.Tokyo,"","#AAAAAA",W.white]},ki=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,n=it(),{paletteAppClip:{output:d}}=lt(p=>p.runtime),{t:i}=D(),f=[{type:"textarea",label:i("panel.details.stations.common.nameJa"),value:e.names[0],onChange:p=>{e.names[0]=p.toString(),o(t,e)},minW:"full"},{type:"select",label:i("panel.details.stations.tokyoMetroBasic.nameOffset"),value:e.nameOffsetX!=="middle"?e.nameOffsetX:e.nameOffsetY,options:{left:i("panel.details.stations.common.left"),right:i("panel.details.stations.common.right"),top:i("panel.details.stations.common.top"),bottom:i("panel.details.stations.common.bottom")},onChange:p=>{p==="left"||p==="right"?(e.nameOffsetX=p,e.nameOffsetY="middle",e.textVertical=!1,(e.mereOffset==="left1"||e.mereOffset==="left2"||e.mereOffset==="right1"||e.mereOffset==="right2")&&(e.mereOffset="none")):(e.nameOffsetX="middle",e.nameOffsetY=p,(e.mereOffset==="up"||e.mereOffset==="down")&&(e.mereOffset="none")),o(t,e)},minW:"full"},{type:"select",label:i("panel.details.stations.tokyoMetroInt.mereOffset.displayName"),value:e.mereOffset,options:{none:i("panel.details.stations.tokyoMetroInt.mereOffset.none"),...e.nameOffsetX==="middle"?{left1:i("panel.details.stations.tokyoMetroInt.mereOffset.left1"),left2:i("panel.details.stations.tokyoMetroInt.mereOffset.left2"),right1:i("panel.details.stations.tokyoMetroInt.mereOffset.right1"),right2:i("panel.details.stations.tokyoMetroInt.mereOffset.right2")}:{up:i("panel.details.stations.tokyoMetroInt.mereOffset.up"),down:i("panel.details.stations.tokyoMetroInt.mereOffset.down")}},onChange:p=>{e.mereOffset=p,o(t,e)},minW:"full"},{type:"switch",label:i("panel.details.stations.tokyoMetroBasic.textVertical"),isChecked:e.textVertical,isDisabled:e.nameOffsetX!=="middle",onChange:p=>{e.textVertical=p,o(t,e)},oneLine:!0,minW:"full"},{type:"select",label:i("panel.details.stations.tokyoMetroInt.importance.displayName"),value:e.importance,options:{default:i("panel.details.stations.tokyoMetroInt.importance.default"),middle:i("panel.details.stations.tokyoMetroInt.importance.middle"),high:i("panel.details.stations.tokyoMetroInt.importance.high")},onChange:p=>{e.importance=p,o(t,e)},minW:"full"},{type:"select",label:i("panel.details.stations.tokyoMetroInt.align.displayName"),value:e.align,options:{horizontal:i("panel.details.stations.tokyoMetroInt.align.horizontal"),vertical:i("panel.details.stations.tokyoMetroInt.align.vertical")},onChange:p=>{e.align=p,o(t,e)},minW:"full"}],[m,r]=x.useState(void 0);x.useEffect(()=>{m!==void 0&&d&&(e.interchanges[m].color=d,o(t,e),r(void 0))},[d==null?void 0:d.toString()]);const l=p=>{const g=structuredClone(e.interchanges);g.push(ca);for(let C=g.length-1;C>p;C--)g[C]=structuredClone(g[C-1]);g[p]=ca,o(t,{...e,interchanges:g})},h=p=>{const g=e.interchanges.filter((C,y)=>y!==p);o(t,{...e,interchanges:g})},u=(p,g)=>{e.interchanges[g].lineCode=p,o(t,e)},c=(p,g)=>{e.interchanges[g].stationCode=p,o(t,e)};return a.jsxs(a.Fragment,{children:[a.jsx(L,{fields:f}),a.jsx(ue,{label:i("panel.details.stations.interchange.title"),children:a.jsxs(et,{align:"flex-start",children:[e.interchanges.map((p,g)=>a.jsxs(Ke,{children:[a.jsx(Ht,{theme:p.color,onClick:()=>{r(g),n(Ut(p.color))}}),a.jsx(ue,{label:i("panel.details.stations.common.lineCode"),children:a.jsx(Bn,{defaultValue:p.lineCode,onDebouncedChange:C=>u(C,g)})}),a.jsx(ue,{label:i("panel.details.stations.common.stationCode"),children:a.jsx(Bn,{defaultValue:p.stationCode,onDebouncedChange:C=>c(C,g)})}),a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":i("panel.details.stations.interchange.add"),icon:a.jsx(De,{}),onClick:()=>l(g)}),a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":i("panel.details.stations.interchange.add"),icon:a.jsx(vt,{}),onClick:()=>h(g),isDisabled:e.interchanges.length===1})]},g)),a.jsx(ye,{size:"sm",width:"100%",variant:"outline",leftIcon:a.jsx(De,{}),onClick:()=>l(e.interchanges.length),children:i("panel.details.stations.interchange.title")})]})})]})},Mi=a.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[a.jsx("rect",{x:"4",y:"8",rx:"1",width:"6.5",height:"10",stroke:"currentColor",fill:"none"}),a.jsx("rect",{x:"12.5",y:"8",rx:"1",width:"6.5",height:"10",stroke:"currentColor",fill:"none"}),a.jsx("text",{x:"5.5",y:"12.5",fontSize:"4",fill:"currentColor",children:"G"}),a.jsx("text",{x:"5",y:"16.25",fontSize:"4",letterSpacing:"-0.8",fill:"currentColor",children:"16"}),a.jsx("text",{x:"14.25",y:"12.5",fontSize:"4",fill:"currentColor",children:"H"}),a.jsx("text",{x:"13.75",y:"16.25",fontSize:"4",letterSpacing:"-0.8",fill:"currentColor",children:"18"})]}),Ai={component:Ni,icon:Mi,defaultAttrs:Ie,attrsComponent:ki,metadata:{displayName:"panel.details.stations.tokyoMetroInt.displayName",cities:[B.Tokyo],canvas:[V.RailMap],categories:[G.Metro],tags:[]}},J=5,Ba=2*J,zi=.85*Ba,mt={0:{textDx:0,textDy:-9.15,textAnchor:"middle",dominantBaseline:"auto",polarity:-1,grow:"up"},45:{textDx:(J/2+J*1.33)*Math.SQRT1_2,textDy:-9.15*Math.SQRT1_2,textAnchor:"start",dominantBaseline:"auto",polarity:-1,grow:"up"},90:{textDx:J/2+J*1.33,textDy:0,textAnchor:"start",dominantBaseline:"middle",polarity:0,grow:"bidirectional"},135:{textDx:(J/2+J*1.33)*Math.SQRT1_2,textDy:(J/2+J*1.33)*Math.SQRT1_2,textAnchor:"start",dominantBaseline:"hanging",polarity:1,grow:"down"},180:{textDx:0,textDy:J/2+J*1.33,textAnchor:"middle",dominantBaseline:"hanging",polarity:1,grow:"down"},225:{textDx:-9.15*Math.SQRT1_2,textDy:(J/2+J*1.33)*Math.SQRT1_2,textAnchor:"end",dominantBaseline:"hanging",polarity:1,grow:"down"},270:{textDx:-9.15,textDy:0,textAnchor:"end",dominantBaseline:"middle",polarity:0,grow:"bidirectional"},315:{textDx:-9.15*Math.SQRT1_2,textDy:-9.15*Math.SQRT1_2,textAnchor:"end",dominantBaseline:"auto",polarity:-1,grow:"up"}},Mn=[B.London,"central","#DC241F",W.white,0],Ia=x.memo(s=>{const{id:t,stepFreeAccess:e,...o}=s;return a.jsxs("g",{...o,children:[a.jsx("path",{fill:e==="train"?"#1C3E93":"white",stroke:"#1C3E93",strokeWidth:.5*J,d:"M0-31c17.1,0,31,13.9,31,31S17.1,31,0,31S-31,17.1-31,0S-17.1-31,0-31"}),a.jsx("path",{fill:e==="train"?"white":"#1C3E93",d:"M-10.5,9c1.4,4.9,6,8.4,11.3,8.4c6.5,0,11.8-5.3,11.8-11.8c0-3.4-1.5-6.5-3.8-8.7l0.7-5.1\n c4.6,2.9,7.6,8,7.6,13.8c0,9-7.3,16.3-16.3,16.3c-5.9,0-11-3.1-13.9-7.7L-10.5,9z"}),a.jsx("path",{fill:s.stepFreeAccess==="train"?"white":"#1C3E93",d:"M0.5-20.5c0,2.5,2,4.6,4.6,4.6c2.5,0,4.6-2.1,4.6-4.6s-2.1-4.6-4.6-4.6S0.5-23,0.5-20.5"}),a.jsx("path",{fill:e==="train"?"white":"#1C3E93",d:"M3-12.4L2.5-9.2h-9.9c0,0-2.1,0.2-2.1,2.2s2.1,2.2,2.1,2.2h9.3l-0.5,3h-12.5c0,0-0.9,0-1.3,0.5\n C-12.8-1-13.2,0-13.2,0l-7,14.2c0,0-0.8,1.8,1.2,2.9c2,1.1,3.3-1,3.3-1l5.5-11.3c0,0,0.5-0.7,1-1c0.6-0.3,1.1-0.3,1.1-0.3H3.4\n c0,0,1.2,0,2.2-0.9c0.9-0.9,1.1-2,1.1-2l1.7-12.4c0,0,0-2.6-2.7-2.7C3.6-14.5,3-12.4,3-12.4"}),a.jsx("path",{id:"stn_core_".concat(t),fill:e==="train"?"#1C3E93":"white",fillOpacity:"0",stroke:"#1C3E93",strokeWidth:.5*J,strokeOpacity:"0",d:"M0-31c17.1,0,31,13.9,31,31S17.1,31,0,31S-31,17.1-31,0S-17.1-31,0-31",className:"removeMe"})]})},(s,t)=>JSON.stringify(s)===JSON.stringify(t)),Bi=s=>{var w;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,transfer:r=Je.transfer,rotate:l=Je.rotate,terminal:h=Je.terminal,stepFreeAccess:u=Je.stepFreeAccess}=(w=n[k.LondonTubeBasic])!=null?w:Je,c=x.useCallback(v=>d(t,v),[t,d]),p=x.useCallback(v=>i(t,v),[t,i]),g=x.useCallback(v=>f(t,v),[t,f]),C=(l-90)*Math.PI/180,y=h?2*(.66*J+J/2):.66*J+.5,j=mt[l].textDx+Math.cos(C)*Math.max(...r[0].map(v=>v[4]))*J,b=mt[l].textDy+Math.sin(C)*Math.max(...r[0].map(v=>v[4]))*J,_=-((Math.max(...r[0].map(v=>v[4]))+Math.min(...r[0].map(v=>v[4])))/2)*J,O=Math.sin(l*Math.PI/180)*_,N=Math.cos(l*Math.PI/180)*_;return a.jsxs("g",{id:t,children:[a.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(l,")"),onPointerDown:c,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:u==="none"?r[0].map(v=>a.jsx("rect",{id:"stn_core_".concat(t),x:-5*.66/2,y:-5*.66-J/2-J*v[4],width:J*.66,height:y,stroke:"none",fill:v[2]},"".concat(t,"_").concat(v[2],"_").concat(v[4]))):a.jsx(Ia,{id:t,stepFreeAccess:u,transform:"translate(".concat(O,",").concat(N,")rotate(").concat(-l,")scale(0.2333)")},"stn_core_".concat(t))}),a.jsx("g",{transform:"translate(".concat(e+j,", ").concat(o+b,")"),textAnchor:mt[l].textAnchor,fill:"#003888",children:a.jsx(I,{text:m[0].split("\n"),fontSize:Ba,lineHeight:zi,dominantBaseline:mt[l].dominantBaseline,grow:mt[l].grow,baseOffset:0,className:"rmp-name__tube"})})]})},Je={names:["Station"],transfer:[[Mn]],rotate:0,terminal:!1,stepFreeAccess:"none"},Ii=s=>{var l;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[0],onChange:h=>{e.names[0]=h.toString(),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:h=>{e.rotate=Number(h),o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.londonTubeBasic.terminal"),isChecked:e.terminal,isDisabled:e.transfer[0].length>1,onChange:h=>{e.terminal=h,o(t,e)},oneLine:!0,minW:"full"},{type:"select",label:n("panel.details.stations.londonTubeCommon.stepFreeAccess"),value:e.stepFreeAccess,options:{none:n("panel.details.stations.londonTubeCommon.stepFreeAccessNone"),train:n("panel.details.stations.londonTubeCommon.stepFreeAccessTrain"),platform:n("panel.details.stations.londonTubeCommon.stepFreeAccessPlatform")},onChange:h=>{e.stepFreeAccess=h,o(t,e)},minW:"full"}],i=(l=e.transfer)!=null?l:Je.transfer,f=h=>u=>{const c=structuredClone(i);if(c.length<=h)for(let p=c.length;p<=h;p++)c[p]=[Mn];c[h].push(u),e.transfer=c,o(t,e)},m=h=>u=>{if(i.length>h&&i[h].length>u){const c=i.map((p,g)=>g===h?p.filter((C,y)=>y!==u):p);e.transfer=c,o(t,e)}},r=h=>(u,c)=>{if(i.length>h&&i[h].length>u){const p=i.map((g,C)=>C===h?g.map((y,j)=>j===u?[0,1,2,3,4,5,6].map(b=>c[b]===void 0?y[b]:c[b]):y):g);e.transfer=p,o(t,e)}};return a.jsxs(a.Fragment,{children:[a.jsx(L,{fields:d}),a.jsx(ue,{label:n("panel.details.stations.interchange.title"),children:a.jsxs(et,{align:"flex-start",children:[a.jsx(Ft,{size:"xs",children:n("panel.details.stations.londonTubeBasic.shareTracks")}),a.jsx($i,{interchangeList:i[0],onAdd:f(0),onDelete:m(0),onUpdate:r(0)})]})})]})},Pi=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),Ti={component:Bi,icon:Pi,defaultAttrs:Je,attrsComponent:Ii,metadata:{displayName:"panel.details.stations.londonTubeBasic.displayName",cities:[B.London],canvas:[V.RailMap],categories:[G.Metro],tags:[]}};function $i(s){const{interchangeList:t,onAdd:e,onDelete:o,onUpdate:n}=s,d=it(),{paletteAppClip:{output:i}}=lt(l=>l.runtime),{t:f}=D(),[m,r]=x.useState();return x.useEffect(()=>{m!==void 0&&i&&(n==null||n(m,[...i,t[m][4]]),r(void 0))},[i==null?void 0:i.toString()]),a.jsxs(jn,{direction:"column",children:[t.length===0&&a.jsxs(Ke,{spacing:.5,"data-testid":"interchange-card-stack",children:[a.jsx(_n,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:f("panel.details.stations.interchange.noTrackShare")}),a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.add"),onClick:()=>e==null?void 0:e(Mn),icon:a.jsx(De,{})})]}),t.map((l,h)=>a.jsxs(Ke,{spacing:.5,"data-testid":"interchange-card-stack-".concat(h),children:[a.jsx(ue,{label:f("color"),minW:"40px",noLabel:h!==0,children:a.jsx(Ht,{theme:[l[0],l[1],l[2],l[3]],onClick:()=>{r(h),d(Ut([l[0],l[1],l[2],l[3]]))}})}),a.jsx(ue,{label:f("panel.details.stations.londonTubeBasic.shareTracksIndex"),children:a.jsx(La,{defaultValue:l[4],min:-5,max:5,step:1,onThrottledChange:u=>n==null?void 0:n(h,[l[0],l[1],l[2],l[3],u])})}),a.jsxs(et,{children:[e&&h===t.length-1?a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.copy"),onClick:()=>{const u=structuredClone(t.slice(-1)[0]);u[4]=Math.max(...t.map(c=>c[4]))+1,e==null||e(u)},icon:a.jsx(On,{})}):a.jsx(wn,{minW:8}),o&&h!==0&&a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.remove"),onClick:()=>o==null?void 0:o(h),icon:a.jsx(vt,{})})]})]},h))]})}const ke=5,Pa=2*ke,Ei=.85*Pa,Ri=s=>{var _;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=gt.nameOffsetX,nameOffsetY:l=gt.nameOffsetY,stepFreeAccess:h=gt.stepFreeAccess}=(_=n[k.LondonTubeInt])!=null?_:gt,u=x.useCallback(O=>d(t,O),[t,d]),c=x.useCallback(O=>i(t,O),[t,i]),p=x.useCallback(O=>f(t,O),[t,f]),g=.66*ke+ke/2,C=r==="left"?-9.15:r==="right"?ke/2+ke*1.33:0,y=l==="top"?-9.15:l==="bottom"?ke/2+ke*1.33:0,j=r==="left"?"end":r==="right"?"start":"middle",b=l==="top"?"auto":l==="bottom"?"hanging":"middle";return a.jsxs("g",{id:t,children:[a.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")"),onPointerDown:u,onPointerMove:c,onPointerUp:p,style:{cursor:"move"},children:h==="none"?a.jsx("circle",{id:"stn_core_".concat(t),r:1.25*ke,width:ke*.66,height:g,stroke:"black",strokeWidth:.5*ke,fill:"white"}):a.jsx(Ia,{id:t,stepFreeAccess:h,transform:"scale(0.2333)"})}),a.jsx("g",{transform:"translate(".concat(e+C,", ").concat(o+y,")"),textAnchor:j,fill:"#003888",children:a.jsx(I,{text:m[0].split("\n"),fontSize:Pa,lineHeight:Ei,dominantBaseline:b,grow:l==="top"?"up":l==="bottom"?"down":"bidirectional",baseOffset:1,className:"rmp-name__tube"})})]})},gt={names:["Station"],nameOffsetX:"right",nameOffsetY:"top",stepFreeAccess:"none"},Wi=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[0],onChange:i=>{e.names[0]=i.toString(),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.londonTubeCommon.stepFreeAccess"),value:e.stepFreeAccess,options:{none:n("panel.details.stations.londonTubeCommon.stepFreeAccessNone"),train:n("panel.details.stations.londonTubeCommon.stepFreeAccessTrain"),platform:n("panel.details.stations.londonTubeCommon.stepFreeAccessPlatform")},onChange:i=>{e.stepFreeAccess=i,o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},Di=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",strokeWidth:"2.5",fill:"white"})}),Xi={component:Ri,icon:Di,defaultAttrs:gt,attrsComponent:Wi,metadata:{displayName:"panel.details.stations.londonTubeInt.displayName",cities:[B.London],canvas:[V.RailMap],categories:[G.Metro],tags:[]}},We=5,Ta=2*We,Li=.85*Ta,$a="M-18.2,12.6c2.4-0.6,5.8-1.6,11.5-0.4c2.9,0.6,5.6,1.3,8.3,1.3c3.5,0,5.4-0.6,8.1-1.2c2.4-0.6,5.2-1.2,7.4-1.1c3.8,0.1,6.6,0.7,8.2,1.4l-1.2-3.1C21,8.3,15.8,7.7,9.7,9.5c-2.6,0.7-5.2,1.3-7.9,1.2c-2.5,0-4.8-0.4-7.2-1C-13,8-15.9,9.3-19.8,10.3L-18.2,12.6z",Ea="M23.8-2h-4.1l-1.8-4.8c0,0-0.1-0.6-1-1.3c-0.6-0.5-1.6-0.5-1.6-0.5H4v-2h-6.9l-1.1-1.5l0.8-1.9h-1.9l-1.5,3.5h-2.6v2h-5.8c0,0-0.8,0.1-1.2,0.3c-0.4,0.3-0.6,0.5-0.6,0.5l-4.4,5.8h-7.3l7.3,10c1.6-0.7,6.6-2,9.7-1.9c4.1,0.1,9.5,1.9,13.1,1.9c6.6,0,8.8-2,14.6-2.3c7.1-0.4,11.6,2.3,11.6,2.3L23.8-2z M-11.1-2h-7.1l1.9-2.5c0,0,0.8-1.1,1.2-1.3c0.7-0.4,1.2-0.5,1.2-0.5h2.8V-2z M-9.2-2v-4.3h7.4v4.4L-9.2-2z M7.4-2H0v-4.3h7.4V-2z M9.3-2v-4.3h5.1c0,0,0.4,0,0.8,0.4c0.3,0.2,0.5,0.7,0.5,0.7l1.2,3.3L9.3-2z",Yi=s=>{var j;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Rt.nameOffsetX,nameOffsetY:l=Rt.nameOffsetY}=(j=n[k.LondonRiverServicesInt])!=null?j:Rt,h=x.useCallback(b=>d(t,b),[t,d]),u=x.useCallback(b=>i(t,b),[t,i]),c=x.useCallback(b=>f(t,b),[t,f]),p=r==="left"?-9.15:r==="right"?We/2+We*1.33:0,g=l==="top"?-9.15:l==="bottom"?We/2+We*1.33:0,C=r==="left"?"end":r==="right"?"start":"middle",y=l==="top"?"auto":l==="bottom"?"hanging":"middle";return a.jsxs("g",{id:t,children:[a.jsxs("g",{transform:"translate(".concat(e,", ").concat(o,")"),onPointerDown:h,onPointerMove:u,onPointerUp:c,style:{cursor:"move"},children:[a.jsx("circle",{r:1.45*We,stroke:"#003888",strokeWidth:.1*We,fill:"white"}),a.jsxs("g",{fill:"#003888",transform:"scale(0.222)",children:[a.jsx("path",{d:$a}),a.jsx("path",{d:Ea})]}),a.jsx("circle",{id:"stn_core_".concat(t),r:1.5*We,fill:"white",fillOpacity:"0",className:"removeMe"})]}),a.jsx("g",{transform:"translate(".concat(e+p,", ").concat(o+g,")"),textAnchor:C,fill:"#003888",children:a.jsx(I,{text:m[0].split("\n"),fontSize:Ta,lineHeight:Li,dominantBaseline:y,grow:l==="top"?"up":l==="bottom"?"down":"bidirectional",baseOffset:1,className:"rmp-name__tube"})})]})},Rt={names:["Station"],nameOffsetX:"right",nameOffsetY:"top"},Hi=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[0],onChange:i=>{e.names[0]=i.toString(),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},Ui=a.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[a.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"white"}),a.jsxs("g",{transform:"translate(12, 12)scale(0.18)",children:[a.jsx("path",{stroke:"currentColor",d:$a}),a.jsx("path",{stroke:"currentColor",d:Ea})]})]}),Fi={component:Yi,icon:Ui,defaultAttrs:Rt,attrsComponent:Hi,metadata:{displayName:"panel.details.stations.londonRiverServicesInt.displayName",cities:[B.London],canvas:[V.RailMap],categories:[G.Metro],tags:[]}},Vi=s=>{var j;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=xt.nameOffsetX,nameOffsetY:l=xt.nameOffsetY,interchange:h=xt.interchange}=(j=n[k.GuangdongIntercityRailway])!=null?j:xt,u=x.useCallback(b=>d(t,b),[t,d]),c=x.useCallback(b=>i(t,b),[t,i]),p=x.useCallback(b=>f(t,b),[t,f]),g=r==="left"?-13.33:r==="right"?13.33:0,C=(m[ee[l].namesPos].split("\n").length*st[l].lineHeight+st[l].offset)*ee[l].polarity,y=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("circle",{r:5,stroke:"#2559a8",strokeWidth:"1.5",fill:"white"}),h&&a.jsx("circle",{r:2.5,stroke:"#2559a8",strokeWidth:"1",fill:"white"}),a.jsx("circle",{id:"stn_core_".concat(t),r:5+1.33/2,fill:"white",fillOpacity:"0",onPointerDown:u,onPointerMove:c,onPointerUp:p,style:{cursor:"move"},className:"removeMe"}),a.jsxs("g",{transform:"translate(".concat(g,", ").concat(C,")"),textAnchor:y,className:"rmp-name-outline",strokeWidth:"1",children:[a.jsx(I,{text:m[0].split("\n"),fontSize:13.13,lineHeight:13.13,grow:"up",baseOffset:1,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),dx:r==="right"?1.67:0,fontSize:5.83,lineHeight:5.83,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...m,r,l,h,u,c,p])},xt={...T,nameOffsetX:"right",nameOffsetY:"top",interchange:!1},Gi=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i.toString(),o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i.toString(),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.interchange.title"),oneLine:!0,isChecked:e.interchange,onChange:i=>{e.interchange=i,o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},Zi=a.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[a.jsx("circle",{cx:"12",cy:"12",r:"8",stroke:"currentColor",strokeWidth:"2.25",fill:"white"}),a.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"1.5",fill:"white"})]}),qi={component:Vi,icon:Zi,defaultAttrs:xt,attrsComponent:Gi,metadata:{displayName:"panel.details.stations.guangdongIntercityRailway.displayName",cities:[B.Shanghai],canvas:[V.RailMap],categories:[G.Metro],tags:[]}},gl={[k.ShmetroBasic]:Cs,[k.ShmetroBasic2020]:Os,[k.ShmetroInt]:Ss,[k.ShmetroOutOfSystemInt]:As,[k.ShanghaiSuburbanRailway]:Ps,[k.GzmtrBasic]:lo,[k.GzmtrInt]:fo,[k.GzmtrInt2024]:Co,[k.BjsubwayBasic]:vo,[k.BjsubwayInt]:ko,[k.MTR]:$o,[k.SuzhouRTBasic]:Do,[k.SuzhouRTInt]:Ho,[k.KunmingRTBasic]:Go,[k.KunmingRTInt]:Jo,[k.MRTBasic]:ni,[k.MRTInt]:ii,[k.JREastBasic]:di,[k.JREastImportant]:ui,[k.FoshanMetroBasic]:Ci,[k.QingdaoMetroStation]:Oi,[k.TokyoMetroBasic]:Si,[k.TokyoMetroInt]:Ai,[k.LondonTubeBasic]:Ti,[k.LondonTubeInt]:Xi,[k.LondonRiverServicesInt]:Fi,[k.GuangdongIntercityRailway]:qi},Qi="RMP_MASTER_CHANNEL",Ji="MASTER_POST",da=new BroadcastChannel(Qi),ft={id:"null",value:"",param:null,bg:"#000000",fg:W.white},Ki={h:"80%",w:"80%","& iframe":{h:"100%",w:"100%"},"& div":{h:"100%",w:"100%"}},el=s=>{const{isOpen:t,onClose:e,onSubmit:o}=s,{t:n}=D(),d=x.useRef(window.graph),i=Qa(),[f,m]=x.useState([]),[r,l]=x.useState(ft),[h,u]=x.useState(""),[c,p]=x.useState(!1),[g,C]=x.useState(!1);x.useEffect(()=>{t&&(u(""),l(ft),p(!1),m(ja(d.current).filter(S=>S.randomId).map(S=>{var z,P,Y;return{id:S.randomId,value:(z=S.label)!=null?z:S.randomId,param:S,bg:(P=S.labelColorBg)!=null?P:ft.bg,fg:(Y=S.labelColorFg)!=null?Y:ft.fg}})))},[t]);const y=S=>{var z,P,Y,U,q;try{const X=(z=r.param)!=null?z:JSON.parse(S),se=X.id?X.id:X.randomId,ae=(P=X.labelColorBg)!=null?P:Ua(),ie={randomId:se,label:(Y=X.label)!=null?Y:se,labelColorBg:ae,labelColorFg:Fa(ae),nodeType:(U=X.nodeType)!=null?U:X.type,transform:(q=X.transform)!=null?q:Va,svgs:X.svgs,components:X.components,color:X.color,core:X.core,version:X.version};if(!ie.version||ie.version<2){i({title:"Outdated configuration!",status:"error",duration:9e3,isClosable:!0});return}o(ie)}catch(X){C(!0);return}e()},j=x.useRef(t),[b,_]=x.useState("DESIGNER"),[O,N]=x.useState(!1);x.useEffect(()=>{j.current=t},[t]),x.useEffect(()=>{const S=z=>{const{event:P,data:Y}=z.data;P===Ji&&j.current&&(N(!1),y(Y))};return da.addEventListener("message",S),()=>{da.removeEventListener("message",S)}},[]);const w=async()=>{_("DESIGNER"),N(!0)},v=()=>{_("GALLERY"),N(!0)},A=S=>{C(!1),u(S.target.value),l(ft)},M=S=>{l(S),p(!1),u("")};return a.jsxs(a.Fragment,{children:[a.jsxs(fa,{isOpen:t,onClose:e,size:"sm",scrollBehavior:"inside",children:[a.jsx(ha,{}),a.jsxs(ua,{children:[a.jsx(pa,{children:n("header.settings.procedures.masterManager.importTitle")}),a.jsx(ga,{}),a.jsxs(xa,{children:[a.jsx(ue,{label:n("header.settings.procedures.masterManager.importFrom"),children:a.jsx(Ya,{data:f,displayHandler:S=>a.jsx(nn,{name:S.value,fg:S.fg,bg:S.bg,title:S.value,sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}}),filter:(S,z)=>z.id.toLowerCase().includes(S.toLowerCase())||Object.values(z.id).some(P=>P.toLowerCase().includes(S.toLowerCase())),value:r.value,onChange:M})}),a.jsxs(ue,{label:n("header.settings.procedures.masterManager.importOther"),children:[a.jsxs(Wt,{direction:"row",width:"100%",children:[a.jsx(ye,{m:1,width:"100%",onClick:w,children:n("RMP Designer")}),a.jsx(ye,{m:1,width:"100%",onClick:v,children:n("RMP Gallery")})]}),a.jsx(ye,{m:1,onClick:()=>p(!0),children:n("header.settings.procedures.masterManager.importParam")}),a.jsx(Ja,{width:"100%",placeholder:"qwq",fontSize:"sm",fontFamily:"monospace",hidden:!c,onChange:A,isInvalid:g})]})]}),a.jsxs(Ca,{children:[a.jsx(ye,{colorScheme:"blue",variant:"outline",mr:"1",onClick:e,children:n("cancel")}),a.jsx(ye,{colorScheme:"blue",variant:"solid",mr:"1",onClick:()=>y(h),isDisabled:r.id==="null"&&h==="",children:n("apply")})]})]})]}),a.jsx(tl,{isOpen:O,onClose:()=>N(!1),source:b})]})},tl=s=>{const{isOpen:t,onClose:e,source:o}=s,n=o==="DESIGNER"?"/rmp-designer/#/export":"/rmp-gallery/?tabId=2&master=true";return a.jsxs(Ha,{isOpen:t,onClose:e,size:"full",sx:Ki,children:[a.jsx("iframe",{src:n,loading:"lazy"}),a.jsx(Ka,{onClick:e,position:"fixed",top:"5px",right:"15px"})]})},xl=s=>{const{isOpen:t,onClose:e}=s,{t:o}=D(),{refresh:{nodes:n}}=lt(C=>C.runtime),d=x.useRef(window.graph),i=it(),[f,m]=x.useState([]);x.useEffect(()=>{t&&m(ja(d.current))},[t,n]);const[r,l]=x.useState(void 0),h=C=>{d.current.filterNodes(y=>d.current.getNodeAttribute(y,"type")===K.Master&&d.current.getNodeAttributes(y)[K.Master].randomId===r).forEach(y=>{const j=structuredClone(C),b=d.current.getNodeAttributes(y),_=structuredClone(b[K.Master]),O=N=>{_.components.forEach(w=>{var v;if(w.id===N)return(v=w.value)!=null?v:w.defaultValue})};j.components.forEach((N,w)=>{var v;j.components[w].value=(v=O(N.id))!=null?v:N.defaultValue}),j.color!==void 0&&(j.color.value=_.color?j.color.value:j.color.defaultValue),d.current.mergeNodeAttributes(y,{[K.Master]:j})}),i(Ct()),i(yt(d.current.export()))},u=C=>{const y={id:C.randomId,type:C.nodeType,label:C.label,svgs:C.svgs,components:C.components,color:C.color,core:C.core,transform:C.transform,version:C.version};y.components.forEach((j,b)=>{y.components[b].value=j.defaultValue}),ds("RMP_Master_Node_".concat(new Date().valueOf(),".json"),"application/json",JSON.stringify(y))},c=C=>{d.current.filterNodes(y=>d.current.getNodeAttribute(y,"type")===K.Master&&d.current.getNodeAttributes(y)[K.Master].randomId===C).forEach(y=>{d.current.dropNode(y)}),i(Ct()),i(yt(d.current.export()))},p=(C,y)=>{d.current.filterNodes(j=>d.current.getNodeAttribute(j,"type")===K.Master&&d.current.getNodeAttributes(j)[K.Master].randomId===C.randomId).forEach(j=>{d.current.mergeNodeAttributes(j,{[K.Master]:{...C,label:y}})}),i(Ct()),i(yt(d.current.export()))},g=f.map(C=>{var j,b,_,O,N;const y=[{label:o("header.settings.procedures.masterManager.id"),type:"custom",component:a.jsx(nn,{name:(j=C.randomId)!=null?j:"undefined",fg:(b=C.labelColorFg)!=null?b:W.white,bg:(_=C.labelColorBg)!=null?_:"#000000"})},{label:o("header.settings.procedures.masterManager.label"),type:"input",value:(O=C.label)!=null?O:o("panel.details.nodes.master.undefined"),onChange:w=>p(C,w),hidden:!C.randomId},{label:o("header.settings.procedures.masterManager.label"),type:"output",value:(N=C.label)!=null?N:o("panel.details.nodes.master.undefined"),hidden:!!C.randomId},{label:o("header.settings.procedures.masterManager.type"),type:"custom",component:a.jsx(nn,{name:o("header.settings.procedures.masterManager.types.".concat(C.nodeType)),fg:W.white,bg:C.nodeType==="MiscNode"?"#FF8651":"#51BC00"})}];return a.jsxs(Wt,{width:"100%",direction:"row",children:[a.jsx(L,{fields:y,minW:"120px"}),a.jsxs(Wt,{direction:"row",mr:"auto",children:[a.jsx(ye,{onClick:()=>l(C.randomId),children:a.jsx(Ga,{})}),a.jsx(ye,{onClick:()=>u(C),isDisabled:!C.randomId,children:a.jsx(Za,{})}),a.jsx(ye,{onClick:()=>c(C.randomId),children:a.jsx(vt,{})})]})]})});return a.jsxs(fa,{isOpen:t,onClose:e,size:"xl",scrollBehavior:"inside",children:[a.jsx(ha,{}),a.jsxs(ua,{children:[a.jsx(pa,{children:o("header.settings.procedures.masterManager.title")}),a.jsx(ga,{}),a.jsxs(xa,{width:"100%",children:[...g,a.jsx(el,{isOpen:!!r,onClose:()=>l(void 0),onSubmit:h})]}),a.jsx(Ca,{children:a.jsx(ye,{colorScheme:"blue",variant:"outline",mr:"1",onClick:e,children:o("close")})})]})]})};export{Pt as F,ul as L,xl as M,pl as S,ms as a,cl as b,rl as c,ds as d,dl as e,rs as f,I as g,oe as h,il as i,hl as j,el as k,as as l,ml as m,ol as n,gl as s,ll as t,fl as u}; diff --git a/assets/master-manager-DW7JCfNm.js b/assets/master-manager-DW7JCfNm.js new file mode 100644 index 00000000..6cf88eeb --- /dev/null +++ b/assets/master-manager-DW7JCfNm.js @@ -0,0 +1 @@ +import{u as D,b as x,a as $}from"./react-0YWW4C_I.js";import{i as L,S as k,aB as K,r as ma,C as B,M as W,aS as Ee,L as Ra,e as Wa,aU as Da,aV as V,aW as G,aX as T,c as it,d as lt,aY as jn,aZ as De,P as ue,V as Ht,W as Ut,a_ as On,a$ as vt,b0 as Xa,aR as vn,q as Ct,v as yt,b1 as Bn,b2 as La,Q as Ya,R as nn,b3 as Ha,aT as Ua,b4 as Fa,w as Va,D as Ga,a as Za}from"./index-CsgTWcmq.js";import{j as a,av as Ke,N as _n,a2 as Ne,ak as et,B as wn,_ as Ft,t as ye,Q as qa,h as Wt,aN as In,aO as Pn,aw as Qa,ag as fa,M as ha,ah as ua,J as pa,K as ga,L as xa,v as Ja,O as Ca,a8 as Ka}from"./chakra-BF_mGyXb.js";var ya=(s=>(s.Airport="airport",s.Airport2024="airport_2024",s.Maglev="maglev",s.Disney="disney",s.Railway="railway",s.Railway2024="railway_2024",s.HSR="hsr",s.AirportHK="airport_hk",s.DisneyHK="disney_hk",s.NgongPing360="ngong_ping_360",s.Tiananmen="tiananmen",s.AirportBJ="airport_bj",s.BusTerminalSuzhou="bus_terminal_suzhou",s.RailwaySuzhou="railway_suzhou",s.BusInterchange="bus_interchange",s.AirportSG="airport_sg",s.CruiseCentre="cruise_centre",s.SentosaExpress="sentosa_express",s.CableCar="cable_car",s.Merlion="merlion",s.MarinaBaySands="marina_bay_sands",s.GardensByTheBay="gardens_by_the_bay",s.SingaporeFlyer="singapore_flyer",s.Esplanade="esplanade",s.AirportQingdao="airport_qingdao",s.CoachStationQingdao="coach_station_qingdao",s.CruiseTerminalQingdao="cruise_terminal_qingdao",s.RailwayQingdao="railway_qingdao",s.TramQingdao="tram_qingdao",s.AirportGuangzhou="airport_guangzhou",s.RailwayGuangzhou="railway_guangzhou",s.IntercityGuangzhou="intercity_guangzhou",s.RiverCraftLondon="river_craft",s.AirportLondon="airport_london",s.CoachStationLondon="coach_station_london",s))(ya||{});const es=s=>{const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{type:m=an.type}=n!=null?n:an,r=x.useRef(null),[l,h]=x.useState({width:25,height:25});x.useEffect(()=>h(r.current.getBBox()),[m,h,r]);const u=x.useCallback(g=>d(t,g),[t,d]),c=x.useCallback(g=>i(t,g),[t,i]),p=x.useCallback(g=>f(t,g),[t,f]);return a.jsx("g",{id:t,transform:"translate(".concat(e-l.width/2,", ").concat(o-l.height/2,")"),onPointerDown:u,onPointerMove:c,onPointerUp:p,style:{cursor:"move"},children:a.jsx("image",{ref:r,href:"/rmp/images/facilities/".concat(m,".svg"),onLoad:()=>h(r.current.getBBox())})})},an={type:"airport"},ts=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"select",label:n("panel.details.nodes.facilities.type"),value:e.type,options:{airport:"Airport",airport_2024:"Airport 2024",maglev:"Maglev",disney:"Disney",railway:"Railway",railway_2024:"Railway 2024",hsr:"HSR",airport_hk:"Airport Hongkong",disney_hk:"Disney Hongkong",ngong_ping_360:"Ngong Ping 360",tiananmen:"Tiananmen",airport_bj:"Airport Beijing",bus_terminal_suzhou:"Bus Terminal Suzhou",railway_suzhou:"Railway Suzhou",bus_interchange:"Bus Interchange",airport_sg:"Changi Airport",cruise_centre:"Cruise Centre",sentosa_express:"Sentosa Express",cable_car:"Cable Car",merlion:"Merlion",marina_bay_sands:"Marina Bay Sands",gardens_by_the_bay:"Gardens by the Bay",singapore_flyer:"Singapore Flyer",esplanade:"Esplanade",airport_qingdao:"Airport Qingdao",railway_qingdao:"Railway Qingdao",coach_station_qingdao:"Coach Station Qingdao",cruise_terminal_qingdao:"Cruise Terminal Qingdao",tram_qingdao:"Tram Qingdao",airport_guangzhou:"Airport Guangzhou",railway_guangzhou:"Railway Guangzhou",intercity_guangzhou:"Intercity Guangzhou",river_craft:"River services interchange",airport_london:"Airport London",coach_station_london:"Victoria Coach Station"},onChange:i=>{e.type=i,o(t,e)}}];return a.jsx(L,{fields:d,minW:"full"})},ns=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsxs("g",{transform:"translate(12, 0)scale(0.4)",children:[a.jsx("circle",{cx:"0",cy:"29.33899",r:"29.33899",fill:"currentColor"}),a.jsx("path",{id:"airport",d:"M28.9769,6.60134c1.711.013,3.111,2.53205,3.111,4.241v10.337s17.106,15.435,17.358,15.666a1.145,1.145,0,0,1,.488,1.152v2.833c0,.651-.451.61-.695.467-.334-.119-17.151-8.863-17.151-8.863-.004,1.458-.797,9.006-1.326,13.304,0,0,4.61,2.457,4.699,2.521.334.268.352.359.352.852v2.001c0,.477-.352.428-.51.324-.183-.062-5.693-1.921-5.693-1.921a2.56018,2.56018,0,0,0-.633-.127,2.31654,2.31654,0,0,0-.666.127s-5.477,1.859-5.672,1.921c-.185.104-.523.153-.523-.324v-2.001c0-.493.029-.584.367-.852.086-.064,4.678-2.521,4.678-2.521-.524-4.298-1.307-11.846-1.325-13.304,0,0-16.822,8.744-17.148,8.863-.217.143-.69.184-.69-.467v-2.833a1.16206,1.16206,0,0,1,.473-1.152c.276-.231,17.365-15.666,17.365-15.666v-10.337c0-1.709,1.403-4.228,3.14105-4.241",transform:"translate(-28.9697,0.14347)",fill:"white"})]})}),ol={component:es,icon:ns,defaultAttrs:an,attrsComponent:ts,metadata:{displayName:"panel.details.nodes.facilities.displayName",tags:[]}},il=()=>navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome"),zt={source:'url("./fonts/LTAIdentity-Medium.woff")',descriptors:{display:"swap"}},ct={source:'url("./fonts/Mplus2-Medium.otf")',descriptors:{display:"swap"}},Tn={source:'url("./fonts/Roboto-Bold.ttf")',descriptors:{display:"swap"}},$n={source:'url("./fonts/MontaguSlab.ttf")',descriptors:{display:"swap"}},En={source:'url("./fonts/Railway-PlyE.otf")',descriptors:{display:"swap"}},Pt={[k.MTR]:{className:[".rmp-name__mtr__zh",".rmp-name__mtr__en"],cssFont:{"MyriadPro-Semibold":void 0,"Vegur-Bold":void 0,"GenYoMinTW-SB":void 0},cssName:"fonts_mtr"},[k.MRTBasic]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:zt},cssName:"fonts_mrt"},[k.MRTInt]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:zt},cssName:"fonts_mrt"},[k.JREastBasic]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{"M PLUS 2":ct},cssName:"fonts_jreast"},[k.JREastImportant]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{"M PLUS 2":ct},cssName:"fonts_jreast"},[K.BerlinSBahnLineBadge]:{className:[".rmp-name__berlin"],cssFont:{Roboto:Tn},cssName:"fonts_berlin"},[K.BerlinUBahnLineBadge]:{className:[".rmp-name__berlin"],cssFont:{Roboto:Tn},cssName:"fonts_berlin"},[K.JREastLineBadge]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{'"M PLUS 2"':ct},cssName:"fonts_jreast"},[K.MRTDestinationNumbers]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:zt},cssName:"fonts_mrt"},[K.MRTLineBadge]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:zt},cssName:"fonts_mrt"},[k.TokyoMetroBasic]:{className:[".rmp-name__tokyo_en",".rmp-name__jreast_ja"],cssFont:{MontaguSlab:$n,"M PLUS 2":ct},cssName:"fonts_tokyo"},[k.TokyoMetroInt]:{className:[".rmp-name__tokyo_en",".rmp-name__jreast_ja"],cssFont:{MontaguSlab:$n,"M PLUS 2":ct},cssName:"fonts_tokyo"},[k.LondonTubeBasic]:{className:[".rmp-name__tube"],cssFont:{Railway:En},cssName:"fonts_tube"},[k.LondonTubeInt]:{className:[".rmp-name__tube"],cssFont:{Railway:En},cssName:"fonts_tube"}},Rn=[],as=async s=>{const t=Pt[s];if(!t)return;const{cssFont:e,cssName:o}=t;if(Rn.includes(o))return;Rn.push(o),await Promise.all(Object.entries(e).map(([d,i])=>ma.loadFont(d,i&&{configs:[i]})));const n=document.createElement("link");n.rel="stylesheet",n.id=o,n.href="/rmp/styles/".concat(o,".css"),document.head.append(n)},ss=async(s,t)=>{var d;const e=document.createElement("style");for(let i=document.styleSheets.length-1;i>=0;i=i-1)if((d=document.styleSheets[i].href)!=null&&d.endsWith("styles/".concat(t,".css"))){e.textContent=[...document.styleSheets[i].cssRules].map(f=>f.cssText).filter(f=>!f.startsWith("@font-face")).join("\n");break}e.textContent+="\n";const n=(await Promise.allSettled(Object.keys(s).map(ma.getFontCSS))).filter(i=>i.status==="fulfilled").map(i=>i.value);return e.textContent+=n.join("\n"),e},I=x.forwardRef((s,t)=>{const{text:e,lineHeight:o,grow:n,dominantBaseline:d=n==="up"?"auto":n==="down"?"hanging":"middle",baseOffset:i=2,funcDX:f=l=>0,...m}=s,r=n==="bidirectional"?-((e.length-1)*o)/2:0;return a.jsx("g",{ref:t,children:(n==="up"?[...e].reverse():e).map((l,h,u)=>a.jsx("text",{dy:(h*o+i)*(n==="up"?-1:1)+r,dx:f(h),dominantBaseline:d,...m,children:l},"".concat(l).concat(h)))})});I.displayName="MultilineText";const Wn={zh:16,en:10},ee={top:{namesPos:1,lineHeight:Wn.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:Wn.zh,polarity:1}},ba={zh:k.ShmetroBasic,en:k.ShmetroBasic,mtr__zh:k.MTR,mtr__en:k.MTR,berlin:K.BerlinSBahnLineBadge,mrt:k.MRTBasic,jreast_ja:k.JREastBasic,jreast_en:k.JREastBasic,tokyo_en:k.TokyoMetroBasic,tube:k.LondonTubeBasic},os=s=>{const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{content:m=oe.content,fontSize:r=oe.fontSize,lineHeight:l=oe.lineHeight,textAnchor:h=oe.textAnchor,dominantBaseline:u=oe.dominantBaseline,language:c=oe.language,color:p=oe.color,rotate:g=oe.rotate,italic:C=oe.italic,bold:y=oe.bold}=n!=null?n:oe,j=x.useRef(null),[b,_]=x.useState({x:0,y:0,width:32,height:16});x.useEffect(()=>_(j.current.getBBox()),[m,r,l,h,u,c,g,C,y,_,j]),x.useEffect(()=>{const v=ba[c];v&&as(v)},[c]);const O=x.useCallback(v=>d(t,v),[t,d]),N=x.useCallback(v=>i(t,v),[t,i]),w=x.useCallback(v=>f(t,v),[t,f]);return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(g,")"),onPointerDown:O,onPointerMove:N,onPointerUp:w,style:{cursor:"move"},children:[a.jsx("rect",{className:"removeMe",fill:"gray",fillOpacity:"0.1",x:b.x-1.5,y:b.y-1.5,width:b.width+3,height:b.height+3}),a.jsx(I,{ref:j,text:m.split("\n"),lineHeight:l,grow:"down",className:"rmp-name__".concat(c),fontSize:r,textAnchor:h,dominantBaseline:u,fill:p[2],fontStyle:C,fontWeight:y})]})},oe={content:"Enter your text here",fontSize:16,lineHeight:16,textAnchor:"middle",dominantBaseline:"middle",language:"en",color:[B.Shanghai,"jsr","#000000",W.white],rotate:0,italic:"normal",bold:"normal"},is=s=>{var i,f,m,r,l,h,u;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.nodes.text.content"),value:(i=e.content)!=null?i:oe.content,onChange:c=>{e.content=c.toString(),o(t,e)},minW:"full"},{type:"input",label:n("panel.details.nodes.text.fontSize"),value:((f=e.fontSize)!=null?f:oe.fontSize).toString(),validator:c=>Number.isInteger(c)&&Number(c)>0,onChange:c=>{e.fontSize=Number(c),o(t,e)},minW:"full"},{type:"input",label:n("panel.details.nodes.text.lineHeight"),value:((m=e.lineHeight)!=null?m:oe.lineHeight).toString(),validator:c=>Number.isInteger(c)&&Number(c)>0,onChange:c=>{e.lineHeight=Number(c),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.nodes.text.textAnchor"),value:(r=e.textAnchor)!=null?r:oe.textAnchor,options:{start:n("panel.details.nodes.text.start"),middle:n("panel.details.nodes.text.middle"),end:n("panel.details.nodes.text.end")},onChange:c=>{e.textAnchor=c,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.nodes.text.dominantBaseline"),value:(l=e.dominantBaseline)!=null?l:oe.dominantBaseline,options:{auto:n("panel.details.nodes.text.auto"),middle:n("panel.details.nodes.text.middle"),hanging:n("panel.details.nodes.text.hanging")},onChange:c=>{e.dominantBaseline=c,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.nodes.text.language"),value:(h=e.language)!=null?h:oe.language,options:{zh:n("panel.details.nodes.text.zh"),en:n("panel.details.nodes.text.en"),mtr__zh:n("panel.details.nodes.text.mtr__zh"),mtr__en:n("panel.details.nodes.text.mtr__en"),berlin:n("panel.details.nodes.text.berlin"),mrt:n("panel.details.nodes.text.mrt"),jreast_ja:n("panel.details.nodes.text.jreast_ja"),jreast_en:n("panel.details.nodes.text.jreast_en"),tokyo_en:n("panel.details.nodes.text.tokyo_en"),tube:n("panel.details.nodes.text.tube")},onChange:c=>{e.language=c.toString(),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.nodes.text.rotate"),value:(u=e.rotate)!=null?u:oe.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:c=>{e.rotate=Number(c),o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.nodes.text.italic"),isChecked:e.italic==="italic",onChange:c=>{e.italic=c?"italic":"normal",o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.nodes.text.bold"),isChecked:e.bold==="bold",onChange:c=>{e.bold=c?"bold":"normal",o(t,e)},minW:"full"},{type:"custom",label:n("color"),component:a.jsx(Ee,{type:K.Text,defaultTheme:oe.color})}];return a.jsx(L,{fields:d})},ls=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"middle",fontSize:"10",children:"Text"})}),ll={component:os,icon:ls,defaultAttrs:oe,attrsComponent:is,metadata:{displayName:"panel.details.nodes.text.displayName",tags:[]}},rl=(s,t)=>s.filterEdges((e,o,n,d,i,f,m)=>t.has(n)&&t.has(d)),rs=s=>{const t=Object.fromEntries([...Object.values(k),Object.values(K)].map(e=>[e,!1]));return s.forEachNode(e=>{const o=s.getNodeAttribute(e,"type");t[o]=!0}),t},cs=(s,t,e,o,n,d)=>s<=n&&n<=e&&t<=d&&d<=o,cl=(s,t,e,o,n)=>{const d=t<=o?t:o,i=e<=n?e:n,f=t<=o?o:t,m=e<=n?n:e;return s.filterNodes((r,l)=>cs(d,i,f,m,l.x,l.y))},dl=(s,t,e)=>{const o=[],n=new Set;return t.forEach(d=>{const i=s.getNodeAttributes(d).type,f=s.getNodeAttribute(d,i);if(f.color!==void 0){const m=f.color;n.has(m.toString())||(o.push(m),n.add(m.toString()))}}),e.filter(d=>Ra.includes(s.getEdgeAttribute(d,"style"))).forEach(d=>{const i=s.getEdgeAttributes(d),f=i[i.style].color;n.has(f.toString())||(o.push(f),n.add(f.toString()))}),o},ja=s=>{const t=[],e=new Set;return s.filterNodes(o=>s.getNodeAttribute(o,"type")===K.Master).forEach(o=>{const n=s.getNodeAttributes(o)[K.Master];e.has(n.randomId)||(e.add(n.randomId),t.push(n))}),t},ds=(s,t,e)=>{const o=new Blob([e],{type:t});ms(s,o)},ms=(s,t)=>{const e=window.URL.createObjectURL(t),o=document.createElement("a");o.href=e,o.download=s,document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(e)},ml=async(s,t,e,o)=>{const{xMin:n,yMin:d,xMax:i,yMax:f}=Wa(s),[m,r]=[i-n,f-d],l=document.getElementById("canvas").cloneNode(!0);t||l.appendChild(await us(i-400,f-120)),l.setAttribute("viewBox","".concat(n," ").concat(d," ").concat(m," ").concat(r)),l.setAttribute("width",m.toString()),l.setAttribute("height",r.toString()),Object.entries({".rmp-name-outline":["paint-order","stroke","stroke-linejoin"]}).forEach(([u,c])=>{const p=document.querySelector(u);if(p===null)return;const g=window.getComputedStyle(p);l.querySelectorAll(u).forEach(C=>{if(u===".rmp-name-outline"&&o===1.1){const y=C.insertAdjacentElement("afterend",C.cloneNode(!0));y&&(y.classList.remove(u.slice(1)),y.classList.length===0&&C.removeAttribute("class"),y.removeAttribute("stroke-width"))}c.forEach(y=>{C.setAttribute(y,g.getPropertyValue(y))}),C.classList.remove(u.slice(1)),C.classList.length===0&&C.removeAttribute("class")})}),l.querySelectorAll('[fill="url(#opaque)"]').forEach(u=>{u.remove()}),l.querySelectorAll(".removeMe").forEach(u=>{u.remove()});const h=rs(s);return await fs(l,s,h,e),await hs(l,s,h),{elem:l,width:m,height:r}},fs=async(s,t,e,o)=>{var d;const n=new Set;if(Object.keys(Pt).filter(i=>e[i]).forEach(i=>n.add(i)),t.filterNodes((i,f)=>i.startsWith("misc_node_")&&f.type===K.Text).map(i=>t.getNodeAttribute(i,K.Text).language).map(i=>ba[i]).filter(i=>i!==k.ShmetroBasic).forEach(i=>n.add(i)),o)[".rmp-name__zh",".rmp-name__en"].forEach(i=>{s.querySelectorAll(i).forEach(f=>{f.classList.remove(i.slice(1)),f.classList.length===0&&f.removeAttribute("class")})}),n.forEach(i=>{Pt[i].className.forEach(f=>{s.querySelectorAll(f).forEach(m=>{m.classList.remove(f.slice(1)),m.classList.length===0&&m.removeAttribute("class")})})});else{const i=document.createElement("style");for(let f=0;fm.cssText).join("\n");break}s.prepend(i),await Promise.all([...n.values()].map(f=>Pt[f]).map(async({cssName:f,cssFont:m})=>{try{s.prepend(await ss(m,f))}catch(r){alert("Failed to load fonts. Fonts in the exported PNG will be missing."),console.error(r)}}))}},hs=async(s,t,e)=>{if(e[K.Facilities]){const o=t.filterNodes((f,m)=>m.type===K.Facilities),n=Object.fromEntries(Object.values(ya).map(f=>[f,[]]));o.forEach(f=>{var r;const m=(r=t.getNodeAttribute(f,K.Facilities))==null?void 0:r.type;m&&n[m].push(f)});const d=Object.entries(n).filter(([f,m])=>m.length>0).map(([f,m])=>f),i=await Promise.all((await Promise.all(d.map(async f=>await fetch("/rmp//images/facilities/".concat(f,".svg"))))).map(f=>f.text()));d.forEach((f,m)=>{const r=document.createElement("div");r.innerHTML=i[m];const l=r.querySelector("svg"),h=document.createElementNS("http://www.w3.org/2000/svg","symbol");for(const u of l.attributes)h.setAttribute(u.name,u.value);for(;l.firstChild;)h.appendChild(l.firstChild);l.replaceWith(h),h.id=f,s.appendChild(h),n[f].forEach(u=>{const c=s.querySelector("#".concat(u)),p=c==null?void 0:c.querySelector("image");if(p){c.removeChild(p);const g=document.createElementNS("http://www.w3.org/2000/svg","use");g.setAttribute("href","#".concat(f)),g.setAttribute("height",h.getAttribute("height")),g.setAttribute("width",h.getAttribute("width")),c.appendChild(g)}}),r.remove()})}},us=async(s,t)=>{const e=document.createElementNS("http://www.w3.org/2000/svg","g");e.setAttribute("transform","translate(".concat(s,", ").concat(t,")scale(2)"));const n=await(await fetch("/rmp//logo.svg")).text(),d=document.createElement("div");d.innerHTML=n;const i=d.querySelector("svg"),f=document.createElement("g");f.setAttribute("transform","translate(-60, -25)scale(0.1)"),f.setAttribute("font-family","Arial, sans-serif"),f.innerHTML=i.innerHTML,e.appendChild(f);const m=document.createElementNS("http://www.w3.org/2000/svg","text");m.setAttribute("font-family","Arial, sans-serif"),m.setAttribute("font-size","16");const r=Da.t("Rail Map Painter");m.appendChild(document.createTextNode(r));const l=document.createElementNS("http://www.w3.org/2000/svg","text");l.setAttribute("font-family","Arial, sans-serif"),l.setAttribute("font-size","10"),l.setAttribute("y","10");const h=window.location.origin;let u="https://railmapgen.org/";return h.includes("github")?u="https://railmapgen.github.io/":h.includes("gitlab")&&(u="https://railmapgen.gitlab.io/"),u+="?app=rmp",l.appendChild(document.createTextNode(u)),e.appendChild(f),e.appendChild(m),e.appendChild(l),e},fl=()=>{const[s,t]=$.useState({width:void 0,height:void 0});return $.useEffect(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[]),s};function hl(){const{i18n:s}=D();return t=>{var e,o;return(o=(e=s.languages.map(n=>t[n]).find(n=>n!==void 0))!=null?e:t.en)!=null?o:"(Translation Error)"}}const st={top:{lineHeight:6.67,offset:3.5+1.5+5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:-.17+1+5}},ps=s=>{var y;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Tt.nameOffsetX,nameOffsetY:l=Tt.nameOffsetY}=(y=n[k.ShmetroBasic])!=null?y:Tt,h=x.useCallback(j=>d(t,j),[t,d]),u=x.useCallback(j=>i(t,j),[t,i]),c=x.useCallback(j=>f(t,j),[t,f]),p=r==="left"?-13.33:r==="right"?13.33:0,g=(m[ee[l].namesPos].split("\n").length*st[l].lineHeight+st[l].offset)*ee[l].polarity,C=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("circle",{id:"stn_core_".concat(t),r:5,stroke:"#393332",strokeWidth:"1",fill:"white",onPointerDown:h,onPointerMove:u,onPointerUp:c,style:{cursor:"move"}}),a.jsxs("g",{transform:"translate(".concat(p,", ").concat(g,")"),textAnchor:C,className:"rmp-name-outline",strokeWidth:"1",children:[a.jsx(I,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...m,r,l,h,u,c])},Tt={...T,nameOffsetX:"right",nameOffsetY:"top"},gs=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},xs=a.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:a.jsx("circle",{cx:"12",cy:"12",r:"5",stroke:"currentColor",fill:"none"})}),Cs={component:ps,icon:xs,defaultAttrs:Tt,attrsComponent:gs,metadata:{displayName:"panel.details.stations.shmetroBasic.displayName",cities:[B.Shanghai],canvas:[G.RailMap],categories:[V.Metro],tags:[]}},Ce={0:{textDx:0,textDy:-17.5,textAnchor:"middle",namesPos:1,lineHeight:6.67,polarity:-1},45:{textDx:1,textDy:-16.25,textAnchor:"start",namesPos:1,lineHeight:6.67,polarity:-1},90:{textDx:12,textDy:0,textAnchor:"start",namesPos:0,lineHeight:0,polarity:0},135:{textDx:5,textDy:21,textAnchor:"start",namesPos:0,lineHeight:12.67,polarity:1},180:{textDx:0,textDy:22.5,textAnchor:"middle",namesPos:0,lineHeight:12.67,polarity:1},225:{textDx:-5,textDy:21,textAnchor:"end",namesPos:0,lineHeight:12.67,polarity:1},270:{textDx:-12,textDy:0,textAnchor:"end",namesPos:0,lineHeight:0,polarity:0},315:{textDx:-1,textDy:-16.25,textAnchor:"end",namesPos:1,lineHeight:6.67,polarity:-1}},ys=s=>{var g;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,color:r=bt.color,rotate:l=bt.rotate}=(g=n[k.ShmetroBasic2020])!=null?g:bt,h=Ce[l].textDy+(m[Ce[l].namesPos].split("\n").length-1)*Ce[l].lineHeight*Ce[l].polarity,u=x.useCallback(C=>d(t,C),[t,d]),c=x.useCallback(C=>i(t,C),[t,i]),p=x.useCallback(C=>f(t,C),[t,f]);return x.useMemo(()=>a.jsxs("g",{id:t,children:[a.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(l,")"),children:a.jsx("rect",{id:"stn_core_".concat(t),x:"-2",y:"-7.83",width:"4",height:"7.83",stroke:"none",fill:r[2],onPointerDown:u,onPointerMove:c,onPointerUp:p,style:{cursor:"move"}})}),a.jsxs("g",{transform:"translate(".concat(e+Ce[l].textDx,", ").concat(o+h,")"),textAnchor:Ce[l].textAnchor,className:"rmp-name-outline",strokeWidth:"1",children:[a.jsx(I,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),dx:l>=45&&l<=135?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...m,l,r,u,c,p])},bt={...T,rotate:0,color:[B.Shanghai,"sh1","#E4002B",W.white]},bs=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:i=>{e.rotate=Number(i),o(t,e)},minW:"full"},{type:"custom",label:n("color"),component:a.jsx(Ee,{type:k.ShmetroBasic2020,defaultTheme:bt.color})}];return a.jsx(L,{fields:d})},js=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),Os={component:ys,icon:js,defaultAttrs:bt,attrsComponent:bs,metadata:{displayName:"panel.details.stations.shmetroBasic2020.displayName",cities:[B.Shanghai],canvas:[G.RailMap],categories:[V.Metro],tags:[]}},Dn={top:{lineHeight:6.67,offset:3.5+1.5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:-.17+1}},vs=s=>{var v;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Ge.nameOffsetX,nameOffsetY:l=Ge.nameOffsetY,rotate:h=Ge.rotate,width:u=Ge.width,height:c=Ge.height}=(v=n[k.ShmetroInt])!=null?v:Ge,p=x.useCallback(A=>d(t,A),[t,d]),g=x.useCallback(A=>i(t,A),[t,i]),C=x.useCallback(A=>f(t,A),[t,f]),y=h===0||h===180?u:h===90||h===270?c:u*Math.SQRT1_2,j=h===0||h===180?c:h===90||h===270?u:u*Math.SQRT1_2,b=r==="left"?-6.83:r==="right"?6.83:0,_=(Math.abs(b)+y/2)*Math.sign(b),O=(m[ee[l].namesPos].split("\n").length*Dn[l].lineHeight+Dn[l].offset)*ee[l].polarity,N=(Math.abs(O)+j/2)*Math.sign(O),w=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>a.jsxs("g",{id:t,children:[a.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(h,")"),children:a.jsx("rect",{id:"stn_core_".concat(t),x:-u/2,y:-c/2,height:c,width:u,ry:c/2,stroke:"#393332",strokeWidth:"1",fill:"white",onPointerDown:p,onPointerMove:g,onPointerUp:C,style:{cursor:"move"}})}),a.jsxs("g",{transform:"translate(".concat(e+_,", ").concat(o+N,")"),textAnchor:w,className:"rmp-name-outline",strokeWidth:"1",children:[a.jsx(I,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...m,r,l,h,u,c,p,g,C])},Ge={...T,nameOffsetX:"right",nameOffsetY:"top",rotate:0,height:10,width:13},_s=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.shmetroInt.height"),value:e.height.toString(),validator:i=>Number.isInteger(i),onChange:i=>{e.height=Number(i),o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.shmetroInt.width"),value:e.width.toString(),validator:i=>Number.isInteger(i),onChange:i=>{e.width=Number(i),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:i=>{e.rotate=Number(i),o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},ws=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("rect",{x:"4.5",y:"7",height:"10",width:"15",ry:"5",stroke:"currentColor",fill:"none"})}),Ss={component:vs,icon:ws,defaultAttrs:Ge,attrsComponent:_s,metadata:{displayName:"panel.details.stations.shmetroInt.displayName",cities:[B.Shanghai],canvas:[G.RailMap],categories:[V.Metro],tags:["interchange"]}},Ns=s=>{var y;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=$t.nameOffsetX,nameOffsetY:l=$t.nameOffsetY}=(y=n[k.ShmetroOutOfSystemInt])!=null?y:$t,h=x.useCallback(j=>d(t,j),[t,d]),u=x.useCallback(j=>i(t,j),[t,i]),c=x.useCallback(j=>f(t,j),[t,f]),p=r==="left"?-13.33:r==="right"?13.33:0,g=(m[ee[l].namesPos].split("\n").length*st[l].lineHeight+st[l].offset)*ee[l].polarity,C=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("circle",{r:5,stroke:"#393332",strokeWidth:"1.33",fill:"white"}),a.jsx("circle",{r:2.3,stroke:"#393332",strokeWidth:"1.33",fill:"white"}),a.jsx("circle",{id:"stn_core_".concat(t),r:5+1.33/2,fill:"white",fillOpacity:"0",onPointerDown:h,onPointerMove:u,onPointerUp:c,style:{cursor:"move"},className:"removeMe"}),a.jsxs("g",{transform:"translate(".concat(p,", ").concat(g,")"),textAnchor:C,className:"rmp-name-outline",strokeWidth:"1",children:[a.jsx(I,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...m,r,l,h,u,c])},$t={...T,nameOffsetX:"right",nameOffsetY:"top"},ks=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},Ms=a.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[a.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.67",fill:"white"}),a.jsx("circle",{cx:"12",cy:"12",r:"4.6",stroke:"currentColor",strokeWidth:"2.67",fill:"white"})]}),As={component:Ns,icon:Ms,defaultAttrs:$t,attrsComponent:ks,metadata:{displayName:"panel.details.stations.shmetroOsysi.displayName",cities:[B.Shanghai],canvas:[G.RailMap],categories:[V.Metro],tags:[]}},zs=s=>{var p;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,rotate:r=sn.rotate}=(p=n[k.ShanghaiSuburbanRailway])!=null?p:sn,l=Ce[r].textDy+(m[Ce[r].namesPos].split("\n").length-1)*Ce[r].lineHeight*Ce[r].polarity,h=x.useCallback(g=>d(t,g),[t,d]),u=x.useCallback(g=>i(t,g),[t,i]),c=x.useCallback(g=>f(t,g),[t,f]);return x.useMemo(()=>a.jsxs("g",{id:t,children:[a.jsxs("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(r,")"),children:[a.jsx("rect",{x:"-2",y:"-7.83",width:"4",height:"7.83",stroke:"none",fill:"#898989"}),a.jsx("rect",{x:"-3.5",y:"-1",width:"7",height:"2",stroke:"none",fill:"white"}),a.jsx("rect",{x:-2+1.1675,y:-7.83+1.5,width:4*2/5,height:7.83-1.5,stroke:"none",fill:"white"}),a.jsx("rect",{id:"stn_core_".concat(t),x:"-2",y:"-7.83",width:"4",height:7.83+1.25,stroke:"none",fill:"white",fillOpacity:"0",onPointerDown:h,onPointerMove:u,onPointerUp:c,style:{cursor:"move"},className:"removeMe"})]}),a.jsxs("g",{transform:"translate(".concat(e+Ce[r].textDx,", ").concat(o+l,")"),textAnchor:Ce[r].textAnchor,className:"rmp-name-outline",strokeWidth:"2.5",children:[a.jsx(I,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),dx:r>=45&&r<=135?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...m,r,h,u,c])},sn={...T,rotate:0},Bs=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:i=>{e.rotate=Number(i),o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},Is=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),Ps={component:zs,icon:Is,defaultAttrs:sn,attrsComponent:Bs,metadata:{displayName:"panel.details.stations.shanghaiSuburbanRailway.displayName",cities:[B.Shanghai],canvas:[G.RailMap],categories:[V.Metro],tags:[]}};var Xe=1.3,Oa=1.7,Vt=18.5,Ts=Vt+Xe,Sn=Vt*2+Xe;var Et=45,ze=Et-3,va=function(s,t){var e=[s,t].map(function(o){return o.match(/^(\w+).+$/)});if(e[0]&&e[1]&&e[0][1]===e[1][1])return e[0][1]},Nn=function(s){var t=s.match(/^(\d+)\D+$/);return t==null?void 0:t[1]},on=function(){return on=Object.assign||function(s){for(var t,e=1,o=arguments.length;e0)&&!(n=o.next()).done;)d.push(n.value)}catch(f){i={error:f}}finally{try{n&&!n.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return d},Ws=function(s,t){var e=Nn(s);if(e)return{isDigit:!0,spanningPart:e};var o=va(s,t);return o?{isDigit:!1,spanningPart:o}:{isDigit:!1,spanningPart:""}};function Xn(s){var t=s.zhName,e=s.enName,o=s.foregroundColour,n=s.backgroundColour,d=s.zhClassName,i=s.enClassName,f=s.passed,m=s.children,r=Es(s,["zhName","enName","foregroundColour","backgroundColour","zhClassName","enClassName","passed","children"]),l=Ws(t,e),h=l.isDigit,u=l.spanningPart,c=$.useRef(null),p=Rs($.useState({x:0,height:0,width:0}),2),g=p[0],C=p[1];$.useEffect(function(){c.current&&C(c.current.getBBox())},[t,e]);var y=ze/Math.max(ze,g.width),j=(-g.x-g.width/2)*y,b=g.height*(1-y)/2;return a.jsxs("g",ln({textAnchor:"middle",fill:f?W.white:o},r,{children:[a.jsx(Gt,{fill:f?"#aaa":n}),a.jsx("g",{ref:c,transform:"translate(".concat(j,",").concat(b,")scale(").concat(y,")"),children:a.jsxs("text",{className:d,fontSize:21,x:-1,y:12,textAnchor:"end",dominantBaseline:"central",children:[u,a.jsx("tspan",{className:d,fontSize:10,x:0,dy:-4,textAnchor:"start",dominantBaseline:"central",children:t.slice(u.length).trim()}),a.jsx("tspan",{className:i,fontSize:6.5,letterSpacing:-.1,x:0,dy:10,textAnchor:"start",dominantBaseline:"middle",children:h?e:e.slice(u.length).trim()})]})}),m]}))}var rn=function(){return rn=Object.assign||function(s){for(var t,e=1,o=arguments.length;e0)&&!(n=o.next()).done;)d.push(n.value)}catch(f){i={error:f}}finally{try{n&&!n.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return d};function Xs(s){var t,e=s.zhName,o=s.enName,n=s.foregroundColour,d=s.backgroundColour,i=s.zhClassName,f=s.enClassName,m=s.passed,r=s.children,l=Ds(s,["zhName","enName","foregroundColour","backgroundColour","zhClassName","enClassName","passed","children"]),h=(t=Nn(e))!==null&&t!==void 0?t:"",u=$.useRef(null),c=$.useRef(null),p=Ln($.useState({width:0}),2),g=p[0],C=p[1],y=Ln($.useState({width:0}),2),j=y[0],b=y[1];$.useEffect(function(){u.current&&C(u.current.getBBox()),c.current&&b(c.current.getBBox())},[e,o]);var _=ze/Math.max(ze,g.width),O=ze/Math.max(ze,j.width),N={nameZh:{y:7.3+13.5*(1-_)*_/2},nameEn:{y:19.5-9*(1-O)*O/2}};return a.jsxs("g",rn({textAnchor:"middle",fill:m?W.white:n},l,{children:[a.jsx(Gt,{fill:m?"#aaa":d}),a.jsxs("text",{ref:u,className:i,fontSize:12,transform:"translate(0,".concat(N.nameZh.y,")scale(").concat(_,")"),dominantBaseline:"central",children:[a.jsx("tspan",{fontSize:16,dy:.7,dominantBaseline:"central",children:h}),a.jsx("tspan",{dy:-.7,dominantBaseline:"central",children:e.slice(h.length)})]}),a.jsx("text",{ref:c,className:f,fontSize:8,transform:"translate(0,".concat(N.nameEn.y,")scale(").concat(O,")"),dominantBaseline:"middle",children:o}),r]}))}var cn=function(){return cn=Object.assign||function(s){for(var t,e=1,o=arguments.length;e0)&&!(n=o.next()).done;)d.push(n.value)}catch(f){i={error:f}}finally{try{n&&!n.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return d};function Hs(s){var t=s.zhName,e=s.enName,o=s.foregroundColour,n=s.backgroundColour,d=s.zhClassName,i=s.enClassName,f=s.passed,m=s.children,r=Ls(s,["zhName","enName","foregroundColour","backgroundColour","zhClassName","enClassName","passed","children"]),l=$.useRef(null),h=Ys($.useState({width:0}),2),u=h[0],c=h[1];$.useEffect(function(){l.current&&c(l.current.getBBox())},[t,e]);var p=Math.max(45,u.width+4);return a.jsxs("g",cn({textAnchor:"middle",fill:f?W.white:o},r,{children:[a.jsx(Gt,{customWidth:p,fill:f?"#aaa":n}),a.jsxs("g",{ref:l,children:[a.jsx("text",{className:d,fontSize:8.5,y:8,dominantBaseline:"central",children:t}),a.jsx("text",{className:i,fontSize:5.5,y:18,dominantBaseline:"middle",children:e})]}),m]}))}var dn=function(){return dn=Object.assign||function(s){for(var t,e=1,o=arguments.length;e0)&&!(n=o.next()).done;)d.push(n.value)}catch(f){i={error:f}}finally{try{n&&!n.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return d};function Fs(s){var t=s.zhName,e=s.enName,o=s.foregroundColour,n=s.backgroundColour,d=s.zhClassName,i=s.enClassName,f=s.passed,m=s.children,r=Us(s,["zhName","enName","foregroundColour","backgroundColour","zhClassName","enClassName","passed","children"]),l=$.useRef(null),h=$.useRef(null),u=Yn($.useState({width:0}),2),c=u[0],p=u[1],g=Yn($.useState({width:0}),2),C=g[0],y=g[1];$.useEffect(function(){l.current&&p(l.current.getBBox()),h.current&&y(h.current.getBBox())},[t,e]);var j=ze/Math.max(ze,c.width),b=ze/Math.max(ze,C.width),_={nameZh:{y:7.3+13.5*(1-j)*j/2},nameEn:{y:19.5-9*(1-b)*b/2}};return a.jsxs("g",dn({textAnchor:"middle",fill:f?W.white:o},r,{children:[a.jsx(Gt,{fill:f?"#aaa":n}),a.jsx("text",{ref:l,className:d,fontSize:12,transform:"translate(0,".concat(_.nameZh.y,")scale(").concat(j,")"),dominantBaseline:"central",children:t}),a.jsx("text",{ref:h,className:i,fontSize:8,transform:"translate(0,".concat(_.nameEn.y,")scale(").concat(b,")"),dominantBaseline:"middle",children:e}),m]}))}var qe=function(){return qe=Object.assign||function(s){for(var t,e=1,o=arguments.length;e=5?a.jsx(Hs,qe({},t)):a.jsx(Fs,qe({},t))}});var Vs=function(s,t){var e=Nn(s);if(e!==void 0)return 1;var o=va(s,t);return o!==void 0?2:3},mn=function(){return mn=Object.assign||function(s){for(var t,e=1,o=arguments.length;e0)&&!(n=o.next()).done;)d.push(n.value)}catch(f){i={error:f}}finally{try{n&&!n.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return d},Bt=17,Sa=$.forwardRef(function(t,e){var o=t.Icon,n=t.lineNum,d=t.stnNum,i=t.strokeColour,f=t.passed,m=t.size,r=t.textClassName,l=t.bolderBorder,h=t.alwaysShowColouredBorder,u=t.useSameScale,c=t.children,p=Qs(t,["Icon","lineNum","stnNum","strokeColour","passed","size","textClassName","bolderBorder","alwaysShowColouredBorder","useSameScale","children"]),g=$.useContext(kn).updateId,C=$.useRef(null),y=$.useRef(null),j=Fn($.useState({width:0}),2),b=j[0],_=j[1],O=Fn($.useState({width:0}),2),N=O[0],w=O[1];$.useEffect(function(){C.current&&_(C.current.getBBox()),y.current&&w(y.current.getBBox())},[n,d,g]);var v=n&&n.length>2;$.useEffect(function(){u&&v&&console.warn("GenericStationNumber(), useSameScale props does not work when lineNum has more than 2 characters")},[u,v]);var A=Bt/Math.max(Bt,b.width),M=u&&(n==null?void 0:n.length)===2?A:Bt/Math.max(Bt,N.width),S=m==="sm"?"0.7":m==="lg"?"1.6":1;return a.jsxs("g",hn({ref:e},p,{children:[a.jsxs("g",{transform:"scale(".concat(S,")"),children:[a.jsx(o,{stroke:f&&!h?"#aaa":i,filled:!n&&!d,bolder:l}),(n||d)&&a.jsxs("g",{textAnchor:"middle",fontSize:13.5,fill:f?"#aaa":"#000",children:[a.jsx("g",{transform:"translate(-9.25,0)scale(".concat(A,")"),children:a.jsx("text",{ref:C,className:r,dominantBaseline:"central",x:.5,children:n})}),a.jsx("g",{transform:"translate(9.25,0)scale(".concat(M,")"),children:a.jsx("text",{ref:y,className:r,dominantBaseline:"central",children:d})})]})]}),c]}))}),un=function(){return un=Object.assign||function(s){for(var t,e=1,o=arguments.length;e0)&&!(n=o.next()).done;)d.push(n.value)}catch(f){i={error:f}}finally{try{n&&!n.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return d},Qt=function(s,t){return Array.from(Array(s).keys()).map(function(e){return(e-(s-1)/2)*t})},Ks=function(s,t,e){if(s<=0)return[];if(s===1)return[[0,0]];for(var o=t>s?s:t,n=Sn,d=Ts,i=Qt(o,n),f=Math.ceil(s/o),m=Qt(f,d),r=s%o,l=[],h=0;h=u.length)return console.warn(", anchor index ".concat(m," is out of bound")),[0,0];var b=Zn(u[m],2),_=b[0],O=b[1];return[-_,-O]},[u,m]),2),p=c[0],g=c[1],C=$.useRef(null),y=$.useRef([]);$.useEffect(function(){y.current=y.current.slice(0,o.length)},[o.length]);var j=o.length===2&&i===1&&!!r;return $.useImperativeHandle(e,function(){return{target:C.current,children:y.current,getCoordinates:function(){return u},getCorrectedBBox:function(){var b,_,O=(_=(b=C.current)===null||b===void 0?void 0:b.getBBox())!==null&&_!==void 0?_:{x:0,y:0,width:0,height:0};return O.y-=Fe/2,O.height+=Fe,j?(r==="left"?O.x-=Jt/2:O.x-=Fe/2,O.width+=Jt/2+Fe/2):(O.x-=Fe/2,O.width+=Fe),O},getTranslate:function(){return[p,g]}}},[u,p,g,C.current,y.current,r]),a.jsxs("g",Dt({ref:C,transform:"translate(".concat(p,",").concat(g,")")},h,{children:[o.map(function(b,_){var O=b.style,N=qn(O);return a.jsx(N,{stroke:"#aaa",filled:!0,strokeWidth:Fe,transform:"translate(".concat(u[_][0],",").concat(u[_][1],")")},_)}),j&&a.jsx(Vn,{position:r,r:Sn/2.9,strokeWidth:Jt,strokeDasharray:void 0}),o.map(function(b,_){var O=b.style,N=qn(O);return a.jsx(N,{stroke:"white",filled:!0,strokeWidth:Xe*2.6,transform:"translate(".concat(u[_][0],",").concat(u[_][1],")")},_)}),j&&a.jsx(Vn,{position:r}),o.length&&a.jsx("rect",{fill:"white",x:-12,y:u[0][1],width:24,height:-u[0][1]*2}),o.map(function(b,_){var O=b.style,N=Gn(b,["style"]),w=O==="fmetro"?Zt:ot;return a.jsx(w,Dt({ref:function(v){return y.current[_]=v},transform:"translate(".concat(u[_][0],",").concat(u[_][1],")"),textClassName:n},N),_)}),l]}))}),xn=function(){return xn=Object.assign||function(s){for(var t,e=1,o=arguments.length;e{var ie,E,H;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=ve.nameOffsetX,nameOffsetY:l=ve.nameOffsetY,color:h=ve.color,lineCode:u=ve.lineCode,stationCode:c=ve.stationCode,open:p=ve.open,secondaryNames:g=ve.secondaryNames,tram:C=ve.tram}=(ie=n[k.GzmtrBasic])!=null?ie:ve,y=x.useCallback(R=>d(t,R),[t,d]),j=x.useCallback(R=>i(t,R),[t,i]),b=x.useCallback(R=>f(t,R),[t,f]),_=x.useRef(null);(H=(E=_.current)==null?void 0:E.querySelector("path"))==null||H.setAttribute("id","stn_core_".concat(t));const O={en:C?5.08:6.56,zh:C?7.29:13.13},N={top:{namesPos:1,lineHeight:O.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:O.zh,polarity:1}},w=C?11:15,v=r==="left"?-w:r==="right"?w:0,A=C?8:10,M=(m[N[l].namesPos].split("\n").length*N[l].lineHeight+A)*N[l].polarity,S=r==="left"?"end":r==="right"?"start":!p&&r==="middle"&&g.join("")===""?"end":"middle",z=x.useRef(null),[P,Y]=x.useState(0);x.useEffect(()=>{var R,Z;return Y((Z=(R=z.current)==null?void 0:R.getBBox().width)!=null?Z:0)},[...g,C]);const U=x.useRef(null),[q,X]=x.useState(0);x.useEffect(()=>{var R,Z;return X((Z=(R=U.current)==null?void 0:R.getBBox().width)!=null?Z:0)},[...m,C]);const se=r==="middle"?q/2+(P+12*2)/2:(q+(P+12*2)/2)*(r==="left"?-1:1),ae=r==="middle"&&g.join("")!==""?q/2+(P+12*2):(q+P+(P!==0?12*2:0))*(r==="left"?-1:r==="right"?1:0);return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("g",{transform:"scale(".concat(.57915*(C?.729:1),")"),onPointerDown:y,onPointerMove:j,onPointerUp:b,style:{cursor:"move"},ref:_,children:a.jsx(ot,{id:"stn_core_".concat(t),strokeColour:h[2],lineNum:u===""?void 0:u,stnNum:c===""?void 0:c,textClassName:"rmp-name__zh"})}),a.jsxs("g",{ref:U,transform:"translate(".concat(v,", ").concat(M,")"),textAnchor:S,children:[a.jsx(I,{text:m[0].split("\n"),fontSize:O.zh,lineHeight:O.zh,grow:"up",className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),fontSize:O.en,lineHeight:O.en,grow:"down",className:"rmp-name__en"})]}),g.join("")!==""&&a.jsxs("g",{transform:"translate(".concat(v+se,", ").concat(M,")"),textAnchor:"middle",children:[a.jsx("text",{fontSize:"13.13",dx:-(P+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),a.jsx("text",{fontSize:"13.13",dx:(P+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),a.jsxs("g",{ref:z,children:[a.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:g[0]}),a.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:g[1]})]})]}),!p&&a.jsxs("g",{transform:"translate(".concat(v+ae,", ").concat(M,")"),textAnchor:r==="middle"?"start":S,children:[a.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),a.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},ve={...T,nameOffsetX:"right",nameOffsetY:"top",color:[B.Guangzhou,"gz1","#F3D03E",W.black],lineCode:"1",stationCode:"01",open:!0,secondaryNames:["",""],tram:!1},oo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"custom",label:n("color"),component:a.jsx(Ee,{type:k.GzmtrBasic,defaultTheme:ve.color})},{type:"input",label:n("panel.details.stations.common.lineCode"),value:e.lineCode,onChange:i=>{e.lineCode=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.common.stationCode"),value:e.stationCode,onChange:i=>{e.stationCode=i,o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.gzmtrBasic.open"),oneLine:!0,isChecked:e.open,onChange:i=>{e.open=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.gzmtrBasic.secondaryNameZh"),value:e.secondaryNames[0],onChange:i=>{e.secondaryNames[0]=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.gzmtrBasic.secondaryNameEn"),value:e.secondaryNames[1],onChange:i=>{e.secondaryNames[1]=i,o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.gzmtrBasic.tram"),oneLine:!0,isChecked:e.tram,onChange:i=>{e.tram=i,o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},io=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("g",{transform:"translate(12,12)scale(0.45)",children:a.jsx(ot,{strokeColour:"#000",lineNum:"1",stnNum:"01"})})}),lo={component:so,icon:io,defaultAttrs:ve,attrsComponent:oo,metadata:{displayName:"panel.details.stations.gzmtrBasic.displayName",cities:[B.Guangzhou],canvas:[G.RailMap],categories:[V.Metro],tags:[]}},Xt=[B.Guangzhou,"","#AAAAAA",W.white,"","","gz"];function Ma(s){const{interchangeList:t,onAdd:e,onDelete:o,onUpdate:n}=s,d=it(),{paletteAppClip:{output:i}}=lt(u=>u.runtime),{t:f}=D(),[m,r]=x.useState();x.useEffect(()=>{m!==void 0&&i&&(n==null||n(m,[...i,t[m][4],t[m][5],t[m][6]]),r(void 0))},[i==null?void 0:i.toString()]);const l=t.map((u,c)=>[{type:"input",label:f("panel.details.stations.common.lineCode"),value:u[4],minW:"80px",onChange:p=>n==null?void 0:n(c,[u[0],u[1],u[2],u[3],p,u[5],u[6]])},{type:"input",label:f("panel.details.stations.common.stationCode"),value:u[5],minW:"80px",onChange:p=>n==null?void 0:n(c,[u[0],u[1],u[2],u[3],u[4],p,u[6]])}]),h=(u,c,p)=>n==null?void 0:n(c,[u[0],u[1],u[2],u[3],u[4],u[5],p?"fs":"gz"]);return a.jsxs(jn,{direction:"column",children:[t.length===0&&a.jsxs(Ke,{spacing:.5,"data-testid":"interchange-card-stack",children:[a.jsx(_n,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:f("panel.details.stations.interchange.noInterchanges")}),a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.add"),onClick:()=>e==null?void 0:e(Xt),icon:a.jsx(De,{})})]}),t.map((u,c)=>a.jsxs(Ke,{spacing:.5,"data-testid":"interchange-card-stack-".concat(c),children:[a.jsx(ue,{label:f("color"),minW:"40px",noLabel:c!==0,children:a.jsx(Ht,{theme:[u[0],u[1],u[2],u[3]],onClick:()=>{r(c),d(Ut([u[0],u[1],u[2],u[3]]))}})}),a.jsx(L,{fields:l[c],noLabel:c!==0}),a.jsxs(et,{children:[e&&c===l.length-1?a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.copy"),onClick:()=>e==null?void 0:e(t.slice(-1)[0]),icon:a.jsx(On,{})}):a.jsx(wn,{minW:8}),o&&a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.remove"),onClick:()=>o==null?void 0:o(c),icon:a.jsx(vt,{})}),a.jsx(L,{fields:[{type:"switch",label:f("panel.details.stations.gzmtrInt.foshan"),isChecked:u[6]==="fs",onChange:p=>h(u,c,p)}]})]})]},c))]})}const Jn=[[[0,0]],[[0,0]],[[-21,0],[21,0]],[[-21.65,-12.5],[21.65,-12.5],[0,25]],[[-23,-18],[22,-16],[23,18],[-22,16]]],ro=s=>{var E,H,R,Z,pe,he,Le,be,ge,Ye,He,Ue,te,je,tt,wt,St,Nt,kt,rt,ce,Mt,An,zn;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Pe.nameOffsetX,nameOffsetY:l=Pe.nameOffsetY,transfer:h=Pe.transfer,open:u=Pe.open,secondaryNames:c=Pe.secondaryNames,tram:p=Pe.tram}=(E=n[k.GzmtrInt])!=null?E:Pe,g=x.useCallback(F=>d(t,F),[t,d]),C=x.useCallback(F=>i(t,F),[t,i]),y=x.useCallback(F=>f(t,F),[t,f]),j=qa("white","var(--chakra-colors-gray-800)"),b={en:p?5.08:6.56,zh:p?7.29:13.13},_={top:{namesPos:1,lineHeight:b.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:b.zh,polarity:1}},O=p?18:25,N=(r==="left"?-O:r==="right"?O:0)*(l==="middle"?1.1:1),w=p?14:18,v=(m[_[l].namesPos].split("\n").length*_[l].lineHeight+w*(r==="middle"?1.1:1))*_[l].polarity,A=r==="left"?"end":r==="right"?"start":!u&&r==="middle"&&c.join("")===""?"end":"middle",M=h.flat().slice(0,4),S=[["black","black"],[(R=(H=M.at(0))==null?void 0:H.at(2))!=null?R:"black",(pe=(Z=M.at(0))==null?void 0:Z.at(2))!=null?pe:"black"],[(Le=(he=M.at(0))==null?void 0:he.at(2))!=null?Le:"black",(ge=(be=M.at(1))==null?void 0:be.at(2))!=null?ge:"black"],[(He=(Ye=M.at(0))==null?void 0:Ye.at(2))!=null?He:"black",(te=(Ue=M.at(1))==null?void 0:Ue.at(2))!=null?te:"black",(tt=(je=M.at(2))==null?void 0:je.at(2))!=null?tt:"black"],[(St=(wt=M.at(0))==null?void 0:wt.at(2))!=null?St:"black",(kt=(Nt=M.at(1))==null?void 0:Nt.at(2))!=null?kt:"black",(ce=(rt=M.at(2))==null?void 0:rt.at(2))!=null?ce:"black",(An=(Mt=M.at(3))==null?void 0:Mt.at(2))!=null?An:"black"]],z=x.useRef(null),[P,Y]=x.useState(0);x.useEffect(()=>{var F,Oe;return Y((Oe=(F=z.current)==null?void 0:F.getBBox().width)!=null?Oe:0)},[...c]);const U=x.useRef(null),[q,X]=x.useState(0);x.useEffect(()=>{var F,Oe;return X((Oe=(F=U.current)==null?void 0:F.getBBox().width)!=null?Oe:0)},[...m]);const se=(q+(P+12*2)/2)*(r==="left"?-1:1),ae=(q+P+(P!==0?12*2:0))*(r==="left"?-1:r==="right"||P!==0?1:0),ie=r==="middle"?"start":A;return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[M.map(F=>F[2]).filter((F,Oe,At)=>At.indexOf(F)===Oe).map(F=>a.jsx("marker",{id:"gzmtr_int_arrow_".concat(F),markerWidth:"5",markerHeight:"5",refX:"1",refY:"1.25",orient:"auto",children:a.jsx("polygon",{points:"0.25,0 0.25,2.5 2.25,1.25",fill:F})},"gzmtr_int_arrow_".concat(F))),a.jsxs("g",{transform:"scale(".concat(.57915*(p?.729:1),")"),children:[M.length<=2&&a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M -21,-15 A 28 28 0 0 1 21,-15 L 21,15 A 28 28 0 0 1 -21,15 Z",fill:j}),a.jsx("path",{d:"M -21,-15 A 28 28 0 0 1 21,-15",fill:"none",stroke:S[M.length][0],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][0],")")}),a.jsx("path",{d:"M 21,15 A 28 28 0 0 1 -21,15",fill:"none",stroke:S[M.length][1],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][1],")")})]}),M.length===3&&a.jsxs(a.Fragment,{children:[a.jsx("circle",{r:"25",fill:j}),a.jsx("path",{d:"M -21.65,12.5 A 25 25 0 0 1 0,-25",fill:"none",stroke:S[M.length][0],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][0],")")}),a.jsx("path",{d:"M 0,-25 A 25 25 0 0 1 21.65,12.5",fill:"none",stroke:S[M.length][1],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][1],")")}),a.jsx("path",{d:"M 21.65,12.5 A 25 25 0 0 1 -21.65,12.5",fill:"none",stroke:S[M.length][2],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][2],")")}),a.jsx("path",{d:"M -21.65,12.5 A 25 25 0 0 1 0,-25",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][0],")")}),a.jsx("path",{d:"M 0,-25 A 25 25 0 0 1 21.65,12.5",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][1],")")})]}),M.length>=4&&a.jsxs(a.Fragment,{children:[a.jsx("circle",{r:"25",fill:j}),a.jsx("path",{d:"M -25,0 A 25 25 0 0 1 0,-25",fill:"none",stroke:S[M.length][0],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][0],")")}),a.jsx("path",{d:"M 0,-25 A 25 25 0 0 1 25,0",fill:"none",stroke:S[M.length][1],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][1],")")}),a.jsx("path",{d:"M 25,0 A 25 25 0 0 1 0,25",fill:"none",stroke:S[M.length][2],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][2],")")}),a.jsx("path",{d:"M 0,25 A 25 25 0 0 1 -25,0",fill:"none",stroke:S[M.length][3],strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][3],")")}),a.jsx("path",{d:"M -25,0 A 25 25 0 0 1 0,-25",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][0],")")}),a.jsx("path",{d:"M 0,-25 A 25 25 0 0 1 25,0",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][1],")")}),a.jsx("path",{d:"M 25,0 A 25 25 0 0 1 0,25",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:"url(#gzmtr_int_arrow_".concat(S[M.length][2],")")})]}),(zn=h[0])==null?void 0:zn.map((F,Oe,At)=>a.jsx("g",{transform:"translate(".concat(Jn[At.length][Oe][0],",").concat(Jn[At.length][Oe][1],")"),children:F[6]==="gz"?a.jsx(ot,{strokeColour:F[2],lineNum:F[4],stnNum:F[5],textClassName:"rmp-name__zh"}):a.jsx(Zt,{strokeColour:F[2],lineNum:F[4],stnNum:F[5],textClassName:"rmp-name__zh"})},"gzmtr_int_".concat(t,"_stn_").concat(Oe))),a.jsx("circle",{id:"stn_core_".concat(t),r:"25",fill:"white",fillOpacity:"0",onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"},className:"removeMe"})]}),a.jsxs("g",{ref:U,transform:"translate(".concat(N,", ").concat(v,")"),textAnchor:A,children:[a.jsx(I,{text:m[0].split("\\"),fontSize:b.zh,lineHeight:b.zh,grow:"up",className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\\"),fontSize:b.en,lineHeight:b.en,grow:"down",className:"rmp-name__en"})]}),c.join("")!==""&&a.jsxs("g",{transform:"translate(".concat(N+se,", ").concat(v,")"),textAnchor:"middle",children:[a.jsx("text",{fontSize:"13.13",dx:-(P+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),a.jsx("text",{fontSize:"13.13",dx:(P+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),a.jsxs("g",{ref:z,children:[a.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:c[0]}),a.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:c[1]})]})]}),!u&&a.jsxs("g",{transform:"translate(".concat(N+ae,", ").concat(v,")"),textAnchor:ie,children:[a.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),a.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},Pe={...T,nameOffsetX:"right",nameOffsetY:"top",transfer:[[],[]],open:!0,secondaryNames:["",""],tram:!1},co=s=>{var u;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:c=>{e.names[0]=c,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:c=>{e.names[1]=c,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:c=>{e.nameOffsetX=c,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:c=>{e.nameOffsetY=c,o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.gzmtrInt.open"),oneLine:!0,isChecked:e.open,onChange:c=>{e.open=c,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.gzmtrInt.secondaryNameZh"),value:e.secondaryNames[0],onChange:c=>{e.secondaryNames[0]=c,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.gzmtrInt.secondaryNameEn"),value:e.secondaryNames[1],onChange:c=>{e.secondaryNames[1]=c.toString(),o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.gzmtrBasic.tram"),oneLine:!0,isChecked:e.tram,onChange:c=>{e.tram=c,o(t,e)},minW:"full"}],i=[4,4,0],f=(u=e.transfer)!=null?u:Pe.transfer,m=c=>p=>{const g=structuredClone(f);if(g.length<=c)for(let C=g.length;C<=c;C++)g[C]=[Xt];g[c].push(p),e.transfer=g,o(t,e)},r=c=>p=>{if(f.length>c&&f[c].length>p){const g=f.map((C,y)=>y===c?C.filter((j,b)=>b!==p):C);e.transfer=g,o(t,e)}},l=c=>(p,g)=>{if(f.length>c&&f[c].length>p){const C=f.map((y,j)=>j===c?y.map((b,_)=>_===p?[0,1,2,3,4,5,6].map(O=>g[O]===void 0?b[O]:g[O]):b):y);e.transfer=C,o(t,e)}},h=()=>m(f.length)(Xt);return a.jsxs(a.Fragment,{children:[a.jsx(L,{fields:d}),a.jsx(ue,{label:n("panel.details.stations.interchange.title"),children:a.jsxs(et,{align:"flex-start",children:[f.map((c,p)=>a.jsxs(x.Fragment,{children:[a.jsx(Ft,{size:"xs",children:n(p===0?"panel.details.stations.interchange.within":p===1?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),a.jsx(Ma,{interchangeList:c,onAdd:i[p]>c.length?m(p):void 0,onDelete:r(p),onUpdate:l(p)})]},p)),i[f.length]>0&&a.jsx(ye,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:a.jsx(De,{}),onClick:h,children:n("panel.details.stations.interchange.addGroup")})]})})]})},mo=a.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[a.jsx("g",{transform:"translate(6,12)scale(0.3)",children:a.jsx(ot,{strokeColour:"currentColor",lineNum:"1",stnNum:"09"})}),a.jsx("g",{transform:"translate(18,12)scale(0.3)",children:a.jsx(ot,{strokeColour:"currentColor",lineNum:"2",stnNum:"13"})}),a.jsx("marker",{id:"arrow",markerWidth:"5",markerHeight:"5",refX:"1",refY:"1.25",orient:"auto",children:a.jsx("polygon",{points:"0,0 0,3 2,1.5"})}),a.jsx("path",{d:"M 6,6 A 8 8 0 0 1 18,6",fill:"none",stroke:"currentColor",strokeWidth:"2",markerEnd:"url(#arrow)"}),a.jsx("path",{d:"M 18,18 A 8 8 0 0 1 6,18",fill:"none",stroke:"currentColor",strokeWidth:"2",markerEnd:"url(#arrow)"})]}),fo={component:ro,icon:mo,defaultAttrs:Pe,attrsComponent:co,metadata:{displayName:"panel.details.stations.gzmtrInt.displayName",cities:[B.Guangzhou],canvas:[G.RailMap],categories:[V.Metro],tags:[]}};var ho=function(s,t){var e=typeof Symbol=="function"&&s[Symbol.iterator];if(!e)return s;var o=e.call(s),n,d=[],i;try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)d.push(n.value)}catch(f){i={error:f}}finally{try{n&&!n.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return d};function pl(s){var t=s.children,e=ho($.useState(Math.random()),2),o=e[0],n=e[1];return a.jsx(kn.Provider,{value:{updateId:o,update:function(){return n(Math.random())}},children:t})}const Aa={en:6.56,zh:13.13},Ot=structuredClone(ee);Ot.top.lineHeight=Aa.en;Ot.bottom.lineHeight=Aa.zh;const uo=.56,Kn=.6,po=s=>{var he,Le,be,ge,Ye,He,Ue;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=xe.nameOffsetX,nameOffsetY:l=xe.nameOffsetY,transfer:h=xe.transfer,open:u=xe.open,secondaryNames:c=xe.secondaryNames,columns:p=xe.columns,topHeavy:g=xe.topHeavy,anchorAt:C=xe.anchorAt,osiPosition:y=xe.osiPosition}=(he=n[k.GzmtrInt2024])!=null?he:xe,j=x.useCallback(te=>d(t,te),[t,d]),b=x.useCallback(te=>i(t,te),[t,i]),_=x.useCallback(te=>f(t,te),[t,f]),O=h.flat().slice(0,5),N=O.map(te=>({style:te[6]==="gz"?"gzmtr":"fmetro",lineNum:te[4],stnNum:te[5],strokeColour:te[2]})),[w,v]=x.useState(),[A,M]=x.useState([0,0]),S=x.useRef(null);x.useEffect(()=>{S.current&&(v(S.current.getCorrectedBBox()),M(S.current.getTranslate()))},[S.current,O.length,p,g,C]);const z={x1:((Le=w==null?void 0:w.x)!=null?Le:0)+A[0],y1:((be=w==null?void 0:w.y)!=null?be:0)+A[1],x2:((ge=w==null?void 0:w.x)!=null?ge:0)+((Ye=w==null?void 0:w.width)!=null?Ye:0)+A[0],y2:((He=w==null?void 0:w.y)!=null?He:0)+((Ue=w==null?void 0:w.height)!=null?Ue:0)+A[1]},{update:P}=x.useContext(kn);x.useEffect(()=>{document.fonts.load("12px Arial","ABCDEFG123456").finally(()=>setTimeout(P,100))},[]);const Y=(r==="left"?z.x1:r==="right"?z.x2:0)*Kn,U=m[Ot[l].namesPos].split("\n").length*Ot[l].lineHeight*Ot[l].polarity+(l==="top"?z.y1:l==="bottom"?z.y2:0)*Kn,q=r==="left"?"end":r==="right"?"start":!u&&r==="middle"&&c.join("")===""?"end":"middle",X=x.useRef(null),[se,ae]=x.useState(0);x.useEffect(()=>{var te,je;return ae((je=(te=X.current)==null?void 0:te.getBBox().width)!=null?je:0)},[...c]);const ie=x.useRef(null),[E,H]=x.useState(0);x.useEffect(()=>{var te,je;return H((je=(te=ie.current)==null?void 0:te.getBBox().width)!=null?je:0)},[...m]);const R=(E+(se+12*2)/2)*(r==="left"?-1:1),Z=(E+se+(se!==0?12*2:0))*(r==="left"?-1:r==="right"||se!==0?1:0),pe=r==="middle"?"start":q;return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsxs("g",{transform:"scale(".concat(uo,")"),children:[a.jsx(Na,{ref:S,stations:N,textClassName:"rmp-name__zh",columns:p,topHeavy:g,anchorAt:C>=0?C:void 0,osiPosition:h.flat().length===2&&p===1&&y!=="none"?y:void 0}),a.jsx("rect",{id:"stn_core_".concat(t),x:z.x1,y:z.y1,width:z.x2-z.x1,height:z.y2-z.y1,fill:"white",fillOpacity:"0",onPointerDown:j,onPointerMove:b,onPointerUp:_,style:{cursor:"move"},className:"removeMe"})]}),a.jsxs("g",{ref:ie,transform:"translate(".concat(Y,", ").concat(U,")"),textAnchor:q,children:[a.jsx(I,{text:m[0].split("\n"),fontSize:13.13,lineHeight:13.13,grow:"up",className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),fontSize:6.56,lineHeight:6.56,grow:"down",className:"rmp-name__en"})]}),c.join("")!==""&&a.jsxs("g",{transform:"translate(".concat(Y+R,", ").concat(U,")"),textAnchor:"middle",children:[a.jsx("text",{fontSize:"13.13",dx:-(se+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),a.jsx("text",{fontSize:"13.13",dx:(se+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),a.jsxs("g",{ref:X,children:[a.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:c[0]}),a.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:c[1]})]})]}),!u&&a.jsxs("g",{transform:"translate(".concat(Y+Z,", ").concat(U,")"),textAnchor:pe,children:[a.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),a.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},xe={...T,nameOffsetX:"right",nameOffsetY:"top",transfer:[[[B.Guangzhou,"gz1","#F3D03E",W.white,"1","14","gz"],[B.Guangzhou,"gz3","#ECA154",W.white,"3","11","gz"]]],open:!0,secondaryNames:["",""],columns:2,topHeavy:!1,anchorAt:-1,osiPosition:"none"},go=s=>{var h,u;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:c=>{e.names[0]=c,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:c=>{e.names[1]=c,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:c=>{e.nameOffsetX=c,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:c=>{e.nameOffsetY=c,o(t,e)},minW:"full"},{type:"slider",label:n("panel.details.stations.gzmtrInt2024.columns"),value:e.columns,min:1,max:Math.min(5,e.transfer.flat().length),step:1,onChange:c=>{e.columns=c,o(t,e)},leftIcon:a.jsx(Xa,{}),rightIcon:a.jsx(De,{}),minW:"full"},{type:"switch",label:n("panel.details.stations.gzmtrInt2024.topHeavy"),oneLine:!0,isChecked:e.topHeavy,onChange:c=>{e.topHeavy=c,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.gzmtrInt2024.anchorAt"),value:(h=e.anchorAt)!=null?h:"-1",options:{"-1":n("panel.details.stations.gzmtrInt2024.anchorAtNone"),...Object.fromEntries(Array.from({length:Math.min(e.transfer.flat().length,4)},(c,p)=>[p.toString(),p]))},onChange:c=>{e.anchorAt=Number(c),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.gzmtrInt2024.osiPosition"),value:e.osiPosition,options:{none:n("panel.details.stations.gzmtrInt2024.osiPositionNone"),left:n("panel.details.stations.gzmtrInt2024.osiPositionLeft"),right:n("panel.details.stations.gzmtrInt2024.osiPositionRight")},onChange:c=>{e.osiPosition=c,o(t,e)},hidden:!(e.transfer.flat().length===2&&e.columns===1),minW:"full"},{type:"switch",label:n("panel.details.stations.gzmtrInt.open"),oneLine:!0,isChecked:e.open,onChange:c=>{e.open=c,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.gzmtrInt.secondaryNameZh"),value:e.secondaryNames[0],onChange:c=>{e.secondaryNames[0]=c,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.gzmtrInt.secondaryNameEn"),value:e.secondaryNames[1],onChange:c=>{e.secondaryNames[1]=c.toString(),o(t,e)},minW:"full"}],i=[5,0,0],f=(u=e.transfer)!=null?u:xe.transfer,m=c=>p=>{const g=structuredClone(f);if(g.length<=c)for(let C=g.length;C<=c;C++)g[C]=[Xt];g[c].push(p),e.transfer=g,o(t,e)},r=c=>p=>{if(f.length>c&&f[c].length>p){const g=f.map((C,y)=>y===c?C.filter((j,b)=>b!==p):C);e.transfer=g,e.anchorAt=-1,o(t,e)}},l=c=>(p,g)=>{if(f.length>c&&f[c].length>p){const C=f.map((y,j)=>j===c?y.map((b,_)=>_===p?[0,1,2,3,4,5,6].map(O=>g[O]===void 0?b[O]:g[O]):b):y);e.transfer=C,o(t,e)}};return a.jsxs(a.Fragment,{children:[a.jsx(L,{fields:d}),a.jsx(ue,{label:n("panel.details.stations.interchange.title"),children:a.jsx(et,{align:"flex-start",children:f.map((c,p)=>a.jsxs(x.Fragment,{children:[a.jsx(Ft,{size:"xs",children:n(p===0?"panel.details.stations.interchange.within":p===1?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),a.jsx(Ma,{interchangeList:c,onAdd:i[p]>c.length?m(p):void 0,onDelete:r(p),onUpdate:l(p)})]},p))})})]})},xo=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx(Na,{stations:[{strokeColour:"currentColor",lineNum:"3",stnNum:"03"},{strokeColour:"currentColor",lineNum:"7",stnNum:"05"}],textClassName:"rmp-name__zh",columns:1,transform:"translate(12,12)scale(0.3)"})}),Co={component:po,icon:xo,defaultAttrs:xe,attrsComponent:go,metadata:{displayName:"panel.details.stations.gzmtrInt2024.displayName",cities:[B.Guangzhou],canvas:[G.RailMap],categories:[V.Metro],tags:[]}},ne={zh:9,en:6.2,top:6.2+1,middle:0,bottom:10},yo=s=>{var b;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=me.nameOffsetX,nameOffsetY:l=me.nameOffsetY,open:h=me.open}=(b=n[k.BjsubwayBasic])!=null?b:me,u=x.useCallback(_=>d(t,_),[t,d]),c=x.useCallback(_=>i(t,_),[t,i]),p=x.useCallback(_=>f(t,_),[t,f]),g=(_,O)=>_==="left"&&O==="top"?[-4,-(m[1].split("\n").length+(h?0:1))*ne[O]-1]:_==="middle"&&O==="top"?[0,-(m[1].split("\n").length+(h?0:1))*ne[O]-4]:_==="right"&&O==="top"?[4,-(m[1].split("\n").length+(h?0:1))*ne[O]-1]:_==="left"&&O==="bottom"?[-4,m[0].split("\n").length*ne[O]+1]:_==="middle"&&O==="bottom"?[0,m[0].split("\n").length*ne[O]+4]:_==="right"&&O==="bottom"?[4,m[0].split("\n").length*ne[O]+1]:_==="left"&&O==="middle"?[-5,0]:_==="right"&&O==="middle"?[5,0]:[0,0],[C,y]=g(r,l),j=r==="left"?"end":r==="right"?"start":"middle";return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("circle",{id:"stn_core_".concat(t),r:"4",stroke:"black",strokeWidth:"0.5",strokeDasharray:h?void 0:"1.5",fill:"white",onPointerDown:u,onPointerMove:c,onPointerUp:p,style:{cursor:"move"}}),a.jsxs("g",{transform:"translate(".concat(C,", ").concat(y,")"),textAnchor:j,children:[a.jsx(I,{text:m[0].split("\n"),fontSize:ne.zh,lineHeight:ne.zh,grow:"up",className:"rmp-name__zh",baseOffset:1}),a.jsx(I,{text:m[1].split("\n"),fontSize:ne.en,lineHeight:ne.en,grow:"down",className:"rmp-name__en",baseOffset:1}),!h&&a.jsx("text",{dy:m[1].split("\n").length*ne.en+2,fontSize:ne.en,dominantBaseline:"hanging",className:"rmp-name__zh",children:"(暂缓开通)"})]})]})},me={...T,nameOffsetX:"right",nameOffsetY:"top",open:!0},bo=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:s=>(s!=null?s:me).names[0],onChange:(s,t)=>{const e=t!=null?t:me;return e.names[0]=s.toString(),e}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:s=>(s!=null?s:me).names[1],onChange:(s,t)=>{const e=t!=null?t:me;return e.names[1]=s.toString(),e}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:s=>(s!=null?s:me).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:s=>(s==null?void 0:s.nameOffsetY)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:me;return e.nameOffsetX=s,e}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:s=>(s!=null?s:me).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:s=>(s==null?void 0:s.nameOffsetX)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:me;return e.nameOffsetY=s,e}},{type:"switch",label:"panel.details.stations.bjsubwayBasic.open",oneLine:!0,isChecked:s=>(s!=null?s:me).open,onChange:(s,t)=>{const e=t!=null?t:me;return e.open=s,e}}],jo=()=>a.jsx(vn,{fields:bo}),Oo=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none"})}),vo={component:yo,icon:Oo,defaultAttrs:me,attrsComponent:jo,metadata:{displayName:"panel.details.stations.bjsubwayBasic.displayName",cities:[B.Beijing],canvas:[G.RailMap],categories:[V.Metro],tags:[]}},za="M 8.359893 4.159288 C 8.368828 4.168825 8.460953 4.26852 8.57038 4.386985 C 8.679807 4.505449 8.860802 4.701382 8.972592 4.822389 C 9.084381 4.943397 9.238666 5.110407 9.315445 5.193521 C 9.392224 5.276636 9.519867 5.414817 9.599094 5.500589 C 9.678323 5.58636 9.801023 5.719209 9.871761 5.795812 C 9.942499 5.872413 10.000208 5.935256 9.999999 5.935465 C 9.999792 5.935671 9.975513 5.928466 9.946045 5.919453 C 9.916577 5.910439 9.831826 5.88438 9.757708 5.861543 C 9.683591 5.838706 9.532284 5.791997 9.421472 5.757746 C 9.310658 5.723495 9.190374 5.686309 9.154173 5.675113 C 9.11797 5.663918 9.048485 5.642428 8.99976 5.627359 C 8.951035 5.612291 8.910275 5.599729 8.909181 5.599446 C 8.907193 5.59893 8.907193 5.59893 8.907135 5.798288 C 8.907103 5.907935 8.906695 6.128369 8.906229 6.288144 C 8.905446 6.555825 8.905249 6.580968 8.903705 6.608245 C 8.902784 6.624527 8.90139 6.647987 8.900606 6.660379 C 8.899822 6.672773 8.898192 6.695836 8.896983 6.711632 C 8.895774 6.727427 8.893582 6.753074 8.892114 6.768627 C 8.890645 6.784179 8.888061 6.80923 8.88637 6.824296 C 8.884679 6.839362 8.88172 6.864065 8.879793 6.879189 C 8.877868 6.894315 8.874691 6.917777 8.872734 6.931325 C 8.870777 6.944874 8.867386 6.967292 8.865197 6.981143 C 8.863009 6.994995 8.859045 7.018654 8.856388 7.03372 C 8.853731 7.048786 8.849344 7.072617 8.84664 7.086676 C 8.843935 7.100736 8.839338 7.1236 8.836424 7.137486 C 8.833509 7.151371 8.828584 7.174065 8.825479 7.187916 C 8.822371 7.201767 8.817014 7.224831 8.81357 7.239167 C 8.810127 7.253505 8.80431 7.276767 8.800644 7.29086 C 8.796978 7.304955 8.791035 7.327222 8.787437 7.340344 C 8.78384 7.353467 8.77752 7.375735 8.773395 7.389829 C 8.769268 7.403923 8.762319 7.426986 8.757952 7.441081 C 8.753583 7.455174 8.746363 7.47784 8.741903 7.491448 C 8.737446 7.505056 8.729829 7.527523 8.724978 7.541374 C 8.720126 7.555225 8.712182 7.577493 8.707321 7.590858 C 8.702462 7.604224 8.6948 7.624901 8.690294 7.636807 C 8.68579 7.648715 8.677304 7.670452 8.671437 7.685113 C 8.665571 7.699773 8.656536 7.721842 8.651362 7.734155 C 8.646187 7.746468 8.63796 7.765688 8.63308 7.776865 C 8.628201 7.788043 8.620145 7.806136 8.615178 7.817071 C 8.610211 7.828006 8.60083 7.848286 8.594332 7.862138 C 8.587832 7.875988 8.573873 7.904618 8.563307 7.92576 C 8.552743 7.946901 8.537873 7.975929 8.530265 7.990266 C 8.522656 8.004602 8.511053 8.026075 8.504479 8.037983 C 8.497905 8.04989 8.486739 8.069772 8.479666 8.082165 C 8.472593 8.094558 8.460988 8.11444 8.453878 8.126348 C 8.446768 8.138254 8.435438 8.156944 8.428702 8.167879 C 8.421966 8.178814 8.410628 8.196906 8.403507 8.208085 C 8.396386 8.219262 8.384013 8.238349 8.37601 8.2505 C 8.36801 8.26265 8.354345 8.282929 8.345645 8.295566 C 8.336946 8.308201 8.322885 8.328276 8.314397 8.340175 C 8.305909 8.352074 8.292209 8.37096 8.283951 8.382147 C 8.275693 8.393333 8.261178 8.41259 8.251695 8.42494 C 8.242211 8.437289 8.225837 8.458165 8.215304 8.471332 C 8.204773 8.484497 8.189062 8.503819 8.18039 8.514267 C 8.17172 8.524716 8.157459 8.541616 8.148703 8.551823 C 8.139945 8.562029 8.125004 8.579116 8.115499 8.589793 C 8.105992 8.600471 8.091457 8.616575 8.083197 8.625581 C 8.074937 8.634586 8.060843 8.649709 8.05188 8.659185 C 8.042916 8.668662 8.018659 8.69335 7.997974 8.714046 C 7.977291 8.734741 7.953162 8.758432 7.944355 8.766693 C 7.935549 8.774953 7.920821 8.788638 7.911628 8.797104 C 7.902433 8.805571 7.887569 8.819082 7.878597 8.827129 C 7.869623 8.835177 7.853733 8.849096 7.843284 8.858062 C 7.832834 8.867027 7.816133 8.881153 7.806171 8.889453 C 7.796208 8.897753 7.779904 8.911098 7.769942 8.919111 C 7.759978 8.927123 7.743874 8.939848 7.734154 8.947388 C 7.724434 8.954926 7.708329 8.96721 7.698366 8.974683 C 7.688403 8.982156 7.673093 8.993497 7.664346 8.999885 C 7.655598 9.006271 7.637505 9.019163 7.62414 9.02853 C 7.610775 9.037899 7.588109 9.053377 7.573772 9.062926 C 7.559434 9.072475 7.538474 9.086151 7.527194 9.093318 C 7.515913 9.100485 7.497422 9.112045 7.486104 9.119009 C 7.474786 9.125973 7.454846 9.137918 7.441793 9.145553 C 7.428741 9.153188 7.405677 9.166317 7.390542 9.174728 C 7.375406 9.18314 7.352087 9.19579 7.338722 9.20284 C 7.325357 9.209889 7.303686 9.221025 7.290564 9.227587 C 7.277442 9.234147 7.256366 9.2444 7.243731 9.250369 C 7.231095 9.256339 7.211213 9.265569 7.199549 9.27088 C 7.187884 9.27619 7.168797 9.28464 7.157134 9.289659 C 7.145469 9.294676 7.124792 9.303333 7.111184 9.308895 C 7.097576 9.31446 7.075367 9.323255 7.061831 9.328442 C 7.048295 9.333629 7.027816 9.341289 7.016323 9.345462 C 7.00483 9.349636 6.978328 9.358748 6.95743 9.365711 C 6.936532 9.372675 6.906311 9.382359 6.890272 9.38723 C 6.874235 9.392101 6.849581 9.399302 6.835486 9.403231 C 6.821393 9.40716 6.796739 9.413705 6.7807 9.417776 C 6.764662 9.421847 6.740208 9.427785 6.726356 9.430971 C 6.712505 9.434157 6.689641 9.439174 6.675548 9.442118 C 6.661452 9.445063 6.639384 9.449434 6.626504 9.451833 C 6.613625 9.454231 6.591038 9.458187 6.57631 9.460623 C 6.561581 9.463058 6.538518 9.46664 6.525058 9.468584 C 6.511598 9.470528 6.487662 9.473704 6.471867 9.475644 C 6.456071 9.477583 6.433207 9.480169 6.421057 9.481392 C 6.408907 9.482615 6.387236 9.4846 6.372898 9.485805 C 6.358561 9.487008 6.333112 9.488794 6.316345 9.489771 C 6.299578 9.490749 6.276316 9.491956 6.264652 9.492452 C 6.252987 9.492949 6.216803 9.493517 6.18424 9.493716 C 6.151678 9.493916 6.114499 9.493756 6.10162 9.493363 C 6.088739 9.49297 6.06866 9.492202 6.056995 9.491656 C 6.045331 9.491112 6.026046 9.490059 6.014138 9.489319 C 6.002231 9.488579 5.982548 9.487186 5.970398 9.486226 C 5.958248 9.485266 5.939956 9.483668 5.92975 9.482677 C 5.919544 9.481687 5.902445 9.479897 5.891753 9.478702 C 5.881061 9.477505 5.864443 9.475529 5.854823 9.47431 C 5.845204 9.47309 5.827708 9.470707 5.815943 9.469012 C 5.804178 9.467319 5.784412 9.464314 5.77202 9.462336 C 5.759627 9.460358 5.745908 9.458071 5.741535 9.457253 C 5.733583 9.455767 5.733583 9.455767 5.750813 9.451963 C 5.76029 9.449871 5.778183 9.445793 5.790576 9.442902 C 5.802969 9.440009 5.82305 9.435088 5.8352 9.431966 C 5.847351 9.428843 5.867067 9.423503 5.879014 9.420099 C 5.890961 9.416695 5.911639 9.410524 5.924964 9.406386 C 5.938288 9.402248 5.960324 9.395124 5.973932 9.390556 C 5.98754 9.385988 6.008053 9.378835 6.019516 9.374659 C 6.030978 9.370483 6.050462 9.363131 6.062815 9.358321 C 6.075166 9.353508 6.094417 9.34577 6.105595 9.341125 C 6.116774 9.336478 6.135264 9.328524 6.146685 9.323448 C 6.158106 9.318373 6.177591 9.309499 6.189984 9.303728 C 6.202377 9.297957 6.224247 9.287379 6.238585 9.280221 C 6.252921 9.273063 6.273399 9.262563 6.284092 9.256887 C 6.294784 9.251213 6.314865 9.240225 6.328716 9.232468 C 6.342567 9.224712 6.361654 9.213777 6.371131 9.208166 C 6.380608 9.202557 6.396514 9.192982 6.406477 9.18689 C 6.41644 9.180798 6.432345 9.170843 6.441822 9.164769 C 6.4513 9.158695 6.467404 9.14816 6.47761 9.141357 C 6.487816 9.134555 6.50392 9.123611 6.513398 9.117039 C 6.522875 9.110467 6.539177 9.098936 6.549627 9.091415 C 6.560077 9.083895 6.577971 9.070704 6.589391 9.062101 C 6.600812 9.053498 6.618895 9.039583 6.629575 9.031179 C 6.640255 9.022773 6.656757 9.009534 6.666247 9.001758 C 6.675736 8.993981 6.692227 8.980227 6.702893 8.971191 C 6.713559 8.962157 6.730458 8.94742 6.740448 8.938442 C 6.750437 8.929464 6.766562 8.914768 6.776282 8.905784 C 6.786003 8.896801 6.803698 8.880239 6.815604 8.868983 C 6.827512 8.857727 6.843456 8.842402 6.851037 8.834927 C 6.858617 8.827451 6.873728 8.812176 6.884615 8.800982 C 6.895503 8.789788 6.912683 8.77174 6.922792 8.760878 C 6.932902 8.750012 6.949699 8.731606 6.960117 8.719973 C 6.970537 8.70834 6.986147 8.690599 6.994807 8.68055 C 7.003467 8.670501 7.017852 8.65353 7.026772 8.642838 C 7.035693 8.632146 7.053 8.610872 7.065231 8.595562 C 7.077464 8.580254 7.09533 8.557407 7.104936 8.544792 C 7.114541 8.532177 7.129989 8.511499 7.139265 8.498842 C 7.14854 8.486185 7.164221 8.464337 7.174109 8.450293 C 7.183999 8.436249 7.199718 8.413383 7.209044 8.399484 C 7.218369 8.385583 7.232209 8.364666 7.2398 8.353003 C 7.247391 8.341338 7.260236 8.321177 7.268346 8.3082 C 7.276455 8.295223 7.289493 8.27395 7.297318 8.260925 C 7.305143 8.247901 7.317313 8.227304 7.32436 8.215153 C 7.331408 8.203004 7.344023 8.180735 7.352394 8.165669 C 7.360765 8.150602 7.372812 8.128534 7.379167 8.116627 C 7.385522 8.104719 7.396764 8.083248 7.404151 8.06891 C 7.411537 8.054573 7.422352 8.0331 7.428184 8.021194 C 7.434016 8.009287 7.443347 7.990001 7.448918 7.978336 C 7.45449 7.966672 7.463351 7.947784 7.468609 7.936364 C 7.473868 7.924943 7.482234 7.906453 7.4872 7.895274 C 7.492166 7.884096 7.500586 7.86481 7.505909 7.852417 C 7.511233 7.840024 7.519759 7.819808 7.524855 7.807493 C 7.529951 7.795179 7.538242 7.7747 7.543279 7.761986 C 7.548316 7.749271 7.556671 7.727735 7.561847 7.714127 C 7.567022 7.700519 7.57545 7.677853 7.580575 7.663759 C 7.585701 7.649664 7.594637 7.624414 7.600433 7.607646 C 7.60623 7.59088 7.615365 7.563642 7.620735 7.547118 C 7.626104 7.530593 7.634661 7.503554 7.63975 7.48703 C 7.644838 7.470506 7.653173 7.442472 7.658273 7.424733 C 7.663371 7.406994 7.671309 7.378562 7.675913 7.361553 C 7.680518 7.344542 7.688414 7.314123 7.69346 7.293953 C 7.698508 7.273784 7.705483 7.244955 7.708961 7.229889 C 7.712439 7.214823 7.717614 7.19176 7.720461 7.178638 C 7.723308 7.165516 7.728016 7.143247 7.730923 7.129154 C 7.733829 7.115059 7.738621 7.090804 7.74157 7.075251 C 7.74452 7.0597 7.749294 7.033455 7.752179 7.016931 C 7.755066 7.000407 7.759431 6.974154 7.761884 6.958592 C 7.764333 6.94303 7.768123 6.917978 7.770304 6.902922 C 7.772485 6.887866 7.775877 6.86322 7.777843 6.848155 C 7.779809 6.833088 7.783001 6.807043 7.784938 6.790275 C 7.786876 6.773509 7.789651 6.74806 7.791106 6.733722 C 7.792561 6.719385 7.794953 6.693936 7.796421 6.677169 C 7.797888 6.660402 7.800071 6.632964 7.801272 6.616198 C 7.802474 6.599431 7.804076 6.575174 7.804832 6.562295 C 7.80559 6.549416 7.806592 6.532119 7.807061 6.523856 C 7.807529 6.515595 7.80835 6.421553 7.808886 6.314875 C 7.809421 6.208197 7.809724 6.003942 7.80956 5.860975 C 7.809398 5.718009 7.809015 5.600789 7.808712 5.600486 C 7.808408 5.600182 7.68663 5.63752 7.538092 5.68346 C 7.389553 5.7294 7.213946 5.783698 7.147853 5.804122 C 7.08176 5.824546 6.974794 5.857548 6.910151 5.877461 C 6.845508 5.897371 6.776261 5.918652 6.75627 5.924749 C 6.736279 5.930848 6.719744 5.935658 6.719525 5.93544 C 6.719306 5.935221 6.790938 5.857274 6.878708 5.762224 C 6.966477 5.667175 7.110461 5.511271 7.198671 5.415771 C 7.286881 5.320272 7.433807 5.161213 7.525173 5.062309 C 7.616539 4.963404 7.76605 4.801562 7.857421 4.702663 C 7.948792 4.603762 8.093983 4.446596 8.180069 4.353404 C 8.266154 4.260212 8.341831 4.178411 8.34824 4.171626 L 8.359893 4.159288 Z M 3.639928 8.15987 C 3.639606 8.15984 3.567056 8.081517 3.478708 7.985821 C 3.390359 7.890125 3.197014 7.680786 3.049051 7.520623 C 2.901089 7.36046 2.662314 7.101986 2.518441 6.946236 C 2.374568 6.790486 2.198977 6.60038 2.128238 6.523779 C 2.0575 6.447177 1.999793 6.384333 2 6.384126 C 2.000208 6.383919 2.024487 6.391125 2.053954 6.40014 C 2.083422 6.409154 2.157237 6.431839 2.217988 6.450549 C 2.278738 6.469259 2.375968 6.499262 2.434052 6.517222 C 2.492137 6.535182 2.553174 6.55407 2.569692 6.559195 C 2.586209 6.564321 2.709718 6.602509 2.844157 6.644057 C 2.978595 6.685606 3.089538 6.719839 3.090698 6.72013 C 3.092807 6.72066 3.092807 6.72066 3.092866 6.520418 C 3.092898 6.410285 3.093306 6.18985 3.093772 6.030562 C 3.094553 5.763748 3.094752 5.738617 3.096295 5.711344 C 3.097217 5.695064 3.098611 5.671603 3.099395 5.659211 C 3.100178 5.646816 3.101808 5.623754 3.103017 5.607958 C 3.104227 5.592164 3.106418 5.566515 3.107887 5.550963 C 3.109355 5.535411 3.111941 5.51036 3.113633 5.495295 C 3.115324 5.480227 3.118114 5.456767 3.119833 5.443159 C 3.121551 5.429551 3.124544 5.407283 3.126484 5.393674 C 3.128424 5.380066 3.13179 5.357599 3.133963 5.343748 C 3.136135 5.329897 3.139918 5.307034 3.142369 5.292939 C 3.144819 5.278845 3.149205 5.254788 3.152116 5.239479 C 3.155027 5.224168 3.159971 5.199397 3.163101 5.184428 C 3.16623 5.169459 3.171352 5.145801 3.174481 5.131851 C 3.17761 5.117902 3.182986 5.094759 3.18643 5.080422 C 3.189873 5.066085 3.19569 5.042824 3.199356 5.028729 C 3.203022 5.014635 3.208965 4.992367 3.212563 4.979245 C 3.21616 4.966123 3.222479 4.943855 3.226605 4.929761 C 3.230732 4.915667 3.237681 4.892604 3.242049 4.878509 C 3.246417 4.864415 3.253638 4.84175 3.258096 4.828142 C 3.262555 4.814533 3.270171 4.792067 3.275023 4.778216 C 3.279873 4.764364 3.287818 4.742096 3.292678 4.728731 C 3.297538 4.715366 3.3052 4.694689 3.309704 4.682783 C 3.31421 4.670875 3.322696 4.649137 3.328563 4.634478 C 3.33443 4.619817 3.343463 4.597748 3.348639 4.585434 C 3.353813 4.573122 3.36204 4.553902 3.36692 4.542725 C 3.371799 4.531547 3.379856 4.513454 3.384823 4.502518 C 3.389789 4.491583 3.39917 4.471303 3.405668 4.457452 C 3.412167 4.443601 3.426129 4.414971 3.436694 4.39383 C 3.44726 4.372689 3.461914 4.344058 3.469262 4.330207 C 3.476608 4.316357 3.488427 4.294487 3.495524 4.281607 C 3.502622 4.268728 3.514584 4.247454 3.522105 4.234332 C 3.529628 4.22121 3.541034 4.201699 3.547455 4.190976 C 3.553874 4.180251 3.564621 4.162556 3.571336 4.151653 C 3.578052 4.14075 3.589372 4.122683 3.596493 4.111505 C 3.603614 4.100327 3.615987 4.081241 3.623989 4.069091 C 3.631991 4.056941 3.645655 4.036661 3.654354 4.024024 C 3.663054 4.011388 3.677115 3.991314 3.685603 3.979416 C 3.694091 3.967517 3.707792 3.948628 3.716049 3.937443 C 3.724308 3.926256 3.738823 3.906999 3.748305 3.89465 C 3.757787 3.882301 3.774164 3.861424 3.784696 3.848259 C 3.795227 3.835093 3.810939 3.815771 3.81961 3.805323 C 3.828281 3.794872 3.84254 3.777973 3.851297 3.767766 C 3.860054 3.757562 3.874996 3.740475 3.884502 3.729796 C 3.894008 3.719119 3.908543 3.703013 3.916803 3.694009 C 3.925064 3.685003 3.939156 3.669882 3.94812 3.660404 C 3.957083 3.650928 3.981341 3.626241 4.002025 3.605544 C 4.02271 3.584848 4.046838 3.561157 4.055645 3.552897 C 4.064451 3.544637 4.079179 3.530951 4.088373 3.522486 C 4.097566 3.514019 4.11243 3.500508 4.121404 3.49246 C 4.130376 3.484412 4.146267 3.470493 4.156716 3.461528 C 4.167165 3.452562 4.183867 3.438437 4.19383 3.430137 C 4.203792 3.421837 4.220096 3.408491 4.230059 3.400478 C 4.240022 3.392467 4.256126 3.379735 4.265846 3.372187 C 4.275566 3.364638 4.294852 3.349997 4.308703 3.33965 C 4.322554 3.329302 4.342636 3.314602 4.353327 3.306981 C 4.364019 3.299361 4.382311 3.28654 4.393975 3.27849 C 4.405639 3.270441 4.42466 3.257609 4.436245 3.249977 C 4.447829 3.242345 4.465922 3.230637 4.476451 3.223961 C 4.486979 3.217284 4.504342 3.206445 4.515034 3.199872 C 4.525727 3.193299 4.545155 3.181674 4.558207 3.174039 C 4.571259 3.166403 4.594323 3.153273 4.609458 3.14486 C 4.624594 3.13645 4.647913 3.123799 4.661278 3.11675 C 4.674643 3.1097 4.696314 3.098564 4.709436 3.092004 C 4.722558 3.085442 4.74403 3.075004 4.757153 3.068806 C 4.770275 3.062607 4.791488 3.052789 4.804292 3.046986 C 4.817096 3.041182 4.837177 3.03234 4.848916 3.027336 C 4.860656 3.022333 4.879611 3.014428 4.89104 3.009769 C 4.902469 3.00511 4.923146 2.996942 4.93699 2.991619 C 4.950833 2.986296 4.971702 2.978476 4.983366 2.97424 C 4.99503 2.970004 5.021672 2.960841 5.042571 2.953878 C 5.063468 2.946914 5.093689 2.937231 5.109727 2.93236 C 5.125765 2.927489 5.150419 2.920288 5.164514 2.916359 C 5.178607 2.912431 5.203261 2.905885 5.219299 2.901814 C 5.235338 2.897742 5.259793 2.891805 5.273643 2.888619 C 5.287495 2.885432 5.310359 2.880417 5.324453 2.877472 C 5.338548 2.874528 5.360616 2.870155 5.373496 2.867757 C 5.386374 2.865358 5.408962 2.861403 5.42369 2.858968 C 5.438418 2.856532 5.461482 2.85295 5.474941 2.851007 C 5.488403 2.849062 5.512338 2.845885 5.528134 2.843946 C 5.543929 2.842007 5.566793 2.83942 5.578943 2.838198 C 5.591094 2.836976 5.612764 2.83499 5.627101 2.833786 C 5.641439 2.832582 5.666887 2.830797 5.683655 2.829821 C 5.700423 2.828844 5.724281 2.827635 5.736673 2.827131 C 5.749067 2.826628 5.779487 2.825963 5.804273 2.825654 C 5.831717 2.825312 5.864715 2.825499 5.888661 2.826133 C 5.910288 2.826705 5.935936 2.827562 5.945656 2.828037 C 5.955376 2.828513 5.97327 2.829513 5.98542 2.830258 C 5.99757 2.831004 6.017452 2.832401 6.029602 2.833363 C 6.041752 2.834323 6.060044 2.83592 6.07025 2.836912 C 6.080456 2.837903 6.097554 2.839693 6.108246 2.840889 C 6.118938 2.842084 6.135557 2.84406 6.145177 2.84528 C 6.154796 2.846498 6.172292 2.848883 6.184057 2.850577 C 6.195822 2.852271 6.215388 2.855248 6.227539 2.857194 C 6.239688 2.859139 6.253395 2.861429 6.257997 2.862283 C 6.266363 2.863834 6.266363 2.863834 6.249159 2.867633 C 6.239698 2.869721 6.221817 2.873796 6.209424 2.876689 C 6.197031 2.87958 6.17695 2.884501 6.1648 2.887624 C 6.152649 2.890747 6.132933 2.896087 6.120986 2.899491 C 6.109038 2.902895 6.088361 2.909066 6.075037 2.913204 C 6.061712 2.917341 6.039675 2.924465 6.026067 2.929032 C 6.012459 2.933601 5.991946 2.940756 5.980484 2.944931 C 5.969021 2.949106 5.949537 2.95646 5.937186 2.961273 C 5.924834 2.966085 5.905422 2.973896 5.894048 2.978628 C 5.882673 2.983361 5.864182 2.991314 5.852958 2.996302 C 5.841733 3.001288 5.822409 3.010091 5.810017 3.015862 C 5.797623 3.021632 5.775753 3.032209 5.761416 3.039369 C 5.747078 3.046527 5.726601 3.057027 5.715909 3.062701 C 5.705216 3.068377 5.685135 3.079366 5.671284 3.087121 C 5.657433 3.094877 5.638347 3.105814 5.628869 3.111423 C 5.619392 3.117034 5.603487 3.126609 5.593524 3.1327 C 5.58356 3.138793 5.567655 3.148746 5.558177 3.15482 C 5.5487 3.160895 5.532596 3.171429 5.522389 3.178233 C 5.512184 3.185035 5.496079 3.195978 5.486602 3.202551 C 5.477125 3.209123 5.460822 3.220655 5.450372 3.228179 C 5.439923 3.235703 5.423421 3.247832 5.413702 3.255136 C 5.403981 3.262436 5.386883 3.27556 5.375705 3.284297 C 5.364527 3.293035 5.346831 3.307168 5.336382 3.315704 C 5.325933 3.32424 5.308455 3.338784 5.297544 3.348024 C 5.286631 3.357265 5.269532 3.372169 5.259547 3.381148 C 5.249561 3.390125 5.233438 3.404821 5.223718 3.413807 C 5.213998 3.422791 5.196302 3.439351 5.184396 3.450605 C 5.172488 3.461862 5.156544 3.477188 5.148963 3.484664 C 5.141382 3.492139 5.126272 3.507414 5.115385 3.518608 C 5.104497 3.529801 5.087317 3.547848 5.077208 3.558713 C 5.067098 3.569577 5.050301 3.587983 5.039882 3.599617 C 5.029463 3.61125 5.013853 3.62899 5.005193 3.639039 C 4.996532 3.649089 4.982148 3.666059 4.973228 3.676752 C 4.964307 3.687445 4.947 3.708717 4.934769 3.724027 C 4.922537 3.739336 4.90467 3.762184 4.895064 3.774798 C 4.885458 3.787414 4.870011 3.808089 4.860735 3.820748 C 4.85146 3.833405 4.835779 3.855252 4.825891 3.869297 C 4.816002 3.883342 4.800281 3.906206 4.790956 3.920107 C 4.781631 3.934007 4.767791 3.954923 4.760201 3.966587 C 4.75261 3.978251 4.739764 3.998412 4.731654 4.01139 C 4.723545 4.024366 4.710507 4.04564 4.702682 4.058664 C 4.694856 4.071689 4.682687 4.092286 4.67564 4.104437 C 4.668592 4.116586 4.655977 4.138854 4.647606 4.15392 C 4.639235 4.168986 4.627187 4.191055 4.620833 4.202963 C 4.614478 4.214869 4.603237 4.236342 4.59585 4.250679 C 4.588463 4.265017 4.577648 4.286489 4.571816 4.298396 C 4.565984 4.310304 4.556654 4.329589 4.551082 4.341253 C 4.54551 4.352918 4.536649 4.371806 4.53139 4.383226 C 4.526132 4.394647 4.517766 4.413137 4.512801 4.424315 C 4.507834 4.435493 4.499414 4.45478 4.494091 4.467174 C 4.488767 4.479566 4.480241 4.499781 4.475145 4.512096 C 4.470048 4.524411 4.461758 4.544889 4.456721 4.557603 C 4.451684 4.570319 4.443329 4.591855 4.438153 4.605463 C 4.432978 4.619071 4.42455 4.641737 4.419425 4.65583 C 4.414299 4.669925 4.405364 4.695175 4.399567 4.711941 C 4.393771 4.72871 4.384635 4.755947 4.379265 4.772473 C 4.373896 4.788996 4.365339 4.816035 4.36025 4.83256 C 4.355162 4.849085 4.346827 4.877117 4.341728 4.894857 C 4.336629 4.912596 4.328691 4.941027 4.324087 4.958037 C 4.319483 4.975048 4.311586 5.005467 4.30654 5.025636 C 4.301492 5.045806 4.294517 5.074635 4.291039 5.0897 C 4.287562 5.104767 4.282386 5.12783 4.279539 5.140952 C 4.276692 5.154074 4.271984 5.176342 4.269077 5.190436 C 4.266171 5.20453 4.261379 5.228786 4.25843 5.244339 C 4.25548 5.259891 4.250707 5.286135 4.24782 5.302659 C 4.244935 5.319183 4.240569 5.345436 4.238118 5.360997 C 4.235666 5.37656 4.231877 5.40161 4.229696 5.416667 C 4.227515 5.431724 4.224122 5.456368 4.222157 5.471435 C 4.220191 5.486501 4.216998 5.512547 4.215061 5.529314 C 4.213124 5.546082 4.210349 5.571529 4.208893 5.585867 C 4.207439 5.600204 4.205048 5.625653 4.20358 5.642421 C 4.202112 5.659187 4.199928 5.686625 4.198727 5.703393 C 4.197526 5.720159 4.195924 5.744415 4.195167 5.757294 C 4.194409 5.770174 4.193407 5.787471 4.192938 5.795733 C 4.192471 5.803995 4.19165 5.898036 4.191115 6.004715 C 4.19058 6.111393 4.190277 6.315648 4.190439 6.458614 C 4.190602 6.601581 4.190984 6.718802 4.191288 6.719105 C 4.191591 6.719408 4.313371 6.682069 4.461908 6.636129 C 4.610447 6.590189 4.786054 6.535892 4.852147 6.515468 C 4.91824 6.495043 5.025205 6.462041 5.089849 6.442131 C 5.154491 6.422219 5.223739 6.400939 5.243729 6.39484 C 5.263721 6.388742 5.280256 6.383932 5.280475 6.38415 C 5.280694 6.384369 5.209062 6.462315 5.121291 6.557364 C 5.033521 6.652413 4.889537 6.808317 4.801327 6.903816 C 4.713117 6.999316 4.56619 7.158374 4.474826 7.25728 C 4.383461 7.356185 4.23395 7.518026 4.14258 7.616927 C 4.051209 7.715828 3.906015 7.872994 3.819926 7.966186 C 3.733837 8.059378 3.658251 8.141094 3.651957 8.147776 C 3.645663 8.154458 3.64025 8.159901 3.639928 8.15987 Z",_o=s=>{var b;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=fe.nameOffsetX,nameOffsetY:l=fe.nameOffsetY,outOfStation:h=fe.outOfStation}=(b=n[k.BjsubwayInt])!=null?b:fe,u=x.useCallback(_=>d(t,_),[t,d]),c=x.useCallback(_=>i(t,_),[t,i]),p=x.useCallback(_=>f(t,_),[t,f]),g=(_,O)=>_==="left"&&O==="top"?[-5,-m[1].split("\n").length*ne[O]-4]:_==="middle"&&O==="top"?[0,-m[1].split("\n").length*ne[O]-7]:_==="right"&&O==="top"?[5,-m[1].split("\n").length*ne[O]-4]:_==="left"&&O==="bottom"?[-5,m[0].split("\n").length*ne[O]+4]:_==="middle"&&O==="bottom"?[0,m[0].split("\n").length*ne[O]+7]:_==="right"&&O==="bottom"?[5,m[0].split("\n").length*ne[O]+4]:_==="left"&&O==="middle"?[-8,0]:_==="right"&&O==="middle"?[8,0]:[0,0],[C,y]=g(r,l),j=r==="left"?"end":r==="right"?"start":"middle";return a.jsxs("g",{id:t,children:[a.jsxs("g",{transform:"translate(".concat(e-6,", ").concat(o-6,")"),children:[a.jsx("circle",{cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",fill:"white"}),a.jsx("path",{d:za,fill:h?"#898989":"black",stroke:h?"#898989":"black",strokeWidth:"0.533618",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("circle",{id:"stn_core_".concat(t),cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",strokeOpacity:"0",fill:"white",fillOpacity:"0",onPointerDown:u,onPointerMove:c,onPointerUp:p,style:{cursor:"move"},className:"removeMe"})]}),a.jsxs("g",{transform:"translate(".concat(e+C,", ").concat(o+y,")"),textAnchor:j,children:[a.jsx(I,{text:m[0].split("\n"),fontSize:ne.zh,lineHeight:ne.zh,grow:"up",className:"rmp-name__zh",baseOffset:1}),a.jsx(I,{text:m[1].split("\n"),fontSize:ne.en,lineHeight:ne.en,grow:"down",className:"rmp-name__en",baseOffset:1})]})]})},fe={...T,nameOffsetX:"right",nameOffsetY:"top",outOfStation:!1},wo=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:s=>(s!=null?s:fe).names[0],onChange:(s,t)=>{const e=t!=null?t:fe;return e.names[0]=s.toString(),e}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:s=>(s!=null?s:fe).names[1],onChange:(s,t)=>{const e=t!=null?t:fe;return e.names[1]=s.toString(),e}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:s=>(s!=null?s:fe).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:s=>(s==null?void 0:s.nameOffsetY)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:fe;return e.nameOffsetX=s,e}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:s=>(s!=null?s:fe).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:s=>(s==null?void 0:s.nameOffsetX)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:fe;return e.nameOffsetY=s,e}},{type:"switch",label:"panel.details.stations.bjsubwayInt.outOfStation",oneLine:!0,isChecked:s=>(s!=null?s:fe).outOfStation,onChange:(s,t)=>{const e=t!=null?t:fe;return e.outOfStation=s,e}}],So=()=>a.jsx(vn,{fields:wo}),No=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsxs("g",{transform:"translate(6, 6)",children:[a.jsx("circle",{cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",fill:"white"}),a.jsx("path",{d:za,stroke:"black",strokeWidth:"0.533618",strokeLinecap:"round",strokeLinejoin:"round"})]})}),ko={component:_o,icon:No,defaultAttrs:fe,attrsComponent:So,metadata:{displayName:"panel.details.stations.bjsubwayInt.displayName",cities:[B.Beijing],canvas:[G.RailMap],categories:[V.Metro],tags:["interchange"]}};function Mo(s){const{interchangeList:t,onAdd:e,onDelete:o,onUpdate:n}=s,d=it(),{paletteAppClip:{output:i}}=lt(h=>h.runtime),{t:f}=D(),[m,r]=x.useState();x.useEffect(()=>{m!==void 0&&i&&(n==null||n(m,[...i,t[m][4],t[m][5]]),r(void 0))},[i==null?void 0:i.toString()]);const l=t.map((h,u)=>[{type:"input",label:f("panel.details.stations.common.lineCode"),value:h[4],minW:"80px",onChange:c=>n==null?void 0:n(u,[h[0],h[1],h[2],h[3],c,h[5]])},{type:"input",label:f("panel.details.stations.common.stationCode"),value:h[5],minW:"80px",onChange:c=>n==null?void 0:n(u,[h[0],h[1],h[2],h[3],h[4],c])}]);return a.jsxs(jn,{direction:"column",children:[t.length===0&&a.jsxs(Ke,{spacing:.5,"data-testid":"interchange-card-stack",children:[a.jsx(_n,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:f("panel.details.stations.interchange.noInterchanges")}),a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.add"),onClick:()=>e==null?void 0:e([B.Shanghai,"","#aaaaaa",W.white,"",""]),icon:a.jsx(De,{})})]}),t.map((h,u)=>a.jsxs(Ke,{spacing:.5,"data-testid":"interchange-card-stack-".concat(u),children:[a.jsx(ue,{label:f("color"),minW:"40px",noLabel:u!==0,children:a.jsx(Ht,{theme:[h[0],h[1],h[2],h[3]],onClick:()=>{r(u),d(Ut([h[0],h[1],h[2],h[3]]))}})}),a.jsx(L,{fields:l[u],noLabel:u!==0}),e&&u===l.length-1?a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.copy"),onClick:()=>e==null?void 0:e(t.slice(-1)[0]),icon:a.jsx(On,{})}):a.jsx(wn,{minW:8}),o&&a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.remove"),onClick:()=>o==null?void 0:o(u),icon:a.jsx(vt,{})})]},u))]})}const qt=s=>{var C;const{stationType:t,defaultAttrs:e,maximumTransfers:o}=s,{t:n}=D(),d=it(),i=x.useCallback(()=>{d(Ct()),d(yt(r.current.export()))},[d,Ct,yt]),{selected:f}=lt(y=>y.runtime),[m]=f,r=x.useRef(window.graph),l=m&&r.current.hasNode(m)&&r.current.getNodeAttribute(m,"type")===t?r.current.getNodeAttribute(m,t):e,h=(C=l.transfer)!=null?C:e.transfer,u=y=>j=>{const b=structuredClone(h);if(b.length<=y)for(let _=b.length;_<=y;_++)b[_]=[];b[y].push(j),l.transfer=b,r.current.mergeNodeAttributes(m,{[t]:l}),i()},c=y=>j=>{if(h.length>y&&h[y].length>j){const b=h.map((_,O)=>O===y?_.filter((N,w)=>w!==j):_);l.transfer=b,r.current.mergeNodeAttributes(m,{[t]:l}),i()}},p=y=>(j,b)=>{if(h.length>y&&h[y].length>j){const _=h.map((O,N)=>N===y?O.map((w,v)=>v===j?[0,1,2,3,4,5].map(A=>b[A]===void 0?w[A]:b[A]):w):O);l.transfer=_,r.current.mergeNodeAttributes(m,{[t]:l}),i()}},g=()=>u(l.transfer.length)([B.Guangzhou,"","#AAAAAA",W.white,"",""]);return a.jsxs(et,{align:"flex-start",children:[l.transfer.map((y,j)=>a.jsxs(x.Fragment,{children:[a.jsx(Ft,{size:"xs",children:n(j===0?"panel.details.stations.interchange.within":j===1?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),a.jsx(Mo,{interchangeList:y,onAdd:o[j]>y.length?u(j):void 0,onDelete:c(j),onUpdate:p(j)})]},j)),o[l.transfer.length]>0&&a.jsx(ye,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:a.jsx(De,{}),onClick:g,children:n("panel.details.stations.interchange.addGroup")})]})},pt=5,Kt=5,Ao={top:7.5+1,middle:0,bottom:11},zo=(s,t=pt,e=[])=>{const o=Math.sqrt(s*s-t*t/4),n=e.length<2?e.length+1:e.length;let d="M -5,0 A ".concat(s,",").concat(s,",0,0,1,").concat(-t/2,",-").concat(o," ");for(let i=0;i=0;i=i-1)d+="A ".concat(s,",").concat(s,",0,0,1,").concat(i*t-t/2,",").concat(o," ");return d+="A ".concat(s,",").concat(s,",0,0,1,-5,0 Z"),d},Bo=s=>{var M;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=re.nameOffsetX,nameOffsetY:l=re.nameOffsetY,transfer:h=re.transfer,rotate:u=re.rotate}=(M=n[k.MTR])!=null?M:re,c=x.useCallback(S=>d(t,S),[t,d]),p=x.useCallback(S=>i(t,S),[t,i]),g=x.useCallback(S=>f(t,S),[t,f]),C=h.at(0),y=zo(Kt,pt,C),j=C.length===0?0:C.length<=2?1:C.length-1,b=Math.cos(u*Math.PI/180)*j*Kt,_=Math.sin(u*Math.PI/180)*j*Kt,O=r==="left"?-8:r==="right"?8:0,N=Math.sign(b)===Math.sign(O)?b+O:O,w=(m[ee[l].namesPos].split("\n").length*Ao[l]+6)*ee[l].polarity,v=Math.sign(_)===Math.sign(w)?_+w:w,A=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("path",{transform:"rotate(".concat(u,")"),d:y,stroke:"#001f50",strokeWidth:"1.5",fill:"white",onPointerDown:c,onPointerMove:p,onPointerUp:g,style:{cursor:"move"}}),h.at(0).length>1&&h.at(0).map(S=>S[2]).map((S,z)=>a.jsx("line",{transform:"rotate(".concat(u,")"),x1:-5/2+z*pt,x2:pt/2+z*pt,stroke:S,strokeWidth:"2"},"".concat(z,"_").concat(S))),a.jsx("path",{id:"stn_core_".concat(t),transform:"rotate(".concat(u,")"),d:y,fill:"white",fillOpacity:"0",onPointerDown:c,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},className:"removeMe"}),a.jsxs("g",{transform:"translate(".concat(N,", ").concat(v,")"),textAnchor:A,className:"rmp-name-outline",strokeWidth:"1.25",children:[a.jsx(I,{text:m[0].split("\n"),fontSize:10,lineHeight:10,grow:"up",baseOffset:1,fill:"#001f50",className:"rmp-name__mtr__zh"}),a.jsx(I,{text:m[1].split("\n"),fontSize:7.5,lineHeight:7.5,grow:"down",baseOffset:1,fill:"#001f50",className:"rmp-name__mtr__en"})]})]}),[t,e,o,...m,u,JSON.stringify(h),r,l,c,p,g])},re={names:["車站","Stn"],nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[]]},Io=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:s=>(s!=null?s:re).names[0],onChange:(s,t)=>{const e=t!=null?t:re;return e.names[0]=s.toString(),e}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:s=>(s!=null?s:re).names[1],onChange:(s,t)=>{const e=t!=null?t:re;return e.names[1]=s.toString(),e}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:s=>(s!=null?s:re).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:s=>(s==null?void 0:s.nameOffsetY)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:re;return e.nameOffsetX=s,e}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:s=>(s!=null?s:re).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:s=>(s==null?void 0:s.nameOffsetX)==="middle"?["middle"]:[],onChange:(s,t)=>{const e=t!=null?t:re;return e.nameOffsetY=s,e}},{type:"select",label:"panel.details.stations.common.rotate",value:s=>{var t;return(t=s==null?void 0:s.rotate)!=null?t:re.rotate},hidden:s=>{var t,e,o;return((o=(e=(t=s==null?void 0:s.transfer)==null?void 0:t.flat())==null?void 0:e.length)!=null?o:0)===0},options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:(s,t)=>{const e=t!=null?t:re;return e.rotate=Number(s),e}},{type:"custom",label:"panel.details.stations.interchange.title",component:a.jsx(qt,{stationType:k.MTR,defaultAttrs:re,maximumTransfers:[99,0,0]})}],Po=()=>a.jsx(vn,{fields:Io}),To=a.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:a.jsx("circle",{cx:"12",cy:"12",r:"5",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})}),$o={component:Bo,icon:To,defaultAttrs:re,attrsComponent:Po,metadata:{displayName:"panel.details.stations.mtr.displayName",cities:[B.Hongkong],canvas:[G.RailMap],categories:[V.Metro],tags:[]}},_t=x.forwardRef((s,t)=>{const{text:e,lineWidth:o,grow:n,dominantBaseline:d=n==="left"?"hanging":n==="right"?"auto":"central",baseOffset:i=2,baseDY:f=0,...m}=s,r=n==="bidirectional"?-((e.length-1)*o)/2:0;return a.jsx("g",{ref:t,children:[...e].reverse().map((l,h,u)=>a.jsx("text",{x:(h*o+i)*(n==="left"?-1:1)+r,dy:(h-(u.length-1)/2)*f,writingMode:"vertical-rl",dominantBaseline:d,...m,children:l},"".concat(l).concat(h)))})});_t.displayName="MultilineTextVertical";const le={zh:{size:10,baseOffset:1},en:{size:5,baseOffset:1.5}},en={top:{lineHeight:5,offset:1+le.en.baseOffset+2.5,polarity:-1},middle:{lineHeight:0,offset:le.zh.size/2,polarity:1},bottom:{lineHeight:10,offset:0+le.zh.baseOffset+2.5,polarity:1}},Eo=s=>{var N;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,color:r=Me.color,nameOffsetX:l=Me.nameOffsetX,nameOffsetY:h=Me.nameOffsetY,textVertical:u=Me.textVertical}=(N=n[k.SuzhouRTBasic])!=null?N:Me,c=x.useCallback(w=>d(t,w),[t,d]),p=x.useCallback(w=>i(t,w),[t,i]),g=x.useCallback(w=>f(t,w),[t,f]),C=l==="left"?-5:l==="right"?5:0,y=(m[ee[h].namesPos].split("\n").length*en[h].lineHeight+en[h].offset)*en[h].polarity,j=l==="left"?"end":l==="right"?"start":"middle",b=h==="top"?-2.5-2:2.5+2,_=h==="top"?"end":"start",O=m[0].split("\n").length*le.zh.size/2+le.en.baseOffset;return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("circle",{id:"stn_core_".concat(t),r:3,stroke:r[2],strokeWidth:"1",fill:"white",onPointerDown:c,onPointerMove:p,onPointerUp:g,style:{cursor:"move"}}),u?a.jsxs(a.Fragment,{children:[a.jsx("g",{transform:"translate(-1, ".concat(b,")"),textAnchor:_,children:a.jsx(_t,{text:m[0].split("\n"),fontSize:le.zh.size,lineWidth:le.zh.size,grow:"bidirectional",baseOffset:le.zh.baseOffset,dominantBaseline:"central",className:"rmp-name__zh"})}),a.jsx("g",{transform:"translate(".concat(O,", ").concat(b,")rotate(90)"),textAnchor:_,children:a.jsx(I,{text:m[1].split("\n"),fontSize:le.en.size,lineHeight:le.en.size,grow:"up",baseOffset:le.en.baseOffset,className:"rmp-name__en",dominantBaseline:"central",fill:"gray"})})]}):a.jsxs("g",{transform:"translate(".concat(C,", ").concat(y,")"),textAnchor:j,children:[a.jsx(I,{text:m[0].split("\n"),fontSize:le.zh.size,lineHeight:le.zh.size,grow:"up",baseOffset:le.zh.baseOffset,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),fontSize:le.en.size,lineHeight:le.en.size,grow:"down",baseOffset:le.en.baseOffset,className:"rmp-name__en",fill:"gray"})]})]})},Me={...T,color:[B.Suzhou,"sz1","#78BA25",W.white],nameOffsetX:"right",nameOffsetY:"top",textVertical:!1},Ro=s=>{var i,f,m;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:r=>{e.names[0]=r,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:r=>{e.names[1]=r,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:(i=e.nameOffsetX)!=null?i:Me.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:r=>{e.nameOffsetX=r,e.nameOffsetX!=="middle"&&(e.textVertical=!1),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:(f=e.nameOffsetY)!=null?f:Me.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:r=>{e.nameOffsetY=r,e.nameOffsetY==="middle"&&(e.textVertical=!1),o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.suzhouRTBasic.textVertical"),isChecked:(m=e.textVertical)!=null?m:Me.textVertical,isDisabled:e.nameOffsetY==="middle"||e.nameOffsetX!=="middle",onChange:r=>{e.textVertical=r,o(t,e)},oneLine:!0,minW:"full"},{type:"custom",label:n("color"),component:a.jsx(Ee,{type:k.SuzhouRTBasic,defaultTheme:Me.color})}];return a.jsx(L,{fields:d})},Wo=a.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:a.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",fill:"none"})}),Do={component:Eo,icon:Wo,defaultAttrs:Me,attrsComponent:Ro,metadata:{displayName:"panel.details.stations.suzhouRTBasic.displayName",cities:[B.Suzhou],canvas:[G.RailMap],categories:[V.Metro],tags:[]}},dt=6,we={zh:{size:10,baseOffset:1},en:{size:5,baseOffset:1.5}},tn={top:{lineHeight:we.en.size,offset:0+we.en.baseOffset+3,polarity:-1},middle:{lineHeight:0,offset:we.zh.size/2,polarity:1},bottom:{lineHeight:we.zh.size,offset:0+we.zh.baseOffset+3,polarity:1}},Xo=s=>{var w,v;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Ae.nameOffsetX,nameOffsetY:l=Ae.nameOffsetY,rotate:h=Ae.rotate,transfer:u=Ae.transfer}=(w=n[k.SuzhouRTInt])!=null?w:Ae,c=x.useCallback(A=>d(t,A),[t,d]),p=x.useCallback(A=>i(t,A),[t,i]),g=x.useCallback(A=>f(t,A),[t,f]),C=(dt-1)*u.at(0).length+1,y=Math.abs(Math.cos(h*Math.PI/180)*C),j=Math.abs(Math.sin(h*Math.PI/180)*C),b=r==="left"?-1:r==="right"?1:0,_=(y/2+5)*b,O=(m[ee[l].namesPos].split("\n").length*tn[l].lineHeight+tn[l].offset+(l==="middle"?0:j/2))*tn[l].polarity,N=r==="left"?"end":r==="right"?"start":"middle";return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsxs("g",{transform:"rotate(".concat(h,")"),onPointerDown:c,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:[a.jsx("rect",{x:-C/2,y:-6/2,width:C,height:dt,ry:dt/2,stroke:"#616161",strokeWidth:"1",fill:"white"}),((v=u.at(0))!=null?v:[]).length>0&&u.at(0).map(A=>A[2]).map((A,M)=>a.jsx("circle",{r:2,cx:-C/2+3+M*5,fill:A},"".concat(M,"_").concat(A))),a.jsx("rect",{id:"stn_core_".concat(t),x:-C/2-.5,y:-6/2-.5,width:C+1,height:dt+1,ry:dt/2,fill:"white",opacity:"0"})]}),a.jsxs("g",{transform:"translate(".concat(_,", ").concat(O,")"),textAnchor:N,children:[a.jsx(I,{text:m[0].split("\n"),fontSize:we.zh.size,lineHeight:we.zh.size,grow:"up",baseOffset:we.zh.baseOffset,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),fontSize:we.en.size,lineHeight:we.en.size,grow:"down",baseOffset:we.en.baseOffset,className:"rmp-name__en",fill:"gray"})]})]})},Ae={...T,nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[[B.Suzhou,"sz1","#78BA25",W.white,"",""],[B.Suzhou,"sz2","#ED3240",W.white,"",""]]]},Lo=s=>{var i,f,m,r,l,h;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:u=>{e.names[0]=u,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:u=>{e.names[1]=u,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:(i=e.nameOffsetX)!=null?i:Ae.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:u=>{e.nameOffsetX=u,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:(f=e.nameOffsetY)!=null?f:Ae.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:u=>{e.nameOffsetY=u,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.rotate"),value:(m=e.rotate)!=null?m:Ae.rotate,hidden:((h=(l=(r=e==null?void 0:e.transfer)==null?void 0:r.flat())==null?void 0:l.length)!=null?h:0)===0,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:u=>{e.rotate=Number(u),o(t,e)},minW:"full"},{type:"custom",label:n("panel.details.stations.interchange.title"),component:a.jsx(qt,{stationType:k.SuzhouRTInt,defaultAttrs:Ae,maximumTransfers:[99,0,0]})}];return a.jsx(L,{fields:d})},Yo=a.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[a.jsx("rect",{x:"6",y:"9",width:"12",height:"6",ry:"3",stroke:"currentColor",fill:"none"}),a.jsx("circle",{r:"2",cx:"9.5",cy:"12",fill:"currentColor"}),a.jsx("circle",{r:"2",cx:"14.5",cy:"12",fill:"currentColor"})]}),Ho={component:Xo,icon:Yo,defaultAttrs:Ae,attrsComponent:Lo,metadata:{displayName:"panel.details.stations.suzhouRTInt.displayName",cities:[B.Suzhou],canvas:[G.RailMap],categories:[V.Metro],tags:[]}},ea={top:{lineHeight:6.67,offset:3.5+1.5+5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:-.17+1+5}},Uo=s=>{var j;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=nt.nameOffsetX,nameOffsetY:l=nt.nameOffsetY,color:h=nt.color}=(j=n[k.KunmingRTBasic])!=null?j:nt,u=x.useCallback(b=>d(t,b),[t,d]),c=x.useCallback(b=>i(t,b),[t,i]),p=x.useCallback(b=>f(t,b),[t,f]),g=r==="left"?-13.33:r==="right"?13.33:0,C=(m[ee[l].namesPos].split("\n").length*ea[l].lineHeight+ea[l].offset)*ee[l].polarity,y=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),onPointerDown:u,onPointerMove:c,onPointerUp:p,style:{cursor:"move"},children:[a.jsx("circle",{id:"stn_core_".concat(t),r:"5",stroke:h[2],strokeWidth:"1.33",fill:"white"}),a.jsxs("g",{transform:"translate(".concat(g,", ").concat(C,")"),textAnchor:y,className:"rmp-name-outline",strokeWidth:"2.5",children:[a.jsx(I,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...m,r,l,h,u,c,p])},nt={...T,nameOffsetX:"right",nameOffsetY:"top",color:[B.Kunming,"km1","#ea3222",W.white]},Fo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"custom",label:n("color"),component:a.jsx(Ee,{type:k.KunmingRTBasic,defaultTheme:nt.color})}];return a.jsx(L,{fields:d})},Vo=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("circle",{r:"5",cx:"12",cy:"12",stroke:"currentColor",strokeWidth:"1.33",fill:"none"})}),Go={component:Uo,icon:Vo,defaultAttrs:nt,attrsComponent:Fo,metadata:{displayName:"panel.details.stations.kunmingRTBasic.displayName",cities:[B.Kunming],canvas:[G.RailMap],categories:[V.Metro],tags:["interchange"]}},[It,ta]=[15,9],na={top:{lineHeight:6.67,offset:3.5+1.5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:-.17+1}},Zo=s=>{var w,v,A,M,S;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Qe.nameOffsetX,nameOffsetY:l=Qe.nameOffsetY,rotate:h=Qe.rotate,transfer:u=Qe.transfer}=(w=n[k.KunmingRTInt])!=null?w:Qe,c=x.useCallback(z=>d(t,z),[t,d]),p=x.useCallback(z=>i(t,z),[t,i]),g=x.useCallback(z=>f(t,z),[t,f]),C=h===0||h===180?It:h===90||h===270?ta:It*Math.SQRT1_2,y=h===0||h===180?ta:h===90||h===270?It:It*Math.SQRT1_2,j=r==="left"?-6.83:r==="right"?6.83:0,b=(Math.abs(j)+C/2)*Math.sign(j),_=(m[ee[l].namesPos].split("\n").length*na[l].lineHeight+na[l].offset)*ee[l].polarity,O=(Math.abs(_)+y/2)*Math.sign(_),N=r==="left"?"end":r==="right"?"start":"middle";return a.jsxs("g",{id:t,children:[a.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(h,")"),onPointerDown:c,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:u.at(0).length<=2?a.jsxs("g",{transform:"translate(-7.5,-4.5)",children:[a.jsx("rect",{id:"stn_core_".concat(t),height:"9",width:"15",ry:"4",stroke:"#393332",strokeWidth:"1",fill:"white"}),a.jsx("path",{fill:(A=(v=u.at(0).at(0))==null?void 0:v.at(2))!=null?A:"#ea3222",fillRule:"evenodd",stroke:"none",d:"M 3.833333 6.375 C 2.820813 6.375 2 5.535532 2 4.5 C 2 3.464468 2.820813 2.625 3.833333 2.625 L 4.444445 2.625 L 4.444445 2 L 6.888889 2.9375 L 4.444445 3.875 L 4.444445 3.25 L 3.833333 3.25 C 3.158321 3.25 2.611111 3.809647 2.611111 4.5 C 2.611111 5.190353 3.158321 5.75 3.833333 5.75 L 7.5 5.75 L 7.5 6.375 L 3.833333 6.375 Z"}),a.jsx("path",{fill:(S=(M=u.at(0).at(1))==null?void 0:M.at(2))!=null?S:"#03619e",fillRule:"evenodd",stroke:"none",d:"M 11.166667 2.625 C 12.179187 2.625 13 3.464468 13 4.5 C 13 5.535532 12.179187 6.375 11.166667 6.375 L 10.555555 6.375 L 10.555555 7 L 8.111111 6.0625 L 10.555555 5.125 L 10.555555 5.75 L 11.166667 5.75 C 11.841679 5.75 12.388889 5.190353 12.388889 4.5 C 12.388889 3.809647 11.841679 3.25 11.166667 3.25 L 7.5 3.25 L 7.5 2.625 L 11.166667 2.625 Z"})]}):a.jsxs("g",{transform:"translate(-8.5,-8.5)",children:[a.jsx("circle",{id:"stn_core_".concat(t),r:"8.5",cx:"8.5",cy:"8.5",stroke:"#000000",strokeWidth:"1",fill:"white"}),a.jsx("path",{fill:u.at(0).at(0).at(2),fillRule:"evenodd",stroke:"none",d:"M 8.900812 14 L 10.286572 11.992442 L 10.63521 12.569632 C 12.188999 11.790696 13.24999 10.23524 13.24999 8.441039 C 13.24999 8.070708 13.203481 7.710487 13.118152 7.365112 L 13.887206 7.365112 C 13.960998 7.712721 14 8.072591 14 8.441039 C 14 10.500518 12.789013 12.288074 11.01168 13.191653 L 11.411587 13.855702 L 8.900812 14 Z"}),a.jsx("path",{fill:u.at(0).at(1).at(2),fillRule:"evenodd",stroke:"none",d:"M 8 13.974609 C 5.462755 13.73554 3.426537 11.698185 3.0625 9.090137 L 2.5 9.090137 L 3.5 7 L 4.5 9.090137 L 4.074219 9.090137 C 4.422903 11.120208 6.015293 12.696354 8 12.925459 L 8 13.974609 Z"}),a.jsx("path",{fill:u.at(0).at(2).at(2),fillRule:"evenodd",stroke:"none",d:"M 12.68764 6.50351 L 10.588492 5.178213 L 11.35608 4.753726 C 10.531951 4.143034 9.498575 3.778666 8.375084 3.778666 C 6.644794 3.778666 5.125485 4.640751 4.260284 5.940329 L 3.718284 5.421978 C 4.730131 3.997121 6.438381 3.061381 8.375084 3.061381 C 9.781034 3.061381 11.063435 3.556896 12.04896 4.372667 L 12.536759 4.102285 L 12.68764 6.50351 Z"})]})}),a.jsxs("g",{transform:"translate(".concat(e+b,", ").concat(o+O,")"),textAnchor:N,className:"rmp-name-outline",strokeWidth:"2.5",children:[a.jsx(I,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),dx:r==="right"?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})},Qe={...T,nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[[B.Kunming,"km1","#ea3222",W.white,"",""],[B.Kunming,"km2","#03619e",W.white,"",""],[B.Kunming,"km3","#a13187",W.white,"",""]]]},qo=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:i=>{e.rotate=Number(i),o(t,e)},minW:"full"},{type:"custom",label:n("panel.details.stations.interchange.title"),component:a.jsx(qt,{stationType:k.KunmingRTInt,defaultAttrs:Qe,maximumTransfers:[3,0,0]})}];return a.jsx(L,{fields:d})},Qo=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsxs("g",{transform:"translate(3.5, 3.5)",children:[a.jsx("circle",{r:"8.5",cx:"8.5",cy:"8.5",stroke:"currentColor",strokeWidth:"1",fill:"none"}),a.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 8.900812 14 L 10.286572 11.992442 L 10.63521 12.569632 C 12.188999 11.790696 13.24999 10.23524 13.24999 8.441039 C 13.24999 8.070708 13.203481 7.710487 13.118152 7.365112 L 13.887206 7.365112 C 13.960998 7.712721 14 8.072591 14 8.441039 C 14 10.500518 12.789013 12.288074 11.01168 13.191653 L 11.411587 13.855702 L 8.900812 14 Z"}),a.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 8 13.974609 C 5.462755 13.73554 3.426537 11.698185 3.0625 9.090137 L 2.5 9.090137 L 3.5 7 L 4.5 9.090137 L 4.074219 9.090137 C 4.422903 11.120208 6.015293 12.696354 8 12.925459 L 8 13.974609 Z"}),a.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 12.68764 6.50351 L 10.588492 5.178213 L 11.35608 4.753726 C 10.531951 4.143034 9.498575 3.778666 8.375084 3.778666 C 6.644794 3.778666 5.125485 4.640751 4.260284 5.940329 L 3.718284 5.421978 C 4.730131 3.997121 6.438381 3.061381 8.375084 3.061381 C 9.781034 3.061381 11.063435 3.556896 12.04896 4.372667 L 12.536759 4.102285 L 12.68764 6.50351 Z"})]})}),Jo={component:Zo,icon:Qo,defaultAttrs:Qe,attrsComponent:qo,metadata:{displayName:"panel.details.stations.kunmingRTInt.displayName",cities:[B.Kunming],canvas:[G.RailMap],categories:[V.Metro],tags:["interchange"]}},aa=5.2,Lt=8.2628,yn=0,sa={top:{offset:Lt+yn,polarity:-1},middle:{offset:0,polarity:0},bottom:{offset:Lt+yn,polarity:1}},Ko=s=>{var v;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Te.nameOffsetX,nameOffsetY:l=Te.nameOffsetY,color:h=Te.color,lineCode:u=Te.lineCode,stationCode:c=Te.stationCode,isTram:p=Te.isTram}=(v=n[k.MRTBasic])!=null?v:Te,g=x.useCallback(A=>d(t,A),[t,d]),C=x.useCallback(A=>i(t,A),[t,i]),y=x.useCallback(A=>f(t,A),[t,f]),j=22.85,b=12.935,_=r==="left"?-1:r==="right"?1:0,O=(j/2+5)*_,N=sa[l].offset*sa[l].polarity,w=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,") ").concat(p?"scale(0.81)":""),children:[a.jsxs("g",{onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"},children:[a.jsx("rect",{x:-22.85/2,y:-12.935/2,rx:"3",ry:"6",width:j,height:b,fill:h[2],stroke:"white",strokeWidth:"1"}),a.jsx("text",{fontSize:aa,dx:"-4",dy:"0.5",className:"rmp-name__mrt",fill:h[3],textAnchor:"middle",dominantBaseline:"middle",children:u}),a.jsx("text",{fontSize:aa,dx:"4",dy:"0.5",className:"rmp-name__mrt",fill:h[3],textAnchor:"middle",dominantBaseline:"middle",children:c}),a.jsx("rect",{id:"stn_core_".concat(t),x:-22.85/2,y:-12.935/2,rx:"3",ry:"6",width:j,height:b,fill:"white",opacity:"0"})]}),a.jsx("g",{transform:"translate(".concat(O,", ").concat(N,")"),textAnchor:w,children:a.jsx(I,{text:m[0].split("\n"),fontSize:Lt,lineHeight:Lt,grow:l==="top"?"up":l==="middle"?"bidirectional":"down",baseOffset:yn,className:"rmp-name__mrt"})})]}),[t,e,o,...m,r,l,h,u,c,p,g,C,y])},Te={names:["Marina South Pier"],nameOffsetX:"right",nameOffsetY:"top",lineCode:"NS",stationCode:"28",isTram:!1,color:[B.Singapore,"nsl","#DA291C",W.white]},ei=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.common.lineCode"),value:e.lineCode,onChange:i=>{e.lineCode=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.common.stationCode"),value:e.stationCode,onChange:i=>{e.stationCode=i,o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.MRTBasic.isTram"),isChecked:e.isTram,onChange:i=>{e.isTram=i,o(t,e)},minW:"full",oneLine:!0},{type:"custom",label:n("color"),component:a.jsx(Ee,{type:k.MRTBasic,defaultTheme:Te.color})}];return a.jsx(L,{fields:d})},ti=a.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[a.jsx("rect",{x:"6",y:"8.6035",rx:"1.575",ry:"3.151",width:"12",height:"6.793",fill:"currentColor"}),a.jsx("text",{fontSize:"3.5",dx:"10",dy:"13",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"NS"}),a.jsx("text",{fontSize:"3.5",dx:"15",dy:"13",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"28"})]}),ni={component:Ko,icon:ti,defaultAttrs:Te,attrsComponent:ei,metadata:{displayName:"panel.details.stations.MRTBasic.displayName",cities:[B.Singapore],canvas:[G.RailMap],categories:[V.Metro],tags:[]}},oa=6.9,Yt=8.2628,ia=2.5,la={top:{offset:Yt+ia,polarity:-1},middle:{offset:0,polarity:0},bottom:{offset:Yt+ia,polarity:1}},ai=s=>{var w;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=at.nameOffsetX,nameOffsetY:l=at.nameOffsetY,transfer:h=at.transfer}=(w=n[k.MRTInt])!=null?w:at,u=x.useCallback(v=>d(t,v),[t,d]),c=x.useCallback(v=>i(t,v),[t,i]),p=x.useCallback(v=>f(t,v),[t,f]),g=h.at(0),C=(g.length-2)*29.625+57.8,y=16.77,j=[];for(let v=1;va.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("g",{onPointerDown:u,onPointerMove:c,onPointerUp:p,style:{cursor:"move"},children:h.map(v=>({info:v,width:(v.length-2)*29.625+57.8})).map(({info:v,width:A},M)=>a.jsxs(x.Fragment,{children:[a.jsx("rect",{x:-A/2,y:-16.77/2,rx:"4.5",ry:"8",width:A,height:y,fill:"url(#".concat(t,"_grad_").concat(M,")"),stroke:"white",strokeWidth:"1"}),a.jsx("linearGradient",{id:"".concat(t,"_grad_").concat(M),y1:"0%",y2:"0%",x1:"0%",x2:"100%",children:v.map((S,z)=>a.jsxs(x.Fragment,{children:[a.jsx("stop",{offset:"".concat(100/v.length*z,"%"),stopColor:S[2]}),a.jsx("stop",{offset:"".concat(100/v.length*(z+1),"%"),stopColor:S[2]})]},S[2]))}),j.map(S=>a.jsx("line",{x1:S/v.length*A-A/2,x2:S/v.length*A-A/2,y1:-16.77/2,y2:y/2,stroke:"white",strokeWidth:"1"},S)),v.map((S,z,P)=>a.jsxs(x.Fragment,{children:[a.jsx("text",{fontSize:oa,dx:(S[5]!==""?-5:-2)+A/P.length/2*(z*2+1)-A/2+1,dy:"0.5",className:"rmp-name__mrt",fill:S[3],textAnchor:"middle",dominantBaseline:"middle",children:S[4]}),a.jsx("text",{fontSize:oa,dx:5+A/P.length/2*(z*2+1)-A/2+1,dy:"0.5",className:"rmp-name__mrt",fill:S[3],textAnchor:"middle",dominantBaseline:"middle",children:S[5]})]},S[2])),a.jsx("rect",{id:"stn_core_".concat(t),x:-A/2,y:-16.77/2,rx:"4.5",ry:"8",width:A,height:y,fill:"white",opacity:"0"})]},v.map(S=>S[2]).join("_")))}),a.jsx("g",{transform:"translate(".concat(_,", ").concat(O,")"),textAnchor:N,children:a.jsx(I,{text:m[0].split("\n"),fontSize:Yt,lineHeight:Yt,grow:l==="top"?"up":l==="middle"?"bidirectional":"down",baseOffset:0,className:"rmp-name__mrt"})})]}),[t,e,o,...m,r,l,JSON.stringify(h),u,c,p])},at={names:["Chinatown"],nameOffsetX:"right",nameOffsetY:"top",transfer:[[[B.Singapore,"nel","#9B26B6",W.white,"NE","4"],[B.Singapore,"dtl","#0057B7",W.white,"DT","19"]]]},si=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"custom",label:n("panel.details.stations.interchange.title"),component:a.jsx(qt,{stationType:k.MRTInt,defaultAttrs:at,maximumTransfers:[1/0,0,0]})}];return a.jsx(L,{fields:d})},oi=a.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[a.jsx("rect",{x:"2",y:"9.0985",rx:"1.038",ry:"2.076",width:"20",height:"5.803",fill:"currentColor"}),a.jsx("text",{fontSize:"3",dx:"5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"NE"}),a.jsx("text",{fontSize:"3",dx:"9.5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"4"}),a.jsx("text",{fontSize:"3",dx:"14.5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"DT"}),a.jsx("text",{fontSize:"3",dx:"19",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"19"})]}),ii={component:ai,icon:oi,defaultAttrs:at,attrsComponent:si,metadata:{displayName:"panel.details.stations.MRTInt.displayName",cities:[B.Singapore],canvas:[G.RailMap],categories:[V.Metro],tags:[]}},Q={ja:{size:10,baseOffset:1},en:{size:5,baseOffset:1.5}},de=5,li=s=>{var rt;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Be.nameOffsetX,nameOffsetY:l=Be.nameOffsetY,rotate:h=Be.rotate,textOneLine:u=Be.textOneLine,textVertical:c=Be.textVertical,important:p=Be.important,lines:g=Be.lines}=(rt=n[k.JREastBasic])!=null?rt:Be,C=x.useCallback(ce=>d(t,ce),[t,d]),y=x.useCallback(ce=>i(t,ce),[t,i]),j=x.useCallback(ce=>f(t,ce),[t,f]),b=(Math.max(...g)-Math.min(...g)+1)*de,_=(Math.min(...g)-.5)*de,O=Math.abs(Math.cos(h*Math.PI/180))*de*Math.min(...g)-de/2-1,N=Math.abs(Math.cos(h*Math.PI/180))*de*Math.max(...g)+de/2+1,w=Math.abs(Math.sin(h*Math.PI/180))*de*Math.min(...g)-de/2,v=Math.abs(Math.sin(h*Math.PI/180))*de*Math.max(...g)+de/2,A=r==="left"?O:r==="right"?N:0,M=m[0].split("\n").length*(l==="middle"?0:Q.ja.size),S=(l==="middle"?0:l==="top"?2:1)+Q.ja.baseOffset,z=(M+S)*ee[l].polarity+(l==="middle"?0:l==="top"?w:v),P=r==="left"?"end":r==="right"?"start":"middle",Y={ja:l==="top"?"down":l==="bottom"?"up":"bidirectional",en:l==="top"||u?"up":"down"},U={ja:Q.ja.baseOffset,en:(l==="middle"?u?-m[0].split("\n").length*Q.ja.size/2-1:m[0].split("\n").length*Q.ja.size/2:0)+(p&&!u?2:0)+Q.en.baseOffset},q=x.useRef(null),[X,se]=x.useState({width:0});x.useEffect(()=>se(q.current.getBBox()),[m[0],c,se,q]);const ae=(c?.2:.7)*Q.ja.size,ie={left:-ae/2,middle:0,right:ae/2}[r],E={top:-2,middle:0,bottom:2}[l],H=h%90!==0&&r!=="middle"?(r==="left"?O:N)*Math.SQRT2:0,R=(p&&r!=="middle"?ie:0)+H,Z={0:0,45:-1,90:0,135:1,180:0,225:-1,270:0,315:1}[h],pe=Z*Q.ja.size,he=u?(Math.abs(R)+X.width+1+(p?ae:0))*(r==="left"?-1:1):h%90!==0&&r!=="middle"?m[0].split("\n").length/2*Z*Q.ja.size+(r==="left"?-1:1)*Q.ja.size:0,Le=(p?2:0)*ee[l].polarity,be=X.width,ge=X.height,Ye={left:-(be+ae)+H,middle:-(be+ae)/2,right:H}[r],He={top:-2-U.ja,middle:-ge/2,bottom:-ge+3+U.ja}[l],Ue={top:-ge+3-U.ja,middle:0,bottom:-3+U.ja}[l],te=(l==="top"?w-Q.en.baseOffset:v+Q.en.baseOffset)+((p?ae:0)+(h%90!==0?Q.ja.size/2:0))*ee[l].polarity,je={ja:l==="top"?"end":"start",en:l==="top"?"start":"end"},tt={0:0,45:-1,90:0,135:1,180:0,225:-1,270:0,315:1}[h],wt=tt*Q.ja.size,St=m[0].split("\n").length*Q.ja.size/2+Q.en.baseOffset,Nt=(p?1:0)*ee[l].polarity*-1,kt=(m[0].split("\n").length-0)/2*(l==="top"?-1:1)*tt*Q.ja.size+(p?2:0)*ee[l].polarity*-1;return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("g",{transform:"rotate(".concat(h,")"),children:g.map((ce,Mt)=>a.jsx("circle",{cx:de*ce,cy:"0",r:"1.5",stroke:"black",strokeWidth:"0.2",fill:"white"},"stn_core_".concat(t,"_").concat(Mt)))}),c?a.jsxs(a.Fragment,{children:[a.jsxs("g",{transform:"translate(0, ".concat(te,")"),textAnchor:je.ja,children:[p&&a.jsx("rect",{x:-(be-8)/2,y:Ue,width:be-8,height:ge,rx:(be-8)/2,fill:"black"}),a.jsx(_t,{ref:q,text:m[0].split("\n"),fontSize:Q.ja.size,lineWidth:Q.ja.size,grow:"bidirectional",baseOffset:0,baseDY:wt,y:p?2.75*ee[l].polarity:0,className:"rmp-name__jreast_ja",fill:p?"white":"black"})]}),a.jsx("g",{transform:"translate(".concat(Nt,", ").concat(te+kt,")rotate(270)"),textAnchor:je.en,children:a.jsx(I,{text:m[1].split("\n"),fontSize:Q.en.size,lineHeight:Q.en.size,grow:l==="top"?"down":"up",baseOffset:St,funcDX:ce=>ce*de*Math.SQRT1_2*tt*(l==="top"?-1:1),className:"rmp-name__jreast_en"})})]}):a.jsxs("g",{transform:"translate(".concat(A,", ").concat(z,")"),textAnchor:P,children:[p&&a.jsx("rect",{x:Ye,y:He+1.75,width:X.width+ae,height:ge-3.5,ry:(ge-3.5)/2,fill:"black"}),a.jsx(I,{ref:q,x:R,y:p&&l!=="middle"?E:0,text:m[0].split("\n"),fontSize:Q.ja.size,lineHeight:Q.ja.size,grow:Y.ja,baseOffset:U.ja,funcDX:ce=>(ce-(m[0].split("\n").length-1)/2)*pe,className:"rmp-name__jreast_ja",fill:p?"white":"black"}),a.jsx(I,{text:m[1].split("\n"),x:he,y:Le,fontSize:Q.en.size,lineHeight:Q.en.size,grow:Y.en,baseOffset:U.en,funcDX:ce=>ce*de*Math.SQRT1_2*Z,className:"rmp-name__jreast_en"})]}),a.jsx("g",{transform:"rotate(".concat(h,")"),children:a.jsx("rect",{id:"stn_core_".concat(t),fill:"url(#opaque)",fillOpacity:"50%",x:_,y:-5/2,rx:de/2,width:b,height:de,onPointerDown:C,onPointerMove:y,onPointerUp:j,style:{cursor:"move"}})})]})},Be={names:["新宿","Shinjuku"],nameOffsetX:"right",nameOffsetY:"middle",rotate:0,textOneLine:!1,textVertical:!1,important:!1,lines:[-1,0,1]},ri=s=>{var r;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameJa"),value:e.names[0],onChange:l=>{e.names[0]=l.toString(),e.names[0].length>1&&(e.textOneLine=!1,e.important=!1),o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:l=>{e.names[1]=l.toString(),e.names[1].length>1&&(e.textOneLine=!1,e.important=!1),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.jrEastBasic.nameOffset"),value:e.nameOffsetX!=="middle"?e.nameOffsetX:e.nameOffsetY,options:{left:n("panel.details.stations.common.left"),right:n("panel.details.stations.common.right"),top:n("panel.details.stations.common.top"),bottom:n("panel.details.stations.common.bottom")},onChange:l=>{l==="left"||l==="right"?(e.nameOffsetX=l,e.nameOffsetY="middle",e.textVertical=!1):(e.nameOffsetX="middle",e.nameOffsetY=l,e.textOneLine=!1),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:l=>{e.rotate=Number(l),o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.jrEastBasic.textOneLine"),isChecked:e.textOneLine,isDisabled:e.nameOffsetY!=="middle"||e.names.some(l=>l.split("\n").length>1),onChange:l=>{e.textOneLine=l,o(t,e)},oneLine:!0,minW:"full"},{type:"switch",label:n("panel.details.stations.jrEastBasic.textVertical"),isChecked:e.textVertical,isDisabled:e.nameOffsetX!=="middle",onChange:l=>{e.textVertical=l,o(t,e)},oneLine:!0,minW:"full"},{type:"switch",label:n("panel.details.stations.jrEastBasic.important"),isChecked:(r=e.important)!=null?r:!1,isDisabled:e.names.some(l=>l.split("\n").length>1),onChange:l=>{e.important=l,o(t,e)},oneLine:!0,minW:"full"}],i=l=>{const h=l==="-"?-1:Number(l);Number.isNaN(h)||(e.lines.push(h),o(t,e))},f=(l,h)=>{if((l===""||l==="-")&&e.lines.length>1)e.lines.splice(h,1);else{const u=Number(l);if(Number.isNaN(u))return;e.lines[h]=u}o(t,e)},m=l=>{l.key==="Backspace"&&e.lines.length>1&&(e.lines.pop(),o(t,e))};return a.jsxs(a.Fragment,{children:[a.jsx(L,{fields:d}),a.jsx(ue,{label:n("panel.details.stations.jrEastBasic.lines"),children:a.jsxs(Wt,{flexWrap:"wrap",flexDirection:"row",pt:"1",children:[e.lines.map((l,h)=>a.jsx(In,{width:"80px",inputMode:"numeric",mr:"2",mb:"2",value:l,onChange:u=>f(u,h),children:a.jsx(Pn,{})},h)),a.jsx(In,{width:"80px",inputMode:"numeric",mr:"2",mb:"2",value:"",onChange:l=>i(l),onKeyDown:l=>m(l),children:a.jsx(Pn,{})})]})})]})},ci=a.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[a.jsx("circle",{cx:"6",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"}),a.jsx("circle",{cx:"12",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"}),a.jsx("circle",{cx:"18",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"})]}),di={component:li,icon:ci,defaultAttrs:Be,attrsComponent:ri,metadata:{displayName:"panel.details.stations.jrEastBasic.displayName",cities:[B.Tokyo],canvas:[G.RailMap],categories:[V.NationalRail],tags:[]}},Ve={ja:{size:10},en:{size:5}},ra=1,mi=s=>{var P;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Ze.nameOffsetX,nameOffsetY:l=Ze.nameOffsetY,textVertical:h=Ze.textVertical,mostImportant:u=Ze.mostImportant,minLength:c=Ze.minLength}=(P=n[k.JREastImportant])!=null?P:Ze,p=x.useCallback(Y=>d(t,Y),[t,d]),g=x.useCallback(Y=>i(t,Y),[t,i]),C=x.useCallback(Y=>f(t,Y),[t,f]),y=x.useRef(null),[j,b]=x.useState({height:0,width:0});x.useEffect(()=>b(y.current.getBBox()),[m[0],h,b,y]);const _=Math.max(j.width,j.height),O=(h?.1:.7)*Ve.ja.size,N=Math.max(_+O,c),w=h?Ve.ja.size+ra:N,v=h?N-5:Ve.ja.size+ra,A={left:-w/2-1,middle:0,right:w/2+1}[r],M={top:-v/2-1,middle:0,bottom:v/2+1}[l],S={left:"end",middle:"middle",right:"start"}[r],z=u?1.5:1;return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsxs("g",{transform:"scale(".concat(z,")"),children:[a.jsx("rect",{fill:"black",x:-w/2,y:-v/2,rx:h?void 0:v/2,ry:h?w/2:void 0,width:w,height:v}),h?a.jsx("text",{ref:y,className:"rmp-name__jreast_ja",textAnchor:"middle",writingMode:"vertical-rl",fontSize:Ve.ja.size,fill:"white",dominantBaseline:"central",children:m[0]}):a.jsx("text",{ref:y,y:"-1",className:"rmp-name__jreast_ja",textAnchor:"middle",fontSize:Ve.ja.size,fill:"white",dominantBaseline:"central",children:m[0]}),a.jsx("rect",{id:"stn_core_".concat(t),fill:"black",fillOpacity:"0",x:-w/2,y:-v/2,rx:h?void 0:w/2,ry:h?v/2:void 0,width:w,height:v,onPointerDown:p,onPointerMove:g,onPointerUp:C,style:{cursor:"move"},className:"removeMe"})]}),a.jsx("g",{transform:"translate(".concat(A*z,", ").concat(M*z,")"),textAnchor:S,children:a.jsx(I,{text:m[1].split("\n"),fontSize:Ve.en.size,lineHeight:Ve.en.size,grow:l==="top"?"up":l==="middle"?"bidirectional":"down",baseOffset:0,className:"rmp-name__jreast_en"})})]})},Ze={names:["東京","Tōkyō"],nameOffsetX:"left",nameOffsetY:"middle",textVertical:!1,mostImportant:!1,minLength:0},fi=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"input",label:n("panel.details.stations.common.nameJa"),value:e.names[0],onChange:i=>{e.names[0]=i.toString(),o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i.toString(),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.jrEastImportant.textVertical"),isChecked:e.textVertical,onChange:i=>{e.textVertical=i,o(t,e)},oneLine:!0,minW:"full"},{type:"switch",label:n("panel.details.stations.jrEastImportant.mostImportant"),isChecked:e.mostImportant,onChange:i=>{e.mostImportant=i,o(t,e)},oneLine:!0,minW:"full"},{type:"input",label:n("panel.details.stations.jrEastImportant.minLength"),value:e.minLength.toString(),onChange:i=>{Number.isNaN(i)?e.minLength=0:e.minLength=Number(i),o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},hi=a.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[a.jsx("rect",{x:"3",y:"7.5",rx:"4.5",width:"18",height:"9",stroke:"currentColor",fill:"currentColor"}),a.jsx("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"middle",fontSize:"6",fill:"white",children:"東京"}),a.jsx("text",{x:"12",y:"20.25",textAnchor:"middle",dominantBaseline:"middle",fontSize:"3",children:"Tōkyō"})]}),ui={component:mi,icon:hi,defaultAttrs:Ze,attrsComponent:fi,metadata:{displayName:"panel.details.stations.jrEastImportant.displayName",cities:[B.Tokyo],canvas:[G.RailMap],categories:[V.NationalRail],tags:[]}},pi=s=>{var ie,E,H;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=_e.nameOffsetX,nameOffsetY:l=_e.nameOffsetY,color:h=_e.color,lineCode:u=_e.lineCode,stationCode:c=_e.stationCode,open:p=_e.open,secondaryNames:g=_e.secondaryNames,tram:C=_e.tram}=(ie=n[k.FoshanMetroBasic])!=null?ie:_e,y=x.useCallback(R=>d(t,R),[t,d]),j=x.useCallback(R=>i(t,R),[t,i]),b=x.useCallback(R=>f(t,R),[t,f]),_=x.useRef(null);(H=(E=_.current)==null?void 0:E.querySelector("path"))==null||H.setAttribute("id","stn_core_".concat(t));const O={en:C?5.08:6.56,zh:C?7.29:13.13},N={top:{namesPos:1,lineHeight:O.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:O.zh,polarity:1}},w=C?11:15,v=r==="left"?-w:r==="right"?w:0,A=C?8:10,M=(m[N[l].namesPos].split("\n").length*N[l].lineHeight+A)*N[l].polarity,S=r==="left"?"end":r==="right"?"start":!p&&r==="middle"&&g.join("")===""?"end":"middle",z=x.useRef(null),[P,Y]=x.useState(0);x.useEffect(()=>{var R,Z;return Y((Z=(R=z.current)==null?void 0:R.getBBox().width)!=null?Z:0)},[...g]);const U=x.useRef(null),[q,X]=x.useState(0);x.useEffect(()=>{var R,Z;return X((Z=(R=U.current)==null?void 0:R.getBBox().width)!=null?Z:0)},[...m]);const se=r==="middle"?q/2+(P+12*2)/2:(q+(P+12*2)/2)*(r==="left"?-1:1),ae=r==="middle"&&g.join("")!==""?q/2+(P+12*2):(q+P+(P!==0?12*2:0))*(r==="left"?-1:r==="right"?1:0);return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("g",{transform:"scale(".concat(.57915*(C?.729:1),")"),onPointerDown:y,onPointerMove:j,onPointerUp:b,style:{cursor:"move"},ref:_,children:a.jsx(Zt,{id:"stn_core_".concat(t),strokeColour:h[2],lineNum:u===""?void 0:u,stnNum:c===""?void 0:c,textClassName:"rmp-name__zh"})}),a.jsxs("g",{ref:U,transform:"translate(".concat(v,", ").concat(M,")"),textAnchor:S,children:[a.jsx(I,{text:m[0].split("\n"),fontSize:O.zh,lineHeight:O.zh,grow:"up",className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),fontSize:O.en,lineHeight:O.en,grow:"down",className:"rmp-name__en"})]}),g.join("")!==""&&a.jsxs("g",{transform:"translate(".concat(v+se,", ").concat(M,")"),textAnchor:"middle",children:[a.jsx("text",{fontSize:"13.13",dx:-(P+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),a.jsx("text",{fontSize:"13.13",dx:(P+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),a.jsxs("g",{ref:z,children:[a.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:g[0]}),a.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:g[1]})]})]}),!p&&a.jsxs("g",{transform:"translate(".concat(v+ae,", ").concat(M,")"),textAnchor:r==="middle"?"start":S,children:[a.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),a.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},_e={...T,nameOffsetX:"right",nameOffsetY:"top",color:[B.Foshan,"fs1","#C4D600",W.black],lineCode:"GF",stationCode:"01",open:!0,secondaryNames:["",""],tram:!1},gi=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i,o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"custom",label:n("color"),component:a.jsx(Ee,{type:k.FoshanMetroBasic,defaultTheme:_e.color})},{type:"input",label:n("panel.details.stations.common.lineCode"),value:e.lineCode,onChange:i=>{e.lineCode=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.common.stationCode"),value:e.stationCode,onChange:i=>{e.stationCode=i,o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.foshanMetroBasic.open"),oneLine:!0,isChecked:e.open,onChange:i=>{e.open=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.foshanMetroBasic.secondaryNameZh"),value:e.secondaryNames[0],onChange:i=>{e.secondaryNames[0]=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.foshanMetroBasic.secondaryNameEn"),value:e.secondaryNames[1],onChange:i=>{e.secondaryNames[1]=i,o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.foshanMetroBasic.tram"),oneLine:!0,isChecked:e.tram,onChange:i=>{e.tram=i,o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},xi=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("g",{transform:"translate(12,12)scale(0.45)",children:a.jsx(Zt,{strokeColour:"#000",lineNum:"1",stnNum:"01"})})}),Ci={component:pi,icon:xi,defaultAttrs:_e,attrsComponent:gi,metadata:{displayName:"panel.details.stations.foshanMetroBasic.displayName",cities:[B.Foshan],canvas:[G.RailMap],categories:[V.Metro],tags:[]}},Re={top:3.75,middle:0,bottom:8},yi=s=>{var O;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,color:r=Se.color,nameOffsetX:l=Se.nameOffsetX,nameOffsetY:h=Se.nameOffsetY,isInt:u=Se.isInt}=(O=n[k.QingdaoMetroStation])!=null?O:Se,c=x.useCallback(N=>d(t,N),[t,d]),p=x.useCallback(N=>i(t,N),[t,i]),g=x.useCallback(N=>f(t,N),[t,f]),C=(N,w)=>{const v=N==="left"?-6:N==="right"?6:0;return w==="top"?[v,-m[1].split("\n").length*Re[w]-5.5]:w==="bottom"?[v,m[0].split("\n").length*Re[w]+4]:[v,2]},y=(N,w)=>N==="left"&&w==="top"?[-6,-m[1].split("\n").length*Re[w]-6]:N==="middle"&&w==="top"?[0,-m[1].split("\n").length*Re[w]-10]:N==="right"&&w==="top"?[6,-m[1].split("\n").length*Re[w]-6]:N==="left"&&w==="bottom"?[-6,m[0].split("\n").length*Re[w]+6]:N==="middle"&&w==="bottom"?[0,m[0].split("\n").length*Re[w]+7]:N==="right"&&w==="bottom"?[6,m[0].split("\n").length*Re[w]+6]:N==="left"&&w==="middle"?[-8,2]:N==="right"&&w==="middle"?[8,2]:[0,0],[j,b]=u?y(l,h):C(l,h),_=l==="left"?"end":l==="right"?"start":"middle";return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("circle",{id:"stn_core_".concat(t),r:u?6:2.7,stroke:u?"black":r[2],strokeWidth:u?1.5:.2,fill:"white",onPointerDown:c,onPointerMove:p,onPointerUp:g,style:{cursor:"move"}}),a.jsxs("g",{transform:"translate(".concat(j,", ").concat(b,")"),textAnchor:_,children:[a.jsx(I,{text:m[0].split("\n"),fontSize:8,lineHeight:8,grow:"up",baseOffset:1,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),fontSize:3.75,lineHeight:3.75,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})},Se={...T,color:[B.Qingdao,"qd1","#f7b000",W.white],nameOffsetX:"right",nameOffsetY:"top",isInt:!1},bi=s=>{var i,f,m,r;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:(i=e.names[0])!=null?i:Se.names[0],onChange:l=>{e.names[0]=l.toString(),o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:(f=e.names[1])!=null?f:Se.names[1],onChange:l=>{e.names[1]=l.toString(),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:(m=e.nameOffsetX)!=null?m:Se.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:l=>{e.nameOffsetX=l,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:(r=e.nameOffsetY)!=null?r:Se.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:l=>{e.nameOffsetY=l,o(t,e)},minW:"full"},{type:"custom",label:n("color"),component:a.jsx(Ee,{type:k.QingdaoMetroStation,defaultTheme:Se.color}),minW:"full"},{type:"switch",label:n("panel.details.stations.qingdaoMetro.isInt"),isChecked:e.isInt,oneLine:!0,onChange:l=>{e.isInt=l,o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},ji=a.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:a.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",strokeWidth:"0.6",fill:"none"})}),Oi={component:yi,icon:ji,defaultAttrs:Se,attrsComponent:bi,metadata:{displayName:"panel.details.stations.qingdaoMetro.displayName",cities:[B.Qingdao],canvas:[G.RailMap],categories:[V.Metro],tags:[]}},bn=s=>{const{lineCode:t,stationCode:e,color:o,stroke:n}=s,[d,i,f]=[10,15,.8];return a.jsxs(a.Fragment,{children:[n&&a.jsx("rect",{x:-d/2-f,y:-i/2-f,width:d+2*f,height:i+2*f,rx:2.5,strokeWidth:f,stroke:"white",fill:"white"}),a.jsx("rect",{x:-d/2,y:-i/2,width:d,height:i,rx:2,strokeWidth:1.5,stroke:o[2],fill:"white"}),a.jsx("text",{x:0,y:t.length===1?-.75:-1.5,textAnchor:"middle",className:"rmp-name__tokyo_en",fontSize:t.length===1?7:4.5,fill:"black",children:t}),a.jsx("text",{x:e.length===1?0:-.4/e.length,y:5.5,textAnchor:"middle",className:"rmp-name__en",fontSize:7,fontWeight:"bold",letterSpacing:"-0.4",fill:"black",children:e})]})},vi=s=>{var A;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=$e.nameOffsetX,nameOffsetY:l=$e.nameOffsetY,textVertical:h=$e.textVertical,lineCode:u=$e.lineCode,stationCode:c=$e.stationCode,color:p=$e.color}=(A=n[k.TokyoMetroBasic])!=null?A:$e,g=x.useCallback(M=>d(t,M),[t,d]),C=x.useCallback(M=>i(t,M),[t,i]),y=x.useCallback(M=>f(t,M),[t,f]),[j,b]=x.useState(0);x.useEffect(()=>{let M=0;m[0].split("\n").forEach(S=>{M=Math.max(M,S.length)}),b(M)},[m[0]]);const _=r==="left"?-7:r==="right"?7:0,O=r==="left"?-12:r==="right"?12:0,N=l==="bottom"?20:l==="top"?-9:5.5,w=l==="bottom"?9+j*5:l==="top"?-9-j*5:-5,v=r==="left"?"end":r==="right"?"start":"middle";return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx(bn,{lineCode:u,stationCode:c,color:p}),a.jsx("rect",{id:"stn_core_".concat(t),x:-5.8,y:-8.2,width:11.6,height:16.4,rx:2.5,opacity:0,onPointerDown:g,onPointerMove:C,onPointerUp:y,style:{cursor:"move"}}),a.jsx("g",{textAnchor:v,className:"rmp-name-outline",strokeWidth:"1",children:h?a.jsx("g",{transform:"translate(".concat(O,", ").concat(w,")"),textAnchor:v,children:a.jsx(_t,{text:m[0].split("\n"),fontSize:10,lineWidth:10,grow:"bidirectional",baseOffset:0,baseDY:0,className:"rmp-name__jreast_ja",fill:"black"})}):a.jsx("g",{transform:"translate(".concat(_,", ").concat(N,")"),textAnchor:v,children:a.jsx(I,{text:m[0].split("\n"),fontSize:10,lineHeight:10,grow:"up",funcDX:M=>(M-(m[0].split("\n").length-1)/2)*10,className:"rmp-name__jreast_ja",fill:"black"})})})]})},$e={names:["京橋"],nameOffsetX:"right",nameOffsetY:"middle",textVertical:!1,lineCode:"G",stationCode:"10",color:[B.Tokyo,"g","#f9a328",W.white]},_i=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameJa"),value:e.names[0],onChange:i=>{e.names[0]=i.toString(),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.tokyoMetroBasic.nameOffset"),value:e.nameOffsetX!=="middle"?e.nameOffsetX:e.nameOffsetY,options:{left:n("panel.details.stations.common.left"),right:n("panel.details.stations.common.right"),top:n("panel.details.stations.common.top"),bottom:n("panel.details.stations.common.bottom")},onChange:i=>{i==="left"||i==="right"?(e.nameOffsetX=i,e.nameOffsetY="middle",e.textVertical=!1):(e.nameOffsetX="middle",e.nameOffsetY=i),o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.tokyoMetroBasic.textVertical"),isChecked:e.textVertical,isDisabled:e.nameOffsetX!=="middle",onChange:i=>{e.textVertical=i,o(t,e)},oneLine:!0,minW:"full"},{type:"input",label:n("panel.details.stations.common.lineCode"),value:e.lineCode,onChange:i=>{e.lineCode=i,o(t,e)},minW:"full"},{type:"input",label:n("panel.details.stations.common.stationCode"),value:e.stationCode,onChange:i=>{e.stationCode=i,o(t,e)},minW:"full"},{type:"custom",label:n("color"),component:a.jsx(Ee,{type:k.TokyoMetroBasic,defaultTheme:$e.color}),minW:"full"}];return a.jsx(L,{fields:d})},wi=a.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[a.jsx("rect",{x:"6.5",y:"4.5",rx:"1.5",width:"10",height:"15",stroke:"currentColor",fill:"none"}),a.jsx("text",{x:"9",y:"11",fontSize:"7",fill:"currentColor",children:"G"}),a.jsx("text",{x:"7.75",y:"18",fontSize:"7",letterSpacing:"-0.8",fill:"currentColor",children:"10"})]}),Si={component:vi,icon:wi,defaultAttrs:$e,attrsComponent:_i,metadata:{displayName:"panel.details.stations.tokyoMetroBasic.displayName",cities:[B.Tokyo],canvas:[G.RailMap],categories:[V.Metro],tags:[]}},Ni=s=>{var ie;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Ie.nameOffsetX,nameOffsetY:l=Ie.nameOffsetY,textVertical:h=Ie.textVertical,interchanges:u=Ie.interchanges,align:c=Ie.align,importance:p=Ie.importance,mereOffset:g=Ie.mereOffset}=(ie=n[k.TokyoMetroInt])!=null?ie:Ie,C=x.useCallback(E=>d(t,E),[t,d]),y=x.useCallback(E=>i(t,E),[t,i]),j=x.useCallback(E=>f(t,E),[t,f]),[b,_]=x.useState(0);x.useEffect(()=>{let E=0;m[0].split("\n").forEach(H=>{E=Math.max(E,H.length)}),_(E)},[m[0]]);const O=13,N=18,w=c==="horizontal"?u.length*O:0,v=c==="vertical"?u.length*N:0,S=r==="left"?-(c==="horizontal"?4:10)-w/2:r==="right"?(c==="horizontal"?2:9)+w/2:g==="left2"?-5:g==="right2"?5:0,z=()=>{const E=c==="vertical"?1:10,H=c==="vertical"?3:12,R=c==="vertical"?1:13,Z=c==="vertical"?3:12,pe=g==="left1"?-4:g==="left2"?-10:g==="right1"?4:g==="right2"?10:0,he=g==="up"?3:g==="down"?10:0;return{fontSize:10,textXVer:(r==="left"?-12:r==="right"?12:-2)+pe,textY:l==="bottom"?E+v/2:l==="top"?-H-v/2:-7.5+he,textYVer:l==="bottom"?Z+v/2+b*5:l==="top"?-R-v/2-b*5:-5}},P=()=>{const E=c==="vertical"?1:10,H=c==="vertical"?3:13,R=c==="vertical"?4:13,Z=c==="vertical"?3:13,pe=g==="left1"?-8:g==="left2"?-13:g==="right1"?8:g==="right2"?13:0,he=g==="up"?4:g==="down"?12:0;return{fontSize:15,textXVer:(r==="left"?-12:r==="right"?12:-2)+pe,textY:l==="bottom"?E+v/2:l==="top"?-H-v/2:-10+he,textYVer:l==="bottom"?Z+v/2+b*7.5:l==="top"?-R-v/2-b*7.5:-5}},Y=()=>{const E=c==="vertical"?1:13,H=c==="vertical"?3:10,R=c==="vertical"?5:13,Z=c==="vertical"?4:13,pe=g==="left1"?-10:g==="left2"?-16:g==="right1"?10:g==="right2"?16:0,he=g==="up"?6:g==="down"?15:0;return{fontSize:20,textXVer:(r==="left"?-12:r==="right"?12:-2)+pe,textY:l==="bottom"?H+v/2:l==="top"?-E-v/2:-13+he,textYVer:l==="bottom"?Z+v/2+b*10:l==="top"?-R-v/2-b*10:-5}},{fontSize:U,textXVer:q,textY:X,textYVer:se}=p==="default"?z():p==="high"?Y():P(),ae=r==="left"||g==="left1"||g==="left2"?"end":r==="right"||g==="right1"||g==="right2"?"start":"middle";return a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[c==="horizontal"?a.jsxs(a.Fragment,{children:[a.jsx("rect",{x:-(w+3)/2,y:-10.5,width:w+3,height:21,rx:3,fill:"#808285",stroke:"black",strokeWidth:"0.5"}),u.map((E,H)=>a.jsx("g",{transform:"translate(".concat(H*O-(w-O)/2,", 0)"),children:a.jsx(bn,{lineCode:E.lineCode,stationCode:E.stationCode,color:E.color,stroke:!0})},H)),a.jsx("rect",{id:"stn_core_".concat(t),x:-(w+3)/2,y:-10.5,width:w+3,height:21,rx:3,opacity:0,onPointerDown:C,onPointerMove:y,onPointerUp:j,style:{cursor:"move"}})]}):a.jsxs(a.Fragment,{children:[a.jsx("rect",{x:-8,y:-(v+3)/2,width:16,height:v+3,rx:3,fill:"#808285",stroke:"black",strokeWidth:"0.5"}),u.map((E,H)=>a.jsx("g",{transform:"translate(0, ".concat(H*N-(v-N)/2,")"),children:a.jsx(bn,{lineCode:E.lineCode,stationCode:E.stationCode,color:E.color,stroke:!0})},H)),a.jsx("rect",{id:"stn_core_".concat(t),x:-8,y:-(v+3)/2,width:16,height:v+3,rx:3,opacity:0,onPointerDown:C,onPointerMove:y,onPointerUp:j,style:{cursor:"move"}})]}),a.jsx("g",{textAnchor:ae,className:"rmp-name-outline",strokeWidth:"1",children:h?a.jsx("g",{transform:"translate(".concat(q,", ").concat(se,")"),textAnchor:"middle",children:a.jsx(_t,{text:m[0].split("\n"),fontSize:U,lineWidth:U,grow:"bidirectional",className:"rmp-name__jreast_ja",fill:"black",fontWeight:p!=="default"?"bold":"normal"})}):a.jsx("g",{transform:"translate(".concat(S,", ").concat(X,")"),textAnchor:ae,children:a.jsx(I,{text:m[0].split("\n"),fontSize:U,lineHeight:U,grow:l==="top"||g==="up"?"up":"down",className:"rmp-name__jreast_ja",fill:"black",fontWeight:p!=="default"?"bold":"normal"})})})]})},Ie={names:["日本橋"],nameOffsetX:"right",nameOffsetY:"middle",mereOffset:"none",textVertical:!1,interchanges:[{lineCode:"G",stationCode:"11",color:[B.Tokyo,"g","#f9a328",W.white]},{lineCode:"T",stationCode:"10",color:[B.Tokyo,"t","#00a4db",W.white]},{lineCode:"A",stationCode:"13",color:[B.Tokyo,"a","#dd4231",W.white]}],align:"horizontal",importance:"default"},ca={lineCode:"",stationCode:"",color:[B.Tokyo,"","#AAAAAA",W.white]},ki=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,n=it(),{paletteAppClip:{output:d}}=lt(p=>p.runtime),{t:i}=D(),f=[{type:"textarea",label:i("panel.details.stations.common.nameJa"),value:e.names[0],onChange:p=>{e.names[0]=p.toString(),o(t,e)},minW:"full"},{type:"select",label:i("panel.details.stations.tokyoMetroBasic.nameOffset"),value:e.nameOffsetX!=="middle"?e.nameOffsetX:e.nameOffsetY,options:{left:i("panel.details.stations.common.left"),right:i("panel.details.stations.common.right"),top:i("panel.details.stations.common.top"),bottom:i("panel.details.stations.common.bottom")},onChange:p=>{p==="left"||p==="right"?(e.nameOffsetX=p,e.nameOffsetY="middle",e.textVertical=!1,(e.mereOffset==="left1"||e.mereOffset==="left2"||e.mereOffset==="right1"||e.mereOffset==="right2")&&(e.mereOffset="none")):(e.nameOffsetX="middle",e.nameOffsetY=p,(e.mereOffset==="up"||e.mereOffset==="down")&&(e.mereOffset="none")),o(t,e)},minW:"full"},{type:"select",label:i("panel.details.stations.tokyoMetroInt.mereOffset.displayName"),value:e.mereOffset,options:{none:i("panel.details.stations.tokyoMetroInt.mereOffset.none"),...e.nameOffsetX==="middle"?{left1:i("panel.details.stations.tokyoMetroInt.mereOffset.left1"),left2:i("panel.details.stations.tokyoMetroInt.mereOffset.left2"),right1:i("panel.details.stations.tokyoMetroInt.mereOffset.right1"),right2:i("panel.details.stations.tokyoMetroInt.mereOffset.right2")}:{up:i("panel.details.stations.tokyoMetroInt.mereOffset.up"),down:i("panel.details.stations.tokyoMetroInt.mereOffset.down")}},onChange:p=>{e.mereOffset=p,o(t,e)},minW:"full"},{type:"switch",label:i("panel.details.stations.tokyoMetroBasic.textVertical"),isChecked:e.textVertical,isDisabled:e.nameOffsetX!=="middle",onChange:p=>{e.textVertical=p,o(t,e)},oneLine:!0,minW:"full"},{type:"select",label:i("panel.details.stations.tokyoMetroInt.importance.displayName"),value:e.importance,options:{default:i("panel.details.stations.tokyoMetroInt.importance.default"),middle:i("panel.details.stations.tokyoMetroInt.importance.middle"),high:i("panel.details.stations.tokyoMetroInt.importance.high")},onChange:p=>{e.importance=p,o(t,e)},minW:"full"},{type:"select",label:i("panel.details.stations.tokyoMetroInt.align.displayName"),value:e.align,options:{horizontal:i("panel.details.stations.tokyoMetroInt.align.horizontal"),vertical:i("panel.details.stations.tokyoMetroInt.align.vertical")},onChange:p=>{e.align=p,o(t,e)},minW:"full"}],[m,r]=x.useState(void 0);x.useEffect(()=>{m!==void 0&&d&&(e.interchanges[m].color=d,o(t,e),r(void 0))},[d==null?void 0:d.toString()]);const l=p=>{const g=structuredClone(e.interchanges);g.push(ca);for(let C=g.length-1;C>p;C--)g[C]=structuredClone(g[C-1]);g[p]=ca,o(t,{...e,interchanges:g})},h=p=>{const g=e.interchanges.filter((C,y)=>y!==p);o(t,{...e,interchanges:g})},u=(p,g)=>{e.interchanges[g].lineCode=p,o(t,e)},c=(p,g)=>{e.interchanges[g].stationCode=p,o(t,e)};return a.jsxs(a.Fragment,{children:[a.jsx(L,{fields:f}),a.jsx(ue,{label:i("panel.details.stations.interchange.title"),children:a.jsxs(et,{align:"flex-start",children:[e.interchanges.map((p,g)=>a.jsxs(Ke,{children:[a.jsx(Ht,{theme:p.color,onClick:()=>{r(g),n(Ut(p.color))}}),a.jsx(ue,{label:i("panel.details.stations.common.lineCode"),children:a.jsx(Bn,{defaultValue:p.lineCode,onDebouncedChange:C=>u(C,g)})}),a.jsx(ue,{label:i("panel.details.stations.common.stationCode"),children:a.jsx(Bn,{defaultValue:p.stationCode,onDebouncedChange:C=>c(C,g)})}),a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":i("panel.details.stations.interchange.add"),icon:a.jsx(De,{}),onClick:()=>l(g)}),a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":i("panel.details.stations.interchange.add"),icon:a.jsx(vt,{}),onClick:()=>h(g),isDisabled:e.interchanges.length===1})]},g)),a.jsx(ye,{size:"sm",width:"100%",variant:"outline",leftIcon:a.jsx(De,{}),onClick:()=>l(e.interchanges.length),children:i("panel.details.stations.interchange.title")})]})})]})},Mi=a.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[a.jsx("rect",{x:"4",y:"8",rx:"1",width:"6.5",height:"10",stroke:"currentColor",fill:"none"}),a.jsx("rect",{x:"12.5",y:"8",rx:"1",width:"6.5",height:"10",stroke:"currentColor",fill:"none"}),a.jsx("text",{x:"5.5",y:"12.5",fontSize:"4",fill:"currentColor",children:"G"}),a.jsx("text",{x:"5",y:"16.25",fontSize:"4",letterSpacing:"-0.8",fill:"currentColor",children:"16"}),a.jsx("text",{x:"14.25",y:"12.5",fontSize:"4",fill:"currentColor",children:"H"}),a.jsx("text",{x:"13.75",y:"16.25",fontSize:"4",letterSpacing:"-0.8",fill:"currentColor",children:"18"})]}),Ai={component:Ni,icon:Mi,defaultAttrs:Ie,attrsComponent:ki,metadata:{displayName:"panel.details.stations.tokyoMetroInt.displayName",cities:[B.Tokyo],canvas:[G.RailMap],categories:[V.Metro],tags:[]}},J=5,Ba=2*J,zi=.85*Ba,mt={0:{textDx:0,textDy:-9.15,textAnchor:"middle",dominantBaseline:"auto",polarity:-1,grow:"up"},45:{textDx:(J/2+J*1.33)*Math.SQRT1_2,textDy:-9.15*Math.SQRT1_2,textAnchor:"start",dominantBaseline:"auto",polarity:-1,grow:"up"},90:{textDx:J/2+J*1.33,textDy:0,textAnchor:"start",dominantBaseline:"middle",polarity:0,grow:"bidirectional"},135:{textDx:(J/2+J*1.33)*Math.SQRT1_2,textDy:(J/2+J*1.33)*Math.SQRT1_2,textAnchor:"start",dominantBaseline:"hanging",polarity:1,grow:"down"},180:{textDx:0,textDy:J/2+J*1.33,textAnchor:"middle",dominantBaseline:"hanging",polarity:1,grow:"down"},225:{textDx:-9.15*Math.SQRT1_2,textDy:(J/2+J*1.33)*Math.SQRT1_2,textAnchor:"end",dominantBaseline:"hanging",polarity:1,grow:"down"},270:{textDx:-9.15,textDy:0,textAnchor:"end",dominantBaseline:"middle",polarity:0,grow:"bidirectional"},315:{textDx:-9.15*Math.SQRT1_2,textDy:-9.15*Math.SQRT1_2,textAnchor:"end",dominantBaseline:"auto",polarity:-1,grow:"up"}},Mn=[B.London,"central","#DC241F",W.white,0],Ia=x.memo(s=>{const{id:t,stepFreeAccess:e,...o}=s;return a.jsxs("g",{...o,children:[a.jsx("path",{fill:e==="train"?"#1C3E93":"white",stroke:"#1C3E93",strokeWidth:.5*J,d:"M0-31c17.1,0,31,13.9,31,31S17.1,31,0,31S-31,17.1-31,0S-17.1-31,0-31"}),a.jsx("path",{fill:e==="train"?"white":"#1C3E93",d:"M-10.5,9c1.4,4.9,6,8.4,11.3,8.4c6.5,0,11.8-5.3,11.8-11.8c0-3.4-1.5-6.5-3.8-8.7l0.7-5.1\n c4.6,2.9,7.6,8,7.6,13.8c0,9-7.3,16.3-16.3,16.3c-5.9,0-11-3.1-13.9-7.7L-10.5,9z"}),a.jsx("path",{fill:s.stepFreeAccess==="train"?"white":"#1C3E93",d:"M0.5-20.5c0,2.5,2,4.6,4.6,4.6c2.5,0,4.6-2.1,4.6-4.6s-2.1-4.6-4.6-4.6S0.5-23,0.5-20.5"}),a.jsx("path",{fill:e==="train"?"white":"#1C3E93",d:"M3-12.4L2.5-9.2h-9.9c0,0-2.1,0.2-2.1,2.2s2.1,2.2,2.1,2.2h9.3l-0.5,3h-12.5c0,0-0.9,0-1.3,0.5\n C-12.8-1-13.2,0-13.2,0l-7,14.2c0,0-0.8,1.8,1.2,2.9c2,1.1,3.3-1,3.3-1l5.5-11.3c0,0,0.5-0.7,1-1c0.6-0.3,1.1-0.3,1.1-0.3H3.4\n c0,0,1.2,0,2.2-0.9c0.9-0.9,1.1-2,1.1-2l1.7-12.4c0,0,0-2.6-2.7-2.7C3.6-14.5,3-12.4,3-12.4"}),a.jsx("path",{id:"stn_core_".concat(t),fill:e==="train"?"#1C3E93":"white",fillOpacity:"0",stroke:"#1C3E93",strokeWidth:.5*J,strokeOpacity:"0",d:"M0-31c17.1,0,31,13.9,31,31S17.1,31,0,31S-31,17.1-31,0S-17.1-31,0-31",className:"removeMe"})]})},(s,t)=>JSON.stringify(s)===JSON.stringify(t)),Bi=s=>{var w;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,transfer:r=Je.transfer,rotate:l=Je.rotate,terminal:h=Je.terminal,stepFreeAccess:u=Je.stepFreeAccess}=(w=n[k.LondonTubeBasic])!=null?w:Je,c=x.useCallback(v=>d(t,v),[t,d]),p=x.useCallback(v=>i(t,v),[t,i]),g=x.useCallback(v=>f(t,v),[t,f]),C=(l-90)*Math.PI/180,y=h?2*(.66*J+J/2):.66*J+.5,j=mt[l].textDx+Math.cos(C)*Math.max(...r[0].map(v=>v[4]))*J,b=mt[l].textDy+Math.sin(C)*Math.max(...r[0].map(v=>v[4]))*J,_=-((Math.max(...r[0].map(v=>v[4]))+Math.min(...r[0].map(v=>v[4])))/2)*J,O=Math.sin(l*Math.PI/180)*_,N=Math.cos(l*Math.PI/180)*_;return a.jsxs("g",{id:t,children:[a.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")rotate(").concat(l,")"),onPointerDown:c,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:u==="none"?r[0].map(v=>a.jsx("rect",{id:"stn_core_".concat(t),x:-5*.66/2,y:-5*.66-J/2-J*v[4],width:J*.66,height:y,stroke:"none",fill:v[2]},"".concat(t,"_").concat(v[2],"_").concat(v[4]))):a.jsx(Ia,{id:t,stepFreeAccess:u,transform:"translate(".concat(O,",").concat(N,")rotate(").concat(-l,")scale(0.2333)")},"stn_core_".concat(t))}),a.jsx("g",{transform:"translate(".concat(e+j,", ").concat(o+b,")"),textAnchor:mt[l].textAnchor,fill:"#003888",children:a.jsx(I,{text:m[0].split("\n"),fontSize:Ba,lineHeight:zi,dominantBaseline:mt[l].dominantBaseline,grow:mt[l].grow,baseOffset:0,className:"rmp-name__tube"})})]})},Je={names:["Station"],transfer:[[Mn]],rotate:0,terminal:!1,stepFreeAccess:"none"},Ii=s=>{var l;const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[0],onChange:h=>{e.names[0]=h.toString(),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.rotate"),value:e.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:h=>{e.rotate=Number(h),o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.londonTubeBasic.terminal"),isChecked:e.terminal,isDisabled:e.transfer[0].length>1,onChange:h=>{e.terminal=h,o(t,e)},oneLine:!0,minW:"full"},{type:"select",label:n("panel.details.stations.londonTubeCommon.stepFreeAccess"),value:e.stepFreeAccess,options:{none:n("panel.details.stations.londonTubeCommon.stepFreeAccessNone"),train:n("panel.details.stations.londonTubeCommon.stepFreeAccessTrain"),platform:n("panel.details.stations.londonTubeCommon.stepFreeAccessPlatform")},onChange:h=>{e.stepFreeAccess=h,o(t,e)},minW:"full"}],i=(l=e.transfer)!=null?l:Je.transfer,f=h=>u=>{const c=structuredClone(i);if(c.length<=h)for(let p=c.length;p<=h;p++)c[p]=[Mn];c[h].push(u),e.transfer=c,o(t,e)},m=h=>u=>{if(i.length>h&&i[h].length>u){const c=i.map((p,g)=>g===h?p.filter((C,y)=>y!==u):p);e.transfer=c,o(t,e)}},r=h=>(u,c)=>{if(i.length>h&&i[h].length>u){const p=i.map((g,C)=>C===h?g.map((y,j)=>j===u?[0,1,2,3,4,5,6].map(b=>c[b]===void 0?y[b]:c[b]):y):g);e.transfer=p,o(t,e)}};return a.jsxs(a.Fragment,{children:[a.jsx(L,{fields:d}),a.jsx(ue,{label:n("panel.details.stations.interchange.title"),children:a.jsxs(et,{align:"flex-start",children:[a.jsx(Ft,{size:"xs",children:n("panel.details.stations.londonTubeBasic.shareTracks")}),a.jsx($i,{interchangeList:i[0],onAdd:f(0),onDelete:m(0),onUpdate:r(0)})]})})]})},Pi=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),Ti={component:Bi,icon:Pi,defaultAttrs:Je,attrsComponent:Ii,metadata:{displayName:"panel.details.stations.londonTubeBasic.displayName",cities:[B.London],canvas:[G.RailMap],categories:[V.Metro],tags:[]}};function $i(s){const{interchangeList:t,onAdd:e,onDelete:o,onUpdate:n}=s,d=it(),{paletteAppClip:{output:i}}=lt(l=>l.runtime),{t:f}=D(),[m,r]=x.useState();return x.useEffect(()=>{m!==void 0&&i&&(n==null||n(m,[...i,t[m][4]]),r(void 0))},[i==null?void 0:i.toString()]),a.jsxs(jn,{direction:"column",children:[t.length===0&&a.jsxs(Ke,{spacing:.5,"data-testid":"interchange-card-stack",children:[a.jsx(_n,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:f("panel.details.stations.interchange.noTrackShare")}),a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.add"),onClick:()=>e==null?void 0:e(Mn),icon:a.jsx(De,{})})]}),t.map((l,h)=>a.jsxs(Ke,{spacing:.5,"data-testid":"interchange-card-stack-".concat(h),children:[a.jsx(ue,{label:f("color"),minW:"40px",noLabel:h!==0,children:a.jsx(Ht,{theme:[l[0],l[1],l[2],l[3]],onClick:()=>{r(h),d(Ut([l[0],l[1],l[2],l[3]]))}})}),a.jsx(ue,{label:f("panel.details.stations.londonTubeBasic.shareTracksIndex"),children:a.jsx(La,{defaultValue:l[4],min:-5,max:5,step:1,onThrottledChange:u=>n==null?void 0:n(h,[l[0],l[1],l[2],l[3],u])})}),a.jsxs(et,{children:[e&&h===t.length-1?a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.copy"),onClick:()=>{const u=structuredClone(t.slice(-1)[0]);u[4]=Math.max(...t.map(c=>c[4]))+1,e==null||e(u)},icon:a.jsx(On,{})}):a.jsx(wn,{minW:8}),o&&h!==0&&a.jsx(Ne,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.remove"),onClick:()=>o==null?void 0:o(h),icon:a.jsx(vt,{})})]})]},h))]})}const ke=5,Pa=2*ke,Ei=.85*Pa,Ri=s=>{var _;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=gt.nameOffsetX,nameOffsetY:l=gt.nameOffsetY,stepFreeAccess:h=gt.stepFreeAccess}=(_=n[k.LondonTubeInt])!=null?_:gt,u=x.useCallback(O=>d(t,O),[t,d]),c=x.useCallback(O=>i(t,O),[t,i]),p=x.useCallback(O=>f(t,O),[t,f]),g=.66*ke+ke/2,C=r==="left"?-9.15:r==="right"?ke/2+ke*1.33:0,y=l==="top"?-9.15:l==="bottom"?ke/2+ke*1.33:0,j=r==="left"?"end":r==="right"?"start":"middle",b=l==="top"?"auto":l==="bottom"?"hanging":"middle";return a.jsxs("g",{id:t,children:[a.jsx("g",{transform:"translate(".concat(e,", ").concat(o,")"),onPointerDown:u,onPointerMove:c,onPointerUp:p,style:{cursor:"move"},children:h==="none"?a.jsx("circle",{id:"stn_core_".concat(t),r:1.25*ke,width:ke*.66,height:g,stroke:"black",strokeWidth:.5*ke,fill:"white"}):a.jsx(Ia,{id:t,stepFreeAccess:h,transform:"scale(0.2333)"})}),a.jsx("g",{transform:"translate(".concat(e+C,", ").concat(o+y,")"),textAnchor:j,fill:"#003888",children:a.jsx(I,{text:m[0].split("\n"),fontSize:Pa,lineHeight:Ei,dominantBaseline:b,grow:l==="top"?"up":l==="bottom"?"down":"bidirectional",baseOffset:1,className:"rmp-name__tube"})})]})},gt={names:["Station"],nameOffsetX:"right",nameOffsetY:"top",stepFreeAccess:"none"},Wi=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[0],onChange:i=>{e.names[0]=i.toString(),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.londonTubeCommon.stepFreeAccess"),value:e.stepFreeAccess,options:{none:n("panel.details.stations.londonTubeCommon.stepFreeAccessNone"),train:n("panel.details.stations.londonTubeCommon.stepFreeAccessTrain"),platform:n("panel.details.stations.londonTubeCommon.stepFreeAccessPlatform")},onChange:i=>{e.stepFreeAccess=i,o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},Di=a.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:a.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",strokeWidth:"2.5",fill:"white"})}),Xi={component:Ri,icon:Di,defaultAttrs:gt,attrsComponent:Wi,metadata:{displayName:"panel.details.stations.londonTubeInt.displayName",cities:[B.London],canvas:[G.RailMap],categories:[V.Metro],tags:[]}},We=5,Ta=2*We,Li=.85*Ta,$a="M-18.2,12.6c2.4-0.6,5.8-1.6,11.5-0.4c2.9,0.6,5.6,1.3,8.3,1.3c3.5,0,5.4-0.6,8.1-1.2c2.4-0.6,5.2-1.2,7.4-1.1c3.8,0.1,6.6,0.7,8.2,1.4l-1.2-3.1C21,8.3,15.8,7.7,9.7,9.5c-2.6,0.7-5.2,1.3-7.9,1.2c-2.5,0-4.8-0.4-7.2-1C-13,8-15.9,9.3-19.8,10.3L-18.2,12.6z",Ea="M23.8-2h-4.1l-1.8-4.8c0,0-0.1-0.6-1-1.3c-0.6-0.5-1.6-0.5-1.6-0.5H4v-2h-6.9l-1.1-1.5l0.8-1.9h-1.9l-1.5,3.5h-2.6v2h-5.8c0,0-0.8,0.1-1.2,0.3c-0.4,0.3-0.6,0.5-0.6,0.5l-4.4,5.8h-7.3l7.3,10c1.6-0.7,6.6-2,9.7-1.9c4.1,0.1,9.5,1.9,13.1,1.9c6.6,0,8.8-2,14.6-2.3c7.1-0.4,11.6,2.3,11.6,2.3L23.8-2z M-11.1-2h-7.1l1.9-2.5c0,0,0.8-1.1,1.2-1.3c0.7-0.4,1.2-0.5,1.2-0.5h2.8V-2z M-9.2-2v-4.3h7.4v4.4L-9.2-2z M7.4-2H0v-4.3h7.4V-2z M9.3-2v-4.3h5.1c0,0,0.4,0,0.8,0.4c0.3,0.2,0.5,0.7,0.5,0.7l1.2,3.3L9.3-2z",Yi=s=>{var j;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=Rt.nameOffsetX,nameOffsetY:l=Rt.nameOffsetY}=(j=n[k.LondonRiverServicesInt])!=null?j:Rt,h=x.useCallback(b=>d(t,b),[t,d]),u=x.useCallback(b=>i(t,b),[t,i]),c=x.useCallback(b=>f(t,b),[t,f]),p=r==="left"?-9.15:r==="right"?We/2+We*1.33:0,g=l==="top"?-9.15:l==="bottom"?We/2+We*1.33:0,C=r==="left"?"end":r==="right"?"start":"middle",y=l==="top"?"auto":l==="bottom"?"hanging":"middle";return a.jsxs("g",{id:t,children:[a.jsxs("g",{transform:"translate(".concat(e,", ").concat(o,")"),onPointerDown:h,onPointerMove:u,onPointerUp:c,style:{cursor:"move"},children:[a.jsx("circle",{r:1.45*We,stroke:"#003888",strokeWidth:.1*We,fill:"white"}),a.jsxs("g",{fill:"#003888",transform:"scale(0.222)",children:[a.jsx("path",{d:$a}),a.jsx("path",{d:Ea})]}),a.jsx("circle",{id:"stn_core_".concat(t),r:1.5*We,fill:"white",fillOpacity:"0",className:"removeMe"})]}),a.jsx("g",{transform:"translate(".concat(e+p,", ").concat(o+g,")"),textAnchor:C,fill:"#003888",children:a.jsx(I,{text:m[0].split("\n"),fontSize:Ta,lineHeight:Li,dominantBaseline:y,grow:l==="top"?"up":l==="bottom"?"down":"bidirectional",baseOffset:1,className:"rmp-name__tube"})})]})},Rt={names:["Station"],nameOffsetX:"right",nameOffsetY:"top"},Hi=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[0],onChange:i=>{e.names[0]=i.toString(),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},Ui=a.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[a.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"white"}),a.jsxs("g",{transform:"translate(12, 12)scale(0.18)",children:[a.jsx("path",{stroke:"currentColor",d:$a}),a.jsx("path",{stroke:"currentColor",d:Ea})]})]}),Fi={component:Yi,icon:Ui,defaultAttrs:Rt,attrsComponent:Hi,metadata:{displayName:"panel.details.stations.londonRiverServicesInt.displayName",cities:[B.London],canvas:[G.RailMap],categories:[V.Metro],tags:[]}},Vi=s=>{var j;const{id:t,x:e,y:o,attrs:n,handlePointerDown:d,handlePointerMove:i,handlePointerUp:f}=s,{names:m=T.names,nameOffsetX:r=xt.nameOffsetX,nameOffsetY:l=xt.nameOffsetY,interchange:h=xt.interchange}=(j=n[k.GuangdongIntercityRailway])!=null?j:xt,u=x.useCallback(b=>d(t,b),[t,d]),c=x.useCallback(b=>i(t,b),[t,i]),p=x.useCallback(b=>f(t,b),[t,f]),g=r==="left"?-13.33:r==="right"?13.33:0,C=(m[ee[l].namesPos].split("\n").length*st[l].lineHeight+st[l].offset)*ee[l].polarity,y=r==="left"?"end":r==="right"?"start":"middle";return x.useMemo(()=>a.jsxs("g",{id:t,transform:"translate(".concat(e,", ").concat(o,")"),children:[a.jsx("circle",{r:5,stroke:"#2559a8",strokeWidth:"1.5",fill:"white"}),h&&a.jsx("circle",{r:2.5,stroke:"#2559a8",strokeWidth:"1",fill:"white"}),a.jsx("circle",{id:"stn_core_".concat(t),r:5+1.33/2,fill:"white",fillOpacity:"0",onPointerDown:u,onPointerMove:c,onPointerUp:p,style:{cursor:"move"},className:"removeMe"}),a.jsxs("g",{transform:"translate(".concat(g,", ").concat(C,")"),textAnchor:y,className:"rmp-name-outline",strokeWidth:"1",children:[a.jsx(I,{text:m[0].split("\n"),fontSize:13.13,lineHeight:13.13,grow:"up",baseOffset:1,className:"rmp-name__zh"}),a.jsx(I,{text:m[1].split("\n"),dx:r==="right"?1.67:0,fontSize:5.83,lineHeight:5.83,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]}),[t,e,o,...m,r,l,h,u,c,p])},xt={...T,nameOffsetX:"right",nameOffsetY:"top",interchange:!1},Gi=s=>{const{id:t,attrs:e,handleAttrsUpdate:o}=s,{t:n}=D(),d=[{type:"textarea",label:n("panel.details.stations.common.nameZh"),value:e.names[0],onChange:i=>{e.names[0]=i.toString(),o(t,e)},minW:"full"},{type:"textarea",label:n("panel.details.stations.common.nameEn"),value:e.names[1],onChange:i=>{e.names[1]=i.toString(),o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetX"),value:e.nameOffsetX,options:{left:n("panel.details.stations.common.left"),middle:n("panel.details.stations.common.middle"),right:n("panel.details.stations.common.right")},disabledOptions:e.nameOffsetY==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetX=i,o(t,e)},minW:"full"},{type:"select",label:n("panel.details.stations.common.nameOffsetY"),value:e.nameOffsetY,options:{top:n("panel.details.stations.common.top"),middle:n("panel.details.stations.common.middle"),bottom:n("panel.details.stations.common.bottom")},disabledOptions:e.nameOffsetX==="middle"?["middle"]:[],onChange:i=>{e.nameOffsetY=i,o(t,e)},minW:"full"},{type:"switch",label:n("panel.details.stations.interchange.title"),oneLine:!0,isChecked:e.interchange,onChange:i=>{e.interchange=i,o(t,e)},minW:"full"}];return a.jsx(L,{fields:d})},Zi=a.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[a.jsx("circle",{cx:"12",cy:"12",r:"8",stroke:"currentColor",strokeWidth:"2.25",fill:"white"}),a.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"1.5",fill:"white"})]}),qi={component:Vi,icon:Zi,defaultAttrs:xt,attrsComponent:Gi,metadata:{displayName:"panel.details.stations.guangdongIntercityRailway.displayName",cities:[B.Shanghai],canvas:[G.RailMap],categories:[V.Metro],tags:[]}},gl={[k.ShmetroBasic]:Cs,[k.ShmetroBasic2020]:Os,[k.ShmetroInt]:Ss,[k.ShmetroOutOfSystemInt]:As,[k.ShanghaiSuburbanRailway]:Ps,[k.GzmtrBasic]:lo,[k.GzmtrInt]:fo,[k.GzmtrInt2024]:Co,[k.BjsubwayBasic]:vo,[k.BjsubwayInt]:ko,[k.MTR]:$o,[k.SuzhouRTBasic]:Do,[k.SuzhouRTInt]:Ho,[k.KunmingRTBasic]:Go,[k.KunmingRTInt]:Jo,[k.MRTBasic]:ni,[k.MRTInt]:ii,[k.JREastBasic]:di,[k.JREastImportant]:ui,[k.FoshanMetroBasic]:Ci,[k.QingdaoMetroStation]:Oi,[k.TokyoMetroBasic]:Si,[k.TokyoMetroInt]:Ai,[k.LondonTubeBasic]:Ti,[k.LondonTubeInt]:Xi,[k.LondonRiverServicesInt]:Fi,[k.GuangdongIntercityRailway]:qi},Qi="RMP_MASTER_CHANNEL",Ji="MASTER_POST",da=new BroadcastChannel(Qi),ft={id:"null",value:"",param:null,bg:"#000000",fg:W.white},Ki={h:"80%",w:"80%","& iframe":{h:"100%",w:"100%"},"& div":{h:"100%",w:"100%"}},el=s=>{const{isOpen:t,onClose:e,onSubmit:o}=s,{t:n}=D(),d=x.useRef(window.graph),i=Qa(),[f,m]=x.useState([]),[r,l]=x.useState(ft),[h,u]=x.useState(""),[c,p]=x.useState(!1),[g,C]=x.useState(!1);x.useEffect(()=>{t&&(u(""),l(ft),p(!1),m(ja(d.current).filter(S=>S.randomId).map(S=>{var z,P,Y;return{id:S.randomId,value:(z=S.label)!=null?z:S.randomId,param:S,bg:(P=S.labelColorBg)!=null?P:ft.bg,fg:(Y=S.labelColorFg)!=null?Y:ft.fg}})))},[t]);const y=S=>{var z,P,Y,U,q;try{const X=(z=r.param)!=null?z:JSON.parse(S),se=X.id?X.id:X.randomId,ae=(P=X.labelColorBg)!=null?P:Ha(),ie={randomId:se,label:(Y=X.label)!=null?Y:se,labelColorBg:ae,labelColorFg:Fa(ae),nodeType:(U=X.nodeType)!=null?U:X.type,transform:(q=X.transform)!=null?q:Ua,svgs:X.svgs,components:X.components,color:X.color,core:X.core,version:X.version};if(!ie.version||ie.version<2){i({title:"Outdated configuration!",status:"error",duration:9e3,isClosable:!0});return}o(ie)}catch(X){C(!0);return}e()},j=x.useRef(t),[b,_]=x.useState("DESIGNER"),[O,N]=x.useState(!1);x.useEffect(()=>{j.current=t},[t]),x.useEffect(()=>{const S=z=>{const{event:P,data:Y}=z.data;P===Ji&&j.current&&(N(!1),y(Y))};return da.addEventListener("message",S),()=>{da.removeEventListener("message",S)}},[]);const w=async()=>{_("DESIGNER"),N(!0)},v=()=>{_("GALLERY"),N(!0)},A=S=>{C(!1),u(S.target.value),l(ft)},M=S=>{l(S),p(!1),u("")};return a.jsxs(a.Fragment,{children:[a.jsxs(fa,{isOpen:t,onClose:e,size:"sm",scrollBehavior:"inside",children:[a.jsx(ha,{}),a.jsxs(ua,{children:[a.jsx(pa,{children:n("header.settings.procedures.masterManager.importTitle")}),a.jsx(ga,{}),a.jsxs(xa,{children:[a.jsx(ue,{label:n("header.settings.procedures.masterManager.importFrom"),children:a.jsx(Ya,{data:f,displayHandler:S=>a.jsx(nn,{name:S.value,fg:S.fg,bg:S.bg,title:S.value,sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}}),filter:(S,z)=>z.id.toLowerCase().includes(S.toLowerCase())||Object.values(z.id).some(P=>P.toLowerCase().includes(S.toLowerCase())),value:r.value,onChange:M})}),a.jsxs(ue,{label:n("header.settings.procedures.masterManager.importOther"),children:[a.jsxs(Wt,{direction:"row",width:"100%",children:[a.jsx(ye,{m:1,width:"100%",onClick:w,children:n("RMP Designer")}),a.jsx(ye,{m:1,width:"100%",onClick:v,children:n("RMP Gallery")})]}),a.jsx(ye,{m:1,onClick:()=>p(!0),children:n("header.settings.procedures.masterManager.importParam")}),a.jsx(Ja,{width:"100%",placeholder:"qwq",fontSize:"sm",fontFamily:"monospace",hidden:!c,onChange:A,isInvalid:g})]})]}),a.jsxs(Ca,{children:[a.jsx(ye,{colorScheme:"blue",variant:"outline",mr:"1",onClick:e,children:n("cancel")}),a.jsx(ye,{colorScheme:"blue",variant:"solid",mr:"1",onClick:()=>y(h),isDisabled:r.id==="null"&&h==="",children:n("apply")})]})]})]}),a.jsx(tl,{isOpen:O,onClose:()=>N(!1),source:b})]})},tl=s=>{const{isOpen:t,onClose:e,source:o}=s,n=o==="DESIGNER"?"/rmp-designer/#/export":"/rmp-gallery/?tabId=2&master=true";return a.jsxs(Va,{isOpen:t,onClose:e,size:"full",sx:Ki,children:[a.jsx("iframe",{src:n,loading:"lazy"}),a.jsx(Ka,{onClick:e,position:"fixed",top:"5px",right:"15px"})]})},xl=s=>{const{isOpen:t,onClose:e}=s,{t:o}=D(),{refresh:{nodes:n}}=lt(C=>C.runtime),d=x.useRef(window.graph),i=it(),[f,m]=x.useState([]);x.useEffect(()=>{t&&m(ja(d.current))},[t,n]);const[r,l]=x.useState(void 0),h=C=>{d.current.filterNodes(y=>d.current.getNodeAttribute(y,"type")===K.Master&&d.current.getNodeAttributes(y)[K.Master].randomId===r).forEach(y=>{const j=structuredClone(C),b=d.current.getNodeAttributes(y),_=structuredClone(b[K.Master]),O=N=>{_.components.forEach(w=>{var v;if(w.id===N)return(v=w.value)!=null?v:w.defaultValue})};j.components.forEach((N,w)=>{var v;j.components[w].value=(v=O(N.id))!=null?v:N.defaultValue}),j.color!==void 0&&(j.color.value=_.color?j.color.value:j.color.defaultValue),d.current.mergeNodeAttributes(y,{[K.Master]:j})}),i(Ct()),i(yt(d.current.export()))},u=C=>{const y={id:C.randomId,type:C.nodeType,label:C.label,svgs:C.svgs,components:C.components,color:C.color,core:C.core,transform:C.transform,version:C.version};y.components.forEach((j,b)=>{y.components[b].value=j.defaultValue}),ds("RMP_Master_Node_".concat(new Date().valueOf(),".json"),"application/json",JSON.stringify(y))},c=C=>{d.current.filterNodes(y=>d.current.getNodeAttribute(y,"type")===K.Master&&d.current.getNodeAttributes(y)[K.Master].randomId===C).forEach(y=>{d.current.dropNode(y)}),i(Ct()),i(yt(d.current.export()))},p=(C,y)=>{d.current.filterNodes(j=>d.current.getNodeAttribute(j,"type")===K.Master&&d.current.getNodeAttributes(j)[K.Master].randomId===C.randomId).forEach(j=>{d.current.mergeNodeAttributes(j,{[K.Master]:{...C,label:y}})}),i(Ct()),i(yt(d.current.export()))},g=f.map(C=>{var j,b,_,O,N;const y=[{label:o("header.settings.procedures.masterManager.id"),type:"custom",component:a.jsx(nn,{name:(j=C.randomId)!=null?j:"undefined",fg:(b=C.labelColorFg)!=null?b:W.white,bg:(_=C.labelColorBg)!=null?_:"#000000"})},{label:o("header.settings.procedures.masterManager.label"),type:"input",value:(O=C.label)!=null?O:o("panel.details.nodes.master.undefined"),onChange:w=>p(C,w),hidden:!C.randomId},{label:o("header.settings.procedures.masterManager.label"),type:"output",value:(N=C.label)!=null?N:o("panel.details.nodes.master.undefined"),hidden:!!C.randomId},{label:o("header.settings.procedures.masterManager.type"),type:"custom",component:a.jsx(nn,{name:o("header.settings.procedures.masterManager.types.".concat(C.nodeType)),fg:W.white,bg:C.nodeType==="MiscNode"?"#FF8651":"#51BC00"})}];return a.jsxs(Wt,{width:"100%",direction:"row",children:[a.jsx(L,{fields:y,minW:"120px"}),a.jsxs(Wt,{direction:"row",mr:"auto",children:[a.jsx(ye,{onClick:()=>l(C.randomId),children:a.jsx(Ga,{})}),a.jsx(ye,{onClick:()=>u(C),isDisabled:!C.randomId,children:a.jsx(Za,{})}),a.jsx(ye,{onClick:()=>c(C.randomId),children:a.jsx(vt,{})})]})]})});return a.jsxs(fa,{isOpen:t,onClose:e,size:"xl",scrollBehavior:"inside",children:[a.jsx(ha,{}),a.jsxs(ua,{children:[a.jsx(pa,{children:o("header.settings.procedures.masterManager.title")}),a.jsx(ga,{}),a.jsxs(xa,{width:"100%",children:[...g,a.jsx(el,{isOpen:!!r,onClose:()=>l(void 0),onSubmit:h})]}),a.jsx(Ca,{children:a.jsx(ye,{colorScheme:"blue",variant:"outline",mr:"1",onClick:e,children:o("close")})})]})]})};export{Pt as F,ul as L,xl as M,pl as S,ms as a,cl as b,rl as c,ds as d,dl as e,rs as f,I as g,oe as h,il as i,hl as j,el as k,as as l,ml as m,ol as n,gl as s,ll as t,fl as u}; diff --git a/assets/master-manager-legacy-CZVSbF6t.js b/assets/master-manager-legacy-CZVSbF6t.js new file mode 100644 index 00000000..1c9c7841 --- /dev/null +++ b/assets/master-manager-legacy-CZVSbF6t.js @@ -0,0 +1 @@ +!function(){const e=["text","lineHeight","grow","dominantBaseline","baseOffset","funcDX"],t=["text","lineWidth","grow","dominantBaseline","baseOffset","baseDY"],n=["id","stepFreeAccess"];function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t{i=e.u,r=e.b,d=e.a},e=>{m=e.i,c=e.S,f=e.aB,h=e.r,p=e.C,u=e.M,g=e.aS,x=e.L,y=e.e,C=e.aU,b=e.aV,v=e.aW,j=e.aX,O=e.c,w=e.d,_=e.aY,k=e.aZ,S=e.P,N=e.V,z=e.W,M=e.a_,A=e.a$,P=e.b0,B=e.aR,$=e.q,W=e.v,E=e.b1,X=e.b2,Y=e.Q,R=e.R,I=e.b3,L=e.aT,T=e.b4,D=e.w,H=e.D,U=e.a},e=>{F=e.j,V=e.av,G=e.N,Z=e.a2,Q=e.ak,q=e.B,J=e._,K=e.t,ee=e.Q,te=e.h,ne=e.aN,ae=e.aO,se=e.aw,oe=e.ag,le=e.M,ie=e.ah,re=e.J,de=e.K,me=e.L,ce=e.v,fe=e.O,he=e.a8}],execute:function(){a({S:function(e){var t=e.children,n=rn(d.useState(Math.random()),2),a=n[0],s=n[1];return F.jsx(kt.Provider,{value:{updateId:a,update:function(){return s(Math.random())}},children:t})},j:function(){const{i18n:e}=i();return t=>{var n,a;return null!==(n=null!==(a=e.languages.map((e=>t[e])).find((e=>void 0!==e)))&&void 0!==a?a:t.en)&&void 0!==n?n:"(Translation Error)"}}});var o=(e=>(e.Airport="airport",e.Airport2024="airport_2024",e.Maglev="maglev",e.Disney="disney",e.Railway="railway",e.Railway2024="railway_2024",e.HSR="hsr",e.AirportHK="airport_hk",e.DisneyHK="disney_hk",e.NgongPing360="ngong_ping_360",e.Tiananmen="tiananmen",e.AirportBJ="airport_bj",e.BusTerminalSuzhou="bus_terminal_suzhou",e.RailwaySuzhou="railway_suzhou",e.BusInterchange="bus_interchange",e.AirportSG="airport_sg",e.CruiseCentre="cruise_centre",e.SentosaExpress="sentosa_express",e.CableCar="cable_car",e.Merlion="merlion",e.MarinaBaySands="marina_bay_sands",e.GardensByTheBay="gardens_by_the_bay",e.SingaporeFlyer="singapore_flyer",e.Esplanade="esplanade",e.AirportQingdao="airport_qingdao",e.CoachStationQingdao="coach_station_qingdao",e.CruiseTerminalQingdao="cruise_terminal_qingdao",e.RailwayQingdao="railway_qingdao",e.TramQingdao="tram_qingdao",e.AirportGuangzhou="airport_guangzhou",e.RailwayGuangzhou="railway_guangzhou",e.IntercityGuangzhou="intercity_guangzhou",e.RiverCraftLondon="river_craft",e.AirportLondon="airport_london",e.CoachStationLondon="coach_station_london",e))(o||{});const pe={type:"airport"},ue=(a("n",{component:e=>{const{id:t,x:n,y:a,attrs:s,handlePointerDown:o,handlePointerMove:l,handlePointerUp:i}=e,{type:d=pe.type}=null!=s?s:pe,m=r.useRef(null),[c,f]=r.useState({width:25,height:25});r.useEffect((()=>f(m.current.getBBox())),[d,f,m]);const h=r.useCallback((e=>o(t,e)),[t,o]),p=r.useCallback((e=>l(t,e)),[t,l]),u=r.useCallback((e=>i(t,e)),[t,i]);return F.jsx("g",{id:t,transform:`translate(${n-c.width/2}, ${a-c.height/2})`,onPointerDown:h,onPointerMove:p,onPointerUp:u,style:{cursor:"move"},children:F.jsx("image",{ref:m,href:`/rmp/images/facilities/${d}.svg`,onLoad:()=>f(m.current.getBBox())})})},icon:F.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:F.jsxs("g",{transform:"translate(12, 0)scale(0.4)",children:[F.jsx("circle",{cx:"0",cy:"29.33899",r:"29.33899",fill:"currentColor"}),F.jsx("path",{id:"airport",d:"M28.9769,6.60134c1.711.013,3.111,2.53205,3.111,4.241v10.337s17.106,15.435,17.358,15.666a1.145,1.145,0,0,1,.488,1.152v2.833c0,.651-.451.61-.695.467-.334-.119-17.151-8.863-17.151-8.863-.004,1.458-.797,9.006-1.326,13.304,0,0,4.61,2.457,4.699,2.521.334.268.352.359.352.852v2.001c0,.477-.352.428-.51.324-.183-.062-5.693-1.921-5.693-1.921a2.56018,2.56018,0,0,0-.633-.127,2.31654,2.31654,0,0,0-.666.127s-5.477,1.859-5.672,1.921c-.185.104-.523.153-.523-.324v-2.001c0-.493.029-.584.367-.852.086-.064,4.678-2.521,4.678-2.521-.524-4.298-1.307-11.846-1.325-13.304,0,0-16.822,8.744-17.148,8.863-.217.143-.69.184-.69-.467v-2.833a1.16206,1.16206,0,0,1,.473-1.152c.276-.231,17.365-15.666,17.365-15.666v-10.337c0-1.709,1.403-4.228,3.14105-4.241",transform:"translate(-28.9697,0.14347)",fill:"white"})]})}),defaultAttrs:pe,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:a}=e,{t:s}=i(),o=[{type:"select",label:s("panel.details.nodes.facilities.type"),value:n.type,options:{airport:"Airport",airport_2024:"Airport 2024",maglev:"Maglev",disney:"Disney",railway:"Railway",railway_2024:"Railway 2024",hsr:"HSR",airport_hk:"Airport Hongkong",disney_hk:"Disney Hongkong",ngong_ping_360:"Ngong Ping 360",tiananmen:"Tiananmen",airport_bj:"Airport Beijing",bus_terminal_suzhou:"Bus Terminal Suzhou",railway_suzhou:"Railway Suzhou",bus_interchange:"Bus Interchange",airport_sg:"Changi Airport",cruise_centre:"Cruise Centre",sentosa_express:"Sentosa Express",cable_car:"Cable Car",merlion:"Merlion",marina_bay_sands:"Marina Bay Sands",gardens_by_the_bay:"Gardens by the Bay",singapore_flyer:"Singapore Flyer",esplanade:"Esplanade",airport_qingdao:"Airport Qingdao",railway_qingdao:"Railway Qingdao",coach_station_qingdao:"Coach Station Qingdao",cruise_terminal_qingdao:"Cruise Terminal Qingdao",tram_qingdao:"Tram Qingdao",airport_guangzhou:"Airport Guangzhou",railway_guangzhou:"Railway Guangzhou",intercity_guangzhou:"Intercity Guangzhou",river_craft:"River services interchange",airport_london:"Airport London",coach_station_london:"Victoria Coach Station"},onChange:e=>{n.type=e,a(t,n)}}];return F.jsx(m,{fields:o,minW:"full"})},metadata:{displayName:"panel.details.nodes.facilities.displayName",tags:[]}}),a("i",(()=>navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome"))),{source:'url("./fonts/LTAIdentity-Medium.woff")',descriptors:{display:"swap"}}),ge={source:'url("./fonts/Mplus2-Medium.otf")',descriptors:{display:"swap"}},xe={source:'url("./fonts/Roboto-Bold.ttf")',descriptors:{display:"swap"}},ye={source:'url("./fonts/MontaguSlab.ttf")',descriptors:{display:"swap"}},Ce={source:'url("./fonts/Railway-PlyE.otf")',descriptors:{display:"swap"}},be=a("F",{[c.MTR]:{className:[".rmp-name__mtr__zh",".rmp-name__mtr__en"],cssFont:{"MyriadPro-Semibold":void 0,"Vegur-Bold":void 0,"GenYoMinTW-SB":void 0},cssName:"fonts_mtr"},[c.MRTBasic]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:ue},cssName:"fonts_mrt"},[c.MRTInt]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:ue},cssName:"fonts_mrt"},[c.JREastBasic]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{"M PLUS 2":ge},cssName:"fonts_jreast"},[c.JREastImportant]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{"M PLUS 2":ge},cssName:"fonts_jreast"},[f.BerlinSBahnLineBadge]:{className:[".rmp-name__berlin"],cssFont:{Roboto:xe},cssName:"fonts_berlin"},[f.BerlinUBahnLineBadge]:{className:[".rmp-name__berlin"],cssFont:{Roboto:xe},cssName:"fonts_berlin"},[f.JREastLineBadge]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{'"M PLUS 2"':ge},cssName:"fonts_jreast"},[f.MRTDestinationNumbers]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:ue},cssName:"fonts_mrt"},[f.MRTLineBadge]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:ue},cssName:"fonts_mrt"},[c.TokyoMetroBasic]:{className:[".rmp-name__tokyo_en",".rmp-name__jreast_ja"],cssFont:{MontaguSlab:ye,"M PLUS 2":ge},cssName:"fonts_tokyo"},[c.TokyoMetroInt]:{className:[".rmp-name__tokyo_en",".rmp-name__jreast_ja"],cssFont:{MontaguSlab:ye,"M PLUS 2":ge},cssName:"fonts_tokyo"},[c.LondonTubeBasic]:{className:[".rmp-name__tube"],cssFont:{Railway:Ce},cssName:"fonts_tube"},[c.LondonTubeInt]:{className:[".rmp-name__tube"],cssFont:{Railway:Ce},cssName:"fonts_tube"}}),ve=[],je=a("l",(async e=>{const t=be[e];if(!t)return;const{cssFont:n,cssName:a}=t;if(ve.includes(a))return;ve.push(a),await Promise.all(Object.entries(n).map((([e,t])=>h.loadFont(e,t&&{configs:[t]}))));const s=document.createElement("link");s.rel="stylesheet",s.id=a,s.href=`/rmp/styles/${a}.css`,document.head.append(s)})),Oe=a("g",r.forwardRef(((t,n)=>{const{text:a,lineHeight:o,grow:i,dominantBaseline:r=("up"===i?"auto":"down"===i?"hanging":"middle"),baseOffset:d=2,funcDX:m=(e=>0)}=t,c=l(t,e),f="bidirectional"===i?-(a.length-1)*o/2:0;return F.jsx("g",{ref:n,children:("up"===i?[...a].reverse():a).map(((e,t,n)=>F.jsx("text",s(s({dy:(t*o+d)*("up"===i?-1:1)+f,dx:m(t),dominantBaseline:r},c),{},{children:e}),`${e}${t}`)))})})));Oe.displayName="MultilineText";const we={top:{namesPos:1,lineHeight:10,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:16,polarity:1}},_e={zh:c.ShmetroBasic,en:c.ShmetroBasic,mtr__zh:c.MTR,mtr__en:c.MTR,berlin:f.BerlinSBahnLineBadge,mrt:c.MRTBasic,jreast_ja:c.JREastBasic,jreast_en:c.JREastBasic,tokyo_en:c.TokyoMetroBasic,tube:c.LondonTubeBasic},ke=a("h",{content:"Enter your text here",fontSize:16,lineHeight:16,textAnchor:"middle",dominantBaseline:"middle",language:"en",color:[p.Shanghai,"jsr","#000000",u.white],rotate:0,italic:"normal",bold:"normal"}),Se=(a("t",{component:e=>{const{id:t,x:n,y:a,attrs:s,handlePointerDown:o,handlePointerMove:l,handlePointerUp:i}=e,{content:d=ke.content,fontSize:m=ke.fontSize,lineHeight:c=ke.lineHeight,textAnchor:f=ke.textAnchor,dominantBaseline:h=ke.dominantBaseline,language:p=ke.language,color:u=ke.color,rotate:g=ke.rotate,italic:x=ke.italic,bold:y=ke.bold}=null!=s?s:ke,C=r.useRef(null),[b,v]=r.useState({x:0,y:0,width:32,height:16});r.useEffect((()=>v(C.current.getBBox())),[d,m,c,f,h,p,g,x,y,v,C]),r.useEffect((()=>{const e=_e[p];e&&je(e)}),[p]);const j=r.useCallback((e=>o(t,e)),[t,o]),O=r.useCallback((e=>l(t,e)),[t,l]),w=r.useCallback((e=>i(t,e)),[t,i]);return F.jsxs("g",{id:t,transform:`translate(${n}, ${a})rotate(${g})`,onPointerDown:j,onPointerMove:O,onPointerUp:w,style:{cursor:"move"},children:[F.jsx("rect",{className:"removeMe",fill:"gray",fillOpacity:"0.1",x:b.x-1.5,y:b.y-1.5,width:b.width+3,height:b.height+3}),F.jsx(Oe,{ref:C,text:d.split("\n"),lineHeight:c,grow:"down",className:`rmp-name__${p}`,fontSize:m,textAnchor:f,dominantBaseline:h,fill:u[2],fontStyle:x,fontWeight:y})]})},icon:F.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:F.jsx("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"middle",fontSize:"10",children:"Text"})}),defaultAttrs:ke,attrsComponent:e=>{var t,n,a,s,o,l,r;const{id:d,attrs:c,handleAttrsUpdate:h}=e,{t:p}=i(),u=[{type:"textarea",label:p("panel.details.nodes.text.content"),value:null!==(t=c.content)&&void 0!==t?t:ke.content,onChange:e=>{c.content=e.toString(),h(d,c)},minW:"full"},{type:"input",label:p("panel.details.nodes.text.fontSize"),value:(null!==(n=c.fontSize)&&void 0!==n?n:ke.fontSize).toString(),validator:e=>Number.isInteger(e)&&Number(e)>0,onChange:e=>{c.fontSize=Number(e),h(d,c)},minW:"full"},{type:"input",label:p("panel.details.nodes.text.lineHeight"),value:(null!==(a=c.lineHeight)&&void 0!==a?a:ke.lineHeight).toString(),validator:e=>Number.isInteger(e)&&Number(e)>0,onChange:e=>{c.lineHeight=Number(e),h(d,c)},minW:"full"},{type:"select",label:p("panel.details.nodes.text.textAnchor"),value:null!==(s=c.textAnchor)&&void 0!==s?s:ke.textAnchor,options:{start:p("panel.details.nodes.text.start"),middle:p("panel.details.nodes.text.middle"),end:p("panel.details.nodes.text.end")},onChange:e=>{c.textAnchor=e,h(d,c)},minW:"full"},{type:"select",label:p("panel.details.nodes.text.dominantBaseline"),value:null!==(o=c.dominantBaseline)&&void 0!==o?o:ke.dominantBaseline,options:{auto:p("panel.details.nodes.text.auto"),middle:p("panel.details.nodes.text.middle"),hanging:p("panel.details.nodes.text.hanging")},onChange:e=>{c.dominantBaseline=e,h(d,c)},minW:"full"},{type:"select",label:p("panel.details.nodes.text.language"),value:null!==(l=c.language)&&void 0!==l?l:ke.language,options:{zh:p("panel.details.nodes.text.zh"),en:p("panel.details.nodes.text.en"),mtr__zh:p("panel.details.nodes.text.mtr__zh"),mtr__en:p("panel.details.nodes.text.mtr__en"),berlin:p("panel.details.nodes.text.berlin"),mrt:p("panel.details.nodes.text.mrt"),jreast_ja:p("panel.details.nodes.text.jreast_ja"),jreast_en:p("panel.details.nodes.text.jreast_en"),tokyo_en:p("panel.details.nodes.text.tokyo_en"),tube:p("panel.details.nodes.text.tube")},onChange:e=>{c.language=e.toString(),h(d,c)},minW:"full"},{type:"select",label:p("panel.details.nodes.text.rotate"),value:null!==(r=c.rotate)&&void 0!==r?r:ke.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{c.rotate=Number(e),h(d,c)},minW:"full"},{type:"switch",label:p("panel.details.nodes.text.italic"),isChecked:"italic"===c.italic,onChange:e=>{c.italic=e?"italic":"normal",h(d,c)},minW:"full"},{type:"switch",label:p("panel.details.nodes.text.bold"),isChecked:"bold"===c.bold,onChange:e=>{c.bold=e?"bold":"normal",h(d,c)},minW:"full"},{type:"custom",label:p("color"),component:F.jsx(g,{type:f.Text,defaultTheme:ke.color})}];return F.jsx(m,{fields:u})},metadata:{displayName:"panel.details.nodes.text.displayName",tags:[]}}),a("c",((e,t)=>e.filterEdges(((e,n,a,s,o,l,i)=>t.has(a)&&t.has(s))))),a("f",(e=>{const t=Object.fromEntries([...Object.values(c),Object.values(f)].map((e=>[e,!1])));return e.forEachNode((n=>{const a=e.getNodeAttribute(n,"type");t[a]=!0})),t}))),Ne=(a("b",((e,t,n,a,s)=>{const o=t<=a?t:a,l=n<=s?n:s,i=t<=a?a:t,r=n<=s?s:n;return e.filterNodes(((e,t)=>((e,t,n,a,s,o)=>e<=s&&s<=n&&t<=o&&o<=a)(o,l,i,r,t.x,t.y)))})),a("e",((e,t,n)=>{const a=[],s=new Set;return t.forEach((t=>{const n=e.getNodeAttributes(t).type,o=e.getNodeAttribute(t,n);if(void 0!==o.color){const e=o.color;s.has(e.toString())||(a.push(e),s.add(e.toString()))}})),n.filter((t=>x.includes(e.getEdgeAttribute(t,"style")))).forEach((t=>{const n=e.getEdgeAttributes(t),o=n[n.style].color;s.has(o.toString())||(a.push(o),s.add(o.toString()))})),a})),e=>{const t=[],n=new Set;return e.filterNodes((t=>e.getNodeAttribute(t,"type")===f.Master)).forEach((a=>{const s=e.getNodeAttributes(a)[f.Master];n.has(s.randomId)||(n.add(s.randomId),t.push(s))})),t}),ze=a("d",((e,t,n)=>{const a=new Blob([n],{type:t});Me(e,a)})),Me=a("a",((e,t)=>{const n=window.URL.createObjectURL(t),a=document.createElement("a");a.href=n,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(n)})),Ae=(a("m",(async(e,t,n,a)=>{const{xMin:s,yMin:o,xMax:l,yMax:i}=y(e),[r,d]=[l-s,i-o],m=document.getElementById("canvas").cloneNode(!0);t||m.appendChild(await Be(l-400,i-120)),m.setAttribute("viewBox",`${s} ${o} ${r} ${d}`),m.setAttribute("width",r.toString()),m.setAttribute("height",d.toString()),Object.entries({".rmp-name-outline":["paint-order","stroke","stroke-linejoin"]}).forEach((([e,t])=>{const n=document.querySelector(e);if(null===n)return;const s=window.getComputedStyle(n);m.querySelectorAll(e).forEach((n=>{if(".rmp-name-outline"===e&&1.1===a){const t=n.insertAdjacentElement("afterend",n.cloneNode(!0));t&&(t.classList.remove(e.slice(1)),0===t.classList.length&&n.removeAttribute("class"),t.removeAttribute("stroke-width"))}t.forEach((e=>{n.setAttribute(e,s.getPropertyValue(e))})),n.classList.remove(e.slice(1)),0===n.classList.length&&n.removeAttribute("class")}))})),m.querySelectorAll('[fill="url(#opaque)"]').forEach((e=>{e.remove()})),m.querySelectorAll(".removeMe").forEach((e=>{e.remove()}));const c=Se(e);return await Ae(m,e,c,n),await Pe(m,e,c),{elem:m,width:r,height:d}})),async(e,t,n,a)=>{const s=new Set;if(Object.keys(be).filter((e=>n[e])).forEach((e=>s.add(e))),t.filterNodes(((e,t)=>e.startsWith("misc_node_")&&t.type===f.Text)).map((e=>t.getNodeAttribute(e,f.Text).language)).map((e=>_e[e])).filter((e=>e!==c.ShmetroBasic)).forEach((e=>s.add(e))),a)[".rmp-name__zh",".rmp-name__en"].forEach((t=>{e.querySelectorAll(t).forEach((e=>{e.classList.remove(t.slice(1)),0===e.classList.length&&e.removeAttribute("class")}))})),s.forEach((t=>{be[t].className.forEach((t=>{e.querySelectorAll(t).forEach((e=>{e.classList.remove(t.slice(1)),0===e.classList.length&&e.removeAttribute("class")}))}))}));else{const t=document.createElement("style");for(let e=0;ee.cssText)).join("\n");break}}e.prepend(t),await Promise.all([...s.values()].map((e=>be[e])).map((async({cssName:t,cssFont:n})=>{try{e.prepend(await(async(e,t)=>{const n=document.createElement("style");for(let o=document.styleSheets.length-1;o>=0;o-=1){var a;if(null!==(a=document.styleSheets[o].href)&&void 0!==a&&a.endsWith(`styles/${t}.css`)){n.textContent=[...document.styleSheets[o].cssRules].map((e=>e.cssText)).filter((e=>!e.startsWith("@font-face"))).join("\n");break}}n.textContent+="\n";const s=(await Promise.allSettled(Object.keys(e).map(h.getFontCSS))).filter((e=>"fulfilled"===e.status)).map((e=>e.value));return n.textContent+=s.join("\n"),n})(n,t))}catch(a){alert("Failed to load fonts. Fonts in the exported PNG will be missing."),console.error(a)}})))}}),Pe=async(e,t,n)=>{if(n[f.Facilities]){const n=t.filterNodes(((e,t)=>t.type===f.Facilities)),a=Object.fromEntries(Object.values(o).map((e=>[e,[]])));n.forEach((e=>{var n;const s=null===(n=t.getNodeAttribute(e,f.Facilities))||void 0===n?void 0:n.type;s&&a[s].push(e)}));const s=Object.entries(a).filter((([e,t])=>t.length>0)).map((([e,t])=>e)),l=await Promise.all((await Promise.all(s.map((async e=>await fetch(`/rmp//images/facilities/${e}.svg`))))).map((e=>e.text())));s.forEach(((t,n)=>{const s=document.createElement("div");s.innerHTML=l[n];const o=s.querySelector("svg"),i=document.createElementNS("http://www.w3.org/2000/svg","symbol");for(const e of o.attributes)i.setAttribute(e.name,e.value);for(;o.firstChild;)i.appendChild(o.firstChild);o.replaceWith(i),i.id=t,e.appendChild(i),a[t].forEach((n=>{const a=e.querySelector(`#${n}`),s=null==a?void 0:a.querySelector("image");if(s){a.removeChild(s);const e=document.createElementNS("http://www.w3.org/2000/svg","use");e.setAttribute("href",`#${t}`),e.setAttribute("height",i.getAttribute("height")),e.setAttribute("width",i.getAttribute("width")),a.appendChild(e)}})),s.remove()}))}},Be=async(e,t)=>{const n=document.createElementNS("http://www.w3.org/2000/svg","g");n.setAttribute("transform",`translate(${e}, ${t})scale(2)`);const a=await fetch("/rmp//logo.svg"),s=await a.text(),o=document.createElement("div");o.innerHTML=s;const l=o.querySelector("svg"),i=document.createElement("g");i.setAttribute("transform","translate(-60, -25)scale(0.1)"),i.setAttribute("font-family","Arial, sans-serif"),i.innerHTML=l.innerHTML,n.appendChild(i);const r=document.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("font-family","Arial, sans-serif"),r.setAttribute("font-size","16");const d=C.t("Rail Map Painter");r.appendChild(document.createTextNode(d));const m=document.createElementNS("http://www.w3.org/2000/svg","text");m.setAttribute("font-family","Arial, sans-serif"),m.setAttribute("font-size","10"),m.setAttribute("y","10");const c=window.location.origin;let f="https://railmapgen.org/";return c.includes("github")?f="https://railmapgen.github.io/":c.includes("gitlab")&&(f="https://railmapgen.gitlab.io/"),f+="?app=rmp",m.appendChild(document.createTextNode(f)),n.appendChild(i),n.appendChild(r),n.appendChild(m),n};a("u",(()=>{const[e,t]=d.useState({width:void 0,height:void 0});return d.useEffect((()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)}),[]),e}));const $e={top:{lineHeight:6.67,offset:10},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:5.83}},We=s(s({},j),{},{nameOffsetX:"right",nameOffsetY:"top"}),Ee={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,nameOffsetX:f=We.nameOffsetX,nameOffsetY:h=We.nameOffsetY}=null!==(t=o[c.ShmetroBasic])&&void 0!==t?t:We,p=r.useCallback((e=>l(n,e)),[n,l]),u=r.useCallback((e=>i(n,e)),[n,i]),g=r.useCallback((e=>d(n,e)),[n,d]),x="left"===f?-13.33:"right"===f?13.33:0,y=(m[we[h].namesPos].split("\n").length*$e[h].lineHeight+$e[h].offset)*we[h].polarity,C="left"===f?"end":"right"===f?"start":"middle";return r.useMemo((()=>F.jsxs("g",{id:n,transform:`translate(${a}, ${s})`,children:[F.jsx("circle",{id:`stn_core_${n}`,r:5,stroke:"#393332",strokeWidth:"1",fill:"white",onPointerDown:p,onPointerMove:u,onPointerUp:g,style:{cursor:"move"}}),F.jsxs("g",{transform:`translate(${x}, ${y})`,textAnchor:C,className:"rmp-name-outline",strokeWidth:"1",children:[F.jsx(Oe,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),F.jsx(Oe,{text:m[1].split("\n"),dx:"right"===f?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[n,a,s,...m,f,h,p,u,g])},icon:F.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:F.jsx("circle",{cx:"12",cy:"12",r:"5",stroke:"currentColor",fill:"none"})}),defaultAttrs:We,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:a}=e,{t:s}=i(),o=[{type:"textarea",label:s("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,a(t,n)},minW:"full"},{type:"textarea",label:s("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:s("panel.details.stations.common.left"),middle:s("panel.details.stations.common.middle"),right:s("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:s("panel.details.stations.common.top"),middle:s("panel.details.stations.common.middle"),bottom:s("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,a(t,n)},minW:"full"}];return F.jsx(m,{fields:o})},metadata:{displayName:"panel.details.stations.shmetroBasic.displayName",cities:[p.Shanghai],canvas:[v.RailMap],categories:[b.Metro],tags:[]}},Xe={0:{textDx:0,textDy:-17.5,textAnchor:"middle",namesPos:1,lineHeight:6.67,polarity:-1},45:{textDx:1,textDy:-16.25,textAnchor:"start",namesPos:1,lineHeight:6.67,polarity:-1},90:{textDx:12,textDy:0,textAnchor:"start",namesPos:0,lineHeight:0,polarity:0},135:{textDx:5,textDy:21,textAnchor:"start",namesPos:0,lineHeight:12.67,polarity:1},180:{textDx:0,textDy:22.5,textAnchor:"middle",namesPos:0,lineHeight:12.67,polarity:1},225:{textDx:-5,textDy:21,textAnchor:"end",namesPos:0,lineHeight:12.67,polarity:1},270:{textDx:-12,textDy:0,textAnchor:"end",namesPos:0,lineHeight:0,polarity:0},315:{textDx:-1,textDy:-16.25,textAnchor:"end",namesPos:1,lineHeight:6.67,polarity:-1}},Ye=s(s({},j),{},{rotate:0,color:[p.Shanghai,"sh1","#E4002B",u.white]}),Re={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,color:f=Ye.color,rotate:h=Ye.rotate}=null!==(t=o[c.ShmetroBasic2020])&&void 0!==t?t:Ye,p=Xe[h].textDy+(m[Xe[h].namesPos].split("\n").length-1)*Xe[h].lineHeight*Xe[h].polarity,u=r.useCallback((e=>l(n,e)),[n,l]),g=r.useCallback((e=>i(n,e)),[n,i]),x=r.useCallback((e=>d(n,e)),[n,d]);return r.useMemo((()=>F.jsxs("g",{id:n,children:[F.jsx("g",{transform:`translate(${a}, ${s})rotate(${h})`,children:F.jsx("rect",{id:`stn_core_${n}`,x:"-2",y:"-7.83",width:"4",height:"7.83",stroke:"none",fill:f[2],onPointerDown:u,onPointerMove:g,onPointerUp:x,style:{cursor:"move"}})}),F.jsxs("g",{transform:`translate(${a+Xe[h].textDx}, ${s+p})`,textAnchor:Xe[h].textAnchor,className:"rmp-name-outline",strokeWidth:"1",children:[F.jsx(Oe,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),F.jsx(Oe,{text:m[1].split("\n"),dx:h>=45&&h<=135?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[n,a,s,...m,h,f,u,g,x])},icon:F.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:F.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),defaultAttrs:Ye,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:a}=e,{t:s}=i(),o=[{type:"textarea",label:s("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,a(t,n)},minW:"full"},{type:"textarea",label:s("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.rotate"),value:n.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{n.rotate=Number(e),a(t,n)},minW:"full"},{type:"custom",label:s("color"),component:F.jsx(g,{type:c.ShmetroBasic2020,defaultTheme:Ye.color})}];return F.jsx(m,{fields:o})},metadata:{displayName:"panel.details.stations.shmetroBasic2020.displayName",cities:[p.Shanghai],canvas:[v.RailMap],categories:[b.Metro],tags:[]}},Ie={top:{lineHeight:6.67,offset:5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:.83}},Le=s(s({},j),{},{nameOffsetX:"right",nameOffsetY:"top",rotate:0,height:10,width:13}),Te={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,nameOffsetX:f=Le.nameOffsetX,nameOffsetY:h=Le.nameOffsetY,rotate:p=Le.rotate,width:u=Le.width,height:g=Le.height}=null!==(t=o[c.ShmetroInt])&&void 0!==t?t:Le,x=r.useCallback((e=>l(n,e)),[n,l]),y=r.useCallback((e=>i(n,e)),[n,i]),C=r.useCallback((e=>d(n,e)),[n,d]),b=0===p||180===p?u:90===p||270===p?g:u*Math.SQRT1_2,v=0===p||180===p?g:90===p||270===p?u:u*Math.SQRT1_2,O="left"===f?-6.83:"right"===f?6.83:0,w=(Math.abs(O)+b/2)*Math.sign(O),_=(m[we[h].namesPos].split("\n").length*Ie[h].lineHeight+Ie[h].offset)*we[h].polarity,k=(Math.abs(_)+v/2)*Math.sign(_),S="left"===f?"end":"right"===f?"start":"middle";return r.useMemo((()=>F.jsxs("g",{id:n,children:[F.jsx("g",{transform:`translate(${a}, ${s})rotate(${p})`,children:F.jsx("rect",{id:`stn_core_${n}`,x:-u/2,y:-g/2,height:g,width:u,ry:g/2,stroke:"#393332",strokeWidth:"1",fill:"white",onPointerDown:x,onPointerMove:y,onPointerUp:C,style:{cursor:"move"}})}),F.jsxs("g",{transform:`translate(${a+w}, ${s+k})`,textAnchor:S,className:"rmp-name-outline",strokeWidth:"1",children:[F.jsx(Oe,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),F.jsx(Oe,{text:m[1].split("\n"),dx:"right"===f?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[n,a,s,...m,f,h,p,u,g,x,y,C])},icon:F.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:F.jsx("rect",{x:"4.5",y:"7",height:"10",width:"15",ry:"5",stroke:"currentColor",fill:"none"})}),defaultAttrs:Le,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:a}=e,{t:s}=i(),o=[{type:"textarea",label:s("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,a(t,n)},minW:"full"},{type:"textarea",label:s("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:s("panel.details.stations.common.left"),middle:s("panel.details.stations.common.middle"),right:s("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:s("panel.details.stations.common.top"),middle:s("panel.details.stations.common.middle"),bottom:s("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,a(t,n)},minW:"full"},{type:"input",label:s("panel.details.stations.shmetroInt.height"),value:n.height.toString(),validator:e=>Number.isInteger(e),onChange:e=>{n.height=Number(e),a(t,n)},minW:"full"},{type:"input",label:s("panel.details.stations.shmetroInt.width"),value:n.width.toString(),validator:e=>Number.isInteger(e),onChange:e=>{n.width=Number(e),a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.rotate"),value:n.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{n.rotate=Number(e),a(t,n)},minW:"full"}];return F.jsx(m,{fields:o})},metadata:{displayName:"panel.details.stations.shmetroInt.displayName",cities:[p.Shanghai],canvas:[v.RailMap],categories:[b.Metro],tags:["interchange"]}},De=s(s({},j),{},{nameOffsetX:"right",nameOffsetY:"top"}),He={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,nameOffsetX:f=De.nameOffsetX,nameOffsetY:h=De.nameOffsetY}=null!==(t=o[c.ShmetroOutOfSystemInt])&&void 0!==t?t:De,p=r.useCallback((e=>l(n,e)),[n,l]),u=r.useCallback((e=>i(n,e)),[n,i]),g=r.useCallback((e=>d(n,e)),[n,d]),x="left"===f?-13.33:"right"===f?13.33:0,y=(m[we[h].namesPos].split("\n").length*$e[h].lineHeight+$e[h].offset)*we[h].polarity,C="left"===f?"end":"right"===f?"start":"middle";return r.useMemo((()=>F.jsxs("g",{id:n,transform:`translate(${a}, ${s})`,children:[F.jsx("circle",{r:5,stroke:"#393332",strokeWidth:"1.33",fill:"white"}),F.jsx("circle",{r:2.3,stroke:"#393332",strokeWidth:"1.33",fill:"white"}),F.jsx("circle",{id:`stn_core_${n}`,r:5.665,fill:"white",fillOpacity:"0",onPointerDown:p,onPointerMove:u,onPointerUp:g,style:{cursor:"move"},className:"removeMe"}),F.jsxs("g",{transform:`translate(${x}, ${y})`,textAnchor:C,className:"rmp-name-outline",strokeWidth:"1",children:[F.jsx(Oe,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),F.jsx(Oe,{text:m[1].split("\n"),dx:"right"===f?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[n,a,s,...m,f,h,p,u,g])},icon:F.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[F.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.67",fill:"white"}),F.jsx("circle",{cx:"12",cy:"12",r:"4.6",stroke:"currentColor",strokeWidth:"2.67",fill:"white"})]}),defaultAttrs:De,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:a}=e,{t:s}=i(),o=[{type:"textarea",label:s("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,a(t,n)},minW:"full"},{type:"textarea",label:s("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:s("panel.details.stations.common.left"),middle:s("panel.details.stations.common.middle"),right:s("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:s("panel.details.stations.common.top"),middle:s("panel.details.stations.common.middle"),bottom:s("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,a(t,n)},minW:"full"}];return F.jsx(m,{fields:o})},metadata:{displayName:"panel.details.stations.shmetroOsysi.displayName",cities:[p.Shanghai],canvas:[v.RailMap],categories:[b.Metro],tags:[]}},Ue=s(s({},j),{},{rotate:0}),Fe={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,rotate:f=Ue.rotate}=null!==(t=o[c.ShanghaiSuburbanRailway])&&void 0!==t?t:Ue,h=Xe[f].textDy+(m[Xe[f].namesPos].split("\n").length-1)*Xe[f].lineHeight*Xe[f].polarity,p=r.useCallback((e=>l(n,e)),[n,l]),u=r.useCallback((e=>i(n,e)),[n,i]),g=r.useCallback((e=>d(n,e)),[n,d]);return r.useMemo((()=>F.jsxs("g",{id:n,children:[F.jsxs("g",{transform:`translate(${a}, ${s})rotate(${f})`,children:[F.jsx("rect",{x:"-2",y:"-7.83",width:"4",height:"7.83",stroke:"none",fill:"#898989"}),F.jsx("rect",{x:"-3.5",y:"-1",width:"7",height:"2",stroke:"none",fill:"white"}),F.jsx("rect",{x:-.8325,y:-6.33,width:1.6,height:6.33,stroke:"none",fill:"white"}),F.jsx("rect",{id:`stn_core_${n}`,x:"-2",y:"-7.83",width:"4",height:9.08,stroke:"none",fill:"white",fillOpacity:"0",onPointerDown:p,onPointerMove:u,onPointerUp:g,style:{cursor:"move"},className:"removeMe"})]}),F.jsxs("g",{transform:`translate(${a+Xe[f].textDx}, ${s+h})`,textAnchor:Xe[f].textAnchor,className:"rmp-name-outline",strokeWidth:"2.5",children:[F.jsx(Oe,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),F.jsx(Oe,{text:m[1].split("\n"),dx:f>=45&&f<=135?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[n,a,s,...m,f,p,u,g])},icon:F.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:F.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),defaultAttrs:Ue,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:a}=e,{t:s}=i(),o=[{type:"textarea",label:s("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,a(t,n)},minW:"full"},{type:"textarea",label:s("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.rotate"),value:n.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{n.rotate=Number(e),a(t,n)},minW:"full"}];return F.jsx(m,{fields:o})},metadata:{displayName:"panel.details.stations.shanghaiSuburbanRailway.displayName",cities:[p.Shanghai],canvas:[v.RailMap],categories:[b.Metro],tags:[]}};var Ve=1.3,Ge=45,Ze=Ge-3,Qe=function(e,t){var n=[e,t].map((function(e){return e.match(/^(\w+).+$/)}));if(n[0]&&n[1]&&n[0][1]===n[1][1])return n[0][1]},qe=function(e){var t=e.match(/^(\d+)\D+$/);return null==t?void 0:t[1]},Je=function(){return Je=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=o.next()).done;)l.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}return l};function st(e){var t=e.zhName,n=e.enName,a=e.foregroundColour,s=e.backgroundColour,o=e.zhClassName,l=e.enClassName,i=e.passed,r=e.children,m=nt(e,["zhName","enName","foregroundColour","backgroundColour","zhClassName","enClassName","passed","children"]),c=function(e,t){var n=qe(e);if(n)return{isDigit:!0,spanningPart:n};var a=Qe(e,t);return a?{isDigit:!1,spanningPart:a}:{isDigit:!1,spanningPart:""}}(t,n),f=c.isDigit,h=c.spanningPart,p=d.useRef(null),g=at(d.useState({x:0,height:0,width:0}),2),x=g[0],y=g[1];d.useEffect((function(){p.current&&y(p.current.getBBox())}),[t,n]);var C=Ze/Math.max(Ze,x.width),b=(-x.x-x.width/2)*C,v=x.height*(1-C)/2;return F.jsxs("g",tt({textAnchor:"middle",fill:i?u.white:a},m,{children:[F.jsx(et,{fill:i?"#aaa":s}),F.jsx("g",{ref:p,transform:"translate(".concat(b,",").concat(v,")scale(").concat(C,")"),children:F.jsxs("text",{className:o,fontSize:21,x:-1,y:12,textAnchor:"end",dominantBaseline:"central",children:[h,F.jsx("tspan",{className:o,fontSize:10,x:0,dy:-4,textAnchor:"start",dominantBaseline:"central",children:t.slice(h.length).trim()}),F.jsx("tspan",{className:l,fontSize:6.5,letterSpacing:-.1,x:0,dy:10,textAnchor:"start",dominantBaseline:"middle",children:f?n:n.slice(h.length).trim()})]})}),r]}))}var ot=function(){return ot=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=o.next()).done;)l.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}return l};function rt(e){var t,n=e.zhName,a=e.enName,s=e.foregroundColour,o=e.backgroundColour,l=e.zhClassName,i=e.enClassName,r=e.passed,m=e.children,c=lt(e,["zhName","enName","foregroundColour","backgroundColour","zhClassName","enClassName","passed","children"]),f=null!==(t=qe(n))&&void 0!==t?t:"",h=d.useRef(null),p=d.useRef(null),g=it(d.useState({width:0}),2),x=g[0],y=g[1],C=it(d.useState({width:0}),2),b=C[0],v=C[1];d.useEffect((function(){h.current&&y(h.current.getBBox()),p.current&&v(p.current.getBBox())}),[n,a]);var j=Ze/Math.max(Ze,x.width),O=Ze/Math.max(Ze,b.width),w={nameZh:{y:7.3+13.5*(1-j)*j/2},nameEn:{y:19.5-9*(1-O)*O/2}};return F.jsxs("g",ot({textAnchor:"middle",fill:r?u.white:s},c,{children:[F.jsx(et,{fill:r?"#aaa":o}),F.jsxs("text",{ref:h,className:l,fontSize:12,transform:"translate(0,".concat(w.nameZh.y,")scale(").concat(j,")"),dominantBaseline:"central",children:[F.jsx("tspan",{fontSize:16,dy:.7,dominantBaseline:"central",children:f}),F.jsx("tspan",{dy:-.7,dominantBaseline:"central",children:n.slice(f.length)})]}),F.jsx("text",{ref:p,className:i,fontSize:8,transform:"translate(0,".concat(w.nameEn.y,")scale(").concat(O,")"),dominantBaseline:"middle",children:a}),m]}))}var dt=function(){return dt=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=o.next()).done;)l.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}return l};function ft(e){var t=e.zhName,n=e.enName,a=e.foregroundColour,s=e.backgroundColour,o=e.zhClassName,l=e.enClassName,i=e.passed,r=e.children,m=mt(e,["zhName","enName","foregroundColour","backgroundColour","zhClassName","enClassName","passed","children"]),c=d.useRef(null),f=ct(d.useState({width:0}),2),h=f[0],p=f[1];d.useEffect((function(){c.current&&p(c.current.getBBox())}),[t,n]);var g=Math.max(45,h.width+4);return F.jsxs("g",dt({textAnchor:"middle",fill:i?u.white:a},m,{children:[F.jsx(et,{customWidth:g,fill:i?"#aaa":s}),F.jsxs("g",{ref:c,children:[F.jsx("text",{className:o,fontSize:8.5,y:8,dominantBaseline:"central",children:t}),F.jsx("text",{className:l,fontSize:5.5,y:18,dominantBaseline:"middle",children:n})]}),r]}))}var ht=function(){return ht=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=o.next()).done;)l.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}return l};function gt(e){var t=e.zhName,n=e.enName,a=e.foregroundColour,s=e.backgroundColour,o=e.zhClassName,l=e.enClassName,i=e.passed,r=e.children,m=pt(e,["zhName","enName","foregroundColour","backgroundColour","zhClassName","enClassName","passed","children"]),c=d.useRef(null),f=d.useRef(null),h=ut(d.useState({width:0}),2),p=h[0],g=h[1],x=ut(d.useState({width:0}),2),y=x[0],C=x[1];d.useEffect((function(){c.current&&g(c.current.getBBox()),f.current&&C(f.current.getBBox())}),[t,n]);var b=Ze/Math.max(Ze,p.width),v=Ze/Math.max(Ze,y.width),j={nameZh:{y:7.3+13.5*(1-b)*b/2},nameEn:{y:19.5-9*(1-v)*v/2}};return F.jsxs("g",ht({textAnchor:"middle",fill:i?u.white:a},m,{children:[F.jsx(et,{fill:i?"#aaa":s}),F.jsx("text",{ref:c,className:o,fontSize:12,transform:"translate(0,".concat(j.nameZh.y,")scale(").concat(b,")"),dominantBaseline:"central",children:t}),F.jsx("text",{ref:f,className:l,fontSize:8,transform:"translate(0,".concat(j.nameEn.y,")scale(").concat(v,")"),dominantBaseline:"middle",children:n}),r]}))}var xt=function(){return xt=Object.assign||function(e){for(var t,n=1,a=arguments.length;n=5?F.jsx(ft,xt({},e)):F.jsx(gt,xt({},e))}})));var yt=function(e,t){return void 0!==qe(e)?1:void 0!==Qe(e,t)?2:3},Ct=function(){return Ct=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=o.next()).done;)l.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}return l},Mt=d.forwardRef((function(e,t){var n=e.Icon,a=e.lineNum,s=e.stnNum,o=e.strokeColour,l=e.passed,i=e.size,r=e.textClassName,m=e.bolderBorder,c=e.alwaysShowColouredBorder,f=e.useSameScale,h=e.children,p=Nt(e,["Icon","lineNum","stnNum","strokeColour","passed","size","textClassName","bolderBorder","alwaysShowColouredBorder","useSameScale","children"]),u=d.useContext(kt).updateId,g=d.useRef(null),x=d.useRef(null),y=zt(d.useState({width:0}),2),C=y[0],b=y[1],v=zt(d.useState({width:0}),2),j=v[0],O=v[1];d.useEffect((function(){g.current&&b(g.current.getBBox()),x.current&&O(x.current.getBBox())}),[a,s,u]);var w=a&&a.length>2;d.useEffect((function(){f&&w&&console.warn("GenericStationNumber(), useSameScale props does not work when lineNum has more than 2 characters")}),[f,w]);var _=17/Math.max(17,C.width),k=f&&2===(null==a?void 0:a.length)?_:17/Math.max(17,j.width),S="sm"===i?"0.7":"lg"===i?"1.6":1;return F.jsxs("g",St({ref:t},p,{children:[F.jsxs("g",{transform:"scale(".concat(S,")"),children:[F.jsx(n,{stroke:l&&!c?"#aaa":o,filled:!a&&!s,bolder:m}),(a||s)&&F.jsxs("g",{textAnchor:"middle",fontSize:13.5,fill:l?"#aaa":"#000",children:[F.jsx("g",{transform:"translate(-9.25,0)scale(".concat(_,")"),children:F.jsx("text",{ref:g,className:r,dominantBaseline:"central",x:.5,children:a})}),F.jsx("g",{transform:"translate(9.25,0)scale(".concat(k,")"),children:F.jsx("text",{ref:x,className:r,dominantBaseline:"central",children:s})})]})]}),h]}))})),At=function(){return At=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=o.next()).done;)l.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}return l},Lt=function(e,t){return Array.from(Array(e).keys()).map((function(n){return(n-(e-1)/2)*t}))},Tt=function(e){return"fmetro"===e?jt:_t},Dt=9.1,Ht=2.8600000000000003,Ut=d.forwardRef((function(e,t){var n=e.stations,a=e.textClassName,s=e.columns,o=void 0===s?2:s,l=e.topHeavy,i=e.anchorAt,r=e.osiPosition,m=e.children,c=Rt(e,["stations","textClassName","columns","topHeavy","anchorAt","osiPosition","children"]),f=d.useMemo((function(){return function(e,t,n){if(e<=0)return[];if(1===e)return[[0,0]];for(var a=t>e?e:t,s=Lt(a,38.3),o=Math.ceil(e/a),l=Lt(o,19.8),i=e%a,r=[],d=0;d=f.length)return console.warn(", anchor index ".concat(i," is out of bound")),[0,0];var e=It(f[i],2);return[-e[0],-e[1]]}),[f,i]),2),p=h[0],u=h[1],g=d.useRef(null),x=d.useRef([]);d.useEffect((function(){x.current=x.current.slice(0,n.length)}),[n.length]);var y=2===n.length&&1===o&&!!r;return d.useImperativeHandle(t,(function(){return{target:g.current,children:x.current,getCoordinates:function(){return f},getCorrectedBBox:function(){var e,t,n=null!==(t=null===(e=g.current)||void 0===e?void 0:e.getBBox())&&void 0!==t?t:{x:0,y:0,width:0,height:0};return n.y-=4.55,n.height+=Dt,y?(n.x-="left"===r?1.4300000000000002:4.55,n.width+=5.98):(n.x-=4.55,n.width+=Dt),n},getTranslate:function(){return[p,u]}}}),[f,p,u,g.current,x.current,r]),F.jsxs("g",Yt({ref:g,transform:"translate(".concat(p,",").concat(u,")")},c,{children:[n.map((function(e,t){var n=e.style,a=Tt(n);return F.jsx(a,{stroke:"#aaa",filled:!0,strokeWidth:Dt,transform:"translate(".concat(f[t][0],",").concat(f[t][1],")")},t)})),y&&F.jsx(Xt,{position:r,r:13.206896551724137,strokeWidth:Ht,strokeDasharray:void 0}),n.map((function(e,t){var n=e.style,a=Tt(n);return F.jsx(a,{stroke:"white",filled:!0,strokeWidth:3.3800000000000003,transform:"translate(".concat(f[t][0],",").concat(f[t][1],")")},t)})),y&&F.jsx(Xt,{position:r}),n.length&&F.jsx("rect",{fill:"white",x:-12,y:f[0][1],width:24,height:2*-f[0][1]}),n.map((function(e,t){var n=e.style,s=Rt(e,["style"]),o="fmetro"===n?Pt:$t;return F.jsx(o,Yt({ref:function(e){return x.current[t]=e},transform:"translate(".concat(f[t][0],",").concat(f[t][1],")"),textClassName:a},s),t)})),m]}))})),Ft=function(){return Ft=Object.assign||function(e){for(var t,n=1,a=arguments.length;n{var t,n;const{id:a,x:s,y:o,attrs:l,handlePointerDown:i,handlePointerMove:d,handlePointerUp:m}=e,{names:f=j.names,nameOffsetX:h=en.nameOffsetX,nameOffsetY:p=en.nameOffsetY,color:u=en.color,lineCode:g=en.lineCode,stationCode:x=en.stationCode,open:y=en.open,secondaryNames:C=en.secondaryNames,tram:b=en.tram}=null!==(t=l[c.GzmtrBasic])&&void 0!==t?t:en,v=r.useCallback((e=>i(a,e)),[a,i]),O=r.useCallback((e=>d(a,e)),[a,d]),w=r.useCallback((e=>m(a,e)),[a,m]),_=r.useRef(null);null===(n=_.current)||void 0===n||null===(n=n.querySelector("path"))||void 0===n||n.setAttribute("id",`stn_core_${a}`);const k={en:b?5.08:6.56,zh:b?7.29:13.13},S={top:{namesPos:1,lineHeight:k.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:k.zh,polarity:1}},N=b?11:15,z="left"===h?-N:"right"===h?N:0,M=b?8:10,A=(f[S[p].namesPos].split("\n").length*S[p].lineHeight+M)*S[p].polarity,P="left"===h?"end":"right"===h?"start":y||"middle"!==h||""!==C.join("")?"middle":"end",B=r.useRef(null),[$,W]=r.useState(0);r.useEffect((()=>{var e,t;return W(null!==(e=null===(t=B.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...C,b]);const E=r.useRef(null),[X,Y]=r.useState(0);r.useEffect((()=>{var e,t;return Y(null!==(e=null===(t=E.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...f,b]);const R="middle"===h?X/2+($+24)/2:(X+($+24)/2)*("left"===h?-1:1),I="middle"===h&&""!==C.join("")?X/2+($+24):(X+$+(0!==$?24:0))*("left"===h?-1:"right"===h?1:0);return F.jsxs("g",{id:a,transform:`translate(${s}, ${o})`,children:[F.jsx("g",{transform:`scale(${.57915*(b?.729:1)})`,onPointerDown:v,onPointerMove:O,onPointerUp:w,style:{cursor:"move"},ref:_,children:F.jsx($t,{id:`stn_core_${a}`,strokeColour:u[2],lineNum:""===g?void 0:g,stnNum:""===x?void 0:x,textClassName:"rmp-name__zh"})}),F.jsxs("g",{ref:E,transform:`translate(${z}, ${A})`,textAnchor:P,children:[F.jsx(Oe,{text:f[0].split("\n"),fontSize:k.zh,lineHeight:k.zh,grow:"up",className:"rmp-name__zh"}),F.jsx(Oe,{text:f[1].split("\n"),fontSize:k.en,lineHeight:k.en,grow:"down",className:"rmp-name__en"})]}),""!==C.join("")&&F.jsxs("g",{transform:`translate(${z+R}, ${A})`,textAnchor:"middle",children:[F.jsx("text",{fontSize:"13.13",dx:-($+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),F.jsx("text",{fontSize:"13.13",dx:($+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),F.jsxs("g",{ref:B,children:[F.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:C[0]}),F.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:C[1]})]})]}),!y&&F.jsxs("g",{transform:`translate(${z+I}, ${A})`,textAnchor:"middle"===h?"start":P,children:[F.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),F.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},icon:F.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:F.jsx("g",{transform:"translate(12,12)scale(0.45)",children:F.jsx($t,{strokeColour:"#000",lineNum:"1",stnNum:"01"})})}),defaultAttrs:en,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:a}=e,{t:s}=i(),o=[{type:"textarea",label:s("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,a(t,n)},minW:"full"},{type:"textarea",label:s("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:s("panel.details.stations.common.left"),middle:s("panel.details.stations.common.middle"),right:s("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:s("panel.details.stations.common.top"),middle:s("panel.details.stations.common.middle"),bottom:s("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,a(t,n)},minW:"full"},{type:"custom",label:s("color"),component:F.jsx(g,{type:c.GzmtrBasic,defaultTheme:en.color})},{type:"input",label:s("panel.details.stations.common.lineCode"),value:n.lineCode,onChange:e=>{n.lineCode=e,a(t,n)},minW:"full"},{type:"input",label:s("panel.details.stations.common.stationCode"),value:n.stationCode,onChange:e=>{n.stationCode=e,a(t,n)},minW:"full"},{type:"switch",label:s("panel.details.stations.gzmtrBasic.open"),oneLine:!0,isChecked:n.open,onChange:e=>{n.open=e,a(t,n)},minW:"full"},{type:"input",label:s("panel.details.stations.gzmtrBasic.secondaryNameZh"),value:n.secondaryNames[0],onChange:e=>{n.secondaryNames[0]=e,a(t,n)},minW:"full"},{type:"input",label:s("panel.details.stations.gzmtrBasic.secondaryNameEn"),value:n.secondaryNames[1],onChange:e=>{n.secondaryNames[1]=e,a(t,n)},minW:"full"},{type:"switch",label:s("panel.details.stations.gzmtrBasic.tram"),oneLine:!0,isChecked:n.tram,onChange:e=>{n.tram=e,a(t,n)},minW:"full"}];return F.jsx(m,{fields:o})},metadata:{displayName:"panel.details.stations.gzmtrBasic.displayName",cities:[p.Guangzhou],canvas:[v.RailMap],categories:[b.Metro],tags:[]}},nn=[p.Guangzhou,"","#AAAAAA",u.white,"","","gz"];function an(e){const{interchangeList:t,onAdd:n,onDelete:a,onUpdate:s}=e,o=O(),{paletteAppClip:{output:l}}=w((e=>e.runtime)),{t:d}=i(),[c,f]=r.useState();r.useEffect((()=>{void 0!==c&&l&&(null==s||s(c,[...l,t[c][4],t[c][5],t[c][6]]),f(void 0))}),[null==l?void 0:l.toString()]);const h=t.map(((e,t)=>[{type:"input",label:d("panel.details.stations.common.lineCode"),value:e[4],minW:"80px",onChange:n=>null==s?void 0:s(t,[e[0],e[1],e[2],e[3],n,e[5],e[6]])},{type:"input",label:d("panel.details.stations.common.stationCode"),value:e[5],minW:"80px",onChange:n=>null==s?void 0:s(t,[e[0],e[1],e[2],e[3],e[4],n,e[6]])}]));return F.jsxs(_,{direction:"column",children:[0===t.length&&F.jsxs(V,{spacing:.5,"data-testid":"interchange-card-stack",children:[F.jsx(G,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:d("panel.details.stations.interchange.noInterchanges")}),F.jsx(Z,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),onClick:()=>null==n?void 0:n(nn),icon:F.jsx(k,{})})]}),t.map(((e,l)=>F.jsxs(V,{spacing:.5,"data-testid":`interchange-card-stack-${l}`,children:[F.jsx(S,{label:d("color"),minW:"40px",noLabel:0!==l,children:F.jsx(N,{theme:[e[0],e[1],e[2],e[3]],onClick:()=>{f(l),o(z([e[0],e[1],e[2],e[3]]))}})}),F.jsx(m,{fields:h[l],noLabel:0!==l}),F.jsxs(Q,{children:[n&&l===h.length-1?F.jsx(Z,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.copy"),onClick:()=>null==n?void 0:n(t.slice(-1)[0]),icon:F.jsx(M,{})}):F.jsx(q,{minW:8}),a&&F.jsx(Z,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.remove"),onClick:()=>null==a?void 0:a(l),icon:F.jsx(A,{})}),F.jsx(m,{fields:[{type:"switch",label:d("panel.details.stations.gzmtrInt.foshan"),isChecked:"fs"===e[6],onChange:t=>((e,t,n)=>null==s?void 0:s(t,[e[0],e[1],e[2],e[3],e[4],e[5],n?"fs":"gz"]))(e,l,t)}]})]})]},l)))]})}const sn=[[[0,0]],[[0,0]],[[-21,0],[21,0]],[[-21.65,-12.5],[21.65,-12.5],[0,25]],[[-23,-18],[22,-16],[23,18],[-22,16]]],on=s(s({},j),{},{nameOffsetX:"right",nameOffsetY:"top",transfer:[[],[]],open:!0,secondaryNames:["",""],tram:!1}),ln={component:e=>{var t,n,a,s,o,l,i,d,m,f,h,p,u,g,x,y,C,b,v,O,w,_,k,S;const{id:N,x:z,y:M,attrs:A,handlePointerDown:P,handlePointerMove:B,handlePointerUp:$}=e,{names:W=j.names,nameOffsetX:E=on.nameOffsetX,nameOffsetY:X=on.nameOffsetY,transfer:Y=on.transfer,open:R=on.open,secondaryNames:I=on.secondaryNames,tram:L=on.tram}=null!==(t=A[c.GzmtrInt])&&void 0!==t?t:on,T=r.useCallback((e=>P(N,e)),[N,P]),D=r.useCallback((e=>B(N,e)),[N,B]),H=r.useCallback((e=>$(N,e)),[N,$]),U=ee("white","var(--chakra-colors-gray-800)"),V={en:L?5.08:6.56,zh:L?7.29:13.13},G={top:{namesPos:1,lineHeight:V.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:V.zh,polarity:1}},Z=L?18:25,Q=("left"===E?-Z:"right"===E?Z:0)*("middle"===X?1.1:1),q=L?14:18,J=(W[G[X].namesPos].split("\n").length*G[X].lineHeight+q*("middle"===E?1.1:1))*G[X].polarity,K="left"===E?"end":"right"===E?"start":R||"middle"!==E||""!==I.join("")?"middle":"end",te=Y.flat().slice(0,4),ne=[["black","black"],[null!==(n=null===(a=te.at(0))||void 0===a?void 0:a.at(2))&&void 0!==n?n:"black",null!==(s=null===(o=te.at(0))||void 0===o?void 0:o.at(2))&&void 0!==s?s:"black"],[null!==(l=null===(i=te.at(0))||void 0===i?void 0:i.at(2))&&void 0!==l?l:"black",null!==(d=null===(m=te.at(1))||void 0===m?void 0:m.at(2))&&void 0!==d?d:"black"],[null!==(f=null===(h=te.at(0))||void 0===h?void 0:h.at(2))&&void 0!==f?f:"black",null!==(p=null===(u=te.at(1))||void 0===u?void 0:u.at(2))&&void 0!==p?p:"black",null!==(g=null===(x=te.at(2))||void 0===x?void 0:x.at(2))&&void 0!==g?g:"black"],[null!==(y=null===(C=te.at(0))||void 0===C?void 0:C.at(2))&&void 0!==y?y:"black",null!==(b=null===(v=te.at(1))||void 0===v?void 0:v.at(2))&&void 0!==b?b:"black",null!==(O=null===(w=te.at(2))||void 0===w?void 0:w.at(2))&&void 0!==O?O:"black",null!==(_=null===(k=te.at(3))||void 0===k?void 0:k.at(2))&&void 0!==_?_:"black"]],ae=r.useRef(null),[se,oe]=r.useState(0);r.useEffect((()=>{var e,t;return oe(null!==(e=null===(t=ae.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...I]);const le=r.useRef(null),[ie,re]=r.useState(0);r.useEffect((()=>{var e,t;return re(null!==(e=null===(t=le.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...W]);const de=(ie+(se+24)/2)*("left"===E?-1:1),me=(ie+se+(0!==se?24:0))*("left"===E?-1:"right"===E||0!==se?1:0),ce="middle"===E?"start":K;return F.jsxs("g",{id:N,transform:`translate(${z}, ${M})`,children:[te.map((e=>e[2])).filter(((e,t,n)=>n.indexOf(e)===t)).map((e=>F.jsx("marker",{id:`gzmtr_int_arrow_${e}`,markerWidth:"5",markerHeight:"5",refX:"1",refY:"1.25",orient:"auto",children:F.jsx("polygon",{points:"0.25,0 0.25,2.5 2.25,1.25",fill:e})},`gzmtr_int_arrow_${e}`))),F.jsxs("g",{transform:`scale(${.57915*(L?.729:1)})`,children:[te.length<=2&&F.jsxs(F.Fragment,{children:[F.jsx("path",{d:"M -21,-15 A 28 28 0 0 1 21,-15 L 21,15 A 28 28 0 0 1 -21,15 Z",fill:U}),F.jsx("path",{d:"M -21,-15 A 28 28 0 0 1 21,-15",fill:"none",stroke:ne[te.length][0],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),F.jsx("path",{d:"M 21,15 A 28 28 0 0 1 -21,15",fill:"none",stroke:ne[te.length][1],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`})]}),3===te.length&&F.jsxs(F.Fragment,{children:[F.jsx("circle",{r:"25",fill:U}),F.jsx("path",{d:"M -21.65,12.5 A 25 25 0 0 1 0,-25",fill:"none",stroke:ne[te.length][0],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),F.jsx("path",{d:"M 0,-25 A 25 25 0 0 1 21.65,12.5",fill:"none",stroke:ne[te.length][1],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`}),F.jsx("path",{d:"M 21.65,12.5 A 25 25 0 0 1 -21.65,12.5",fill:"none",stroke:ne[te.length][2],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][2]})`}),F.jsx("path",{d:"M -21.65,12.5 A 25 25 0 0 1 0,-25",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),F.jsx("path",{d:"M 0,-25 A 25 25 0 0 1 21.65,12.5",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`})]}),te.length>=4&&F.jsxs(F.Fragment,{children:[F.jsx("circle",{r:"25",fill:U}),F.jsx("path",{d:"M -25,0 A 25 25 0 0 1 0,-25",fill:"none",stroke:ne[te.length][0],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),F.jsx("path",{d:"M 0,-25 A 25 25 0 0 1 25,0",fill:"none",stroke:ne[te.length][1],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`}),F.jsx("path",{d:"M 25,0 A 25 25 0 0 1 0,25",fill:"none",stroke:ne[te.length][2],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][2]})`}),F.jsx("path",{d:"M 0,25 A 25 25 0 0 1 -25,0",fill:"none",stroke:ne[te.length][3],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][3]})`}),F.jsx("path",{d:"M -25,0 A 25 25 0 0 1 0,-25",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),F.jsx("path",{d:"M 0,-25 A 25 25 0 0 1 25,0",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`}),F.jsx("path",{d:"M 25,0 A 25 25 0 0 1 0,25",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][2]})`})]}),null===(S=Y[0])||void 0===S?void 0:S.map(((e,t,n)=>F.jsx("g",{transform:`translate(${sn[n.length][t][0]},${sn[n.length][t][1]})`,children:"gz"===e[6]?F.jsx($t,{strokeColour:e[2],lineNum:e[4],stnNum:e[5],textClassName:"rmp-name__zh"}):F.jsx(Pt,{strokeColour:e[2],lineNum:e[4],stnNum:e[5],textClassName:"rmp-name__zh"})},`gzmtr_int_${N}_stn_${t}`))),F.jsx("circle",{id:`stn_core_${N}`,r:"25",fill:"white",fillOpacity:"0",onPointerDown:T,onPointerMove:D,onPointerUp:H,style:{cursor:"move"},className:"removeMe"})]}),F.jsxs("g",{ref:le,transform:`translate(${Q}, ${J})`,textAnchor:K,children:[F.jsx(Oe,{text:W[0].split("\\"),fontSize:V.zh,lineHeight:V.zh,grow:"up",className:"rmp-name__zh"}),F.jsx(Oe,{text:W[1].split("\\"),fontSize:V.en,lineHeight:V.en,grow:"down",className:"rmp-name__en"})]}),""!==I.join("")&&F.jsxs("g",{transform:`translate(${Q+de}, ${J})`,textAnchor:"middle",children:[F.jsx("text",{fontSize:"13.13",dx:-(se+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),F.jsx("text",{fontSize:"13.13",dx:(se+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),F.jsxs("g",{ref:ae,children:[F.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:I[0]}),F.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:I[1]})]})]}),!R&&F.jsxs("g",{transform:`translate(${Q+me}, ${J})`,textAnchor:ce,children:[F.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),F.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},icon:F.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[F.jsx("g",{transform:"translate(6,12)scale(0.3)",children:F.jsx($t,{strokeColour:"currentColor",lineNum:"1",stnNum:"09"})}),F.jsx("g",{transform:"translate(18,12)scale(0.3)",children:F.jsx($t,{strokeColour:"currentColor",lineNum:"2",stnNum:"13"})}),F.jsx("marker",{id:"arrow",markerWidth:"5",markerHeight:"5",refX:"1",refY:"1.25",orient:"auto",children:F.jsx("polygon",{points:"0,0 0,3 2,1.5"})}),F.jsx("path",{d:"M 6,6 A 8 8 0 0 1 18,6",fill:"none",stroke:"currentColor",strokeWidth:"2",markerEnd:"url(#arrow)"}),F.jsx("path",{d:"M 18,18 A 8 8 0 0 1 6,18",fill:"none",stroke:"currentColor",strokeWidth:"2",markerEnd:"url(#arrow)"})]}),defaultAttrs:on,attrsComponent:e=>{var t;const{id:n,attrs:a,handleAttrsUpdate:s}=e,{t:o}=i(),l=[{type:"textarea",label:o("panel.details.stations.common.nameZh"),value:a.names[0],onChange:e=>{a.names[0]=e,s(n,a)},minW:"full"},{type:"textarea",label:o("panel.details.stations.common.nameEn"),value:a.names[1],onChange:e=>{a.names[1]=e,s(n,a)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetX"),value:a.nameOffsetX,options:{left:o("panel.details.stations.common.left"),middle:o("panel.details.stations.common.middle"),right:o("panel.details.stations.common.right")},disabledOptions:"middle"===a.nameOffsetY?["middle"]:[],onChange:e=>{a.nameOffsetX=e,s(n,a)},minW:"full"},{type:"select",label:o("panel.details.stations.common.nameOffsetY"),value:a.nameOffsetY,options:{top:o("panel.details.stations.common.top"),middle:o("panel.details.stations.common.middle"),bottom:o("panel.details.stations.common.bottom")},disabledOptions:"middle"===a.nameOffsetX?["middle"]:[],onChange:e=>{a.nameOffsetY=e,s(n,a)},minW:"full"},{type:"switch",label:o("panel.details.stations.gzmtrInt.open"),oneLine:!0,isChecked:a.open,onChange:e=>{a.open=e,s(n,a)},minW:"full"},{type:"input",label:o("panel.details.stations.gzmtrInt.secondaryNameZh"),value:a.secondaryNames[0],onChange:e=>{a.secondaryNames[0]=e,s(n,a)},minW:"full"},{type:"input",label:o("panel.details.stations.gzmtrInt.secondaryNameEn"),value:a.secondaryNames[1],onChange:e=>{a.secondaryNames[1]=e.toString(),s(n,a)},minW:"full"},{type:"switch",label:o("panel.details.stations.gzmtrBasic.tram"),oneLine:!0,isChecked:a.tram,onChange:e=>{a.tram=e,s(n,a)},minW:"full"}],d=[4,4,0],c=null!==(t=a.transfer)&&void 0!==t?t:on.transfer,f=e=>t=>{const o=structuredClone(c);if(o.length<=e)for(let n=o.length;n<=e;n++)o[n]=[nn];o[e].push(t),a.transfer=o,s(n,a)},h=e=>(t,o)=>{if(c.length>e&&c[e].length>t){const l=c.map(((n,a)=>a===e?n.map(((e,n)=>n===t?[0,1,2,3,4,5,6].map((t=>void 0===o[t]?e[t]:o[t])):e)):n));a.transfer=l,s(n,a)}};return F.jsxs(F.Fragment,{children:[F.jsx(m,{fields:l}),F.jsx(S,{label:o("panel.details.stations.interchange.title"),children:F.jsxs(Q,{align:"flex-start",children:[c.map(((e,t)=>{return F.jsxs(r.Fragment,{children:[F.jsx(J,{size:"xs",children:o(0===t?"panel.details.stations.interchange.within":1===t?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),F.jsx(an,{interchangeList:e,onAdd:d[t]>e.length?f(t):void 0,onDelete:(l=t,e=>{if(c.length>l&&c[l].length>e){const t=c.map(((t,n)=>n===l?t.filter(((t,n)=>n!==e)):t));a.transfer=t,s(n,a)}}),onUpdate:h(t)})]},t);var l})),d[c.length]>0&&F.jsx(K,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:F.jsx(k,{}),onClick:()=>f(c.length)(nn),children:o("panel.details.stations.interchange.addGroup")})]})})]})},metadata:{displayName:"panel.details.stations.gzmtrInt.displayName",cities:[p.Guangzhou],canvas:[v.RailMap],categories:[b.Metro],tags:[]}};var rn=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,s,o=n.call(e),l=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)l.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}return l};const dn=6.56,mn=13.13,cn=structuredClone(we);cn.top.lineHeight=dn,cn.bottom.lineHeight=mn;const fn=s(s({},j),{},{nameOffsetX:"right",nameOffsetY:"top",transfer:[[[p.Guangzhou,"gz1","#F3D03E",u.white,"1","14","gz"],[p.Guangzhou,"gz3","#ECA154",u.white,"3","11","gz"]]],open:!0,secondaryNames:["",""],columns:2,topHeavy:!1,anchorAt:-1,osiPosition:"none"}),hn={component:e=>{var t,n,a,s,o,l,i;const{id:d,x:m,y:f,attrs:h,handlePointerDown:p,handlePointerMove:u,handlePointerUp:g}=e,{names:x=j.names,nameOffsetX:y=fn.nameOffsetX,nameOffsetY:C=fn.nameOffsetY,transfer:b=fn.transfer,open:v=fn.open,secondaryNames:O=fn.secondaryNames,columns:w=fn.columns,topHeavy:_=fn.topHeavy,anchorAt:k=fn.anchorAt,osiPosition:S=fn.osiPosition}=null!==(t=h[c.GzmtrInt2024])&&void 0!==t?t:fn,N=r.useCallback((e=>p(d,e)),[d,p]),z=r.useCallback((e=>u(d,e)),[d,u]),M=r.useCallback((e=>g(d,e)),[d,g]),A=b.flat().slice(0,5),P=A.map((e=>({style:"gz"===e[6]?"gzmtr":"fmetro",lineNum:e[4],stnNum:e[5],strokeColour:e[2]}))),[B,$]=r.useState(),[W,E]=r.useState([0,0]),X=r.useRef(null);r.useEffect((()=>{X.current&&($(X.current.getCorrectedBBox()),E(X.current.getTranslate()))}),[X.current,A.length,w,_,k]);const Y={x1:(null!==(n=null==B?void 0:B.x)&&void 0!==n?n:0)+W[0],y1:(null!==(a=null==B?void 0:B.y)&&void 0!==a?a:0)+W[1],x2:(null!==(s=null==B?void 0:B.x)&&void 0!==s?s:0)+(null!==(o=null==B?void 0:B.width)&&void 0!==o?o:0)+W[0],y2:(null!==(l=null==B?void 0:B.y)&&void 0!==l?l:0)+(null!==(i=null==B?void 0:B.height)&&void 0!==i?i:0)+W[1]},{update:R}=r.useContext(kt);r.useEffect((()=>{document.fonts.load("12px Arial","ABCDEFG123456").finally((()=>setTimeout(R,100)))}),[]);const I=.6*("left"===y?Y.x1:"right"===y?Y.x2:0),L=x[cn[C].namesPos].split("\n").length*cn[C].lineHeight*cn[C].polarity+.6*("top"===C?Y.y1:"bottom"===C?Y.y2:0),T="left"===y?"end":"right"===y?"start":v||"middle"!==y||""!==O.join("")?"middle":"end",D=r.useRef(null),[H,U]=r.useState(0);r.useEffect((()=>{var e,t;return U(null!==(e=null===(t=D.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...O]);const V=r.useRef(null),[G,Z]=r.useState(0);r.useEffect((()=>{var e,t;return Z(null!==(e=null===(t=V.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...x]);const Q=(G+(H+24)/2)*("left"===y?-1:1),q=(G+H+(0!==H?24:0))*("left"===y?-1:"right"===y||0!==H?1:0),J="middle"===y?"start":T;return F.jsxs("g",{id:d,transform:`translate(${m}, ${f})`,children:[F.jsxs("g",{transform:"scale(0.56)",children:[F.jsx(Ut,{ref:X,stations:P,textClassName:"rmp-name__zh",columns:w,topHeavy:_,anchorAt:k>=0?k:void 0,osiPosition:2===b.flat().length&&1===w&&"none"!==S?S:void 0}),F.jsx("rect",{id:`stn_core_${d}`,x:Y.x1,y:Y.y1,width:Y.x2-Y.x1,height:Y.y2-Y.y1,fill:"white",fillOpacity:"0",onPointerDown:N,onPointerMove:z,onPointerUp:M,style:{cursor:"move"},className:"removeMe"})]}),F.jsxs("g",{ref:V,transform:`translate(${I}, ${L})`,textAnchor:T,children:[F.jsx(Oe,{text:x[0].split("\n"),fontSize:13.13,lineHeight:13.13,grow:"up",className:"rmp-name__zh"}),F.jsx(Oe,{text:x[1].split("\n"),fontSize:6.56,lineHeight:6.56,grow:"down",className:"rmp-name__en"})]}),""!==O.join("")&&F.jsxs("g",{transform:`translate(${I+Q}, ${L})`,textAnchor:"middle",children:[F.jsx("text",{fontSize:"13.13",dx:-(H+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),F.jsx("text",{fontSize:"13.13",dx:(H+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),F.jsxs("g",{ref:D,children:[F.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:O[0]}),F.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:O[1]})]})]}),!v&&F.jsxs("g",{transform:`translate(${I+q}, ${L})`,textAnchor:J,children:[F.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),F.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},icon:F.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:F.jsx(Ut,{stations:[{strokeColour:"currentColor",lineNum:"3",stnNum:"03"},{strokeColour:"currentColor",lineNum:"7",stnNum:"05"}],textClassName:"rmp-name__zh",columns:1,transform:"translate(12,12)scale(0.3)"})}),defaultAttrs:fn,attrsComponent:e=>{var t,n;const{id:a,attrs:o,handleAttrsUpdate:l}=e,{t:d}=i(),c=[{type:"textarea",label:d("panel.details.stations.common.nameZh"),value:o.names[0],onChange:e=>{o.names[0]=e,l(a,o)},minW:"full"},{type:"textarea",label:d("panel.details.stations.common.nameEn"),value:o.names[1],onChange:e=>{o.names[1]=e,l(a,o)},minW:"full"},{type:"select",label:d("panel.details.stations.common.nameOffsetX"),value:o.nameOffsetX,options:{left:d("panel.details.stations.common.left"),middle:d("panel.details.stations.common.middle"),right:d("panel.details.stations.common.right")},disabledOptions:"middle"===o.nameOffsetY?["middle"]:[],onChange:e=>{o.nameOffsetX=e,l(a,o)},minW:"full"},{type:"select",label:d("panel.details.stations.common.nameOffsetY"),value:o.nameOffsetY,options:{top:d("panel.details.stations.common.top"),middle:d("panel.details.stations.common.middle"),bottom:d("panel.details.stations.common.bottom")},disabledOptions:"middle"===o.nameOffsetX?["middle"]:[],onChange:e=>{o.nameOffsetY=e,l(a,o)},minW:"full"},{type:"slider",label:d("panel.details.stations.gzmtrInt2024.columns"),value:o.columns,min:1,max:Math.min(5,o.transfer.flat().length),step:1,onChange:e=>{o.columns=e,l(a,o)},leftIcon:F.jsx(P,{}),rightIcon:F.jsx(k,{}),minW:"full"},{type:"switch",label:d("panel.details.stations.gzmtrInt2024.topHeavy"),oneLine:!0,isChecked:o.topHeavy,onChange:e=>{o.topHeavy=e,l(a,o)},minW:"full"},{type:"select",label:d("panel.details.stations.gzmtrInt2024.anchorAt"),value:null!==(t=o.anchorAt)&&void 0!==t?t:"-1",options:s({"-1":d("panel.details.stations.gzmtrInt2024.anchorAtNone")},Object.fromEntries(Array.from({length:Math.min(o.transfer.flat().length,4)},((e,t)=>[t.toString(),t])))),onChange:e=>{o.anchorAt=Number(e),l(a,o)},minW:"full"},{type:"select",label:d("panel.details.stations.gzmtrInt2024.osiPosition"),value:o.osiPosition,options:{none:d("panel.details.stations.gzmtrInt2024.osiPositionNone"),left:d("panel.details.stations.gzmtrInt2024.osiPositionLeft"),right:d("panel.details.stations.gzmtrInt2024.osiPositionRight")},onChange:e=>{o.osiPosition=e,l(a,o)},hidden:!(2===o.transfer.flat().length&&1===o.columns),minW:"full"},{type:"switch",label:d("panel.details.stations.gzmtrInt.open"),oneLine:!0,isChecked:o.open,onChange:e=>{o.open=e,l(a,o)},minW:"full"},{type:"input",label:d("panel.details.stations.gzmtrInt.secondaryNameZh"),value:o.secondaryNames[0],onChange:e=>{o.secondaryNames[0]=e,l(a,o)},minW:"full"},{type:"input",label:d("panel.details.stations.gzmtrInt.secondaryNameEn"),value:o.secondaryNames[1],onChange:e=>{o.secondaryNames[1]=e.toString(),l(a,o)},minW:"full"}],f=[5,0,0],h=null!==(n=o.transfer)&&void 0!==n?n:fn.transfer,p=e=>t=>{if(h.length>e&&h[e].length>t){const n=h.map(((n,a)=>a===e?n.filter(((e,n)=>n!==t)):n));o.transfer=n,o.anchorAt=-1,l(a,o)}},u=e=>(t,n)=>{if(h.length>e&&h[e].length>t){const s=h.map(((a,s)=>s===e?a.map(((e,a)=>a===t?[0,1,2,3,4,5,6].map((t=>void 0===n[t]?e[t]:n[t])):e)):a));o.transfer=s,l(a,o)}};return F.jsxs(F.Fragment,{children:[F.jsx(m,{fields:c}),F.jsx(S,{label:d("panel.details.stations.interchange.title"),children:F.jsx(Q,{align:"flex-start",children:h.map(((e,t)=>{return F.jsxs(r.Fragment,{children:[F.jsx(J,{size:"xs",children:d(0===t?"panel.details.stations.interchange.within":1===t?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),F.jsx(an,{interchangeList:e,onAdd:f[t]>e.length?(n=t,e=>{const t=structuredClone(h);if(t.length<=n)for(let a=t.length;a<=n;a++)t[a]=[nn];t[n].push(e),o.transfer=t,l(a,o)}):void 0,onDelete:p(t),onUpdate:u(t)})]},t);var n}))})})]})},metadata:{displayName:"panel.details.stations.gzmtrInt2024.displayName",cities:[p.Guangzhou],canvas:[v.RailMap],categories:[b.Metro],tags:[]}},pn={zh:9,en:6.2,top:7.2,middle:0,bottom:10},un=s(s({},j),{},{nameOffsetX:"right",nameOffsetY:"top",open:!0}),gn=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:e=>(null!=e?e:un).names[0],onChange:(e,t)=>{const n=null!=t?t:un;return n.names[0]=e.toString(),n}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:e=>(null!=e?e:un).names[1],onChange:(e,t)=>{const n=null!=t?t:un;return n.names[1]=e.toString(),n}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:e=>(null!=e?e:un).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetY)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:un;return n.nameOffsetX=e,n}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:e=>(null!=e?e:un).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetX)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:un;return n.nameOffsetY=e,n}},{type:"switch",label:"panel.details.stations.bjsubwayBasic.open",oneLine:!0,isChecked:e=>(null!=e?e:un).open,onChange:(e,t)=>{const n=null!=t?t:un;return n.open=e,n}}],xn={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,nameOffsetX:f=un.nameOffsetX,nameOffsetY:h=un.nameOffsetY,open:p=un.open}=null!==(t=o[c.BjsubwayBasic])&&void 0!==t?t:un,u=r.useCallback((e=>l(n,e)),[n,l]),g=r.useCallback((e=>i(n,e)),[n,i]),x=r.useCallback((e=>d(n,e)),[n,d]),[y,C]=(v=h,"left"===(b=f)&&"top"===v?[-4,-(m[1].split("\n").length+(p?0:1))*pn[v]-1]:"middle"===b&&"top"===v?[0,-(m[1].split("\n").length+(p?0:1))*pn[v]-4]:"right"===b&&"top"===v?[4,-(m[1].split("\n").length+(p?0:1))*pn[v]-1]:"left"===b&&"bottom"===v?[-4,m[0].split("\n").length*pn[v]+1]:"middle"===b&&"bottom"===v?[0,m[0].split("\n").length*pn[v]+4]:"right"===b&&"bottom"===v?[4,m[0].split("\n").length*pn[v]+1]:"left"===b&&"middle"===v?[-5,0]:"right"===b&&"middle"===v?[5,0]:[0,0]);var b,v;const O="left"===f?"end":"right"===f?"start":"middle";return F.jsxs("g",{id:n,transform:`translate(${a}, ${s})`,children:[F.jsx("circle",{id:`stn_core_${n}`,r:"4",stroke:"black",strokeWidth:"0.5",strokeDasharray:p?void 0:"1.5",fill:"white",onPointerDown:u,onPointerMove:g,onPointerUp:x,style:{cursor:"move"}}),F.jsxs("g",{transform:`translate(${y}, ${C})`,textAnchor:O,children:[F.jsx(Oe,{text:m[0].split("\n"),fontSize:pn.zh,lineHeight:pn.zh,grow:"up",className:"rmp-name__zh",baseOffset:1}),F.jsx(Oe,{text:m[1].split("\n"),fontSize:pn.en,lineHeight:pn.en,grow:"down",className:"rmp-name__en",baseOffset:1}),!p&&F.jsx("text",{dy:m[1].split("\n").length*pn.en+2,fontSize:pn.en,dominantBaseline:"hanging",className:"rmp-name__zh",children:"(暂缓开通)"})]})]})},icon:F.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:F.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none"})}),defaultAttrs:un,attrsComponent:()=>F.jsx(B,{fields:gn}),metadata:{displayName:"panel.details.stations.bjsubwayBasic.displayName",cities:[p.Beijing],canvas:[v.RailMap],categories:[b.Metro],tags:[]}},yn="M 8.359893 4.159288 C 8.368828 4.168825 8.460953 4.26852 8.57038 4.386985 C 8.679807 4.505449 8.860802 4.701382 8.972592 4.822389 C 9.084381 4.943397 9.238666 5.110407 9.315445 5.193521 C 9.392224 5.276636 9.519867 5.414817 9.599094 5.500589 C 9.678323 5.58636 9.801023 5.719209 9.871761 5.795812 C 9.942499 5.872413 10.000208 5.935256 9.999999 5.935465 C 9.999792 5.935671 9.975513 5.928466 9.946045 5.919453 C 9.916577 5.910439 9.831826 5.88438 9.757708 5.861543 C 9.683591 5.838706 9.532284 5.791997 9.421472 5.757746 C 9.310658 5.723495 9.190374 5.686309 9.154173 5.675113 C 9.11797 5.663918 9.048485 5.642428 8.99976 5.627359 C 8.951035 5.612291 8.910275 5.599729 8.909181 5.599446 C 8.907193 5.59893 8.907193 5.59893 8.907135 5.798288 C 8.907103 5.907935 8.906695 6.128369 8.906229 6.288144 C 8.905446 6.555825 8.905249 6.580968 8.903705 6.608245 C 8.902784 6.624527 8.90139 6.647987 8.900606 6.660379 C 8.899822 6.672773 8.898192 6.695836 8.896983 6.711632 C 8.895774 6.727427 8.893582 6.753074 8.892114 6.768627 C 8.890645 6.784179 8.888061 6.80923 8.88637 6.824296 C 8.884679 6.839362 8.88172 6.864065 8.879793 6.879189 C 8.877868 6.894315 8.874691 6.917777 8.872734 6.931325 C 8.870777 6.944874 8.867386 6.967292 8.865197 6.981143 C 8.863009 6.994995 8.859045 7.018654 8.856388 7.03372 C 8.853731 7.048786 8.849344 7.072617 8.84664 7.086676 C 8.843935 7.100736 8.839338 7.1236 8.836424 7.137486 C 8.833509 7.151371 8.828584 7.174065 8.825479 7.187916 C 8.822371 7.201767 8.817014 7.224831 8.81357 7.239167 C 8.810127 7.253505 8.80431 7.276767 8.800644 7.29086 C 8.796978 7.304955 8.791035 7.327222 8.787437 7.340344 C 8.78384 7.353467 8.77752 7.375735 8.773395 7.389829 C 8.769268 7.403923 8.762319 7.426986 8.757952 7.441081 C 8.753583 7.455174 8.746363 7.47784 8.741903 7.491448 C 8.737446 7.505056 8.729829 7.527523 8.724978 7.541374 C 8.720126 7.555225 8.712182 7.577493 8.707321 7.590858 C 8.702462 7.604224 8.6948 7.624901 8.690294 7.636807 C 8.68579 7.648715 8.677304 7.670452 8.671437 7.685113 C 8.665571 7.699773 8.656536 7.721842 8.651362 7.734155 C 8.646187 7.746468 8.63796 7.765688 8.63308 7.776865 C 8.628201 7.788043 8.620145 7.806136 8.615178 7.817071 C 8.610211 7.828006 8.60083 7.848286 8.594332 7.862138 C 8.587832 7.875988 8.573873 7.904618 8.563307 7.92576 C 8.552743 7.946901 8.537873 7.975929 8.530265 7.990266 C 8.522656 8.004602 8.511053 8.026075 8.504479 8.037983 C 8.497905 8.04989 8.486739 8.069772 8.479666 8.082165 C 8.472593 8.094558 8.460988 8.11444 8.453878 8.126348 C 8.446768 8.138254 8.435438 8.156944 8.428702 8.167879 C 8.421966 8.178814 8.410628 8.196906 8.403507 8.208085 C 8.396386 8.219262 8.384013 8.238349 8.37601 8.2505 C 8.36801 8.26265 8.354345 8.282929 8.345645 8.295566 C 8.336946 8.308201 8.322885 8.328276 8.314397 8.340175 C 8.305909 8.352074 8.292209 8.37096 8.283951 8.382147 C 8.275693 8.393333 8.261178 8.41259 8.251695 8.42494 C 8.242211 8.437289 8.225837 8.458165 8.215304 8.471332 C 8.204773 8.484497 8.189062 8.503819 8.18039 8.514267 C 8.17172 8.524716 8.157459 8.541616 8.148703 8.551823 C 8.139945 8.562029 8.125004 8.579116 8.115499 8.589793 C 8.105992 8.600471 8.091457 8.616575 8.083197 8.625581 C 8.074937 8.634586 8.060843 8.649709 8.05188 8.659185 C 8.042916 8.668662 8.018659 8.69335 7.997974 8.714046 C 7.977291 8.734741 7.953162 8.758432 7.944355 8.766693 C 7.935549 8.774953 7.920821 8.788638 7.911628 8.797104 C 7.902433 8.805571 7.887569 8.819082 7.878597 8.827129 C 7.869623 8.835177 7.853733 8.849096 7.843284 8.858062 C 7.832834 8.867027 7.816133 8.881153 7.806171 8.889453 C 7.796208 8.897753 7.779904 8.911098 7.769942 8.919111 C 7.759978 8.927123 7.743874 8.939848 7.734154 8.947388 C 7.724434 8.954926 7.708329 8.96721 7.698366 8.974683 C 7.688403 8.982156 7.673093 8.993497 7.664346 8.999885 C 7.655598 9.006271 7.637505 9.019163 7.62414 9.02853 C 7.610775 9.037899 7.588109 9.053377 7.573772 9.062926 C 7.559434 9.072475 7.538474 9.086151 7.527194 9.093318 C 7.515913 9.100485 7.497422 9.112045 7.486104 9.119009 C 7.474786 9.125973 7.454846 9.137918 7.441793 9.145553 C 7.428741 9.153188 7.405677 9.166317 7.390542 9.174728 C 7.375406 9.18314 7.352087 9.19579 7.338722 9.20284 C 7.325357 9.209889 7.303686 9.221025 7.290564 9.227587 C 7.277442 9.234147 7.256366 9.2444 7.243731 9.250369 C 7.231095 9.256339 7.211213 9.265569 7.199549 9.27088 C 7.187884 9.27619 7.168797 9.28464 7.157134 9.289659 C 7.145469 9.294676 7.124792 9.303333 7.111184 9.308895 C 7.097576 9.31446 7.075367 9.323255 7.061831 9.328442 C 7.048295 9.333629 7.027816 9.341289 7.016323 9.345462 C 7.00483 9.349636 6.978328 9.358748 6.95743 9.365711 C 6.936532 9.372675 6.906311 9.382359 6.890272 9.38723 C 6.874235 9.392101 6.849581 9.399302 6.835486 9.403231 C 6.821393 9.40716 6.796739 9.413705 6.7807 9.417776 C 6.764662 9.421847 6.740208 9.427785 6.726356 9.430971 C 6.712505 9.434157 6.689641 9.439174 6.675548 9.442118 C 6.661452 9.445063 6.639384 9.449434 6.626504 9.451833 C 6.613625 9.454231 6.591038 9.458187 6.57631 9.460623 C 6.561581 9.463058 6.538518 9.46664 6.525058 9.468584 C 6.511598 9.470528 6.487662 9.473704 6.471867 9.475644 C 6.456071 9.477583 6.433207 9.480169 6.421057 9.481392 C 6.408907 9.482615 6.387236 9.4846 6.372898 9.485805 C 6.358561 9.487008 6.333112 9.488794 6.316345 9.489771 C 6.299578 9.490749 6.276316 9.491956 6.264652 9.492452 C 6.252987 9.492949 6.216803 9.493517 6.18424 9.493716 C 6.151678 9.493916 6.114499 9.493756 6.10162 9.493363 C 6.088739 9.49297 6.06866 9.492202 6.056995 9.491656 C 6.045331 9.491112 6.026046 9.490059 6.014138 9.489319 C 6.002231 9.488579 5.982548 9.487186 5.970398 9.486226 C 5.958248 9.485266 5.939956 9.483668 5.92975 9.482677 C 5.919544 9.481687 5.902445 9.479897 5.891753 9.478702 C 5.881061 9.477505 5.864443 9.475529 5.854823 9.47431 C 5.845204 9.47309 5.827708 9.470707 5.815943 9.469012 C 5.804178 9.467319 5.784412 9.464314 5.77202 9.462336 C 5.759627 9.460358 5.745908 9.458071 5.741535 9.457253 C 5.733583 9.455767 5.733583 9.455767 5.750813 9.451963 C 5.76029 9.449871 5.778183 9.445793 5.790576 9.442902 C 5.802969 9.440009 5.82305 9.435088 5.8352 9.431966 C 5.847351 9.428843 5.867067 9.423503 5.879014 9.420099 C 5.890961 9.416695 5.911639 9.410524 5.924964 9.406386 C 5.938288 9.402248 5.960324 9.395124 5.973932 9.390556 C 5.98754 9.385988 6.008053 9.378835 6.019516 9.374659 C 6.030978 9.370483 6.050462 9.363131 6.062815 9.358321 C 6.075166 9.353508 6.094417 9.34577 6.105595 9.341125 C 6.116774 9.336478 6.135264 9.328524 6.146685 9.323448 C 6.158106 9.318373 6.177591 9.309499 6.189984 9.303728 C 6.202377 9.297957 6.224247 9.287379 6.238585 9.280221 C 6.252921 9.273063 6.273399 9.262563 6.284092 9.256887 C 6.294784 9.251213 6.314865 9.240225 6.328716 9.232468 C 6.342567 9.224712 6.361654 9.213777 6.371131 9.208166 C 6.380608 9.202557 6.396514 9.192982 6.406477 9.18689 C 6.41644 9.180798 6.432345 9.170843 6.441822 9.164769 C 6.4513 9.158695 6.467404 9.14816 6.47761 9.141357 C 6.487816 9.134555 6.50392 9.123611 6.513398 9.117039 C 6.522875 9.110467 6.539177 9.098936 6.549627 9.091415 C 6.560077 9.083895 6.577971 9.070704 6.589391 9.062101 C 6.600812 9.053498 6.618895 9.039583 6.629575 9.031179 C 6.640255 9.022773 6.656757 9.009534 6.666247 9.001758 C 6.675736 8.993981 6.692227 8.980227 6.702893 8.971191 C 6.713559 8.962157 6.730458 8.94742 6.740448 8.938442 C 6.750437 8.929464 6.766562 8.914768 6.776282 8.905784 C 6.786003 8.896801 6.803698 8.880239 6.815604 8.868983 C 6.827512 8.857727 6.843456 8.842402 6.851037 8.834927 C 6.858617 8.827451 6.873728 8.812176 6.884615 8.800982 C 6.895503 8.789788 6.912683 8.77174 6.922792 8.760878 C 6.932902 8.750012 6.949699 8.731606 6.960117 8.719973 C 6.970537 8.70834 6.986147 8.690599 6.994807 8.68055 C 7.003467 8.670501 7.017852 8.65353 7.026772 8.642838 C 7.035693 8.632146 7.053 8.610872 7.065231 8.595562 C 7.077464 8.580254 7.09533 8.557407 7.104936 8.544792 C 7.114541 8.532177 7.129989 8.511499 7.139265 8.498842 C 7.14854 8.486185 7.164221 8.464337 7.174109 8.450293 C 7.183999 8.436249 7.199718 8.413383 7.209044 8.399484 C 7.218369 8.385583 7.232209 8.364666 7.2398 8.353003 C 7.247391 8.341338 7.260236 8.321177 7.268346 8.3082 C 7.276455 8.295223 7.289493 8.27395 7.297318 8.260925 C 7.305143 8.247901 7.317313 8.227304 7.32436 8.215153 C 7.331408 8.203004 7.344023 8.180735 7.352394 8.165669 C 7.360765 8.150602 7.372812 8.128534 7.379167 8.116627 C 7.385522 8.104719 7.396764 8.083248 7.404151 8.06891 C 7.411537 8.054573 7.422352 8.0331 7.428184 8.021194 C 7.434016 8.009287 7.443347 7.990001 7.448918 7.978336 C 7.45449 7.966672 7.463351 7.947784 7.468609 7.936364 C 7.473868 7.924943 7.482234 7.906453 7.4872 7.895274 C 7.492166 7.884096 7.500586 7.86481 7.505909 7.852417 C 7.511233 7.840024 7.519759 7.819808 7.524855 7.807493 C 7.529951 7.795179 7.538242 7.7747 7.543279 7.761986 C 7.548316 7.749271 7.556671 7.727735 7.561847 7.714127 C 7.567022 7.700519 7.57545 7.677853 7.580575 7.663759 C 7.585701 7.649664 7.594637 7.624414 7.600433 7.607646 C 7.60623 7.59088 7.615365 7.563642 7.620735 7.547118 C 7.626104 7.530593 7.634661 7.503554 7.63975 7.48703 C 7.644838 7.470506 7.653173 7.442472 7.658273 7.424733 C 7.663371 7.406994 7.671309 7.378562 7.675913 7.361553 C 7.680518 7.344542 7.688414 7.314123 7.69346 7.293953 C 7.698508 7.273784 7.705483 7.244955 7.708961 7.229889 C 7.712439 7.214823 7.717614 7.19176 7.720461 7.178638 C 7.723308 7.165516 7.728016 7.143247 7.730923 7.129154 C 7.733829 7.115059 7.738621 7.090804 7.74157 7.075251 C 7.74452 7.0597 7.749294 7.033455 7.752179 7.016931 C 7.755066 7.000407 7.759431 6.974154 7.761884 6.958592 C 7.764333 6.94303 7.768123 6.917978 7.770304 6.902922 C 7.772485 6.887866 7.775877 6.86322 7.777843 6.848155 C 7.779809 6.833088 7.783001 6.807043 7.784938 6.790275 C 7.786876 6.773509 7.789651 6.74806 7.791106 6.733722 C 7.792561 6.719385 7.794953 6.693936 7.796421 6.677169 C 7.797888 6.660402 7.800071 6.632964 7.801272 6.616198 C 7.802474 6.599431 7.804076 6.575174 7.804832 6.562295 C 7.80559 6.549416 7.806592 6.532119 7.807061 6.523856 C 7.807529 6.515595 7.80835 6.421553 7.808886 6.314875 C 7.809421 6.208197 7.809724 6.003942 7.80956 5.860975 C 7.809398 5.718009 7.809015 5.600789 7.808712 5.600486 C 7.808408 5.600182 7.68663 5.63752 7.538092 5.68346 C 7.389553 5.7294 7.213946 5.783698 7.147853 5.804122 C 7.08176 5.824546 6.974794 5.857548 6.910151 5.877461 C 6.845508 5.897371 6.776261 5.918652 6.75627 5.924749 C 6.736279 5.930848 6.719744 5.935658 6.719525 5.93544 C 6.719306 5.935221 6.790938 5.857274 6.878708 5.762224 C 6.966477 5.667175 7.110461 5.511271 7.198671 5.415771 C 7.286881 5.320272 7.433807 5.161213 7.525173 5.062309 C 7.616539 4.963404 7.76605 4.801562 7.857421 4.702663 C 7.948792 4.603762 8.093983 4.446596 8.180069 4.353404 C 8.266154 4.260212 8.341831 4.178411 8.34824 4.171626 L 8.359893 4.159288 Z M 3.639928 8.15987 C 3.639606 8.15984 3.567056 8.081517 3.478708 7.985821 C 3.390359 7.890125 3.197014 7.680786 3.049051 7.520623 C 2.901089 7.36046 2.662314 7.101986 2.518441 6.946236 C 2.374568 6.790486 2.198977 6.60038 2.128238 6.523779 C 2.0575 6.447177 1.999793 6.384333 2 6.384126 C 2.000208 6.383919 2.024487 6.391125 2.053954 6.40014 C 2.083422 6.409154 2.157237 6.431839 2.217988 6.450549 C 2.278738 6.469259 2.375968 6.499262 2.434052 6.517222 C 2.492137 6.535182 2.553174 6.55407 2.569692 6.559195 C 2.586209 6.564321 2.709718 6.602509 2.844157 6.644057 C 2.978595 6.685606 3.089538 6.719839 3.090698 6.72013 C 3.092807 6.72066 3.092807 6.72066 3.092866 6.520418 C 3.092898 6.410285 3.093306 6.18985 3.093772 6.030562 C 3.094553 5.763748 3.094752 5.738617 3.096295 5.711344 C 3.097217 5.695064 3.098611 5.671603 3.099395 5.659211 C 3.100178 5.646816 3.101808 5.623754 3.103017 5.607958 C 3.104227 5.592164 3.106418 5.566515 3.107887 5.550963 C 3.109355 5.535411 3.111941 5.51036 3.113633 5.495295 C 3.115324 5.480227 3.118114 5.456767 3.119833 5.443159 C 3.121551 5.429551 3.124544 5.407283 3.126484 5.393674 C 3.128424 5.380066 3.13179 5.357599 3.133963 5.343748 C 3.136135 5.329897 3.139918 5.307034 3.142369 5.292939 C 3.144819 5.278845 3.149205 5.254788 3.152116 5.239479 C 3.155027 5.224168 3.159971 5.199397 3.163101 5.184428 C 3.16623 5.169459 3.171352 5.145801 3.174481 5.131851 C 3.17761 5.117902 3.182986 5.094759 3.18643 5.080422 C 3.189873 5.066085 3.19569 5.042824 3.199356 5.028729 C 3.203022 5.014635 3.208965 4.992367 3.212563 4.979245 C 3.21616 4.966123 3.222479 4.943855 3.226605 4.929761 C 3.230732 4.915667 3.237681 4.892604 3.242049 4.878509 C 3.246417 4.864415 3.253638 4.84175 3.258096 4.828142 C 3.262555 4.814533 3.270171 4.792067 3.275023 4.778216 C 3.279873 4.764364 3.287818 4.742096 3.292678 4.728731 C 3.297538 4.715366 3.3052 4.694689 3.309704 4.682783 C 3.31421 4.670875 3.322696 4.649137 3.328563 4.634478 C 3.33443 4.619817 3.343463 4.597748 3.348639 4.585434 C 3.353813 4.573122 3.36204 4.553902 3.36692 4.542725 C 3.371799 4.531547 3.379856 4.513454 3.384823 4.502518 C 3.389789 4.491583 3.39917 4.471303 3.405668 4.457452 C 3.412167 4.443601 3.426129 4.414971 3.436694 4.39383 C 3.44726 4.372689 3.461914 4.344058 3.469262 4.330207 C 3.476608 4.316357 3.488427 4.294487 3.495524 4.281607 C 3.502622 4.268728 3.514584 4.247454 3.522105 4.234332 C 3.529628 4.22121 3.541034 4.201699 3.547455 4.190976 C 3.553874 4.180251 3.564621 4.162556 3.571336 4.151653 C 3.578052 4.14075 3.589372 4.122683 3.596493 4.111505 C 3.603614 4.100327 3.615987 4.081241 3.623989 4.069091 C 3.631991 4.056941 3.645655 4.036661 3.654354 4.024024 C 3.663054 4.011388 3.677115 3.991314 3.685603 3.979416 C 3.694091 3.967517 3.707792 3.948628 3.716049 3.937443 C 3.724308 3.926256 3.738823 3.906999 3.748305 3.89465 C 3.757787 3.882301 3.774164 3.861424 3.784696 3.848259 C 3.795227 3.835093 3.810939 3.815771 3.81961 3.805323 C 3.828281 3.794872 3.84254 3.777973 3.851297 3.767766 C 3.860054 3.757562 3.874996 3.740475 3.884502 3.729796 C 3.894008 3.719119 3.908543 3.703013 3.916803 3.694009 C 3.925064 3.685003 3.939156 3.669882 3.94812 3.660404 C 3.957083 3.650928 3.981341 3.626241 4.002025 3.605544 C 4.02271 3.584848 4.046838 3.561157 4.055645 3.552897 C 4.064451 3.544637 4.079179 3.530951 4.088373 3.522486 C 4.097566 3.514019 4.11243 3.500508 4.121404 3.49246 C 4.130376 3.484412 4.146267 3.470493 4.156716 3.461528 C 4.167165 3.452562 4.183867 3.438437 4.19383 3.430137 C 4.203792 3.421837 4.220096 3.408491 4.230059 3.400478 C 4.240022 3.392467 4.256126 3.379735 4.265846 3.372187 C 4.275566 3.364638 4.294852 3.349997 4.308703 3.33965 C 4.322554 3.329302 4.342636 3.314602 4.353327 3.306981 C 4.364019 3.299361 4.382311 3.28654 4.393975 3.27849 C 4.405639 3.270441 4.42466 3.257609 4.436245 3.249977 C 4.447829 3.242345 4.465922 3.230637 4.476451 3.223961 C 4.486979 3.217284 4.504342 3.206445 4.515034 3.199872 C 4.525727 3.193299 4.545155 3.181674 4.558207 3.174039 C 4.571259 3.166403 4.594323 3.153273 4.609458 3.14486 C 4.624594 3.13645 4.647913 3.123799 4.661278 3.11675 C 4.674643 3.1097 4.696314 3.098564 4.709436 3.092004 C 4.722558 3.085442 4.74403 3.075004 4.757153 3.068806 C 4.770275 3.062607 4.791488 3.052789 4.804292 3.046986 C 4.817096 3.041182 4.837177 3.03234 4.848916 3.027336 C 4.860656 3.022333 4.879611 3.014428 4.89104 3.009769 C 4.902469 3.00511 4.923146 2.996942 4.93699 2.991619 C 4.950833 2.986296 4.971702 2.978476 4.983366 2.97424 C 4.99503 2.970004 5.021672 2.960841 5.042571 2.953878 C 5.063468 2.946914 5.093689 2.937231 5.109727 2.93236 C 5.125765 2.927489 5.150419 2.920288 5.164514 2.916359 C 5.178607 2.912431 5.203261 2.905885 5.219299 2.901814 C 5.235338 2.897742 5.259793 2.891805 5.273643 2.888619 C 5.287495 2.885432 5.310359 2.880417 5.324453 2.877472 C 5.338548 2.874528 5.360616 2.870155 5.373496 2.867757 C 5.386374 2.865358 5.408962 2.861403 5.42369 2.858968 C 5.438418 2.856532 5.461482 2.85295 5.474941 2.851007 C 5.488403 2.849062 5.512338 2.845885 5.528134 2.843946 C 5.543929 2.842007 5.566793 2.83942 5.578943 2.838198 C 5.591094 2.836976 5.612764 2.83499 5.627101 2.833786 C 5.641439 2.832582 5.666887 2.830797 5.683655 2.829821 C 5.700423 2.828844 5.724281 2.827635 5.736673 2.827131 C 5.749067 2.826628 5.779487 2.825963 5.804273 2.825654 C 5.831717 2.825312 5.864715 2.825499 5.888661 2.826133 C 5.910288 2.826705 5.935936 2.827562 5.945656 2.828037 C 5.955376 2.828513 5.97327 2.829513 5.98542 2.830258 C 5.99757 2.831004 6.017452 2.832401 6.029602 2.833363 C 6.041752 2.834323 6.060044 2.83592 6.07025 2.836912 C 6.080456 2.837903 6.097554 2.839693 6.108246 2.840889 C 6.118938 2.842084 6.135557 2.84406 6.145177 2.84528 C 6.154796 2.846498 6.172292 2.848883 6.184057 2.850577 C 6.195822 2.852271 6.215388 2.855248 6.227539 2.857194 C 6.239688 2.859139 6.253395 2.861429 6.257997 2.862283 C 6.266363 2.863834 6.266363 2.863834 6.249159 2.867633 C 6.239698 2.869721 6.221817 2.873796 6.209424 2.876689 C 6.197031 2.87958 6.17695 2.884501 6.1648 2.887624 C 6.152649 2.890747 6.132933 2.896087 6.120986 2.899491 C 6.109038 2.902895 6.088361 2.909066 6.075037 2.913204 C 6.061712 2.917341 6.039675 2.924465 6.026067 2.929032 C 6.012459 2.933601 5.991946 2.940756 5.980484 2.944931 C 5.969021 2.949106 5.949537 2.95646 5.937186 2.961273 C 5.924834 2.966085 5.905422 2.973896 5.894048 2.978628 C 5.882673 2.983361 5.864182 2.991314 5.852958 2.996302 C 5.841733 3.001288 5.822409 3.010091 5.810017 3.015862 C 5.797623 3.021632 5.775753 3.032209 5.761416 3.039369 C 5.747078 3.046527 5.726601 3.057027 5.715909 3.062701 C 5.705216 3.068377 5.685135 3.079366 5.671284 3.087121 C 5.657433 3.094877 5.638347 3.105814 5.628869 3.111423 C 5.619392 3.117034 5.603487 3.126609 5.593524 3.1327 C 5.58356 3.138793 5.567655 3.148746 5.558177 3.15482 C 5.5487 3.160895 5.532596 3.171429 5.522389 3.178233 C 5.512184 3.185035 5.496079 3.195978 5.486602 3.202551 C 5.477125 3.209123 5.460822 3.220655 5.450372 3.228179 C 5.439923 3.235703 5.423421 3.247832 5.413702 3.255136 C 5.403981 3.262436 5.386883 3.27556 5.375705 3.284297 C 5.364527 3.293035 5.346831 3.307168 5.336382 3.315704 C 5.325933 3.32424 5.308455 3.338784 5.297544 3.348024 C 5.286631 3.357265 5.269532 3.372169 5.259547 3.381148 C 5.249561 3.390125 5.233438 3.404821 5.223718 3.413807 C 5.213998 3.422791 5.196302 3.439351 5.184396 3.450605 C 5.172488 3.461862 5.156544 3.477188 5.148963 3.484664 C 5.141382 3.492139 5.126272 3.507414 5.115385 3.518608 C 5.104497 3.529801 5.087317 3.547848 5.077208 3.558713 C 5.067098 3.569577 5.050301 3.587983 5.039882 3.599617 C 5.029463 3.61125 5.013853 3.62899 5.005193 3.639039 C 4.996532 3.649089 4.982148 3.666059 4.973228 3.676752 C 4.964307 3.687445 4.947 3.708717 4.934769 3.724027 C 4.922537 3.739336 4.90467 3.762184 4.895064 3.774798 C 4.885458 3.787414 4.870011 3.808089 4.860735 3.820748 C 4.85146 3.833405 4.835779 3.855252 4.825891 3.869297 C 4.816002 3.883342 4.800281 3.906206 4.790956 3.920107 C 4.781631 3.934007 4.767791 3.954923 4.760201 3.966587 C 4.75261 3.978251 4.739764 3.998412 4.731654 4.01139 C 4.723545 4.024366 4.710507 4.04564 4.702682 4.058664 C 4.694856 4.071689 4.682687 4.092286 4.67564 4.104437 C 4.668592 4.116586 4.655977 4.138854 4.647606 4.15392 C 4.639235 4.168986 4.627187 4.191055 4.620833 4.202963 C 4.614478 4.214869 4.603237 4.236342 4.59585 4.250679 C 4.588463 4.265017 4.577648 4.286489 4.571816 4.298396 C 4.565984 4.310304 4.556654 4.329589 4.551082 4.341253 C 4.54551 4.352918 4.536649 4.371806 4.53139 4.383226 C 4.526132 4.394647 4.517766 4.413137 4.512801 4.424315 C 4.507834 4.435493 4.499414 4.45478 4.494091 4.467174 C 4.488767 4.479566 4.480241 4.499781 4.475145 4.512096 C 4.470048 4.524411 4.461758 4.544889 4.456721 4.557603 C 4.451684 4.570319 4.443329 4.591855 4.438153 4.605463 C 4.432978 4.619071 4.42455 4.641737 4.419425 4.65583 C 4.414299 4.669925 4.405364 4.695175 4.399567 4.711941 C 4.393771 4.72871 4.384635 4.755947 4.379265 4.772473 C 4.373896 4.788996 4.365339 4.816035 4.36025 4.83256 C 4.355162 4.849085 4.346827 4.877117 4.341728 4.894857 C 4.336629 4.912596 4.328691 4.941027 4.324087 4.958037 C 4.319483 4.975048 4.311586 5.005467 4.30654 5.025636 C 4.301492 5.045806 4.294517 5.074635 4.291039 5.0897 C 4.287562 5.104767 4.282386 5.12783 4.279539 5.140952 C 4.276692 5.154074 4.271984 5.176342 4.269077 5.190436 C 4.266171 5.20453 4.261379 5.228786 4.25843 5.244339 C 4.25548 5.259891 4.250707 5.286135 4.24782 5.302659 C 4.244935 5.319183 4.240569 5.345436 4.238118 5.360997 C 4.235666 5.37656 4.231877 5.40161 4.229696 5.416667 C 4.227515 5.431724 4.224122 5.456368 4.222157 5.471435 C 4.220191 5.486501 4.216998 5.512547 4.215061 5.529314 C 4.213124 5.546082 4.210349 5.571529 4.208893 5.585867 C 4.207439 5.600204 4.205048 5.625653 4.20358 5.642421 C 4.202112 5.659187 4.199928 5.686625 4.198727 5.703393 C 4.197526 5.720159 4.195924 5.744415 4.195167 5.757294 C 4.194409 5.770174 4.193407 5.787471 4.192938 5.795733 C 4.192471 5.803995 4.19165 5.898036 4.191115 6.004715 C 4.19058 6.111393 4.190277 6.315648 4.190439 6.458614 C 4.190602 6.601581 4.190984 6.718802 4.191288 6.719105 C 4.191591 6.719408 4.313371 6.682069 4.461908 6.636129 C 4.610447 6.590189 4.786054 6.535892 4.852147 6.515468 C 4.91824 6.495043 5.025205 6.462041 5.089849 6.442131 C 5.154491 6.422219 5.223739 6.400939 5.243729 6.39484 C 5.263721 6.388742 5.280256 6.383932 5.280475 6.38415 C 5.280694 6.384369 5.209062 6.462315 5.121291 6.557364 C 5.033521 6.652413 4.889537 6.808317 4.801327 6.903816 C 4.713117 6.999316 4.56619 7.158374 4.474826 7.25728 C 4.383461 7.356185 4.23395 7.518026 4.14258 7.616927 C 4.051209 7.715828 3.906015 7.872994 3.819926 7.966186 C 3.733837 8.059378 3.658251 8.141094 3.651957 8.147776 C 3.645663 8.154458 3.64025 8.159901 3.639928 8.15987 Z",Cn=s(s({},j),{},{nameOffsetX:"right",nameOffsetY:"top",outOfStation:!1}),bn=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:e=>(null!=e?e:Cn).names[0],onChange:(e,t)=>{const n=null!=t?t:Cn;return n.names[0]=e.toString(),n}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:e=>(null!=e?e:Cn).names[1],onChange:(e,t)=>{const n=null!=t?t:Cn;return n.names[1]=e.toString(),n}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:e=>(null!=e?e:Cn).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetY)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:Cn;return n.nameOffsetX=e,n}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:e=>(null!=e?e:Cn).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetX)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:Cn;return n.nameOffsetY=e,n}},{type:"switch",label:"panel.details.stations.bjsubwayInt.outOfStation",oneLine:!0,isChecked:e=>(null!=e?e:Cn).outOfStation,onChange:(e,t)=>{const n=null!=t?t:Cn;return n.outOfStation=e,n}}],vn={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,nameOffsetX:f=Cn.nameOffsetX,nameOffsetY:h=Cn.nameOffsetY,outOfStation:p=Cn.outOfStation}=null!==(t=o[c.BjsubwayInt])&&void 0!==t?t:Cn,u=r.useCallback((e=>l(n,e)),[n,l]),g=r.useCallback((e=>i(n,e)),[n,i]),x=r.useCallback((e=>d(n,e)),[n,d]),[y,C]=(v=h,"left"===(b=f)&&"top"===v?[-5,-m[1].split("\n").length*pn[v]-4]:"middle"===b&&"top"===v?[0,-m[1].split("\n").length*pn[v]-7]:"right"===b&&"top"===v?[5,-m[1].split("\n").length*pn[v]-4]:"left"===b&&"bottom"===v?[-5,m[0].split("\n").length*pn[v]+4]:"middle"===b&&"bottom"===v?[0,m[0].split("\n").length*pn[v]+7]:"right"===b&&"bottom"===v?[5,m[0].split("\n").length*pn[v]+4]:"left"===b&&"middle"===v?[-8,0]:"right"===b&&"middle"===v?[8,0]:[0,0]);var b,v;const O="left"===f?"end":"right"===f?"start":"middle";return F.jsxs("g",{id:n,children:[F.jsxs("g",{transform:`translate(${a-6}, ${s-6})`,children:[F.jsx("circle",{cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",fill:"white"}),F.jsx("path",{d:yn,fill:p?"#898989":"black",stroke:p?"#898989":"black",strokeWidth:"0.533618",strokeLinecap:"round",strokeLinejoin:"round"}),F.jsx("circle",{id:`stn_core_${n}`,cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",strokeOpacity:"0",fill:"white",fillOpacity:"0",onPointerDown:u,onPointerMove:g,onPointerUp:x,style:{cursor:"move"},className:"removeMe"})]}),F.jsxs("g",{transform:`translate(${a+y}, ${s+C})`,textAnchor:O,children:[F.jsx(Oe,{text:m[0].split("\n"),fontSize:pn.zh,lineHeight:pn.zh,grow:"up",className:"rmp-name__zh",baseOffset:1}),F.jsx(Oe,{text:m[1].split("\n"),fontSize:pn.en,lineHeight:pn.en,grow:"down",className:"rmp-name__en",baseOffset:1})]})]})},icon:F.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:F.jsxs("g",{transform:"translate(6, 6)",children:[F.jsx("circle",{cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",fill:"white"}),F.jsx("path",{d:yn,stroke:"black",strokeWidth:"0.533618",strokeLinecap:"round",strokeLinejoin:"round"})]})}),defaultAttrs:Cn,attrsComponent:()=>F.jsx(B,{fields:bn}),metadata:{displayName:"panel.details.stations.bjsubwayInt.displayName",cities:[p.Beijing],canvas:[v.RailMap],categories:[b.Metro],tags:["interchange"]}};function jn(e){const{interchangeList:t,onAdd:n,onDelete:a,onUpdate:s}=e,o=O(),{paletteAppClip:{output:l}}=w((e=>e.runtime)),{t:d}=i(),[c,f]=r.useState();r.useEffect((()=>{void 0!==c&&l&&(null==s||s(c,[...l,t[c][4],t[c][5]]),f(void 0))}),[null==l?void 0:l.toString()]);const h=t.map(((e,t)=>[{type:"input",label:d("panel.details.stations.common.lineCode"),value:e[4],minW:"80px",onChange:n=>null==s?void 0:s(t,[e[0],e[1],e[2],e[3],n,e[5]])},{type:"input",label:d("panel.details.stations.common.stationCode"),value:e[5],minW:"80px",onChange:n=>null==s?void 0:s(t,[e[0],e[1],e[2],e[3],e[4],n])}]));return F.jsxs(_,{direction:"column",children:[0===t.length&&F.jsxs(V,{spacing:.5,"data-testid":"interchange-card-stack",children:[F.jsx(G,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:d("panel.details.stations.interchange.noInterchanges")}),F.jsx(Z,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),onClick:()=>null==n?void 0:n([p.Shanghai,"","#aaaaaa",u.white,"",""]),icon:F.jsx(k,{})})]}),t.map(((e,s)=>F.jsxs(V,{spacing:.5,"data-testid":`interchange-card-stack-${s}`,children:[F.jsx(S,{label:d("color"),minW:"40px",noLabel:0!==s,children:F.jsx(N,{theme:[e[0],e[1],e[2],e[3]],onClick:()=>{f(s),o(z([e[0],e[1],e[2],e[3]]))}})}),F.jsx(m,{fields:h[s],noLabel:0!==s}),n&&s===h.length-1?F.jsx(Z,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.copy"),onClick:()=>null==n?void 0:n(t.slice(-1)[0]),icon:F.jsx(M,{})}):F.jsx(q,{minW:8}),a&&F.jsx(Z,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.remove"),onClick:()=>null==a?void 0:a(s),icon:F.jsx(A,{})})]},s)))]})}const On=e=>{var t;const{stationType:n,defaultAttrs:a,maximumTransfers:s}=e,{t:o}=i(),l=O(),d=r.useCallback((()=>{l($()),l(W(f.current.export()))}),[l,$,W]),{selected:m}=w((e=>e.runtime)),[c]=m,f=r.useRef(window.graph),h=c&&f.current.hasNode(c)&&f.current.getNodeAttribute(c,"type")===n?f.current.getNodeAttribute(c,n):a,g=null!==(t=h.transfer)&&void 0!==t?t:a.transfer,x=e=>t=>{const a=structuredClone(g);if(a.length<=e)for(let n=a.length;n<=e;n++)a[n]=[];a[e].push(t),h.transfer=a,f.current.mergeNodeAttributes(c,{[n]:h}),d()},y=e=>(t,a)=>{if(g.length>e&&g[e].length>t){const s=g.map(((n,s)=>s===e?n.map(((e,n)=>n===t?[0,1,2,3,4,5].map((t=>void 0===a[t]?e[t]:a[t])):e)):n));h.transfer=s,f.current.mergeNodeAttributes(c,{[n]:h}),d()}};return F.jsxs(Q,{align:"flex-start",children:[h.transfer.map(((e,t)=>{return F.jsxs(r.Fragment,{children:[F.jsx(J,{size:"xs",children:o(0===t?"panel.details.stations.interchange.within":1===t?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),F.jsx(jn,{interchangeList:e,onAdd:s[t]>e.length?x(t):void 0,onDelete:(a=t,e=>{if(g.length>a&&g[a].length>e){const t=g.map(((t,n)=>n===a?t.filter(((t,n)=>n!==e)):t));h.transfer=t,f.current.mergeNodeAttributes(c,{[n]:h}),d()}}),onUpdate:y(t)})]},t);var a})),s[h.transfer.length]>0&&F.jsx(K,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:F.jsx(k,{}),onClick:()=>x(h.transfer.length)([p.Guangzhou,"","#AAAAAA",u.white,"",""]),children:o("panel.details.stations.interchange.addGroup")})]})},wn={top:8.5,middle:0,bottom:11},_n={names:["車站","Stn"],nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[]]},kn=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:e=>(null!=e?e:_n).names[0],onChange:(e,t)=>{const n=null!=t?t:_n;return n.names[0]=e.toString(),n}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:e=>(null!=e?e:_n).names[1],onChange:(e,t)=>{const n=null!=t?t:_n;return n.names[1]=e.toString(),n}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:e=>(null!=e?e:_n).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetY)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:_n;return n.nameOffsetX=e,n}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:e=>(null!=e?e:_n).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetX)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:_n;return n.nameOffsetY=e,n}},{type:"select",label:"panel.details.stations.common.rotate",value:e=>{var t;return null!==(t=null==e?void 0:e.rotate)&&void 0!==t?t:_n.rotate},hidden:e=>{var t,n;return 0===(null!==(t=null==e||null===(n=e.transfer)||void 0===n||null===(n=n.flat())||void 0===n?void 0:n.length)&&void 0!==t?t:0)},options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:(e,t)=>{const n=null!=t?t:_n;return n.rotate=Number(e),n}},{type:"custom",label:"panel.details.stations.interchange.title",component:F.jsx(On,{stationType:c.MTR,defaultAttrs:_n,maximumTransfers:[99,0,0]})}],Sn={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,nameOffsetX:f=_n.nameOffsetX,nameOffsetY:h=_n.nameOffsetY,transfer:p=_n.transfer,rotate:u=_n.rotate}=null!==(t=o[c.MTR])&&void 0!==t?t:_n,g=r.useCallback((e=>l(n,e)),[n,l]),x=r.useCallback((e=>i(n,e)),[n,i]),y=r.useCallback((e=>d(n,e)),[n,d]),C=p.at(0),b=((e,t=5,n=[])=>{const a=Math.sqrt(e*e-t*t/4),s=n.length<2?n.length+1:n.length;let o=`M -5,0 A ${e},${e},0,0,1,${-t/2},-${a} `;for(let l=0;l=0;l-=1)o+=`A ${e},${e},0,0,1,${l*t-t/2},${a} `;return o+=`A ${e},${e},0,0,1,-5,0 Z`,o})(5,5,C),v=0===C.length?0:C.length<=2?1:C.length-1,O=Math.cos(u*Math.PI/180)*v*5,w=Math.sin(u*Math.PI/180)*v*5,_="left"===f?-8:"right"===f?8:0,k=Math.sign(O)===Math.sign(_)?O+_:_,S=(m[we[h].namesPos].split("\n").length*wn[h]+6)*we[h].polarity,N=Math.sign(w)===Math.sign(S)?w+S:S,z="left"===f?"end":"right"===f?"start":"middle";return r.useMemo((()=>F.jsxs("g",{id:n,transform:`translate(${a}, ${s})`,children:[F.jsx("path",{transform:`rotate(${u})`,d:b,stroke:"#001f50",strokeWidth:"1.5",fill:"white",onPointerDown:g,onPointerMove:x,onPointerUp:y,style:{cursor:"move"}}),p.at(0).length>1&&p.at(0).map((e=>e[2])).map(((e,t)=>F.jsx("line",{transform:`rotate(${u})`,x1:5*t-2.5,x2:2.5+5*t,stroke:e,strokeWidth:"2"},`${t}_${e}`))),F.jsx("path",{id:`stn_core_${n}`,transform:`rotate(${u})`,d:b,fill:"white",fillOpacity:"0",onPointerDown:g,onPointerMove:x,onPointerUp:y,style:{cursor:"move"},className:"removeMe"}),F.jsxs("g",{transform:`translate(${k}, ${N})`,textAnchor:z,className:"rmp-name-outline",strokeWidth:"1.25",children:[F.jsx(Oe,{text:m[0].split("\n"),fontSize:10,lineHeight:10,grow:"up",baseOffset:1,fill:"#001f50",className:"rmp-name__mtr__zh"}),F.jsx(Oe,{text:m[1].split("\n"),fontSize:7.5,lineHeight:7.5,grow:"down",baseOffset:1,fill:"#001f50",className:"rmp-name__mtr__en"})]})]})),[n,a,s,...m,u,JSON.stringify(p),f,h,g,x,y])},icon:F.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:F.jsx("circle",{cx:"12",cy:"12",r:"5",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})}),defaultAttrs:_n,attrsComponent:()=>F.jsx(B,{fields:kn}),metadata:{displayName:"panel.details.stations.mtr.displayName",cities:[p.Hongkong],canvas:[v.RailMap],categories:[b.Metro],tags:[]}},Nn=r.forwardRef(((e,n)=>{const{text:a,lineWidth:o,grow:i,dominantBaseline:r=("left"===i?"hanging":"right"===i?"auto":"central"),baseOffset:d=2,baseDY:m=0}=e,c=l(e,t),f="bidirectional"===i?-(a.length-1)*o/2:0;return F.jsx("g",{ref:n,children:[...a].reverse().map(((e,t,n)=>F.jsx("text",s(s({x:(t*o+d)*("left"===i?-1:1)+f,dy:(t-(n.length-1)/2)*m,writingMode:"vertical-rl",dominantBaseline:r},c),{},{children:e}),`${e}${t}`)))})}));Nn.displayName="MultilineTextVertical";const zn={size:10,baseOffset:1},Mn={size:5,baseOffset:1.5},An={top:{lineHeight:5,offset:1+Mn.baseOffset+2.5,polarity:-1},middle:{lineHeight:0,offset:zn.size/2,polarity:1},bottom:{lineHeight:10,offset:0+zn.baseOffset+2.5,polarity:1}},Pn=s(s({},j),{},{color:[p.Suzhou,"sz1","#78BA25",u.white],nameOffsetX:"right",nameOffsetY:"top",textVertical:!1}),Bn={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,color:f=Pn.color,nameOffsetX:h=Pn.nameOffsetX,nameOffsetY:p=Pn.nameOffsetY,textVertical:u=Pn.textVertical}=null!==(t=o[c.SuzhouRTBasic])&&void 0!==t?t:Pn,g=r.useCallback((e=>l(n,e)),[n,l]),x=r.useCallback((e=>i(n,e)),[n,i]),y=r.useCallback((e=>d(n,e)),[n,d]),C="left"===h?-5:"right"===h?5:0,b=(m[we[p].namesPos].split("\n").length*An[p].lineHeight+An[p].offset)*An[p].polarity,v="left"===h?"end":"right"===h?"start":"middle",O="top"===p?-4.5:4.5,w="top"===p?"end":"start",_=m[0].split("\n").length*zn.size/2+Mn.baseOffset;return F.jsxs("g",{id:n,transform:`translate(${a}, ${s})`,children:[F.jsx("circle",{id:`stn_core_${n}`,r:3,stroke:f[2],strokeWidth:"1",fill:"white",onPointerDown:g,onPointerMove:x,onPointerUp:y,style:{cursor:"move"}}),u?F.jsxs(F.Fragment,{children:[F.jsx("g",{transform:`translate(-1, ${O})`,textAnchor:w,children:F.jsx(Nn,{text:m[0].split("\n"),fontSize:zn.size,lineWidth:zn.size,grow:"bidirectional",baseOffset:zn.baseOffset,dominantBaseline:"central",className:"rmp-name__zh"})}),F.jsx("g",{transform:`translate(${_}, ${O})rotate(90)`,textAnchor:w,children:F.jsx(Oe,{text:m[1].split("\n"),fontSize:Mn.size,lineHeight:Mn.size,grow:"up",baseOffset:Mn.baseOffset,className:"rmp-name__en",dominantBaseline:"central",fill:"gray"})})]}):F.jsxs("g",{transform:`translate(${C}, ${b})`,textAnchor:v,children:[F.jsx(Oe,{text:m[0].split("\n"),fontSize:zn.size,lineHeight:zn.size,grow:"up",baseOffset:zn.baseOffset,className:"rmp-name__zh"}),F.jsx(Oe,{text:m[1].split("\n"),fontSize:Mn.size,lineHeight:Mn.size,grow:"down",baseOffset:Mn.baseOffset,className:"rmp-name__en",fill:"gray"})]})]})},icon:F.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:F.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",fill:"none"})}),defaultAttrs:Pn,attrsComponent:e=>{var t,n,a;const{id:s,attrs:o,handleAttrsUpdate:l}=e,{t:r}=i(),d=[{type:"textarea",label:r("panel.details.stations.common.nameZh"),value:o.names[0],onChange:e=>{o.names[0]=e,l(s,o)},minW:"full"},{type:"textarea",label:r("panel.details.stations.common.nameEn"),value:o.names[1],onChange:e=>{o.names[1]=e,l(s,o)},minW:"full"},{type:"select",label:r("panel.details.stations.common.nameOffsetX"),value:null!==(t=o.nameOffsetX)&&void 0!==t?t:Pn.nameOffsetX,options:{left:r("panel.details.stations.common.left"),middle:r("panel.details.stations.common.middle"),right:r("panel.details.stations.common.right")},disabledOptions:"middle"===o.nameOffsetY?["middle"]:[],onChange:e=>{o.nameOffsetX=e,"middle"!==o.nameOffsetX&&(o.textVertical=!1),l(s,o)},minW:"full"},{type:"select",label:r("panel.details.stations.common.nameOffsetY"),value:null!==(n=o.nameOffsetY)&&void 0!==n?n:Pn.nameOffsetY,options:{top:r("panel.details.stations.common.top"),middle:r("panel.details.stations.common.middle"),bottom:r("panel.details.stations.common.bottom")},disabledOptions:"middle"===o.nameOffsetX?["middle"]:[],onChange:e=>{o.nameOffsetY=e,"middle"===o.nameOffsetY&&(o.textVertical=!1),l(s,o)},minW:"full"},{type:"switch",label:r("panel.details.stations.suzhouRTBasic.textVertical"),isChecked:null!==(a=o.textVertical)&&void 0!==a?a:Pn.textVertical,isDisabled:"middle"===o.nameOffsetY||"middle"!==o.nameOffsetX,onChange:e=>{o.textVertical=e,l(s,o)},oneLine:!0,minW:"full"},{type:"custom",label:r("color"),component:F.jsx(g,{type:c.SuzhouRTBasic,defaultTheme:Pn.color})}];return F.jsx(m,{fields:d})},metadata:{displayName:"panel.details.stations.suzhouRTBasic.displayName",cities:[p.Suzhou],canvas:[v.RailMap],categories:[b.Metro],tags:[]}},$n={size:10,baseOffset:1},Wn={size:5,baseOffset:1.5},En={top:{lineHeight:Wn.size,offset:0+Wn.baseOffset+3,polarity:-1},middle:{lineHeight:0,offset:$n.size/2,polarity:1},bottom:{lineHeight:$n.size,offset:0+$n.baseOffset+3,polarity:1}},Xn=s(s({},j),{},{nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[[p.Suzhou,"sz1","#78BA25",u.white,"",""],[p.Suzhou,"sz2","#ED3240",u.white,"",""]]]}),Yn={component:e=>{var t,n;const{id:a,x:s,y:o,attrs:l,handlePointerDown:i,handlePointerMove:d,handlePointerUp:m}=e,{names:f=j.names,nameOffsetX:h=Xn.nameOffsetX,nameOffsetY:p=Xn.nameOffsetY,rotate:u=Xn.rotate,transfer:g=Xn.transfer}=null!==(t=l[c.SuzhouRTInt])&&void 0!==t?t:Xn,x=r.useCallback((e=>i(a,e)),[a,i]),y=r.useCallback((e=>d(a,e)),[a,d]),C=r.useCallback((e=>m(a,e)),[a,m]),b=5*g.at(0).length+1,v=Math.abs(Math.cos(u*Math.PI/180)*b),O=Math.abs(Math.sin(u*Math.PI/180)*b),w=(v/2+5)*("left"===h?-1:"right"===h?1:0),_=(f[we[p].namesPos].split("\n").length*En[p].lineHeight+En[p].offset+("middle"===p?0:O/2))*En[p].polarity,k="left"===h?"end":"right"===h?"start":"middle";return F.jsxs("g",{id:a,transform:`translate(${s}, ${o})`,children:[F.jsxs("g",{transform:`rotate(${u})`,onPointerDown:x,onPointerMove:y,onPointerUp:C,style:{cursor:"move"},children:[F.jsx("rect",{x:-b/2,y:-3,width:b,height:6,ry:3,stroke:"#616161",strokeWidth:"1",fill:"white"}),(null!==(n=g.at(0))&&void 0!==n?n:[]).length>0&&g.at(0).map((e=>e[2])).map(((e,t)=>F.jsx("circle",{r:2,cx:-b/2+3+5*t,fill:e},`${t}_${e}`))),F.jsx("rect",{id:`stn_core_${a}`,x:-b/2-.5,y:-3.5,width:b+1,height:7,ry:3,fill:"white",opacity:"0"})]}),F.jsxs("g",{transform:`translate(${w}, ${_})`,textAnchor:k,children:[F.jsx(Oe,{text:f[0].split("\n"),fontSize:$n.size,lineHeight:$n.size,grow:"up",baseOffset:$n.baseOffset,className:"rmp-name__zh"}),F.jsx(Oe,{text:f[1].split("\n"),fontSize:Wn.size,lineHeight:Wn.size,grow:"down",baseOffset:Wn.baseOffset,className:"rmp-name__en",fill:"gray"})]})]})},icon:F.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[F.jsx("rect",{x:"6",y:"9",width:"12",height:"6",ry:"3",stroke:"currentColor",fill:"none"}),F.jsx("circle",{r:"2",cx:"9.5",cy:"12",fill:"currentColor"}),F.jsx("circle",{r:"2",cx:"14.5",cy:"12",fill:"currentColor"})]}),defaultAttrs:Xn,attrsComponent:e=>{var t,n,a,s,o;const{id:l,attrs:r,handleAttrsUpdate:d}=e,{t:f}=i(),h=[{type:"textarea",label:f("panel.details.stations.common.nameZh"),value:r.names[0],onChange:e=>{r.names[0]=e,d(l,r)},minW:"full"},{type:"textarea",label:f("panel.details.stations.common.nameEn"),value:r.names[1],onChange:e=>{r.names[1]=e,d(l,r)},minW:"full"},{type:"select",label:f("panel.details.stations.common.nameOffsetX"),value:null!==(t=r.nameOffsetX)&&void 0!==t?t:Xn.nameOffsetX,options:{left:f("panel.details.stations.common.left"),middle:f("panel.details.stations.common.middle"),right:f("panel.details.stations.common.right")},disabledOptions:"middle"===r.nameOffsetY?["middle"]:[],onChange:e=>{r.nameOffsetX=e,d(l,r)},minW:"full"},{type:"select",label:f("panel.details.stations.common.nameOffsetY"),value:null!==(n=r.nameOffsetY)&&void 0!==n?n:Xn.nameOffsetY,options:{top:f("panel.details.stations.common.top"),middle:f("panel.details.stations.common.middle"),bottom:f("panel.details.stations.common.bottom")},disabledOptions:"middle"===r.nameOffsetX?["middle"]:[],onChange:e=>{r.nameOffsetY=e,d(l,r)},minW:"full"},{type:"select",label:f("panel.details.stations.common.rotate"),value:null!==(a=r.rotate)&&void 0!==a?a:Xn.rotate,hidden:0===(null!==(s=null==r||null===(o=r.transfer)||void 0===o||null===(o=o.flat())||void 0===o?void 0:o.length)&&void 0!==s?s:0),options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{r.rotate=Number(e),d(l,r)},minW:"full"},{type:"custom",label:f("panel.details.stations.interchange.title"),component:F.jsx(On,{stationType:c.SuzhouRTInt,defaultAttrs:Xn,maximumTransfers:[99,0,0]})}];return F.jsx(m,{fields:h})},metadata:{displayName:"panel.details.stations.suzhouRTInt.displayName",cities:[p.Suzhou],canvas:[v.RailMap],categories:[b.Metro],tags:[]}},Rn={top:{lineHeight:6.67,offset:10},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:5.83}},In=s(s({},j),{},{nameOffsetX:"right",nameOffsetY:"top",color:[p.Kunming,"km1","#ea3222",u.white]}),Ln={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,nameOffsetX:f=In.nameOffsetX,nameOffsetY:h=In.nameOffsetY,color:p=In.color}=null!==(t=o[c.KunmingRTBasic])&&void 0!==t?t:In,u=r.useCallback((e=>l(n,e)),[n,l]),g=r.useCallback((e=>i(n,e)),[n,i]),x=r.useCallback((e=>d(n,e)),[n,d]),y="left"===f?-13.33:"right"===f?13.33:0,C=(m[we[h].namesPos].split("\n").length*Rn[h].lineHeight+Rn[h].offset)*we[h].polarity,b="left"===f?"end":"right"===f?"start":"middle";return r.useMemo((()=>F.jsxs("g",{id:n,transform:`translate(${a}, ${s})`,onPointerDown:u,onPointerMove:g,onPointerUp:x,style:{cursor:"move"},children:[F.jsx("circle",{id:`stn_core_${n}`,r:"5",stroke:p[2],strokeWidth:"1.33",fill:"white"}),F.jsxs("g",{transform:`translate(${y}, ${C})`,textAnchor:b,className:"rmp-name-outline",strokeWidth:"2.5",children:[F.jsx(Oe,{text:m[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),F.jsx(Oe,{text:m[1].split("\n"),dx:"right"===f?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[n,a,s,...m,f,h,p,u,g,x])},icon:F.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:F.jsx("circle",{r:"5",cx:"12",cy:"12",stroke:"currentColor",strokeWidth:"1.33",fill:"none"})}),defaultAttrs:In,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:a}=e,{t:s}=i(),o=[{type:"textarea",label:s("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,a(t,n)},minW:"full"},{type:"textarea",label:s("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:s("panel.details.stations.common.left"),middle:s("panel.details.stations.common.middle"),right:s("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:s("panel.details.stations.common.top"),middle:s("panel.details.stations.common.middle"),bottom:s("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,a(t,n)},minW:"full"},{type:"custom",label:s("color"),component:F.jsx(g,{type:c.KunmingRTBasic,defaultTheme:In.color})}];return F.jsx(m,{fields:o})},metadata:{displayName:"panel.details.stations.kunmingRTBasic.displayName",cities:[p.Kunming],canvas:[v.RailMap],categories:[b.Metro],tags:["interchange"]}},[Tn,Dn]=[15,9],Hn={top:{lineHeight:6.67,offset:5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:.83}},Un=s(s({},j),{},{nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[[p.Kunming,"km1","#ea3222",u.white,"",""],[p.Kunming,"km2","#03619e",u.white,"",""],[p.Kunming,"km3","#a13187",u.white,"",""]]]}),Fn={component:e=>{var t,n,a,s,o;const{id:l,x:i,y:d,attrs:m,handlePointerDown:f,handlePointerMove:h,handlePointerUp:p}=e,{names:u=j.names,nameOffsetX:g=Un.nameOffsetX,nameOffsetY:x=Un.nameOffsetY,rotate:y=Un.rotate,transfer:C=Un.transfer}=null!==(t=m[c.KunmingRTInt])&&void 0!==t?t:Un,b=r.useCallback((e=>f(l,e)),[l,f]),v=r.useCallback((e=>h(l,e)),[l,h]),O=r.useCallback((e=>p(l,e)),[l,p]),w=0===y||180===y?Tn:90===y||270===y?Dn:Tn*Math.SQRT1_2,_=0===y||180===y?Dn:90===y||270===y?Tn:Tn*Math.SQRT1_2,k="left"===g?-6.83:"right"===g?6.83:0,S=(Math.abs(k)+w/2)*Math.sign(k),N=(u[we[x].namesPos].split("\n").length*Hn[x].lineHeight+Hn[x].offset)*we[x].polarity,z=(Math.abs(N)+_/2)*Math.sign(N),M="left"===g?"end":"right"===g?"start":"middle";return F.jsxs("g",{id:l,children:[F.jsx("g",{transform:`translate(${i}, ${d})rotate(${y})`,onPointerDown:b,onPointerMove:v,onPointerUp:O,style:{cursor:"move"},children:C.at(0).length<=2?F.jsxs("g",{transform:"translate(-7.5,-4.5)",children:[F.jsx("rect",{id:`stn_core_${l}`,height:"9",width:"15",ry:"4",stroke:"#393332",strokeWidth:"1",fill:"white"}),F.jsx("path",{fill:null!==(n=null===(a=C.at(0).at(0))||void 0===a?void 0:a.at(2))&&void 0!==n?n:"#ea3222",fillRule:"evenodd",stroke:"none",d:"M 3.833333 6.375 C 2.820813 6.375 2 5.535532 2 4.5 C 2 3.464468 2.820813 2.625 3.833333 2.625 L 4.444445 2.625 L 4.444445 2 L 6.888889 2.9375 L 4.444445 3.875 L 4.444445 3.25 L 3.833333 3.25 C 3.158321 3.25 2.611111 3.809647 2.611111 4.5 C 2.611111 5.190353 3.158321 5.75 3.833333 5.75 L 7.5 5.75 L 7.5 6.375 L 3.833333 6.375 Z"}),F.jsx("path",{fill:null!==(s=null===(o=C.at(0).at(1))||void 0===o?void 0:o.at(2))&&void 0!==s?s:"#03619e",fillRule:"evenodd",stroke:"none",d:"M 11.166667 2.625 C 12.179187 2.625 13 3.464468 13 4.5 C 13 5.535532 12.179187 6.375 11.166667 6.375 L 10.555555 6.375 L 10.555555 7 L 8.111111 6.0625 L 10.555555 5.125 L 10.555555 5.75 L 11.166667 5.75 C 11.841679 5.75 12.388889 5.190353 12.388889 4.5 C 12.388889 3.809647 11.841679 3.25 11.166667 3.25 L 7.5 3.25 L 7.5 2.625 L 11.166667 2.625 Z"})]}):F.jsxs("g",{transform:"translate(-8.5,-8.5)",children:[F.jsx("circle",{id:`stn_core_${l}`,r:"8.5",cx:"8.5",cy:"8.5",stroke:"#000000",strokeWidth:"1",fill:"white"}),F.jsx("path",{fill:C.at(0).at(0).at(2),fillRule:"evenodd",stroke:"none",d:"M 8.900812 14 L 10.286572 11.992442 L 10.63521 12.569632 C 12.188999 11.790696 13.24999 10.23524 13.24999 8.441039 C 13.24999 8.070708 13.203481 7.710487 13.118152 7.365112 L 13.887206 7.365112 C 13.960998 7.712721 14 8.072591 14 8.441039 C 14 10.500518 12.789013 12.288074 11.01168 13.191653 L 11.411587 13.855702 L 8.900812 14 Z"}),F.jsx("path",{fill:C.at(0).at(1).at(2),fillRule:"evenodd",stroke:"none",d:"M 8 13.974609 C 5.462755 13.73554 3.426537 11.698185 3.0625 9.090137 L 2.5 9.090137 L 3.5 7 L 4.5 9.090137 L 4.074219 9.090137 C 4.422903 11.120208 6.015293 12.696354 8 12.925459 L 8 13.974609 Z"}),F.jsx("path",{fill:C.at(0).at(2).at(2),fillRule:"evenodd",stroke:"none",d:"M 12.68764 6.50351 L 10.588492 5.178213 L 11.35608 4.753726 C 10.531951 4.143034 9.498575 3.778666 8.375084 3.778666 C 6.644794 3.778666 5.125485 4.640751 4.260284 5.940329 L 3.718284 5.421978 C 4.730131 3.997121 6.438381 3.061381 8.375084 3.061381 C 9.781034 3.061381 11.063435 3.556896 12.04896 4.372667 L 12.536759 4.102285 L 12.68764 6.50351 Z"})]})}),F.jsxs("g",{transform:`translate(${i+S}, ${d+z})`,textAnchor:M,className:"rmp-name-outline",strokeWidth:"2.5",children:[F.jsx(Oe,{text:u[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),F.jsx(Oe,{text:u[1].split("\n"),dx:"right"===g?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})},icon:F.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:F.jsxs("g",{transform:"translate(3.5, 3.5)",children:[F.jsx("circle",{r:"8.5",cx:"8.5",cy:"8.5",stroke:"currentColor",strokeWidth:"1",fill:"none"}),F.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 8.900812 14 L 10.286572 11.992442 L 10.63521 12.569632 C 12.188999 11.790696 13.24999 10.23524 13.24999 8.441039 C 13.24999 8.070708 13.203481 7.710487 13.118152 7.365112 L 13.887206 7.365112 C 13.960998 7.712721 14 8.072591 14 8.441039 C 14 10.500518 12.789013 12.288074 11.01168 13.191653 L 11.411587 13.855702 L 8.900812 14 Z"}),F.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 8 13.974609 C 5.462755 13.73554 3.426537 11.698185 3.0625 9.090137 L 2.5 9.090137 L 3.5 7 L 4.5 9.090137 L 4.074219 9.090137 C 4.422903 11.120208 6.015293 12.696354 8 12.925459 L 8 13.974609 Z"}),F.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 12.68764 6.50351 L 10.588492 5.178213 L 11.35608 4.753726 C 10.531951 4.143034 9.498575 3.778666 8.375084 3.778666 C 6.644794 3.778666 5.125485 4.640751 4.260284 5.940329 L 3.718284 5.421978 C 4.730131 3.997121 6.438381 3.061381 8.375084 3.061381 C 9.781034 3.061381 11.063435 3.556896 12.04896 4.372667 L 12.536759 4.102285 L 12.68764 6.50351 Z"})]})}),defaultAttrs:Un,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:a}=e,{t:s}=i(),o=[{type:"textarea",label:s("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,a(t,n)},minW:"full"},{type:"textarea",label:s("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:s("panel.details.stations.common.left"),middle:s("panel.details.stations.common.middle"),right:s("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:s("panel.details.stations.common.top"),middle:s("panel.details.stations.common.middle"),bottom:s("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.rotate"),value:n.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{n.rotate=Number(e),a(t,n)},minW:"full"},{type:"custom",label:s("panel.details.stations.interchange.title"),component:F.jsx(On,{stationType:c.KunmingRTInt,defaultAttrs:Un,maximumTransfers:[3,0,0]})}];return F.jsx(m,{fields:o})},metadata:{displayName:"panel.details.stations.kunmingRTInt.displayName",cities:[p.Kunming],canvas:[v.RailMap],categories:[b.Metro],tags:["interchange"]}},Vn=8.2628,Gn={top:{offset:8.2628,polarity:-1},middle:{offset:0,polarity:0},bottom:{offset:8.2628,polarity:1}},Zn={names:["Marina South Pier"],nameOffsetX:"right",nameOffsetY:"top",lineCode:"NS",stationCode:"28",isTram:!1,color:[p.Singapore,"nsl","#DA291C",u.white]},Qn={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,nameOffsetX:f=Zn.nameOffsetX,nameOffsetY:h=Zn.nameOffsetY,color:p=Zn.color,lineCode:u=Zn.lineCode,stationCode:g=Zn.stationCode,isTram:x=Zn.isTram}=null!==(t=o[c.MRTBasic])&&void 0!==t?t:Zn,y=r.useCallback((e=>l(n,e)),[n,l]),C=r.useCallback((e=>i(n,e)),[n,i]),b=r.useCallback((e=>d(n,e)),[n,d]),v=22.85,O=12.935,w=16.425*("left"===f?-1:"right"===f?1:0),_=Gn[h].offset*Gn[h].polarity,k="left"===f?"end":"right"===f?"start":"middle";return r.useMemo((()=>F.jsxs("g",{id:n,transform:`translate(${a}, ${s}) ${x?"scale(0.81)":""}`,children:[F.jsxs("g",{onPointerDown:y,onPointerMove:C,onPointerUp:b,style:{cursor:"move"},children:[F.jsx("rect",{x:-11.425,y:-6.4675,rx:"3",ry:"6",width:v,height:O,fill:p[2],stroke:"white",strokeWidth:"1"}),F.jsx("text",{fontSize:5.2,dx:"-4",dy:"0.5",className:"rmp-name__mrt",fill:p[3],textAnchor:"middle",dominantBaseline:"middle",children:u}),F.jsx("text",{fontSize:5.2,dx:"4",dy:"0.5",className:"rmp-name__mrt",fill:p[3],textAnchor:"middle",dominantBaseline:"middle",children:g}),F.jsx("rect",{id:`stn_core_${n}`,x:-11.425,y:-6.4675,rx:"3",ry:"6",width:v,height:O,fill:"white",opacity:"0"})]}),F.jsx("g",{transform:`translate(${w}, ${_})`,textAnchor:k,children:F.jsx(Oe,{text:m[0].split("\n"),fontSize:Vn,lineHeight:Vn,grow:"top"===h?"up":"middle"===h?"bidirectional":"down",baseOffset:0,className:"rmp-name__mrt"})})]})),[n,a,s,...m,f,h,p,u,g,x,y,C,b])},icon:F.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[F.jsx("rect",{x:"6",y:"8.6035",rx:"1.575",ry:"3.151",width:"12",height:"6.793",fill:"currentColor"}),F.jsx("text",{fontSize:"3.5",dx:"10",dy:"13",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"NS"}),F.jsx("text",{fontSize:"3.5",dx:"15",dy:"13",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"28"})]}),defaultAttrs:Zn,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:a}=e,{t:s}=i(),o=[{type:"textarea",label:s("panel.details.stations.common.nameEn"),value:n.names[0],onChange:e=>{n.names[0]=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:s("panel.details.stations.common.left"),middle:s("panel.details.stations.common.middle"),right:s("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:s("panel.details.stations.common.top"),middle:s("panel.details.stations.common.middle"),bottom:s("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,a(t,n)},minW:"full"},{type:"input",label:s("panel.details.stations.common.lineCode"),value:n.lineCode,onChange:e=>{n.lineCode=e,a(t,n)},minW:"full"},{type:"input",label:s("panel.details.stations.common.stationCode"),value:n.stationCode,onChange:e=>{n.stationCode=e,a(t,n)},minW:"full"},{type:"switch",label:s("panel.details.stations.MRTBasic.isTram"),isChecked:n.isTram,onChange:e=>{n.isTram=e,a(t,n)},minW:"full",oneLine:!0},{type:"custom",label:s("color"),component:F.jsx(g,{type:c.MRTBasic,defaultTheme:Zn.color})}];return F.jsx(m,{fields:o})},metadata:{displayName:"panel.details.stations.MRTBasic.displayName",cities:[p.Singapore],canvas:[v.RailMap],categories:[b.Metro],tags:[]}},qn=8.2628,Jn={top:{offset:10.7628,polarity:-1},middle:{offset:0,polarity:0},bottom:{offset:10.7628,polarity:1}},Kn={names:["Chinatown"],nameOffsetX:"right",nameOffsetY:"top",transfer:[[[p.Singapore,"nel","#9B26B6",u.white,"NE","4"],[p.Singapore,"dtl","#0057B7",u.white,"DT","19"]]]},ea={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,nameOffsetX:f=Kn.nameOffsetX,nameOffsetY:h=Kn.nameOffsetY,transfer:p=Kn.transfer}=null!==(t=o[c.MRTInt])&&void 0!==t?t:Kn,u=r.useCallback((e=>l(n,e)),[n,l]),g=r.useCallback((e=>i(n,e)),[n,i]),x=r.useCallback((e=>d(n,e)),[n,d]),y=p.at(0),C=29.625*(y.length-2)+57.8,b=16.77,v=[];for(let r=1;rF.jsxs("g",{id:n,transform:`translate(${a}, ${s})`,children:[F.jsx("g",{onPointerDown:u,onPointerMove:g,onPointerUp:x,style:{cursor:"move"},children:p.map((e=>({info:e,width:29.625*(e.length-2)+57.8}))).map((({info:e,width:t},a)=>F.jsxs(r.Fragment,{children:[F.jsx("rect",{x:-t/2,y:-8.385,rx:"4.5",ry:"8",width:t,height:b,fill:`url(#${n}_grad_${a})`,stroke:"white",strokeWidth:"1"}),F.jsx("linearGradient",{id:`${n}_grad_${a}`,y1:"0%",y2:"0%",x1:"0%",x2:"100%",children:e.map(((t,n)=>F.jsxs(r.Fragment,{children:[F.jsx("stop",{offset:100/e.length*n+"%",stopColor:t[2]}),F.jsx("stop",{offset:100/e.length*(n+1)+"%",stopColor:t[2]})]},t[2])))}),v.map((n=>F.jsx("line",{x1:n/e.length*t-t/2,x2:n/e.length*t-t/2,y1:-8.385,y2:8.385,stroke:"white",strokeWidth:"1"},n))),e.map(((e,n,a)=>F.jsxs(r.Fragment,{children:[F.jsx("text",{fontSize:6.9,dx:(""!==e[5]?-5:-2)+t/a.length/2*(2*n+1)-t/2+1,dy:"0.5",className:"rmp-name__mrt",fill:e[3],textAnchor:"middle",dominantBaseline:"middle",children:e[4]}),F.jsx("text",{fontSize:6.9,dx:5+t/a.length/2*(2*n+1)-t/2+1,dy:"0.5",className:"rmp-name__mrt",fill:e[3],textAnchor:"middle",dominantBaseline:"middle",children:e[5]})]},e[2]))),F.jsx("rect",{id:`stn_core_${n}`,x:-t/2,y:-8.385,rx:"4.5",ry:"8",width:t,height:b,fill:"white",opacity:"0"})]},e.map((e=>e[2])).join("_"))))}),F.jsx("g",{transform:`translate(${O}, ${w})`,textAnchor:_,children:F.jsx(Oe,{text:m[0].split("\n"),fontSize:qn,lineHeight:qn,grow:"top"===h?"up":"middle"===h?"bidirectional":"down",baseOffset:0,className:"rmp-name__mrt"})})]})),[n,a,s,...m,f,h,JSON.stringify(p),u,g,x])},icon:F.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[F.jsx("rect",{x:"2",y:"9.0985",rx:"1.038",ry:"2.076",width:"20",height:"5.803",fill:"currentColor"}),F.jsx("text",{fontSize:"3",dx:"5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"NE"}),F.jsx("text",{fontSize:"3",dx:"9.5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"4"}),F.jsx("text",{fontSize:"3",dx:"14.5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"DT"}),F.jsx("text",{fontSize:"3",dx:"19",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"19"})]}),defaultAttrs:Kn,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:a}=e,{t:s}=i(),o=[{type:"textarea",label:s("panel.details.stations.common.nameEn"),value:n.names[0],onChange:e=>{n.names[0]=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:s("panel.details.stations.common.left"),middle:s("panel.details.stations.common.middle"),right:s("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:s("panel.details.stations.common.top"),middle:s("panel.details.stations.common.middle"),bottom:s("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,a(t,n)},minW:"full"},{type:"custom",label:s("panel.details.stations.interchange.title"),component:F.jsx(On,{stationType:c.MRTInt,defaultAttrs:Kn,maximumTransfers:[1/0,0,0]})}];return F.jsx(m,{fields:o})},metadata:{displayName:"panel.details.stations.MRTInt.displayName",cities:[p.Singapore],canvas:[v.RailMap],categories:[b.Metro],tags:[]}},ta={size:10,baseOffset:1},na={size:5,baseOffset:1.5},aa={names:["新宿","Shinjuku"],nameOffsetX:"right",nameOffsetY:"middle",rotate:0,textOneLine:!1,textVertical:!1,important:!1,lines:[-1,0,1]},sa={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,nameOffsetX:f=aa.nameOffsetX,nameOffsetY:h=aa.nameOffsetY,rotate:p=aa.rotate,textOneLine:u=aa.textOneLine,textVertical:g=aa.textVertical,important:x=aa.important,lines:y=aa.lines}=null!==(t=o[c.JREastBasic])&&void 0!==t?t:aa,C=r.useCallback((e=>l(n,e)),[n,l]),b=r.useCallback((e=>i(n,e)),[n,i]),v=r.useCallback((e=>d(n,e)),[n,d]),O=5*(Math.max(...y)-Math.min(...y)+1),w=5*(Math.min(...y)-.5),_=5*Math.abs(Math.cos(p*Math.PI/180))*Math.min(...y)-2.5-1,k=5*Math.abs(Math.cos(p*Math.PI/180))*Math.max(...y)+2.5+1,S=5*Math.abs(Math.sin(p*Math.PI/180))*Math.min(...y)-2.5,N=5*Math.abs(Math.sin(p*Math.PI/180))*Math.max(...y)+2.5,z="left"===f?_:"right"===f?k:0,M=(m[0].split("\n").length*("middle"===h?0:ta.size)+(("middle"===h?0:"top"===h?2:1)+ta.baseOffset))*we[h].polarity+("middle"===h?0:"top"===h?S:N),A="left"===f?"end":"right"===f?"start":"middle",P={ja:"top"===h?"down":"bottom"===h?"up":"bidirectional",en:"top"===h||u?"up":"down"},B={ja:ta.baseOffset,en:("middle"===h?u?-m[0].split("\n").length*ta.size/2-1:m[0].split("\n").length*ta.size/2:0)+(x&&!u?2:0)+na.baseOffset},$=r.useRef(null),[W,E]=r.useState({width:0});r.useEffect((()=>E($.current.getBBox())),[m[0],g,E,$]);const X=(g?.2:.7)*ta.size,Y={left:-X/2,middle:0,right:X/2}[f],R={top:-2,middle:0,bottom:2}[h],I=p%90!=0&&"middle"!==f?("left"===f?_:k)*Math.SQRT2:0,L=(x&&"middle"!==f?Y:0)+I,T={0:0,45:-1,90:0,135:1,180:0,225:-1,270:0,315:1}[p],D=T*ta.size,H=u?(Math.abs(L)+W.width+1+(x?X:0))*("left"===f?-1:1):p%90!=0&&"middle"!==f?m[0].split("\n").length/2*T*ta.size+("left"===f?-1:1)*ta.size:0,U=(x?2:0)*we[h].polarity,V=W.width,G=W.height,Z={left:-(V+X)+I,middle:-(V+X)/2,right:I}[f],Q={top:-2-B.ja,middle:-G/2,bottom:3-G+B.ja}[h],q={top:3-G-B.ja,middle:0,bottom:-3+B.ja}[h],J=("top"===h?S-na.baseOffset:N+na.baseOffset)+((x?X:0)+(p%90!=0?ta.size/2:0))*we[h].polarity,K={ja:"top"===h?"end":"start",en:"top"===h?"start":"end"},ee={0:0,45:-1,90:0,135:1,180:0,225:-1,270:0,315:1}[p],te=ee*ta.size,ne=m[0].split("\n").length*ta.size/2+na.baseOffset,ae=(x?1:0)*we[h].polarity*-1,se=(m[0].split("\n").length-0)/2*("top"===h?-1:1)*ee*ta.size+(x?2:0)*we[h].polarity*-1;return F.jsxs("g",{id:n,transform:`translate(${a}, ${s})`,children:[F.jsx("g",{transform:`rotate(${p})`,children:y.map(((e,t)=>F.jsx("circle",{cx:5*e,cy:"0",r:"1.5",stroke:"black",strokeWidth:"0.2",fill:"white"},`stn_core_${n}_${t}`)))}),g?F.jsxs(F.Fragment,{children:[F.jsxs("g",{transform:`translate(0, ${J})`,textAnchor:K.ja,children:[x&&F.jsx("rect",{x:-(V-8)/2,y:q,width:V-8,height:G,rx:(V-8)/2,fill:"black"}),F.jsx(Nn,{ref:$,text:m[0].split("\n"),fontSize:ta.size,lineWidth:ta.size,grow:"bidirectional",baseOffset:0,baseDY:te,y:x?2.75*we[h].polarity:0,className:"rmp-name__jreast_ja",fill:x?"white":"black"})]}),F.jsx("g",{transform:`translate(${ae}, ${J+se})rotate(270)`,textAnchor:K.en,children:F.jsx(Oe,{text:m[1].split("\n"),fontSize:na.size,lineHeight:na.size,grow:"top"===h?"down":"up",baseOffset:ne,funcDX:e=>5*e*Math.SQRT1_2*ee*("top"===h?-1:1),className:"rmp-name__jreast_en"})})]}):F.jsxs("g",{transform:`translate(${z}, ${M})`,textAnchor:A,children:[x&&F.jsx("rect",{x:Z,y:Q+1.75,width:W.width+X,height:G-3.5,ry:(G-3.5)/2,fill:"black"}),F.jsx(Oe,{ref:$,x:L,y:x&&"middle"!==h?R:0,text:m[0].split("\n"),fontSize:ta.size,lineHeight:ta.size,grow:P.ja,baseOffset:B.ja,funcDX:e=>(e-(m[0].split("\n").length-1)/2)*D,className:"rmp-name__jreast_ja",fill:x?"white":"black"}),F.jsx(Oe,{text:m[1].split("\n"),x:H,y:U,fontSize:na.size,lineHeight:na.size,grow:P.en,baseOffset:B.en,funcDX:e=>5*e*Math.SQRT1_2*T,className:"rmp-name__jreast_en"})]}),F.jsx("g",{transform:`rotate(${p})`,children:F.jsx("rect",{id:`stn_core_${n}`,fill:"url(#opaque)",fillOpacity:"50%",x:w,y:-2.5,rx:2.5,width:O,height:5,onPointerDown:C,onPointerMove:b,onPointerUp:v,style:{cursor:"move"}})})]})},icon:F.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[F.jsx("circle",{cx:"6",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"}),F.jsx("circle",{cx:"12",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"}),F.jsx("circle",{cx:"18",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"})]}),defaultAttrs:aa,attrsComponent:e=>{var t;const{id:n,attrs:a,handleAttrsUpdate:s}=e,{t:o}=i(),l=[{type:"textarea",label:o("panel.details.stations.common.nameJa"),value:a.names[0],onChange:e=>{a.names[0]=e.toString(),a.names[0].length>1&&(a.textOneLine=!1,a.important=!1),s(n,a)},minW:"full"},{type:"textarea",label:o("panel.details.stations.common.nameEn"),value:a.names[1],onChange:e=>{a.names[1]=e.toString(),a.names[1].length>1&&(a.textOneLine=!1,a.important=!1),s(n,a)},minW:"full"},{type:"select",label:o("panel.details.stations.jrEastBasic.nameOffset"),value:"middle"!==a.nameOffsetX?a.nameOffsetX:a.nameOffsetY,options:{left:o("panel.details.stations.common.left"),right:o("panel.details.stations.common.right"),top:o("panel.details.stations.common.top"),bottom:o("panel.details.stations.common.bottom")},onChange:e=>{"left"===e||"right"===e?(a.nameOffsetX=e,a.nameOffsetY="middle",a.textVertical=!1):(a.nameOffsetX="middle",a.nameOffsetY=e,a.textOneLine=!1),s(n,a)},minW:"full"},{type:"select",label:o("panel.details.stations.common.rotate"),value:a.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{a.rotate=Number(e),s(n,a)},minW:"full"},{type:"switch",label:o("panel.details.stations.jrEastBasic.textOneLine"),isChecked:a.textOneLine,isDisabled:"middle"!==a.nameOffsetY||a.names.some((e=>e.split("\n").length>1)),onChange:e=>{a.textOneLine=e,s(n,a)},oneLine:!0,minW:"full"},{type:"switch",label:o("panel.details.stations.jrEastBasic.textVertical"),isChecked:a.textVertical,isDisabled:"middle"!==a.nameOffsetX,onChange:e=>{a.textVertical=e,s(n,a)},oneLine:!0,minW:"full"},{type:"switch",label:o("panel.details.stations.jrEastBasic.important"),isChecked:null!==(t=a.important)&&void 0!==t&&t,isDisabled:a.names.some((e=>e.split("\n").length>1)),onChange:e=>{a.important=e,s(n,a)},oneLine:!0,minW:"full"}];return F.jsxs(F.Fragment,{children:[F.jsx(m,{fields:l}),F.jsx(S,{label:o("panel.details.stations.jrEastBasic.lines"),children:F.jsxs(te,{flexWrap:"wrap",flexDirection:"row",pt:"1",children:[a.lines.map(((e,t)=>F.jsx(ne,{width:"80px",inputMode:"numeric",mr:"2",mb:"2",value:e,onChange:e=>((e,t)=>{if((""===e||"-"===e)&&a.lines.length>1)a.lines.splice(t,1);else{const n=Number(e);if(Number.isNaN(n))return;a.lines[t]=n}s(n,a)})(e,t),children:F.jsx(ae,{})},t))),F.jsx(ne,{width:"80px",inputMode:"numeric",mr:"2",mb:"2",value:"",onChange:e=>(e=>{const t="-"===e?-1:Number(e);Number.isNaN(t)||(a.lines.push(t),s(n,a))})(e),onKeyDown:e=>(e=>{"Backspace"===e.key&&a.lines.length>1&&(a.lines.pop(),s(n,a))})(e),children:F.jsx(ae,{})})]})})]})},metadata:{displayName:"panel.details.stations.jrEastBasic.displayName",cities:[p.Tokyo],canvas:[v.RailMap],categories:[b.NationalRail],tags:[]}},oa={size:10},la={size:5},ia={names:["東京","Tōkyō"],nameOffsetX:"left",nameOffsetY:"middle",textVertical:!1,mostImportant:!1,minLength:0},ra={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,nameOffsetX:f=ia.nameOffsetX,nameOffsetY:h=ia.nameOffsetY,textVertical:p=ia.textVertical,mostImportant:u=ia.mostImportant,minLength:g=ia.minLength}=null!==(t=o[c.JREastImportant])&&void 0!==t?t:ia,x=r.useCallback((e=>l(n,e)),[n,l]),y=r.useCallback((e=>i(n,e)),[n,i]),C=r.useCallback((e=>d(n,e)),[n,d]),b=r.useRef(null),[v,O]=r.useState({height:0,width:0});r.useEffect((()=>O(b.current.getBBox())),[m[0],p,O,b]);const w=Math.max(v.width,v.height),_=(p?.1:.7)*oa.size,k=Math.max(w+_,g),S=p?oa.size+1:k,N=p?k-5:oa.size+1,z={left:-S/2-1,middle:0,right:S/2+1}[f],M={top:-N/2-1,middle:0,bottom:N/2+1}[h],A={left:"end",middle:"middle",right:"start"}[f],P=u?1.5:1;return F.jsxs("g",{id:n,transform:`translate(${a}, ${s})`,children:[F.jsxs("g",{transform:`scale(${P})`,children:[F.jsx("rect",{fill:"black",x:-S/2,y:-N/2,rx:p?void 0:N/2,ry:p?S/2:void 0,width:S,height:N}),p?F.jsx("text",{ref:b,className:"rmp-name__jreast_ja",textAnchor:"middle",writingMode:"vertical-rl",fontSize:oa.size,fill:"white",dominantBaseline:"central",children:m[0]}):F.jsx("text",{ref:b,y:"-1",className:"rmp-name__jreast_ja",textAnchor:"middle",fontSize:oa.size,fill:"white",dominantBaseline:"central",children:m[0]}),F.jsx("rect",{id:`stn_core_${n}`,fill:"black",fillOpacity:"0",x:-S/2,y:-N/2,rx:p?void 0:S/2,ry:p?N/2:void 0,width:S,height:N,onPointerDown:x,onPointerMove:y,onPointerUp:C,style:{cursor:"move"},className:"removeMe"})]}),F.jsx("g",{transform:`translate(${z*P}, ${M*P})`,textAnchor:A,children:F.jsx(Oe,{text:m[1].split("\n"),fontSize:la.size,lineHeight:la.size,grow:"top"===h?"up":"middle"===h?"bidirectional":"down",baseOffset:0,className:"rmp-name__jreast_en"})})]})},icon:F.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[F.jsx("rect",{x:"3",y:"7.5",rx:"4.5",width:"18",height:"9",stroke:"currentColor",fill:"currentColor"}),F.jsx("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"middle",fontSize:"6",fill:"white",children:"東京"}),F.jsx("text",{x:"12",y:"20.25",textAnchor:"middle",dominantBaseline:"middle",fontSize:"3",children:"Tōkyō"})]}),defaultAttrs:ia,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:a}=e,{t:s}=i(),o=[{type:"input",label:s("panel.details.stations.common.nameJa"),value:n.names[0],onChange:e=>{n.names[0]=e.toString(),a(t,n)},minW:"full"},{type:"textarea",label:s("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e.toString(),a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:s("panel.details.stations.common.left"),middle:s("panel.details.stations.common.middle"),right:s("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:s("panel.details.stations.common.top"),middle:s("panel.details.stations.common.middle"),bottom:s("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,a(t,n)},minW:"full"},{type:"switch",label:s("panel.details.stations.jrEastImportant.textVertical"),isChecked:n.textVertical,onChange:e=>{n.textVertical=e,a(t,n)},oneLine:!0,minW:"full"},{type:"switch",label:s("panel.details.stations.jrEastImportant.mostImportant"),isChecked:n.mostImportant,onChange:e=>{n.mostImportant=e,a(t,n)},oneLine:!0,minW:"full"},{type:"input",label:s("panel.details.stations.jrEastImportant.minLength"),value:n.minLength.toString(),onChange:e=>{Number.isNaN(e)?n.minLength=0:n.minLength=Number(e),a(t,n)},minW:"full"}];return F.jsx(m,{fields:o})},metadata:{displayName:"panel.details.stations.jrEastImportant.displayName",cities:[p.Tokyo],canvas:[v.RailMap],categories:[b.NationalRail],tags:[]}},da=s(s({},j),{},{nameOffsetX:"right",nameOffsetY:"top",color:[p.Foshan,"fs1","#C4D600",u.black],lineCode:"GF",stationCode:"01",open:!0,secondaryNames:["",""],tram:!1}),ma={component:e=>{var t,n;const{id:a,x:s,y:o,attrs:l,handlePointerDown:i,handlePointerMove:d,handlePointerUp:m}=e,{names:f=j.names,nameOffsetX:h=da.nameOffsetX,nameOffsetY:p=da.nameOffsetY,color:u=da.color,lineCode:g=da.lineCode,stationCode:x=da.stationCode,open:y=da.open,secondaryNames:C=da.secondaryNames,tram:b=da.tram}=null!==(t=l[c.FoshanMetroBasic])&&void 0!==t?t:da,v=r.useCallback((e=>i(a,e)),[a,i]),O=r.useCallback((e=>d(a,e)),[a,d]),w=r.useCallback((e=>m(a,e)),[a,m]),_=r.useRef(null);null===(n=_.current)||void 0===n||null===(n=n.querySelector("path"))||void 0===n||n.setAttribute("id",`stn_core_${a}`);const k={en:b?5.08:6.56,zh:b?7.29:13.13},S={top:{namesPos:1,lineHeight:k.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:k.zh,polarity:1}},N=b?11:15,z="left"===h?-N:"right"===h?N:0,M=b?8:10,A=(f[S[p].namesPos].split("\n").length*S[p].lineHeight+M)*S[p].polarity,P="left"===h?"end":"right"===h?"start":y||"middle"!==h||""!==C.join("")?"middle":"end",B=r.useRef(null),[$,W]=r.useState(0);r.useEffect((()=>{var e,t;return W(null!==(e=null===(t=B.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...C]);const E=r.useRef(null),[X,Y]=r.useState(0);r.useEffect((()=>{var e,t;return Y(null!==(e=null===(t=E.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...f]);const R="middle"===h?X/2+($+24)/2:(X+($+24)/2)*("left"===h?-1:1),I="middle"===h&&""!==C.join("")?X/2+($+24):(X+$+(0!==$?24:0))*("left"===h?-1:"right"===h?1:0);return F.jsxs("g",{id:a,transform:`translate(${s}, ${o})`,children:[F.jsx("g",{transform:`scale(${.57915*(b?.729:1)})`,onPointerDown:v,onPointerMove:O,onPointerUp:w,style:{cursor:"move"},ref:_,children:F.jsx(Pt,{id:`stn_core_${a}`,strokeColour:u[2],lineNum:""===g?void 0:g,stnNum:""===x?void 0:x,textClassName:"rmp-name__zh"})}),F.jsxs("g",{ref:E,transform:`translate(${z}, ${A})`,textAnchor:P,children:[F.jsx(Oe,{text:f[0].split("\n"),fontSize:k.zh,lineHeight:k.zh,grow:"up",className:"rmp-name__zh"}),F.jsx(Oe,{text:f[1].split("\n"),fontSize:k.en,lineHeight:k.en,grow:"down",className:"rmp-name__en"})]}),""!==C.join("")&&F.jsxs("g",{transform:`translate(${z+R}, ${A})`,textAnchor:"middle",children:[F.jsx("text",{fontSize:"13.13",dx:-($+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),F.jsx("text",{fontSize:"13.13",dx:($+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),F.jsxs("g",{ref:B,children:[F.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:C[0]}),F.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:C[1]})]})]}),!y&&F.jsxs("g",{transform:`translate(${z+I}, ${A})`,textAnchor:"middle"===h?"start":P,children:[F.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),F.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},icon:F.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:F.jsx("g",{transform:"translate(12,12)scale(0.45)",children:F.jsx(Pt,{strokeColour:"#000",lineNum:"1",stnNum:"01"})})}),defaultAttrs:da,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:a}=e,{t:s}=i(),o=[{type:"textarea",label:s("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,a(t,n)},minW:"full"},{type:"textarea",label:s("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:s("panel.details.stations.common.left"),middle:s("panel.details.stations.common.middle"),right:s("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:s("panel.details.stations.common.top"),middle:s("panel.details.stations.common.middle"),bottom:s("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,a(t,n)},minW:"full"},{type:"custom",label:s("color"),component:F.jsx(g,{type:c.FoshanMetroBasic,defaultTheme:da.color})},{type:"input",label:s("panel.details.stations.common.lineCode"),value:n.lineCode,onChange:e=>{n.lineCode=e,a(t,n)},minW:"full"},{type:"input",label:s("panel.details.stations.common.stationCode"),value:n.stationCode,onChange:e=>{n.stationCode=e,a(t,n)},minW:"full"},{type:"switch",label:s("panel.details.stations.foshanMetroBasic.open"),oneLine:!0,isChecked:n.open,onChange:e=>{n.open=e,a(t,n)},minW:"full"},{type:"input",label:s("panel.details.stations.foshanMetroBasic.secondaryNameZh"),value:n.secondaryNames[0],onChange:e=>{n.secondaryNames[0]=e,a(t,n)},minW:"full"},{type:"input",label:s("panel.details.stations.foshanMetroBasic.secondaryNameEn"),value:n.secondaryNames[1],onChange:e=>{n.secondaryNames[1]=e,a(t,n)},minW:"full"},{type:"switch",label:s("panel.details.stations.foshanMetroBasic.tram"),oneLine:!0,isChecked:n.tram,onChange:e=>{n.tram=e,a(t,n)},minW:"full"}];return F.jsx(m,{fields:o})},metadata:{displayName:"panel.details.stations.foshanMetroBasic.displayName",cities:[p.Foshan],canvas:[v.RailMap],categories:[b.Metro],tags:[]}},ca={top:3.75,middle:0,bottom:8},fa=s(s({},j),{},{color:[p.Qingdao,"qd1","#f7b000",u.white],nameOffsetX:"right",nameOffsetY:"top",isInt:!1}),ha={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,color:f=fa.color,nameOffsetX:h=fa.nameOffsetX,nameOffsetY:p=fa.nameOffsetY,isInt:u=fa.isInt}=null!==(t=o[c.QingdaoMetroStation])&&void 0!==t?t:fa,g=r.useCallback((e=>l(n,e)),[n,l]),x=r.useCallback((e=>i(n,e)),[n,i]),y=r.useCallback((e=>d(n,e)),[n,d]),[C,b]=u?(O=p,"left"===(v=h)&&"top"===O?[-6,-m[1].split("\n").length*ca[O]-6]:"middle"===v&&"top"===O?[0,-m[1].split("\n").length*ca[O]-10]:"right"===v&&"top"===O?[6,-m[1].split("\n").length*ca[O]-6]:"left"===v&&"bottom"===O?[-6,m[0].split("\n").length*ca[O]+6]:"middle"===v&&"bottom"===O?[0,m[0].split("\n").length*ca[O]+7]:"right"===v&&"bottom"===O?[6,m[0].split("\n").length*ca[O]+6]:"left"===v&&"middle"===O?[-8,2]:"right"===v&&"middle"===O?[8,2]:[0,0]):((e,t)=>{const n="left"===e?-6:"right"===e?6:0;return"top"===t?[n,-m[1].split("\n").length*ca[t]-5.5]:"bottom"===t?[n,m[0].split("\n").length*ca[t]+4]:[n,2]})(h,p);var v,O;const w="left"===h?"end":"right"===h?"start":"middle";return F.jsxs("g",{id:n,transform:`translate(${a}, ${s})`,children:[F.jsx("circle",{id:`stn_core_${n}`,r:u?6:2.7,stroke:u?"black":f[2],strokeWidth:u?1.5:.2,fill:"white",onPointerDown:g,onPointerMove:x,onPointerUp:y,style:{cursor:"move"}}),F.jsxs("g",{transform:`translate(${C}, ${b})`,textAnchor:w,children:[F.jsx(Oe,{text:m[0].split("\n"),fontSize:8,lineHeight:8,grow:"up",baseOffset:1,className:"rmp-name__zh"}),F.jsx(Oe,{text:m[1].split("\n"),fontSize:3.75,lineHeight:3.75,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})},icon:F.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:F.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",strokeWidth:"0.6",fill:"none"})}),defaultAttrs:fa,attrsComponent:e=>{var t,n,a,s;const{id:o,attrs:l,handleAttrsUpdate:r}=e,{t:d}=i(),f=[{type:"textarea",label:d("panel.details.stations.common.nameZh"),value:null!==(t=l.names[0])&&void 0!==t?t:fa.names[0],onChange:e=>{l.names[0]=e.toString(),r(o,l)},minW:"full"},{type:"textarea",label:d("panel.details.stations.common.nameEn"),value:null!==(n=l.names[1])&&void 0!==n?n:fa.names[1],onChange:e=>{l.names[1]=e.toString(),r(o,l)},minW:"full"},{type:"select",label:d("panel.details.stations.common.nameOffsetX"),value:null!==(a=l.nameOffsetX)&&void 0!==a?a:fa.nameOffsetX,options:{left:d("panel.details.stations.common.left"),middle:d("panel.details.stations.common.middle"),right:d("panel.details.stations.common.right")},disabledOptions:"middle"===l.nameOffsetY?["middle"]:[],onChange:e=>{l.nameOffsetX=e,r(o,l)},minW:"full"},{type:"select",label:d("panel.details.stations.common.nameOffsetY"),value:null!==(s=l.nameOffsetY)&&void 0!==s?s:fa.nameOffsetY,options:{top:d("panel.details.stations.common.top"),middle:d("panel.details.stations.common.middle"),bottom:d("panel.details.stations.common.bottom")},disabledOptions:"middle"===l.nameOffsetX?["middle"]:[],onChange:e=>{l.nameOffsetY=e,r(o,l)},minW:"full"},{type:"custom",label:d("color"),component:F.jsx(g,{type:c.QingdaoMetroStation,defaultTheme:fa.color}),minW:"full"},{type:"switch",label:d("panel.details.stations.qingdaoMetro.isInt"),isChecked:l.isInt,oneLine:!0,onChange:e=>{l.isInt=e,r(o,l)},minW:"full"}];return F.jsx(m,{fields:f})},metadata:{displayName:"panel.details.stations.qingdaoMetro.displayName",cities:[p.Qingdao],canvas:[v.RailMap],categories:[b.Metro],tags:[]}},pa=e=>{const{lineCode:t,stationCode:n,color:a,stroke:s}=e,[o,l,i]=[10,15,.8];return F.jsxs(F.Fragment,{children:[s&&F.jsx("rect",{x:-o/2-i,y:-l/2-i,width:o+2*i,height:l+2*i,rx:2.5,strokeWidth:i,stroke:"white",fill:"white"}),F.jsx("rect",{x:-o/2,y:-l/2,width:o,height:l,rx:2,strokeWidth:1.5,stroke:a[2],fill:"white"}),F.jsx("text",{x:0,y:1===t.length?-.75:-1.5,textAnchor:"middle",className:"rmp-name__tokyo_en",fontSize:1===t.length?7:4.5,fill:"black",children:t}),F.jsx("text",{x:1===n.length?0:-.4/n.length,y:5.5,textAnchor:"middle",className:"rmp-name__en",fontSize:7,fontWeight:"bold",letterSpacing:"-0.4",fill:"black",children:n})]})},ua={names:["京橋"],nameOffsetX:"right",nameOffsetY:"middle",textVertical:!1,lineCode:"G",stationCode:"10",color:[p.Tokyo,"g","#f9a328",u.white]},ga={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,nameOffsetX:f=ua.nameOffsetX,nameOffsetY:h=ua.nameOffsetY,textVertical:p=ua.textVertical,lineCode:u=ua.lineCode,stationCode:g=ua.stationCode,color:x=ua.color}=null!==(t=o[c.TokyoMetroBasic])&&void 0!==t?t:ua,y=r.useCallback((e=>l(n,e)),[n,l]),C=r.useCallback((e=>i(n,e)),[n,i]),b=r.useCallback((e=>d(n,e)),[n,d]),[v,O]=r.useState(0);r.useEffect((()=>{let e=0;m[0].split("\n").forEach((t=>{e=Math.max(e,t.length)})),O(e)}),[m[0]]);const w="left"===f?-7:"right"===f?7:0,_="left"===f?-12:"right"===f?12:0,k="bottom"===h?20:"top"===h?-9:5.5,S="bottom"===h?9+5*v:"top"===h?-9-5*v:-5,N="left"===f?"end":"right"===f?"start":"middle";return F.jsxs("g",{id:n,transform:`translate(${a}, ${s})`,children:[F.jsx(pa,{lineCode:u,stationCode:g,color:x}),F.jsx("rect",{id:`stn_core_${n}`,x:-5.8,y:-8.2,width:11.6,height:16.4,rx:2.5,opacity:0,onPointerDown:y,onPointerMove:C,onPointerUp:b,style:{cursor:"move"}}),F.jsx("g",{textAnchor:N,className:"rmp-name-outline",strokeWidth:"1",children:p?F.jsx("g",{transform:`translate(${_}, ${S})`,textAnchor:N,children:F.jsx(Nn,{text:m[0].split("\n"),fontSize:10,lineWidth:10,grow:"bidirectional",baseOffset:0,baseDY:0,className:"rmp-name__jreast_ja",fill:"black"})}):F.jsx("g",{transform:`translate(${w}, ${k})`,textAnchor:N,children:F.jsx(Oe,{text:m[0].split("\n"),fontSize:10,lineHeight:10,grow:"up",funcDX:e=>10*(e-(m[0].split("\n").length-1)/2),className:"rmp-name__jreast_ja",fill:"black"})})})]})},icon:F.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[F.jsx("rect",{x:"6.5",y:"4.5",rx:"1.5",width:"10",height:"15",stroke:"currentColor",fill:"none"}),F.jsx("text",{x:"9",y:"11",fontSize:"7",fill:"currentColor",children:"G"}),F.jsx("text",{x:"7.75",y:"18",fontSize:"7",letterSpacing:"-0.8",fill:"currentColor",children:"10"})]}),defaultAttrs:ua,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:a}=e,{t:s}=i(),o=[{type:"textarea",label:s("panel.details.stations.common.nameJa"),value:n.names[0],onChange:e=>{n.names[0]=e.toString(),a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.tokyoMetroBasic.nameOffset"),value:"middle"!==n.nameOffsetX?n.nameOffsetX:n.nameOffsetY,options:{left:s("panel.details.stations.common.left"),right:s("panel.details.stations.common.right"),top:s("panel.details.stations.common.top"),bottom:s("panel.details.stations.common.bottom")},onChange:e=>{"left"===e||"right"===e?(n.nameOffsetX=e,n.nameOffsetY="middle",n.textVertical=!1):(n.nameOffsetX="middle",n.nameOffsetY=e),a(t,n)},minW:"full"},{type:"switch",label:s("panel.details.stations.tokyoMetroBasic.textVertical"),isChecked:n.textVertical,isDisabled:"middle"!==n.nameOffsetX,onChange:e=>{n.textVertical=e,a(t,n)},oneLine:!0,minW:"full"},{type:"input",label:s("panel.details.stations.common.lineCode"),value:n.lineCode,onChange:e=>{n.lineCode=e,a(t,n)},minW:"full"},{type:"input",label:s("panel.details.stations.common.stationCode"),value:n.stationCode,onChange:e=>{n.stationCode=e,a(t,n)},minW:"full"},{type:"custom",label:s("color"),component:F.jsx(g,{type:c.TokyoMetroBasic,defaultTheme:ua.color}),minW:"full"}];return F.jsx(m,{fields:o})},metadata:{displayName:"panel.details.stations.tokyoMetroBasic.displayName",cities:[p.Tokyo],canvas:[v.RailMap],categories:[b.Metro],tags:[]}},xa={names:["日本橋"],nameOffsetX:"right",nameOffsetY:"middle",mereOffset:"none",textVertical:!1,interchanges:[{lineCode:"G",stationCode:"11",color:[p.Tokyo,"g","#f9a328",u.white]},{lineCode:"T",stationCode:"10",color:[p.Tokyo,"t","#00a4db",u.white]},{lineCode:"A",stationCode:"13",color:[p.Tokyo,"a","#dd4231",u.white]}],align:"horizontal",importance:"default"},ya={lineCode:"",stationCode:"",color:[p.Tokyo,"","#AAAAAA",u.white]},Ca={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,nameOffsetX:f=xa.nameOffsetX,nameOffsetY:h=xa.nameOffsetY,textVertical:p=xa.textVertical,interchanges:u=xa.interchanges,align:g=xa.align,importance:x=xa.importance,mereOffset:y=xa.mereOffset}=null!==(t=o[c.TokyoMetroInt])&&void 0!==t?t:xa,C=r.useCallback((e=>l(n,e)),[n,l]),b=r.useCallback((e=>i(n,e)),[n,i]),v=r.useCallback((e=>d(n,e)),[n,d]),[O,w]=r.useState(0);r.useEffect((()=>{let e=0;m[0].split("\n").forEach((t=>{e=Math.max(e,t.length)})),w(e)}),[m[0]]);const _="horizontal"===g?13*u.length:0,k="vertical"===g?18*u.length:0,S="left"===f?-("horizontal"===g?4:10)-_/2:"right"===f?("horizontal"===g?2:9)+_/2:"left2"===y?-5:"right2"===y?5:0,{fontSize:N,textXVer:z,textY:M,textYVer:A}="default"===x?{fontSize:10,textXVer:("left"===f?-12:"right"===f?12:-2)+("left1"===y?-4:"left2"===y?-10:"right1"===y?4:"right2"===y?10:0),textY:"bottom"===h?("vertical"===g?1:10)+k/2:"top"===h?-("vertical"===g?3:12)-k/2:("up"===y?3:"down"===y?10:0)-7.5,textYVer:"bottom"===h?("vertical"===g?3:12)+k/2+5*O:"top"===h?-("vertical"===g?1:13)-k/2-5*O:-5}:"high"===x?{fontSize:20,textXVer:("left"===f?-12:"right"===f?12:-2)+("left1"===y?-10:"left2"===y?-16:"right1"===y?10:"right2"===y?16:0),textY:"bottom"===h?("vertical"===g?3:10)+k/2:"top"===h?-("vertical"===g?1:13)-k/2:("up"===y?6:"down"===y?15:0)-13,textYVer:"bottom"===h?("vertical"===g?4:13)+k/2+10*O:"top"===h?-("vertical"===g?5:13)-k/2-10*O:-5}:{fontSize:15,textXVer:("left"===f?-12:"right"===f?12:-2)+("left1"===y?-8:"left2"===y?-13:"right1"===y?8:"right2"===y?13:0),textY:"bottom"===h?("vertical"===g?1:10)+k/2:"top"===h?-("vertical"===g?3:13)-k/2:("up"===y?4:"down"===y?12:0)-10,textYVer:"bottom"===h?("vertical"===g?3:13)+k/2+7.5*O:"top"===h?-("vertical"===g?4:13)-k/2-7.5*O:-5},P="left"===f||"left1"===y||"left2"===y?"end":"right"===f||"right1"===y||"right2"===y?"start":"middle";return F.jsxs("g",{id:n,transform:`translate(${a}, ${s})`,children:["horizontal"===g?F.jsxs(F.Fragment,{children:[F.jsx("rect",{x:-(_+3)/2,y:-10.5,width:_+3,height:21,rx:3,fill:"#808285",stroke:"black",strokeWidth:"0.5"}),u.map(((e,t)=>F.jsx("g",{transform:`translate(${13*t-(_-13)/2}, 0)`,children:F.jsx(pa,{lineCode:e.lineCode,stationCode:e.stationCode,color:e.color,stroke:!0})},t))),F.jsx("rect",{id:`stn_core_${n}`,x:-(_+3)/2,y:-10.5,width:_+3,height:21,rx:3,opacity:0,onPointerDown:C,onPointerMove:b,onPointerUp:v,style:{cursor:"move"}})]}):F.jsxs(F.Fragment,{children:[F.jsx("rect",{x:-8,y:-(k+3)/2,width:16,height:k+3,rx:3,fill:"#808285",stroke:"black",strokeWidth:"0.5"}),u.map(((e,t)=>F.jsx("g",{transform:`translate(0, ${18*t-(k-18)/2})`,children:F.jsx(pa,{lineCode:e.lineCode,stationCode:e.stationCode,color:e.color,stroke:!0})},t))),F.jsx("rect",{id:`stn_core_${n}`,x:-8,y:-(k+3)/2,width:16,height:k+3,rx:3,opacity:0,onPointerDown:C,onPointerMove:b,onPointerUp:v,style:{cursor:"move"}})]}),F.jsx("g",{textAnchor:P,className:"rmp-name-outline",strokeWidth:"1",children:p?F.jsx("g",{transform:`translate(${z}, ${A})`,textAnchor:"middle",children:F.jsx(Nn,{text:m[0].split("\n"),fontSize:N,lineWidth:N,grow:"bidirectional",className:"rmp-name__jreast_ja",fill:"black",fontWeight:"default"!==x?"bold":"normal"})}):F.jsx("g",{transform:`translate(${S}, ${M})`,textAnchor:P,children:F.jsx(Oe,{text:m[0].split("\n"),fontSize:N,lineHeight:N,grow:"top"===h||"up"===y?"up":"down",className:"rmp-name__jreast_ja",fill:"black",fontWeight:"default"!==x?"bold":"normal"})})})]})},icon:F.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[F.jsx("rect",{x:"4",y:"8",rx:"1",width:"6.5",height:"10",stroke:"currentColor",fill:"none"}),F.jsx("rect",{x:"12.5",y:"8",rx:"1",width:"6.5",height:"10",stroke:"currentColor",fill:"none"}),F.jsx("text",{x:"5.5",y:"12.5",fontSize:"4",fill:"currentColor",children:"G"}),F.jsx("text",{x:"5",y:"16.25",fontSize:"4",letterSpacing:"-0.8",fill:"currentColor",children:"16"}),F.jsx("text",{x:"14.25",y:"12.5",fontSize:"4",fill:"currentColor",children:"H"}),F.jsx("text",{x:"13.75",y:"16.25",fontSize:"4",letterSpacing:"-0.8",fill:"currentColor",children:"18"})]}),defaultAttrs:xa,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:a}=e,o=O(),{paletteAppClip:{output:l}}=w((e=>e.runtime)),{t:d}=i(),c=[{type:"textarea",label:d("panel.details.stations.common.nameJa"),value:n.names[0],onChange:e=>{n.names[0]=e.toString(),a(t,n)},minW:"full"},{type:"select",label:d("panel.details.stations.tokyoMetroBasic.nameOffset"),value:"middle"!==n.nameOffsetX?n.nameOffsetX:n.nameOffsetY,options:{left:d("panel.details.stations.common.left"),right:d("panel.details.stations.common.right"),top:d("panel.details.stations.common.top"),bottom:d("panel.details.stations.common.bottom")},onChange:e=>{"left"===e||"right"===e?(n.nameOffsetX=e,n.nameOffsetY="middle",n.textVertical=!1,"left1"!==n.mereOffset&&"left2"!==n.mereOffset&&"right1"!==n.mereOffset&&"right2"!==n.mereOffset||(n.mereOffset="none")):(n.nameOffsetX="middle",n.nameOffsetY=e,"up"!==n.mereOffset&&"down"!==n.mereOffset||(n.mereOffset="none")),a(t,n)},minW:"full"},{type:"select",label:d("panel.details.stations.tokyoMetroInt.mereOffset.displayName"),value:n.mereOffset,options:s({none:d("panel.details.stations.tokyoMetroInt.mereOffset.none")},"middle"===n.nameOffsetX?{left1:d("panel.details.stations.tokyoMetroInt.mereOffset.left1"),left2:d("panel.details.stations.tokyoMetroInt.mereOffset.left2"),right1:d("panel.details.stations.tokyoMetroInt.mereOffset.right1"),right2:d("panel.details.stations.tokyoMetroInt.mereOffset.right2")}:{up:d("panel.details.stations.tokyoMetroInt.mereOffset.up"),down:d("panel.details.stations.tokyoMetroInt.mereOffset.down")}),onChange:e=>{n.mereOffset=e,a(t,n)},minW:"full"},{type:"switch",label:d("panel.details.stations.tokyoMetroBasic.textVertical"),isChecked:n.textVertical,isDisabled:"middle"!==n.nameOffsetX,onChange:e=>{n.textVertical=e,a(t,n)},oneLine:!0,minW:"full"},{type:"select",label:d("panel.details.stations.tokyoMetroInt.importance.displayName"),value:n.importance,options:{default:d("panel.details.stations.tokyoMetroInt.importance.default"),middle:d("panel.details.stations.tokyoMetroInt.importance.middle"),high:d("panel.details.stations.tokyoMetroInt.importance.high")},onChange:e=>{n.importance=e,a(t,n)},minW:"full"},{type:"select",label:d("panel.details.stations.tokyoMetroInt.align.displayName"),value:n.align,options:{horizontal:d("panel.details.stations.tokyoMetroInt.align.horizontal"),vertical:d("panel.details.stations.tokyoMetroInt.align.vertical")},onChange:e=>{n.align=e,a(t,n)},minW:"full"}],[f,h]=r.useState(void 0);r.useEffect((()=>{void 0!==f&&l&&(n.interchanges[f].color=l,a(t,n),h(void 0))}),[null==l?void 0:l.toString()]);const p=e=>{const o=structuredClone(n.interchanges);o.push(ya);for(let t=o.length-1;t>e;t--)o[t]=structuredClone(o[t-1]);o[e]=ya,a(t,s(s({},n),{},{interchanges:o}))};return F.jsxs(F.Fragment,{children:[F.jsx(m,{fields:c}),F.jsx(S,{label:d("panel.details.stations.interchange.title"),children:F.jsxs(Q,{align:"flex-start",children:[n.interchanges.map(((e,l)=>F.jsxs(V,{children:[F.jsx(N,{theme:e.color,onClick:()=>{h(l),o(z(e.color))}}),F.jsx(S,{label:d("panel.details.stations.common.lineCode"),children:F.jsx(E,{defaultValue:e.lineCode,onDebouncedChange:e=>((e,s)=>{n.interchanges[s].lineCode=e,a(t,n)})(e,l)})}),F.jsx(S,{label:d("panel.details.stations.common.stationCode"),children:F.jsx(E,{defaultValue:e.stationCode,onDebouncedChange:e=>((e,s)=>{n.interchanges[s].stationCode=e,a(t,n)})(e,l)})}),F.jsx(Z,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),icon:F.jsx(k,{}),onClick:()=>p(l)}),F.jsx(Z,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),icon:F.jsx(A,{}),onClick:()=>(e=>{const o=n.interchanges.filter(((t,n)=>n!==e));a(t,s(s({},n),{},{interchanges:o}))})(l),isDisabled:1===n.interchanges.length})]},l))),F.jsx(K,{size:"sm",width:"100%",variant:"outline",leftIcon:F.jsx(k,{}),onClick:()=>p(n.interchanges.length),children:d("panel.details.stations.interchange.title")})]})})]})},metadata:{displayName:"panel.details.stations.tokyoMetroInt.displayName",cities:[p.Tokyo],canvas:[v.RailMap],categories:[b.Metro],tags:[]}},ba={0:{textDx:0,textDy:-9.15,textAnchor:"middle",dominantBaseline:"auto",polarity:-1,grow:"up"},45:{textDx:9.15*Math.SQRT1_2,textDy:-9.15*Math.SQRT1_2,textAnchor:"start",dominantBaseline:"auto",polarity:-1,grow:"up"},90:{textDx:9.15,textDy:0,textAnchor:"start",dominantBaseline:"middle",polarity:0,grow:"bidirectional"},135:{textDx:9.15*Math.SQRT1_2,textDy:9.15*Math.SQRT1_2,textAnchor:"start",dominantBaseline:"hanging",polarity:1,grow:"down"},180:{textDx:0,textDy:9.15,textAnchor:"middle",dominantBaseline:"hanging",polarity:1,grow:"down"},225:{textDx:-9.15*Math.SQRT1_2,textDy:9.15*Math.SQRT1_2,textAnchor:"end",dominantBaseline:"hanging",polarity:1,grow:"down"},270:{textDx:-9.15,textDy:0,textAnchor:"end",dominantBaseline:"middle",polarity:0,grow:"bidirectional"},315:{textDx:-9.15*Math.SQRT1_2,textDy:-9.15*Math.SQRT1_2,textAnchor:"end",dominantBaseline:"auto",polarity:-1,grow:"up"}},va=[p.London,"central","#DC241F",u.white,0],ja=r.memo((e=>{const{id:t,stepFreeAccess:a}=e,o=l(e,n);return F.jsxs("g",s(s({},o),{},{children:[F.jsx("path",{fill:"train"===a?"#1C3E93":"white",stroke:"#1C3E93",strokeWidth:2.5,d:"M0-31c17.1,0,31,13.9,31,31S17.1,31,0,31S-31,17.1-31,0S-17.1-31,0-31"}),F.jsx("path",{fill:"train"===a?"white":"#1C3E93",d:"M-10.5,9c1.4,4.9,6,8.4,11.3,8.4c6.5,0,11.8-5.3,11.8-11.8c0-3.4-1.5-6.5-3.8-8.7l0.7-5.1\n\tc4.6,2.9,7.6,8,7.6,13.8c0,9-7.3,16.3-16.3,16.3c-5.9,0-11-3.1-13.9-7.7L-10.5,9z"}),F.jsx("path",{fill:"train"===e.stepFreeAccess?"white":"#1C3E93",d:"M0.5-20.5c0,2.5,2,4.6,4.6,4.6c2.5,0,4.6-2.1,4.6-4.6s-2.1-4.6-4.6-4.6S0.5-23,0.5-20.5"}),F.jsx("path",{fill:"train"===a?"white":"#1C3E93",d:"M3-12.4L2.5-9.2h-9.9c0,0-2.1,0.2-2.1,2.2s2.1,2.2,2.1,2.2h9.3l-0.5,3h-12.5c0,0-0.9,0-1.3,0.5\n\tC-12.8-1-13.2,0-13.2,0l-7,14.2c0,0-0.8,1.8,1.2,2.9c2,1.1,3.3-1,3.3-1l5.5-11.3c0,0,0.5-0.7,1-1c0.6-0.3,1.1-0.3,1.1-0.3H3.4\n\tc0,0,1.2,0,2.2-0.9c0.9-0.9,1.1-2,1.1-2l1.7-12.4c0,0,0-2.6-2.7-2.7C3.6-14.5,3-12.4,3-12.4"}),F.jsx("path",{id:`stn_core_${t}`,fill:"train"===a?"#1C3E93":"white",fillOpacity:"0",stroke:"#1C3E93",strokeWidth:2.5,strokeOpacity:"0",d:"M0-31c17.1,0,31,13.9,31,31S17.1,31,0,31S-31,17.1-31,0S-17.1-31,0-31",className:"removeMe"})]}))}),((e,t)=>JSON.stringify(e)===JSON.stringify(t))),Oa={names:["Station"],transfer:[[va]],rotate:0,terminal:!1,stepFreeAccess:"none"},wa={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,transfer:f=Oa.transfer,rotate:h=Oa.rotate,terminal:p=Oa.terminal,stepFreeAccess:u=Oa.stepFreeAccess}=null!==(t=o[c.LondonTubeBasic])&&void 0!==t?t:Oa,g=r.useCallback((e=>l(n,e)),[n,l]),x=r.useCallback((e=>i(n,e)),[n,i]),y=r.useCallback((e=>d(n,e)),[n,d]),C=(h-90)*Math.PI/180,b=p?2*(.66*5+2.5):.66*5+.5,v=ba[h].textDx+Math.cos(C)*Math.max(...f[0].map((e=>e[4])))*5,O=ba[h].textDy+Math.sin(C)*Math.max(...f[0].map((e=>e[4])))*5,w=-(Math.max(...f[0].map((e=>e[4])))+Math.min(...f[0].map((e=>e[4]))))/2*5,_=Math.sin(h*Math.PI/180)*w,k=Math.cos(h*Math.PI/180)*w;return F.jsxs("g",{id:n,children:[F.jsx("g",{transform:`translate(${a}, ${s})rotate(${h})`,onPointerDown:g,onPointerMove:x,onPointerUp:y,style:{cursor:"move"},children:"none"===u?f[0].map((e=>F.jsx("rect",{id:`stn_core_${n}`,x:.66*-5/2,y:.66*-5-2.5-5*e[4],width:5*.66,height:b,stroke:"none",fill:e[2]},`${n}_${e[2]}_${e[4]}`))):F.jsx(ja,{id:n,stepFreeAccess:u,transform:`translate(${_},${k})rotate(${-h})scale(0.2333)`},`stn_core_${n}`)}),F.jsx("g",{transform:`translate(${a+v}, ${s+O})`,textAnchor:ba[h].textAnchor,fill:"#003888",children:F.jsx(Oe,{text:m[0].split("\n"),fontSize:10,lineHeight:8.5,dominantBaseline:ba[h].dominantBaseline,grow:ba[h].grow,baseOffset:0,className:"rmp-name__tube"})})]})},icon:F.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:F.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),defaultAttrs:Oa,attrsComponent:e=>{var t;const{id:n,attrs:a,handleAttrsUpdate:s}=e,{t:o}=i(),l=[{type:"textarea",label:o("panel.details.stations.common.nameEn"),value:a.names[0],onChange:e=>{a.names[0]=e.toString(),s(n,a)},minW:"full"},{type:"select",label:o("panel.details.stations.common.rotate"),value:a.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{a.rotate=Number(e),s(n,a)},minW:"full"},{type:"switch",label:o("panel.details.stations.londonTubeBasic.terminal"),isChecked:a.terminal,isDisabled:a.transfer[0].length>1,onChange:e=>{a.terminal=e,s(n,a)},oneLine:!0,minW:"full"},{type:"select",label:o("panel.details.stations.londonTubeCommon.stepFreeAccess"),value:a.stepFreeAccess,options:{none:o("panel.details.stations.londonTubeCommon.stepFreeAccessNone"),train:o("panel.details.stations.londonTubeCommon.stepFreeAccessTrain"),platform:o("panel.details.stations.londonTubeCommon.stepFreeAccessPlatform")},onChange:e=>{a.stepFreeAccess=e,s(n,a)},minW:"full"}],r=null!==(t=a.transfer)&&void 0!==t?t:Oa.transfer;return F.jsxs(F.Fragment,{children:[F.jsx(m,{fields:l}),F.jsx(S,{label:o("panel.details.stations.interchange.title"),children:F.jsxs(Q,{align:"flex-start",children:[F.jsx(J,{size:"xs",children:o("panel.details.stations.londonTubeBasic.shareTracks")}),F.jsx(_a,{interchangeList:r[0],onAdd:(d=0,e=>{const t=structuredClone(r);if(t.length<=d)for(let n=t.length;n<=d;n++)t[n]=[va];t[d].push(e),a.transfer=t,s(n,a)}),onDelete:(e=>t=>{if(r.length>e&&r[e].length>t){const o=r.map(((n,a)=>a===e?n.filter(((e,n)=>n!==t)):n));a.transfer=o,s(n,a)}})(0),onUpdate:(e=>(t,o)=>{if(r.length>e&&r[e].length>t){const l=r.map(((n,a)=>a===e?n.map(((e,n)=>n===t?[0,1,2,3,4,5,6].map((t=>void 0===o[t]?e[t]:o[t])):e)):n));a.transfer=l,s(n,a)}})(0)})]})})]});var d},metadata:{displayName:"panel.details.stations.londonTubeBasic.displayName",cities:[p.London],canvas:[v.RailMap],categories:[b.Metro],tags:[]}};function _a(e){const{interchangeList:t,onAdd:n,onDelete:a,onUpdate:s}=e,o=O(),{paletteAppClip:{output:l}}=w((e=>e.runtime)),{t:d}=i(),[m,c]=r.useState();return r.useEffect((()=>{void 0!==m&&l&&(null==s||s(m,[...l,t[m][4]]),c(void 0))}),[null==l?void 0:l.toString()]),F.jsxs(_,{direction:"column",children:[0===t.length&&F.jsxs(V,{spacing:.5,"data-testid":"interchange-card-stack",children:[F.jsx(G,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:d("panel.details.stations.interchange.noTrackShare")}),F.jsx(Z,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),onClick:()=>null==n?void 0:n(va),icon:F.jsx(k,{})})]}),t.map(((e,l)=>F.jsxs(V,{spacing:.5,"data-testid":`interchange-card-stack-${l}`,children:[F.jsx(S,{label:d("color"),minW:"40px",noLabel:0!==l,children:F.jsx(N,{theme:[e[0],e[1],e[2],e[3]],onClick:()=>{c(l),o(z([e[0],e[1],e[2],e[3]]))}})}),F.jsx(S,{label:d("panel.details.stations.londonTubeBasic.shareTracksIndex"),children:F.jsx(X,{defaultValue:e[4],min:-5,max:5,step:1,onThrottledChange:t=>null==s?void 0:s(l,[e[0],e[1],e[2],e[3],t])})}),F.jsxs(Q,{children:[n&&l===t.length-1?F.jsx(Z,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.copy"),onClick:()=>{const e=structuredClone(t.slice(-1)[0]);e[4]=Math.max(...t.map((e=>e[4])))+1,null==n||n(e)},icon:F.jsx(M,{})}):F.jsx(q,{minW:8}),a&&0!==l&&F.jsx(Z,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.remove"),onClick:()=>null==a?void 0:a(l),icon:F.jsx(A,{})})]})]},l)))]})}const ka={names:["Station"],nameOffsetX:"right",nameOffsetY:"top",stepFreeAccess:"none"},Sa={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,nameOffsetX:f=ka.nameOffsetX,nameOffsetY:h=ka.nameOffsetY,stepFreeAccess:p=ka.stepFreeAccess}=null!==(t=o[c.LondonTubeInt])&&void 0!==t?t:ka,u=r.useCallback((e=>l(n,e)),[n,l]),g=r.useCallback((e=>i(n,e)),[n,i]),x=r.useCallback((e=>d(n,e)),[n,d]),y="left"===f?-9.15:"right"===f?9.15:0,C="top"===h?-9.15:"bottom"===h?9.15:0,b="left"===f?"end":"right"===f?"start":"middle",v="top"===h?"auto":"bottom"===h?"hanging":"middle";return F.jsxs("g",{id:n,children:[F.jsx("g",{transform:`translate(${a}, ${s})`,onPointerDown:u,onPointerMove:g,onPointerUp:x,style:{cursor:"move"},children:"none"===p?F.jsx("circle",{id:`stn_core_${n}`,r:6.25,width:5*.66,height:5.800000000000001,stroke:"black",strokeWidth:2.5,fill:"white"}):F.jsx(ja,{id:n,stepFreeAccess:p,transform:"scale(0.2333)"})}),F.jsx("g",{transform:`translate(${a+y}, ${s+C})`,textAnchor:b,fill:"#003888",children:F.jsx(Oe,{text:m[0].split("\n"),fontSize:10,lineHeight:8.5,dominantBaseline:v,grow:"top"===h?"up":"bottom"===h?"down":"bidirectional",baseOffset:1,className:"rmp-name__tube"})})]})},icon:F.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:F.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",strokeWidth:"2.5",fill:"white"})}),defaultAttrs:ka,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:a}=e,{t:s}=i(),o=[{type:"textarea",label:s("panel.details.stations.common.nameEn"),value:n.names[0],onChange:e=>{n.names[0]=e.toString(),a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:s("panel.details.stations.common.left"),middle:s("panel.details.stations.common.middle"),right:s("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:s("panel.details.stations.common.top"),middle:s("panel.details.stations.common.middle"),bottom:s("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.londonTubeCommon.stepFreeAccess"),value:n.stepFreeAccess,options:{none:s("panel.details.stations.londonTubeCommon.stepFreeAccessNone"),train:s("panel.details.stations.londonTubeCommon.stepFreeAccessTrain"),platform:s("panel.details.stations.londonTubeCommon.stepFreeAccessPlatform")},onChange:e=>{n.stepFreeAccess=e,a(t,n)},minW:"full"}];return F.jsx(m,{fields:o})},metadata:{displayName:"panel.details.stations.londonTubeInt.displayName",cities:[p.London],canvas:[v.RailMap],categories:[b.Metro],tags:[]}},Na="M-18.2,12.6c2.4-0.6,5.8-1.6,11.5-0.4c2.9,0.6,5.6,1.3,8.3,1.3c3.5,0,5.4-0.6,8.1-1.2c2.4-0.6,5.2-1.2,7.4-1.1c3.8,0.1,6.6,0.7,8.2,1.4l-1.2-3.1C21,8.3,15.8,7.7,9.7,9.5c-2.6,0.7-5.2,1.3-7.9,1.2c-2.5,0-4.8-0.4-7.2-1C-13,8-15.9,9.3-19.8,10.3L-18.2,12.6z",za="M23.8-2h-4.1l-1.8-4.8c0,0-0.1-0.6-1-1.3c-0.6-0.5-1.6-0.5-1.6-0.5H4v-2h-6.9l-1.1-1.5l0.8-1.9h-1.9l-1.5,3.5h-2.6v2h-5.8c0,0-0.8,0.1-1.2,0.3c-0.4,0.3-0.6,0.5-0.6,0.5l-4.4,5.8h-7.3l7.3,10c1.6-0.7,6.6-2,9.7-1.9c4.1,0.1,9.5,1.9,13.1,1.9c6.6,0,8.8-2,14.6-2.3c7.1-0.4,11.6,2.3,11.6,2.3L23.8-2z M-11.1-2h-7.1l1.9-2.5c0,0,0.8-1.1,1.2-1.3c0.7-0.4,1.2-0.5,1.2-0.5h2.8V-2z M-9.2-2v-4.3h7.4v4.4L-9.2-2z M7.4-2H0v-4.3h7.4V-2z M9.3-2v-4.3h5.1c0,0,0.4,0,0.8,0.4c0.3,0.2,0.5,0.7,0.5,0.7l1.2,3.3L9.3-2z",Ma={names:["Station"],nameOffsetX:"right",nameOffsetY:"top"},Aa={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,nameOffsetX:f=Ma.nameOffsetX,nameOffsetY:h=Ma.nameOffsetY}=null!==(t=o[c.LondonRiverServicesInt])&&void 0!==t?t:Ma,p=r.useCallback((e=>l(n,e)),[n,l]),u=r.useCallback((e=>i(n,e)),[n,i]),g=r.useCallback((e=>d(n,e)),[n,d]),x="left"===f?-9.15:"right"===f?9.15:0,y="top"===h?-9.15:"bottom"===h?9.15:0,C="left"===f?"end":"right"===f?"start":"middle",b="top"===h?"auto":"bottom"===h?"hanging":"middle";return F.jsxs("g",{id:n,children:[F.jsxs("g",{transform:`translate(${a}, ${s})`,onPointerDown:p,onPointerMove:u,onPointerUp:g,style:{cursor:"move"},children:[F.jsx("circle",{r:7.25,stroke:"#003888",strokeWidth:.5,fill:"white"}),F.jsxs("g",{fill:"#003888",transform:"scale(0.222)",children:[F.jsx("path",{d:Na}),F.jsx("path",{d:za})]}),F.jsx("circle",{id:`stn_core_${n}`,r:7.5,fill:"white",fillOpacity:"0",className:"removeMe"})]}),F.jsx("g",{transform:`translate(${a+x}, ${s+y})`,textAnchor:C,fill:"#003888",children:F.jsx(Oe,{text:m[0].split("\n"),fontSize:10,lineHeight:8.5,dominantBaseline:b,grow:"top"===h?"up":"bottom"===h?"down":"bidirectional",baseOffset:1,className:"rmp-name__tube"})})]})},icon:F.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[F.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"white"}),F.jsxs("g",{transform:"translate(12, 12)scale(0.18)",children:[F.jsx("path",{stroke:"currentColor",d:Na}),F.jsx("path",{stroke:"currentColor",d:za})]})]}),defaultAttrs:Ma,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:a}=e,{t:s}=i(),o=[{type:"textarea",label:s("panel.details.stations.common.nameEn"),value:n.names[0],onChange:e=>{n.names[0]=e.toString(),a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:s("panel.details.stations.common.left"),middle:s("panel.details.stations.common.middle"),right:s("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:s("panel.details.stations.common.top"),middle:s("panel.details.stations.common.middle"),bottom:s("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,a(t,n)},minW:"full"}];return F.jsx(m,{fields:o})},metadata:{displayName:"panel.details.stations.londonRiverServicesInt.displayName",cities:[p.London],canvas:[v.RailMap],categories:[b.Metro],tags:[]}},Pa=s(s({},j),{},{nameOffsetX:"right",nameOffsetY:"top",interchange:!1}),Ba={component:e=>{var t;const{id:n,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:d}=e,{names:m=j.names,nameOffsetX:f=Pa.nameOffsetX,nameOffsetY:h=Pa.nameOffsetY,interchange:p=Pa.interchange}=null!==(t=o[c.GuangdongIntercityRailway])&&void 0!==t?t:Pa,u=r.useCallback((e=>l(n,e)),[n,l]),g=r.useCallback((e=>i(n,e)),[n,i]),x=r.useCallback((e=>d(n,e)),[n,d]),y="left"===f?-13.33:"right"===f?13.33:0,C=(m[we[h].namesPos].split("\n").length*$e[h].lineHeight+$e[h].offset)*we[h].polarity,b="left"===f?"end":"right"===f?"start":"middle";return r.useMemo((()=>F.jsxs("g",{id:n,transform:`translate(${a}, ${s})`,children:[F.jsx("circle",{r:5,stroke:"#2559a8",strokeWidth:"1.5",fill:"white"}),p&&F.jsx("circle",{r:2.5,stroke:"#2559a8",strokeWidth:"1",fill:"white"}),F.jsx("circle",{id:`stn_core_${n}`,r:5.665,fill:"white",fillOpacity:"0",onPointerDown:u,onPointerMove:g,onPointerUp:x,style:{cursor:"move"},className:"removeMe"}),F.jsxs("g",{transform:`translate(${y}, ${C})`,textAnchor:b,className:"rmp-name-outline",strokeWidth:"1",children:[F.jsx(Oe,{text:m[0].split("\n"),fontSize:13.13,lineHeight:13.13,grow:"up",baseOffset:1,className:"rmp-name__zh"}),F.jsx(Oe,{text:m[1].split("\n"),dx:"right"===f?1.67:0,fontSize:5.83,lineHeight:5.83,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[n,a,s,...m,f,h,p,u,g,x])},icon:F.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[F.jsx("circle",{cx:"12",cy:"12",r:"8",stroke:"currentColor",strokeWidth:"2.25",fill:"white"}),F.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"1.5",fill:"white"})]}),defaultAttrs:Pa,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:a}=e,{t:s}=i(),o=[{type:"textarea",label:s("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e.toString(),a(t,n)},minW:"full"},{type:"textarea",label:s("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e.toString(),a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:s("panel.details.stations.common.left"),middle:s("panel.details.stations.common.middle"),right:s("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,a(t,n)},minW:"full"},{type:"select",label:s("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:s("panel.details.stations.common.top"),middle:s("panel.details.stations.common.middle"),bottom:s("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,a(t,n)},minW:"full"},{type:"switch",label:s("panel.details.stations.interchange.title"),oneLine:!0,isChecked:n.interchange,onChange:e=>{n.interchange=e,a(t,n)},minW:"full"}];return F.jsx(m,{fields:o})},metadata:{displayName:"panel.details.stations.guangdongIntercityRailway.displayName",cities:[p.Shanghai],canvas:[v.RailMap],categories:[b.Metro],tags:[]}},$a=(a("s",{[c.ShmetroBasic]:Ee,[c.ShmetroBasic2020]:Re,[c.ShmetroInt]:Te,[c.ShmetroOutOfSystemInt]:He,[c.ShanghaiSuburbanRailway]:Fe,[c.GzmtrBasic]:tn,[c.GzmtrInt]:ln,[c.GzmtrInt2024]:hn,[c.BjsubwayBasic]:xn,[c.BjsubwayInt]:vn,[c.MTR]:Sn,[c.SuzhouRTBasic]:Bn,[c.SuzhouRTInt]:Yn,[c.KunmingRTBasic]:Ln,[c.KunmingRTInt]:Fn,[c.MRTBasic]:Qn,[c.MRTInt]:ea,[c.JREastBasic]:sa,[c.JREastImportant]:ra,[c.FoshanMetroBasic]:ma,[c.QingdaoMetroStation]:ha,[c.TokyoMetroBasic]:ga,[c.TokyoMetroInt]:Ca,[c.LondonTubeBasic]:wa,[c.LondonTubeInt]:Sa,[c.LondonRiverServicesInt]:Aa,[c.GuangdongIntercityRailway]:Ba}),new BroadcastChannel("RMP_MASTER_CHANNEL")),Wa={id:"null",value:"",param:null,bg:"#000000",fg:u.white},Ea={h:"80%",w:"80%","& iframe":{h:"100%",w:"100%"},"& div":{h:"100%",w:"100%"}},Xa=a("k",(e=>{const{isOpen:t,onClose:n,onSubmit:a}=e,{t:s}=i(),o=r.useRef(window.graph),l=se(),[d,m]=r.useState([]),[c,f]=r.useState(Wa),[h,p]=r.useState(""),[u,g]=r.useState(!1),[x,y]=r.useState(!1);r.useEffect((()=>{t&&(p(""),f(Wa),g(!1),m(Ne(o.current).filter((e=>e.randomId)).map((e=>{var t,n,a;return{id:e.randomId,value:null!==(t=e.label)&&void 0!==t?t:e.randomId,param:e,bg:null!==(n=e.labelColorBg)&&void 0!==n?n:Wa.bg,fg:null!==(a=e.labelColorFg)&&void 0!==a?a:Wa.fg}}))))}),[t]);const C=e=>{try{var t,s,o,i,r;const n=null!==(t=c.param)&&void 0!==t?t:JSON.parse(e),d=n.id?n.id:n.randomId,m=null!==(s=n.labelColorBg)&&void 0!==s?s:I(),f={randomId:d,label:null!==(o=n.label)&&void 0!==o?o:d,labelColorBg:m,labelColorFg:T(m),nodeType:null!==(i=n.nodeType)&&void 0!==i?i:n.type,transform:null!==(r=n.transform)&&void 0!==r?r:L,svgs:n.svgs,components:n.components,color:n.color,core:n.core,version:n.version};if(!f.version||f.version<2)return void l({title:"Outdated configuration!",status:"error",duration:9e3,isClosable:!0});a(f)}catch(d){return void y(!0)}n()},b=r.useRef(t),[v,j]=r.useState("DESIGNER"),[O,w]=r.useState(!1);r.useEffect((()=>{b.current=t}),[t]),r.useEffect((()=>{const e=e=>{const{event:t,data:n}=e.data;"MASTER_POST"===t&&b.current&&(w(!1),C(n))};return $a.addEventListener("message",e),()=>{$a.removeEventListener("message",e)}}),[]);return F.jsxs(F.Fragment,{children:[F.jsxs(oe,{isOpen:t,onClose:n,size:"sm",scrollBehavior:"inside",children:[F.jsx(le,{}),F.jsxs(ie,{children:[F.jsx(re,{children:s("header.settings.procedures.masterManager.importTitle")}),F.jsx(de,{}),F.jsxs(me,{children:[F.jsx(S,{label:s("header.settings.procedures.masterManager.importFrom"),children:F.jsx(Y,{data:d,displayHandler:e=>F.jsx(R,{name:e.value,fg:e.fg,bg:e.bg,title:e.value,sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}}),filter:(e,t)=>t.id.toLowerCase().includes(e.toLowerCase())||Object.values(t.id).some((t=>t.toLowerCase().includes(e.toLowerCase()))),value:c.value,onChange:e=>{f(e),g(!1),p("")}})}),F.jsxs(S,{label:s("header.settings.procedures.masterManager.importOther"),children:[F.jsxs(te,{direction:"row",width:"100%",children:[F.jsx(K,{m:1,width:"100%",onClick:async()=>{j("DESIGNER"),w(!0)},children:s("RMP Designer")}),F.jsx(K,{m:1,width:"100%",onClick:()=>{j("GALLERY"),w(!0)},children:s("RMP Gallery")})]}),F.jsx(K,{m:1,onClick:()=>g(!0),children:s("header.settings.procedures.masterManager.importParam")}),F.jsx(ce,{width:"100%",placeholder:"qwq",fontSize:"sm",fontFamily:"monospace",hidden:!u,onChange:e=>{y(!1),p(e.target.value),f(Wa)},isInvalid:x})]})]}),F.jsxs(fe,{children:[F.jsx(K,{colorScheme:"blue",variant:"outline",mr:"1",onClick:n,children:s("cancel")}),F.jsx(K,{colorScheme:"blue",variant:"solid",mr:"1",onClick:()=>C(h),isDisabled:"null"===c.id&&""===h,children:s("apply")})]})]})]}),F.jsx(Ya,{isOpen:O,onClose:()=>w(!1),source:v})]})})),Ya=e=>{const{isOpen:t,onClose:n,source:a}=e,s="DESIGNER"===a?"/rmp-designer/#/export":"/rmp-gallery/?tabId=2&master=true";return F.jsxs(D,{isOpen:t,onClose:n,size:"full",sx:Ea,children:[F.jsx("iframe",{src:s,loading:"lazy"}),F.jsx(he,{onClick:n,position:"fixed",top:"5px",right:"15px"})]})};a("M",(e=>{const{isOpen:t,onClose:n}=e,{t:a}=i(),{refresh:{nodes:o}}=w((e=>e.runtime)),l=r.useRef(window.graph),d=O(),[c,h]=r.useState([]);r.useEffect((()=>{t&&h(Ne(l.current))}),[t,o]);const[p,g]=r.useState(void 0),x=c.map((e=>{var t,n,o,i,r;const c=[{label:a("header.settings.procedures.masterManager.id"),type:"custom",component:F.jsx(R,{name:null!==(t=e.randomId)&&void 0!==t?t:"undefined",fg:null!==(n=e.labelColorFg)&&void 0!==n?n:u.white,bg:null!==(o=e.labelColorBg)&&void 0!==o?o:"#000000"})},{label:a("header.settings.procedures.masterManager.label"),type:"input",value:null!==(i=e.label)&&void 0!==i?i:a("panel.details.nodes.master.undefined"),onChange:t=>{return n=e,a=t,l.current.filterNodes((e=>l.current.getNodeAttribute(e,"type")===f.Master&&l.current.getNodeAttributes(e)[f.Master].randomId===n.randomId)).forEach((e=>{l.current.mergeNodeAttributes(e,{[f.Master]:s(s({},n),{},{label:a})})})),d($()),void d(W(l.current.export()));var n,a},hidden:!e.randomId},{label:a("header.settings.procedures.masterManager.label"),type:"output",value:null!==(r=e.label)&&void 0!==r?r:a("panel.details.nodes.master.undefined"),hidden:!!e.randomId},{label:a("header.settings.procedures.masterManager.type"),type:"custom",component:F.jsx(R,{name:a(`header.settings.procedures.masterManager.types.${e.nodeType}`),fg:u.white,bg:"MiscNode"===e.nodeType?"#FF8651":"#51BC00"})}];return F.jsxs(te,{width:"100%",direction:"row",children:[F.jsx(m,{fields:c,minW:"120px"}),F.jsxs(te,{direction:"row",mr:"auto",children:[F.jsx(K,{onClick:()=>g(e.randomId),children:F.jsx(H,{})}),F.jsx(K,{onClick:()=>(e=>{const t={id:e.randomId,type:e.nodeType,label:e.label,svgs:e.svgs,components:e.components,color:e.color,core:e.core,transform:e.transform,version:e.version};t.components.forEach(((e,n)=>{t.components[n].value=e.defaultValue})),ze(`RMP_Master_Node_${(new Date).valueOf()}.json`,"application/json",JSON.stringify(t))})(e),isDisabled:!e.randomId,children:F.jsx(U,{})}),F.jsx(K,{onClick:()=>{return t=e.randomId,l.current.filterNodes((e=>l.current.getNodeAttribute(e,"type")===f.Master&&l.current.getNodeAttributes(e)[f.Master].randomId===t)).forEach((e=>{l.current.dropNode(e)})),d($()),void d(W(l.current.export()));var t},children:F.jsx(A,{})})]})]})}));return F.jsxs(oe,{isOpen:t,onClose:n,size:"xl",scrollBehavior:"inside",children:[F.jsx(le,{}),F.jsxs(ie,{children:[F.jsx(re,{children:a("header.settings.procedures.masterManager.title")}),F.jsx(de,{}),F.jsxs(me,{width:"100%",children:[...x,F.jsx(Xa,{isOpen:!!p,onClose:()=>g(void 0),onSubmit:e=>{l.current.filterNodes((e=>l.current.getNodeAttribute(e,"type")===f.Master&&l.current.getNodeAttributes(e)[f.Master].randomId===p)).forEach((t=>{const n=structuredClone(e),a=l.current.getNodeAttributes(t),s=structuredClone(a[f.Master]);n.components.forEach(((e,t)=>{var a,o;n.components[t].value=null!==(o=e.id,a=void s.components.forEach((e=>{var t;if(e.id===o)return null!==(t=e.value)&&void 0!==t?t:e.defaultValue})))&&void 0!==a?a:e.defaultValue})),void 0!==n.color&&(n.color.value=s.color?n.color.value:n.color.defaultValue),l.current.mergeNodeAttributes(t,{[f.Master]:n})})),d($()),d(W(l.current.export()))}})]}),F.jsx(fe,{children:F.jsx(K,{colorScheme:"blue",variant:"outline",mr:"1",onClick:n,children:a("close")})})]})]})}))}}}))}(); diff --git a/assets/master-manager-legacy-DmddqoRb.js b/assets/master-manager-legacy-DmddqoRb.js deleted file mode 100644 index aea0329f..00000000 --- a/assets/master-manager-legacy-DmddqoRb.js +++ /dev/null @@ -1 +0,0 @@ -System.register(["./react-legacy-S3BmMPiz.js","./index-legacy-CKg3D7KT.js","./chakra-legacy-DsJcG_7N.js"],(function(e,t){"use strict";var n,a,s,o,l,i,r,d,m,c,f,h,p,u,g,x,y,C,b,v,j,O,w,_,k,S,N,z,M,A,P,B,$,W,E,X,Y,R,I,L,T,D,H,U,F,V,G,Z,Q,q,J,K,ee,te,ne,ae,se,oe,le,ie,re;return{setters:[e=>{n=e.b,a=e.u,s=e.r},e=>{o=e.i,l=e.S,i=e.av,r=e.r,d=e.C,m=e.M,c=e.aS,f=e.L,h=e.e,p=e.aU,u=e.aV,g=e.aW,x=e.aX,y=e.c,C=e.d,b=e.aY,v=e.aZ,j=e.P,O=e.V,w=e.W,_=e.a_,k=e.a$,S=e.b0,N=e.aR,z=e.q,M=e.v,A=e.b1,P=e.b2,B=e.Q,$=e.R,W=e.w,E=e.b3,X=e.b4,Y=e.aT,R=e.D,I=e.a},e=>{L=e.j,T=e.aK,D=e.a4,H=e.af,U=e.ax,F=e.B,V=e.a6,G=e.ad,Z=e.O,Q=e.g,q=e.b0,J=e.b1,K=e.aL,ee=e.at,te=e.$,ne=e.au,ae=e.a1,se=e.a2,oe=e.a3,le=e.Q,ie=e.a5,re=e.al}],execute:function(){e({S:function(e){var t=e.children,n=nn(s.useState(Math.random()),2),a=n[0],o=n[1];return L.jsx(vt.Provider,{value:{updateId:a,update:function(){return o(Math.random())}},children:t})},j:function(){const{i18n:e}=a();return t=>{var n,a;return null!==(n=null!==(a=e.languages.map((e=>t[e])).find((e=>void 0!==e)))&&void 0!==a?a:t.en)&&void 0!==n?n:"(Translation Error)"}}});var t=(e=>(e.Airport="airport",e.Airport2024="airport_2024",e.Maglev="maglev",e.Disney="disney",e.Railway="railway",e.Railway2024="railway_2024",e.HSR="hsr",e.AirportHK="airport_hk",e.DisneyHK="disney_hk",e.NgongPing360="ngong_ping_360",e.Tiananmen="tiananmen",e.AirportBJ="airport_bj",e.BusTerminalSuzhou="bus_terminal_suzhou",e.RailwaySuzhou="railway_suzhou",e.BusInterchange="bus_interchange",e.AirportSG="airport_sg",e.CruiseCentre="cruise_centre",e.SentosaExpress="sentosa_express",e.CableCar="cable_car",e.Merlion="merlion",e.MarinaBaySands="marina_bay_sands",e.GardensByTheBay="gardens_by_the_bay",e.SingaporeFlyer="singapore_flyer",e.Esplanade="esplanade",e.AirportQingdao="airport_qingdao",e.CoachStationQingdao="coach_station_qingdao",e.CruiseTerminalQingdao="cruise_terminal_qingdao",e.RailwayQingdao="railway_qingdao",e.TramQingdao="tram_qingdao",e.AirportGuangzhou="airport_guangzhou",e.RailwayGuangzhou="railway_guangzhou",e.IntercityGuangzhou="intercity_guangzhou",e.RiverCraftLondon="river_craft",e.AirportLondon="airport_london",e.CoachStationLondon="coach_station_london",e))(t||{});const de={type:"airport"},me=(e("n",{component:e=>{const{id:t,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:r}=e,{type:d=de.type}=null!=o?o:de,m=n.useRef(null),[c,f]=n.useState({width:25,height:25});n.useEffect((()=>f(m.current.getBBox())),[d,f,m]);const h=n.useCallback((e=>l(t,e)),[t,l]),p=n.useCallback((e=>i(t,e)),[t,i]),u=n.useCallback((e=>r(t,e)),[t,r]);return L.jsx("g",{id:t,transform:`translate(${a-c.width/2}, ${s-c.height/2})`,onPointerDown:h,onPointerMove:p,onPointerUp:u,style:{cursor:"move"},children:L.jsx("image",{ref:m,href:`/rmp/images/facilities/${d}.svg`,onLoad:()=>f(m.current.getBBox())})})},icon:L.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:L.jsxs("g",{transform:"translate(12, 0)scale(0.4)",children:[L.jsx("circle",{cx:"0",cy:"29.33899",r:"29.33899",fill:"currentColor"}),L.jsx("path",{id:"airport",d:"M28.9769,6.60134c1.711.013,3.111,2.53205,3.111,4.241v10.337s17.106,15.435,17.358,15.666a1.145,1.145,0,0,1,.488,1.152v2.833c0,.651-.451.61-.695.467-.334-.119-17.151-8.863-17.151-8.863-.004,1.458-.797,9.006-1.326,13.304,0,0,4.61,2.457,4.699,2.521.334.268.352.359.352.852v2.001c0,.477-.352.428-.51.324-.183-.062-5.693-1.921-5.693-1.921a2.56018,2.56018,0,0,0-.633-.127,2.31654,2.31654,0,0,0-.666.127s-5.477,1.859-5.672,1.921c-.185.104-.523.153-.523-.324v-2.001c0-.493.029-.584.367-.852.086-.064,4.678-2.521,4.678-2.521-.524-4.298-1.307-11.846-1.325-13.304,0,0-16.822,8.744-17.148,8.863-.217.143-.69.184-.69-.467v-2.833a1.16206,1.16206,0,0,1,.473-1.152c.276-.231,17.365-15.666,17.365-15.666v-10.337c0-1.709,1.403-4.228,3.14105-4.241",transform:"translate(-28.9697,0.14347)",fill:"white"})]})}),defaultAttrs:de,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:l}=a(),i=[{type:"select",label:l("panel.details.nodes.facilities.type"),value:n.type,options:{airport:"Airport",airport_2024:"Airport 2024",maglev:"Maglev",disney:"Disney",railway:"Railway",railway_2024:"Railway 2024",hsr:"HSR",airport_hk:"Airport Hongkong",disney_hk:"Disney Hongkong",ngong_ping_360:"Ngong Ping 360",tiananmen:"Tiananmen",airport_bj:"Airport Beijing",bus_terminal_suzhou:"Bus Terminal Suzhou",railway_suzhou:"Railway Suzhou",bus_interchange:"Bus Interchange",airport_sg:"Changi Airport",cruise_centre:"Cruise Centre",sentosa_express:"Sentosa Express",cable_car:"Cable Car",merlion:"Merlion",marina_bay_sands:"Marina Bay Sands",gardens_by_the_bay:"Gardens by the Bay",singapore_flyer:"Singapore Flyer",esplanade:"Esplanade",airport_qingdao:"Airport Qingdao",railway_qingdao:"Railway Qingdao",coach_station_qingdao:"Coach Station Qingdao",cruise_terminal_qingdao:"Cruise Terminal Qingdao",tram_qingdao:"Tram Qingdao",airport_guangzhou:"Airport Guangzhou",railway_guangzhou:"Railway Guangzhou",intercity_guangzhou:"Intercity Guangzhou",river_craft:"River services interchange",airport_london:"Airport London",coach_station_london:"Victoria Coach Station"},onChange:e=>{n.type=e,s(t,n)}}];return L.jsx(o,{fields:i,minW:"full"})},metadata:{displayName:"panel.details.nodes.facilities.displayName",tags:[]}}),e("i",(()=>navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome"))),{source:'url("./fonts/LTAIdentity-Medium.woff")',descriptors:{display:"swap"}}),ce={source:'url("./fonts/Mplus2-Medium.otf")',descriptors:{display:"swap"}},fe={source:'url("./fonts/Roboto-Bold.ttf")',descriptors:{display:"swap"}},he={source:'url("./fonts/MontaguSlab.ttf")',descriptors:{display:"swap"}},pe={source:'url("./fonts/Railway-PlyE.otf")',descriptors:{display:"swap"}},ue=e("F",{[l.MTR]:{className:[".rmp-name__mtr__zh",".rmp-name__mtr__en"],cssFont:{"MyriadPro-Semibold":void 0,"Vegur-Bold":void 0,"GenYoMinTW-SB":void 0},cssName:"fonts_mtr"},[l.MRTBasic]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:me},cssName:"fonts_mrt"},[l.MRTInt]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:me},cssName:"fonts_mrt"},[l.JREastBasic]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{"M PLUS 2":ce},cssName:"fonts_jreast"},[l.JREastImportant]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{"M PLUS 2":ce},cssName:"fonts_jreast"},[i.BerlinSBahnLineBadge]:{className:[".rmp-name__berlin"],cssFont:{Roboto:fe},cssName:"fonts_berlin"},[i.BerlinUBahnLineBadge]:{className:[".rmp-name__berlin"],cssFont:{Roboto:fe},cssName:"fonts_berlin"},[i.JREastLineBadge]:{className:[".rmp-name__jreast_ja",".rmp-name__jreast_en"],cssFont:{'"M PLUS 2"':ce},cssName:"fonts_jreast"},[i.MRTDestinationNumbers]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:me},cssName:"fonts_mrt"},[i.MRTLineBadge]:{className:[".rmp-name__mrt"],cssFont:{IdentityFont:me},cssName:"fonts_mrt"},[l.TokyoMetroBasic]:{className:[".rmp-name__tokyo_en",".rmp-name__jreast_ja"],cssFont:{MontaguSlab:he,"M PLUS 2":ce},cssName:"fonts_tokyo"},[l.TokyoMetroInt]:{className:[".rmp-name__tokyo_en",".rmp-name__jreast_ja"],cssFont:{MontaguSlab:he,"M PLUS 2":ce},cssName:"fonts_tokyo"},[l.LondonTubeBasic]:{className:[".rmp-name__tube"],cssFont:{Railway:pe},cssName:"fonts_tube"},[l.LondonTubeInt]:{className:[".rmp-name__tube"],cssFont:{Railway:pe},cssName:"fonts_tube"}}),ge=[],xe=e("l",(async e=>{const t=ue[e];if(!t)return;const{cssFont:n,cssName:a}=t;if(ge.includes(a))return;ge.push(a),await Promise.all(Object.entries(n).map((([e,t])=>r.loadFont(e,t&&{configs:[t]}))));const s=document.createElement("link");s.rel="stylesheet",s.id=a,s.href=`/rmp/styles/${a}.css`,document.head.append(s)})),ye=e("g",n.forwardRef(((e,t)=>{const{text:n,lineHeight:a,grow:s,dominantBaseline:o=("up"===s?"auto":"down"===s?"hanging":"middle"),baseOffset:l=2,funcDX:i=(e=>0),...r}=e,d="bidirectional"===s?-(n.length-1)*a/2:0;return L.jsx("g",{ref:t,children:("up"===s?[...n].reverse():n).map(((e,t,n)=>L.jsx("text",{dy:(t*a+l)*("up"===s?-1:1)+d,dx:i(t),dominantBaseline:o,...r,children:e},`${e}${t}`)))})})));ye.displayName="MultilineText";const Ce={top:{namesPos:1,lineHeight:10,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:16,polarity:1}},be={zh:l.ShmetroBasic,en:l.ShmetroBasic,mtr__zh:l.MTR,mtr__en:l.MTR,berlin:i.BerlinSBahnLineBadge,mrt:l.MRTBasic,jreast_ja:l.JREastBasic,jreast_en:l.JREastBasic,tokyo_en:l.TokyoMetroBasic,tube:l.LondonTubeBasic},ve=e("h",{content:"Enter your text here",fontSize:16,lineHeight:16,textAnchor:"middle",dominantBaseline:"middle",language:"en",color:[d.Shanghai,"jsr","#000000",m.white],rotate:0,italic:"normal",bold:"normal"}),je=(e("t",{component:e=>{const{id:t,x:a,y:s,attrs:o,handlePointerDown:l,handlePointerMove:i,handlePointerUp:r}=e,{content:d=ve.content,fontSize:m=ve.fontSize,lineHeight:c=ve.lineHeight,textAnchor:f=ve.textAnchor,dominantBaseline:h=ve.dominantBaseline,language:p=ve.language,color:u=ve.color,rotate:g=ve.rotate,italic:x=ve.italic,bold:y=ve.bold}=null!=o?o:ve,C=n.useRef(null),[b,v]=n.useState({x:0,y:0,width:32,height:16});n.useEffect((()=>v(C.current.getBBox())),[d,m,c,f,h,p,g,x,y,v,C]),n.useEffect((()=>{const e=be[p];e&&xe(e)}),[p]);const j=n.useCallback((e=>l(t,e)),[t,l]),O=n.useCallback((e=>i(t,e)),[t,i]),w=n.useCallback((e=>r(t,e)),[t,r]);return L.jsxs("g",{id:t,transform:`translate(${a}, ${s})rotate(${g})`,onPointerDown:j,onPointerMove:O,onPointerUp:w,style:{cursor:"move"},children:[L.jsx("rect",{className:"removeMe",fill:"gray",fillOpacity:"0.1",x:b.x-1.5,y:b.y-1.5,width:b.width+3,height:b.height+3}),L.jsx(ye,{ref:C,text:d.split("\n"),lineHeight:c,grow:"down",className:`rmp-name__${p}`,fontSize:m,textAnchor:f,dominantBaseline:h,fill:u[2],fontStyle:x,fontWeight:y})]})},icon:L.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:L.jsx("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"middle",fontSize:"10",children:"Text"})}),defaultAttrs:ve,attrsComponent:e=>{var t,n,s,l,r,d,m;const{id:f,attrs:h,handleAttrsUpdate:p}=e,{t:u}=a(),g=[{type:"textarea",label:u("panel.details.nodes.text.content"),value:null!==(t=h.content)&&void 0!==t?t:ve.content,onChange:e=>{h.content=e.toString(),p(f,h)},minW:"full"},{type:"input",label:u("panel.details.nodes.text.fontSize"),value:(null!==(n=h.fontSize)&&void 0!==n?n:ve.fontSize).toString(),validator:e=>Number.isInteger(e)&&Number(e)>0,onChange:e=>{h.fontSize=Number(e),p(f,h)},minW:"full"},{type:"input",label:u("panel.details.nodes.text.lineHeight"),value:(null!==(s=h.lineHeight)&&void 0!==s?s:ve.lineHeight).toString(),validator:e=>Number.isInteger(e)&&Number(e)>0,onChange:e=>{h.lineHeight=Number(e),p(f,h)},minW:"full"},{type:"select",label:u("panel.details.nodes.text.textAnchor"),value:null!==(l=h.textAnchor)&&void 0!==l?l:ve.textAnchor,options:{start:u("panel.details.nodes.text.start"),middle:u("panel.details.nodes.text.middle"),end:u("panel.details.nodes.text.end")},onChange:e=>{h.textAnchor=e,p(f,h)},minW:"full"},{type:"select",label:u("panel.details.nodes.text.dominantBaseline"),value:null!==(r=h.dominantBaseline)&&void 0!==r?r:ve.dominantBaseline,options:{auto:u("panel.details.nodes.text.auto"),middle:u("panel.details.nodes.text.middle"),hanging:u("panel.details.nodes.text.hanging")},onChange:e=>{h.dominantBaseline=e,p(f,h)},minW:"full"},{type:"select",label:u("panel.details.nodes.text.language"),value:null!==(d=h.language)&&void 0!==d?d:ve.language,options:{zh:u("panel.details.nodes.text.zh"),en:u("panel.details.nodes.text.en"),mtr__zh:u("panel.details.nodes.text.mtr__zh"),mtr__en:u("panel.details.nodes.text.mtr__en"),berlin:u("panel.details.nodes.text.berlin"),mrt:u("panel.details.nodes.text.mrt"),jreast_ja:u("panel.details.nodes.text.jreast_ja"),jreast_en:u("panel.details.nodes.text.jreast_en"),tokyo_en:u("panel.details.nodes.text.tokyo_en"),tube:u("panel.details.nodes.text.tube")},onChange:e=>{h.language=e.toString(),p(f,h)},minW:"full"},{type:"select",label:u("panel.details.nodes.text.rotate"),value:null!==(m=h.rotate)&&void 0!==m?m:ve.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{h.rotate=Number(e),p(f,h)},minW:"full"},{type:"switch",label:u("panel.details.nodes.text.italic"),isChecked:"italic"===h.italic,onChange:e=>{h.italic=e?"italic":"normal",p(f,h)},minW:"full"},{type:"switch",label:u("panel.details.nodes.text.bold"),isChecked:"bold"===h.bold,onChange:e=>{h.bold=e?"bold":"normal",p(f,h)},minW:"full"},{type:"custom",label:u("color"),component:L.jsx(c,{type:i.Text,defaultTheme:ve.color})}];return L.jsx(o,{fields:g})},metadata:{displayName:"panel.details.nodes.text.displayName",tags:[]}}),e("c",((e,t)=>e.filterEdges(((e,n,a,s,o,l,i)=>t.has(a)&&t.has(s))))),e("f",(e=>{const t=Object.fromEntries([...Object.values(l),Object.values(i)].map((e=>[e,!1])));return e.forEachNode((n=>{const a=e.getNodeAttribute(n,"type");t[a]=!0})),t}))),Oe=(e("b",((e,t,n,a,s)=>{const o=t<=a?t:a,l=n<=s?n:s,i=t<=a?a:t,r=n<=s?s:n;return e.filterNodes(((e,t)=>((e,t,n,a,s,o)=>e<=s&&s<=n&&t<=o&&o<=a)(o,l,i,r,t.x,t.y)))})),e("e",((e,t,n)=>{const a=[],s=new Set;return t.forEach((t=>{const n=e.getNodeAttributes(t).type,o=e.getNodeAttribute(t,n);if(void 0!==o.color){const e=o.color;s.has(e.toString())||(a.push(e),s.add(e.toString()))}})),n.filter((t=>f.includes(e.getEdgeAttribute(t,"style")))).forEach((t=>{const n=e.getEdgeAttributes(t),o=n[n.style].color;s.has(o.toString())||(a.push(o),s.add(o.toString()))})),a})),e=>{const t=[],n=new Set;return e.filterNodes((t=>e.getNodeAttribute(t,"type")===i.Master)).forEach((a=>{const s=e.getNodeAttributes(a)[i.Master];n.has(s.randomId)||(n.add(s.randomId),t.push(s))})),t}),we=e("d",((e,t,n)=>{const a=new Blob([n],{type:t});_e(e,a)})),_e=e("a",((e,t)=>{const n=window.URL.createObjectURL(t),a=document.createElement("a");a.href=n,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(n)})),ke=(e("m",(async(e,t,n,a)=>{const{xMin:s,yMin:o,xMax:l,yMax:i}=h(e),[r,d]=[l-s,i-o],m=document.getElementById("canvas").cloneNode(!0);t||m.appendChild(await Ne(l-400,i-120)),m.setAttribute("viewBox",`${s} ${o} ${r} ${d}`),m.setAttribute("width",r.toString()),m.setAttribute("height",d.toString()),Object.entries({".rmp-name-outline":["paint-order","stroke","stroke-linejoin"]}).forEach((([e,t])=>{const n=document.querySelector(e);if(null===n)return;const s=window.getComputedStyle(n);m.querySelectorAll(e).forEach((n=>{if(".rmp-name-outline"===e&&1.1===a){const t=n.insertAdjacentElement("afterend",n.cloneNode(!0));t&&(t.classList.remove(e.slice(1)),0===t.classList.length&&n.removeAttribute("class"),t.removeAttribute("stroke-width"))}t.forEach((e=>{n.setAttribute(e,s.getPropertyValue(e))})),n.classList.remove(e.slice(1)),0===n.classList.length&&n.removeAttribute("class")}))})),m.querySelectorAll('[fill="url(#opaque)"]').forEach((e=>{e.remove()})),m.querySelectorAll(".removeMe").forEach((e=>{e.remove()}));const c=je(e);return await ke(m,e,c,n),await Se(m,e,c),{elem:m,width:r,height:d}})),async(e,t,n,a)=>{const s=new Set;if(Object.keys(ue).filter((e=>n[e])).forEach((e=>s.add(e))),t.filterNodes(((e,t)=>e.startsWith("misc_node_")&&t.type===i.Text)).map((e=>t.getNodeAttribute(e,i.Text).language)).map((e=>be[e])).filter((e=>e!==l.ShmetroBasic)).forEach((e=>s.add(e))),a)[".rmp-name__zh",".rmp-name__en"].forEach((t=>{e.querySelectorAll(t).forEach((e=>{e.classList.remove(t.slice(1)),0===e.classList.length&&e.removeAttribute("class")}))})),s.forEach((t=>{ue[t].className.forEach((t=>{e.querySelectorAll(t).forEach((e=>{e.classList.remove(t.slice(1)),0===e.classList.length&&e.removeAttribute("class")}))}))}));else{const t=document.createElement("style");for(let e=0;ee.cssText)).join("\n");break}}e.prepend(t),await Promise.all([...s.values()].map((e=>ue[e])).map((async({cssName:t,cssFont:n})=>{try{e.prepend(await(async(e,t)=>{const n=document.createElement("style");for(let o=document.styleSheets.length-1;o>=0;o-=1){var a;if(null!==(a=document.styleSheets[o].href)&&void 0!==a&&a.endsWith(`styles/${t}.css`)){n.textContent=[...document.styleSheets[o].cssRules].map((e=>e.cssText)).filter((e=>!e.startsWith("@font-face"))).join("\n");break}}n.textContent+="\n";const s=(await Promise.allSettled(Object.keys(e).map(r.getFontCSS))).filter((e=>"fulfilled"===e.status)).map((e=>e.value));return n.textContent+=s.join("\n"),n})(n,t))}catch(a){alert("Failed to load fonts. Fonts in the exported PNG will be missing."),console.error(a)}})))}}),Se=async(e,n,a)=>{if(a[i.Facilities]){const a=n.filterNodes(((e,t)=>t.type===i.Facilities)),s=Object.fromEntries(Object.values(t).map((e=>[e,[]])));a.forEach((e=>{var t;const a=null===(t=n.getNodeAttribute(e,i.Facilities))||void 0===t?void 0:t.type;a&&s[a].push(e)}));const o=Object.entries(s).filter((([e,t])=>t.length>0)).map((([e,t])=>e)),l=await Promise.all((await Promise.all(o.map((async e=>await fetch(`/rmp//images/facilities/${e}.svg`))))).map((e=>e.text())));o.forEach(((t,n)=>{const a=document.createElement("div");a.innerHTML=l[n];const o=a.querySelector("svg"),i=document.createElementNS("http://www.w3.org/2000/svg","symbol");for(const e of o.attributes)i.setAttribute(e.name,e.value);for(;o.firstChild;)i.appendChild(o.firstChild);o.replaceWith(i),i.id=t,e.appendChild(i),s[t].forEach((n=>{const a=e.querySelector(`#${n}`),s=null==a?void 0:a.querySelector("image");if(s){a.removeChild(s);const e=document.createElementNS("http://www.w3.org/2000/svg","use");e.setAttribute("href",`#${t}`),e.setAttribute("height",i.getAttribute("height")),e.setAttribute("width",i.getAttribute("width")),a.appendChild(e)}})),a.remove()}))}},Ne=async(e,t)=>{const n=document.createElementNS("http://www.w3.org/2000/svg","g");n.setAttribute("transform",`translate(${e}, ${t})scale(2)`);const a=await fetch("/rmp//logo.svg"),s=await a.text(),o=document.createElement("div");o.innerHTML=s;const l=o.querySelector("svg"),i=document.createElement("g");i.setAttribute("transform","translate(-60, -25)scale(0.1)"),i.setAttribute("font-family","Arial, sans-serif"),i.innerHTML=l.innerHTML,n.appendChild(i);const r=document.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("font-family","Arial, sans-serif"),r.setAttribute("font-size","16");const d=p.t("Rail Map Painter");r.appendChild(document.createTextNode(d));const m=document.createElementNS("http://www.w3.org/2000/svg","text");m.setAttribute("font-family","Arial, sans-serif"),m.setAttribute("font-size","10"),m.setAttribute("y","10");const c=window.location.origin;let f="https://railmapgen.org/";return c.includes("github")?f="https://railmapgen.github.io/":c.includes("gitlab")&&(f="https://railmapgen.gitlab.io/"),f+="?app=rmp",m.appendChild(document.createTextNode(f)),n.appendChild(i),n.appendChild(r),n.appendChild(m),n};e("u",(()=>{const[e,t]=s.useState({width:void 0,height:void 0});return s.useEffect((()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)}),[]),e}));const ze={top:{lineHeight:6.67,offset:10},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:5.83}},Me={...x,nameOffsetX:"right",nameOffsetY:"top"},Ae={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:f=Me.nameOffsetX,nameOffsetY:h=Me.nameOffsetY}=null!==(t=i[l.ShmetroBasic])&&void 0!==t?t:Me,p=n.useCallback((e=>r(a,e)),[a,r]),u=n.useCallback((e=>d(a,e)),[a,d]),g=n.useCallback((e=>m(a,e)),[a,m]),y="left"===f?-13.33:"right"===f?13.33:0,C=(c[Ce[h].namesPos].split("\n").length*ze[h].lineHeight+ze[h].offset)*Ce[h].polarity,b="left"===f?"end":"right"===f?"start":"middle";return n.useMemo((()=>L.jsxs("g",{id:a,transform:`translate(${s}, ${o})`,children:[L.jsx("circle",{id:`stn_core_${a}`,r:5,stroke:"#393332",strokeWidth:"1",fill:"white",onPointerDown:p,onPointerMove:u,onPointerUp:g,style:{cursor:"move"}}),L.jsxs("g",{transform:`translate(${y}, ${C})`,textAnchor:b,className:"rmp-name-outline",strokeWidth:"1",children:[L.jsx(ye,{text:c[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),L.jsx(ye,{text:c[1].split("\n"),dx:"right"===f?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,o,...c,f,h,p,u,g])},icon:L.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:L.jsx("circle",{cx:"12",cy:"12",r:"5",stroke:"currentColor",fill:"none"})}),defaultAttrs:Me,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:l}=a(),i=[{type:"textarea",label:l("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:l("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:l("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:l("panel.details.stations.common.left"),middle:l("panel.details.stations.common.middle"),right:l("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:l("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:l("panel.details.stations.common.top"),middle:l("panel.details.stations.common.middle"),bottom:l("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"}];return L.jsx(o,{fields:i})},metadata:{displayName:"panel.details.stations.shmetroBasic.displayName",cities:[d.Shanghai],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Pe={0:{textDx:0,textDy:-17.5,textAnchor:"middle",namesPos:1,lineHeight:6.67,polarity:-1},45:{textDx:1,textDy:-16.25,textAnchor:"start",namesPos:1,lineHeight:6.67,polarity:-1},90:{textDx:12,textDy:0,textAnchor:"start",namesPos:0,lineHeight:0,polarity:0},135:{textDx:5,textDy:21,textAnchor:"start",namesPos:0,lineHeight:12.67,polarity:1},180:{textDx:0,textDy:22.5,textAnchor:"middle",namesPos:0,lineHeight:12.67,polarity:1},225:{textDx:-5,textDy:21,textAnchor:"end",namesPos:0,lineHeight:12.67,polarity:1},270:{textDx:-12,textDy:0,textAnchor:"end",namesPos:0,lineHeight:0,polarity:0},315:{textDx:-1,textDy:-16.25,textAnchor:"end",namesPos:1,lineHeight:6.67,polarity:-1}},Be={...x,rotate:0,color:[d.Shanghai,"sh1","#E4002B",m.white]},$e={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,color:f=Be.color,rotate:h=Be.rotate}=null!==(t=i[l.ShmetroBasic2020])&&void 0!==t?t:Be,p=Pe[h].textDy+(c[Pe[h].namesPos].split("\n").length-1)*Pe[h].lineHeight*Pe[h].polarity,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),y=n.useCallback((e=>m(a,e)),[a,m]);return n.useMemo((()=>L.jsxs("g",{id:a,children:[L.jsx("g",{transform:`translate(${s}, ${o})rotate(${h})`,children:L.jsx("rect",{id:`stn_core_${a}`,x:"-2",y:"-7.83",width:"4",height:"7.83",stroke:"none",fill:f[2],onPointerDown:u,onPointerMove:g,onPointerUp:y,style:{cursor:"move"}})}),L.jsxs("g",{transform:`translate(${s+Pe[h].textDx}, ${o+p})`,textAnchor:Pe[h].textAnchor,className:"rmp-name-outline",strokeWidth:"1",children:[L.jsx(ye,{text:c[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),L.jsx(ye,{text:c[1].split("\n"),dx:h>=45&&h<=135?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,o,...c,h,f,u,g,y])},icon:L.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:L.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),defaultAttrs:Be,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.rotate"),value:n.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{n.rotate=Number(e),s(t,n)},minW:"full"},{type:"custom",label:i("color"),component:L.jsx(c,{type:l.ShmetroBasic2020,defaultTheme:Be.color})}];return L.jsx(o,{fields:r})},metadata:{displayName:"panel.details.stations.shmetroBasic2020.displayName",cities:[d.Shanghai],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},We={top:{lineHeight:6.67,offset:5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:.83}},Ee={...x,nameOffsetX:"right",nameOffsetY:"top",rotate:0,height:10,width:13},Xe={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:f=Ee.nameOffsetX,nameOffsetY:h=Ee.nameOffsetY,rotate:p=Ee.rotate,width:u=Ee.width,height:g=Ee.height}=null!==(t=i[l.ShmetroInt])&&void 0!==t?t:Ee,y=n.useCallback((e=>r(a,e)),[a,r]),C=n.useCallback((e=>d(a,e)),[a,d]),b=n.useCallback((e=>m(a,e)),[a,m]),v=0===p||180===p?u:90===p||270===p?g:u*Math.SQRT1_2,j=0===p||180===p?g:90===p||270===p?u:u*Math.SQRT1_2,O="left"===f?-6.83:"right"===f?6.83:0,w=(Math.abs(O)+v/2)*Math.sign(O),_=(c[Ce[h].namesPos].split("\n").length*We[h].lineHeight+We[h].offset)*Ce[h].polarity,k=(Math.abs(_)+j/2)*Math.sign(_),S="left"===f?"end":"right"===f?"start":"middle";return n.useMemo((()=>L.jsxs("g",{id:a,children:[L.jsx("g",{transform:`translate(${s}, ${o})rotate(${p})`,children:L.jsx("rect",{id:`stn_core_${a}`,x:-u/2,y:-g/2,height:g,width:u,ry:g/2,stroke:"#393332",strokeWidth:"1",fill:"white",onPointerDown:y,onPointerMove:C,onPointerUp:b,style:{cursor:"move"}})}),L.jsxs("g",{transform:`translate(${s+w}, ${o+k})`,textAnchor:S,className:"rmp-name-outline",strokeWidth:"1",children:[L.jsx(ye,{text:c[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),L.jsx(ye,{text:c[1].split("\n"),dx:"right"===f?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,o,...c,f,h,p,u,g,y,C,b])},icon:L.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:L.jsx("rect",{x:"4.5",y:"7",height:"10",width:"15",ry:"5",stroke:"currentColor",fill:"none"})}),defaultAttrs:Ee,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:l}=a(),i=[{type:"textarea",label:l("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:l("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:l("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:l("panel.details.stations.common.left"),middle:l("panel.details.stations.common.middle"),right:l("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:l("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:l("panel.details.stations.common.top"),middle:l("panel.details.stations.common.middle"),bottom:l("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"input",label:l("panel.details.stations.shmetroInt.height"),value:n.height.toString(),validator:e=>Number.isInteger(e),onChange:e=>{n.height=Number(e),s(t,n)},minW:"full"},{type:"input",label:l("panel.details.stations.shmetroInt.width"),value:n.width.toString(),validator:e=>Number.isInteger(e),onChange:e=>{n.width=Number(e),s(t,n)},minW:"full"},{type:"select",label:l("panel.details.stations.common.rotate"),value:n.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{n.rotate=Number(e),s(t,n)},minW:"full"}];return L.jsx(o,{fields:i})},metadata:{displayName:"panel.details.stations.shmetroInt.displayName",cities:[d.Shanghai],canvas:[u.RailMap],categories:[g.Metro],tags:["interchange"]}},Ye={...x,nameOffsetX:"right",nameOffsetY:"top"},Re={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:f=Ye.nameOffsetX,nameOffsetY:h=Ye.nameOffsetY}=null!==(t=i[l.ShmetroOutOfSystemInt])&&void 0!==t?t:Ye,p=n.useCallback((e=>r(a,e)),[a,r]),u=n.useCallback((e=>d(a,e)),[a,d]),g=n.useCallback((e=>m(a,e)),[a,m]),y="left"===f?-13.33:"right"===f?13.33:0,C=(c[Ce[h].namesPos].split("\n").length*ze[h].lineHeight+ze[h].offset)*Ce[h].polarity,b="left"===f?"end":"right"===f?"start":"middle";return n.useMemo((()=>L.jsxs("g",{id:a,transform:`translate(${s}, ${o})`,children:[L.jsx("circle",{r:5,stroke:"#393332",strokeWidth:"1.33",fill:"white"}),L.jsx("circle",{r:2.3,stroke:"#393332",strokeWidth:"1.33",fill:"white"}),L.jsx("circle",{id:`stn_core_${a}`,r:5.665,fill:"white",fillOpacity:"0",onPointerDown:p,onPointerMove:u,onPointerUp:g,style:{cursor:"move"},className:"removeMe"}),L.jsxs("g",{transform:`translate(${y}, ${C})`,textAnchor:b,className:"rmp-name-outline",strokeWidth:"1",children:[L.jsx(ye,{text:c[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),L.jsx(ye,{text:c[1].split("\n"),dx:"right"===f?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,o,...c,f,h,p,u,g])},icon:L.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[L.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.67",fill:"white"}),L.jsx("circle",{cx:"12",cy:"12",r:"4.6",stroke:"currentColor",strokeWidth:"2.67",fill:"white"})]}),defaultAttrs:Ye,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:l}=a(),i=[{type:"textarea",label:l("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:l("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:l("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:l("panel.details.stations.common.left"),middle:l("panel.details.stations.common.middle"),right:l("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:l("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:l("panel.details.stations.common.top"),middle:l("panel.details.stations.common.middle"),bottom:l("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"}];return L.jsx(o,{fields:i})},metadata:{displayName:"panel.details.stations.shmetroOsysi.displayName",cities:[d.Shanghai],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Ie={...x,rotate:0},Le={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,rotate:f=Ie.rotate}=null!==(t=i[l.ShanghaiSuburbanRailway])&&void 0!==t?t:Ie,h=Pe[f].textDy+(c[Pe[f].namesPos].split("\n").length-1)*Pe[f].lineHeight*Pe[f].polarity,p=n.useCallback((e=>r(a,e)),[a,r]),u=n.useCallback((e=>d(a,e)),[a,d]),g=n.useCallback((e=>m(a,e)),[a,m]);return n.useMemo((()=>L.jsxs("g",{id:a,children:[L.jsxs("g",{transform:`translate(${s}, ${o})rotate(${f})`,children:[L.jsx("rect",{x:"-2",y:"-7.83",width:"4",height:"7.83",stroke:"none",fill:"#898989"}),L.jsx("rect",{x:"-3.5",y:"-1",width:"7",height:"2",stroke:"none",fill:"white"}),L.jsx("rect",{x:-.8325,y:-6.33,width:1.6,height:6.33,stroke:"none",fill:"white"}),L.jsx("rect",{id:`stn_core_${a}`,x:"-2",y:"-7.83",width:"4",height:9.08,stroke:"none",fill:"white",fillOpacity:"0",onPointerDown:p,onPointerMove:u,onPointerUp:g,style:{cursor:"move"},className:"removeMe"})]}),L.jsxs("g",{transform:`translate(${s+Pe[f].textDx}, ${o+h})`,textAnchor:Pe[f].textAnchor,className:"rmp-name-outline",strokeWidth:"2.5",children:[L.jsx(ye,{text:c[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),L.jsx(ye,{text:c[1].split("\n"),dx:f>=45&&f<=135?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,o,...c,f,p,u,g])},icon:L.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:L.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),defaultAttrs:Ie,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:l}=a(),i=[{type:"textarea",label:l("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:l("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:l("panel.details.stations.common.rotate"),value:n.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{n.rotate=Number(e),s(t,n)},minW:"full"}];return L.jsx(o,{fields:i})},metadata:{displayName:"panel.details.stations.shanghaiSuburbanRailway.displayName",cities:[d.Shanghai],canvas:[u.RailMap],categories:[g.Metro],tags:[]}};var Te=1.3,De=45,He=De-3,Ue=function(e,t){var n=[e,t].map((function(e){return e.match(/^(\w+).+$/)}));if(n[0]&&n[1]&&n[0][1]===n[1][1])return n[0][1]},Fe=function(e){var t=e.match(/^(\d+)\D+$/);return null==t?void 0:t[1]},Ve=function(){return Ve=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=o.next()).done;)l.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}return l};function Ke(e){var t=e.zhName,n=e.enName,a=e.foregroundColour,o=e.backgroundColour,l=e.zhClassName,i=e.enClassName,r=e.passed,d=e.children,c=qe(e,["zhName","enName","foregroundColour","backgroundColour","zhClassName","enClassName","passed","children"]),f=function(e,t){var n=Fe(e);if(n)return{isDigit:!0,spanningPart:n};var a=Ue(e,t);return a?{isDigit:!1,spanningPart:a}:{isDigit:!1,spanningPart:""}}(t,n),h=f.isDigit,p=f.spanningPart,u=s.useRef(null),g=Je(s.useState({x:0,height:0,width:0}),2),x=g[0],y=g[1];s.useEffect((function(){u.current&&y(u.current.getBBox())}),[t,n]);var C=He/Math.max(He,x.width),b=(-x.x-x.width/2)*C,v=x.height*(1-C)/2;return L.jsxs("g",Qe({textAnchor:"middle",fill:r?m.white:a},c,{children:[L.jsx(Ze,{fill:r?"#aaa":o}),L.jsx("g",{ref:u,transform:"translate(".concat(b,",").concat(v,")scale(").concat(C,")"),children:L.jsxs("text",{className:l,fontSize:21,x:-1,y:12,textAnchor:"end",dominantBaseline:"central",children:[p,L.jsx("tspan",{className:l,fontSize:10,x:0,dy:-4,textAnchor:"start",dominantBaseline:"central",children:t.slice(p.length).trim()}),L.jsx("tspan",{className:i,fontSize:6.5,letterSpacing:-.1,x:0,dy:10,textAnchor:"start",dominantBaseline:"middle",children:h?n:n.slice(p.length).trim()})]})}),d]}))}var et=function(){return et=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=o.next()).done;)l.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}return l};function at(e){var t,n=e.zhName,a=e.enName,o=e.foregroundColour,l=e.backgroundColour,i=e.zhClassName,r=e.enClassName,d=e.passed,c=e.children,f=tt(e,["zhName","enName","foregroundColour","backgroundColour","zhClassName","enClassName","passed","children"]),h=null!==(t=Fe(n))&&void 0!==t?t:"",p=s.useRef(null),u=s.useRef(null),g=nt(s.useState({width:0}),2),x=g[0],y=g[1],C=nt(s.useState({width:0}),2),b=C[0],v=C[1];s.useEffect((function(){p.current&&y(p.current.getBBox()),u.current&&v(u.current.getBBox())}),[n,a]);var j=He/Math.max(He,x.width),O=He/Math.max(He,b.width),w={nameZh:{y:7.3+13.5*(1-j)*j/2},nameEn:{y:19.5-9*(1-O)*O/2}};return L.jsxs("g",et({textAnchor:"middle",fill:d?m.white:o},f,{children:[L.jsx(Ze,{fill:d?"#aaa":l}),L.jsxs("text",{ref:p,className:i,fontSize:12,transform:"translate(0,".concat(w.nameZh.y,")scale(").concat(j,")"),dominantBaseline:"central",children:[L.jsx("tspan",{fontSize:16,dy:.7,dominantBaseline:"central",children:h}),L.jsx("tspan",{dy:-.7,dominantBaseline:"central",children:n.slice(h.length)})]}),L.jsx("text",{ref:u,className:r,fontSize:8,transform:"translate(0,".concat(w.nameEn.y,")scale(").concat(O,")"),dominantBaseline:"middle",children:a}),c]}))}var st=function(){return st=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=o.next()).done;)l.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}return l};function it(e){var t=e.zhName,n=e.enName,a=e.foregroundColour,o=e.backgroundColour,l=e.zhClassName,i=e.enClassName,r=e.passed,d=e.children,c=ot(e,["zhName","enName","foregroundColour","backgroundColour","zhClassName","enClassName","passed","children"]),f=s.useRef(null),h=lt(s.useState({width:0}),2),p=h[0],u=h[1];s.useEffect((function(){f.current&&u(f.current.getBBox())}),[t,n]);var g=Math.max(45,p.width+4);return L.jsxs("g",st({textAnchor:"middle",fill:r?m.white:a},c,{children:[L.jsx(Ze,{customWidth:g,fill:r?"#aaa":o}),L.jsxs("g",{ref:f,children:[L.jsx("text",{className:l,fontSize:8.5,y:8,dominantBaseline:"central",children:t}),L.jsx("text",{className:i,fontSize:5.5,y:18,dominantBaseline:"middle",children:n})]}),d]}))}var rt=function(){return rt=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=o.next()).done;)l.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}return l};function ct(e){var t=e.zhName,n=e.enName,a=e.foregroundColour,o=e.backgroundColour,l=e.zhClassName,i=e.enClassName,r=e.passed,d=e.children,c=dt(e,["zhName","enName","foregroundColour","backgroundColour","zhClassName","enClassName","passed","children"]),f=s.useRef(null),h=s.useRef(null),p=mt(s.useState({width:0}),2),u=p[0],g=p[1],x=mt(s.useState({width:0}),2),y=x[0],C=x[1];s.useEffect((function(){f.current&&g(f.current.getBBox()),h.current&&C(h.current.getBBox())}),[t,n]);var b=He/Math.max(He,u.width),v=He/Math.max(He,y.width),j={nameZh:{y:7.3+13.5*(1-b)*b/2},nameEn:{y:19.5-9*(1-v)*v/2}};return L.jsxs("g",rt({textAnchor:"middle",fill:r?m.white:a},c,{children:[L.jsx(Ze,{fill:r?"#aaa":o}),L.jsx("text",{ref:f,className:l,fontSize:12,transform:"translate(0,".concat(j.nameZh.y,")scale(").concat(b,")"),dominantBaseline:"central",children:t}),L.jsx("text",{ref:h,className:i,fontSize:8,transform:"translate(0,".concat(j.nameEn.y,")scale(").concat(v,")"),dominantBaseline:"middle",children:n}),d]}))}var ft=function(){return ft=Object.assign||function(e){for(var t,n=1,a=arguments.length;n=5?L.jsx(it,ft({},e)):L.jsx(ct,ft({},e))}})));var ht=function(e,t){return void 0!==Fe(e)?1:void 0!==Ue(e,t)?2:3},pt=function(){return pt=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=o.next()).done;)l.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}return l},_t=s.forwardRef((function(e,t){var n=e.Icon,a=e.lineNum,o=e.stnNum,l=e.strokeColour,i=e.passed,r=e.size,d=e.textClassName,m=e.bolderBorder,c=e.useSameScale,f=e.children,h=Ot(e,["Icon","lineNum","stnNum","strokeColour","passed","size","textClassName","bolderBorder","useSameScale","children"]),p=s.useContext(vt).updateId,u=s.useRef(null),g=s.useRef(null),x=wt(s.useState({width:0}),2),y=x[0],C=x[1],b=wt(s.useState({width:0}),2),v=b[0],j=b[1];s.useEffect((function(){u.current&&C(u.current.getBBox()),g.current&&j(g.current.getBBox())}),[a,o,p]);var O=a&&a.length>2;s.useEffect((function(){c&&O&&console.warn("GenericStationNumber(), useSameScale props does not work when lineNum has more than 2 characters")}),[c,O]);var w=17/Math.max(17,y.width),_=c&&2===(null==a?void 0:a.length)?w:17/Math.max(17,v.width),k="sm"===r?"0.7":"lg"===r?"1.4":1;return L.jsxs("g",jt({ref:t},h,{children:[L.jsxs("g",{transform:"scale(".concat(k,")"),children:[L.jsx(n,{stroke:i?"#aaa":l,filled:!a&&!o,bolder:m}),(a||o)&&L.jsxs("g",{textAnchor:"middle",fontSize:13.5,fill:i?"#aaa":"#000",children:[L.jsx("g",{transform:"translate(-9.25,0)scale(".concat(w,")"),children:L.jsx("text",{ref:u,className:d,dominantBaseline:"central",x:.5,children:a})}),L.jsx("g",{transform:"translate(9.25,0)scale(".concat(_,")"),children:L.jsx("text",{ref:g,className:d,dominantBaseline:"central",children:o})})]})]}),f]}))})),kt=function(){return kt=Object.assign||function(e){for(var t,n=1,a=arguments.length;n0)&&!(a=o.next()).done;)l.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}return l},Et=function(e,t){return Array.from(Array(e).keys()).map((function(n){return(n-(e-1)/2)*t}))},Xt=function(e){return"fmetro"===e?xt:bt},Yt=9.1,Rt=2.8600000000000003,It=s.forwardRef((function(e,t){var n=e.stations,a=e.textClassName,o=e.columns,l=void 0===o?2:o,i=e.topHeavy,r=e.anchorAt,d=e.osiPosition,m=e.children,c=$t(e,["stations","textClassName","columns","topHeavy","anchorAt","osiPosition","children"]),f=s.useMemo((function(){return function(e,t,n){if(e<=0)return[];if(1===e)return[[0,0]];for(var a=t>e?e:t,s=Et(a,38.3),o=Math.ceil(e/a),l=Et(o,19.8),i=e%a,r=[],d=0;d=f.length)return console.warn(", anchor index ".concat(r," is out of bound")),[0,0];var e=Wt(f[r],2);return[-e[0],-e[1]]}),[f,r]),2),p=h[0],u=h[1],g=s.useRef(null),x=s.useRef([]);s.useEffect((function(){x.current=x.current.slice(0,n.length)}),[n.length]);var y=2===n.length&&1===l&&!!d;return s.useImperativeHandle(t,(function(){return{target:g.current,children:x.current,getCoordinates:function(){return f},getCorrectedBBox:function(){var e,t,n=null!==(t=null===(e=g.current)||void 0===e?void 0:e.getBBox())&&void 0!==t?t:{x:0,y:0,width:0,height:0};return n.y-=4.55,n.height+=Yt,y?(n.x-="left"===d?1.4300000000000002:4.55,n.width+=5.98):(n.x-=4.55,n.width+=Yt),n},getTranslate:function(){return[p,u]}}}),[f,p,u,g.current,x.current,d]),L.jsxs("g",Bt({ref:g,transform:"translate(".concat(p,",").concat(u,")")},c,{children:[n.map((function(e,t){var n=e.style,a=Xt(n);return L.jsx(a,{stroke:"#aaa",filled:!0,strokeWidth:Yt,transform:"translate(".concat(f[t][0],",").concat(f[t][1],")")},t)})),y&&L.jsx(Pt,{position:d,r:13.206896551724137,strokeWidth:Rt,strokeDasharray:void 0}),n.map((function(e,t){var n=e.style,a=Xt(n);return L.jsx(a,{stroke:"white",filled:!0,strokeWidth:3.3800000000000003,transform:"translate(".concat(f[t][0],",").concat(f[t][1],")")},t)})),y&&L.jsx(Pt,{position:d}),n.length&&L.jsx("rect",{fill:"white",x:-12,y:f[0][1],width:24,height:2*-f[0][1]}),n.map((function(e,t){var n=e.style,s=$t(e,["style"]),o="fmetro"===n?St:zt;return L.jsx(o,Bt({ref:function(e){return x.current[t]=e},transform:"translate(".concat(f[t][0],",").concat(f[t][1],")"),textClassName:a},s),t)})),m]}))})),Lt=function(){return Lt=Object.assign||function(e){for(var t,n=1,a=arguments.length;n{var t,a;const{id:s,x:o,y:i,attrs:r,handlePointerDown:d,handlePointerMove:m,handlePointerUp:c}=e,{names:f=x.names,nameOffsetX:h=Zt.nameOffsetX,nameOffsetY:p=Zt.nameOffsetY,color:u=Zt.color,lineCode:g=Zt.lineCode,stationCode:y=Zt.stationCode,open:C=Zt.open,secondaryNames:b=Zt.secondaryNames,tram:v=Zt.tram}=null!==(t=r[l.GzmtrBasic])&&void 0!==t?t:Zt,j=n.useCallback((e=>d(s,e)),[s,d]),O=n.useCallback((e=>m(s,e)),[s,m]),w=n.useCallback((e=>c(s,e)),[s,c]),_=n.useRef(null);null===(a=_.current)||void 0===a||null===(a=a.querySelector("path"))||void 0===a||a.setAttribute("id",`stn_core_${s}`);const k={en:v?5.08:6.56,zh:v?7.29:13.13},S={top:{namesPos:1,lineHeight:k.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:k.zh,polarity:1}},N=v?11:15,z="left"===h?-N:"right"===h?N:0,M=v?8:10,A=(f[S[p].namesPos].split("\n").length*S[p].lineHeight+M)*S[p].polarity,P="left"===h?"end":"right"===h?"start":C||"middle"!==h||""!==b.join("")?"middle":"end",B=n.useRef(null),[$,W]=n.useState(0);n.useEffect((()=>{var e,t;return W(null!==(e=null===(t=B.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...b,v]);const E=n.useRef(null),[X,Y]=n.useState(0);n.useEffect((()=>{var e,t;return Y(null!==(e=null===(t=E.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...f,v]);const R="middle"===h?X/2+($+24)/2:(X+($+24)/2)*("left"===h?-1:1),I="middle"===h&&""!==b.join("")?X/2+($+24):(X+$+(0!==$?24:0))*("left"===h?-1:"right"===h?1:0);return L.jsxs("g",{id:s,transform:`translate(${o}, ${i})`,children:[L.jsx("g",{transform:`scale(${.57915*(v?.729:1)})`,onPointerDown:j,onPointerMove:O,onPointerUp:w,style:{cursor:"move"},ref:_,children:L.jsx(zt,{id:`stn_core_${s}`,strokeColour:u[2],lineNum:""===g?void 0:g,stnNum:""===y?void 0:y,textClassName:"rmp-name__zh"})}),L.jsxs("g",{ref:E,transform:`translate(${z}, ${A})`,textAnchor:P,children:[L.jsx(ye,{text:f[0].split("\n"),fontSize:k.zh,lineHeight:k.zh,grow:"up",className:"rmp-name__zh"}),L.jsx(ye,{text:f[1].split("\n"),fontSize:k.en,lineHeight:k.en,grow:"down",className:"rmp-name__en"})]}),""!==b.join("")&&L.jsxs("g",{transform:`translate(${z+R}, ${A})`,textAnchor:"middle",children:[L.jsx("text",{fontSize:"13.13",dx:-($+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),L.jsx("text",{fontSize:"13.13",dx:($+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),L.jsxs("g",{ref:B,children:[L.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:b[0]}),L.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:b[1]})]})]}),!C&&L.jsxs("g",{transform:`translate(${z+I}, ${A})`,textAnchor:"middle"===h?"start":P,children:[L.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),L.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},icon:L.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:L.jsx("g",{transform:"translate(12,12)scale(0.45)",children:L.jsx(zt,{strokeColour:"#000",lineNum:"1",stnNum:"01"})})}),defaultAttrs:Zt,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:i("panel.details.stations.common.left"),middle:i("panel.details.stations.common.middle"),right:i("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:i("panel.details.stations.common.top"),middle:i("panel.details.stations.common.middle"),bottom:i("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"custom",label:i("color"),component:L.jsx(c,{type:l.GzmtrBasic,defaultTheme:Zt.color})},{type:"input",label:i("panel.details.stations.common.lineCode"),value:n.lineCode,onChange:e=>{n.lineCode=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.common.stationCode"),value:n.stationCode,onChange:e=>{n.stationCode=e,s(t,n)},minW:"full"},{type:"switch",label:i("panel.details.stations.gzmtrBasic.open"),oneLine:!0,isChecked:n.open,onChange:e=>{n.open=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.gzmtrBasic.secondaryNameZh"),value:n.secondaryNames[0],onChange:e=>{n.secondaryNames[0]=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.gzmtrBasic.secondaryNameEn"),value:n.secondaryNames[1],onChange:e=>{n.secondaryNames[1]=e,s(t,n)},minW:"full"},{type:"switch",label:i("panel.details.stations.gzmtrBasic.tram"),oneLine:!0,isChecked:n.tram,onChange:e=>{n.tram=e,s(t,n)},minW:"full"}];return L.jsx(o,{fields:r})},metadata:{displayName:"panel.details.stations.gzmtrBasic.displayName",cities:[d.Guangzhou],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},qt=[d.Guangzhou,"","#AAAAAA",m.white,"","","gz"];function Jt(e){const{interchangeList:t,onAdd:s,onDelete:l,onUpdate:i}=e,r=y(),{paletteAppClip:{output:d}}=C((e=>e.runtime)),{t:m}=a(),[c,f]=n.useState();n.useEffect((()=>{void 0!==c&&d&&(null==i||i(c,[...d,t[c][4],t[c][5],t[c][6]]),f(void 0))}),[null==d?void 0:d.toString()]);const h=t.map(((e,t)=>[{type:"input",label:m("panel.details.stations.common.lineCode"),value:e[4],minW:"80px",onChange:n=>null==i?void 0:i(t,[e[0],e[1],e[2],e[3],n,e[5],e[6]])},{type:"input",label:m("panel.details.stations.common.stationCode"),value:e[5],minW:"80px",onChange:n=>null==i?void 0:i(t,[e[0],e[1],e[2],e[3],e[4],n,e[6]])}]));return L.jsxs(b,{direction:"column",children:[0===t.length&&L.jsxs(T,{spacing:.5,"data-testid":"interchange-card-stack",children:[L.jsx(D,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:m("panel.details.stations.interchange.noInterchanges")}),L.jsx(H,{size:"sm",variant:"ghost","aria-label":m("panel.details.stations.interchange.add"),onClick:()=>null==s?void 0:s(qt),icon:L.jsx(v,{})})]}),t.map(((e,n)=>L.jsxs(T,{spacing:.5,"data-testid":`interchange-card-stack-${n}`,children:[L.jsx(j,{label:m("color"),minW:"40px",noLabel:0!==n,children:L.jsx(O,{theme:[e[0],e[1],e[2],e[3]],onClick:()=>{f(n),r(w([e[0],e[1],e[2],e[3]]))}})}),L.jsx(o,{fields:h[n],noLabel:0!==n}),L.jsxs(U,{children:[s&&n===h.length-1?L.jsx(H,{size:"sm",variant:"ghost","aria-label":m("panel.details.stations.interchange.copy"),onClick:()=>null==s?void 0:s(t.slice(-1)[0]),icon:L.jsx(_,{})}):L.jsx(F,{minW:8}),l&&L.jsx(H,{size:"sm",variant:"ghost","aria-label":m("panel.details.stations.interchange.remove"),onClick:()=>null==l?void 0:l(n),icon:L.jsx(k,{})}),L.jsx(o,{fields:[{type:"switch",label:m("panel.details.stations.gzmtrInt.foshan"),isChecked:"fs"===e[6],onChange:t=>((e,t,n)=>null==i?void 0:i(t,[e[0],e[1],e[2],e[3],e[4],e[5],n?"fs":"gz"]))(e,n,t)}]})]})]},n)))]})}const Kt=[[[0,0]],[[0,0]],[[-21,0],[21,0]],[[-21.65,-12.5],[21.65,-12.5],[0,25]],[[-23,-18],[22,-16],[23,18],[-22,16]]],en={...x,nameOffsetX:"right",nameOffsetY:"top",transfer:[[],[]],open:!0,secondaryNames:["",""],tram:!1},tn={component:e=>{var t,a,s,o,i,r,d,m,c,f,h,p,u,g,y,C,b,v,j,O,w,_,k,S;const{id:N,x:z,y:M,attrs:A,handlePointerDown:P,handlePointerMove:B,handlePointerUp:$}=e,{names:W=x.names,nameOffsetX:E=en.nameOffsetX,nameOffsetY:X=en.nameOffsetY,transfer:Y=en.transfer,open:R=en.open,secondaryNames:I=en.secondaryNames,tram:T=en.tram}=null!==(t=A[l.GzmtrInt])&&void 0!==t?t:en,D=n.useCallback((e=>P(N,e)),[N,P]),H=n.useCallback((e=>B(N,e)),[N,B]),U=n.useCallback((e=>$(N,e)),[N,$]),F=V("white","var(--chakra-colors-gray-800)"),G={en:T?5.08:6.56,zh:T?7.29:13.13},Z={top:{namesPos:1,lineHeight:G.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:G.zh,polarity:1}},Q=T?18:25,q=("left"===E?-Q:"right"===E?Q:0)*("middle"===X?1.1:1),J=T?14:18,K=(W[Z[X].namesPos].split("\n").length*Z[X].lineHeight+J*("middle"===E?1.1:1))*Z[X].polarity,ee="left"===E?"end":"right"===E?"start":R||"middle"!==E||""!==I.join("")?"middle":"end",te=Y.flat().slice(0,4),ne=[["black","black"],[null!==(a=null===(s=te.at(0))||void 0===s?void 0:s.at(2))&&void 0!==a?a:"black",null!==(o=null===(i=te.at(0))||void 0===i?void 0:i.at(2))&&void 0!==o?o:"black"],[null!==(r=null===(d=te.at(0))||void 0===d?void 0:d.at(2))&&void 0!==r?r:"black",null!==(m=null===(c=te.at(1))||void 0===c?void 0:c.at(2))&&void 0!==m?m:"black"],[null!==(f=null===(h=te.at(0))||void 0===h?void 0:h.at(2))&&void 0!==f?f:"black",null!==(p=null===(u=te.at(1))||void 0===u?void 0:u.at(2))&&void 0!==p?p:"black",null!==(g=null===(y=te.at(2))||void 0===y?void 0:y.at(2))&&void 0!==g?g:"black"],[null!==(C=null===(b=te.at(0))||void 0===b?void 0:b.at(2))&&void 0!==C?C:"black",null!==(v=null===(j=te.at(1))||void 0===j?void 0:j.at(2))&&void 0!==v?v:"black",null!==(O=null===(w=te.at(2))||void 0===w?void 0:w.at(2))&&void 0!==O?O:"black",null!==(_=null===(k=te.at(3))||void 0===k?void 0:k.at(2))&&void 0!==_?_:"black"]],ae=n.useRef(null),[se,oe]=n.useState(0);n.useEffect((()=>{var e,t;return oe(null!==(e=null===(t=ae.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...I]);const le=n.useRef(null),[ie,re]=n.useState(0);n.useEffect((()=>{var e,t;return re(null!==(e=null===(t=le.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...W]);const de=(ie+(se+24)/2)*("left"===E?-1:1),me=(ie+se+(0!==se?24:0))*("left"===E?-1:"right"===E||0!==se?1:0),ce="middle"===E?"start":ee;return L.jsxs("g",{id:N,transform:`translate(${z}, ${M})`,children:[te.map((e=>e[2])).filter(((e,t,n)=>n.indexOf(e)===t)).map((e=>L.jsx("marker",{id:`gzmtr_int_arrow_${e}`,markerWidth:"5",markerHeight:"5",refX:"1",refY:"1.25",orient:"auto",children:L.jsx("polygon",{points:"0.25,0 0.25,2.5 2.25,1.25",fill:e})},`gzmtr_int_arrow_${e}`))),L.jsxs("g",{transform:`scale(${.57915*(T?.729:1)})`,children:[te.length<=2&&L.jsxs(L.Fragment,{children:[L.jsx("path",{d:"M -21,-15 A 28 28 0 0 1 21,-15 L 21,15 A 28 28 0 0 1 -21,15 Z",fill:F}),L.jsx("path",{d:"M -21,-15 A 28 28 0 0 1 21,-15",fill:"none",stroke:ne[te.length][0],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),L.jsx("path",{d:"M 21,15 A 28 28 0 0 1 -21,15",fill:"none",stroke:ne[te.length][1],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`})]}),3===te.length&&L.jsxs(L.Fragment,{children:[L.jsx("circle",{r:"25",fill:F}),L.jsx("path",{d:"M -21.65,12.5 A 25 25 0 0 1 0,-25",fill:"none",stroke:ne[te.length][0],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),L.jsx("path",{d:"M 0,-25 A 25 25 0 0 1 21.65,12.5",fill:"none",stroke:ne[te.length][1],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`}),L.jsx("path",{d:"M 21.65,12.5 A 25 25 0 0 1 -21.65,12.5",fill:"none",stroke:ne[te.length][2],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][2]})`}),L.jsx("path",{d:"M -21.65,12.5 A 25 25 0 0 1 0,-25",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),L.jsx("path",{d:"M 0,-25 A 25 25 0 0 1 21.65,12.5",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`})]}),te.length>=4&&L.jsxs(L.Fragment,{children:[L.jsx("circle",{r:"25",fill:F}),L.jsx("path",{d:"M -25,0 A 25 25 0 0 1 0,-25",fill:"none",stroke:ne[te.length][0],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),L.jsx("path",{d:"M 0,-25 A 25 25 0 0 1 25,0",fill:"none",stroke:ne[te.length][1],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`}),L.jsx("path",{d:"M 25,0 A 25 25 0 0 1 0,25",fill:"none",stroke:ne[te.length][2],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][2]})`}),L.jsx("path",{d:"M 0,25 A 25 25 0 0 1 -25,0",fill:"none",stroke:ne[te.length][3],strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][3]})`}),L.jsx("path",{d:"M -25,0 A 25 25 0 0 1 0,-25",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][0]})`}),L.jsx("path",{d:"M 0,-25 A 25 25 0 0 1 25,0",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][1]})`}),L.jsx("path",{d:"M 25,0 A 25 25 0 0 1 0,25",fill:"none",strokeOpacity:"0",stroke:"white",strokeWidth:"5",markerEnd:`url(#gzmtr_int_arrow_${ne[te.length][2]})`})]}),null===(S=Y[0])||void 0===S?void 0:S.map(((e,t,n)=>L.jsx("g",{transform:`translate(${Kt[n.length][t][0]},${Kt[n.length][t][1]})`,children:"gz"===e[6]?L.jsx(zt,{strokeColour:e[2],lineNum:e[4],stnNum:e[5],textClassName:"rmp-name__zh"}):L.jsx(St,{strokeColour:e[2],lineNum:e[4],stnNum:e[5],textClassName:"rmp-name__zh"})},`gzmtr_int_${N}_stn_${t}`))),L.jsx("circle",{id:`stn_core_${N}`,r:"25",fill:"white",fillOpacity:"0",onPointerDown:D,onPointerMove:H,onPointerUp:U,style:{cursor:"move"},className:"removeMe"})]}),L.jsxs("g",{ref:le,transform:`translate(${q}, ${K})`,textAnchor:ee,children:[L.jsx(ye,{text:W[0].split("\\"),fontSize:G.zh,lineHeight:G.zh,grow:"up",className:"rmp-name__zh"}),L.jsx(ye,{text:W[1].split("\\"),fontSize:G.en,lineHeight:G.en,grow:"down",className:"rmp-name__en"})]}),""!==I.join("")&&L.jsxs("g",{transform:`translate(${q+de}, ${K})`,textAnchor:"middle",children:[L.jsx("text",{fontSize:"13.13",dx:-(se+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),L.jsx("text",{fontSize:"13.13",dx:(se+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),L.jsxs("g",{ref:ae,children:[L.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:I[0]}),L.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:I[1]})]})]}),!R&&L.jsxs("g",{transform:`translate(${q+me}, ${K})`,textAnchor:ce,children:[L.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),L.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},icon:L.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[L.jsx("g",{transform:"translate(6,12)scale(0.3)",children:L.jsx(zt,{strokeColour:"currentColor",lineNum:"1",stnNum:"09"})}),L.jsx("g",{transform:"translate(18,12)scale(0.3)",children:L.jsx(zt,{strokeColour:"currentColor",lineNum:"2",stnNum:"13"})}),L.jsx("marker",{id:"arrow",markerWidth:"5",markerHeight:"5",refX:"1",refY:"1.25",orient:"auto",children:L.jsx("polygon",{points:"0,0 0,3 2,1.5"})}),L.jsx("path",{d:"M 6,6 A 8 8 0 0 1 18,6",fill:"none",stroke:"currentColor",strokeWidth:"2",markerEnd:"url(#arrow)"}),L.jsx("path",{d:"M 18,18 A 8 8 0 0 1 6,18",fill:"none",stroke:"currentColor",strokeWidth:"2",markerEnd:"url(#arrow)"})]}),defaultAttrs:en,attrsComponent:e=>{var t;const{id:s,attrs:l,handleAttrsUpdate:i}=e,{t:r}=a(),d=[{type:"textarea",label:r("panel.details.stations.common.nameZh"),value:l.names[0],onChange:e=>{l.names[0]=e,i(s,l)},minW:"full"},{type:"textarea",label:r("panel.details.stations.common.nameEn"),value:l.names[1],onChange:e=>{l.names[1]=e,i(s,l)},minW:"full"},{type:"select",label:r("panel.details.stations.common.nameOffsetX"),value:l.nameOffsetX,options:{left:r("panel.details.stations.common.left"),middle:r("panel.details.stations.common.middle"),right:r("panel.details.stations.common.right")},disabledOptions:"middle"===l.nameOffsetY?["middle"]:[],onChange:e=>{l.nameOffsetX=e,i(s,l)},minW:"full"},{type:"select",label:r("panel.details.stations.common.nameOffsetY"),value:l.nameOffsetY,options:{top:r("panel.details.stations.common.top"),middle:r("panel.details.stations.common.middle"),bottom:r("panel.details.stations.common.bottom")},disabledOptions:"middle"===l.nameOffsetX?["middle"]:[],onChange:e=>{l.nameOffsetY=e,i(s,l)},minW:"full"},{type:"switch",label:r("panel.details.stations.gzmtrInt.open"),oneLine:!0,isChecked:l.open,onChange:e=>{l.open=e,i(s,l)},minW:"full"},{type:"input",label:r("panel.details.stations.gzmtrInt.secondaryNameZh"),value:l.secondaryNames[0],onChange:e=>{l.secondaryNames[0]=e,i(s,l)},minW:"full"},{type:"input",label:r("panel.details.stations.gzmtrInt.secondaryNameEn"),value:l.secondaryNames[1],onChange:e=>{l.secondaryNames[1]=e.toString(),i(s,l)},minW:"full"},{type:"switch",label:r("panel.details.stations.gzmtrBasic.tram"),oneLine:!0,isChecked:l.tram,onChange:e=>{l.tram=e,i(s,l)},minW:"full"}],m=[4,4,0],c=null!==(t=l.transfer)&&void 0!==t?t:en.transfer,f=e=>t=>{const n=structuredClone(c);if(n.length<=e)for(let a=n.length;a<=e;a++)n[a]=[qt];n[e].push(t),l.transfer=n,i(s,l)},h=e=>(t,n)=>{if(c.length>e&&c[e].length>t){const a=c.map(((a,s)=>s===e?a.map(((e,a)=>a===t?[0,1,2,3,4,5,6].map((t=>void 0===n[t]?e[t]:n[t])):e)):a));l.transfer=a,i(s,l)}};return L.jsxs(L.Fragment,{children:[L.jsx(o,{fields:d}),L.jsx(j,{label:r("panel.details.stations.interchange.title"),children:L.jsxs(U,{align:"flex-start",children:[c.map(((e,t)=>{return L.jsxs(n.Fragment,{children:[L.jsx(G,{size:"xs",children:r(0===t?"panel.details.stations.interchange.within":1===t?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),L.jsx(Jt,{interchangeList:e,onAdd:m[t]>e.length?f(t):void 0,onDelete:(a=t,e=>{if(c.length>a&&c[a].length>e){const t=c.map(((t,n)=>n===a?t.filter(((t,n)=>n!==e)):t));l.transfer=t,i(s,l)}}),onUpdate:h(t)})]},t);var a})),m[c.length]>0&&L.jsx(Z,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:L.jsx(v,{}),onClick:()=>f(c.length)(qt),children:r("panel.details.stations.interchange.addGroup")})]})})]})},metadata:{displayName:"panel.details.stations.gzmtrInt.displayName",cities:[d.Guangzhou],canvas:[u.RailMap],categories:[g.Metro],tags:[]}};var nn=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,s,o=n.call(e),l=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)l.push(a.value)}catch(i){s={error:i}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(s)throw s.error}}return l};const an=6.56,sn=13.13,on=structuredClone(Ce);on.top.lineHeight=an,on.bottom.lineHeight=sn;const ln={...x,nameOffsetX:"right",nameOffsetY:"top",transfer:[[[d.Guangzhou,"gz1","#F3D03E",m.white,"1","14","gz"],[d.Guangzhou,"gz3","#ECA154",m.white,"3","11","gz"]]],open:!0,secondaryNames:["",""],columns:2,topHeavy:!1,anchorAt:-1,osiPosition:"none"},rn={component:e=>{var t,a,s,o,i,r,d;const{id:m,x:c,y:f,attrs:h,handlePointerDown:p,handlePointerMove:u,handlePointerUp:g}=e,{names:y=x.names,nameOffsetX:C=ln.nameOffsetX,nameOffsetY:b=ln.nameOffsetY,transfer:v=ln.transfer,open:j=ln.open,secondaryNames:O=ln.secondaryNames,columns:w=ln.columns,topHeavy:_=ln.topHeavy,anchorAt:k=ln.anchorAt,osiPosition:S=ln.osiPosition}=null!==(t=h[l.GzmtrInt2024])&&void 0!==t?t:ln,N=n.useCallback((e=>p(m,e)),[m,p]),z=n.useCallback((e=>u(m,e)),[m,u]),M=n.useCallback((e=>g(m,e)),[m,g]),A=v.flat().slice(0,5),P=A.map((e=>({style:"gz"===e[6]?"gzmtr":"fmetro",lineNum:e[4],stnNum:e[5],strokeColour:e[2]}))),[B,$]=n.useState(),[W,E]=n.useState([0,0]),X=n.useRef(null);n.useEffect((()=>{X.current&&($(X.current.getCorrectedBBox()),E(X.current.getTranslate()))}),[X.current,A.length,w,_,k]);const Y={x1:(null!==(a=null==B?void 0:B.x)&&void 0!==a?a:0)+W[0],y1:(null!==(s=null==B?void 0:B.y)&&void 0!==s?s:0)+W[1],x2:(null!==(o=null==B?void 0:B.x)&&void 0!==o?o:0)+(null!==(i=null==B?void 0:B.width)&&void 0!==i?i:0)+W[0],y2:(null!==(r=null==B?void 0:B.y)&&void 0!==r?r:0)+(null!==(d=null==B?void 0:B.height)&&void 0!==d?d:0)+W[1]},{update:R}=n.useContext(vt);n.useEffect((()=>{document.fonts.load("12px Arial","ABCDEFG123456").finally((()=>setTimeout(R,100)))}),[]);const I=.6*("left"===C?Y.x1:"right"===C?Y.x2:0),T=y[on[b].namesPos].split("\n").length*on[b].lineHeight*on[b].polarity+.6*("top"===b?Y.y1:"bottom"===b?Y.y2:0),D="left"===C?"end":"right"===C?"start":j||"middle"!==C||""!==O.join("")?"middle":"end",H=n.useRef(null),[U,F]=n.useState(0);n.useEffect((()=>{var e,t;return F(null!==(e=null===(t=H.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...O]);const V=n.useRef(null),[G,Z]=n.useState(0);n.useEffect((()=>{var e,t;return Z(null!==(e=null===(t=V.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...y]);const Q=(G+(U+24)/2)*("left"===C?-1:1),q=(G+U+(0!==U?24:0))*("left"===C?-1:"right"===C||0!==U?1:0),J="middle"===C?"start":D;return L.jsxs("g",{id:m,transform:`translate(${c}, ${f})`,children:[L.jsxs("g",{transform:"scale(0.56)",children:[L.jsx(It,{ref:X,stations:P,textClassName:"rmp-name__zh",columns:w,topHeavy:_,anchorAt:k>=0?k:void 0,osiPosition:2===v.flat().length&&1===w&&"none"!==S?S:void 0}),L.jsx("rect",{id:`stn_core_${m}`,x:Y.x1,y:Y.y1,width:Y.x2-Y.x1,height:Y.y2-Y.y1,fill:"white",fillOpacity:"0",onPointerDown:N,onPointerMove:z,onPointerUp:M,style:{cursor:"move"},className:"removeMe"})]}),L.jsxs("g",{ref:V,transform:`translate(${I}, ${T})`,textAnchor:D,children:[L.jsx(ye,{text:y[0].split("\n"),fontSize:13.13,lineHeight:13.13,grow:"up",className:"rmp-name__zh"}),L.jsx(ye,{text:y[1].split("\n"),fontSize:6.56,lineHeight:6.56,grow:"down",className:"rmp-name__en"})]}),""!==O.join("")&&L.jsxs("g",{transform:`translate(${I+Q}, ${T})`,textAnchor:"middle",children:[L.jsx("text",{fontSize:"13.13",dx:-(U+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),L.jsx("text",{fontSize:"13.13",dx:(U+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),L.jsxs("g",{ref:H,children:[L.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:O[0]}),L.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:O[1]})]})]}),!j&&L.jsxs("g",{transform:`translate(${I+q}, ${T})`,textAnchor:J,children:[L.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),L.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},icon:L.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:L.jsx(It,{stations:[{strokeColour:"currentColor",lineNum:"3",stnNum:"03"},{strokeColour:"currentColor",lineNum:"7",stnNum:"05"}],textClassName:"rmp-name__zh",columns:1,transform:"translate(12,12)scale(0.3)"})}),defaultAttrs:ln,attrsComponent:e=>{var t,s;const{id:l,attrs:i,handleAttrsUpdate:r}=e,{t:d}=a(),m=[{type:"textarea",label:d("panel.details.stations.common.nameZh"),value:i.names[0],onChange:e=>{i.names[0]=e,r(l,i)},minW:"full"},{type:"textarea",label:d("panel.details.stations.common.nameEn"),value:i.names[1],onChange:e=>{i.names[1]=e,r(l,i)},minW:"full"},{type:"select",label:d("panel.details.stations.common.nameOffsetX"),value:i.nameOffsetX,options:{left:d("panel.details.stations.common.left"),middle:d("panel.details.stations.common.middle"),right:d("panel.details.stations.common.right")},disabledOptions:"middle"===i.nameOffsetY?["middle"]:[],onChange:e=>{i.nameOffsetX=e,r(l,i)},minW:"full"},{type:"select",label:d("panel.details.stations.common.nameOffsetY"),value:i.nameOffsetY,options:{top:d("panel.details.stations.common.top"),middle:d("panel.details.stations.common.middle"),bottom:d("panel.details.stations.common.bottom")},disabledOptions:"middle"===i.nameOffsetX?["middle"]:[],onChange:e=>{i.nameOffsetY=e,r(l,i)},minW:"full"},{type:"slider",label:d("panel.details.stations.gzmtrInt2024.columns"),value:i.columns,min:1,max:Math.min(5,i.transfer.flat().length),step:1,onChange:e=>{i.columns=e,r(l,i)},leftIcon:L.jsx(S,{}),rightIcon:L.jsx(v,{}),minW:"full"},{type:"switch",label:d("panel.details.stations.gzmtrInt2024.topHeavy"),oneLine:!0,isChecked:i.topHeavy,onChange:e=>{i.topHeavy=e,r(l,i)},minW:"full"},{type:"select",label:d("panel.details.stations.gzmtrInt2024.anchorAt"),value:null!==(t=i.anchorAt)&&void 0!==t?t:"-1",options:{"-1":d("panel.details.stations.gzmtrInt2024.anchorAtNone"),...Object.fromEntries(Array.from({length:Math.min(i.transfer.flat().length,4)},((e,t)=>[t.toString(),t])))},onChange:e=>{i.anchorAt=Number(e),r(l,i)},minW:"full"},{type:"select",label:d("panel.details.stations.gzmtrInt2024.osiPosition"),value:i.osiPosition,options:{none:d("panel.details.stations.gzmtrInt2024.osiPositionNone"),left:d("panel.details.stations.gzmtrInt2024.osiPositionLeft"),right:d("panel.details.stations.gzmtrInt2024.osiPositionRight")},onChange:e=>{i.osiPosition=e,r(l,i)},hidden:!(2===i.transfer.flat().length&&1===i.columns),minW:"full"},{type:"switch",label:d("panel.details.stations.gzmtrInt.open"),oneLine:!0,isChecked:i.open,onChange:e=>{i.open=e,r(l,i)},minW:"full"},{type:"input",label:d("panel.details.stations.gzmtrInt.secondaryNameZh"),value:i.secondaryNames[0],onChange:e=>{i.secondaryNames[0]=e,r(l,i)},minW:"full"},{type:"input",label:d("panel.details.stations.gzmtrInt.secondaryNameEn"),value:i.secondaryNames[1],onChange:e=>{i.secondaryNames[1]=e.toString(),r(l,i)},minW:"full"}],c=[5,0,0],f=null!==(s=i.transfer)&&void 0!==s?s:ln.transfer,h=e=>t=>{if(f.length>e&&f[e].length>t){const n=f.map(((n,a)=>a===e?n.filter(((e,n)=>n!==t)):n));i.transfer=n,i.anchorAt=-1,r(l,i)}},p=e=>(t,n)=>{if(f.length>e&&f[e].length>t){const a=f.map(((a,s)=>s===e?a.map(((e,a)=>a===t?[0,1,2,3,4,5,6].map((t=>void 0===n[t]?e[t]:n[t])):e)):a));i.transfer=a,r(l,i)}};return L.jsxs(L.Fragment,{children:[L.jsx(o,{fields:m}),L.jsx(j,{label:d("panel.details.stations.interchange.title"),children:L.jsx(U,{align:"flex-start",children:f.map(((e,t)=>{return L.jsxs(n.Fragment,{children:[L.jsx(G,{size:"xs",children:d(0===t?"panel.details.stations.interchange.within":1===t?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),L.jsx(Jt,{interchangeList:e,onAdd:c[t]>e.length?(a=t,e=>{const t=structuredClone(f);if(t.length<=a)for(let n=t.length;n<=a;n++)t[n]=[qt];t[a].push(e),i.transfer=t,r(l,i)}):void 0,onDelete:h(t),onUpdate:p(t)})]},t);var a}))})})]})},metadata:{displayName:"panel.details.stations.gzmtrInt2024.displayName",cities:[d.Guangzhou],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},dn={zh:9,en:6.2,top:7.2,middle:0,bottom:10},mn={...x,nameOffsetX:"right",nameOffsetY:"top",open:!0},cn=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:e=>(null!=e?e:mn).names[0],onChange:(e,t)=>{const n=null!=t?t:mn;return n.names[0]=e.toString(),n}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:e=>(null!=e?e:mn).names[1],onChange:(e,t)=>{const n=null!=t?t:mn;return n.names[1]=e.toString(),n}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:e=>(null!=e?e:mn).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetY)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:mn;return n.nameOffsetX=e,n}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:e=>(null!=e?e:mn).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetX)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:mn;return n.nameOffsetY=e,n}},{type:"switch",label:"panel.details.stations.bjsubwayBasic.open",oneLine:!0,isChecked:e=>(null!=e?e:mn).open,onChange:(e,t)=>{const n=null!=t?t:mn;return n.open=e,n}}],fn={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:f=mn.nameOffsetX,nameOffsetY:h=mn.nameOffsetY,open:p=mn.open}=null!==(t=i[l.BjsubwayBasic])&&void 0!==t?t:mn,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),y=n.useCallback((e=>m(a,e)),[a,m]),[C,b]=(j=h,"left"===(v=f)&&"top"===j?[-4,-(c[1].split("\n").length+(p?0:1))*dn[j]-1]:"middle"===v&&"top"===j?[0,-(c[1].split("\n").length+(p?0:1))*dn[j]-4]:"right"===v&&"top"===j?[4,-(c[1].split("\n").length+(p?0:1))*dn[j]-1]:"left"===v&&"bottom"===j?[-4,c[0].split("\n").length*dn[j]+1]:"middle"===v&&"bottom"===j?[0,c[0].split("\n").length*dn[j]+4]:"right"===v&&"bottom"===j?[4,c[0].split("\n").length*dn[j]+1]:"left"===v&&"middle"===j?[-5,0]:"right"===v&&"middle"===j?[5,0]:[0,0]);var v,j;const O="left"===f?"end":"right"===f?"start":"middle";return L.jsxs("g",{id:a,transform:`translate(${s}, ${o})`,children:[L.jsx("circle",{id:`stn_core_${a}`,r:"4",stroke:"black",strokeWidth:"0.5",strokeDasharray:p?void 0:"1.5",fill:"white",onPointerDown:u,onPointerMove:g,onPointerUp:y,style:{cursor:"move"}}),L.jsxs("g",{transform:`translate(${C}, ${b})`,textAnchor:O,children:[L.jsx(ye,{text:c[0].split("\n"),fontSize:dn.zh,lineHeight:dn.zh,grow:"up",className:"rmp-name__zh",baseOffset:1}),L.jsx(ye,{text:c[1].split("\n"),fontSize:dn.en,lineHeight:dn.en,grow:"down",className:"rmp-name__en",baseOffset:1}),!p&&L.jsx("text",{dy:c[1].split("\n").length*dn.en+2,fontSize:dn.en,dominantBaseline:"hanging",className:"rmp-name__zh",children:"(暂缓开通)"})]})]})},icon:L.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:L.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none"})}),defaultAttrs:mn,attrsComponent:()=>L.jsx(N,{fields:cn}),metadata:{displayName:"panel.details.stations.bjsubwayBasic.displayName",cities:[d.Beijing],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},hn="M 8.359893 4.159288 C 8.368828 4.168825 8.460953 4.26852 8.57038 4.386985 C 8.679807 4.505449 8.860802 4.701382 8.972592 4.822389 C 9.084381 4.943397 9.238666 5.110407 9.315445 5.193521 C 9.392224 5.276636 9.519867 5.414817 9.599094 5.500589 C 9.678323 5.58636 9.801023 5.719209 9.871761 5.795812 C 9.942499 5.872413 10.000208 5.935256 9.999999 5.935465 C 9.999792 5.935671 9.975513 5.928466 9.946045 5.919453 C 9.916577 5.910439 9.831826 5.88438 9.757708 5.861543 C 9.683591 5.838706 9.532284 5.791997 9.421472 5.757746 C 9.310658 5.723495 9.190374 5.686309 9.154173 5.675113 C 9.11797 5.663918 9.048485 5.642428 8.99976 5.627359 C 8.951035 5.612291 8.910275 5.599729 8.909181 5.599446 C 8.907193 5.59893 8.907193 5.59893 8.907135 5.798288 C 8.907103 5.907935 8.906695 6.128369 8.906229 6.288144 C 8.905446 6.555825 8.905249 6.580968 8.903705 6.608245 C 8.902784 6.624527 8.90139 6.647987 8.900606 6.660379 C 8.899822 6.672773 8.898192 6.695836 8.896983 6.711632 C 8.895774 6.727427 8.893582 6.753074 8.892114 6.768627 C 8.890645 6.784179 8.888061 6.80923 8.88637 6.824296 C 8.884679 6.839362 8.88172 6.864065 8.879793 6.879189 C 8.877868 6.894315 8.874691 6.917777 8.872734 6.931325 C 8.870777 6.944874 8.867386 6.967292 8.865197 6.981143 C 8.863009 6.994995 8.859045 7.018654 8.856388 7.03372 C 8.853731 7.048786 8.849344 7.072617 8.84664 7.086676 C 8.843935 7.100736 8.839338 7.1236 8.836424 7.137486 C 8.833509 7.151371 8.828584 7.174065 8.825479 7.187916 C 8.822371 7.201767 8.817014 7.224831 8.81357 7.239167 C 8.810127 7.253505 8.80431 7.276767 8.800644 7.29086 C 8.796978 7.304955 8.791035 7.327222 8.787437 7.340344 C 8.78384 7.353467 8.77752 7.375735 8.773395 7.389829 C 8.769268 7.403923 8.762319 7.426986 8.757952 7.441081 C 8.753583 7.455174 8.746363 7.47784 8.741903 7.491448 C 8.737446 7.505056 8.729829 7.527523 8.724978 7.541374 C 8.720126 7.555225 8.712182 7.577493 8.707321 7.590858 C 8.702462 7.604224 8.6948 7.624901 8.690294 7.636807 C 8.68579 7.648715 8.677304 7.670452 8.671437 7.685113 C 8.665571 7.699773 8.656536 7.721842 8.651362 7.734155 C 8.646187 7.746468 8.63796 7.765688 8.63308 7.776865 C 8.628201 7.788043 8.620145 7.806136 8.615178 7.817071 C 8.610211 7.828006 8.60083 7.848286 8.594332 7.862138 C 8.587832 7.875988 8.573873 7.904618 8.563307 7.92576 C 8.552743 7.946901 8.537873 7.975929 8.530265 7.990266 C 8.522656 8.004602 8.511053 8.026075 8.504479 8.037983 C 8.497905 8.04989 8.486739 8.069772 8.479666 8.082165 C 8.472593 8.094558 8.460988 8.11444 8.453878 8.126348 C 8.446768 8.138254 8.435438 8.156944 8.428702 8.167879 C 8.421966 8.178814 8.410628 8.196906 8.403507 8.208085 C 8.396386 8.219262 8.384013 8.238349 8.37601 8.2505 C 8.36801 8.26265 8.354345 8.282929 8.345645 8.295566 C 8.336946 8.308201 8.322885 8.328276 8.314397 8.340175 C 8.305909 8.352074 8.292209 8.37096 8.283951 8.382147 C 8.275693 8.393333 8.261178 8.41259 8.251695 8.42494 C 8.242211 8.437289 8.225837 8.458165 8.215304 8.471332 C 8.204773 8.484497 8.189062 8.503819 8.18039 8.514267 C 8.17172 8.524716 8.157459 8.541616 8.148703 8.551823 C 8.139945 8.562029 8.125004 8.579116 8.115499 8.589793 C 8.105992 8.600471 8.091457 8.616575 8.083197 8.625581 C 8.074937 8.634586 8.060843 8.649709 8.05188 8.659185 C 8.042916 8.668662 8.018659 8.69335 7.997974 8.714046 C 7.977291 8.734741 7.953162 8.758432 7.944355 8.766693 C 7.935549 8.774953 7.920821 8.788638 7.911628 8.797104 C 7.902433 8.805571 7.887569 8.819082 7.878597 8.827129 C 7.869623 8.835177 7.853733 8.849096 7.843284 8.858062 C 7.832834 8.867027 7.816133 8.881153 7.806171 8.889453 C 7.796208 8.897753 7.779904 8.911098 7.769942 8.919111 C 7.759978 8.927123 7.743874 8.939848 7.734154 8.947388 C 7.724434 8.954926 7.708329 8.96721 7.698366 8.974683 C 7.688403 8.982156 7.673093 8.993497 7.664346 8.999885 C 7.655598 9.006271 7.637505 9.019163 7.62414 9.02853 C 7.610775 9.037899 7.588109 9.053377 7.573772 9.062926 C 7.559434 9.072475 7.538474 9.086151 7.527194 9.093318 C 7.515913 9.100485 7.497422 9.112045 7.486104 9.119009 C 7.474786 9.125973 7.454846 9.137918 7.441793 9.145553 C 7.428741 9.153188 7.405677 9.166317 7.390542 9.174728 C 7.375406 9.18314 7.352087 9.19579 7.338722 9.20284 C 7.325357 9.209889 7.303686 9.221025 7.290564 9.227587 C 7.277442 9.234147 7.256366 9.2444 7.243731 9.250369 C 7.231095 9.256339 7.211213 9.265569 7.199549 9.27088 C 7.187884 9.27619 7.168797 9.28464 7.157134 9.289659 C 7.145469 9.294676 7.124792 9.303333 7.111184 9.308895 C 7.097576 9.31446 7.075367 9.323255 7.061831 9.328442 C 7.048295 9.333629 7.027816 9.341289 7.016323 9.345462 C 7.00483 9.349636 6.978328 9.358748 6.95743 9.365711 C 6.936532 9.372675 6.906311 9.382359 6.890272 9.38723 C 6.874235 9.392101 6.849581 9.399302 6.835486 9.403231 C 6.821393 9.40716 6.796739 9.413705 6.7807 9.417776 C 6.764662 9.421847 6.740208 9.427785 6.726356 9.430971 C 6.712505 9.434157 6.689641 9.439174 6.675548 9.442118 C 6.661452 9.445063 6.639384 9.449434 6.626504 9.451833 C 6.613625 9.454231 6.591038 9.458187 6.57631 9.460623 C 6.561581 9.463058 6.538518 9.46664 6.525058 9.468584 C 6.511598 9.470528 6.487662 9.473704 6.471867 9.475644 C 6.456071 9.477583 6.433207 9.480169 6.421057 9.481392 C 6.408907 9.482615 6.387236 9.4846 6.372898 9.485805 C 6.358561 9.487008 6.333112 9.488794 6.316345 9.489771 C 6.299578 9.490749 6.276316 9.491956 6.264652 9.492452 C 6.252987 9.492949 6.216803 9.493517 6.18424 9.493716 C 6.151678 9.493916 6.114499 9.493756 6.10162 9.493363 C 6.088739 9.49297 6.06866 9.492202 6.056995 9.491656 C 6.045331 9.491112 6.026046 9.490059 6.014138 9.489319 C 6.002231 9.488579 5.982548 9.487186 5.970398 9.486226 C 5.958248 9.485266 5.939956 9.483668 5.92975 9.482677 C 5.919544 9.481687 5.902445 9.479897 5.891753 9.478702 C 5.881061 9.477505 5.864443 9.475529 5.854823 9.47431 C 5.845204 9.47309 5.827708 9.470707 5.815943 9.469012 C 5.804178 9.467319 5.784412 9.464314 5.77202 9.462336 C 5.759627 9.460358 5.745908 9.458071 5.741535 9.457253 C 5.733583 9.455767 5.733583 9.455767 5.750813 9.451963 C 5.76029 9.449871 5.778183 9.445793 5.790576 9.442902 C 5.802969 9.440009 5.82305 9.435088 5.8352 9.431966 C 5.847351 9.428843 5.867067 9.423503 5.879014 9.420099 C 5.890961 9.416695 5.911639 9.410524 5.924964 9.406386 C 5.938288 9.402248 5.960324 9.395124 5.973932 9.390556 C 5.98754 9.385988 6.008053 9.378835 6.019516 9.374659 C 6.030978 9.370483 6.050462 9.363131 6.062815 9.358321 C 6.075166 9.353508 6.094417 9.34577 6.105595 9.341125 C 6.116774 9.336478 6.135264 9.328524 6.146685 9.323448 C 6.158106 9.318373 6.177591 9.309499 6.189984 9.303728 C 6.202377 9.297957 6.224247 9.287379 6.238585 9.280221 C 6.252921 9.273063 6.273399 9.262563 6.284092 9.256887 C 6.294784 9.251213 6.314865 9.240225 6.328716 9.232468 C 6.342567 9.224712 6.361654 9.213777 6.371131 9.208166 C 6.380608 9.202557 6.396514 9.192982 6.406477 9.18689 C 6.41644 9.180798 6.432345 9.170843 6.441822 9.164769 C 6.4513 9.158695 6.467404 9.14816 6.47761 9.141357 C 6.487816 9.134555 6.50392 9.123611 6.513398 9.117039 C 6.522875 9.110467 6.539177 9.098936 6.549627 9.091415 C 6.560077 9.083895 6.577971 9.070704 6.589391 9.062101 C 6.600812 9.053498 6.618895 9.039583 6.629575 9.031179 C 6.640255 9.022773 6.656757 9.009534 6.666247 9.001758 C 6.675736 8.993981 6.692227 8.980227 6.702893 8.971191 C 6.713559 8.962157 6.730458 8.94742 6.740448 8.938442 C 6.750437 8.929464 6.766562 8.914768 6.776282 8.905784 C 6.786003 8.896801 6.803698 8.880239 6.815604 8.868983 C 6.827512 8.857727 6.843456 8.842402 6.851037 8.834927 C 6.858617 8.827451 6.873728 8.812176 6.884615 8.800982 C 6.895503 8.789788 6.912683 8.77174 6.922792 8.760878 C 6.932902 8.750012 6.949699 8.731606 6.960117 8.719973 C 6.970537 8.70834 6.986147 8.690599 6.994807 8.68055 C 7.003467 8.670501 7.017852 8.65353 7.026772 8.642838 C 7.035693 8.632146 7.053 8.610872 7.065231 8.595562 C 7.077464 8.580254 7.09533 8.557407 7.104936 8.544792 C 7.114541 8.532177 7.129989 8.511499 7.139265 8.498842 C 7.14854 8.486185 7.164221 8.464337 7.174109 8.450293 C 7.183999 8.436249 7.199718 8.413383 7.209044 8.399484 C 7.218369 8.385583 7.232209 8.364666 7.2398 8.353003 C 7.247391 8.341338 7.260236 8.321177 7.268346 8.3082 C 7.276455 8.295223 7.289493 8.27395 7.297318 8.260925 C 7.305143 8.247901 7.317313 8.227304 7.32436 8.215153 C 7.331408 8.203004 7.344023 8.180735 7.352394 8.165669 C 7.360765 8.150602 7.372812 8.128534 7.379167 8.116627 C 7.385522 8.104719 7.396764 8.083248 7.404151 8.06891 C 7.411537 8.054573 7.422352 8.0331 7.428184 8.021194 C 7.434016 8.009287 7.443347 7.990001 7.448918 7.978336 C 7.45449 7.966672 7.463351 7.947784 7.468609 7.936364 C 7.473868 7.924943 7.482234 7.906453 7.4872 7.895274 C 7.492166 7.884096 7.500586 7.86481 7.505909 7.852417 C 7.511233 7.840024 7.519759 7.819808 7.524855 7.807493 C 7.529951 7.795179 7.538242 7.7747 7.543279 7.761986 C 7.548316 7.749271 7.556671 7.727735 7.561847 7.714127 C 7.567022 7.700519 7.57545 7.677853 7.580575 7.663759 C 7.585701 7.649664 7.594637 7.624414 7.600433 7.607646 C 7.60623 7.59088 7.615365 7.563642 7.620735 7.547118 C 7.626104 7.530593 7.634661 7.503554 7.63975 7.48703 C 7.644838 7.470506 7.653173 7.442472 7.658273 7.424733 C 7.663371 7.406994 7.671309 7.378562 7.675913 7.361553 C 7.680518 7.344542 7.688414 7.314123 7.69346 7.293953 C 7.698508 7.273784 7.705483 7.244955 7.708961 7.229889 C 7.712439 7.214823 7.717614 7.19176 7.720461 7.178638 C 7.723308 7.165516 7.728016 7.143247 7.730923 7.129154 C 7.733829 7.115059 7.738621 7.090804 7.74157 7.075251 C 7.74452 7.0597 7.749294 7.033455 7.752179 7.016931 C 7.755066 7.000407 7.759431 6.974154 7.761884 6.958592 C 7.764333 6.94303 7.768123 6.917978 7.770304 6.902922 C 7.772485 6.887866 7.775877 6.86322 7.777843 6.848155 C 7.779809 6.833088 7.783001 6.807043 7.784938 6.790275 C 7.786876 6.773509 7.789651 6.74806 7.791106 6.733722 C 7.792561 6.719385 7.794953 6.693936 7.796421 6.677169 C 7.797888 6.660402 7.800071 6.632964 7.801272 6.616198 C 7.802474 6.599431 7.804076 6.575174 7.804832 6.562295 C 7.80559 6.549416 7.806592 6.532119 7.807061 6.523856 C 7.807529 6.515595 7.80835 6.421553 7.808886 6.314875 C 7.809421 6.208197 7.809724 6.003942 7.80956 5.860975 C 7.809398 5.718009 7.809015 5.600789 7.808712 5.600486 C 7.808408 5.600182 7.68663 5.63752 7.538092 5.68346 C 7.389553 5.7294 7.213946 5.783698 7.147853 5.804122 C 7.08176 5.824546 6.974794 5.857548 6.910151 5.877461 C 6.845508 5.897371 6.776261 5.918652 6.75627 5.924749 C 6.736279 5.930848 6.719744 5.935658 6.719525 5.93544 C 6.719306 5.935221 6.790938 5.857274 6.878708 5.762224 C 6.966477 5.667175 7.110461 5.511271 7.198671 5.415771 C 7.286881 5.320272 7.433807 5.161213 7.525173 5.062309 C 7.616539 4.963404 7.76605 4.801562 7.857421 4.702663 C 7.948792 4.603762 8.093983 4.446596 8.180069 4.353404 C 8.266154 4.260212 8.341831 4.178411 8.34824 4.171626 L 8.359893 4.159288 Z M 3.639928 8.15987 C 3.639606 8.15984 3.567056 8.081517 3.478708 7.985821 C 3.390359 7.890125 3.197014 7.680786 3.049051 7.520623 C 2.901089 7.36046 2.662314 7.101986 2.518441 6.946236 C 2.374568 6.790486 2.198977 6.60038 2.128238 6.523779 C 2.0575 6.447177 1.999793 6.384333 2 6.384126 C 2.000208 6.383919 2.024487 6.391125 2.053954 6.40014 C 2.083422 6.409154 2.157237 6.431839 2.217988 6.450549 C 2.278738 6.469259 2.375968 6.499262 2.434052 6.517222 C 2.492137 6.535182 2.553174 6.55407 2.569692 6.559195 C 2.586209 6.564321 2.709718 6.602509 2.844157 6.644057 C 2.978595 6.685606 3.089538 6.719839 3.090698 6.72013 C 3.092807 6.72066 3.092807 6.72066 3.092866 6.520418 C 3.092898 6.410285 3.093306 6.18985 3.093772 6.030562 C 3.094553 5.763748 3.094752 5.738617 3.096295 5.711344 C 3.097217 5.695064 3.098611 5.671603 3.099395 5.659211 C 3.100178 5.646816 3.101808 5.623754 3.103017 5.607958 C 3.104227 5.592164 3.106418 5.566515 3.107887 5.550963 C 3.109355 5.535411 3.111941 5.51036 3.113633 5.495295 C 3.115324 5.480227 3.118114 5.456767 3.119833 5.443159 C 3.121551 5.429551 3.124544 5.407283 3.126484 5.393674 C 3.128424 5.380066 3.13179 5.357599 3.133963 5.343748 C 3.136135 5.329897 3.139918 5.307034 3.142369 5.292939 C 3.144819 5.278845 3.149205 5.254788 3.152116 5.239479 C 3.155027 5.224168 3.159971 5.199397 3.163101 5.184428 C 3.16623 5.169459 3.171352 5.145801 3.174481 5.131851 C 3.17761 5.117902 3.182986 5.094759 3.18643 5.080422 C 3.189873 5.066085 3.19569 5.042824 3.199356 5.028729 C 3.203022 5.014635 3.208965 4.992367 3.212563 4.979245 C 3.21616 4.966123 3.222479 4.943855 3.226605 4.929761 C 3.230732 4.915667 3.237681 4.892604 3.242049 4.878509 C 3.246417 4.864415 3.253638 4.84175 3.258096 4.828142 C 3.262555 4.814533 3.270171 4.792067 3.275023 4.778216 C 3.279873 4.764364 3.287818 4.742096 3.292678 4.728731 C 3.297538 4.715366 3.3052 4.694689 3.309704 4.682783 C 3.31421 4.670875 3.322696 4.649137 3.328563 4.634478 C 3.33443 4.619817 3.343463 4.597748 3.348639 4.585434 C 3.353813 4.573122 3.36204 4.553902 3.36692 4.542725 C 3.371799 4.531547 3.379856 4.513454 3.384823 4.502518 C 3.389789 4.491583 3.39917 4.471303 3.405668 4.457452 C 3.412167 4.443601 3.426129 4.414971 3.436694 4.39383 C 3.44726 4.372689 3.461914 4.344058 3.469262 4.330207 C 3.476608 4.316357 3.488427 4.294487 3.495524 4.281607 C 3.502622 4.268728 3.514584 4.247454 3.522105 4.234332 C 3.529628 4.22121 3.541034 4.201699 3.547455 4.190976 C 3.553874 4.180251 3.564621 4.162556 3.571336 4.151653 C 3.578052 4.14075 3.589372 4.122683 3.596493 4.111505 C 3.603614 4.100327 3.615987 4.081241 3.623989 4.069091 C 3.631991 4.056941 3.645655 4.036661 3.654354 4.024024 C 3.663054 4.011388 3.677115 3.991314 3.685603 3.979416 C 3.694091 3.967517 3.707792 3.948628 3.716049 3.937443 C 3.724308 3.926256 3.738823 3.906999 3.748305 3.89465 C 3.757787 3.882301 3.774164 3.861424 3.784696 3.848259 C 3.795227 3.835093 3.810939 3.815771 3.81961 3.805323 C 3.828281 3.794872 3.84254 3.777973 3.851297 3.767766 C 3.860054 3.757562 3.874996 3.740475 3.884502 3.729796 C 3.894008 3.719119 3.908543 3.703013 3.916803 3.694009 C 3.925064 3.685003 3.939156 3.669882 3.94812 3.660404 C 3.957083 3.650928 3.981341 3.626241 4.002025 3.605544 C 4.02271 3.584848 4.046838 3.561157 4.055645 3.552897 C 4.064451 3.544637 4.079179 3.530951 4.088373 3.522486 C 4.097566 3.514019 4.11243 3.500508 4.121404 3.49246 C 4.130376 3.484412 4.146267 3.470493 4.156716 3.461528 C 4.167165 3.452562 4.183867 3.438437 4.19383 3.430137 C 4.203792 3.421837 4.220096 3.408491 4.230059 3.400478 C 4.240022 3.392467 4.256126 3.379735 4.265846 3.372187 C 4.275566 3.364638 4.294852 3.349997 4.308703 3.33965 C 4.322554 3.329302 4.342636 3.314602 4.353327 3.306981 C 4.364019 3.299361 4.382311 3.28654 4.393975 3.27849 C 4.405639 3.270441 4.42466 3.257609 4.436245 3.249977 C 4.447829 3.242345 4.465922 3.230637 4.476451 3.223961 C 4.486979 3.217284 4.504342 3.206445 4.515034 3.199872 C 4.525727 3.193299 4.545155 3.181674 4.558207 3.174039 C 4.571259 3.166403 4.594323 3.153273 4.609458 3.14486 C 4.624594 3.13645 4.647913 3.123799 4.661278 3.11675 C 4.674643 3.1097 4.696314 3.098564 4.709436 3.092004 C 4.722558 3.085442 4.74403 3.075004 4.757153 3.068806 C 4.770275 3.062607 4.791488 3.052789 4.804292 3.046986 C 4.817096 3.041182 4.837177 3.03234 4.848916 3.027336 C 4.860656 3.022333 4.879611 3.014428 4.89104 3.009769 C 4.902469 3.00511 4.923146 2.996942 4.93699 2.991619 C 4.950833 2.986296 4.971702 2.978476 4.983366 2.97424 C 4.99503 2.970004 5.021672 2.960841 5.042571 2.953878 C 5.063468 2.946914 5.093689 2.937231 5.109727 2.93236 C 5.125765 2.927489 5.150419 2.920288 5.164514 2.916359 C 5.178607 2.912431 5.203261 2.905885 5.219299 2.901814 C 5.235338 2.897742 5.259793 2.891805 5.273643 2.888619 C 5.287495 2.885432 5.310359 2.880417 5.324453 2.877472 C 5.338548 2.874528 5.360616 2.870155 5.373496 2.867757 C 5.386374 2.865358 5.408962 2.861403 5.42369 2.858968 C 5.438418 2.856532 5.461482 2.85295 5.474941 2.851007 C 5.488403 2.849062 5.512338 2.845885 5.528134 2.843946 C 5.543929 2.842007 5.566793 2.83942 5.578943 2.838198 C 5.591094 2.836976 5.612764 2.83499 5.627101 2.833786 C 5.641439 2.832582 5.666887 2.830797 5.683655 2.829821 C 5.700423 2.828844 5.724281 2.827635 5.736673 2.827131 C 5.749067 2.826628 5.779487 2.825963 5.804273 2.825654 C 5.831717 2.825312 5.864715 2.825499 5.888661 2.826133 C 5.910288 2.826705 5.935936 2.827562 5.945656 2.828037 C 5.955376 2.828513 5.97327 2.829513 5.98542 2.830258 C 5.99757 2.831004 6.017452 2.832401 6.029602 2.833363 C 6.041752 2.834323 6.060044 2.83592 6.07025 2.836912 C 6.080456 2.837903 6.097554 2.839693 6.108246 2.840889 C 6.118938 2.842084 6.135557 2.84406 6.145177 2.84528 C 6.154796 2.846498 6.172292 2.848883 6.184057 2.850577 C 6.195822 2.852271 6.215388 2.855248 6.227539 2.857194 C 6.239688 2.859139 6.253395 2.861429 6.257997 2.862283 C 6.266363 2.863834 6.266363 2.863834 6.249159 2.867633 C 6.239698 2.869721 6.221817 2.873796 6.209424 2.876689 C 6.197031 2.87958 6.17695 2.884501 6.1648 2.887624 C 6.152649 2.890747 6.132933 2.896087 6.120986 2.899491 C 6.109038 2.902895 6.088361 2.909066 6.075037 2.913204 C 6.061712 2.917341 6.039675 2.924465 6.026067 2.929032 C 6.012459 2.933601 5.991946 2.940756 5.980484 2.944931 C 5.969021 2.949106 5.949537 2.95646 5.937186 2.961273 C 5.924834 2.966085 5.905422 2.973896 5.894048 2.978628 C 5.882673 2.983361 5.864182 2.991314 5.852958 2.996302 C 5.841733 3.001288 5.822409 3.010091 5.810017 3.015862 C 5.797623 3.021632 5.775753 3.032209 5.761416 3.039369 C 5.747078 3.046527 5.726601 3.057027 5.715909 3.062701 C 5.705216 3.068377 5.685135 3.079366 5.671284 3.087121 C 5.657433 3.094877 5.638347 3.105814 5.628869 3.111423 C 5.619392 3.117034 5.603487 3.126609 5.593524 3.1327 C 5.58356 3.138793 5.567655 3.148746 5.558177 3.15482 C 5.5487 3.160895 5.532596 3.171429 5.522389 3.178233 C 5.512184 3.185035 5.496079 3.195978 5.486602 3.202551 C 5.477125 3.209123 5.460822 3.220655 5.450372 3.228179 C 5.439923 3.235703 5.423421 3.247832 5.413702 3.255136 C 5.403981 3.262436 5.386883 3.27556 5.375705 3.284297 C 5.364527 3.293035 5.346831 3.307168 5.336382 3.315704 C 5.325933 3.32424 5.308455 3.338784 5.297544 3.348024 C 5.286631 3.357265 5.269532 3.372169 5.259547 3.381148 C 5.249561 3.390125 5.233438 3.404821 5.223718 3.413807 C 5.213998 3.422791 5.196302 3.439351 5.184396 3.450605 C 5.172488 3.461862 5.156544 3.477188 5.148963 3.484664 C 5.141382 3.492139 5.126272 3.507414 5.115385 3.518608 C 5.104497 3.529801 5.087317 3.547848 5.077208 3.558713 C 5.067098 3.569577 5.050301 3.587983 5.039882 3.599617 C 5.029463 3.61125 5.013853 3.62899 5.005193 3.639039 C 4.996532 3.649089 4.982148 3.666059 4.973228 3.676752 C 4.964307 3.687445 4.947 3.708717 4.934769 3.724027 C 4.922537 3.739336 4.90467 3.762184 4.895064 3.774798 C 4.885458 3.787414 4.870011 3.808089 4.860735 3.820748 C 4.85146 3.833405 4.835779 3.855252 4.825891 3.869297 C 4.816002 3.883342 4.800281 3.906206 4.790956 3.920107 C 4.781631 3.934007 4.767791 3.954923 4.760201 3.966587 C 4.75261 3.978251 4.739764 3.998412 4.731654 4.01139 C 4.723545 4.024366 4.710507 4.04564 4.702682 4.058664 C 4.694856 4.071689 4.682687 4.092286 4.67564 4.104437 C 4.668592 4.116586 4.655977 4.138854 4.647606 4.15392 C 4.639235 4.168986 4.627187 4.191055 4.620833 4.202963 C 4.614478 4.214869 4.603237 4.236342 4.59585 4.250679 C 4.588463 4.265017 4.577648 4.286489 4.571816 4.298396 C 4.565984 4.310304 4.556654 4.329589 4.551082 4.341253 C 4.54551 4.352918 4.536649 4.371806 4.53139 4.383226 C 4.526132 4.394647 4.517766 4.413137 4.512801 4.424315 C 4.507834 4.435493 4.499414 4.45478 4.494091 4.467174 C 4.488767 4.479566 4.480241 4.499781 4.475145 4.512096 C 4.470048 4.524411 4.461758 4.544889 4.456721 4.557603 C 4.451684 4.570319 4.443329 4.591855 4.438153 4.605463 C 4.432978 4.619071 4.42455 4.641737 4.419425 4.65583 C 4.414299 4.669925 4.405364 4.695175 4.399567 4.711941 C 4.393771 4.72871 4.384635 4.755947 4.379265 4.772473 C 4.373896 4.788996 4.365339 4.816035 4.36025 4.83256 C 4.355162 4.849085 4.346827 4.877117 4.341728 4.894857 C 4.336629 4.912596 4.328691 4.941027 4.324087 4.958037 C 4.319483 4.975048 4.311586 5.005467 4.30654 5.025636 C 4.301492 5.045806 4.294517 5.074635 4.291039 5.0897 C 4.287562 5.104767 4.282386 5.12783 4.279539 5.140952 C 4.276692 5.154074 4.271984 5.176342 4.269077 5.190436 C 4.266171 5.20453 4.261379 5.228786 4.25843 5.244339 C 4.25548 5.259891 4.250707 5.286135 4.24782 5.302659 C 4.244935 5.319183 4.240569 5.345436 4.238118 5.360997 C 4.235666 5.37656 4.231877 5.40161 4.229696 5.416667 C 4.227515 5.431724 4.224122 5.456368 4.222157 5.471435 C 4.220191 5.486501 4.216998 5.512547 4.215061 5.529314 C 4.213124 5.546082 4.210349 5.571529 4.208893 5.585867 C 4.207439 5.600204 4.205048 5.625653 4.20358 5.642421 C 4.202112 5.659187 4.199928 5.686625 4.198727 5.703393 C 4.197526 5.720159 4.195924 5.744415 4.195167 5.757294 C 4.194409 5.770174 4.193407 5.787471 4.192938 5.795733 C 4.192471 5.803995 4.19165 5.898036 4.191115 6.004715 C 4.19058 6.111393 4.190277 6.315648 4.190439 6.458614 C 4.190602 6.601581 4.190984 6.718802 4.191288 6.719105 C 4.191591 6.719408 4.313371 6.682069 4.461908 6.636129 C 4.610447 6.590189 4.786054 6.535892 4.852147 6.515468 C 4.91824 6.495043 5.025205 6.462041 5.089849 6.442131 C 5.154491 6.422219 5.223739 6.400939 5.243729 6.39484 C 5.263721 6.388742 5.280256 6.383932 5.280475 6.38415 C 5.280694 6.384369 5.209062 6.462315 5.121291 6.557364 C 5.033521 6.652413 4.889537 6.808317 4.801327 6.903816 C 4.713117 6.999316 4.56619 7.158374 4.474826 7.25728 C 4.383461 7.356185 4.23395 7.518026 4.14258 7.616927 C 4.051209 7.715828 3.906015 7.872994 3.819926 7.966186 C 3.733837 8.059378 3.658251 8.141094 3.651957 8.147776 C 3.645663 8.154458 3.64025 8.159901 3.639928 8.15987 Z",pn={...x,nameOffsetX:"right",nameOffsetY:"top",outOfStation:!1},un=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:e=>(null!=e?e:pn).names[0],onChange:(e,t)=>{const n=null!=t?t:pn;return n.names[0]=e.toString(),n}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:e=>(null!=e?e:pn).names[1],onChange:(e,t)=>{const n=null!=t?t:pn;return n.names[1]=e.toString(),n}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:e=>(null!=e?e:pn).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetY)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:pn;return n.nameOffsetX=e,n}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:e=>(null!=e?e:pn).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetX)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:pn;return n.nameOffsetY=e,n}},{type:"switch",label:"panel.details.stations.bjsubwayInt.outOfStation",oneLine:!0,isChecked:e=>(null!=e?e:pn).outOfStation,onChange:(e,t)=>{const n=null!=t?t:pn;return n.outOfStation=e,n}}],gn={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:f=pn.nameOffsetX,nameOffsetY:h=pn.nameOffsetY,outOfStation:p=pn.outOfStation}=null!==(t=i[l.BjsubwayInt])&&void 0!==t?t:pn,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),y=n.useCallback((e=>m(a,e)),[a,m]),[C,b]=(j=h,"left"===(v=f)&&"top"===j?[-5,-c[1].split("\n").length*dn[j]-4]:"middle"===v&&"top"===j?[0,-c[1].split("\n").length*dn[j]-7]:"right"===v&&"top"===j?[5,-c[1].split("\n").length*dn[j]-4]:"left"===v&&"bottom"===j?[-5,c[0].split("\n").length*dn[j]+4]:"middle"===v&&"bottom"===j?[0,c[0].split("\n").length*dn[j]+7]:"right"===v&&"bottom"===j?[5,c[0].split("\n").length*dn[j]+4]:"left"===v&&"middle"===j?[-8,0]:"right"===v&&"middle"===j?[8,0]:[0,0]);var v,j;const O="left"===f?"end":"right"===f?"start":"middle";return L.jsxs("g",{id:a,children:[L.jsxs("g",{transform:`translate(${s-6}, ${o-6})`,children:[L.jsx("circle",{cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",fill:"white"}),L.jsx("path",{d:hn,fill:p?"#898989":"black",stroke:p?"#898989":"black",strokeWidth:"0.533618",strokeLinecap:"round",strokeLinejoin:"round"}),L.jsx("circle",{id:`stn_core_${a}`,cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",strokeOpacity:"0",fill:"white",fillOpacity:"0",onPointerDown:u,onPointerMove:g,onPointerUp:y,style:{cursor:"move"},className:"removeMe"})]}),L.jsxs("g",{transform:`translate(${s+C}, ${o+b})`,textAnchor:O,children:[L.jsx(ye,{text:c[0].split("\n"),fontSize:dn.zh,lineHeight:dn.zh,grow:"up",className:"rmp-name__zh",baseOffset:1}),L.jsx(ye,{text:c[1].split("\n"),fontSize:dn.en,lineHeight:dn.en,grow:"down",className:"rmp-name__en",baseOffset:1})]})]})},icon:L.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:L.jsxs("g",{transform:"translate(6, 6)",children:[L.jsx("circle",{cx:"6",cy:"6",r:"6",stroke:"black",strokeWidth:"1",fill:"white"}),L.jsx("path",{d:hn,stroke:"black",strokeWidth:"0.533618",strokeLinecap:"round",strokeLinejoin:"round"})]})}),defaultAttrs:pn,attrsComponent:()=>L.jsx(N,{fields:un}),metadata:{displayName:"panel.details.stations.bjsubwayInt.displayName",cities:[d.Beijing],canvas:[u.RailMap],categories:[g.Metro],tags:["interchange"]}};function xn(e){const{interchangeList:t,onAdd:s,onDelete:l,onUpdate:i}=e,r=y(),{paletteAppClip:{output:c}}=C((e=>e.runtime)),{t:f}=a(),[h,p]=n.useState();n.useEffect((()=>{void 0!==h&&c&&(null==i||i(h,[...c,t[h][4],t[h][5]]),p(void 0))}),[null==c?void 0:c.toString()]);const u=t.map(((e,t)=>[{type:"input",label:f("panel.details.stations.common.lineCode"),value:e[4],minW:"80px",onChange:n=>null==i?void 0:i(t,[e[0],e[1],e[2],e[3],n,e[5]])},{type:"input",label:f("panel.details.stations.common.stationCode"),value:e[5],minW:"80px",onChange:n=>null==i?void 0:i(t,[e[0],e[1],e[2],e[3],e[4],n])}]));return L.jsxs(b,{direction:"column",children:[0===t.length&&L.jsxs(T,{spacing:.5,"data-testid":"interchange-card-stack",children:[L.jsx(D,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:f("panel.details.stations.interchange.noInterchanges")}),L.jsx(H,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.add"),onClick:()=>null==s?void 0:s([d.Shanghai,"","#aaaaaa",m.white,"",""]),icon:L.jsx(v,{})})]}),t.map(((e,n)=>L.jsxs(T,{spacing:.5,"data-testid":`interchange-card-stack-${n}`,children:[L.jsx(j,{label:f("color"),minW:"40px",noLabel:0!==n,children:L.jsx(O,{theme:[e[0],e[1],e[2],e[3]],onClick:()=>{p(n),r(w([e[0],e[1],e[2],e[3]]))}})}),L.jsx(o,{fields:u[n],noLabel:0!==n}),s&&n===u.length-1?L.jsx(H,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.copy"),onClick:()=>null==s?void 0:s(t.slice(-1)[0]),icon:L.jsx(_,{})}):L.jsx(F,{minW:8}),l&&L.jsx(H,{size:"sm",variant:"ghost","aria-label":f("panel.details.stations.interchange.remove"),onClick:()=>null==l?void 0:l(n),icon:L.jsx(k,{})})]},n)))]})}const yn=e=>{var t;const{stationType:s,defaultAttrs:o,maximumTransfers:l}=e,{t:i}=a(),r=y(),c=n.useCallback((()=>{r(z()),r(M(p.current.export()))}),[r,z,M]),{selected:f}=C((e=>e.runtime)),[h]=f,p=n.useRef(window.graph),u=h&&p.current.hasNode(h)&&p.current.getNodeAttribute(h,"type")===s?p.current.getNodeAttribute(h,s):o,g=null!==(t=u.transfer)&&void 0!==t?t:o.transfer,x=e=>t=>{const n=structuredClone(g);if(n.length<=e)for(let a=n.length;a<=e;a++)n[a]=[];n[e].push(t),u.transfer=n,p.current.mergeNodeAttributes(h,{[s]:u}),c()},b=e=>(t,n)=>{if(g.length>e&&g[e].length>t){const a=g.map(((a,s)=>s===e?a.map(((e,a)=>a===t?[0,1,2,3,4,5].map((t=>void 0===n[t]?e[t]:n[t])):e)):a));u.transfer=a,p.current.mergeNodeAttributes(h,{[s]:u}),c()}};return L.jsxs(U,{align:"flex-start",children:[u.transfer.map(((e,t)=>{return L.jsxs(n.Fragment,{children:[L.jsx(G,{size:"xs",children:i(0===t?"panel.details.stations.interchange.within":1===t?"panel.details.stations.interchange.outStation":"panel.details.stations.interchange.outSystem")}),L.jsx(xn,{interchangeList:e,onAdd:l[t]>e.length?x(t):void 0,onDelete:(a=t,e=>{if(g.length>a&&g[a].length>e){const t=g.map(((t,n)=>n===a?t.filter(((t,n)=>n!==e)):t));u.transfer=t,p.current.mergeNodeAttributes(h,{[s]:u}),c()}}),onUpdate:b(t)})]},t);var a})),l[u.transfer.length]>0&&L.jsx(Z,{size:"xs",variant:"ghost",alignSelf:"flex-end",leftIcon:L.jsx(v,{}),onClick:()=>x(u.transfer.length)([d.Guangzhou,"","#AAAAAA",m.white,"",""]),children:i("panel.details.stations.interchange.addGroup")})]})},Cn={top:8.5,middle:0,bottom:11},bn={names:["車站","Stn"],nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[]]},vn=[{type:"textarea",label:"panel.details.stations.common.nameZh",value:e=>(null!=e?e:bn).names[0],onChange:(e,t)=>{const n=null!=t?t:bn;return n.names[0]=e.toString(),n}},{type:"textarea",label:"panel.details.stations.common.nameEn",value:e=>(null!=e?e:bn).names[1],onChange:(e,t)=>{const n=null!=t?t:bn;return n.names[1]=e.toString(),n}},{type:"select",label:"panel.details.stations.common.nameOffsetX",value:e=>(null!=e?e:bn).nameOffsetX,options:{left:"left",middle:"middle",right:"right"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetY)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:bn;return n.nameOffsetX=e,n}},{type:"select",label:"panel.details.stations.common.nameOffsetY",value:e=>(null!=e?e:bn).nameOffsetY,options:{top:"top",middle:"middle",bottom:"bottom"},disabledOptions:e=>"middle"===(null==e?void 0:e.nameOffsetX)?["middle"]:[],onChange:(e,t)=>{const n=null!=t?t:bn;return n.nameOffsetY=e,n}},{type:"select",label:"panel.details.stations.common.rotate",value:e=>{var t;return null!==(t=null==e?void 0:e.rotate)&&void 0!==t?t:bn.rotate},hidden:e=>{var t,n;return 0===(null!==(t=null==e||null===(n=e.transfer)||void 0===n||null===(n=n.flat())||void 0===n?void 0:n.length)&&void 0!==t?t:0)},options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:(e,t)=>{const n=null!=t?t:bn;return n.rotate=Number(e),n}},{type:"custom",label:"panel.details.stations.interchange.title",component:L.jsx(yn,{stationType:l.MTR,defaultAttrs:bn,maximumTransfers:[99,0,0]})}],jn={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:f=bn.nameOffsetX,nameOffsetY:h=bn.nameOffsetY,transfer:p=bn.transfer,rotate:u=bn.rotate}=null!==(t=i[l.MTR])&&void 0!==t?t:bn,g=n.useCallback((e=>r(a,e)),[a,r]),y=n.useCallback((e=>d(a,e)),[a,d]),C=n.useCallback((e=>m(a,e)),[a,m]),b=p.at(0),v=((e,t=5,n=[])=>{const a=Math.sqrt(e*e-t*t/4),s=n.length<2?n.length+1:n.length;let o=`M -5,0 A ${e},${e},0,0,1,${-t/2},-${a} `;for(let l=0;l=0;l-=1)o+=`A ${e},${e},0,0,1,${l*t-t/2},${a} `;return o+=`A ${e},${e},0,0,1,-5,0 Z`,o})(5,5,b),j=0===b.length?0:b.length<=2?1:b.length-1,O=Math.cos(u*Math.PI/180)*j*5,w=Math.sin(u*Math.PI/180)*j*5,_="left"===f?-8:"right"===f?8:0,k=Math.sign(O)===Math.sign(_)?O+_:_,S=(c[Ce[h].namesPos].split("\n").length*Cn[h]+6)*Ce[h].polarity,N=Math.sign(w)===Math.sign(S)?w+S:S,z="left"===f?"end":"right"===f?"start":"middle";return n.useMemo((()=>L.jsxs("g",{id:a,transform:`translate(${s}, ${o})`,children:[L.jsx("path",{transform:`rotate(${u})`,d:v,stroke:"#001f50",strokeWidth:"1.5",fill:"white",onPointerDown:g,onPointerMove:y,onPointerUp:C,style:{cursor:"move"}}),p.at(0).length>1&&p.at(0).map((e=>e[2])).map(((e,t)=>L.jsx("line",{transform:`rotate(${u})`,x1:5*t-2.5,x2:2.5+5*t,stroke:e,strokeWidth:"2"},`${t}_${e}`))),L.jsx("path",{id:`stn_core_${a}`,transform:`rotate(${u})`,d:v,fill:"white",fillOpacity:"0",onPointerDown:g,onPointerMove:y,onPointerUp:C,style:{cursor:"move"},className:"removeMe"}),L.jsxs("g",{transform:`translate(${k}, ${N})`,textAnchor:z,className:"rmp-name-outline",strokeWidth:"1.25",children:[L.jsx(ye,{text:c[0].split("\n"),fontSize:10,lineHeight:10,grow:"up",baseOffset:1,fill:"#001f50",className:"rmp-name__mtr__zh"}),L.jsx(ye,{text:c[1].split("\n"),fontSize:7.5,lineHeight:7.5,grow:"down",baseOffset:1,fill:"#001f50",className:"rmp-name__mtr__en"})]})]})),[a,s,o,...c,u,JSON.stringify(p),f,h,g,y,C])},icon:L.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:L.jsx("circle",{cx:"12",cy:"12",r:"5",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})}),defaultAttrs:bn,attrsComponent:()=>L.jsx(N,{fields:vn}),metadata:{displayName:"panel.details.stations.mtr.displayName",cities:[d.Hongkong],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},On=n.forwardRef(((e,t)=>{const{text:n,lineWidth:a,grow:s,dominantBaseline:o=("left"===s?"hanging":"right"===s?"auto":"central"),baseOffset:l=2,baseDY:i=0,...r}=e,d="bidirectional"===s?-(n.length-1)*a/2:0;return L.jsx("g",{ref:t,children:[...n].reverse().map(((e,t,n)=>L.jsx("text",{x:(t*a+l)*("left"===s?-1:1)+d,dy:(t-(n.length-1)/2)*i,writingMode:"vertical-rl",dominantBaseline:o,...r,children:e},`${e}${t}`)))})}));On.displayName="MultilineTextVertical";const wn={size:10,baseOffset:1},_n={size:5,baseOffset:1.5},kn={top:{lineHeight:5,offset:1+_n.baseOffset+2.5,polarity:-1},middle:{lineHeight:0,offset:wn.size/2,polarity:1},bottom:{lineHeight:10,offset:0+wn.baseOffset+2.5,polarity:1}},Sn={...x,color:[d.Suzhou,"sz1","#78BA25",m.white],nameOffsetX:"right",nameOffsetY:"top",textVertical:!1},Nn={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,color:f=Sn.color,nameOffsetX:h=Sn.nameOffsetX,nameOffsetY:p=Sn.nameOffsetY,textVertical:u=Sn.textVertical}=null!==(t=i[l.SuzhouRTBasic])&&void 0!==t?t:Sn,g=n.useCallback((e=>r(a,e)),[a,r]),y=n.useCallback((e=>d(a,e)),[a,d]),C=n.useCallback((e=>m(a,e)),[a,m]),b="left"===h?-5:"right"===h?5:0,v=(c[Ce[p].namesPos].split("\n").length*kn[p].lineHeight+kn[p].offset)*kn[p].polarity,j="left"===h?"end":"right"===h?"start":"middle",O="top"===p?-4.5:4.5,w="top"===p?"end":"start",_=c[0].split("\n").length*wn.size/2+_n.baseOffset;return L.jsxs("g",{id:a,transform:`translate(${s}, ${o})`,children:[L.jsx("circle",{id:`stn_core_${a}`,r:3,stroke:f[2],strokeWidth:"1",fill:"white",onPointerDown:g,onPointerMove:y,onPointerUp:C,style:{cursor:"move"}}),u?L.jsxs(L.Fragment,{children:[L.jsx("g",{transform:`translate(-1, ${O})`,textAnchor:w,children:L.jsx(On,{text:c[0].split("\n"),fontSize:wn.size,lineWidth:wn.size,grow:"bidirectional",baseOffset:wn.baseOffset,dominantBaseline:"central",className:"rmp-name__zh"})}),L.jsx("g",{transform:`translate(${_}, ${O})rotate(90)`,textAnchor:w,children:L.jsx(ye,{text:c[1].split("\n"),fontSize:_n.size,lineHeight:_n.size,grow:"up",baseOffset:_n.baseOffset,className:"rmp-name__en",dominantBaseline:"central",fill:"gray"})})]}):L.jsxs("g",{transform:`translate(${b}, ${v})`,textAnchor:j,children:[L.jsx(ye,{text:c[0].split("\n"),fontSize:wn.size,lineHeight:wn.size,grow:"up",baseOffset:wn.baseOffset,className:"rmp-name__zh"}),L.jsx(ye,{text:c[1].split("\n"),fontSize:_n.size,lineHeight:_n.size,grow:"down",baseOffset:_n.baseOffset,className:"rmp-name__en",fill:"gray"})]})]})},icon:L.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:L.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",fill:"none"})}),defaultAttrs:Sn,attrsComponent:e=>{var t,n,s;const{id:i,attrs:r,handleAttrsUpdate:d}=e,{t:m}=a(),f=[{type:"textarea",label:m("panel.details.stations.common.nameZh"),value:r.names[0],onChange:e=>{r.names[0]=e,d(i,r)},minW:"full"},{type:"textarea",label:m("panel.details.stations.common.nameEn"),value:r.names[1],onChange:e=>{r.names[1]=e,d(i,r)},minW:"full"},{type:"select",label:m("panel.details.stations.common.nameOffsetX"),value:null!==(t=r.nameOffsetX)&&void 0!==t?t:Sn.nameOffsetX,options:{left:m("panel.details.stations.common.left"),middle:m("panel.details.stations.common.middle"),right:m("panel.details.stations.common.right")},disabledOptions:"middle"===r.nameOffsetY?["middle"]:[],onChange:e=>{r.nameOffsetX=e,"middle"!==r.nameOffsetX&&(r.textVertical=!1),d(i,r)},minW:"full"},{type:"select",label:m("panel.details.stations.common.nameOffsetY"),value:null!==(n=r.nameOffsetY)&&void 0!==n?n:Sn.nameOffsetY,options:{top:m("panel.details.stations.common.top"),middle:m("panel.details.stations.common.middle"),bottom:m("panel.details.stations.common.bottom")},disabledOptions:"middle"===r.nameOffsetX?["middle"]:[],onChange:e=>{r.nameOffsetY=e,"middle"===r.nameOffsetY&&(r.textVertical=!1),d(i,r)},minW:"full"},{type:"switch",label:m("panel.details.stations.suzhouRTBasic.textVertical"),isChecked:null!==(s=r.textVertical)&&void 0!==s?s:Sn.textVertical,isDisabled:"middle"===r.nameOffsetY||"middle"!==r.nameOffsetX,onChange:e=>{r.textVertical=e,d(i,r)},oneLine:!0,minW:"full"},{type:"custom",label:m("color"),component:L.jsx(c,{type:l.SuzhouRTBasic,defaultTheme:Sn.color})}];return L.jsx(o,{fields:f})},metadata:{displayName:"panel.details.stations.suzhouRTBasic.displayName",cities:[d.Suzhou],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},zn={size:10,baseOffset:1},Mn={size:5,baseOffset:1.5},An={top:{lineHeight:Mn.size,offset:0+Mn.baseOffset+3,polarity:-1},middle:{lineHeight:0,offset:zn.size/2,polarity:1},bottom:{lineHeight:zn.size,offset:0+zn.baseOffset+3,polarity:1}},Pn={...x,nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[[d.Suzhou,"sz1","#78BA25",m.white,"",""],[d.Suzhou,"sz2","#ED3240",m.white,"",""]]]},Bn={component:e=>{var t,a;const{id:s,x:o,y:i,attrs:r,handlePointerDown:d,handlePointerMove:m,handlePointerUp:c}=e,{names:f=x.names,nameOffsetX:h=Pn.nameOffsetX,nameOffsetY:p=Pn.nameOffsetY,rotate:u=Pn.rotate,transfer:g=Pn.transfer}=null!==(t=r[l.SuzhouRTInt])&&void 0!==t?t:Pn,y=n.useCallback((e=>d(s,e)),[s,d]),C=n.useCallback((e=>m(s,e)),[s,m]),b=n.useCallback((e=>c(s,e)),[s,c]),v=5*g.at(0).length+1,j=Math.abs(Math.cos(u*Math.PI/180)*v),O=Math.abs(Math.sin(u*Math.PI/180)*v),w=(j/2+5)*("left"===h?-1:"right"===h?1:0),_=(f[Ce[p].namesPos].split("\n").length*An[p].lineHeight+An[p].offset+("middle"===p?0:O/2))*An[p].polarity,k="left"===h?"end":"right"===h?"start":"middle";return L.jsxs("g",{id:s,transform:`translate(${o}, ${i})`,children:[L.jsxs("g",{transform:`rotate(${u})`,onPointerDown:y,onPointerMove:C,onPointerUp:b,style:{cursor:"move"},children:[L.jsx("rect",{x:-v/2,y:-3,width:v,height:6,ry:3,stroke:"#616161",strokeWidth:"1",fill:"white"}),(null!==(a=g.at(0))&&void 0!==a?a:[]).length>0&&g.at(0).map((e=>e[2])).map(((e,t)=>L.jsx("circle",{r:2,cx:-v/2+3+5*t,fill:e},`${t}_${e}`))),L.jsx("rect",{id:`stn_core_${s}`,x:-v/2-.5,y:-3.5,width:v+1,height:7,ry:3,fill:"white",opacity:"0"})]}),L.jsxs("g",{transform:`translate(${w}, ${_})`,textAnchor:k,children:[L.jsx(ye,{text:f[0].split("\n"),fontSize:zn.size,lineHeight:zn.size,grow:"up",baseOffset:zn.baseOffset,className:"rmp-name__zh"}),L.jsx(ye,{text:f[1].split("\n"),fontSize:Mn.size,lineHeight:Mn.size,grow:"down",baseOffset:Mn.baseOffset,className:"rmp-name__en",fill:"gray"})]})]})},icon:L.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[L.jsx("rect",{x:"6",y:"9",width:"12",height:"6",ry:"3",stroke:"currentColor",fill:"none"}),L.jsx("circle",{r:"2",cx:"9.5",cy:"12",fill:"currentColor"}),L.jsx("circle",{r:"2",cx:"14.5",cy:"12",fill:"currentColor"})]}),defaultAttrs:Pn,attrsComponent:e=>{var t,n,s,i,r;const{id:d,attrs:m,handleAttrsUpdate:c}=e,{t:f}=a(),h=[{type:"textarea",label:f("panel.details.stations.common.nameZh"),value:m.names[0],onChange:e=>{m.names[0]=e,c(d,m)},minW:"full"},{type:"textarea",label:f("panel.details.stations.common.nameEn"),value:m.names[1],onChange:e=>{m.names[1]=e,c(d,m)},minW:"full"},{type:"select",label:f("panel.details.stations.common.nameOffsetX"),value:null!==(t=m.nameOffsetX)&&void 0!==t?t:Pn.nameOffsetX,options:{left:f("panel.details.stations.common.left"),middle:f("panel.details.stations.common.middle"),right:f("panel.details.stations.common.right")},disabledOptions:"middle"===m.nameOffsetY?["middle"]:[],onChange:e=>{m.nameOffsetX=e,c(d,m)},minW:"full"},{type:"select",label:f("panel.details.stations.common.nameOffsetY"),value:null!==(n=m.nameOffsetY)&&void 0!==n?n:Pn.nameOffsetY,options:{top:f("panel.details.stations.common.top"),middle:f("panel.details.stations.common.middle"),bottom:f("panel.details.stations.common.bottom")},disabledOptions:"middle"===m.nameOffsetX?["middle"]:[],onChange:e=>{m.nameOffsetY=e,c(d,m)},minW:"full"},{type:"select",label:f("panel.details.stations.common.rotate"),value:null!==(s=m.rotate)&&void 0!==s?s:Pn.rotate,hidden:0===(null!==(i=null==m||null===(r=m.transfer)||void 0===r||null===(r=r.flat())||void 0===r?void 0:r.length)&&void 0!==i?i:0),options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{m.rotate=Number(e),c(d,m)},minW:"full"},{type:"custom",label:f("panel.details.stations.interchange.title"),component:L.jsx(yn,{stationType:l.SuzhouRTInt,defaultAttrs:Pn,maximumTransfers:[99,0,0]})}];return L.jsx(o,{fields:h})},metadata:{displayName:"panel.details.stations.suzhouRTInt.displayName",cities:[d.Suzhou],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},$n={top:{lineHeight:6.67,offset:10},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:5.83}},Wn={...x,nameOffsetX:"right",nameOffsetY:"top",color:[d.Kunming,"km1","#ea3222",m.white]},En={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:f=Wn.nameOffsetX,nameOffsetY:h=Wn.nameOffsetY,color:p=Wn.color}=null!==(t=i[l.KunmingRTBasic])&&void 0!==t?t:Wn,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),y=n.useCallback((e=>m(a,e)),[a,m]),C="left"===f?-13.33:"right"===f?13.33:0,b=(c[Ce[h].namesPos].split("\n").length*$n[h].lineHeight+$n[h].offset)*Ce[h].polarity,v="left"===f?"end":"right"===f?"start":"middle";return n.useMemo((()=>L.jsxs("g",{id:a,transform:`translate(${s}, ${o})`,onPointerDown:u,onPointerMove:g,onPointerUp:y,style:{cursor:"move"},children:[L.jsx("circle",{id:`stn_core_${a}`,r:"5",stroke:p[2],strokeWidth:"1.33",fill:"white"}),L.jsxs("g",{transform:`translate(${C}, ${b})`,textAnchor:v,className:"rmp-name-outline",strokeWidth:"2.5",children:[L.jsx(ye,{text:c[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),L.jsx(ye,{text:c[1].split("\n"),dx:"right"===f?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,o,...c,f,h,p,u,g,y])},icon:L.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:L.jsx("circle",{r:"5",cx:"12",cy:"12",stroke:"currentColor",strokeWidth:"1.33",fill:"none"})}),defaultAttrs:Wn,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:i("panel.details.stations.common.left"),middle:i("panel.details.stations.common.middle"),right:i("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:i("panel.details.stations.common.top"),middle:i("panel.details.stations.common.middle"),bottom:i("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"custom",label:i("color"),component:L.jsx(c,{type:l.KunmingRTBasic,defaultTheme:Wn.color})}];return L.jsx(o,{fields:r})},metadata:{displayName:"panel.details.stations.kunmingRTBasic.displayName",cities:[d.Kunming],canvas:[u.RailMap],categories:[g.Metro],tags:["interchange"]}},[Xn,Yn]=[15,9],Rn={top:{lineHeight:6.67,offset:5},middle:{lineHeight:0,offset:0},bottom:{lineHeight:12.67,offset:.83}},In={...x,nameOffsetX:"right",nameOffsetY:"top",rotate:0,transfer:[[[d.Kunming,"km1","#ea3222",m.white,"",""],[d.Kunming,"km2","#03619e",m.white,"",""],[d.Kunming,"km3","#a13187",m.white,"",""]]]},Ln={component:e=>{var t,a,s,o,i;const{id:r,x:d,y:m,attrs:c,handlePointerDown:f,handlePointerMove:h,handlePointerUp:p}=e,{names:u=x.names,nameOffsetX:g=In.nameOffsetX,nameOffsetY:y=In.nameOffsetY,rotate:C=In.rotate,transfer:b=In.transfer}=null!==(t=c[l.KunmingRTInt])&&void 0!==t?t:In,v=n.useCallback((e=>f(r,e)),[r,f]),j=n.useCallback((e=>h(r,e)),[r,h]),O=n.useCallback((e=>p(r,e)),[r,p]),w=0===C||180===C?Xn:90===C||270===C?Yn:Xn*Math.SQRT1_2,_=0===C||180===C?Yn:90===C||270===C?Xn:Xn*Math.SQRT1_2,k="left"===g?-6.83:"right"===g?6.83:0,S=(Math.abs(k)+w/2)*Math.sign(k),N=(u[Ce[y].namesPos].split("\n").length*Rn[y].lineHeight+Rn[y].offset)*Ce[y].polarity,z=(Math.abs(N)+_/2)*Math.sign(N),M="left"===g?"end":"right"===g?"start":"middle";return L.jsxs("g",{id:r,children:[L.jsx("g",{transform:`translate(${d}, ${m})rotate(${C})`,onPointerDown:v,onPointerMove:j,onPointerUp:O,style:{cursor:"move"},children:b.at(0).length<=2?L.jsxs("g",{transform:"translate(-7.5,-4.5)",children:[L.jsx("rect",{id:`stn_core_${r}`,height:"9",width:"15",ry:"4",stroke:"#393332",strokeWidth:"1",fill:"white"}),L.jsx("path",{fill:null!==(a=null===(s=b.at(0).at(0))||void 0===s?void 0:s.at(2))&&void 0!==a?a:"#ea3222",fillRule:"evenodd",stroke:"none",d:"M 3.833333 6.375 C 2.820813 6.375 2 5.535532 2 4.5 C 2 3.464468 2.820813 2.625 3.833333 2.625 L 4.444445 2.625 L 4.444445 2 L 6.888889 2.9375 L 4.444445 3.875 L 4.444445 3.25 L 3.833333 3.25 C 3.158321 3.25 2.611111 3.809647 2.611111 4.5 C 2.611111 5.190353 3.158321 5.75 3.833333 5.75 L 7.5 5.75 L 7.5 6.375 L 3.833333 6.375 Z"}),L.jsx("path",{fill:null!==(o=null===(i=b.at(0).at(1))||void 0===i?void 0:i.at(2))&&void 0!==o?o:"#03619e",fillRule:"evenodd",stroke:"none",d:"M 11.166667 2.625 C 12.179187 2.625 13 3.464468 13 4.5 C 13 5.535532 12.179187 6.375 11.166667 6.375 L 10.555555 6.375 L 10.555555 7 L 8.111111 6.0625 L 10.555555 5.125 L 10.555555 5.75 L 11.166667 5.75 C 11.841679 5.75 12.388889 5.190353 12.388889 4.5 C 12.388889 3.809647 11.841679 3.25 11.166667 3.25 L 7.5 3.25 L 7.5 2.625 L 11.166667 2.625 Z"})]}):L.jsxs("g",{transform:"translate(-8.5,-8.5)",children:[L.jsx("circle",{id:`stn_core_${r}`,r:"8.5",cx:"8.5",cy:"8.5",stroke:"#000000",strokeWidth:"1",fill:"white"}),L.jsx("path",{fill:b.at(0).at(0).at(2),fillRule:"evenodd",stroke:"none",d:"M 8.900812 14 L 10.286572 11.992442 L 10.63521 12.569632 C 12.188999 11.790696 13.24999 10.23524 13.24999 8.441039 C 13.24999 8.070708 13.203481 7.710487 13.118152 7.365112 L 13.887206 7.365112 C 13.960998 7.712721 14 8.072591 14 8.441039 C 14 10.500518 12.789013 12.288074 11.01168 13.191653 L 11.411587 13.855702 L 8.900812 14 Z"}),L.jsx("path",{fill:b.at(0).at(1).at(2),fillRule:"evenodd",stroke:"none",d:"M 8 13.974609 C 5.462755 13.73554 3.426537 11.698185 3.0625 9.090137 L 2.5 9.090137 L 3.5 7 L 4.5 9.090137 L 4.074219 9.090137 C 4.422903 11.120208 6.015293 12.696354 8 12.925459 L 8 13.974609 Z"}),L.jsx("path",{fill:b.at(0).at(2).at(2),fillRule:"evenodd",stroke:"none",d:"M 12.68764 6.50351 L 10.588492 5.178213 L 11.35608 4.753726 C 10.531951 4.143034 9.498575 3.778666 8.375084 3.778666 C 6.644794 3.778666 5.125485 4.640751 4.260284 5.940329 L 3.718284 5.421978 C 4.730131 3.997121 6.438381 3.061381 8.375084 3.061381 C 9.781034 3.061381 11.063435 3.556896 12.04896 4.372667 L 12.536759 4.102285 L 12.68764 6.50351 Z"})]})}),L.jsxs("g",{transform:`translate(${d+S}, ${m+z})`,textAnchor:M,className:"rmp-name-outline",strokeWidth:"2.5",children:[L.jsx(ye,{text:u[0].split("\n"),fontSize:12.67,lineHeight:12.67,grow:"up",baseOffset:1,className:"rmp-name__zh"}),L.jsx(ye,{text:u[1].split("\n"),dx:"right"===g?1.67:0,fontSize:6.67,lineHeight:6.67,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})},icon:L.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:L.jsxs("g",{transform:"translate(3.5, 3.5)",children:[L.jsx("circle",{r:"8.5",cx:"8.5",cy:"8.5",stroke:"currentColor",strokeWidth:"1",fill:"none"}),L.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 8.900812 14 L 10.286572 11.992442 L 10.63521 12.569632 C 12.188999 11.790696 13.24999 10.23524 13.24999 8.441039 C 13.24999 8.070708 13.203481 7.710487 13.118152 7.365112 L 13.887206 7.365112 C 13.960998 7.712721 14 8.072591 14 8.441039 C 14 10.500518 12.789013 12.288074 11.01168 13.191653 L 11.411587 13.855702 L 8.900812 14 Z"}),L.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 8 13.974609 C 5.462755 13.73554 3.426537 11.698185 3.0625 9.090137 L 2.5 9.090137 L 3.5 7 L 4.5 9.090137 L 4.074219 9.090137 C 4.422903 11.120208 6.015293 12.696354 8 12.925459 L 8 13.974609 Z"}),L.jsx("path",{fill:"currentColor",fillRule:"evenodd",stroke:"none",d:"M 12.68764 6.50351 L 10.588492 5.178213 L 11.35608 4.753726 C 10.531951 4.143034 9.498575 3.778666 8.375084 3.778666 C 6.644794 3.778666 5.125485 4.640751 4.260284 5.940329 L 3.718284 5.421978 C 4.730131 3.997121 6.438381 3.061381 8.375084 3.061381 C 9.781034 3.061381 11.063435 3.556896 12.04896 4.372667 L 12.536759 4.102285 L 12.68764 6.50351 Z"})]})}),defaultAttrs:In,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:i("panel.details.stations.common.left"),middle:i("panel.details.stations.common.middle"),right:i("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:i("panel.details.stations.common.top"),middle:i("panel.details.stations.common.middle"),bottom:i("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.rotate"),value:n.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{n.rotate=Number(e),s(t,n)},minW:"full"},{type:"custom",label:i("panel.details.stations.interchange.title"),component:L.jsx(yn,{stationType:l.KunmingRTInt,defaultAttrs:In,maximumTransfers:[3,0,0]})}];return L.jsx(o,{fields:r})},metadata:{displayName:"panel.details.stations.kunmingRTInt.displayName",cities:[d.Kunming],canvas:[u.RailMap],categories:[g.Metro],tags:["interchange"]}},Tn=8.2628,Dn={top:{offset:8.2628,polarity:-1},middle:{offset:0,polarity:0},bottom:{offset:8.2628,polarity:1}},Hn={names:["Marina South Pier"],nameOffsetX:"right",nameOffsetY:"top",lineCode:"NS",stationCode:"28",isTram:!1,color:[d.Singapore,"nsl","#DA291C",m.white]},Un={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:f=Hn.nameOffsetX,nameOffsetY:h=Hn.nameOffsetY,color:p=Hn.color,lineCode:u=Hn.lineCode,stationCode:g=Hn.stationCode,isTram:y=Hn.isTram}=null!==(t=i[l.MRTBasic])&&void 0!==t?t:Hn,C=n.useCallback((e=>r(a,e)),[a,r]),b=n.useCallback((e=>d(a,e)),[a,d]),v=n.useCallback((e=>m(a,e)),[a,m]),j=22.85,O=12.935,w=16.425*("left"===f?-1:"right"===f?1:0),_=Dn[h].offset*Dn[h].polarity,k="left"===f?"end":"right"===f?"start":"middle";return n.useMemo((()=>L.jsxs("g",{id:a,transform:`translate(${s}, ${o}) ${y?"scale(0.81)":""}`,children:[L.jsxs("g",{onPointerDown:C,onPointerMove:b,onPointerUp:v,style:{cursor:"move"},children:[L.jsx("rect",{x:-11.425,y:-6.4675,rx:"3",ry:"6",width:j,height:O,fill:p[2],stroke:"white",strokeWidth:"1"}),L.jsx("text",{fontSize:5.2,dx:"-4",dy:"0.5",className:"rmp-name__mrt",fill:p[3],textAnchor:"middle",dominantBaseline:"middle",children:u}),L.jsx("text",{fontSize:5.2,dx:"4",dy:"0.5",className:"rmp-name__mrt",fill:p[3],textAnchor:"middle",dominantBaseline:"middle",children:g}),L.jsx("rect",{id:`stn_core_${a}`,x:-11.425,y:-6.4675,rx:"3",ry:"6",width:j,height:O,fill:"white",opacity:"0"})]}),L.jsx("g",{transform:`translate(${w}, ${_})`,textAnchor:k,children:L.jsx(ye,{text:c[0].split("\n"),fontSize:Tn,lineHeight:Tn,grow:"top"===h?"up":"middle"===h?"bidirectional":"down",baseOffset:0,className:"rmp-name__mrt"})})]})),[a,s,o,...c,f,h,p,u,g,y,C,b,v])},icon:L.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[L.jsx("rect",{x:"6",y:"8.6035",rx:"1.575",ry:"3.151",width:"12",height:"6.793",fill:"currentColor"}),L.jsx("text",{fontSize:"3.5",dx:"10",dy:"13",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"NS"}),L.jsx("text",{fontSize:"3.5",dx:"15",dy:"13",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"28"})]}),defaultAttrs:Hn,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:i("panel.details.stations.common.left"),middle:i("panel.details.stations.common.middle"),right:i("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:i("panel.details.stations.common.top"),middle:i("panel.details.stations.common.middle"),bottom:i("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.common.lineCode"),value:n.lineCode,onChange:e=>{n.lineCode=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.common.stationCode"),value:n.stationCode,onChange:e=>{n.stationCode=e,s(t,n)},minW:"full"},{type:"switch",label:i("panel.details.stations.MRTBasic.isTram"),isChecked:n.isTram,onChange:e=>{n.isTram=e,s(t,n)},minW:"full",oneLine:!0},{type:"custom",label:i("color"),component:L.jsx(c,{type:l.MRTBasic,defaultTheme:Hn.color})}];return L.jsx(o,{fields:r})},metadata:{displayName:"panel.details.stations.MRTBasic.displayName",cities:[d.Singapore],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Fn=8.2628,Vn={top:{offset:10.7628,polarity:-1},middle:{offset:0,polarity:0},bottom:{offset:10.7628,polarity:1}},Gn={names:["Chinatown"],nameOffsetX:"right",nameOffsetY:"top",transfer:[[[d.Singapore,"nel","#9B26B6",m.white,"NE","4"],[d.Singapore,"dtl","#0057B7",m.white,"DT","19"]]]},Zn={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:f=Gn.nameOffsetX,nameOffsetY:h=Gn.nameOffsetY,transfer:p=Gn.transfer}=null!==(t=i[l.MRTInt])&&void 0!==t?t:Gn,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),y=n.useCallback((e=>m(a,e)),[a,m]),C=p.at(0),b=29.625*(C.length-2)+57.8,v=16.77,j=[];for(let n=1;nL.jsxs("g",{id:a,transform:`translate(${s}, ${o})`,children:[L.jsx("g",{onPointerDown:u,onPointerMove:g,onPointerUp:y,style:{cursor:"move"},children:p.map((e=>({info:e,width:29.625*(e.length-2)+57.8}))).map((({info:e,width:t},s)=>L.jsxs(n.Fragment,{children:[L.jsx("rect",{x:-t/2,y:-8.385,rx:"4.5",ry:"8",width:t,height:v,fill:`url(#${a}_grad_${s})`,stroke:"white",strokeWidth:"1"}),L.jsx("linearGradient",{id:`${a}_grad_${s}`,y1:"0%",y2:"0%",x1:"0%",x2:"100%",children:e.map(((t,a)=>L.jsxs(n.Fragment,{children:[L.jsx("stop",{offset:100/e.length*a+"%",stopColor:t[2]}),L.jsx("stop",{offset:100/e.length*(a+1)+"%",stopColor:t[2]})]},t[2])))}),j.map((n=>L.jsx("line",{x1:n/e.length*t-t/2,x2:n/e.length*t-t/2,y1:-8.385,y2:8.385,stroke:"white",strokeWidth:"1"},n))),e.map(((e,a,s)=>L.jsxs(n.Fragment,{children:[L.jsx("text",{fontSize:6.9,dx:(""!==e[5]?-5:-2)+t/s.length/2*(2*a+1)-t/2+1,dy:"0.5",className:"rmp-name__mrt",fill:e[3],textAnchor:"middle",dominantBaseline:"middle",children:e[4]}),L.jsx("text",{fontSize:6.9,dx:5+t/s.length/2*(2*a+1)-t/2+1,dy:"0.5",className:"rmp-name__mrt",fill:e[3],textAnchor:"middle",dominantBaseline:"middle",children:e[5]})]},e[2]))),L.jsx("rect",{id:`stn_core_${a}`,x:-t/2,y:-8.385,rx:"4.5",ry:"8",width:t,height:v,fill:"white",opacity:"0"})]},e.map((e=>e[2])).join("_"))))}),L.jsx("g",{transform:`translate(${O}, ${w})`,textAnchor:_,children:L.jsx(ye,{text:c[0].split("\n"),fontSize:Fn,lineHeight:Fn,grow:"top"===h?"up":"middle"===h?"bidirectional":"down",baseOffset:0,className:"rmp-name__mrt"})})]})),[a,s,o,...c,f,h,JSON.stringify(p),u,g,y])},icon:L.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[L.jsx("rect",{x:"2",y:"9.0985",rx:"1.038",ry:"2.076",width:"20",height:"5.803",fill:"currentColor"}),L.jsx("text",{fontSize:"3",dx:"5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"NE"}),L.jsx("text",{fontSize:"3",dx:"9.5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"4"}),L.jsx("text",{fontSize:"3",dx:"14.5",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"DT"}),L.jsx("text",{fontSize:"3",dx:"19",dy:"13.25",className:"rmp-name__en",fill:"white",textAnchor:"middle",children:"19"})]}),defaultAttrs:Gn,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:i("panel.details.stations.common.left"),middle:i("panel.details.stations.common.middle"),right:i("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:i("panel.details.stations.common.top"),middle:i("panel.details.stations.common.middle"),bottom:i("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"custom",label:i("panel.details.stations.interchange.title"),component:L.jsx(yn,{stationType:l.MRTInt,defaultAttrs:Gn,maximumTransfers:[1/0,0,0]})}];return L.jsx(o,{fields:r})},metadata:{displayName:"panel.details.stations.MRTInt.displayName",cities:[d.Singapore],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Qn={size:10,baseOffset:1},qn={size:5,baseOffset:1.5},Jn={names:["新宿","Shinjuku"],nameOffsetX:"right",nameOffsetY:"middle",rotate:0,textOneLine:!1,textVertical:!1,important:!1,lines:[-1,0,1]},Kn={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:f=Jn.nameOffsetX,nameOffsetY:h=Jn.nameOffsetY,rotate:p=Jn.rotate,textOneLine:u=Jn.textOneLine,textVertical:g=Jn.textVertical,important:y=Jn.important,lines:C=Jn.lines}=null!==(t=i[l.JREastBasic])&&void 0!==t?t:Jn,b=n.useCallback((e=>r(a,e)),[a,r]),v=n.useCallback((e=>d(a,e)),[a,d]),j=n.useCallback((e=>m(a,e)),[a,m]),O=5*(Math.max(...C)-Math.min(...C)+1),w=5*(Math.min(...C)-.5),_=5*Math.abs(Math.cos(p*Math.PI/180))*Math.min(...C)-2.5-1,k=5*Math.abs(Math.cos(p*Math.PI/180))*Math.max(...C)+2.5+1,S=5*Math.abs(Math.sin(p*Math.PI/180))*Math.min(...C)-2.5,N=5*Math.abs(Math.sin(p*Math.PI/180))*Math.max(...C)+2.5,z="left"===f?_:"right"===f?k:0,M=(c[0].split("\n").length*("middle"===h?0:Qn.size)+(("middle"===h?0:"top"===h?2:1)+Qn.baseOffset))*Ce[h].polarity+("middle"===h?0:"top"===h?S:N),A="left"===f?"end":"right"===f?"start":"middle",P={ja:"top"===h?"down":"bottom"===h?"up":"bidirectional",en:"top"===h||u?"up":"down"},B={ja:Qn.baseOffset,en:("middle"===h?u?-c[0].split("\n").length*Qn.size/2-1:c[0].split("\n").length*Qn.size/2:0)+(y&&!u?2:0)+qn.baseOffset},$=n.useRef(null),[W,E]=n.useState({width:0});n.useEffect((()=>E($.current.getBBox())),[c[0],g,E,$]);const X=(g?.2:.7)*Qn.size,Y={left:-X/2,middle:0,right:X/2}[f],R={top:-2,middle:0,bottom:2}[h],I=p%90!=0&&"middle"!==f?("left"===f?_:k)*Math.SQRT2:0,T=(y&&"middle"!==f?Y:0)+I,D={0:0,45:-1,90:0,135:1,180:0,225:-1,270:0,315:1}[p],H=D*Qn.size,U=u?(Math.abs(T)+W.width+1+(y?X:0))*("left"===f?-1:1):p%90!=0&&"middle"!==f?c[0].split("\n").length/2*D*Qn.size+("left"===f?-1:1)*Qn.size:0,F=(y?2:0)*Ce[h].polarity,V=W.width,G=W.height,Z={left:-(V+X)+I,middle:-(V+X)/2,right:I}[f],Q={top:-2-B.ja,middle:-G/2,bottom:3-G+B.ja}[h],q={top:3-G-B.ja,middle:0,bottom:-3+B.ja}[h],J=("top"===h?S-qn.baseOffset:N+qn.baseOffset)+((y?X:0)+(p%90!=0?Qn.size/2:0))*Ce[h].polarity,K={ja:"top"===h?"end":"start",en:"top"===h?"start":"end"},ee={0:0,45:-1,90:0,135:1,180:0,225:-1,270:0,315:1}[p],te=ee*Qn.size,ne=c[0].split("\n").length*Qn.size/2+qn.baseOffset,ae=(y?1:0)*Ce[h].polarity*-1,se=(c[0].split("\n").length-0)/2*("top"===h?-1:1)*ee*Qn.size+(y?2:0)*Ce[h].polarity*-1;return L.jsxs("g",{id:a,transform:`translate(${s}, ${o})`,children:[L.jsx("g",{transform:`rotate(${p})`,children:C.map(((e,t)=>L.jsx("circle",{cx:5*e,cy:"0",r:"1.5",stroke:"black",strokeWidth:"0.2",fill:"white"},`stn_core_${a}_${t}`)))}),g?L.jsxs(L.Fragment,{children:[L.jsxs("g",{transform:`translate(0, ${J})`,textAnchor:K.ja,children:[y&&L.jsx("rect",{x:-(V-8)/2,y:q,width:V-8,height:G,rx:(V-8)/2,fill:"black"}),L.jsx(On,{ref:$,text:c[0].split("\n"),fontSize:Qn.size,lineWidth:Qn.size,grow:"bidirectional",baseOffset:0,baseDY:te,y:y?2.75*Ce[h].polarity:0,className:"rmp-name__jreast_ja",fill:y?"white":"black"})]}),L.jsx("g",{transform:`translate(${ae}, ${J+se})rotate(270)`,textAnchor:K.en,children:L.jsx(ye,{text:c[1].split("\n"),fontSize:qn.size,lineHeight:qn.size,grow:"top"===h?"down":"up",baseOffset:ne,funcDX:e=>5*e*Math.SQRT1_2*ee*("top"===h?-1:1),className:"rmp-name__jreast_en"})})]}):L.jsxs("g",{transform:`translate(${z}, ${M})`,textAnchor:A,children:[y&&L.jsx("rect",{x:Z,y:Q+1.75,width:W.width+X,height:G-3.5,ry:(G-3.5)/2,fill:"black"}),L.jsx(ye,{ref:$,x:T,y:y&&"middle"!==h?R:0,text:c[0].split("\n"),fontSize:Qn.size,lineHeight:Qn.size,grow:P.ja,baseOffset:B.ja,funcDX:e=>(e-(c[0].split("\n").length-1)/2)*H,className:"rmp-name__jreast_ja",fill:y?"white":"black"}),L.jsx(ye,{text:c[1].split("\n"),x:U,y:F,fontSize:qn.size,lineHeight:qn.size,grow:P.en,baseOffset:B.en,funcDX:e=>5*e*Math.SQRT1_2*D,className:"rmp-name__jreast_en"})]}),L.jsx("g",{transform:`rotate(${p})`,children:L.jsx("rect",{id:`stn_core_${a}`,fill:"url(#opaque)",fillOpacity:"50%",x:w,y:-2.5,rx:2.5,width:O,height:5,onPointerDown:b,onPointerMove:v,onPointerUp:j,style:{cursor:"move"}})})]})},icon:L.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[L.jsx("circle",{cx:"6",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"}),L.jsx("circle",{cx:"12",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"}),L.jsx("circle",{cx:"18",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"0.5",fill:"none"})]}),defaultAttrs:Jn,attrsComponent:e=>{var t;const{id:n,attrs:s,handleAttrsUpdate:l}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameJa"),value:s.names[0],onChange:e=>{s.names[0]=e.toString(),s.names[0].length>1&&(s.textOneLine=!1,s.important=!1),l(n,s)},minW:"full"},{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:s.names[1],onChange:e=>{s.names[1]=e.toString(),s.names[1].length>1&&(s.textOneLine=!1,s.important=!1),l(n,s)},minW:"full"},{type:"select",label:i("panel.details.stations.jrEastBasic.nameOffset"),value:"middle"!==s.nameOffsetX?s.nameOffsetX:s.nameOffsetY,options:{left:i("panel.details.stations.common.left"),right:i("panel.details.stations.common.right"),top:i("panel.details.stations.common.top"),bottom:i("panel.details.stations.common.bottom")},onChange:e=>{"left"===e||"right"===e?(s.nameOffsetX=e,s.nameOffsetY="middle",s.textVertical=!1):(s.nameOffsetX="middle",s.nameOffsetY=e,s.textOneLine=!1),l(n,s)},minW:"full"},{type:"select",label:i("panel.details.stations.common.rotate"),value:s.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{s.rotate=Number(e),l(n,s)},minW:"full"},{type:"switch",label:i("panel.details.stations.jrEastBasic.textOneLine"),isChecked:s.textOneLine,isDisabled:"middle"!==s.nameOffsetY||s.names.some((e=>e.split("\n").length>1)),onChange:e=>{s.textOneLine=e,l(n,s)},oneLine:!0,minW:"full"},{type:"switch",label:i("panel.details.stations.jrEastBasic.textVertical"),isChecked:s.textVertical,isDisabled:"middle"!==s.nameOffsetX,onChange:e=>{s.textVertical=e,l(n,s)},oneLine:!0,minW:"full"},{type:"switch",label:i("panel.details.stations.jrEastBasic.important"),isChecked:null!==(t=s.important)&&void 0!==t&&t,isDisabled:s.names.some((e=>e.split("\n").length>1)),onChange:e=>{s.important=e,l(n,s)},oneLine:!0,minW:"full"}];return L.jsxs(L.Fragment,{children:[L.jsx(o,{fields:r}),L.jsx(j,{label:i("panel.details.stations.jrEastBasic.lines"),children:L.jsxs(Q,{flexWrap:"wrap",flexDirection:"row",pt:"1",children:[s.lines.map(((e,t)=>L.jsx(q,{width:"80px",inputMode:"numeric",mr:"2",mb:"2",value:e,onChange:e=>((e,t)=>{if((""===e||"-"===e)&&s.lines.length>1)s.lines.splice(t,1);else{const n=Number(e);if(Number.isNaN(n))return;s.lines[t]=n}l(n,s)})(e,t),children:L.jsx(J,{})},t))),L.jsx(q,{width:"80px",inputMode:"numeric",mr:"2",mb:"2",value:"",onChange:e=>(e=>{const t="-"===e?-1:Number(e);Number.isNaN(t)||(s.lines.push(t),l(n,s))})(e),onKeyDown:e=>(e=>{"Backspace"===e.key&&s.lines.length>1&&(s.lines.pop(),l(n,s))})(e),children:L.jsx(J,{})})]})})]})},metadata:{displayName:"panel.details.stations.jrEastBasic.displayName",cities:[d.Tokyo],canvas:[u.RailMap],categories:[g.NationalRail],tags:[]}},ea={size:10,baseOffset:1},ta={size:5,baseOffset:1.5},na={names:["東京","Tōkyō"],nameOffsetX:"left",nameOffsetY:"middle",textVertical:!1,mostImportant:!1,minLength:0},aa={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:f=na.nameOffsetX,nameOffsetY:h=na.nameOffsetY,textVertical:p=na.textVertical,mostImportant:u=na.mostImportant,minLength:g=na.minLength}=null!==(t=i[l.JREastImportant])&&void 0!==t?t:na,y=n.useCallback((e=>r(a,e)),[a,r]),C=n.useCallback((e=>d(a,e)),[a,d]),b=n.useCallback((e=>m(a,e)),[a,m]),v=n.useRef(null),[j,O]=n.useState({height:0,width:0});n.useEffect((()=>O(v.current.getBBox())),[c[0],p,O,v]);const w=Math.max(j.width,j.height),_=(p?.1:.7)*ea.size,k=Math.max(w+_,g),S=p?ea.size+1:k,N=p?k-5:ea.size+1,z={left:-S/2-1,middle:0,right:S/2+1}[f],M={top:-N/2-1,middle:0,bottom:N/2+1}[h],A={left:"end",middle:"middle",right:"start"}[f],P=u?1.5:1;return L.jsxs("g",{id:a,transform:`translate(${s}, ${o})`,children:[L.jsxs("g",{transform:`scale(${P})`,children:[L.jsx("rect",{fill:"black",x:-S/2,y:-N/2,rx:p?void 0:N/2,ry:p?S/2:void 0,width:S,height:N}),p?L.jsx("text",{ref:v,className:"rmp-name__jreast_ja",textAnchor:"middle",writingMode:"vertical-rl",fontSize:ea.size,fill:"white",dominantBaseline:"central",children:c[0]}):L.jsx("text",{ref:v,y:"-1",className:"rmp-name__jreast_ja",textAnchor:"middle",fontSize:ea.size,fill:"white",dominantBaseline:"central",children:c[0]}),L.jsx("rect",{id:`stn_core_${a}`,fill:"black",fillOpacity:"0",x:-S/2,y:-N/2,rx:p?void 0:S/2,ry:p?N/2:void 0,width:S,height:N,onPointerDown:y,onPointerMove:C,onPointerUp:b,style:{cursor:"move"},className:"removeMe"})]}),L.jsx("g",{transform:`translate(${z*P}, ${M*P})`,textAnchor:A,children:L.jsx(ye,{text:c[1].split("\n"),fontSize:ta.size,lineHeight:ta.size,grow:"top"===h?"up":"middle"===h?"bidirectional":"down",baseOffset:0,className:"rmp-name__jreast_en"})})]})},icon:L.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[L.jsx("rect",{x:"3",y:"7.5",rx:"4.5",width:"18",height:"9",stroke:"currentColor",fill:"currentColor"}),L.jsx("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"middle",fontSize:"6",fill:"white",children:"東京"}),L.jsx("text",{x:"12",y:"20.25",textAnchor:"middle",dominantBaseline:"middle",fontSize:"3",children:"Tōkyō"})]}),defaultAttrs:na,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:l}=a(),i=[{type:"input",label:l("panel.details.stations.common.nameJa"),value:n.names[0],onChange:e=>{n.names[0]=e.toString(),s(t,n)},minW:"full"},{type:"textarea",label:l("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e.toString(),s(t,n)},minW:"full"},{type:"select",label:l("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:l("panel.details.stations.common.left"),middle:l("panel.details.stations.common.middle"),right:l("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:l("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:l("panel.details.stations.common.top"),middle:l("panel.details.stations.common.middle"),bottom:l("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"switch",label:l("panel.details.stations.jrEastImportant.textVertical"),isChecked:n.textVertical,onChange:e=>{n.textVertical=e,s(t,n)},oneLine:!0,minW:"full"},{type:"switch",label:l("panel.details.stations.jrEastImportant.mostImportant"),isChecked:n.mostImportant,onChange:e=>{n.mostImportant=e,s(t,n)},oneLine:!0,minW:"full"},{type:"input",label:l("panel.details.stations.jrEastImportant.minLength"),value:n.minLength.toString(),onChange:e=>{Number.isNaN(e)?n.minLength=0:n.minLength=Number(e),s(t,n)},minW:"full"}];return L.jsx(o,{fields:i})},metadata:{displayName:"panel.details.stations.jrEastImportant.displayName",cities:[d.Tokyo],canvas:[u.RailMap],categories:[g.NationalRail],tags:[]}},sa={...x,nameOffsetX:"right",nameOffsetY:"top",color:[d.Foshan,"fs1","#C4D600",m.black],lineCode:"GF",stationCode:"01",open:!0,secondaryNames:["",""],tram:!1},oa={component:e=>{var t,a;const{id:s,x:o,y:i,attrs:r,handlePointerDown:d,handlePointerMove:m,handlePointerUp:c}=e,{names:f=x.names,nameOffsetX:h=sa.nameOffsetX,nameOffsetY:p=sa.nameOffsetY,color:u=sa.color,lineCode:g=sa.lineCode,stationCode:y=sa.stationCode,open:C=sa.open,secondaryNames:b=sa.secondaryNames,tram:v=sa.tram}=null!==(t=r[l.FoshanMetroBasic])&&void 0!==t?t:sa,j=n.useCallback((e=>d(s,e)),[s,d]),O=n.useCallback((e=>m(s,e)),[s,m]),w=n.useCallback((e=>c(s,e)),[s,c]),_=n.useRef(null);null===(a=_.current)||void 0===a||null===(a=a.querySelector("path"))||void 0===a||a.setAttribute("id",`stn_core_${s}`);const k={en:v?5.08:6.56,zh:v?7.29:13.13},S={top:{namesPos:1,lineHeight:k.en,polarity:-1},middle:{namesPos:0,lineHeight:0,polarity:0},bottom:{namesPos:0,lineHeight:k.zh,polarity:1}},N=v?11:15,z="left"===h?-N:"right"===h?N:0,M=v?8:10,A=(f[S[p].namesPos].split("\n").length*S[p].lineHeight+M)*S[p].polarity,P="left"===h?"end":"right"===h?"start":C||"middle"!==h||""!==b.join("")?"middle":"end",B=n.useRef(null),[$,W]=n.useState(0);n.useEffect((()=>{var e,t;return W(null!==(e=null===(t=B.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...b]);const E=n.useRef(null),[X,Y]=n.useState(0);n.useEffect((()=>{var e,t;return Y(null!==(e=null===(t=E.current)||void 0===t?void 0:t.getBBox().width)&&void 0!==e?e:0)}),[...f]);const R="middle"===h?X/2+($+24)/2:(X+($+24)/2)*("left"===h?-1:1),I="middle"===h&&""!==b.join("")?X/2+($+24):(X+$+(0!==$?24:0))*("left"===h?-1:"right"===h?1:0);return L.jsxs("g",{id:s,transform:`translate(${o}, ${i})`,children:[L.jsx("g",{transform:`scale(${.57915*(v?.729:1)})`,onPointerDown:j,onPointerMove:O,onPointerUp:w,style:{cursor:"move"},ref:_,children:L.jsx(St,{id:`stn_core_${s}`,strokeColour:u[2],lineNum:""===g?void 0:g,stnNum:""===y?void 0:y,textClassName:"rmp-name__zh"})}),L.jsxs("g",{ref:E,transform:`translate(${z}, ${A})`,textAnchor:P,children:[L.jsx(ye,{text:f[0].split("\n"),fontSize:k.zh,lineHeight:k.zh,grow:"up",className:"rmp-name__zh"}),L.jsx(ye,{text:f[1].split("\n"),fontSize:k.en,lineHeight:k.en,grow:"down",className:"rmp-name__en"})]}),""!==b.join("")&&L.jsxs("g",{transform:`translate(${z+R}, ${A})`,textAnchor:"middle",children:[L.jsx("text",{fontSize:"13.13",dx:-($+5)/2,textAnchor:"end",dominantBaseline:"middle",className:"rmp-name__zh",children:"("}),L.jsx("text",{fontSize:"13.13",dx:($+5)/2,textAnchor:"start",dominantBaseline:"middle",className:"rmp-name__zh",children:")"}),L.jsxs("g",{ref:B,children:[L.jsx("text",{fontSize:"10",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:b[0]}),L.jsx("text",{fontSize:"5.42",dy:"2",dominantBaseline:"hanging",className:"rmp-name__en",children:b[1]})]})]}),!C&&L.jsxs("g",{transform:`translate(${z+I}, ${A})`,textAnchor:"middle"===h?"start":P,children:[L.jsx("text",{fontSize:"6.04",dy:"-2",dominantBaseline:"auto",className:"rmp-name__zh",children:"(未开通)"}),L.jsx("text",{fontSize:"3.6",dy:"4",dominantBaseline:"hanging",className:"rmp-name__en",children:"(Under Construction)"})]})]})},icon:L.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:L.jsx("g",{transform:"translate(12,12)scale(0.45)",children:L.jsx(St,{strokeColour:"#000",lineNum:"1",stnNum:"01"})})}),defaultAttrs:sa,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e,s(t,n)},minW:"full"},{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:i("panel.details.stations.common.left"),middle:i("panel.details.stations.common.middle"),right:i("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:i("panel.details.stations.common.top"),middle:i("panel.details.stations.common.middle"),bottom:i("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"custom",label:i("color"),component:L.jsx(c,{type:l.FoshanMetroBasic,defaultTheme:sa.color})},{type:"input",label:i("panel.details.stations.common.lineCode"),value:n.lineCode,onChange:e=>{n.lineCode=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.common.stationCode"),value:n.stationCode,onChange:e=>{n.stationCode=e,s(t,n)},minW:"full"},{type:"switch",label:i("panel.details.stations.foshanMetroBasic.open"),oneLine:!0,isChecked:n.open,onChange:e=>{n.open=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.foshanMetroBasic.secondaryNameZh"),value:n.secondaryNames[0],onChange:e=>{n.secondaryNames[0]=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.foshanMetroBasic.secondaryNameEn"),value:n.secondaryNames[1],onChange:e=>{n.secondaryNames[1]=e,s(t,n)},minW:"full"},{type:"switch",label:i("panel.details.stations.foshanMetroBasic.tram"),oneLine:!0,isChecked:n.tram,onChange:e=>{n.tram=e,s(t,n)},minW:"full"}];return L.jsx(o,{fields:r})},metadata:{displayName:"panel.details.stations.foshanMetroBasic.displayName",cities:[d.Foshan],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},la={top:3.75,middle:0,bottom:8},ia={...x,color:[d.Qingdao,"qd1","#f7b000",m.white],nameOffsetX:"right",nameOffsetY:"top",isInt:!1},ra={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,color:f=ia.color,nameOffsetX:h=ia.nameOffsetX,nameOffsetY:p=ia.nameOffsetY,isInt:u=ia.isInt}=null!==(t=i[l.QingdaoMetroStation])&&void 0!==t?t:ia,g=n.useCallback((e=>r(a,e)),[a,r]),y=n.useCallback((e=>d(a,e)),[a,d]),C=n.useCallback((e=>m(a,e)),[a,m]),[b,v]=u?(O=p,"left"===(j=h)&&"top"===O?[-6,-c[1].split("\n").length*la[O]-6]:"middle"===j&&"top"===O?[0,-c[1].split("\n").length*la[O]-10]:"right"===j&&"top"===O?[6,-c[1].split("\n").length*la[O]-6]:"left"===j&&"bottom"===O?[-6,c[0].split("\n").length*la[O]+6]:"middle"===j&&"bottom"===O?[0,c[0].split("\n").length*la[O]+7]:"right"===j&&"bottom"===O?[6,c[0].split("\n").length*la[O]+6]:"left"===j&&"middle"===O?[-8,2]:"right"===j&&"middle"===O?[8,2]:[0,0]):((e,t)=>{const n="left"===e?-6:"right"===e?6:0;return"top"===t?[n,-c[1].split("\n").length*la[t]-5.5]:"bottom"===t?[n,c[0].split("\n").length*la[t]+4]:[n,2]})(h,p);var j,O;const w="left"===h?"end":"right"===h?"start":"middle";return L.jsxs("g",{id:a,transform:`translate(${s}, ${o})`,children:[L.jsx("circle",{id:`stn_core_${a}`,r:u?6:2.7,stroke:u?"black":f[2],strokeWidth:u?1.5:.2,fill:"white",onPointerDown:g,onPointerMove:y,onPointerUp:C,style:{cursor:"move"}}),L.jsxs("g",{transform:`translate(${b}, ${v})`,textAnchor:w,children:[L.jsx(ye,{text:c[0].split("\n"),fontSize:8,lineHeight:8,grow:"up",baseOffset:1,className:"rmp-name__zh"}),L.jsx(ye,{text:c[1].split("\n"),fontSize:3.75,lineHeight:3.75,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})},icon:L.jsx("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:L.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor",strokeWidth:"0.6",fill:"none"})}),defaultAttrs:ia,attrsComponent:e=>{var t,n,s,i;const{id:r,attrs:d,handleAttrsUpdate:m}=e,{t:f}=a(),h=[{type:"textarea",label:f("panel.details.stations.common.nameZh"),value:null!==(t=d.names[0])&&void 0!==t?t:ia.names[0],onChange:e=>{d.names[0]=e.toString(),m(r,d)},minW:"full"},{type:"textarea",label:f("panel.details.stations.common.nameEn"),value:null!==(n=d.names[1])&&void 0!==n?n:ia.names[1],onChange:e=>{d.names[1]=e.toString(),m(r,d)},minW:"full"},{type:"select",label:f("panel.details.stations.common.nameOffsetX"),value:null!==(s=d.nameOffsetX)&&void 0!==s?s:ia.nameOffsetX,options:{left:f("panel.details.stations.common.left"),middle:f("panel.details.stations.common.middle"),right:f("panel.details.stations.common.right")},disabledOptions:"middle"===d.nameOffsetY?["middle"]:[],onChange:e=>{d.nameOffsetX=e,m(r,d)},minW:"full"},{type:"select",label:f("panel.details.stations.common.nameOffsetY"),value:null!==(i=d.nameOffsetY)&&void 0!==i?i:ia.nameOffsetY,options:{top:f("panel.details.stations.common.top"),middle:f("panel.details.stations.common.middle"),bottom:f("panel.details.stations.common.bottom")},disabledOptions:"middle"===d.nameOffsetX?["middle"]:[],onChange:e=>{d.nameOffsetY=e,m(r,d)},minW:"full"},{type:"custom",label:f("color"),component:L.jsx(c,{type:l.QingdaoMetroStation,defaultTheme:ia.color}),minW:"full"},{type:"switch",label:f("panel.details.stations.qingdaoMetro.isInt"),isChecked:d.isInt,oneLine:!0,onChange:e=>{d.isInt=e,m(r,d)},minW:"full"}];return L.jsx(o,{fields:h})},metadata:{displayName:"panel.details.stations.qingdaoMetro.displayName",cities:[d.Qingdao],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},da=e=>{const{lineCode:t,stationCode:n,color:a,stroke:s}=e,[o,l,i]=[10,15,.8];return L.jsxs(L.Fragment,{children:[s&&L.jsx("rect",{x:-o/2-i,y:-l/2-i,width:o+2*i,height:l+2*i,rx:2.5,strokeWidth:i,stroke:"white",fill:"white"}),L.jsx("rect",{x:-o/2,y:-l/2,width:o,height:l,rx:2,strokeWidth:1.5,stroke:a[2],fill:"white"}),L.jsx("text",{x:0,y:1===t.length?-.75:-1.5,textAnchor:"middle",className:"rmp-name__tokyo_en",fontSize:1===t.length?7:4.5,fill:"black",children:t}),L.jsx("text",{x:1===n.length?0:-.4/n.length,y:5.5,textAnchor:"middle",className:"rmp-name__en",fontSize:7,fontWeight:"bold",letterSpacing:"-0.4",fill:"black",children:n})]})},ma={names:["京橋"],nameOffsetX:"right",nameOffsetY:"middle",textVertical:!1,lineCode:"G",stationCode:"10",color:[d.Tokyo,"g","#f9a328",m.white]},ca={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:f=ma.nameOffsetX,nameOffsetY:h=ma.nameOffsetY,textVertical:p=ma.textVertical,lineCode:u=ma.lineCode,stationCode:g=ma.stationCode,color:y=ma.color}=null!==(t=i[l.TokyoMetroBasic])&&void 0!==t?t:ma,C=n.useCallback((e=>r(a,e)),[a,r]),b=n.useCallback((e=>d(a,e)),[a,d]),v=n.useCallback((e=>m(a,e)),[a,m]),[j,O]=n.useState(0);n.useEffect((()=>{let e=0;c[0].split("\n").forEach((t=>{e=Math.max(e,t.length)})),O(e)}),[c[0]]);const w="left"===f?-7:"right"===f?7:0,_="left"===f?-12:"right"===f?12:0,k="bottom"===h?20:"top"===h?-9:5.5,S="bottom"===h?9+5*j:"top"===h?-9-5*j:-5,N="left"===f?"end":"right"===f?"start":"middle";return L.jsxs("g",{id:a,transform:`translate(${s}, ${o})`,children:[L.jsx(da,{lineCode:u,stationCode:g,color:y}),L.jsx("rect",{id:`stn_core_${a}`,x:-5.8,y:-8.2,width:11.6,height:16.4,rx:2.5,opacity:0,onPointerDown:C,onPointerMove:b,onPointerUp:v,style:{cursor:"move"}}),L.jsx("g",{textAnchor:N,className:"rmp-name-outline",strokeWidth:"1",children:p?L.jsx("g",{transform:`translate(${_}, ${S})`,textAnchor:N,children:L.jsx(On,{text:c[0].split("\n"),fontSize:10,lineWidth:10,grow:"bidirectional",baseOffset:0,baseDY:0,className:"rmp-name__jreast_ja",fill:"black"})}):L.jsx("g",{transform:`translate(${w}, ${k})`,textAnchor:N,children:L.jsx(ye,{text:c[0].split("\n"),fontSize:10,lineHeight:10,grow:"up",funcDX:e=>10*(e-(c[0].split("\n").length-1)/2),className:"rmp-name__jreast_ja",fill:"black"})})})]})},icon:L.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[L.jsx("rect",{x:"6.5",y:"4.5",rx:"1.5",width:"10",height:"15",stroke:"currentColor",fill:"none"}),L.jsx("text",{x:"9",y:"11",fontSize:"7",fill:"currentColor",children:"G"}),L.jsx("text",{x:"7.75",y:"18",fontSize:"7",letterSpacing:"-0.8",fill:"currentColor",children:"10"})]}),defaultAttrs:ma,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameJa"),value:n.names[0],onChange:e=>{n.names[0]=e.toString(),s(t,n)},minW:"full"},{type:"select",label:i("panel.details.stations.tokyoMetroBasic.nameOffset"),value:"middle"!==n.nameOffsetX?n.nameOffsetX:n.nameOffsetY,options:{left:i("panel.details.stations.common.left"),right:i("panel.details.stations.common.right"),top:i("panel.details.stations.common.top"),bottom:i("panel.details.stations.common.bottom")},onChange:e=>{"left"===e||"right"===e?(n.nameOffsetX=e,n.nameOffsetY="middle",n.textVertical=!1):(n.nameOffsetX="middle",n.nameOffsetY=e),s(t,n)},minW:"full"},{type:"switch",label:i("panel.details.stations.tokyoMetroBasic.textVertical"),isChecked:n.textVertical,isDisabled:"middle"!==n.nameOffsetX,onChange:e=>{n.textVertical=e,s(t,n)},oneLine:!0,minW:"full"},{type:"input",label:i("panel.details.stations.common.lineCode"),value:n.lineCode,onChange:e=>{n.lineCode=e,s(t,n)},minW:"full"},{type:"input",label:i("panel.details.stations.common.stationCode"),value:n.stationCode,onChange:e=>{n.stationCode=e,s(t,n)},minW:"full"},{type:"custom",label:i("color"),component:L.jsx(c,{type:l.TokyoMetroBasic,defaultTheme:ma.color}),minW:"full"}];return L.jsx(o,{fields:r})},metadata:{displayName:"panel.details.stations.tokyoMetroBasic.displayName",cities:[d.Tokyo],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},fa={names:["日本橋"],nameOffsetX:"right",nameOffsetY:"middle",mereOffset:"none",textVertical:!1,interchanges:[{lineCode:"G",stationCode:"11",color:[d.Tokyo,"g","#f9a328",m.white]},{lineCode:"T",stationCode:"10",color:[d.Tokyo,"t","#00a4db",m.white]},{lineCode:"A",stationCode:"13",color:[d.Tokyo,"a","#dd4231",m.white]}],align:"horizontal",importance:"default"},ha={lineCode:"",stationCode:"",color:[d.Tokyo,"","#AAAAAA",m.white]},pa={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:f=fa.nameOffsetX,nameOffsetY:h=fa.nameOffsetY,textVertical:p=fa.textVertical,interchanges:u=fa.interchanges,align:g=fa.align,importance:y=fa.importance,mereOffset:C=fa.mereOffset}=null!==(t=i[l.TokyoMetroInt])&&void 0!==t?t:fa,b=n.useCallback((e=>r(a,e)),[a,r]),v=n.useCallback((e=>d(a,e)),[a,d]),j=n.useCallback((e=>m(a,e)),[a,m]),[O,w]=n.useState(0);n.useEffect((()=>{let e=0;c[0].split("\n").forEach((t=>{e=Math.max(e,t.length)})),w(e)}),[c[0]]);const _="horizontal"===g?13*u.length:0,k="vertical"===g?18*u.length:0,S="left"===f?-("horizontal"===g?4:10)-_/2:"right"===f?("horizontal"===g?2:9)+_/2:"left2"===C?-5:"right2"===C?5:0,{fontSize:N,textXVer:z,textY:M,textYVer:A}="default"===y?{fontSize:10,textXVer:("left"===f?-12:"right"===f?12:-2)+("left1"===C?-4:"left2"===C?-10:"right1"===C?4:"right2"===C?10:0),textY:"bottom"===h?("vertical"===g?1:10)+k/2:"top"===h?-("vertical"===g?3:12)-k/2:("up"===C?3:"down"===C?10:0)-7.5,textYVer:"bottom"===h?("vertical"===g?3:12)+k/2+5*O:"top"===h?-("vertical"===g?1:13)-k/2-5*O:-5}:"high"===y?{fontSize:20,textXVer:("left"===f?-12:"right"===f?12:-2)+("left1"===C?-10:"left2"===C?-16:"right1"===C?10:"right2"===C?16:0),textY:"bottom"===h?("vertical"===g?3:10)+k/2:"top"===h?-("vertical"===g?1:13)-k/2:("up"===C?6:"down"===C?15:0)-13,textYVer:"bottom"===h?("vertical"===g?4:13)+k/2+10*O:"top"===h?-("vertical"===g?5:13)-k/2-10*O:-5}:{fontSize:15,textXVer:("left"===f?-12:"right"===f?12:-2)+("left1"===C?-8:"left2"===C?-13:"right1"===C?8:"right2"===C?13:0),textY:"bottom"===h?("vertical"===g?1:10)+k/2:"top"===h?-("vertical"===g?3:13)-k/2:("up"===C?4:"down"===C?12:0)-10,textYVer:"bottom"===h?("vertical"===g?3:13)+k/2+7.5*O:"top"===h?-("vertical"===g?4:13)-k/2-7.5*O:-5},P="left"===f||"left1"===C||"left2"===C?"end":"right"===f||"right1"===C||"right2"===C?"start":"middle";return L.jsxs("g",{id:a,transform:`translate(${s}, ${o})`,children:["horizontal"===g?L.jsxs(L.Fragment,{children:[L.jsx("rect",{x:-(_+3)/2,y:-10.5,width:_+3,height:21,rx:3,fill:"#808285",stroke:"black",strokeWidth:"0.5"}),u.map(((e,t)=>L.jsx("g",{transform:`translate(${13*t-(_-13)/2}, 0)`,children:L.jsx(da,{lineCode:e.lineCode,stationCode:e.stationCode,color:e.color,stroke:!0})},t))),L.jsx("rect",{id:`stn_core_${a}`,x:-(_+3)/2,y:-10.5,width:_+3,height:21,rx:3,opacity:0,onPointerDown:b,onPointerMove:v,onPointerUp:j,style:{cursor:"move"}})]}):L.jsxs(L.Fragment,{children:[L.jsx("rect",{x:-8,y:-(k+3)/2,width:16,height:k+3,rx:3,fill:"#808285",stroke:"black",strokeWidth:"0.5"}),u.map(((e,t)=>L.jsx("g",{transform:`translate(0, ${18*t-(k-18)/2})`,children:L.jsx(da,{lineCode:e.lineCode,stationCode:e.stationCode,color:e.color,stroke:!0})},t))),L.jsx("rect",{id:`stn_core_${a}`,x:-8,y:-(k+3)/2,width:16,height:k+3,rx:3,opacity:0,onPointerDown:b,onPointerMove:v,onPointerUp:j,style:{cursor:"move"}})]}),L.jsx("g",{textAnchor:P,className:"rmp-name-outline",strokeWidth:"1",children:p?L.jsx("g",{transform:`translate(${z}, ${A})`,textAnchor:"middle",children:L.jsx(On,{text:c[0].split("\n"),fontSize:N,lineWidth:N,grow:"bidirectional",className:"rmp-name__jreast_ja",fill:"black",fontWeight:"default"!==y?"bold":"normal"})}):L.jsx("g",{transform:`translate(${S}, ${M})`,textAnchor:P,children:L.jsx(ye,{text:c[0].split("\n"),fontSize:N,lineHeight:N,grow:"top"===h||"up"===C?"up":"down",className:"rmp-name__jreast_ja",fill:"black",fontWeight:"default"!==y?"bold":"normal"})})})]})},icon:L.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[L.jsx("rect",{x:"4",y:"8",rx:"1",width:"6.5",height:"10",stroke:"currentColor",fill:"none"}),L.jsx("rect",{x:"12.5",y:"8",rx:"1",width:"6.5",height:"10",stroke:"currentColor",fill:"none"}),L.jsx("text",{x:"5.5",y:"12.5",fontSize:"4",fill:"currentColor",children:"G"}),L.jsx("text",{x:"5",y:"16.25",fontSize:"4",letterSpacing:"-0.8",fill:"currentColor",children:"16"}),L.jsx("text",{x:"14.25",y:"12.5",fontSize:"4",fill:"currentColor",children:"H"}),L.jsx("text",{x:"13.75",y:"16.25",fontSize:"4",letterSpacing:"-0.8",fill:"currentColor",children:"18"})]}),defaultAttrs:fa,attrsComponent:e=>{const{id:t,attrs:s,handleAttrsUpdate:l}=e,i=y(),{paletteAppClip:{output:r}}=C((e=>e.runtime)),{t:d}=a(),m=[{type:"textarea",label:d("panel.details.stations.common.nameJa"),value:s.names[0],onChange:e=>{s.names[0]=e.toString(),l(t,s)},minW:"full"},{type:"select",label:d("panel.details.stations.tokyoMetroBasic.nameOffset"),value:"middle"!==s.nameOffsetX?s.nameOffsetX:s.nameOffsetY,options:{left:d("panel.details.stations.common.left"),right:d("panel.details.stations.common.right"),top:d("panel.details.stations.common.top"),bottom:d("panel.details.stations.common.bottom")},onChange:e=>{"left"===e||"right"===e?(s.nameOffsetX=e,s.nameOffsetY="middle",s.textVertical=!1,"left1"!==s.mereOffset&&"left2"!==s.mereOffset&&"right1"!==s.mereOffset&&"right2"!==s.mereOffset||(s.mereOffset="none")):(s.nameOffsetX="middle",s.nameOffsetY=e,"up"!==s.mereOffset&&"down"!==s.mereOffset||(s.mereOffset="none")),l(t,s)},minW:"full"},{type:"select",label:d("panel.details.stations.tokyoMetroInt.mereOffset.displayName"),value:s.mereOffset,options:{none:d("panel.details.stations.tokyoMetroInt.mereOffset.none"),..."middle"===s.nameOffsetX?{left1:d("panel.details.stations.tokyoMetroInt.mereOffset.left1"),left2:d("panel.details.stations.tokyoMetroInt.mereOffset.left2"),right1:d("panel.details.stations.tokyoMetroInt.mereOffset.right1"),right2:d("panel.details.stations.tokyoMetroInt.mereOffset.right2")}:{up:d("panel.details.stations.tokyoMetroInt.mereOffset.up"),down:d("panel.details.stations.tokyoMetroInt.mereOffset.down")}},onChange:e=>{s.mereOffset=e,l(t,s)},minW:"full"},{type:"switch",label:d("panel.details.stations.tokyoMetroBasic.textVertical"),isChecked:s.textVertical,isDisabled:"middle"!==s.nameOffsetX,onChange:e=>{s.textVertical=e,l(t,s)},oneLine:!0,minW:"full"},{type:"select",label:d("panel.details.stations.tokyoMetroInt.importance.displayName"),value:s.importance,options:{default:d("panel.details.stations.tokyoMetroInt.importance.default"),middle:d("panel.details.stations.tokyoMetroInt.importance.middle"),high:d("panel.details.stations.tokyoMetroInt.importance.high")},onChange:e=>{s.importance=e,l(t,s)},minW:"full"},{type:"select",label:d("panel.details.stations.tokyoMetroInt.align.displayName"),value:s.align,options:{horizontal:d("panel.details.stations.tokyoMetroInt.align.horizontal"),vertical:d("panel.details.stations.tokyoMetroInt.align.vertical")},onChange:e=>{s.align=e,l(t,s)},minW:"full"}],[c,f]=n.useState(void 0);n.useEffect((()=>{void 0!==c&&r&&(s.interchanges[c].color=r,l(t,s),f(void 0))}),[null==r?void 0:r.toString()]);const h=e=>{const n=structuredClone(s.interchanges);n.push(ha);for(let t=n.length-1;t>e;t--)n[t]=structuredClone(n[t-1]);n[e]=ha,l(t,{...s,interchanges:n})};return L.jsxs(L.Fragment,{children:[L.jsx(o,{fields:m}),L.jsx(j,{label:d("panel.details.stations.interchange.title"),children:L.jsxs(U,{align:"flex-start",children:[s.interchanges.map(((e,n)=>L.jsxs(T,{children:[L.jsx(O,{theme:e.color,onClick:()=>{f(n),i(w(e.color))}}),L.jsx(j,{label:d("panel.details.stations.common.lineCode"),children:L.jsx(A,{defaultValue:e.lineCode,onDebouncedChange:e=>((e,n)=>{s.interchanges[n].lineCode=e,l(t,s)})(e,n)})}),L.jsx(j,{label:d("panel.details.stations.common.stationCode"),children:L.jsx(A,{defaultValue:e.stationCode,onDebouncedChange:e=>((e,n)=>{s.interchanges[n].stationCode=e,l(t,s)})(e,n)})}),L.jsx(H,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),icon:L.jsx(v,{}),onClick:()=>h(n)}),L.jsx(H,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),icon:L.jsx(k,{}),onClick:()=>(e=>{const n=s.interchanges.filter(((t,n)=>n!==e));l(t,{...s,interchanges:n})})(n),isDisabled:1===s.interchanges.length})]},n))),L.jsx(Z,{size:"sm",width:"100%",variant:"outline",leftIcon:L.jsx(v,{}),onClick:()=>h(s.interchanges.length),children:d("panel.details.stations.interchange.title")})]})})]})},metadata:{displayName:"panel.details.stations.tokyoMetroInt.displayName",cities:[d.Tokyo],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},ua={0:{textDx:0,textDy:-9.15,textAnchor:"middle",dominantBaseline:"auto",polarity:-1,grow:"up"},45:{textDx:9.15*Math.SQRT1_2,textDy:-9.15*Math.SQRT1_2,textAnchor:"start",dominantBaseline:"auto",polarity:-1,grow:"up"},90:{textDx:9.15,textDy:0,textAnchor:"start",dominantBaseline:"middle",polarity:0,grow:"bidirectional"},135:{textDx:9.15*Math.SQRT1_2,textDy:9.15*Math.SQRT1_2,textAnchor:"start",dominantBaseline:"hanging",polarity:1,grow:"down"},180:{textDx:0,textDy:9.15,textAnchor:"middle",dominantBaseline:"hanging",polarity:1,grow:"down"},225:{textDx:-9.15*Math.SQRT1_2,textDy:9.15*Math.SQRT1_2,textAnchor:"end",dominantBaseline:"hanging",polarity:1,grow:"down"},270:{textDx:-9.15,textDy:0,textAnchor:"end",dominantBaseline:"middle",polarity:0,grow:"bidirectional"},315:{textDx:-9.15*Math.SQRT1_2,textDy:-9.15*Math.SQRT1_2,textAnchor:"end",dominantBaseline:"auto",polarity:-1,grow:"up"}},ga=[d.London,"central","#DC241F",m.white,0],xa=n.memo((e=>{const{id:t,stepFreeAccess:n,...a}=e;return L.jsxs("g",{...a,children:[L.jsx("path",{fill:"train"===n?"#1C3E93":"white",stroke:"#1C3E93",strokeWidth:2.5,d:"M0-31c17.1,0,31,13.9,31,31S17.1,31,0,31S-31,17.1-31,0S-17.1-31,0-31"}),L.jsx("path",{fill:"train"===n?"white":"#1C3E93",d:"M-10.5,9c1.4,4.9,6,8.4,11.3,8.4c6.5,0,11.8-5.3,11.8-11.8c0-3.4-1.5-6.5-3.8-8.7l0.7-5.1\n\tc4.6,2.9,7.6,8,7.6,13.8c0,9-7.3,16.3-16.3,16.3c-5.9,0-11-3.1-13.9-7.7L-10.5,9z"}),L.jsx("path",{fill:"train"===e.stepFreeAccess?"white":"#1C3E93",d:"M0.5-20.5c0,2.5,2,4.6,4.6,4.6c2.5,0,4.6-2.1,4.6-4.6s-2.1-4.6-4.6-4.6S0.5-23,0.5-20.5"}),L.jsx("path",{fill:"train"===n?"white":"#1C3E93",d:"M3-12.4L2.5-9.2h-9.9c0,0-2.1,0.2-2.1,2.2s2.1,2.2,2.1,2.2h9.3l-0.5,3h-12.5c0,0-0.9,0-1.3,0.5\n\tC-12.8-1-13.2,0-13.2,0l-7,14.2c0,0-0.8,1.8,1.2,2.9c2,1.1,3.3-1,3.3-1l5.5-11.3c0,0,0.5-0.7,1-1c0.6-0.3,1.1-0.3,1.1-0.3H3.4\n\tc0,0,1.2,0,2.2-0.9c0.9-0.9,1.1-2,1.1-2l1.7-12.4c0,0,0-2.6-2.7-2.7C3.6-14.5,3-12.4,3-12.4"}),L.jsx("path",{id:`stn_core_${t}`,fill:"train"===n?"#1C3E93":"white",fillOpacity:"0",stroke:"#1C3E93",strokeWidth:2.5,strokeOpacity:"0",d:"M0-31c17.1,0,31,13.9,31,31S17.1,31,0,31S-31,17.1-31,0S-17.1-31,0-31",className:"removeMe"})]})}),((e,t)=>JSON.stringify(e)===JSON.stringify(t))),ya={names:["Station"],transfer:[[ga]],rotate:0,terminal:!1,stepFreeAccess:"none"},Ca={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,transfer:f=ya.transfer,rotate:h=ya.rotate,terminal:p=ya.terminal,stepFreeAccess:u=ya.stepFreeAccess}=null!==(t=i[l.LondonTubeBasic])&&void 0!==t?t:ya,g=n.useCallback((e=>r(a,e)),[a,r]),y=n.useCallback((e=>d(a,e)),[a,d]),C=n.useCallback((e=>m(a,e)),[a,m]),b=(h-90)*Math.PI/180,v=p?2*(.66*5+2.5):.66*5+.5,j=ua[h].textDx+Math.cos(b)*Math.max(...f[0].map((e=>e[4])))*5,O=ua[h].textDy+Math.sin(b)*Math.max(...f[0].map((e=>e[4])))*5,w=-(Math.max(...f[0].map((e=>e[4])))+Math.min(...f[0].map((e=>e[4]))))/2*5,_=Math.sin(h*Math.PI/180)*w,k=Math.cos(h*Math.PI/180)*w;return L.jsxs("g",{id:a,children:[L.jsx("g",{transform:`translate(${s}, ${o})rotate(${h})`,onPointerDown:g,onPointerMove:y,onPointerUp:C,style:{cursor:"move"},children:"none"===u?f[0].map((e=>L.jsx("rect",{id:`stn_core_${a}`,x:.66*-5/2,y:.66*-5-2.5-5*e[4],width:5*.66,height:v,stroke:"none",fill:e[2]},`${a}_${e[2]}_${e[4]}`))):L.jsx(xa,{id:a,stepFreeAccess:u,transform:`translate(${_},${k})rotate(${-h})scale(0.2333)`},`stn_core_${a}`)}),L.jsx("g",{transform:`translate(${s+j}, ${o+O})`,textAnchor:ua[h].textAnchor,fill:"#003888",children:L.jsx(ye,{text:c[0].split("\n"),fontSize:10,lineHeight:8.5,dominantBaseline:ua[h].dominantBaseline,grow:ua[h].grow,baseOffset:0,className:"rmp-name__tube"})})]})},icon:L.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:L.jsx("rect",{x:"6",y:"9",width:"12",height:"6",stroke:"currentColor",fill:"currentColor"})}),defaultAttrs:ya,attrsComponent:e=>{var t;const{id:n,attrs:s,handleAttrsUpdate:l}=e,{t:i}=a(),r=[{type:"textarea",label:i("panel.details.stations.common.nameEn"),value:s.names[0],onChange:e=>{s.names[0]=e.toString(),l(n,s)},minW:"full"},{type:"select",label:i("panel.details.stations.common.rotate"),value:s.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{s.rotate=Number(e),l(n,s)},minW:"full"},{type:"switch",label:i("panel.details.stations.londonTubeBasic.terminal"),isChecked:s.terminal,isDisabled:s.transfer[0].length>1,onChange:e=>{s.terminal=e,l(n,s)},oneLine:!0,minW:"full"},{type:"select",label:i("panel.details.stations.londonTubeCommon.stepFreeAccess"),value:s.stepFreeAccess,options:{none:i("panel.details.stations.londonTubeCommon.stepFreeAccessNone"),train:i("panel.details.stations.londonTubeCommon.stepFreeAccessTrain"),platform:i("panel.details.stations.londonTubeCommon.stepFreeAccessPlatform")},onChange:e=>{s.stepFreeAccess=e,l(n,s)},minW:"full"}],d=null!==(t=s.transfer)&&void 0!==t?t:ya.transfer;return L.jsxs(L.Fragment,{children:[L.jsx(o,{fields:r}),L.jsx(j,{label:i("panel.details.stations.interchange.title"),children:L.jsxs(U,{align:"flex-start",children:[L.jsx(G,{size:"xs",children:i("panel.details.stations.londonTubeBasic.shareTracks")}),L.jsx(ba,{interchangeList:d[0],onAdd:(m=0,e=>{const t=structuredClone(d);if(t.length<=m)for(let n=t.length;n<=m;n++)t[n]=[ga];t[m].push(e),s.transfer=t,l(n,s)}),onDelete:(e=>t=>{if(d.length>e&&d[e].length>t){const a=d.map(((n,a)=>a===e?n.filter(((e,n)=>n!==t)):n));s.transfer=a,l(n,s)}})(0),onUpdate:(e=>(t,a)=>{if(d.length>e&&d[e].length>t){const o=d.map(((n,s)=>s===e?n.map(((e,n)=>n===t?[0,1,2,3,4,5,6].map((t=>void 0===a[t]?e[t]:a[t])):e)):n));s.transfer=o,l(n,s)}})(0)})]})})]});var m},metadata:{displayName:"panel.details.stations.londonTubeBasic.displayName",cities:[d.London],canvas:[u.RailMap],categories:[g.Metro],tags:[]}};function ba(e){const{interchangeList:t,onAdd:s,onDelete:o,onUpdate:l}=e,i=y(),{paletteAppClip:{output:r}}=C((e=>e.runtime)),{t:d}=a(),[m,c]=n.useState();return n.useEffect((()=>{void 0!==m&&r&&(null==l||l(m,[...r,t[m][4]]),c(void 0))}),[null==r?void 0:r.toString()]),L.jsxs(b,{direction:"column",children:[0===t.length&&L.jsxs(T,{spacing:.5,"data-testid":"interchange-card-stack",children:[L.jsx(D,{as:"i",flex:1,align:"center",fontSize:"md",colorScheme:"gray",children:d("panel.details.stations.interchange.noTrackShare")}),L.jsx(H,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.add"),onClick:()=>null==s?void 0:s(ga),icon:L.jsx(v,{})})]}),t.map(((e,n)=>L.jsxs(T,{spacing:.5,"data-testid":`interchange-card-stack-${n}`,children:[L.jsx(j,{label:d("color"),minW:"40px",noLabel:0!==n,children:L.jsx(O,{theme:[e[0],e[1],e[2],e[3]],onClick:()=>{c(n),i(w([e[0],e[1],e[2],e[3]]))}})}),L.jsx(j,{label:d("panel.details.stations.londonTubeBasic.shareTracksIndex"),children:L.jsx(P,{defaultValue:e[4],min:-5,max:5,step:1,onThrottledChange:t=>null==l?void 0:l(n,[e[0],e[1],e[2],e[3],t])})}),L.jsxs(U,{children:[s&&n===t.length-1?L.jsx(H,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.copy"),onClick:()=>{const e=structuredClone(t.slice(-1)[0]);e[4]=Math.max(...t.map((e=>e[4])))+1,null==s||s(e)},icon:L.jsx(_,{})}):L.jsx(F,{minW:8}),o&&0!==n&&L.jsx(H,{size:"sm",variant:"ghost","aria-label":d("panel.details.stations.interchange.remove"),onClick:()=>null==o?void 0:o(n),icon:L.jsx(k,{})})]})]},n)))]})}const va={names:["Station"],nameOffsetX:"right",nameOffsetY:"top",stepFreeAccess:"none"},ja={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:f=va.nameOffsetX,nameOffsetY:h=va.nameOffsetY,stepFreeAccess:p=va.stepFreeAccess}=null!==(t=i[l.LondonTubeInt])&&void 0!==t?t:va,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),y=n.useCallback((e=>m(a,e)),[a,m]),C="left"===f?-9.15:"right"===f?9.15:0,b="top"===h?-9.15:"bottom"===h?9.15:0,v="left"===f?"end":"right"===f?"start":"middle",j="top"===h?"auto":"bottom"===h?"hanging":"middle";return L.jsxs("g",{id:a,children:[L.jsx("g",{transform:`translate(${s}, ${o})`,onPointerDown:u,onPointerMove:g,onPointerUp:y,style:{cursor:"move"},children:"none"===p?L.jsx("circle",{id:`stn_core_${a}`,r:6.25,width:5*.66,height:5.800000000000001,stroke:"black",strokeWidth:2.5,fill:"white"}):L.jsx(xa,{id:a,stepFreeAccess:p,transform:"scale(0.2333)"})}),L.jsx("g",{transform:`translate(${s+C}, ${o+b})`,textAnchor:v,fill:"#003888",children:L.jsx(ye,{text:c[0].split("\n"),fontSize:10,lineHeight:8.5,dominantBaseline:j,grow:"top"===h?"up":"bottom"===h?"down":"bidirectional",baseOffset:1,className:"rmp-name__tube"})})]})},icon:L.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:L.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",strokeWidth:"2.5",fill:"white"})}),defaultAttrs:va,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:l}=a(),i=[{type:"textarea",label:l("panel.details.stations.common.nameEn"),value:n.names[0],onChange:e=>{n.names[0]=e.toString(),s(t,n)},minW:"full"},{type:"select",label:l("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:l("panel.details.stations.common.left"),middle:l("panel.details.stations.common.middle"),right:l("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:l("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:l("panel.details.stations.common.top"),middle:l("panel.details.stations.common.middle"),bottom:l("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"select",label:l("panel.details.stations.londonTubeCommon.stepFreeAccess"),value:n.stepFreeAccess,options:{none:l("panel.details.stations.londonTubeCommon.stepFreeAccessNone"),train:l("panel.details.stations.londonTubeCommon.stepFreeAccessTrain"),platform:l("panel.details.stations.londonTubeCommon.stepFreeAccessPlatform")},onChange:e=>{n.stepFreeAccess=e,s(t,n)},minW:"full"}];return L.jsx(o,{fields:i})},metadata:{displayName:"panel.details.stations.londonTubeInt.displayName",cities:[d.London],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Oa="M-18.2,12.6c2.4-0.6,5.8-1.6,11.5-0.4c2.9,0.6,5.6,1.3,8.3,1.3c3.5,0,5.4-0.6,8.1-1.2c2.4-0.6,5.2-1.2,7.4-1.1c3.8,0.1,6.6,0.7,8.2,1.4l-1.2-3.1C21,8.3,15.8,7.7,9.7,9.5c-2.6,0.7-5.2,1.3-7.9,1.2c-2.5,0-4.8-0.4-7.2-1C-13,8-15.9,9.3-19.8,10.3L-18.2,12.6z",wa="M23.8-2h-4.1l-1.8-4.8c0,0-0.1-0.6-1-1.3c-0.6-0.5-1.6-0.5-1.6-0.5H4v-2h-6.9l-1.1-1.5l0.8-1.9h-1.9l-1.5,3.5h-2.6v2h-5.8c0,0-0.8,0.1-1.2,0.3c-0.4,0.3-0.6,0.5-0.6,0.5l-4.4,5.8h-7.3l7.3,10c1.6-0.7,6.6-2,9.7-1.9c4.1,0.1,9.5,1.9,13.1,1.9c6.6,0,8.8-2,14.6-2.3c7.1-0.4,11.6,2.3,11.6,2.3L23.8-2z M-11.1-2h-7.1l1.9-2.5c0,0,0.8-1.1,1.2-1.3c0.7-0.4,1.2-0.5,1.2-0.5h2.8V-2z M-9.2-2v-4.3h7.4v4.4L-9.2-2z M7.4-2H0v-4.3h7.4V-2z M9.3-2v-4.3h5.1c0,0,0.4,0,0.8,0.4c0.3,0.2,0.5,0.7,0.5,0.7l1.2,3.3L9.3-2z",_a={names:["Station"],nameOffsetX:"right",nameOffsetY:"top"},ka={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:f=_a.nameOffsetX,nameOffsetY:h=_a.nameOffsetY}=null!==(t=i[l.LondonRiverServicesInt])&&void 0!==t?t:_a,p=n.useCallback((e=>r(a,e)),[a,r]),u=n.useCallback((e=>d(a,e)),[a,d]),g=n.useCallback((e=>m(a,e)),[a,m]),y="left"===f?-9.15:"right"===f?9.15:0,C="top"===h?-9.15:"bottom"===h?9.15:0,b="left"===f?"end":"right"===f?"start":"middle",v="top"===h?"auto":"bottom"===h?"hanging":"middle";return L.jsxs("g",{id:a,children:[L.jsxs("g",{transform:`translate(${s}, ${o})`,onPointerDown:p,onPointerMove:u,onPointerUp:g,style:{cursor:"move"},children:[L.jsx("circle",{r:7.25,stroke:"#003888",strokeWidth:.5,fill:"white"}),L.jsxs("g",{fill:"#003888",transform:"scale(0.222)",children:[L.jsx("path",{d:Oa}),L.jsx("path",{d:wa})]}),L.jsx("circle",{id:`stn_core_${a}`,r:7.5,fill:"white",fillOpacity:"0",className:"removeMe"})]}),L.jsx("g",{transform:`translate(${s+y}, ${o+C})`,textAnchor:b,fill:"#003888",children:L.jsx(ye,{text:c[0].split("\n"),fontSize:10,lineHeight:8.5,dominantBaseline:v,grow:"top"===h?"up":"bottom"===h?"down":"bidirectional",baseOffset:1,className:"rmp-name__tube"})})]})},icon:L.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[L.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"white"}),L.jsxs("g",{transform:"translate(12, 12)scale(0.18)",children:[L.jsx("path",{stroke:"currentColor",d:Oa}),L.jsx("path",{stroke:"currentColor",d:wa})]})]}),defaultAttrs:_a,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:l}=a(),i=[{type:"textarea",label:l("panel.details.stations.common.nameEn"),value:n.names[0],onChange:e=>{n.names[0]=e.toString(),s(t,n)},minW:"full"},{type:"select",label:l("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:l("panel.details.stations.common.left"),middle:l("panel.details.stations.common.middle"),right:l("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:l("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:l("panel.details.stations.common.top"),middle:l("panel.details.stations.common.middle"),bottom:l("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"}];return L.jsx(o,{fields:i})},metadata:{displayName:"panel.details.stations.londonRiverServicesInt.displayName",cities:[d.London],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},Sa={...x,nameOffsetX:"right",nameOffsetY:"top",interchange:!1},Na={component:e=>{var t;const{id:a,x:s,y:o,attrs:i,handlePointerDown:r,handlePointerMove:d,handlePointerUp:m}=e,{names:c=x.names,nameOffsetX:f=Sa.nameOffsetX,nameOffsetY:h=Sa.nameOffsetY,interchange:p=Sa.interchange}=null!==(t=i[l.GuangdongIntercityRailway])&&void 0!==t?t:Sa,u=n.useCallback((e=>r(a,e)),[a,r]),g=n.useCallback((e=>d(a,e)),[a,d]),y=n.useCallback((e=>m(a,e)),[a,m]),C="left"===f?-13.33:"right"===f?13.33:0,b=(c[Ce[h].namesPos].split("\n").length*ze[h].lineHeight+ze[h].offset)*Ce[h].polarity,v="left"===f?"end":"right"===f?"start":"middle";return n.useMemo((()=>L.jsxs("g",{id:a,transform:`translate(${s}, ${o})`,children:[L.jsx("circle",{r:5,stroke:"#2559a8",strokeWidth:"1.5",fill:"white"}),p&&L.jsx("circle",{r:2.5,stroke:"#2559a8",strokeWidth:"1",fill:"white"}),L.jsx("circle",{id:`stn_core_${a}`,r:5.665,fill:"white",fillOpacity:"0",onPointerDown:u,onPointerMove:g,onPointerUp:y,style:{cursor:"move"},className:"removeMe"}),L.jsxs("g",{transform:`translate(${C}, ${b})`,textAnchor:v,className:"rmp-name-outline",strokeWidth:"1",children:[L.jsx(ye,{text:c[0].split("\n"),fontSize:13.13,lineHeight:13.13,grow:"up",baseOffset:1,className:"rmp-name__zh"}),L.jsx(ye,{text:c[1].split("\n"),dx:"right"===f?1.67:0,fontSize:5.83,lineHeight:5.83,grow:"down",baseOffset:1.5,className:"rmp-name__en"})]})]})),[a,s,o,...c,f,h,p,u,g,y])},icon:L.jsxs("svg",{viewBox:"0 0 24 24",height:"40",width:"40",focusable:!1,children:[L.jsx("circle",{cx:"12",cy:"12",r:"8",stroke:"currentColor",strokeWidth:"2.25",fill:"white"}),L.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"1.5",fill:"white"})]}),defaultAttrs:Sa,attrsComponent:e=>{const{id:t,attrs:n,handleAttrsUpdate:s}=e,{t:l}=a(),i=[{type:"textarea",label:l("panel.details.stations.common.nameZh"),value:n.names[0],onChange:e=>{n.names[0]=e.toString(),s(t,n)},minW:"full"},{type:"textarea",label:l("panel.details.stations.common.nameEn"),value:n.names[1],onChange:e=>{n.names[1]=e.toString(),s(t,n)},minW:"full"},{type:"select",label:l("panel.details.stations.common.nameOffsetX"),value:n.nameOffsetX,options:{left:l("panel.details.stations.common.left"),middle:l("panel.details.stations.common.middle"),right:l("panel.details.stations.common.right")},disabledOptions:"middle"===n.nameOffsetY?["middle"]:[],onChange:e=>{n.nameOffsetX=e,s(t,n)},minW:"full"},{type:"select",label:l("panel.details.stations.common.nameOffsetY"),value:n.nameOffsetY,options:{top:l("panel.details.stations.common.top"),middle:l("panel.details.stations.common.middle"),bottom:l("panel.details.stations.common.bottom")},disabledOptions:"middle"===n.nameOffsetX?["middle"]:[],onChange:e=>{n.nameOffsetY=e,s(t,n)},minW:"full"},{type:"switch",label:l("panel.details.stations.interchange.title"),oneLine:!0,isChecked:n.interchange,onChange:e=>{n.interchange=e,s(t,n)},minW:"full"}];return L.jsx(o,{fields:i})},metadata:{displayName:"panel.details.stations.guangdongIntercityRailway.displayName",cities:[d.Shanghai],canvas:[u.RailMap],categories:[g.Metro],tags:[]}},za=(e("s",{[l.ShmetroBasic]:Ae,[l.ShmetroBasic2020]:$e,[l.ShmetroInt]:Xe,[l.ShmetroOutOfSystemInt]:Re,[l.ShanghaiSuburbanRailway]:Le,[l.GzmtrBasic]:Qt,[l.GzmtrInt]:tn,[l.GzmtrInt2024]:rn,[l.BjsubwayBasic]:fn,[l.BjsubwayInt]:gn,[l.MTR]:jn,[l.SuzhouRTBasic]:Nn,[l.SuzhouRTInt]:Bn,[l.KunmingRTBasic]:En,[l.KunmingRTInt]:Ln,[l.MRTBasic]:Un,[l.MRTInt]:Zn,[l.JREastBasic]:Kn,[l.JREastImportant]:aa,[l.FoshanMetroBasic]:oa,[l.QingdaoMetroStation]:ra,[l.TokyoMetroBasic]:ca,[l.TokyoMetroInt]:pa,[l.LondonTubeBasic]:Ca,[l.LondonTubeInt]:ja,[l.LondonRiverServicesInt]:ka,[l.GuangdongIntercityRailway]:Na}),new BroadcastChannel("RMP_MASTER_CHANNEL")),Ma={id:"null",value:"",param:null,bg:"#000000",fg:m.white},Aa={h:"80%",w:"80%","& iframe":{h:"100%",w:"100%"},"& div":{h:"100%",w:"100%"}},Pa=e("k",(e=>{const{isOpen:t,onClose:s,onSubmit:o}=e,{t:l}=a(),i=n.useRef(window.graph),r=K(),[d,m]=n.useState([]),[c,f]=n.useState(Ma),[h,p]=n.useState(""),[u,g]=n.useState(!1),[x,y]=n.useState(!1);n.useEffect((()=>{t&&(p(""),f(Ma),g(!1),m(Oe(i.current).filter((e=>e.randomId)).map((e=>{var t,n,a;return{id:e.randomId,value:null!==(t=e.label)&&void 0!==t?t:e.randomId,param:e,bg:null!==(n=e.labelColorBg)&&void 0!==n?n:Ma.bg,fg:null!==(a=e.labelColorFg)&&void 0!==a?a:Ma.fg}}))))}),[t]);const C=e=>{try{var t,n,a,l,i;const s=null!==(t=c.param)&&void 0!==t?t:JSON.parse(e),d=s.id?s.id:s.randomId,m=null!==(n=s.labelColorBg)&&void 0!==n?n:E(),f={randomId:d,label:null!==(a=s.label)&&void 0!==a?a:d,labelColorBg:m,labelColorFg:X(m),nodeType:null!==(l=s.nodeType)&&void 0!==l?l:s.type,transform:null!==(i=s.transform)&&void 0!==i?i:Y,svgs:s.svgs,components:s.components,color:s.color,core:s.core,version:s.version};if(!f.version||f.version<2)return void r({title:"Outdated configuration!",status:"error",duration:9e3,isClosable:!0});o(f)}catch(d){return void y(!0)}s()},b=n.useRef(t),[v,O]=n.useState("DESIGNER"),[w,_]=n.useState(!1);return n.useEffect((()=>{b.current=t}),[t]),n.useEffect((()=>{const e=e=>{const{event:t,data:n}=e.data;"MASTER_POST"===t&&b.current&&(_(!1),C(n))};return za.addEventListener("message",e),()=>{za.removeEventListener("message",e)}}),[]),L.jsxs(L.Fragment,{children:[L.jsxs(ee,{isOpen:t,onClose:s,size:"sm",scrollBehavior:"inside",children:[L.jsx(te,{}),L.jsxs(ne,{children:[L.jsx(ae,{children:l("header.settings.procedures.masterManager.importTitle")}),L.jsx(se,{}),L.jsxs(oe,{children:[L.jsx(j,{label:l("header.settings.procedures.masterManager.importFrom"),children:L.jsx(B,{data:d,displayHandler:e=>L.jsx($,{name:e.value,fg:e.fg,bg:e.bg,title:e.value,sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}}),filter:(e,t)=>t.id.toLowerCase().includes(e.toLowerCase())||Object.values(t.id).some((t=>t.toLowerCase().includes(e.toLowerCase()))),value:c.value,onChange:e=>{f(e),g(!1),p("")}})}),L.jsxs(j,{label:l("header.settings.procedures.masterManager.importOther"),children:[L.jsxs(Q,{direction:"row",width:"100%",children:[L.jsx(Z,{m:1,width:"100%",onClick:async()=>{O("DESIGNER"),_(!0)},children:l("RMP Designer")}),L.jsx(Z,{m:1,width:"100%",onClick:()=>{O("GALLERY"),_(!0)},children:l("RMP Gallery")})]}),L.jsx(Z,{m:1,onClick:()=>g(!0),children:l("header.settings.procedures.masterManager.importParam")}),L.jsx(le,{width:"100%",placeholder:"qwq",fontSize:"sm",fontFamily:"monospace",hidden:!u,onChange:e=>{y(!1),p(e.target.value),f(Ma)},isInvalid:x})]})]}),L.jsxs(ie,{children:[L.jsx(Z,{colorScheme:"blue",variant:"outline",mr:"1",onClick:s,children:l("cancel")}),L.jsx(Z,{colorScheme:"blue",variant:"solid",mr:"1",onClick:()=>C(h),isDisabled:"null"===c.id&&""===h,children:l("apply")})]})]})]}),L.jsx(Ba,{isOpen:w,onClose:()=>_(!1),source:v})]})})),Ba=e=>{const{isOpen:t,onClose:n,source:a}=e,s="DESIGNER"===a?"/rmp-designer/#/export":"/rmp-gallery/?tabId=2&master=true";return L.jsxs(W,{isOpen:t,onClose:n,size:"full",sx:Aa,children:[L.jsx("iframe",{src:s,loading:"lazy"}),L.jsx(re,{onClick:n,position:"fixed",top:"5px",right:"15px"})]})};e("M",(e=>{const{isOpen:t,onClose:s}=e,{t:l}=a(),{refresh:{nodes:r}}=C((e=>e.runtime)),d=n.useRef(window.graph),c=y(),[f,h]=n.useState([]);n.useEffect((()=>{t&&h(Oe(d.current))}),[t,r]);const[p,u]=n.useState(void 0),g=f.map((e=>{var t,n,a,s,r;const f=[{label:l("header.settings.procedures.masterManager.id"),type:"custom",component:L.jsx($,{name:null!==(t=e.randomId)&&void 0!==t?t:"undefined",fg:null!==(n=e.labelColorFg)&&void 0!==n?n:m.white,bg:null!==(a=e.labelColorBg)&&void 0!==a?a:"#000000"})},{label:l("header.settings.procedures.masterManager.label"),type:"input",value:null!==(s=e.label)&&void 0!==s?s:l("panel.details.nodes.master.undefined"),onChange:t=>{return n=e,a=t,d.current.filterNodes((e=>d.current.getNodeAttribute(e,"type")===i.Master&&d.current.getNodeAttributes(e)[i.Master].randomId===n.randomId)).forEach((e=>{d.current.mergeNodeAttributes(e,{[i.Master]:{...n,label:a}})})),c(z()),void c(M(d.current.export()));var n,a},hidden:!e.randomId},{label:l("header.settings.procedures.masterManager.label"),type:"output",value:null!==(r=e.label)&&void 0!==r?r:l("panel.details.nodes.master.undefined"),hidden:!!e.randomId},{label:l("header.settings.procedures.masterManager.type"),type:"custom",component:L.jsx($,{name:l(`header.settings.procedures.masterManager.types.${e.nodeType}`),fg:m.white,bg:"MiscNode"===e.nodeType?"#FF8651":"#51BC00"})}];return L.jsxs(Q,{width:"100%",direction:"row",children:[L.jsx(o,{fields:f,minW:"120px"}),L.jsxs(Q,{direction:"row",mr:"auto",children:[L.jsx(Z,{onClick:()=>u(e.randomId),children:L.jsx(R,{})}),L.jsx(Z,{onClick:()=>(e=>{const t={id:e.randomId,type:e.nodeType,label:e.label,svgs:e.svgs,components:e.components,color:e.color,core:e.core,transform:e.transform,version:e.version};t.components.forEach(((e,n)=>{t.components[n].value=e.defaultValue})),we(`RMP_Master_Node_${(new Date).valueOf()}.json`,"application/json",JSON.stringify(t))})(e),isDisabled:!e.randomId,children:L.jsx(I,{})}),L.jsx(Z,{onClick:()=>{return t=e.randomId,d.current.filterNodes((e=>d.current.getNodeAttribute(e,"type")===i.Master&&d.current.getNodeAttributes(e)[i.Master].randomId===t)).forEach((e=>{d.current.dropNode(e)})),c(z()),void c(M(d.current.export()));var t},children:L.jsx(k,{})})]})]})}));return L.jsxs(ee,{isOpen:t,onClose:s,size:"xl",scrollBehavior:"inside",children:[L.jsx(te,{}),L.jsxs(ne,{children:[L.jsx(ae,{children:l("header.settings.procedures.masterManager.title")}),L.jsx(se,{}),L.jsxs(oe,{width:"100%",children:[...g,L.jsx(Pa,{isOpen:!!p,onClose:()=>u(void 0),onSubmit:e=>{d.current.filterNodes((e=>d.current.getNodeAttribute(e,"type")===i.Master&&d.current.getNodeAttributes(e)[i.Master].randomId===p)).forEach((t=>{const n=structuredClone(e),a=d.current.getNodeAttributes(t),s=structuredClone(a[i.Master]);n.components.forEach(((e,t)=>{var a,o;n.components[t].value=null!==(o=e.id,a=void s.components.forEach((e=>{var t;if(e.id===o)return null!==(t=e.value)&&void 0!==t?t:e.defaultValue})))&&void 0!==a?a:e.defaultValue})),void 0!==n.color&&(n.color.value=s.color?n.color.value:n.color.defaultValue),d.current.mergeNodeAttributes(t,{[i.Master]:n})})),c(z()),c(M(d.current.export()))}})]}),L.jsx(ie,{children:L.jsx(Z,{colorScheme:"blue",variant:"outline",mr:"1",onClick:s,children:l("close")})})]})]})}))}}})); diff --git a/assets/misc-nodes-3nt-Fm8T.js b/assets/misc-nodes-DWMfnp13.js similarity index 99% rename from assets/misc-nodes-3nt-Fm8T.js rename to assets/misc-nodes-DWMfnp13.js index cb286f51..da2e71d4 100644 --- a/assets/misc-nodes-3nt-Fm8T.js +++ b/assets/misc-nodes-DWMfnp13.js @@ -1 +1 @@ -import{aR as D,C as S,M as L,aS as z,av as b,i as k,aT as ge,c as fe,d as ye,V as be,W as je,P as we,R as ue,D as Be,ak as Ne}from"./index-BiHghyID.js";import{j as n,g as xe,a$ as Ce,af as Le,O as ve}from"./chakra-xNcrfRXW.js";import{b as r,u as $}from"./react-D-_si4LB.js";import{L as Se,g as me,h as Pe,t as ce,j as Te,k as ze,M as Ae,n as ke}from"./master-manager-BoebmmSV.js";const Me=o=>{const{id:e,x:t,y:i,handlePointerDown:l,handlePointerMove:s,handlePointerUp:a}=o,m=r.useCallback(c=>l(e,c),[e,l]),d=r.useCallback(c=>s(e,c),[e,s]),h=r.useCallback(c=>a(e,c),[e,a]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")rotate(45)"),onPointerDown:m,onPointerMove:d,onPointerUp:h,style:{cursor:"move"},className:"removeMe",children:[n.jsx("line",{x1:"-5",y1:"0",x2:"5",y2:"0",stroke:"black"}),n.jsx("line",{x1:"0",y1:"-5",x2:"0",y2:"5",stroke:"black"}),n.jsx("circle",{id:"virtual_circle_".concat(e),r:5,stroke:"black",fill:"white",fillOpacity:"0"})]})},$e={},_e=()=>n.jsx(D,{fields:[]}),Re=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,transform:"rotate(45)",focusable:!1,children:[n.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"none"}),n.jsx("line",{x1:"6",y1:"12",x2:"18",y2:"12",stroke:"currentColor"}),n.jsx("line",{x1:"12",y1:"6",x2:"12",y2:"18",stroke:"currentColor"})]}),Ue={component:Me,icon:Re,defaultAttrs:$e,attrsComponent:_e,metadata:{displayName:"panel.details.nodes.virtual.displayName",tags:[]}},De=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=Q.num,color:h=Q.color}=l!=null?l:Q,[c,f]=d>=10?[22.67,10.75]:[21,10],p=r.useCallback(x=>s(e,x),[e,s]),g=r.useCallback(x=>a(e,x),[e,a]),u=r.useCallback(x=>m(e,x),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:p,onPointerMove:g,onPointerUp:u,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],width:c,height:"22.67"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:f,y:"19",fill:h[3],fontSize:"21.33",letterSpacing:"-1.75",children:d}),n.jsx("text",{className:"rmp-name__zh",x:c+2,y:"12",fontSize:"14.67",children:"号线"}),n.jsxs("text",{className:"rmp-name__en",x:c+4,y:"21.5",fontSize:"8",children:["Line ",d]})]})},Q={num:1,color:[S.Shanghai,"sh1","#E4002B",L.white]},Ie=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:Q).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:Q;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"custom",label:"color",component:n.jsx(z,{type:b.ShmetroNumLineBadge,defaultTheme:Q.color})}],Ee=()=>n.jsx(D,{fields:Ie}),We=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"10",height:"16"}),n.jsx("text",{x:"4",y:"18",fill:"white",children:"1"}),n.jsx("text",{x:"14",y:"10",fontSize:"5",children:"号线"}),n.jsx("text",{x:"14",y:"18",fontSize:"4",children:"Line 1"})]}),Fe={component:De,icon:We,defaultAttrs:Q,attrsComponent:Ee,metadata:{displayName:"panel.details.nodes.shmetroNumLineBadge.displayName",tags:[]}},qe=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=ee.names,color:h=ee.color}=l!=null?l:ee,c=r.useRef(null),[f,p]=r.useState({width:12});r.useEffect(()=>p(c.current.getBBox()),[...d,p,c]);const g=r.useCallback(y=>s(e,y),[e,s]),u=r.useCallback(y=>a(e,y),[e,a]),x=r.useCallback(y=>m(e,y),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:g,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:f.width+7,height:"21"}),n.jsxs("g",{ref:c,children:[n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"hanging",x:(f.width+7)/2,y:"3",fontSize:"10",fill:h[3],letterSpacing:"-0.25",children:d[0]}),n.jsx("text",{className:"rmp-name__en",textAnchor:"middle",dominantBaseline:"hanging",x:(f.width+7)/2,y:"14",fontSize:"5",fill:h[3],letterSpacing:"-0.25",children:d[1]})]})]})},ee={names:["浦江线","Pujiang Line"],color:[S.Shanghai,"pjl","#B5B5B6",L.white]},Oe=o=>{const{id:e,attrs:t,handleAttrsUpdate:i}=o,{t:l}=$(),s=[{type:"input",label:l("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:a=>{t.names[0]=a,i(e,t)},minW:"full"},{type:"input",label:l("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:a=>{t.names[1]=a,i(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(z,{type:b.ShmetroTextLineBadge,defaultTheme:ee.color})}];return n.jsx(k,{fields:s})},Qe=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12"}),n.jsx("text",{x:"5",y:"11",fontSize:"5",fill:"white",children:"浦江线"}),n.jsx("text",{x:"3",y:"16",fontSize:"4",fill:"white",children:"Pujiang Line"})]}),Ve={component:qe,icon:Qe,defaultAttrs:ee,attrsComponent:Oe,metadata:{displayName:"panel.details.nodes.shmetroTextLineBadge.displayName",tags:[]}},Ge=o=>{var x,y;const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=F.names,color:h=F.color,tram:c=F.tram,span:f=F.span}=l!=null?l:F,p=r.useCallback(B=>s(e,B),[e,s]),g=r.useCallback(B=>a(e,B),[e,a]),u=r.useCallback(B=>m(e,B),[e,m]);return n.jsx("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")scale(").concat(c?.5:1,")"),onPointerDown:p,onPointerMove:g,onPointerUp:u,style:{cursor:"move"},children:n.jsx(Se,{zhName:(x=d.at(0))!=null?x:"",enName:(y=d.at(1))!=null?y:"",zhClassName:"rmp-name__zh",enClassName:"rmp-name__en",foregroundColour:h[3],backgroundColour:h[2],spanDigits:f})})},F={names:["1号线","Line 1"],color:[S.Guangzhou,"gz1","#F3D03E",L.black],tram:!1,span:!0},Xe=o=>{const{id:e,attrs:t,handleAttrsUpdate:i}=o,{t:l}=$(),s=[{type:"input",label:l("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:a=>{t.names[0]=a,i(e,t)},minW:"full"},{type:"input",label:l("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:a=>{t.names[1]=a,i(e,t)},minW:"full"},{type:"switch",label:l("panel.details.nodes.gzmtrLineBadge.tram"),oneLine:!0,isChecked:t.tram,onChange:a=>{t.tram=a,i(e,t)},minW:"full"},{type:"switch",label:l("panel.details.nodes.gzmtrLineBadge.span"),oneLine:!0,isChecked:t.span,onChange:a=>{t.span=a,i(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(z,{type:b.GzmtrLineBadge,defaultTheme:F.color})}];return n.jsx(k,{fields:s})},He=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"5",width:"20",height:"14",rx:"1"}),n.jsx("text",{x:"6",y:"15",textAnchor:"middle",fontSize:"10",fill:"white",children:"1"}),n.jsx("text",{x:"15",y:"12",textAnchor:"middle",fontSize:"6",fill:"white",children:"号线"}),n.jsx("text",{x:"14.5",y:"17",textAnchor:"middle",fontSize:"4",fill:"white",children:"Line 1"})]}),Ze={component:Ge,icon:He,defaultAttrs:F,attrsComponent:Xe,metadata:{displayName:"panel.details.nodes.gzmtrLineBadge.displayName",tags:[]}},te=11.84375,Je=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=V.num,color:h=V.color}=l!=null?l:V,c=r.useCallback(u=>s(e,u),[e,s]),f=r.useCallback(u=>a(e,u),[e,a]),p=r.useCallback(u=>m(e,u),[e,m]),g=h[3]===L.black?"#003670":L.white;return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:c,onPointerMove:f,onPointerUp:p,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:te+21,height:"16",rx:"2"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:te/2+2,y:"13.5",fill:g,fontSize:"15",letterSpacing:"-1.5",children:d}),n.jsx("text",{className:"rmp-name__zh",x:te+(d>9?5.5:3),y:"8.5",fontSize:"7",fill:g,children:"号线"}),n.jsxs("text",{className:"rmp-name__en",x:te+(d>9?6:4.5),y:"13.5",fontSize:"4",fill:g,children:["Line ",d]})]})},V={num:1,color:[S.Beijing,"bj1","#c23a30",L.white]},Ye=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:V).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:V;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"custom",label:"color",component:n.jsx(z,{type:b.BjsubwayNumLineBadge,defaultTheme:V.color})}],Ke=()=>n.jsx(D,{fields:Ye}),en=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"2"}),n.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"1"}),n.jsx("text",{x:"11",y:"11",fill:"white",fontSize:"5",children:"号线"}),n.jsx("text",{x:"11",y:"17",fill:"white",fontSize:"4",children:"Line 1"})]}),nn={component:Je,icon:en,defaultAttrs:V,attrsComponent:Ke,metadata:{displayName:"panel.details.nodes.bjsubwayNumLineBadge.displayName",tags:[]}},tn=28.84375,on=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=R.names,color:h=R.color}=l!=null?l:R,c=r.useRef(null),[f,p]=r.useState({width:12});r.useEffect(()=>p(c.current.getBBox()),[...d,p,c]);const g=r.useCallback(C=>s(e,C),[e,s]),u=r.useCallback(C=>a(e,C),[e,a]),x=r.useCallback(C=>m(e,C),[e,m]),y=Math.max(tn,f.width),B=h[3]===L.black?"#003670":L.white;return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:g,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:y+4,height:"16",rx:"2"}),n.jsxs("g",{ref:c,children:[n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:(y+4)/2,y:"8",fontSize:"7",fill:B,children:d[0]}),n.jsx("text",{className:"rmp-name__en",textAnchor:"middle",x:(y+4)/2,y:"13.5",fontSize:"4",fill:B,children:d[1]})]})]})},R={names:["八通线","Batong Line"],color:[S.Beijing,"bj1","#c23a30",L.white]},ln=[{type:"input",label:"panel.details.nodes.common.nameZh",value:o=>(o!=null?o:R).names[0],onChange:(o,e)=>{const t=e!=null?e:R;return t.names[0]=o.toString(),t}},{type:"input",label:"panel.details.nodes.common.nameEn",value:o=>(o!=null?o:R).names[1],onChange:(o,e)=>{const t=e!=null?e:R;return t.names[1]=o.toString(),t}},{type:"custom",label:"color",component:n.jsx(z,{type:b.BjsubwayTextLineBadge,defaultTheme:R.color})}],an=()=>n.jsx(D,{fields:ln}),sn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12",rx:"2"}),n.jsx("text",{x:"3",y:"12",fontSize:"6",fill:"white",children:"八通线"}),n.jsx("text",{x:"3",y:"16",fontSize:"3.2",fill:"white",children:"Batong Line"})]}),rn={component:on,icon:sn,defaultAttrs:R,attrsComponent:an,metadata:{displayName:"panel.details.nodes.bjsubwayTextLineBadge.displayName",tags:[]}},cn=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=M.num,branch:h=M.branch,color:c=M.color}=l!=null?l:M,f=r.useCallback(u=>s(e,u),[e,s]),p=r.useCallback(u=>a(e,u),[e,a]),g=r.useCallback(u=>m(e,u),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:f,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:[n.jsx("rect",{fill:c[2],width:"20",height:"20",rx:"2",ry:"2"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"middle",x:"10",y:"11.4",fill:c[3],fontSize:"15",letterSpacing:"-1",children:d}),h&&n.jsxs(n.Fragment,{children:[n.jsx("text",{className:"rmp-name__zh",x:20+2.5,y:"10",fontSize:"10",children:"支线"}),n.jsx("text",{className:"rmp-name__en",x:20+2.5,y:"18",fontSize:"5",fill:"gray",children:"Branch line"})]})]})},M={num:1,branch:!1,color:[S.Suzhou,"sz1","#78BA25",L.white]},dn=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:M).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:M;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"switch",label:"panel.details.nodes.suzhouRTNumLineBadge.branch",isChecked:o=>{var e;return(e=o==null?void 0:o.branch)!=null?e:M.branch},onChange:(o,e)=>{const t=e!=null?e:M;return t.branch=o,t}},{type:"custom",label:"color",component:n.jsx(z,{type:b.SuzhouRTNumLineBadge,defaultTheme:M.color})}],mn=()=>n.jsx(D,{fields:dn}),hn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"4",y:"4",width:"16",height:"16",rx:"3",ry:"3"}),n.jsx("text",{x:"12",y:"13.4",textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:"14",children:"1"})]}),un={component:cn,icon:hn,defaultAttrs:M,attrsComponent:mn,metadata:{displayName:"panel.details.nodes.suzhouRTNumLineBadge.displayName",tags:[]}},xn=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=G.num,color:h=G.color}=l!=null?l:G,c=r.useCallback(u=>s(e,u),[e,s]),f=r.useCallback(u=>a(e,u),[e,a]),p=r.useCallback(u=>m(e,u),[e,m]),g=h[3];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:c,onPointerMove:f,onPointerUp:p,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:"25",height:"15"}),n.jsxs("text",{className:"rmp-name__berlin",textAnchor:"middle",x:"12.5",y:"12.5",fill:g,fontSize:"14",letterSpacing:"1",children:["U",d]})]})},G={num:1,color:[S.Berlin,"bu1","#62AD2D",L.white]},pn=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:G).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:G;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"custom",label:"color",component:n.jsx(z,{type:b.BerlinUBahnLineBadge,defaultTheme:G.color})}],gn=()=>n.jsx(D,{fields:pn}),fn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16"}),n.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"U1"})]}),yn={component:xn,icon:fn,defaultAttrs:G,attrsComponent:gn,metadata:{displayName:"panel.details.nodes.berlinUBahnLineBadge.displayName",tags:[]}},bn=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=X.num,color:h=X.color}=l!=null?l:X,[c,f]=d>=10?[6,19.75]:[10,20],p=r.useCallback(y=>s(e,y),[e,s]),g=r.useCallback(y=>a(e,y),[e,a]),u=r.useCallback(y=>m(e,y),[e,m]),x=h[3];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:p,onPointerMove:g,onPointerUp:u,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:"30",height:"15",rx:"8"}),n.jsx("text",{className:"rmp-name__berlin",textAnchor:"middle",x:c,y:"12.5",fill:x,fontSize:"14",letterSpacing:"0",children:"S"}),n.jsx("text",{className:"rmp-name__berlin",textAnchor:"middle",x:f,y:"12.5",fill:x,fontSize:"14",letterSpacing:"-0.2",children:d})]})},X={num:1,color:[S.Berlin,"bs1","#DD6CA6",L.white]},jn=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:X).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:X;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"custom",label:"color",component:n.jsx(z,{type:b.BerlinSBahnLineBadge,defaultTheme:X.color})}],wn=()=>n.jsx(D,{fields:jn}),Bn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"8"}),n.jsx("text",{x:"4.5",y:"16.5",fill:"white",fontSize:"14",children:"S1"})]}),Nn={component:bn,icon:Bn,defaultAttrs:X,attrsComponent:wn,metadata:{displayName:"panel.details.nodes.berlinSBahnLineBadge.displayName",tags:[]}},Cn=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=H.num,color:h=H.color}=l!=null?l:H,c=r.useCallback(B=>s(e,B),[e,s]),f=r.useCallback(B=>a(e,B),[e,a]),p=r.useCallback(B=>m(e,B),[e,m]),g=h[3],u=Number.isInteger(d)?16:15,[x,y]=Number.isInteger(d)?Number(d)>=10?[-1.2,1.5]:[0,5.5]:[0,2.55];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:c,onPointerMove:f,onPointerUp:p,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:"20",height:"20",rx:"10",ry:"10"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"left",x:y,y:"10",fill:g,fontSize:u,letterSpacing:x,dominantBaseline:"central",children:d})]})},H={num:1,color:[S.Chongqing,"cq1","#e4002b",L.white]},Ln=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:H).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:H;return Number.isNaN(Number(o))?t.num=o:t.num=Number(o),t}},{type:"custom",label:"color",component:n.jsx(z,{type:b.ChongqingRTNumLineBadge,defaultTheme:H.color})}],vn=()=>n.jsx(D,{fields:Ln}),Sn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),n.jsx("text",{x:"8",y:"18",fill:"white",fontSize:"18",children:"1"})]}),Pn={component:Cn,icon:Sn,defaultAttrs:H,attrsComponent:vn,metadata:{displayName:"panel.details.nodes.chongqingRTNumLineBadge.displayName",tags:[]}},Tn=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=U.names,color:h=U.color}=l!=null?l:U,c=r.useRef(null),f=r.useCallback(x=>s(e,x),[e,s]),p=r.useCallback(x=>a(e,x),[e,a]),g=r.useCallback(x=>m(e,x),[e,m]),u=h[3];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:f,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:"20",height:"20",rx:"10",ry:"10"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:"10",y:"10.5",fill:u,fontSize:"6",letterSpacing:"0",children:d[0]}),n.jsx(me,{ref:c,text:d[1].split("\n"),className:"rmp-name__en",textAnchor:"middle",x:"10",y:"9.25",fill:u,fontSize:"2.5",letterSpacing:"0",lineHeight:2.25,grow:"down"})]})},U={names:["空港线","Konggang Line"],color:[S.Chongqing,"cq3","#003da5",L.white]},zn=[{type:"input",label:"panel.details.nodes.common.nameZh",value:o=>(o!=null?o:U).names[0],onChange:(o,e)=>{const t=e!=null?e:U;return t.names[0]=o.toString(),t}},{type:"textarea",label:"panel.details.nodes.common.nameEn",value:o=>(o!=null?o:U).names[1],onChange:(o,e)=>{const t=e!=null?e:U;return t.names[1]=o.toString(),t}},{type:"custom",label:"color",component:n.jsx(z,{type:b.ChongqingRTTextLineBadge,defaultTheme:U.color})}],An=()=>n.jsx(D,{fields:zn}),kn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),n.jsx("text",{x:"4.5",y:"12.5",fill:"white",fontSize:"5",children:"空港线"}),n.jsx("text",{x:"4.5",y:"15",fill:"white",fontSize:"2",children:"Konggang Line"})]}),Mn={component:Tn,icon:kn,defaultAttrs:U,attrsComponent:An,metadata:{displayName:"panel.details.nodes.chongqingRTTextLineBadge.displayName",tags:[]}},oe=11.84375,$n=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=Z.num,color:h=Z.color,isBranch:c=Z.isBranch}=l!=null?l:Z,f=r.useCallback(j=>s(e,j),[e,s]),p=r.useCallback(j=>a(e,j),[e,a]),g=r.useCallback(j=>m(e,j),[e,m]),u=h[3],x=c?10:oe+(d>9?6.5:3),y=c?-1:0,B=c?11:oe+(d>9?7:3.5),C=c?6:oe/2+4;return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:f,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:oe+21,height:"16",rx:"2"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:C,y:"13.5",fill:u,fontSize:"15",letterSpacing:"-1",children:d}),n.jsxs("text",{className:"rmp-name__zh",x,y:"9.5",fontSize:"6",fill:u,letterSpacing:y,children:["号线",c?"支线":""]}),n.jsxs("text",{className:"rmp-name__en",x:B,y:"13.5",fontSize:"3",fill:u,children:[c?"Branch":""," Line ",d]})]})},Z={num:1,color:[S.Shenzhen,"sz1","#00b140",L.white],isBranch:!1},_n=o=>{const{id:e,attrs:t,handleAttrsUpdate:i}=o,{t:l}=$(),s=[{type:"input",label:l("panel.details.nodes.common.num"),value:String(t.num),validator:a=>!Number.isNaN(a),onChange:a=>{t.num=Number(a),i(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(z,{type:b.ShenzhenMetroNumLineBadge,defaultTheme:Z.color}),minW:"full"},{type:"switch",label:l("panel.details.nodes.shenzhenMetroNumLineBadge.branch"),oneLine:!0,isChecked:t.isBranch,onChange:a=>{t.isBranch=a,i(e,t)},minW:"full"}];return n.jsx(k,{fields:s})},Rn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"2"}),n.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"1"}),n.jsx("text",{x:"11",y:"14",fill:"white",fontSize:"5",children:"号线"}),n.jsx("text",{x:"12",y:"17",fill:"white",fontSize:"3",children:"Line 1"})]}),Un={component:$n,icon:Rn,defaultAttrs:Z,attrsComponent:_n,metadata:{displayName:"panel.details.nodes.shenzhenMetroNumLineBadge.displayName",tags:[]}},Dn=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=ne.num,color:h=ne.color}=l!=null?l:ne,c=r.useCallback(x=>s(e,x),[e,s]),f=r.useCallback(x=>a(e,x),[e,a]),p=r.useCallback(x=>m(e,x),[e,m]),g=h[3],u=h[2];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:c,onPointerMove:f,onPointerUp:p,style:{cursor:"move"},children:[n.jsx("circle",{r:"8",fill:u}),n.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",x:"0",y:"0",width:"12",height:"12",fill:g,fontSize:"12",dominantBaseline:"central",letterSpacing:"-0.2",children:d})]})},ne={num:1,color:[S.Singapore,"ewl","#009739",L.white]},In=o=>{const{id:e,attrs:t,handleAttrsUpdate:i}=o,{t:l}=$(),s=[{type:"input",label:l("panel.details.nodes.common.num"),value:String(t.num),validator:a=>!Number.isNaN(a),onChange:a=>{t.num=Number(a),i(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(z,{type:b.MRTDestinationNumbers,defaultTheme:ne.color}),minW:"full"}];return n.jsx(k,{fields:s})},En=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),n.jsx("text",{x:"9",y:"17",fill:"white",fontSize:"14",children:"1"})]}),Wn={component:Dn,icon:En,defaultAttrs:ne,attrsComponent:In,metadata:{displayName:"panel.details.nodes.mrtDestinationNumbers.displayName",tags:[]}},Fn=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{lineCode:d=E.lineCode,color:h=E.color,lines:c=E.lines,name:f=E.name,isTram:p=E.isTram}=l!=null?l:E,g=r.useCallback(w=>s(e,w),[e,s]),u=r.useCallback(w=>a(e,w),[e,a]),x=r.useCallback(w=>m(e,w),[e,m]),y=22.85,B=12.935,C=h[3],j=h[2];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:g,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[n.jsx("rect",{transform:"scale(1.8)",x:-22.85/2,y:-12.935/2,rx:"3",ry:"6",width:y,height:B,fill:j,stroke:"white",strokeWidth:"1"}),n.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",fill:C,fontSize:"15",dominantBaseline:"central",letterSpacing:"-0.2",children:d}),n.jsx("text",{className:"rmp-name__mrt",textAnchor:"left",x:"28",y:p?3.5:-3,fill:"black",fontSize:"10",letterSpacing:"-0.2",children:f}),!p&&c.split(",").map((w,_)=>n.jsx("g",{transform:"translate(".concat(34+14*_,", ").concat(4.5,")"),children:w.trim()!=="airport"?n.jsxs(n.Fragment,{children:[n.jsx("circle",{r:"6",fill:j}),n.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",fill:C,fontSize:"9",dominantBaseline:"central",letterSpacing:"-0.2",children:w})]}):n.jsxs("g",{transform:"translate(-6, -6) scale(4.5)",children:[n.jsx("path",{d:"M2.467 0H.226A.226.226 0 0 0 0 .226v2.241a.225.225 0 0 0 .226.225h2.241a.225.225 0 0 0 .225-.225V.226A.226.226 0 0 0 2.467 0",style:{fill:"#2d2a26"}}),n.jsx("path",{d:"M1.5.746v.3l.73.642a.08.08 0 0 1 .022.05v.12c0 .017-.012.025-.027.018L1.5 1.529l-.06.541.2.113a.03.03 0 0 1 .013.023V2.3a.01.01 0 0 1-.014.011l-.293-.091-.286.087a.01.01 0 0 1-.014-.007v-.09a.03.03 0 0 1 .013-.023l.2-.113-.059-.545-.724.348a.018.018 0 0 1-.028-.018v-.12a.07.07 0 0 1 .023-.05l.73-.642v-.3c0-.482.3-.482.3 0",style:{fill:"#fff",fillRule:"evenodd"}})]})},_))]})},E={lineCode:"EWL",name:"East-West Line",lines:"1, 2, 3, airport",isTram:!1,color:[S.Singapore,"ewl","#009739",L.white]},qn=o=>{const{id:e,attrs:t,handleAttrsUpdate:i}=o,{t:l}=$(),s=[{type:"input",label:l("panel.details.nodes.common.nameEn"),value:t.name,onChange:a=>{t.name=a,i(e,t)},minW:"full"},{type:"input",label:l("panel.details.stations.common.lineCode"),value:t.lineCode,onChange:a=>{t.lineCode=a,i(e,t)},minW:"full"},{type:"switch",label:l("panel.details.nodes.mrtLineBadge.isTram"),isChecked:t.isTram,onChange:a=>{t.isTram=a,i(e,t)},minW:"full",oneLine:!0},...t.isTram?[]:[{type:"input",label:l("panel.details.nodes.common.num"),value:t.lines,onChange:a=>{t.lines=a,i(e,t)},minW:"full"}],{type:"custom",label:l("color"),component:n.jsx(z,{type:b.MRTLineBadge,defaultTheme:E.color}),minW:"full"}];return n.jsx(k,{fields:s})},On=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),n.jsx("text",{x:"9",y:"17",fill:"white",fontSize:"14",children:"1"})]}),Qn={component:Fn,icon:On,defaultAttrs:E,attrsComponent:qn,metadata:{displayName:"panel.details.nodes.mrtLineBadge.displayName",tags:[]}},le=4,de=7,ae=10,pe=5,Vn=5,A=Vn*Math.SQRT1_2,he=.25,se=(A*Math.SQRT2-he)/2*Math.SQRT2,Gn=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=q.names,num:h=q.num,color:c=q.color,crosshatchPatternFill:f=q.crosshatchPatternFill}=l!=null?l:q,p=r.useRef(null),[g,u]=r.useState({height:10,width:12});r.useEffect(()=>u(p.current.getBBox()),[...d,u,p]);const x=r.useCallback(C=>s(e,C),[e,s]),y=r.useCallback(C=>a(e,C),[e,a]),B=r.useCallback(C=>m(e,C),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:x,onPointerMove:y,onPointerUp:B,style:{cursor:"move"},children:[n.jsxs("defs",{children:[n.jsxs("clipPath",{id:"jr_east_fill_pattern_clip_path",patternUnits:"userSpaceOnUse",children:[n.jsx("polygon",{points:"0,0 0,".concat(se," ").concat(se,",0")}),n.jsx("polygon",{points:"".concat(A,",").concat(A," ").concat(A-se,",").concat(A," ").concat(A,",").concat(A-se)})]}),n.jsxs("pattern",{id:"jr_east_".concat(e,"_fill_pattern_").concat(c[2]),width:A,height:A,patternUnits:"userSpaceOnUse",children:[n.jsx("rect",{width:A,height:A,fill:c[2]}),n.jsx("line",{x1:"0",y1:"0",x2:A,y2:A,stroke:"white",strokeWidth:he,strokeOpacity:"33%",clipPath:"url(#jr_east_fill_pattern_clip_path)"}),n.jsx("line",{x1:A,y1:"0",x2:"0",y2:A,stroke:"white",strokeWidth:he,strokeOpacity:"33%"})]})]}),n.jsx("rect",{fill:f?"url(#jr_east_".concat(e,"_fill_pattern_").concat(c[2],")"):c[2],x:"0",y:"-1",width:g.width+le+10,height:g.height+1,rx:"1",stroke:"black",strokeWidth:"0.25"}),n.jsx("circle",{r:le,cx:de,cy:ae/2+1,stroke:"black",strokeWidth:"0.25",fill:c[3]}),n.jsx("text",{x:de,y:ae/2+1.75,textAnchor:"middle",dominantBaseline:"middle",fill:c[3]==="#000"?"white":c[2],fontSize:h>9?7:8,className:"rmp-name__jreast_en",children:h}),n.jsx(me,{ref:p,text:d[0].split("\n"),x:de+le+1,y:"-1",fill:c[3],fontSize:ae,lineHeight:ae,grow:"down",className:"rmp-name__jreast_ja"}),n.jsx(me,{text:d[1].split("\n"),textAnchor:"middle",dominantBaseline:"hanging",x:(g.width+le+10)/2,y:g.height+1,fontSize:pe,lineHeight:pe,baseOffset:0,grow:"down",className:"rmp-name__jreast_en"})]})},q={names:["山手線","Yamanote Line"],color:[S.Tokyo,"jy","#9ACD32",L.black],num:9,crosshatchPatternFill:!1},Xn=o=>{const{id:e,attrs:t,handleAttrsUpdate:i}=o,{t:l}=$(),s=[{type:"input",label:l("panel.details.nodes.common.num"),value:String(t.num),validator:a=>!Number.isNaN(a),onChange:a=>{t.num=Number(a),i(e,t)},minW:"full"},{type:"textarea",label:l("panel.details.nodes.common.nameJa"),value:t.names[0],onChange:a=>{t.names[0]=a,i(e,t)},minW:"full"},{type:"textarea",label:l("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:a=>{t.names[1]=a,i(e,t)},minW:"full"},{type:"switch",label:l("panel.details.nodes.jrEastLineBadge.crosshatchPatternFill"),oneLine:!0,isChecked:t.crosshatchPatternFill,onChange:a=>{t.crosshatchPatternFill=a,i(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(z,{type:b.JREastLineBadge,defaultTheme:q.color})}];return n.jsx(k,{fields:s})},Hn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"1",y:"6",width:"22",height:"7"}),n.jsx("circle",{cx:"3.5",cy:"9.25",r:"2",fill:"white"}),n.jsx("text",{x:"3",y:"10.5",fontSize:"3",children:"9"}),n.jsx("text",{x:"6",y:"11.25",fontSize:"5",fill:"white",children:"山手線"}),n.jsx("text",{x:"1.5",y:"16",fontSize:"3",children:"Yamanote Line"})]}),Zn={component:Gn,icon:Hn,defaultAttrs:q,attrsComponent:Xn,metadata:{displayName:"panel.details.nodes.jrEastLineBadge.displayName",tags:[]}},Jn=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=O.num,numEn:h=O.numEn,color:c=O.color,showText:f=O.showText}=l!=null?l:O,p=r.useCallback(w=>s(e,w),[e,s]),g=r.useCallback(w=>a(e,w),[e,a]),u=r.useCallback(w=>m(e,w),[e,m]),x=c[3],[y,B,C,j]=Number(d)>=10?[-2.4,0,10.25,20]:[0,4,10,22];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:p,onPointerMove:g,onPointerUp:u,style:{cursor:"move"},children:[n.jsx("rect",{fill:c[2],x:"0",width:"20",height:"20",rx:"2",ry:"2"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"left",x:B,y:C,fill:x,fontSize:j,fontWeight:"bold",letterSpacing:y,dominantBaseline:"central",children:d}),f&&n.jsxs(n.Fragment,{children:[n.jsx("text",{className:"rmp-name__zh",x:"22",y:"10.5",fontSize:"13",children:"号线"}),n.jsxs("text",{className:"rmp-name__en",x:"22.5",y:"19.5",fontSize:"8",children:["Line ",h]})]})]})},O={num:1,numEn:"1",showText:!0,color:[S.Qingdao,"qd1","#f7b000",L.white]},Yn=o=>{const{id:e,attrs:t,handleAttrsUpdate:i}=o,{t:l}=$(),s=[{type:"input",label:l("panel.details.nodes.common.num"),value:t.num.toString(),onChange:a=>{t.num=Number(a),t.numEn=a,i(e,t)}},{type:"input",label:l("panel.details.nodes.qingdaoMetroNumLineBadge.numEn"),value:t.numEn.toString(),onChange:a=>{t.numEn=a,i(e,t)}},{type:"switch",label:l("panel.details.nodes.qingdaoMetroNumLineBadge.showText"),isChecked:t.showText,oneLine:!0,onChange:a=>{t.showText=a,i(e,t)}},{type:"custom",label:l("color"),component:n.jsx(z,{type:b.QingdaoMetroNumLineBadge,defaultTheme:O.color})}];return n.jsx(k,{fields:s,minW:"full"})},Kn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"6",rx:"1",ry:"1",width:"10",height:"10"}),n.jsx("text",{x:"4",y:"15",fill:"white",fontSize:"12",children:"1"}),n.jsx("text",{x:"12",y:"11.5",fill:"black",fontSize:"6",children:"号线"}),n.jsx("text",{x:"12",y:"15.5",fill:"black",fontSize:"4",children:"Line1"})]}),et={component:Jn,icon:Kn,defaultAttrs:O,attrsComponent:Yn,metadata:{displayName:"panel.details.nodes.qingdaoMetroNumLineBadge.displayName",tags:[]}},nt=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=ie.names,color:h=ie.color}=l!=null?l:ie,c=r.useRef(null),[f,p]=r.useState({width:12});r.useEffect(()=>p(c.current.getBBox()),[...d,p,c]);const g=r.useCallback(y=>s(e,y),[e,s]),u=r.useCallback(y=>a(e,y),[e,a]),x=r.useCallback(y=>m(e,y),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:g,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[n.jsx("rect",{rx:"2",ry:"2",fill:h[2],x:"0",width:f.width+7,height:"21"}),n.jsxs("g",{ref:c,children:[n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"hanging",x:(f.width+7)/2,y:"3",fontSize:"8.63",fill:h[3],children:d[0]}),n.jsx("text",{className:"rmp-name__en",textAnchor:"middle",dominantBaseline:"hanging",x:(f.width+7)/2,y:"14",fontSize:"3.54",fill:h[3],children:d[1]})]})]})},ie={names:["广清城际","Guangzhou-Qingyuan Intercity"],color:[S.Guangzhou,"ir","#2559a8",L.white]},tt=o=>{const{id:e,attrs:t,handleAttrsUpdate:i}=o,{t:l}=$(),s=[{type:"input",label:l("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:a=>{t.names[0]=a,i(e,t)},minW:"full"},{type:"input",label:l("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:a=>{t.names[1]=a,i(e,t)},minW:"full"}];return n.jsx(k,{fields:s})},ot=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12"}),n.jsx("text",{x:"4.5",y:"11",fontSize:"4",fill:"white",children:"广清城际"}),n.jsx("text",{x:"3",y:"16",fontSize:"2",fill:"white",children:"Guangzhou-Qingyuan Intercity"})]}),lt={component:nt,icon:ot,defaultAttrs:ie,attrsComponent:tt,metadata:{displayName:"panel.details.nodes.guangdongIntercityRailwayLineBadge.displayName",tags:[]}},W=5,re="M0,0 L".concat(-5*2,",").concat(-5*2," L").concat(Math.SQRT2*W-2*W,",").concat(2*-5," L").concat(Math.SQRT2*W,",0 L").concat(Math.SQRT2*W-2*W,",").concat(2*W," L").concat(2*-5,",").concat(2*W," Z"),at=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{color:d=J.color,rotate:h=J.rotate,type:c=J.type}=l!=null?l:J,f=r.useCallback(u=>s(e,u),[e,s]),p=r.useCallback(u=>a(e,u),[e,a]),g=r.useCallback(u=>m(e,u),[e,m]);return n.jsx("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")rotate(").concat(h,")"),onPointerDown:f,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:c==="continuation"?n.jsx("path",{id:"virtual_circle_".concat(e),fill:d[2],d:re}):c==="sandwich"?n.jsx("path",{transform:"scale(0.5)",id:"virtual_circle_".concat(e),stroke:"white",strokeWidth:"1",fill:d[2],d:re}):n.jsx("path",{transform:"scale(0.25)",id:"virtual_circle_".concat(e),fill:"white",d:re})})},J={color:[S.London,"thameslink","#d28db0",L.white],rotate:0,type:"continuation"},st=o=>{const{id:e,attrs:t,handleAttrsUpdate:i}=o,{t:l}=$(),s=[{type:"select",label:l("panel.details.stations.common.rotate"),value:t.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:a=>{t.rotate=Number(a),i(e,t)},minW:"full"},{type:"select",label:l("panel.details.nodes.londonArrow.type"),value:t.type,options:{continuation:l("panel.details.nodes.londonArrow.continuation"),sandwich:l("panel.details.nodes.londonArrow.sandwich"),tube:l("panel.details.nodes.londonArrow.tube")},onChange:a=>{t.type=a,i(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(z,{type:b.LondonArrow,defaultTheme:J.color}),minW:"full"}];return n.jsx(k,{fields:s})},it=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("path",{transform:"translate(14,12)scale(0.75)",fill:"currentColor",d:re})}),rt={component:at,icon:it,defaultAttrs:J,attrsComponent:st,metadata:{displayName:"panel.details.nodes.londonArrow.displayName",tags:[]}},ct=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,d=Te();l.content=d(l.contents);const h=ce.component;return n.jsx(h,{id:e,x:t,y:i,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m,attrs:l})},dt={contents:{},...Pe},mt={component:ct,icon:ce.icon,defaultAttrs:dt,attrsComponent:ce.attrsComponent,metadata:{displayName:"panel.details.nodes.i18nText.displayName",tags:[]}},ht=o=>{var C;const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,d=r.useCallback(j=>s(e,j),[e,s]),h=r.useCallback(j=>a(e,j),[e,a]),c=r.useCallback(j=>m(e,j),[e,m]),f=(j,...w)=>new Function(...w,"return ".concat(j)),p=(j,w,_)=>{var P;const N={};for(const T in j)if(Object.prototype.hasOwnProperty.call(j,T))try{N[T]=f(j[T].slice(1),...l.components.map(v=>v.label),"color")(...w.map((v,Y)=>_[Y]==="number"&&!Number.isNaN(Number(v))?Number(v):v),l.color?(P=l.color.value)!=null?P:l.color.defaultValue:"")}catch(v){N[T]=""}return N},g=l.nodeType==="MiscNode"?{onPointerDown:d,onPointerMove:h,onPointerUp:c,style:{cursor:"move"}}:{},u=j=>j.replace(/(^|,)\s*([^{},]+)/g,"$1 #".concat(e," $2")),x=j=>j.map(w=>{var P,T;const _=l.nodeType==="Station"&&l.core&&l.core===w.id?{id:"stn_core_".concat(e),onPointerDown:d,onPointerMove:h,onPointerUp:c,style:{cursor:"move"}}:{},N=p(w.attrs,l.components.map(v=>v.value),l.components.map(v=>v.type));return n.jsx("g",{transform:"translate(".concat((P=N.x)!=null?P:0,", ").concat((T=N.y)!=null?T:0,")"),children:r.createElement(w.type,{...N,x:0,y:0,..._},w.children?x(w.children):"_rmp_children_text"in N?w.type==="style"?u(N._rmp_children_text):N._rmp_children_text:null)},w.id)}),y=(C=l.transform)!=null?C:ge,B=r.useMemo(()=>x(l.svgs),[l]);return r.createElement("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),...g},l.randomId?n.jsx("g",{transform:"translate(".concat(y.translateX,", ").concat(y.translateY,") scale(").concat(y.scale,") rotate(").concat(y.rotate,")"),children:B}):n.jsxs("g",{children:[n.jsx("circle",{r:"5.5"}),n.jsx("g",{transform:"translate(-4.7, -5) scale(0.8)",children:n.jsx("polygon",{points:"6,1 7.5,4.25 11,4.65 8.5,7.1 9.2,10.75 6,9 2.8,10.75 3.5,7.1 1,4.65 4.5,4.25",fill:"white"})})]}))},ut={randomId:void 0,label:void 0,transform:ge,nodeType:"MiscNode",svgs:[],components:[]},xt=o=>{var B,C,j,w,_;const{id:e,attrs:t,handleAttrsUpdate:i}=o,l=fe(),{paletteAppClip:{output:s}}=ye(N=>N.runtime),{t:a}=$(),[m,d]=r.useState(!1),[h,c]=r.useState(!1),f=N=>{var T;const P=t.components.find(v=>v.id===N);return P?(T=P.value)!=null?T:P.defaultValue:void 0},p=N=>{N.components.forEach((P,T)=>{var v;N.components[T].value=(v=f(P.id))!=null?v:P.defaultValue}),N.color!==void 0&&(N.color.value=t.color?t.color.value:N.color.defaultValue),i(e,N)},g=t.components.map((N,P)=>{const{label:T,type:v,defaultValue:Y,value:I}=N;return v==="number"||v==="text"?{label:a(T),type:"input",value:I!=null?I:Y,onChange:K=>{t.components[P].value=K,i(e,{...t,components:t.components})}}:v==="switch"?{label:a(T),type:"switch",isChecked:I!==void 0?!!I:Y,onChange:K=>{t.components[P].value=K,i(e,{...t,components:t.components})}}:v==="textarea"?{label:a(T),type:"textarea",value:I!=null?I:Y,onChange:K=>{t.components[P].value=K,i(e,{...t,components:t.components})}}:{type:"input",label:"undefined",value:"none"}}),[u,x]=r.useState(!1);r.useEffect(()=>{t.color&&u&&s&&(t.color.value=s,i(e,{...t,color:t.color}),x(!1))},[s==null?void 0:s.toString()]);const y=[{type:"custom",label:a("color"),component:n.jsx(be,{theme:(B=t.color)==null?void 0:B.value,onClick:()=>{var N;x(!0),l(je((N=t.color)==null?void 0:N.value))}})}];return n.jsxs(n.Fragment,{children:[n.jsxs(xe,{direction:"row",mr:"auto",width:"100%",children:[n.jsx(we,{width:"100%",overflow:"hidden",label:a("panel.details.nodes.master.type"),children:n.jsxs(xe,{width:"100%",overflow:"hidden",children:[n.jsx(ue,{name:(C=t.label)!=null?C:a("panel.details.nodes.master.undefined"),fg:(j=t.labelColorFg)!=null?j:L.white,bg:(w=t.labelColorBg)!=null?w:"#000000",sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"},mr:1}),n.jsx(ue,{name:(_=t.randomId)!=null?_:"UNDEFINED",fg:L.white,bg:t.randomId?"#19B3EA":"#000000",sx:{display:"inline-block"},mr:1})]})}),n.jsx(Ce,{}),n.jsx(Le,{icon:n.jsx(Be,{}),onClick:()=>d(!0),"aria-label":"upload"})]}),n.jsx(ve,{width:"100%",leftIcon:n.jsx(Ne,{}),onClick:()=>c(!0),children:a("header.settings.procedures.masterManager.title")}),t.randomId&&n.jsx(k,{fields:g,minW:"full"}),t.randomId&&t.color!==void 0&&n.jsx(k,{fields:y,minW:"full"}),n.jsx(ze,{isOpen:m,onClose:()=>d(!1),onSubmit:p}),n.jsx(Ae,{isOpen:h,onClose:()=>c(!1)})]})},pt=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"none"}),n.jsx("g",{transform:"translate(7.25, 7) scale(0.8)",children:n.jsx("polygon",{points:"6,1 7.5,4.25 11,4.65 8.5,7.1 9.2,10.75 6,9 2.8,10.75 3.5,7.1 1,4.65 4.5,4.25",fill:"currentColor"})})]}),gt={component:ht,icon:pt,defaultAttrs:ut,attrsComponent:xt,metadata:{displayName:"panel.details.nodes.master.displayName",tags:[]}},wt={[b.Virtual]:Ue,[b.ShmetroNumLineBadge]:Fe,[b.ShmetroTextLineBadge]:Ve,[b.GzmtrLineBadge]:Ze,[b.BjsubwayNumLineBadge]:nn,[b.BjsubwayTextLineBadge]:rn,[b.SuzhouRTNumLineBadge]:un,[b.BerlinSBahnLineBadge]:Nn,[b.BerlinUBahnLineBadge]:yn,[b.ChongqingRTNumLineBadge]:Pn,[b.ChongqingRTTextLineBadge]:Mn,[b.ShenzhenMetroNumLineBadge]:Un,[b.MRTDestinationNumbers]:Wn,[b.MRTLineBadge]:Qn,[b.JREastLineBadge]:Zn,[b.QingdaoMetroNumLineBadge]:et,[b.GuangdongIntercityRailwayLineBadge]:lt,[b.LondonArrow]:rt,[b.Facilities]:ke,[b.Text]:ce,[b.I18nText]:mt,[b.Master]:gt};export{wt as m}; +import{aR as D,C as S,M as L,aS as z,aB as b,i as k,aT as ge,c as fe,d as ye,V as be,W as je,P as we,R as ue,D as Be,ak as Ne}from"./index-CsgTWcmq.js";import{j as n,h as xe,aM as Ce,a2 as Le,t as ve}from"./chakra-BF_mGyXb.js";import{b as r,u as $}from"./react-0YWW4C_I.js";import{L as Se,g as me,t as ce,h as Pe,j as Te,k as ze,M as Ae,n as ke}from"./master-manager-DW7JCfNm.js";const Me=o=>{const{id:e,x:t,y:i,handlePointerDown:l,handlePointerMove:s,handlePointerUp:a}=o,m=r.useCallback(c=>l(e,c),[e,l]),d=r.useCallback(c=>s(e,c),[e,s]),h=r.useCallback(c=>a(e,c),[e,a]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")rotate(45)"),onPointerDown:m,onPointerMove:d,onPointerUp:h,style:{cursor:"move"},className:"removeMe",children:[n.jsx("line",{x1:"-5",y1:"0",x2:"5",y2:"0",stroke:"black"}),n.jsx("line",{x1:"0",y1:"-5",x2:"0",y2:"5",stroke:"black"}),n.jsx("circle",{id:"virtual_circle_".concat(e),r:5,stroke:"black",fill:"white",fillOpacity:"0"})]})},$e={},_e=()=>n.jsx(D,{fields:[]}),Re=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,transform:"rotate(45)",focusable:!1,children:[n.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"none"}),n.jsx("line",{x1:"6",y1:"12",x2:"18",y2:"12",stroke:"currentColor"}),n.jsx("line",{x1:"12",y1:"6",x2:"12",y2:"18",stroke:"currentColor"})]}),Ue={component:Me,icon:Re,defaultAttrs:$e,attrsComponent:_e,metadata:{displayName:"panel.details.nodes.virtual.displayName",tags:[]}},De=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=Q.num,color:h=Q.color}=l!=null?l:Q,[c,f]=d>=10?[22.67,10.75]:[21,10],p=r.useCallback(x=>s(e,x),[e,s]),g=r.useCallback(x=>a(e,x),[e,a]),u=r.useCallback(x=>m(e,x),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:p,onPointerMove:g,onPointerUp:u,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],width:c,height:"22.67"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:f,y:"19",fill:h[3],fontSize:"21.33",letterSpacing:"-1.75",children:d}),n.jsx("text",{className:"rmp-name__zh",x:c+2,y:"12",fontSize:"14.67",children:"号线"}),n.jsxs("text",{className:"rmp-name__en",x:c+4,y:"21.5",fontSize:"8",children:["Line ",d]})]})},Q={num:1,color:[S.Shanghai,"sh1","#E4002B",L.white]},Ie=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:Q).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:Q;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"custom",label:"color",component:n.jsx(z,{type:b.ShmetroNumLineBadge,defaultTheme:Q.color})}],Ee=()=>n.jsx(D,{fields:Ie}),We=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"10",height:"16"}),n.jsx("text",{x:"4",y:"18",fill:"white",children:"1"}),n.jsx("text",{x:"14",y:"10",fontSize:"5",children:"号线"}),n.jsx("text",{x:"14",y:"18",fontSize:"4",children:"Line 1"})]}),Fe={component:De,icon:We,defaultAttrs:Q,attrsComponent:Ee,metadata:{displayName:"panel.details.nodes.shmetroNumLineBadge.displayName",tags:[]}},qe=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=ee.names,color:h=ee.color}=l!=null?l:ee,c=r.useRef(null),[f,p]=r.useState({width:12});r.useEffect(()=>p(c.current.getBBox()),[...d,p,c]);const g=r.useCallback(y=>s(e,y),[e,s]),u=r.useCallback(y=>a(e,y),[e,a]),x=r.useCallback(y=>m(e,y),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:g,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:f.width+7,height:"21"}),n.jsxs("g",{ref:c,children:[n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"hanging",x:(f.width+7)/2,y:"3",fontSize:"10",fill:h[3],letterSpacing:"-0.25",children:d[0]}),n.jsx("text",{className:"rmp-name__en",textAnchor:"middle",dominantBaseline:"hanging",x:(f.width+7)/2,y:"14",fontSize:"5",fill:h[3],letterSpacing:"-0.25",children:d[1]})]})]})},ee={names:["浦江线","Pujiang Line"],color:[S.Shanghai,"pjl","#B5B5B6",L.white]},Oe=o=>{const{id:e,attrs:t,handleAttrsUpdate:i}=o,{t:l}=$(),s=[{type:"input",label:l("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:a=>{t.names[0]=a,i(e,t)},minW:"full"},{type:"input",label:l("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:a=>{t.names[1]=a,i(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(z,{type:b.ShmetroTextLineBadge,defaultTheme:ee.color})}];return n.jsx(k,{fields:s})},Qe=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12"}),n.jsx("text",{x:"5",y:"11",fontSize:"5",fill:"white",children:"浦江线"}),n.jsx("text",{x:"3",y:"16",fontSize:"4",fill:"white",children:"Pujiang Line"})]}),Ve={component:qe,icon:Qe,defaultAttrs:ee,attrsComponent:Oe,metadata:{displayName:"panel.details.nodes.shmetroTextLineBadge.displayName",tags:[]}},Ge=o=>{var x,y;const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=F.names,color:h=F.color,tram:c=F.tram,span:f=F.span}=l!=null?l:F,p=r.useCallback(B=>s(e,B),[e,s]),g=r.useCallback(B=>a(e,B),[e,a]),u=r.useCallback(B=>m(e,B),[e,m]);return n.jsx("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")scale(").concat(c?.5:1,")"),onPointerDown:p,onPointerMove:g,onPointerUp:u,style:{cursor:"move"},children:n.jsx(Se,{zhName:(x=d.at(0))!=null?x:"",enName:(y=d.at(1))!=null?y:"",zhClassName:"rmp-name__zh",enClassName:"rmp-name__en",foregroundColour:h[3],backgroundColour:h[2],spanDigits:f})})},F={names:["1号线","Line 1"],color:[S.Guangzhou,"gz1","#F3D03E",L.black],tram:!1,span:!0},Xe=o=>{const{id:e,attrs:t,handleAttrsUpdate:i}=o,{t:l}=$(),s=[{type:"input",label:l("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:a=>{t.names[0]=a,i(e,t)},minW:"full"},{type:"input",label:l("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:a=>{t.names[1]=a,i(e,t)},minW:"full"},{type:"switch",label:l("panel.details.nodes.gzmtrLineBadge.tram"),oneLine:!0,isChecked:t.tram,onChange:a=>{t.tram=a,i(e,t)},minW:"full"},{type:"switch",label:l("panel.details.nodes.gzmtrLineBadge.span"),oneLine:!0,isChecked:t.span,onChange:a=>{t.span=a,i(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(z,{type:b.GzmtrLineBadge,defaultTheme:F.color})}];return n.jsx(k,{fields:s})},He=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"5",width:"20",height:"14",rx:"1"}),n.jsx("text",{x:"6",y:"15",textAnchor:"middle",fontSize:"10",fill:"white",children:"1"}),n.jsx("text",{x:"15",y:"12",textAnchor:"middle",fontSize:"6",fill:"white",children:"号线"}),n.jsx("text",{x:"14.5",y:"17",textAnchor:"middle",fontSize:"4",fill:"white",children:"Line 1"})]}),Ze={component:Ge,icon:He,defaultAttrs:F,attrsComponent:Xe,metadata:{displayName:"panel.details.nodes.gzmtrLineBadge.displayName",tags:[]}},te=11.84375,Je=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=V.num,color:h=V.color}=l!=null?l:V,c=r.useCallback(u=>s(e,u),[e,s]),f=r.useCallback(u=>a(e,u),[e,a]),p=r.useCallback(u=>m(e,u),[e,m]),g=h[3]===L.black?"#003670":L.white;return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:c,onPointerMove:f,onPointerUp:p,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:te+21,height:"16",rx:"2"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:te/2+2,y:"13.5",fill:g,fontSize:"15",letterSpacing:"-1.5",children:d}),n.jsx("text",{className:"rmp-name__zh",x:te+(d>9?5.5:3),y:"8.5",fontSize:"7",fill:g,children:"号线"}),n.jsxs("text",{className:"rmp-name__en",x:te+(d>9?6:4.5),y:"13.5",fontSize:"4",fill:g,children:["Line ",d]})]})},V={num:1,color:[S.Beijing,"bj1","#c23a30",L.white]},Ye=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:V).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:V;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"custom",label:"color",component:n.jsx(z,{type:b.BjsubwayNumLineBadge,defaultTheme:V.color})}],Ke=()=>n.jsx(D,{fields:Ye}),en=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"2"}),n.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"1"}),n.jsx("text",{x:"11",y:"11",fill:"white",fontSize:"5",children:"号线"}),n.jsx("text",{x:"11",y:"17",fill:"white",fontSize:"4",children:"Line 1"})]}),nn={component:Je,icon:en,defaultAttrs:V,attrsComponent:Ke,metadata:{displayName:"panel.details.nodes.bjsubwayNumLineBadge.displayName",tags:[]}},tn=28.84375,on=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=R.names,color:h=R.color}=l!=null?l:R,c=r.useRef(null),[f,p]=r.useState({width:12});r.useEffect(()=>p(c.current.getBBox()),[...d,p,c]);const g=r.useCallback(C=>s(e,C),[e,s]),u=r.useCallback(C=>a(e,C),[e,a]),x=r.useCallback(C=>m(e,C),[e,m]),y=Math.max(tn,f.width),B=h[3]===L.black?"#003670":L.white;return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:g,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:y+4,height:"16",rx:"2"}),n.jsxs("g",{ref:c,children:[n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:(y+4)/2,y:"8",fontSize:"7",fill:B,children:d[0]}),n.jsx("text",{className:"rmp-name__en",textAnchor:"middle",x:(y+4)/2,y:"13.5",fontSize:"4",fill:B,children:d[1]})]})]})},R={names:["八通线","Batong Line"],color:[S.Beijing,"bj1","#c23a30",L.white]},ln=[{type:"input",label:"panel.details.nodes.common.nameZh",value:o=>(o!=null?o:R).names[0],onChange:(o,e)=>{const t=e!=null?e:R;return t.names[0]=o.toString(),t}},{type:"input",label:"panel.details.nodes.common.nameEn",value:o=>(o!=null?o:R).names[1],onChange:(o,e)=>{const t=e!=null?e:R;return t.names[1]=o.toString(),t}},{type:"custom",label:"color",component:n.jsx(z,{type:b.BjsubwayTextLineBadge,defaultTheme:R.color})}],an=()=>n.jsx(D,{fields:ln}),sn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12",rx:"2"}),n.jsx("text",{x:"3",y:"12",fontSize:"6",fill:"white",children:"八通线"}),n.jsx("text",{x:"3",y:"16",fontSize:"3.2",fill:"white",children:"Batong Line"})]}),rn={component:on,icon:sn,defaultAttrs:R,attrsComponent:an,metadata:{displayName:"panel.details.nodes.bjsubwayTextLineBadge.displayName",tags:[]}},cn=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=M.num,branch:h=M.branch,color:c=M.color}=l!=null?l:M,f=r.useCallback(u=>s(e,u),[e,s]),p=r.useCallback(u=>a(e,u),[e,a]),g=r.useCallback(u=>m(e,u),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:f,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:[n.jsx("rect",{fill:c[2],width:"20",height:"20",rx:"2",ry:"2"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"middle",x:"10",y:"11.4",fill:c[3],fontSize:"15",letterSpacing:"-1",children:d}),h&&n.jsxs(n.Fragment,{children:[n.jsx("text",{className:"rmp-name__zh",x:20+2.5,y:"10",fontSize:"10",children:"支线"}),n.jsx("text",{className:"rmp-name__en",x:20+2.5,y:"18",fontSize:"5",fill:"gray",children:"Branch line"})]})]})},M={num:1,branch:!1,color:[S.Suzhou,"sz1","#78BA25",L.white]},dn=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:M).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:M;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"switch",label:"panel.details.nodes.suzhouRTNumLineBadge.branch",isChecked:o=>{var e;return(e=o==null?void 0:o.branch)!=null?e:M.branch},onChange:(o,e)=>{const t=e!=null?e:M;return t.branch=o,t}},{type:"custom",label:"color",component:n.jsx(z,{type:b.SuzhouRTNumLineBadge,defaultTheme:M.color})}],mn=()=>n.jsx(D,{fields:dn}),hn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"4",y:"4",width:"16",height:"16",rx:"3",ry:"3"}),n.jsx("text",{x:"12",y:"13.4",textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:"14",children:"1"})]}),un={component:cn,icon:hn,defaultAttrs:M,attrsComponent:mn,metadata:{displayName:"panel.details.nodes.suzhouRTNumLineBadge.displayName",tags:[]}},xn=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=G.num,color:h=G.color}=l!=null?l:G,c=r.useCallback(u=>s(e,u),[e,s]),f=r.useCallback(u=>a(e,u),[e,a]),p=r.useCallback(u=>m(e,u),[e,m]),g=h[3];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:c,onPointerMove:f,onPointerUp:p,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:"25",height:"15"}),n.jsxs("text",{className:"rmp-name__berlin",textAnchor:"middle",x:"12.5",y:"12.5",fill:g,fontSize:"14",letterSpacing:"1",children:["U",d]})]})},G={num:1,color:[S.Berlin,"bu1","#62AD2D",L.white]},pn=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:G).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:G;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"custom",label:"color",component:n.jsx(z,{type:b.BerlinUBahnLineBadge,defaultTheme:G.color})}],gn=()=>n.jsx(D,{fields:pn}),fn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16"}),n.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"U1"})]}),yn={component:xn,icon:fn,defaultAttrs:G,attrsComponent:gn,metadata:{displayName:"panel.details.nodes.berlinUBahnLineBadge.displayName",tags:[]}},bn=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=X.num,color:h=X.color}=l!=null?l:X,[c,f]=d>=10?[6,19.75]:[10,20],p=r.useCallback(y=>s(e,y),[e,s]),g=r.useCallback(y=>a(e,y),[e,a]),u=r.useCallback(y=>m(e,y),[e,m]),x=h[3];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:p,onPointerMove:g,onPointerUp:u,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:"30",height:"15",rx:"8"}),n.jsx("text",{className:"rmp-name__berlin",textAnchor:"middle",x:c,y:"12.5",fill:x,fontSize:"14",letterSpacing:"0",children:"S"}),n.jsx("text",{className:"rmp-name__berlin",textAnchor:"middle",x:f,y:"12.5",fill:x,fontSize:"14",letterSpacing:"-0.2",children:d})]})},X={num:1,color:[S.Berlin,"bs1","#DD6CA6",L.white]},jn=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:X).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:X;return Number.isNaN(o)||(t.num=Number(o)),t}},{type:"custom",label:"color",component:n.jsx(z,{type:b.BerlinSBahnLineBadge,defaultTheme:X.color})}],wn=()=>n.jsx(D,{fields:jn}),Bn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"8"}),n.jsx("text",{x:"4.5",y:"16.5",fill:"white",fontSize:"14",children:"S1"})]}),Nn={component:bn,icon:Bn,defaultAttrs:X,attrsComponent:wn,metadata:{displayName:"panel.details.nodes.berlinSBahnLineBadge.displayName",tags:[]}},Cn=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=H.num,color:h=H.color}=l!=null?l:H,c=r.useCallback(B=>s(e,B),[e,s]),f=r.useCallback(B=>a(e,B),[e,a]),p=r.useCallback(B=>m(e,B),[e,m]),g=h[3],u=Number.isInteger(d)?16:15,[x,y]=Number.isInteger(d)?Number(d)>=10?[-1.2,1.5]:[0,5.5]:[0,2.55];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:c,onPointerMove:f,onPointerUp:p,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:"20",height:"20",rx:"10",ry:"10"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"left",x:y,y:"10",fill:g,fontSize:u,letterSpacing:x,dominantBaseline:"central",children:d})]})},H={num:1,color:[S.Chongqing,"cq1","#e4002b",L.white]},Ln=[{type:"input",label:"panel.details.nodes.common.num",value:o=>(o!=null?o:H).num,validator:o=>!Number.isNaN(o),onChange:(o,e)=>{const t=e!=null?e:H;return Number.isNaN(Number(o))?t.num=o:t.num=Number(o),t}},{type:"custom",label:"color",component:n.jsx(z,{type:b.ChongqingRTNumLineBadge,defaultTheme:H.color})}],vn=()=>n.jsx(D,{fields:Ln}),Sn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),n.jsx("text",{x:"8",y:"18",fill:"white",fontSize:"18",children:"1"})]}),Pn={component:Cn,icon:Sn,defaultAttrs:H,attrsComponent:vn,metadata:{displayName:"panel.details.nodes.chongqingRTNumLineBadge.displayName",tags:[]}},Tn=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=U.names,color:h=U.color}=l!=null?l:U,c=r.useRef(null),f=r.useCallback(x=>s(e,x),[e,s]),p=r.useCallback(x=>a(e,x),[e,a]),g=r.useCallback(x=>m(e,x),[e,m]),u=h[3];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:f,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:"20",height:"20",rx:"10",ry:"10"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:"10",y:"10.5",fill:u,fontSize:"6",letterSpacing:"0",children:d[0]}),n.jsx(me,{ref:c,text:d[1].split("\n"),className:"rmp-name__en",textAnchor:"middle",x:"10",y:"9.25",fill:u,fontSize:"2.5",letterSpacing:"0",lineHeight:2.25,grow:"down"})]})},U={names:["空港线","Konggang Line"],color:[S.Chongqing,"cq3","#003da5",L.white]},zn=[{type:"input",label:"panel.details.nodes.common.nameZh",value:o=>(o!=null?o:U).names[0],onChange:(o,e)=>{const t=e!=null?e:U;return t.names[0]=o.toString(),t}},{type:"textarea",label:"panel.details.nodes.common.nameEn",value:o=>(o!=null?o:U).names[1],onChange:(o,e)=>{const t=e!=null?e:U;return t.names[1]=o.toString(),t}},{type:"custom",label:"color",component:n.jsx(z,{type:b.ChongqingRTTextLineBadge,defaultTheme:U.color})}],An=()=>n.jsx(D,{fields:zn}),kn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),n.jsx("text",{x:"4.5",y:"12.5",fill:"white",fontSize:"5",children:"空港线"}),n.jsx("text",{x:"4.5",y:"15",fill:"white",fontSize:"2",children:"Konggang Line"})]}),Mn={component:Tn,icon:kn,defaultAttrs:U,attrsComponent:An,metadata:{displayName:"panel.details.nodes.chongqingRTTextLineBadge.displayName",tags:[]}},oe=11.84375,$n=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=Z.num,color:h=Z.color,isBranch:c=Z.isBranch}=l!=null?l:Z,f=r.useCallback(j=>s(e,j),[e,s]),p=r.useCallback(j=>a(e,j),[e,a]),g=r.useCallback(j=>m(e,j),[e,m]),u=h[3],x=c?10:oe+(d>9?6.5:3),y=c?-1:0,B=c?11:oe+(d>9?7:3.5),C=c?6:oe/2+4;return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:f,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:[n.jsx("rect",{fill:h[2],x:"0",width:oe+21,height:"16",rx:"2"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:C,y:"13.5",fill:u,fontSize:"15",letterSpacing:"-1",children:d}),n.jsxs("text",{className:"rmp-name__zh",x,y:"9.5",fontSize:"6",fill:u,letterSpacing:y,children:["号线",c?"支线":""]}),n.jsxs("text",{className:"rmp-name__en",x:B,y:"13.5",fontSize:"3",fill:u,children:[c?"Branch":""," Line ",d]})]})},Z={num:1,color:[S.Shenzhen,"sz1","#00b140",L.white],isBranch:!1},_n=o=>{const{id:e,attrs:t,handleAttrsUpdate:i}=o,{t:l}=$(),s=[{type:"input",label:l("panel.details.nodes.common.num"),value:String(t.num),validator:a=>!Number.isNaN(a),onChange:a=>{t.num=Number(a),i(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(z,{type:b.ShenzhenMetroNumLineBadge,defaultTheme:Z.color}),minW:"full"},{type:"switch",label:l("panel.details.nodes.shenzhenMetroNumLineBadge.branch"),oneLine:!0,isChecked:t.isBranch,onChange:a=>{t.isBranch=a,i(e,t)},minW:"full"}];return n.jsx(k,{fields:s})},Rn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"2"}),n.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"1"}),n.jsx("text",{x:"11",y:"14",fill:"white",fontSize:"5",children:"号线"}),n.jsx("text",{x:"12",y:"17",fill:"white",fontSize:"3",children:"Line 1"})]}),Un={component:$n,icon:Rn,defaultAttrs:Z,attrsComponent:_n,metadata:{displayName:"panel.details.nodes.shenzhenMetroNumLineBadge.displayName",tags:[]}},Dn=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=ne.num,color:h=ne.color}=l!=null?l:ne,c=r.useCallback(x=>s(e,x),[e,s]),f=r.useCallback(x=>a(e,x),[e,a]),p=r.useCallback(x=>m(e,x),[e,m]),g=h[3],u=h[2];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:c,onPointerMove:f,onPointerUp:p,style:{cursor:"move"},children:[n.jsx("circle",{r:"8",fill:u}),n.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",x:"0",y:"0",width:"12",height:"12",fill:g,fontSize:"12",dominantBaseline:"central",letterSpacing:"-0.2",children:d})]})},ne={num:1,color:[S.Singapore,"ewl","#009739",L.white]},In=o=>{const{id:e,attrs:t,handleAttrsUpdate:i}=o,{t:l}=$(),s=[{type:"input",label:l("panel.details.nodes.common.num"),value:String(t.num),validator:a=>!Number.isNaN(a),onChange:a=>{t.num=Number(a),i(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(z,{type:b.MRTDestinationNumbers,defaultTheme:ne.color}),minW:"full"}];return n.jsx(k,{fields:s})},En=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),n.jsx("text",{x:"9",y:"17",fill:"white",fontSize:"14",children:"1"})]}),Wn={component:Dn,icon:En,defaultAttrs:ne,attrsComponent:In,metadata:{displayName:"panel.details.nodes.mrtDestinationNumbers.displayName",tags:[]}},Fn=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{lineCode:d=E.lineCode,color:h=E.color,lines:c=E.lines,name:f=E.name,isTram:p=E.isTram}=l!=null?l:E,g=r.useCallback(w=>s(e,w),[e,s]),u=r.useCallback(w=>a(e,w),[e,a]),x=r.useCallback(w=>m(e,w),[e,m]),y=22.85,B=12.935,C=h[3],j=h[2];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:g,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[n.jsx("rect",{transform:"scale(1.8)",x:-22.85/2,y:-12.935/2,rx:"3",ry:"6",width:y,height:B,fill:j,stroke:"white",strokeWidth:"1"}),n.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",fill:C,fontSize:"15",dominantBaseline:"central",letterSpacing:"-0.2",children:d}),n.jsx("text",{className:"rmp-name__mrt",textAnchor:"left",x:"28",y:p?3.5:-3,fill:"black",fontSize:"10",letterSpacing:"-0.2",children:f}),!p&&c.split(",").map((w,_)=>n.jsx("g",{transform:"translate(".concat(34+14*_,", ").concat(4.5,")"),children:w.trim()!=="airport"?n.jsxs(n.Fragment,{children:[n.jsx("circle",{r:"6",fill:j}),n.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",fill:C,fontSize:"9",dominantBaseline:"central",letterSpacing:"-0.2",children:w})]}):n.jsxs("g",{transform:"translate(-6, -6) scale(4.5)",children:[n.jsx("path",{d:"M2.467 0H.226A.226.226 0 0 0 0 .226v2.241a.225.225 0 0 0 .226.225h2.241a.225.225 0 0 0 .225-.225V.226A.226.226 0 0 0 2.467 0",style:{fill:"#2d2a26"}}),n.jsx("path",{d:"M1.5.746v.3l.73.642a.08.08 0 0 1 .022.05v.12c0 .017-.012.025-.027.018L1.5 1.529l-.06.541.2.113a.03.03 0 0 1 .013.023V2.3a.01.01 0 0 1-.014.011l-.293-.091-.286.087a.01.01 0 0 1-.014-.007v-.09a.03.03 0 0 1 .013-.023l.2-.113-.059-.545-.724.348a.018.018 0 0 1-.028-.018v-.12a.07.07 0 0 1 .023-.05l.73-.642v-.3c0-.482.3-.482.3 0",style:{fill:"#fff",fillRule:"evenodd"}})]})},_))]})},E={lineCode:"EWL",name:"East-West Line",lines:"1, 2, 3, airport",isTram:!1,color:[S.Singapore,"ewl","#009739",L.white]},qn=o=>{const{id:e,attrs:t,handleAttrsUpdate:i}=o,{t:l}=$(),s=[{type:"input",label:l("panel.details.nodes.common.nameEn"),value:t.name,onChange:a=>{t.name=a,i(e,t)},minW:"full"},{type:"input",label:l("panel.details.stations.common.lineCode"),value:t.lineCode,onChange:a=>{t.lineCode=a,i(e,t)},minW:"full"},{type:"switch",label:l("panel.details.nodes.mrtLineBadge.isTram"),isChecked:t.isTram,onChange:a=>{t.isTram=a,i(e,t)},minW:"full",oneLine:!0},...t.isTram?[]:[{type:"input",label:l("panel.details.nodes.common.num"),value:t.lines,onChange:a=>{t.lines=a,i(e,t)},minW:"full"}],{type:"custom",label:l("color"),component:n.jsx(z,{type:b.MRTLineBadge,defaultTheme:E.color}),minW:"full"}];return n.jsx(k,{fields:s})},On=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),n.jsx("text",{x:"9",y:"17",fill:"white",fontSize:"14",children:"1"})]}),Qn={component:Fn,icon:On,defaultAttrs:E,attrsComponent:qn,metadata:{displayName:"panel.details.nodes.mrtLineBadge.displayName",tags:[]}},le=4,de=7,ae=10,pe=5,Vn=5,A=Vn*Math.SQRT1_2,he=.25,se=(A*Math.SQRT2-he)/2*Math.SQRT2,Gn=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=q.names,num:h=q.num,color:c=q.color,crosshatchPatternFill:f=q.crosshatchPatternFill}=l!=null?l:q,p=r.useRef(null),[g,u]=r.useState({height:10,width:12});r.useEffect(()=>u(p.current.getBBox()),[...d,u,p]);const x=r.useCallback(C=>s(e,C),[e,s]),y=r.useCallback(C=>a(e,C),[e,a]),B=r.useCallback(C=>m(e,C),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:x,onPointerMove:y,onPointerUp:B,style:{cursor:"move"},children:[n.jsxs("defs",{children:[n.jsxs("clipPath",{id:"jr_east_fill_pattern_clip_path",patternUnits:"userSpaceOnUse",children:[n.jsx("polygon",{points:"0,0 0,".concat(se," ").concat(se,",0")}),n.jsx("polygon",{points:"".concat(A,",").concat(A," ").concat(A-se,",").concat(A," ").concat(A,",").concat(A-se)})]}),n.jsxs("pattern",{id:"jr_east_".concat(e,"_fill_pattern_").concat(c[2]),width:A,height:A,patternUnits:"userSpaceOnUse",children:[n.jsx("rect",{width:A,height:A,fill:c[2]}),n.jsx("line",{x1:"0",y1:"0",x2:A,y2:A,stroke:"white",strokeWidth:he,strokeOpacity:"33%",clipPath:"url(#jr_east_fill_pattern_clip_path)"}),n.jsx("line",{x1:A,y1:"0",x2:"0",y2:A,stroke:"white",strokeWidth:he,strokeOpacity:"33%"})]})]}),n.jsx("rect",{fill:f?"url(#jr_east_".concat(e,"_fill_pattern_").concat(c[2],")"):c[2],x:"0",y:"-1",width:g.width+le+10,height:g.height+1,rx:"1",stroke:"black",strokeWidth:"0.25"}),n.jsx("circle",{r:le,cx:de,cy:ae/2+1,stroke:"black",strokeWidth:"0.25",fill:c[3]}),n.jsx("text",{x:de,y:ae/2+1.75,textAnchor:"middle",dominantBaseline:"middle",fill:c[3]==="#000"?"white":c[2],fontSize:h>9?7:8,className:"rmp-name__jreast_en",children:h}),n.jsx(me,{ref:p,text:d[0].split("\n"),x:de+le+1,y:"-1",fill:c[3],fontSize:ae,lineHeight:ae,grow:"down",className:"rmp-name__jreast_ja"}),n.jsx(me,{text:d[1].split("\n"),textAnchor:"middle",dominantBaseline:"hanging",x:(g.width+le+10)/2,y:g.height+1,fontSize:pe,lineHeight:pe,baseOffset:0,grow:"down",className:"rmp-name__jreast_en"})]})},q={names:["山手線","Yamanote Line"],color:[S.Tokyo,"jy","#9ACD32",L.black],num:9,crosshatchPatternFill:!1},Xn=o=>{const{id:e,attrs:t,handleAttrsUpdate:i}=o,{t:l}=$(),s=[{type:"input",label:l("panel.details.nodes.common.num"),value:String(t.num),validator:a=>!Number.isNaN(a),onChange:a=>{t.num=Number(a),i(e,t)},minW:"full"},{type:"textarea",label:l("panel.details.nodes.common.nameJa"),value:t.names[0],onChange:a=>{t.names[0]=a,i(e,t)},minW:"full"},{type:"textarea",label:l("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:a=>{t.names[1]=a,i(e,t)},minW:"full"},{type:"switch",label:l("panel.details.nodes.jrEastLineBadge.crosshatchPatternFill"),oneLine:!0,isChecked:t.crosshatchPatternFill,onChange:a=>{t.crosshatchPatternFill=a,i(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(z,{type:b.JREastLineBadge,defaultTheme:q.color})}];return n.jsx(k,{fields:s})},Hn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"1",y:"6",width:"22",height:"7"}),n.jsx("circle",{cx:"3.5",cy:"9.25",r:"2",fill:"white"}),n.jsx("text",{x:"3",y:"10.5",fontSize:"3",children:"9"}),n.jsx("text",{x:"6",y:"11.25",fontSize:"5",fill:"white",children:"山手線"}),n.jsx("text",{x:"1.5",y:"16",fontSize:"3",children:"Yamanote Line"})]}),Zn={component:Gn,icon:Hn,defaultAttrs:q,attrsComponent:Xn,metadata:{displayName:"panel.details.nodes.jrEastLineBadge.displayName",tags:[]}},Jn=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{num:d=O.num,numEn:h=O.numEn,color:c=O.color,showText:f=O.showText}=l!=null?l:O,p=r.useCallback(w=>s(e,w),[e,s]),g=r.useCallback(w=>a(e,w),[e,a]),u=r.useCallback(w=>m(e,w),[e,m]),x=c[3],[y,B,C,j]=Number(d)>=10?[-2.4,0,10.25,20]:[0,4,10,22];return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:p,onPointerMove:g,onPointerUp:u,style:{cursor:"move"},children:[n.jsx("rect",{fill:c[2],x:"0",width:"20",height:"20",rx:"2",ry:"2"}),n.jsx("text",{className:"rmp-name__zh",textAnchor:"left",x:B,y:C,fill:x,fontSize:j,fontWeight:"bold",letterSpacing:y,dominantBaseline:"central",children:d}),f&&n.jsxs(n.Fragment,{children:[n.jsx("text",{className:"rmp-name__zh",x:"22",y:"10.5",fontSize:"13",children:"号线"}),n.jsxs("text",{className:"rmp-name__en",x:"22.5",y:"19.5",fontSize:"8",children:["Line ",h]})]})]})},O={num:1,numEn:"1",showText:!0,color:[S.Qingdao,"qd1","#f7b000",L.white]},Yn=o=>{const{id:e,attrs:t,handleAttrsUpdate:i}=o,{t:l}=$(),s=[{type:"input",label:l("panel.details.nodes.common.num"),value:t.num.toString(),onChange:a=>{t.num=Number(a),t.numEn=a,i(e,t)}},{type:"input",label:l("panel.details.nodes.qingdaoMetroNumLineBadge.numEn"),value:t.numEn.toString(),onChange:a=>{t.numEn=a,i(e,t)}},{type:"switch",label:l("panel.details.nodes.qingdaoMetroNumLineBadge.showText"),isChecked:t.showText,oneLine:!0,onChange:a=>{t.showText=a,i(e,t)}},{type:"custom",label:l("color"),component:n.jsx(z,{type:b.QingdaoMetroNumLineBadge,defaultTheme:O.color})}];return n.jsx(k,{fields:s,minW:"full"})},Kn=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"6",rx:"1",ry:"1",width:"10",height:"10"}),n.jsx("text",{x:"4",y:"15",fill:"white",fontSize:"12",children:"1"}),n.jsx("text",{x:"12",y:"11.5",fill:"black",fontSize:"6",children:"号线"}),n.jsx("text",{x:"12",y:"15.5",fill:"black",fontSize:"4",children:"Line1"})]}),et={component:Jn,icon:Kn,defaultAttrs:O,attrsComponent:Yn,metadata:{displayName:"panel.details.nodes.qingdaoMetroNumLineBadge.displayName",tags:[]}},nt=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{names:d=ie.names,color:h=ie.color}=l!=null?l:ie,c=r.useRef(null),[f,p]=r.useState({width:12});r.useEffect(()=>p(c.current.getBBox()),[...d,p,c]);const g=r.useCallback(y=>s(e,y),[e,s]),u=r.useCallback(y=>a(e,y),[e,a]),x=r.useCallback(y=>m(e,y),[e,m]);return n.jsxs("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),onPointerDown:g,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[n.jsx("rect",{rx:"2",ry:"2",fill:h[2],x:"0",width:f.width+7,height:"21"}),n.jsxs("g",{ref:c,children:[n.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"hanging",x:(f.width+7)/2,y:"3",fontSize:"8.63",fill:h[3],children:d[0]}),n.jsx("text",{className:"rmp-name__en",textAnchor:"middle",dominantBaseline:"hanging",x:(f.width+7)/2,y:"14",fontSize:"3.54",fill:h[3],children:d[1]})]})]})},ie={names:["广清城际","Guangzhou-Qingyuan Intercity"],color:[S.Guangzhou,"ir","#2559a8",L.white]},tt=o=>{const{id:e,attrs:t,handleAttrsUpdate:i}=o,{t:l}=$(),s=[{type:"input",label:l("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:a=>{t.names[0]=a,i(e,t)},minW:"full"},{type:"input",label:l("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:a=>{t.names[1]=a,i(e,t)},minW:"full"}];return n.jsx(k,{fields:s})},ot=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12"}),n.jsx("text",{x:"4.5",y:"11",fontSize:"4",fill:"white",children:"广清城际"}),n.jsx("text",{x:"3",y:"16",fontSize:"2",fill:"white",children:"Guangzhou-Qingyuan Intercity"})]}),lt={component:nt,icon:ot,defaultAttrs:ie,attrsComponent:tt,metadata:{displayName:"panel.details.nodes.guangdongIntercityRailwayLineBadge.displayName",tags:[]}},W=5,re="M0,0 L".concat(-5*2,",").concat(-5*2," L").concat(Math.SQRT2*W-2*W,",").concat(2*-5," L").concat(Math.SQRT2*W,",0 L").concat(Math.SQRT2*W-2*W,",").concat(2*W," L").concat(2*-5,",").concat(2*W," Z"),at=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,{color:d=J.color,rotate:h=J.rotate,type:c=J.type}=l!=null?l:J,f=r.useCallback(u=>s(e,u),[e,s]),p=r.useCallback(u=>a(e,u),[e,a]),g=r.useCallback(u=>m(e,u),[e,m]);return n.jsx("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")rotate(").concat(h,")"),onPointerDown:f,onPointerMove:p,onPointerUp:g,style:{cursor:"move"},children:c==="continuation"?n.jsx("path",{id:"virtual_circle_".concat(e),fill:d[2],d:re}):c==="sandwich"?n.jsx("path",{transform:"scale(0.5)",id:"virtual_circle_".concat(e),stroke:"white",strokeWidth:"1",fill:d[2],d:re}):n.jsx("path",{transform:"scale(0.25)",id:"virtual_circle_".concat(e),fill:"white",d:re})})},J={color:[S.London,"thameslink","#d28db0",L.white],rotate:0,type:"continuation"},st=o=>{const{id:e,attrs:t,handleAttrsUpdate:i}=o,{t:l}=$(),s=[{type:"select",label:l("panel.details.stations.common.rotate"),value:t.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:a=>{t.rotate=Number(a),i(e,t)},minW:"full"},{type:"select",label:l("panel.details.nodes.londonArrow.type"),value:t.type,options:{continuation:l("panel.details.nodes.londonArrow.continuation"),sandwich:l("panel.details.nodes.londonArrow.sandwich"),tube:l("panel.details.nodes.londonArrow.tube")},onChange:a=>{t.type=a,i(e,t)},minW:"full"},{type:"custom",label:l("color"),component:n.jsx(z,{type:b.LondonArrow,defaultTheme:J.color}),minW:"full"}];return n.jsx(k,{fields:s})},it=n.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:n.jsx("path",{transform:"translate(14,12)scale(0.75)",fill:"currentColor",d:re})}),rt={component:at,icon:it,defaultAttrs:J,attrsComponent:st,metadata:{displayName:"panel.details.nodes.londonArrow.displayName",tags:[]}},ct=o=>{const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,d=Te();l.content=d(l.contents);const h=ce.component;return n.jsx(h,{id:e,x:t,y:i,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m,attrs:l})},dt={contents:{},...Pe},mt={component:ct,icon:ce.icon,defaultAttrs:dt,attrsComponent:ce.attrsComponent,metadata:{displayName:"panel.details.nodes.i18nText.displayName",tags:[]}},ht=o=>{var C;const{id:e,x:t,y:i,attrs:l,handlePointerDown:s,handlePointerMove:a,handlePointerUp:m}=o,d=r.useCallback(j=>s(e,j),[e,s]),h=r.useCallback(j=>a(e,j),[e,a]),c=r.useCallback(j=>m(e,j),[e,m]),f=(j,...w)=>new Function(...w,"return ".concat(j)),p=(j,w,_)=>{var P;const N={};for(const T in j)if(Object.prototype.hasOwnProperty.call(j,T))try{N[T]=f(j[T].slice(1),...l.components.map(v=>v.label),"color")(...w.map((v,Y)=>_[Y]==="number"&&!Number.isNaN(Number(v))?Number(v):v),l.color?(P=l.color.value)!=null?P:l.color.defaultValue:"")}catch(v){N[T]=""}return N},g=l.nodeType==="MiscNode"?{onPointerDown:d,onPointerMove:h,onPointerUp:c,style:{cursor:"move"}}:{},u=j=>j.replace(/(^|,)\s*([^{},]+)/g,"$1 #".concat(e," $2")),x=j=>j.map(w=>{var P,T;const _=l.nodeType==="Station"&&l.core&&l.core===w.id?{id:"stn_core_".concat(e),onPointerDown:d,onPointerMove:h,onPointerUp:c,style:{cursor:"move"}}:{},N=p(w.attrs,l.components.map(v=>v.value),l.components.map(v=>v.type));return n.jsx("g",{transform:"translate(".concat((P=N.x)!=null?P:0,", ").concat((T=N.y)!=null?T:0,")"),children:r.createElement(w.type,{...N,x:0,y:0,..._},w.children?x(w.children):"_rmp_children_text"in N?w.type==="style"?u(N._rmp_children_text):N._rmp_children_text:null)},w.id)}),y=(C=l.transform)!=null?C:ge,B=r.useMemo(()=>x(l.svgs),[l]);return r.createElement("g",{id:e,transform:"translate(".concat(t,", ").concat(i,")"),...g},l.randomId?n.jsx("g",{transform:"translate(".concat(y.translateX,", ").concat(y.translateY,") scale(").concat(y.scale,") rotate(").concat(y.rotate,")"),children:B}):n.jsxs("g",{children:[n.jsx("circle",{r:"5.5"}),n.jsx("g",{transform:"translate(-4.7, -5) scale(0.8)",children:n.jsx("polygon",{points:"6,1 7.5,4.25 11,4.65 8.5,7.1 9.2,10.75 6,9 2.8,10.75 3.5,7.1 1,4.65 4.5,4.25",fill:"white"})})]}))},ut={randomId:void 0,label:void 0,transform:ge,nodeType:"MiscNode",svgs:[],components:[]},xt=o=>{var B,C,j,w,_;const{id:e,attrs:t,handleAttrsUpdate:i}=o,l=fe(),{paletteAppClip:{output:s}}=ye(N=>N.runtime),{t:a}=$(),[m,d]=r.useState(!1),[h,c]=r.useState(!1),f=N=>{var T;const P=t.components.find(v=>v.id===N);return P?(T=P.value)!=null?T:P.defaultValue:void 0},p=N=>{N.components.forEach((P,T)=>{var v;N.components[T].value=(v=f(P.id))!=null?v:P.defaultValue}),N.color!==void 0&&(N.color.value=t.color?t.color.value:N.color.defaultValue),i(e,N)},g=t.components.map((N,P)=>{const{label:T,type:v,defaultValue:Y,value:I}=N;return v==="number"||v==="text"?{label:a(T),type:"input",value:I!=null?I:Y,onChange:K=>{t.components[P].value=K,i(e,{...t,components:t.components})}}:v==="switch"?{label:a(T),type:"switch",isChecked:I!==void 0?!!I:Y,onChange:K=>{t.components[P].value=K,i(e,{...t,components:t.components})}}:v==="textarea"?{label:a(T),type:"textarea",value:I!=null?I:Y,onChange:K=>{t.components[P].value=K,i(e,{...t,components:t.components})}}:{type:"input",label:"undefined",value:"none"}}),[u,x]=r.useState(!1);r.useEffect(()=>{t.color&&u&&s&&(t.color.value=s,i(e,{...t,color:t.color}),x(!1))},[s==null?void 0:s.toString()]);const y=[{type:"custom",label:a("color"),component:n.jsx(be,{theme:(B=t.color)==null?void 0:B.value,onClick:()=>{var N;x(!0),l(je((N=t.color)==null?void 0:N.value))}})}];return n.jsxs(n.Fragment,{children:[n.jsxs(xe,{direction:"row",mr:"auto",width:"100%",children:[n.jsx(we,{width:"100%",overflow:"hidden",label:a("panel.details.nodes.master.type"),children:n.jsxs(xe,{width:"100%",overflow:"hidden",children:[n.jsx(ue,{name:(C=t.label)!=null?C:a("panel.details.nodes.master.undefined"),fg:(j=t.labelColorFg)!=null?j:L.white,bg:(w=t.labelColorBg)!=null?w:"#000000",sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"},mr:1}),n.jsx(ue,{name:(_=t.randomId)!=null?_:"UNDEFINED",fg:L.white,bg:t.randomId?"#19B3EA":"#000000",sx:{display:"inline-block"},mr:1})]})}),n.jsx(Ce,{}),n.jsx(Le,{icon:n.jsx(Be,{}),onClick:()=>d(!0),"aria-label":"upload"})]}),n.jsx(ve,{width:"100%",leftIcon:n.jsx(Ne,{}),onClick:()=>c(!0),children:a("header.settings.procedures.masterManager.title")}),t.randomId&&n.jsx(k,{fields:g,minW:"full"}),t.randomId&&t.color!==void 0&&n.jsx(k,{fields:y,minW:"full"}),n.jsx(ze,{isOpen:m,onClose:()=>d(!1),onSubmit:p}),n.jsx(Ae,{isOpen:h,onClose:()=>c(!1)})]})},pt=n.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[n.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"none"}),n.jsx("g",{transform:"translate(7.25, 7) scale(0.8)",children:n.jsx("polygon",{points:"6,1 7.5,4.25 11,4.65 8.5,7.1 9.2,10.75 6,9 2.8,10.75 3.5,7.1 1,4.65 4.5,4.25",fill:"currentColor"})})]}),gt={component:ht,icon:pt,defaultAttrs:ut,attrsComponent:xt,metadata:{displayName:"panel.details.nodes.master.displayName",tags:[]}},wt={[b.Virtual]:Ue,[b.ShmetroNumLineBadge]:Fe,[b.ShmetroTextLineBadge]:Ve,[b.GzmtrLineBadge]:Ze,[b.BjsubwayNumLineBadge]:nn,[b.BjsubwayTextLineBadge]:rn,[b.SuzhouRTNumLineBadge]:un,[b.BerlinSBahnLineBadge]:Nn,[b.BerlinUBahnLineBadge]:yn,[b.ChongqingRTNumLineBadge]:Pn,[b.ChongqingRTTextLineBadge]:Mn,[b.ShenzhenMetroNumLineBadge]:Un,[b.MRTDestinationNumbers]:Wn,[b.MRTLineBadge]:Qn,[b.JREastLineBadge]:Zn,[b.QingdaoMetroNumLineBadge]:et,[b.GuangdongIntercityRailwayLineBadge]:lt,[b.LondonArrow]:rt,[b.Facilities]:ke,[b.Text]:ce,[b.I18nText]:mt,[b.Master]:gt};export{wt as m}; diff --git a/assets/misc-nodes-legacy-ClIinVYX.js b/assets/misc-nodes-legacy-ClIinVYX.js deleted file mode 100644 index 84962f73..00000000 --- a/assets/misc-nodes-legacy-ClIinVYX.js +++ /dev/null @@ -1 +0,0 @@ -System.register(["./index-legacy-CKg3D7KT.js","./chakra-legacy-DsJcG_7N.js","./react-legacy-S3BmMPiz.js","./master-manager-legacy-DmddqoRb.js"],(function(e,n){"use strict";var t,l,a,o,i,r,s,d,c,m,h,u,x,p,f,g,y,j,b,w,v,N,C,P,S,B,_,k,z,L;return{setters:[e=>{t=e.aR,l=e.C,a=e.M,o=e.aS,i=e.av,r=e.i,s=e.aT,d=e.c,c=e.d,m=e.V,h=e.W,u=e.P,x=e.R,p=e.D,f=e.ak},e=>{g=e.j,y=e.g,j=e.a$,b=e.af,w=e.O},e=>{v=e.b,N=e.u},e=>{C=e.L,P=e.g,S=e.h,B=e.t,_=e.j,k=e.k,z=e.M,L=e.n}],execute:function(){const n={component:e=>{const{id:n,x:t,y:l,handlePointerDown:a,handlePointerMove:o,handlePointerUp:i}=e,r=v.useCallback((e=>a(n,e)),[n,a]),s=v.useCallback((e=>o(n,e)),[n,o]),d=v.useCallback((e=>i(n,e)),[n,i]);return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})rotate(45)`,onPointerDown:r,onPointerMove:s,onPointerUp:d,style:{cursor:"move"},className:"removeMe",children:[g.jsx("line",{x1:"-5",y1:"0",x2:"5",y2:"0",stroke:"black"}),g.jsx("line",{x1:"0",y1:"-5",x2:"0",y2:"5",stroke:"black"}),g.jsx("circle",{id:`virtual_circle_${n}`,r:5,stroke:"black",fill:"white",fillOpacity:"0"})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,transform:"rotate(45)",focusable:!1,children:[g.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"none"}),g.jsx("line",{x1:"6",y1:"12",x2:"18",y2:"12",stroke:"currentColor"}),g.jsx("line",{x1:"12",y1:"6",x2:"12",y2:"18",stroke:"currentColor"})]}),defaultAttrs:{},attrsComponent:()=>g.jsx(t,{fields:[]}),metadata:{displayName:"panel.details.nodes.virtual.displayName",tags:[]}},A={num:1,color:[l.Shanghai,"sh1","#E4002B",a.white]},M=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:A).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:A;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.ShmetroNumLineBadge,defaultTheme:A.color})}],$={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{num:s=A.num,color:d=A.color}=null!=a?a:A,[c,m]=s>=10?[22.67,10.75]:[21,10],h=v.useCallback((e=>o(n,e)),[n,o]),u=v.useCallback((e=>i(n,e)),[n,i]),x=v.useCallback((e=>r(n,e)),[n,r]);return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:h,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[g.jsx("rect",{fill:d[2],width:c,height:"22.67"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:m,y:"19",fill:d[3],fontSize:"21.33",letterSpacing:"-1.75",children:s}),g.jsx("text",{className:"rmp-name__zh",x:c+2,y:"12",fontSize:"14.67",children:"号线"}),g.jsxs("text",{className:"rmp-name__en",x:c+4,y:"21.5",fontSize:"8",children:["Line ",s]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"10",height:"16"}),g.jsx("text",{x:"4",y:"18",fill:"white",children:"1"}),g.jsx("text",{x:"14",y:"10",fontSize:"5",children:"号线"}),g.jsx("text",{x:"14",y:"18",fontSize:"4",children:"Line 1"})]}),defaultAttrs:A,attrsComponent:()=>g.jsx(t,{fields:M}),metadata:{displayName:"panel.details.nodes.shmetroNumLineBadge.displayName",tags:[]}},T={names:["浦江线","Pujiang Line"],color:[l.Shanghai,"pjl","#B5B5B6",a.white]},U={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{names:s=T.names,color:d=T.color}=null!=a?a:T,c=v.useRef(null),[m,h]=v.useState({width:12});v.useEffect((()=>h(c.current.getBBox())),[...s,h,c]);const u=v.useCallback((e=>o(n,e)),[n,o]),x=v.useCallback((e=>i(n,e)),[n,i]),p=v.useCallback((e=>r(n,e)),[n,r]);return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:u,onPointerMove:x,onPointerUp:p,style:{cursor:"move"},children:[g.jsx("rect",{fill:d[2],x:"0",width:m.width+7,height:"21"}),g.jsxs("g",{ref:c,children:[g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"hanging",x:(m.width+7)/2,y:"3",fontSize:"10",fill:d[3],letterSpacing:"-0.25",children:s[0]}),g.jsx("text",{className:"rmp-name__en",textAnchor:"middle",dominantBaseline:"hanging",x:(m.width+7)/2,y:"14",fontSize:"5",fill:d[3],letterSpacing:"-0.25",children:s[1]})]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12"}),g.jsx("text",{x:"5",y:"11",fontSize:"5",fill:"white",children:"浦江线"}),g.jsx("text",{x:"3",y:"16",fontSize:"4",fill:"white",children:"Pujiang Line"})]}),defaultAttrs:T,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),s=[{type:"input",label:a("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:e=>{t.names[0]=e,l(n,t)},minW:"full"},{type:"input",label:a("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:e=>{t.names[1]=e,l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:g.jsx(o,{type:i.ShmetroTextLineBadge,defaultTheme:T.color})}];return g.jsx(r,{fields:s})},metadata:{displayName:"panel.details.nodes.shmetroTextLineBadge.displayName",tags:[]}},D={names:["1号线","Line 1"],color:[l.Guangzhou,"gz1","#F3D03E",a.black],tram:!1,span:!0},W={component:e=>{var n,t;const{id:l,x:a,y:o,attrs:i,handlePointerDown:r,handlePointerMove:s,handlePointerUp:d}=e,{names:c=D.names,color:m=D.color,tram:h=D.tram,span:u=D.span}=null!=i?i:D,x=v.useCallback((e=>r(l,e)),[l,r]),p=v.useCallback((e=>s(l,e)),[l,s]),f=v.useCallback((e=>d(l,e)),[l,d]);return g.jsx("g",{id:l,transform:`translate(${a}, ${o})scale(${h?.5:1})`,onPointerDown:x,onPointerMove:p,onPointerUp:f,style:{cursor:"move"},children:g.jsx(C,{zhName:null!==(n=c.at(0))&&void 0!==n?n:"",enName:null!==(t=c.at(1))&&void 0!==t?t:"",zhClassName:"rmp-name__zh",enClassName:"rmp-name__en",foregroundColour:m[3],backgroundColour:m[2],spanDigits:u})})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"5",width:"20",height:"14",rx:"1"}),g.jsx("text",{x:"6",y:"15",textAnchor:"middle",fontSize:"10",fill:"white",children:"1"}),g.jsx("text",{x:"15",y:"12",textAnchor:"middle",fontSize:"6",fill:"white",children:"号线"}),g.jsx("text",{x:"14.5",y:"17",textAnchor:"middle",fontSize:"4",fill:"white",children:"Line 1"})]}),defaultAttrs:D,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),s=[{type:"input",label:a("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:e=>{t.names[0]=e,l(n,t)},minW:"full"},{type:"input",label:a("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:e=>{t.names[1]=e,l(n,t)},minW:"full"},{type:"switch",label:a("panel.details.nodes.gzmtrLineBadge.tram"),oneLine:!0,isChecked:t.tram,onChange:e=>{t.tram=e,l(n,t)},minW:"full"},{type:"switch",label:a("panel.details.nodes.gzmtrLineBadge.span"),oneLine:!0,isChecked:t.span,onChange:e=>{t.span=e,l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:g.jsx(o,{type:i.GzmtrLineBadge,defaultTheme:D.color})}];return g.jsx(r,{fields:s})},metadata:{displayName:"panel.details.nodes.gzmtrLineBadge.displayName",tags:[]}},E=11.84375,R={num:1,color:[l.Beijing,"bj1","#c23a30",a.white]},F=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:R).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:R;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.BjsubwayNumLineBadge,defaultTheme:R.color})}],I={component:e=>{const{id:n,x:t,y:l,attrs:o,handlePointerDown:i,handlePointerMove:r,handlePointerUp:s}=e,{num:d=R.num,color:c=R.color}=null!=o?o:R,m=v.useCallback((e=>i(n,e)),[n,i]),h=v.useCallback((e=>r(n,e)),[n,r]),u=v.useCallback((e=>s(n,e)),[n,s]),x=c[3]===a.black?"#003670":a.white;return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:m,onPointerMove:h,onPointerUp:u,style:{cursor:"move"},children:[g.jsx("rect",{fill:c[2],x:"0",width:32.84375,height:"16",rx:"2"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:7.921875,y:"13.5",fill:x,fontSize:"15",letterSpacing:"-1.5",children:d}),g.jsx("text",{className:"rmp-name__zh",x:E+(d>9?5.5:3),y:"8.5",fontSize:"7",fill:x,children:"号线"}),g.jsxs("text",{className:"rmp-name__en",x:E+(d>9?6:4.5),y:"13.5",fontSize:"4",fill:x,children:["Line ",d]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"2"}),g.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"1"}),g.jsx("text",{x:"11",y:"11",fill:"white",fontSize:"5",children:"号线"}),g.jsx("text",{x:"11",y:"17",fill:"white",fontSize:"4",children:"Line 1"})]}),defaultAttrs:R,attrsComponent:()=>g.jsx(t,{fields:F}),metadata:{displayName:"panel.details.nodes.bjsubwayNumLineBadge.displayName",tags:[]}},q={names:["八通线","Batong Line"],color:[l.Beijing,"bj1","#c23a30",a.white]},O=[{type:"input",label:"panel.details.nodes.common.nameZh",value:e=>(null!=e?e:q).names[0],onChange:(e,n)=>{const t=null!=n?n:q;return t.names[0]=e.toString(),t}},{type:"input",label:"panel.details.nodes.common.nameEn",value:e=>(null!=e?e:q).names[1],onChange:(e,n)=>{const t=null!=n?n:q;return t.names[1]=e.toString(),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.BjsubwayTextLineBadge,defaultTheme:q.color})}],Q={component:e=>{const{id:n,x:t,y:l,attrs:o,handlePointerDown:i,handlePointerMove:r,handlePointerUp:s}=e,{names:d=q.names,color:c=q.color}=null!=o?o:q,m=v.useRef(null),[h,u]=v.useState({width:12});v.useEffect((()=>u(m.current.getBBox())),[...d,u,m]);const x=v.useCallback((e=>i(n,e)),[n,i]),p=v.useCallback((e=>r(n,e)),[n,r]),f=v.useCallback((e=>s(n,e)),[n,s]),y=Math.max(28.84375,h.width),j=c[3]===a.black?"#003670":a.white;return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:x,onPointerMove:p,onPointerUp:f,style:{cursor:"move"},children:[g.jsx("rect",{fill:c[2],x:"0",width:y+4,height:"16",rx:"2"}),g.jsxs("g",{ref:m,children:[g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:(y+4)/2,y:"8",fontSize:"7",fill:j,children:d[0]}),g.jsx("text",{className:"rmp-name__en",textAnchor:"middle",x:(y+4)/2,y:"13.5",fontSize:"4",fill:j,children:d[1]})]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12",rx:"2"}),g.jsx("text",{x:"3",y:"12",fontSize:"6",fill:"white",children:"八通线"}),g.jsx("text",{x:"3",y:"16",fontSize:"3.2",fill:"white",children:"Batong Line"})]}),defaultAttrs:q,attrsComponent:()=>g.jsx(t,{fields:O}),metadata:{displayName:"panel.details.nodes.bjsubwayTextLineBadge.displayName",tags:[]}},V={num:1,branch:!1,color:[l.Suzhou,"sz1","#78BA25",a.white]},G=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:V).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:V;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"switch",label:"panel.details.nodes.suzhouRTNumLineBadge.branch",isChecked:e=>{var n;return null!==(n=null==e?void 0:e.branch)&&void 0!==n?n:V.branch},onChange:(e,n)=>{const t=null!=n?n:V;return t.branch=e,t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.SuzhouRTNumLineBadge,defaultTheme:V.color})}],Z={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{num:s=V.num,branch:d=V.branch,color:c=V.color}=null!=a?a:V,m=v.useCallback((e=>o(n,e)),[n,o]),h=v.useCallback((e=>i(n,e)),[n,i]),u=v.useCallback((e=>r(n,e)),[n,r]);return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:m,onPointerMove:h,onPointerUp:u,style:{cursor:"move"},children:[g.jsx("rect",{fill:c[2],width:"20",height:"20",rx:"2",ry:"2"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"middle",x:"10",y:"11.4",fill:c[3],fontSize:"15",letterSpacing:"-1",children:s}),d&&g.jsxs(g.Fragment,{children:[g.jsx("text",{className:"rmp-name__zh",x:22.5,y:"10",fontSize:"10",children:"支线"}),g.jsx("text",{className:"rmp-name__en",x:22.5,y:"18",fontSize:"5",fill:"gray",children:"Branch line"})]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"4",y:"4",width:"16",height:"16",rx:"3",ry:"3"}),g.jsx("text",{x:"12",y:"13.4",textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:"14",children:"1"})]}),defaultAttrs:V,attrsComponent:()=>g.jsx(t,{fields:G}),metadata:{displayName:"panel.details.nodes.suzhouRTNumLineBadge.displayName",tags:[]}},H={num:1,color:[l.Berlin,"bu1","#62AD2D",a.white]},J=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:H).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:H;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.BerlinUBahnLineBadge,defaultTheme:H.color})}],Y={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{num:s=H.num,color:d=H.color}=null!=a?a:H,c=v.useCallback((e=>o(n,e)),[n,o]),m=v.useCallback((e=>i(n,e)),[n,i]),h=v.useCallback((e=>r(n,e)),[n,r]),u=d[3];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:c,onPointerMove:m,onPointerUp:h,style:{cursor:"move"},children:[g.jsx("rect",{fill:d[2],x:"0",width:"25",height:"15"}),g.jsxs("text",{className:"rmp-name__berlin",textAnchor:"middle",x:"12.5",y:"12.5",fill:u,fontSize:"14",letterSpacing:"1",children:["U",s]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16"}),g.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"U1"})]}),defaultAttrs:H,attrsComponent:()=>g.jsx(t,{fields:J}),metadata:{displayName:"panel.details.nodes.berlinUBahnLineBadge.displayName",tags:[]}},K={num:1,color:[l.Berlin,"bs1","#DD6CA6",a.white]},X=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:K).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:K;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.BerlinSBahnLineBadge,defaultTheme:K.color})}],ee={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{num:s=K.num,color:d=K.color}=null!=a?a:K,[c,m]=s>=10?[6,19.75]:[10,20],h=v.useCallback((e=>o(n,e)),[n,o]),u=v.useCallback((e=>i(n,e)),[n,i]),x=v.useCallback((e=>r(n,e)),[n,r]),p=d[3];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:h,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[g.jsx("rect",{fill:d[2],x:"0",width:"30",height:"15",rx:"8"}),g.jsx("text",{className:"rmp-name__berlin",textAnchor:"middle",x:c,y:"12.5",fill:p,fontSize:"14",letterSpacing:"0",children:"S"}),g.jsx("text",{className:"rmp-name__berlin",textAnchor:"middle",x:m,y:"12.5",fill:p,fontSize:"14",letterSpacing:"-0.2",children:s})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"8"}),g.jsx("text",{x:"4.5",y:"16.5",fill:"white",fontSize:"14",children:"S1"})]}),defaultAttrs:K,attrsComponent:()=>g.jsx(t,{fields:X}),metadata:{displayName:"panel.details.nodes.berlinSBahnLineBadge.displayName",tags:[]}},ne={num:1,color:[l.Chongqing,"cq1","#e4002b",a.white]},te=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:ne).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:ne;return Number.isNaN(Number(e))?t.num=e:t.num=Number(e),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.ChongqingRTNumLineBadge,defaultTheme:ne.color})}],le={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{num:s=ne.num,color:d=ne.color}=null!=a?a:ne,c=v.useCallback((e=>o(n,e)),[n,o]),m=v.useCallback((e=>i(n,e)),[n,i]),h=v.useCallback((e=>r(n,e)),[n,r]),u=d[3],x=Number.isInteger(s)?16:15,[p,f]=Number.isInteger(s)?Number(s)>=10?[-1.2,1.5]:[0,5.5]:[0,2.55];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:c,onPointerMove:m,onPointerUp:h,style:{cursor:"move"},children:[g.jsx("rect",{fill:d[2],x:"0",width:"20",height:"20",rx:"10",ry:"10"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"left",x:f,y:"10",fill:u,fontSize:x,letterSpacing:p,dominantBaseline:"central",children:s})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),g.jsx("text",{x:"8",y:"18",fill:"white",fontSize:"18",children:"1"})]}),defaultAttrs:ne,attrsComponent:()=>g.jsx(t,{fields:te}),metadata:{displayName:"panel.details.nodes.chongqingRTNumLineBadge.displayName",tags:[]}},ae={names:["空港线","Konggang Line"],color:[l.Chongqing,"cq3","#003da5",a.white]},oe=[{type:"input",label:"panel.details.nodes.common.nameZh",value:e=>(null!=e?e:ae).names[0],onChange:(e,n)=>{const t=null!=n?n:ae;return t.names[0]=e.toString(),t}},{type:"textarea",label:"panel.details.nodes.common.nameEn",value:e=>(null!=e?e:ae).names[1],onChange:(e,n)=>{const t=null!=n?n:ae;return t.names[1]=e.toString(),t}},{type:"custom",label:"color",component:g.jsx(o,{type:i.ChongqingRTTextLineBadge,defaultTheme:ae.color})}],ie={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{names:s=ae.names,color:d=ae.color}=null!=a?a:ae,c=v.useRef(null),m=v.useCallback((e=>o(n,e)),[n,o]),h=v.useCallback((e=>i(n,e)),[n,i]),u=v.useCallback((e=>r(n,e)),[n,r]),x=d[3];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:m,onPointerMove:h,onPointerUp:u,style:{cursor:"move"},children:[g.jsx("rect",{fill:d[2],x:"0",width:"20",height:"20",rx:"10",ry:"10"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:"10",y:"10.5",fill:x,fontSize:"6",letterSpacing:"0",children:s[0]}),g.jsx(P,{ref:c,text:s[1].split("\n"),className:"rmp-name__en",textAnchor:"middle",x:"10",y:"9.25",fill:x,fontSize:"2.5",letterSpacing:"0",lineHeight:2.25,grow:"down"})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),g.jsx("text",{x:"4.5",y:"12.5",fill:"white",fontSize:"5",children:"空港线"}),g.jsx("text",{x:"4.5",y:"15",fill:"white",fontSize:"2",children:"Konggang Line"})]}),defaultAttrs:ae,attrsComponent:()=>g.jsx(t,{fields:oe}),metadata:{displayName:"panel.details.nodes.chongqingRTTextLineBadge.displayName",tags:[]}},re=11.84375,se={num:1,color:[l.Shenzhen,"sz1","#00b140",a.white],isBranch:!1},de={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{num:s=se.num,color:d=se.color,isBranch:c=se.isBranch}=null!=a?a:se,m=v.useCallback((e=>o(n,e)),[n,o]),h=v.useCallback((e=>i(n,e)),[n,i]),u=v.useCallback((e=>r(n,e)),[n,r]),x=d[3],p=c?10:re+(s>9?6.5:3),f=c?-1:0,y=c?11:re+(s>9?7:3.5),j=c?6:9.921875;return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:m,onPointerMove:h,onPointerUp:u,style:{cursor:"move"},children:[g.jsx("rect",{fill:d[2],x:"0",width:32.84375,height:"16",rx:"2"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:j,y:"13.5",fill:x,fontSize:"15",letterSpacing:"-1",children:s}),g.jsxs("text",{className:"rmp-name__zh",x:p,y:"9.5",fontSize:"6",fill:x,letterSpacing:f,children:["号线",c?"支线":""]}),g.jsxs("text",{className:"rmp-name__en",x:y,y:"13.5",fontSize:"3",fill:x,children:[c?"Branch":""," Line ",s]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"2"}),g.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"1"}),g.jsx("text",{x:"11",y:"14",fill:"white",fontSize:"5",children:"号线"}),g.jsx("text",{x:"12",y:"17",fill:"white",fontSize:"3",children:"Line 1"})]}),defaultAttrs:se,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),s=[{type:"input",label:a("panel.details.nodes.common.num"),value:String(t.num),validator:e=>!Number.isNaN(e),onChange:e=>{t.num=Number(e),l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:g.jsx(o,{type:i.ShenzhenMetroNumLineBadge,defaultTheme:se.color}),minW:"full"},{type:"switch",label:a("panel.details.nodes.shenzhenMetroNumLineBadge.branch"),oneLine:!0,isChecked:t.isBranch,onChange:e=>{t.isBranch=e,l(n,t)},minW:"full"}];return g.jsx(r,{fields:s})},metadata:{displayName:"panel.details.nodes.shenzhenMetroNumLineBadge.displayName",tags:[]}},ce={num:1,color:[l.Singapore,"ewl","#009739",a.white]},me={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{num:s=ce.num,color:d=ce.color}=null!=a?a:ce,c=v.useCallback((e=>o(n,e)),[n,o]),m=v.useCallback((e=>i(n,e)),[n,i]),h=v.useCallback((e=>r(n,e)),[n,r]),u=d[3],x=d[2];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:c,onPointerMove:m,onPointerUp:h,style:{cursor:"move"},children:[g.jsx("circle",{r:"8",fill:x}),g.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",x:"0",y:"0",width:"12",height:"12",fill:u,fontSize:"12",dominantBaseline:"central",letterSpacing:"-0.2",children:s})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),g.jsx("text",{x:"9",y:"17",fill:"white",fontSize:"14",children:"1"})]}),defaultAttrs:ce,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),s=[{type:"input",label:a("panel.details.nodes.common.num"),value:String(t.num),validator:e=>!Number.isNaN(e),onChange:e=>{t.num=Number(e),l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:g.jsx(o,{type:i.MRTDestinationNumbers,defaultTheme:ce.color}),minW:"full"}];return g.jsx(r,{fields:s})},metadata:{displayName:"panel.details.nodes.mrtDestinationNumbers.displayName",tags:[]}},he={lineCode:"EWL",name:"East-West Line",lines:"1, 2, 3, airport",isTram:!1,color:[l.Singapore,"ewl","#009739",a.white]},ue={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{lineCode:s=he.lineCode,color:d=he.color,lines:c=he.lines,name:m=he.name,isTram:h=he.isTram}=null!=a?a:he,u=v.useCallback((e=>o(n,e)),[n,o]),x=v.useCallback((e=>i(n,e)),[n,i]),p=v.useCallback((e=>r(n,e)),[n,r]),f=d[3],y=d[2];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:u,onPointerMove:x,onPointerUp:p,style:{cursor:"move"},children:[g.jsx("rect",{transform:"scale(1.8)",x:-11.425,y:-6.4675,rx:"3",ry:"6",width:22.85,height:12.935,fill:y,stroke:"white",strokeWidth:"1"}),g.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",fill:f,fontSize:"15",dominantBaseline:"central",letterSpacing:"-0.2",children:s}),g.jsx("text",{className:"rmp-name__mrt",textAnchor:"left",x:"28",y:h?3.5:-3,fill:"black",fontSize:"10",letterSpacing:"-0.2",children:m}),!h&&c.split(",").map(((e,n)=>g.jsx("g",{transform:`translate(${34+14*n}, 4.5)`,children:"airport"!==e.trim()?g.jsxs(g.Fragment,{children:[g.jsx("circle",{r:"6",fill:y}),g.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",fill:f,fontSize:"9",dominantBaseline:"central",letterSpacing:"-0.2",children:e})]}):g.jsxs("g",{transform:"translate(-6, -6) scale(4.5)",children:[g.jsx("path",{d:"M2.467 0H.226A.226.226 0 0 0 0 .226v2.241a.225.225 0 0 0 .226.225h2.241a.225.225 0 0 0 .225-.225V.226A.226.226 0 0 0 2.467 0",style:{fill:"#2d2a26"}}),g.jsx("path",{d:"M1.5.746v.3l.73.642a.08.08 0 0 1 .022.05v.12c0 .017-.012.025-.027.018L1.5 1.529l-.06.541.2.113a.03.03 0 0 1 .013.023V2.3a.01.01 0 0 1-.014.011l-.293-.091-.286.087a.01.01 0 0 1-.014-.007v-.09a.03.03 0 0 1 .013-.023l.2-.113-.059-.545-.724.348a.018.018 0 0 1-.028-.018v-.12a.07.07 0 0 1 .023-.05l.73-.642v-.3c0-.482.3-.482.3 0",style:{fill:"#fff",fillRule:"evenodd"}})]})},n)))]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),g.jsx("text",{x:"9",y:"17",fill:"white",fontSize:"14",children:"1"})]}),defaultAttrs:he,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),s=[{type:"input",label:a("panel.details.nodes.common.nameEn"),value:t.name,onChange:e=>{t.name=e,l(n,t)},minW:"full"},{type:"input",label:a("panel.details.stations.common.lineCode"),value:t.lineCode,onChange:e=>{t.lineCode=e,l(n,t)},minW:"full"},{type:"switch",label:a("panel.details.nodes.mrtLineBadge.isTram"),isChecked:t.isTram,onChange:e=>{t.isTram=e,l(n,t)},minW:"full",oneLine:!0},...t.isTram?[]:[{type:"input",label:a("panel.details.nodes.common.num"),value:t.lines,onChange:e=>{t.lines=e,l(n,t)},minW:"full"}],{type:"custom",label:a("color"),component:g.jsx(o,{type:i.MRTLineBadge,defaultTheme:he.color}),minW:"full"}];return g.jsx(r,{fields:s})},metadata:{displayName:"panel.details.nodes.mrtLineBadge.displayName",tags:[]}},xe=5*Math.SQRT1_2,pe=.25,fe=(xe*Math.SQRT2-pe)/2*Math.SQRT2,ge={names:["山手線","Yamanote Line"],color:[l.Tokyo,"jy","#9ACD32",a.black],num:9,crosshatchPatternFill:!1},ye={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{names:s=ge.names,num:d=ge.num,color:c=ge.color,crosshatchPatternFill:m=ge.crosshatchPatternFill}=null!=a?a:ge,h=v.useRef(null),[u,x]=v.useState({height:10,width:12});v.useEffect((()=>x(h.current.getBBox())),[...s,x,h]);const p=v.useCallback((e=>o(n,e)),[n,o]),f=v.useCallback((e=>i(n,e)),[n,i]),y=v.useCallback((e=>r(n,e)),[n,r]);return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:p,onPointerMove:f,onPointerUp:y,style:{cursor:"move"},children:[g.jsxs("defs",{children:[g.jsxs("clipPath",{id:"jr_east_fill_pattern_clip_path",patternUnits:"userSpaceOnUse",children:[g.jsx("polygon",{points:`0,0 0,${fe} ${fe},0`}),g.jsx("polygon",{points:`${xe},${xe} ${xe-fe},${xe} ${xe},${xe-fe}`})]}),g.jsxs("pattern",{id:`jr_east_${n}_fill_pattern_${c[2]}`,width:xe,height:xe,patternUnits:"userSpaceOnUse",children:[g.jsx("rect",{width:xe,height:xe,fill:c[2]}),g.jsx("line",{x1:"0",y1:"0",x2:xe,y2:xe,stroke:"white",strokeWidth:pe,strokeOpacity:"33%",clipPath:"url(#jr_east_fill_pattern_clip_path)"}),g.jsx("line",{x1:xe,y1:"0",x2:"0",y2:xe,stroke:"white",strokeWidth:pe,strokeOpacity:"33%"})]})]}),g.jsx("rect",{fill:m?`url(#jr_east_${n}_fill_pattern_${c[2]})`:c[2],x:"0",y:"-1",width:u.width+4+10,height:u.height+1,rx:"1",stroke:"black",strokeWidth:"0.25"}),g.jsx("circle",{r:4,cx:7,cy:6,stroke:"black",strokeWidth:"0.25",fill:c[3]}),g.jsx("text",{x:7,y:6.75,textAnchor:"middle",dominantBaseline:"middle",fill:"#000"===c[3]?"white":c[2],fontSize:d>9?7:8,className:"rmp-name__jreast_en",children:d}),g.jsx(P,{ref:h,text:s[0].split("\n"),x:12,y:"-1",fill:c[3],fontSize:10,lineHeight:10,grow:"down",className:"rmp-name__jreast_ja"}),g.jsx(P,{text:s[1].split("\n"),textAnchor:"middle",dominantBaseline:"hanging",x:(u.width+4+10)/2,y:u.height+1,fontSize:5,lineHeight:5,baseOffset:0,grow:"down",className:"rmp-name__jreast_en"})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"1",y:"6",width:"22",height:"7"}),g.jsx("circle",{cx:"3.5",cy:"9.25",r:"2",fill:"white"}),g.jsx("text",{x:"3",y:"10.5",fontSize:"3",children:"9"}),g.jsx("text",{x:"6",y:"11.25",fontSize:"5",fill:"white",children:"山手線"}),g.jsx("text",{x:"1.5",y:"16",fontSize:"3",children:"Yamanote Line"})]}),defaultAttrs:ge,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),s=[{type:"input",label:a("panel.details.nodes.common.num"),value:String(t.num),validator:e=>!Number.isNaN(e),onChange:e=>{t.num=Number(e),l(n,t)},minW:"full"},{type:"textarea",label:a("panel.details.nodes.common.nameJa"),value:t.names[0],onChange:e=>{t.names[0]=e,l(n,t)},minW:"full"},{type:"textarea",label:a("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:e=>{t.names[1]=e,l(n,t)},minW:"full"},{type:"switch",label:a("panel.details.nodes.jrEastLineBadge.crosshatchPatternFill"),oneLine:!0,isChecked:t.crosshatchPatternFill,onChange:e=>{t.crosshatchPatternFill=e,l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:g.jsx(o,{type:i.JREastLineBadge,defaultTheme:ge.color})}];return g.jsx(r,{fields:s})},metadata:{displayName:"panel.details.nodes.jrEastLineBadge.displayName",tags:[]}},je={num:1,numEn:"1",showText:!0,color:[l.Qingdao,"qd1","#f7b000",a.white]},be={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{num:s=je.num,numEn:d=je.numEn,color:c=je.color,showText:m=je.showText}=null!=a?a:je,h=v.useCallback((e=>o(n,e)),[n,o]),u=v.useCallback((e=>i(n,e)),[n,i]),x=v.useCallback((e=>r(n,e)),[n,r]),p=c[3],[f,y,j,b]=Number(s)>=10?[-2.4,0,10.25,20]:[0,4,10,22];return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:h,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[g.jsx("rect",{fill:c[2],x:"0",width:"20",height:"20",rx:"2",ry:"2"}),g.jsx("text",{className:"rmp-name__zh",textAnchor:"left",x:y,y:j,fill:p,fontSize:b,fontWeight:"bold",letterSpacing:f,dominantBaseline:"central",children:s}),m&&g.jsxs(g.Fragment,{children:[g.jsx("text",{className:"rmp-name__zh",x:"22",y:"10.5",fontSize:"13",children:"号线"}),g.jsxs("text",{className:"rmp-name__en",x:"22.5",y:"19.5",fontSize:"8",children:["Line ",d]})]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"6",rx:"1",ry:"1",width:"10",height:"10"}),g.jsx("text",{x:"4",y:"15",fill:"white",fontSize:"12",children:"1"}),g.jsx("text",{x:"12",y:"11.5",fill:"black",fontSize:"6",children:"号线"}),g.jsx("text",{x:"12",y:"15.5",fill:"black",fontSize:"4",children:"Line1"})]}),defaultAttrs:je,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),s=[{type:"input",label:a("panel.details.nodes.common.num"),value:t.num.toString(),onChange:e=>{t.num=Number(e),t.numEn=e,l(n,t)}},{type:"input",label:a("panel.details.nodes.qingdaoMetroNumLineBadge.numEn"),value:t.numEn.toString(),onChange:e=>{t.numEn=e,l(n,t)}},{type:"switch",label:a("panel.details.nodes.qingdaoMetroNumLineBadge.showText"),isChecked:t.showText,oneLine:!0,onChange:e=>{t.showText=e,l(n,t)}},{type:"custom",label:a("color"),component:g.jsx(o,{type:i.QingdaoMetroNumLineBadge,defaultTheme:je.color})}];return g.jsx(r,{fields:s,minW:"full"})},metadata:{displayName:"panel.details.nodes.qingdaoMetroNumLineBadge.displayName",tags:[]}},we={names:["广清城际","Guangzhou-Qingyuan Intercity"],color:[l.Guangzhou,"ir","#2559a8",a.white]},ve={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{names:s=we.names,color:d=we.color}=null!=a?a:we,c=v.useRef(null),[m,h]=v.useState({width:12});v.useEffect((()=>h(c.current.getBBox())),[...s,h,c]);const u=v.useCallback((e=>o(n,e)),[n,o]),x=v.useCallback((e=>i(n,e)),[n,i]),p=v.useCallback((e=>r(n,e)),[n,r]);return g.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:u,onPointerMove:x,onPointerUp:p,style:{cursor:"move"},children:[g.jsx("rect",{rx:"2",ry:"2",fill:d[2],x:"0",width:m.width+7,height:"21"}),g.jsxs("g",{ref:c,children:[g.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"hanging",x:(m.width+7)/2,y:"3",fontSize:"8.63",fill:d[3],children:s[0]}),g.jsx("text",{className:"rmp-name__en",textAnchor:"middle",dominantBaseline:"hanging",x:(m.width+7)/2,y:"14",fontSize:"3.54",fill:d[3],children:s[1]})]})]})},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12"}),g.jsx("text",{x:"4.5",y:"11",fontSize:"4",fill:"white",children:"广清城际"}),g.jsx("text",{x:"3",y:"16",fontSize:"2",fill:"white",children:"Guangzhou-Qingyuan Intercity"})]}),defaultAttrs:we,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),o=[{type:"input",label:a("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:e=>{t.names[0]=e,l(n,t)},minW:"full"},{type:"input",label:a("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:e=>{t.names[1]=e,l(n,t)},minW:"full"}];return g.jsx(r,{fields:o})},metadata:{displayName:"panel.details.nodes.guangdongIntercityRailwayLineBadge.displayName",tags:[]}},Ne=`M0,0 L-10,-10 L${5*Math.SQRT2-10},-10 L${5*Math.SQRT2},0 L${5*Math.SQRT2-10},10 L-10,10 Z`,Ce={color:[l.London,"thameslink","#d28db0",a.white],rotate:0,type:"continuation"},Pe={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{color:s=Ce.color,rotate:d=Ce.rotate,type:c=Ce.type}=null!=a?a:Ce,m=v.useCallback((e=>o(n,e)),[n,o]),h=v.useCallback((e=>i(n,e)),[n,i]),u=v.useCallback((e=>r(n,e)),[n,r]);return g.jsx("g",{id:n,transform:`translate(${t}, ${l})rotate(${d})`,onPointerDown:m,onPointerMove:h,onPointerUp:u,style:{cursor:"move"},children:"continuation"===c?g.jsx("path",{id:`virtual_circle_${n}`,fill:s[2],d:Ne}):"sandwich"===c?g.jsx("path",{transform:"scale(0.5)",id:`virtual_circle_${n}`,stroke:"white",strokeWidth:"1",fill:s[2],d:Ne}):g.jsx("path",{transform:"scale(0.25)",id:`virtual_circle_${n}`,fill:"white",d:Ne})})},icon:g.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:g.jsx("path",{transform:"translate(14,12)scale(0.75)",fill:"currentColor",d:Ne})}),defaultAttrs:Ce,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=N(),s=[{type:"select",label:a("panel.details.stations.common.rotate"),value:t.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{t.rotate=Number(e),l(n,t)},minW:"full"},{type:"select",label:a("panel.details.nodes.londonArrow.type"),value:t.type,options:{continuation:a("panel.details.nodes.londonArrow.continuation"),sandwich:a("panel.details.nodes.londonArrow.sandwich"),tube:a("panel.details.nodes.londonArrow.tube")},onChange:e=>{t.type=e,l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:g.jsx(o,{type:i.LondonArrow,defaultTheme:Ce.color}),minW:"full"}];return g.jsx(r,{fields:s})},metadata:{displayName:"panel.details.nodes.londonArrow.displayName",tags:[]}},Se={contents:{},...S},Be={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,s=_();a.content=s(a.contents);const d=B.component;return g.jsx(d,{id:n,x:t,y:l,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r,attrs:a})},icon:B.icon,defaultAttrs:Se,attrsComponent:B.attrsComponent,metadata:{displayName:"panel.details.nodes.i18nText.displayName",tags:[]}},_e={randomId:void 0,label:void 0,transform:s,nodeType:"MiscNode",svgs:[],components:[]},ke={component:e=>{var n;const{id:t,x:l,y:a,attrs:o,handlePointerDown:i,handlePointerMove:r,handlePointerUp:d}=e,c=v.useCallback((e=>i(t,e)),[t,i]),m=v.useCallback((e=>r(t,e)),[t,r]),h=v.useCallback((e=>d(t,e)),[t,d]),u=(e,...n)=>new Function(...n,`return ${e}`),x="MiscNode"===o.nodeType?{onPointerDown:c,onPointerMove:m,onPointerUp:h,style:{cursor:"move"}}:{},p=e=>e.map((e=>{var n,l;const a="Station"===o.nodeType&&o.core&&o.core===e.id?{id:`stn_core_${t}`,onPointerDown:c,onPointerMove:m,onPointerUp:h,style:{cursor:"move"}}:{},i=((e,n,t)=>{const l={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r))try{var a;l[r]=u(e[r].slice(1),...o.components.map((e=>e.label)),"color")(...n.map(((e,n)=>"number"!==t[n]||Number.isNaN(Number(e))?e:Number(e))),o.color?null!==(a=o.color.value)&&void 0!==a?a:o.color.defaultValue:"")}catch(i){l[r]=""}return l})(e.attrs,o.components.map((e=>e.value)),o.components.map((e=>e.type)));return g.jsx("g",{transform:`translate(${null!==(n=i.x)&&void 0!==n?n:0}, ${null!==(l=i.y)&&void 0!==l?l:0})`,children:v.createElement(e.type,{...i,x:0,y:0,...a},e.children?p(e.children):"_rmp_children_text"in i?"style"===e.type?(r=i._rmp_children_text,r.replace(/(^|,)\s*([^{},]+)/g,`$1 #${t} $2`)):i._rmp_children_text:null)},e.id);var r})),f=null!==(n=o.transform)&&void 0!==n?n:s,y=v.useMemo((()=>p(o.svgs)),[o]);return v.createElement("g",{id:t,transform:`translate(${l}, ${a})`,...x},o.randomId?g.jsx("g",{transform:`translate(${f.translateX}, ${f.translateY}) scale(${f.scale}) rotate(${f.rotate})`,children:y}):g.jsxs("g",{children:[g.jsx("circle",{r:"5.5"}),g.jsx("g",{transform:"translate(-4.7, -5) scale(0.8)",children:g.jsx("polygon",{points:"6,1 7.5,4.25 11,4.65 8.5,7.1 9.2,10.75 6,9 2.8,10.75 3.5,7.1 1,4.65 4.5,4.25",fill:"white"})})]}))},icon:g.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[g.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"none"}),g.jsx("g",{transform:"translate(7.25, 7) scale(0.8)",children:g.jsx("polygon",{points:"6,1 7.5,4.25 11,4.65 8.5,7.1 9.2,10.75 6,9 2.8,10.75 3.5,7.1 1,4.65 4.5,4.25",fill:"currentColor"})})]}),defaultAttrs:_e,attrsComponent:e=>{var n,t,l,o,i;const{id:s,attrs:C,handleAttrsUpdate:P}=e,S=d(),{paletteAppClip:{output:B}}=c((e=>e.runtime)),{t:_}=N(),[L,A]=v.useState(!1),[M,$]=v.useState(!1),T=C.components.map(((e,n)=>{const{label:t,type:l,defaultValue:a,value:o}=e;return"number"===l||"text"===l?{label:_(t),type:"input",value:null!=o?o:a,onChange:e=>{C.components[n].value=e,P(s,{...C,components:C.components})}}:"switch"===l?{label:_(t),type:"switch",isChecked:void 0!==o?!!o:a,onChange:e=>{C.components[n].value=e,P(s,{...C,components:C.components})}}:"textarea"===l?{label:_(t),type:"textarea",value:null!=o?o:a,onChange:e=>{C.components[n].value=e,P(s,{...C,components:C.components})}}:{type:"input",label:"undefined",value:"none"}})),[U,D]=v.useState(!1);v.useEffect((()=>{C.color&&U&&B&&(C.color.value=B,P(s,{...C,color:C.color}),D(!1))}),[null==B?void 0:B.toString()]);const W=[{type:"custom",label:_("color"),component:g.jsx(m,{theme:null===(n=C.color)||void 0===n?void 0:n.value,onClick:()=>{var e;D(!0),S(h(null===(e=C.color)||void 0===e?void 0:e.value))}})}];return g.jsxs(g.Fragment,{children:[g.jsxs(y,{direction:"row",mr:"auto",width:"100%",children:[g.jsx(u,{width:"100%",overflow:"hidden",label:_("panel.details.nodes.master.type"),children:g.jsxs(y,{width:"100%",overflow:"hidden",children:[g.jsx(x,{name:null!==(t=C.label)&&void 0!==t?t:_("panel.details.nodes.master.undefined"),fg:null!==(l=C.labelColorFg)&&void 0!==l?l:a.white,bg:null!==(o=C.labelColorBg)&&void 0!==o?o:"#000000",sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"},mr:1}),g.jsx(x,{name:null!==(i=C.randomId)&&void 0!==i?i:"UNDEFINED",fg:a.white,bg:C.randomId?"#19B3EA":"#000000",sx:{display:"inline-block"},mr:1})]})}),g.jsx(j,{}),g.jsx(b,{icon:g.jsx(p,{}),onClick:()=>A(!0),"aria-label":"upload"})]}),g.jsx(w,{width:"100%",leftIcon:g.jsx(f,{}),onClick:()=>$(!0),children:_("header.settings.procedures.masterManager.title")}),C.randomId&&g.jsx(r,{fields:T,minW:"full"}),C.randomId&&void 0!==C.color&&g.jsx(r,{fields:W,minW:"full"}),g.jsx(k,{isOpen:L,onClose:()=>A(!1),onSubmit:e=>{e.components.forEach(((n,t)=>{var l;e.components[t].value=null!==(l=(e=>{var n;const t=C.components.find((n=>n.id===e));return t?null!==(n=t.value)&&void 0!==n?n:t.defaultValue:void 0})(n.id))&&void 0!==l?l:n.defaultValue})),void 0!==e.color&&(e.color.value=C.color?C.color.value:e.color.defaultValue),P(s,e)}}),g.jsx(z,{isOpen:M,onClose:()=>$(!1)})]})},metadata:{displayName:"panel.details.nodes.master.displayName",tags:[]}};e("m",{[i.Virtual]:n,[i.ShmetroNumLineBadge]:$,[i.ShmetroTextLineBadge]:U,[i.GzmtrLineBadge]:W,[i.BjsubwayNumLineBadge]:I,[i.BjsubwayTextLineBadge]:Q,[i.SuzhouRTNumLineBadge]:Z,[i.BerlinSBahnLineBadge]:ee,[i.BerlinUBahnLineBadge]:Y,[i.ChongqingRTNumLineBadge]:le,[i.ChongqingRTTextLineBadge]:ie,[i.ShenzhenMetroNumLineBadge]:de,[i.MRTDestinationNumbers]:me,[i.MRTLineBadge]:ue,[i.JREastLineBadge]:ye,[i.QingdaoMetroNumLineBadge]:be,[i.GuangdongIntercityRailwayLineBadge]:ve,[i.LondonArrow]:Pe,[i.Facilities]:L,[i.Text]:B,[i.I18nText]:Be,[i.Master]:ke})}}})); diff --git a/assets/misc-nodes-legacy-DROXA9Yl.js b/assets/misc-nodes-legacy-DROXA9Yl.js new file mode 100644 index 00000000..3919511d --- /dev/null +++ b/assets/misc-nodes-legacy-DROXA9Yl.js @@ -0,0 +1 @@ +!function(){function e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,l)}return t}function n(n){for(var l=1;l{l=e.aR,a=e.C,o=e.M,i=e.aS,r=e.aB,s=e.i,c=e.aT,d=e.c,m=e.d,h=e.V,u=e.W,x=e.P,p=e.R,f=e.D,g=e.ak},e=>{y=e.j,j=e.h,b=e.aM,w=e.a2,v=e.t},e=>{N=e.b,C=e.u},e=>{P=e.L,S=e.g,B=e.t,_=e.h,k=e.j,z=e.k,L=e.M,M=e.n}],execute:function(){const t={component:e=>{const{id:n,x:t,y:l,handlePointerDown:a,handlePointerMove:o,handlePointerUp:i}=e,r=N.useCallback((e=>a(n,e)),[n,a]),s=N.useCallback((e=>o(n,e)),[n,o]),c=N.useCallback((e=>i(n,e)),[n,i]);return y.jsxs("g",{id:n,transform:`translate(${t}, ${l})rotate(45)`,onPointerDown:r,onPointerMove:s,onPointerUp:c,style:{cursor:"move"},className:"removeMe",children:[y.jsx("line",{x1:"-5",y1:"0",x2:"5",y2:"0",stroke:"black"}),y.jsx("line",{x1:"0",y1:"-5",x2:"0",y2:"5",stroke:"black"}),y.jsx("circle",{id:`virtual_circle_${n}`,r:5,stroke:"black",fill:"white",fillOpacity:"0"})]})},icon:y.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,transform:"rotate(45)",focusable:!1,children:[y.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"none"}),y.jsx("line",{x1:"6",y1:"12",x2:"18",y2:"12",stroke:"currentColor"}),y.jsx("line",{x1:"12",y1:"6",x2:"12",y2:"18",stroke:"currentColor"})]}),defaultAttrs:{},attrsComponent:()=>y.jsx(l,{fields:[]}),metadata:{displayName:"panel.details.nodes.virtual.displayName",tags:[]}},A={num:1,color:[a.Shanghai,"sh1","#E4002B",o.white]},$=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:A).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:A;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"custom",label:"color",component:y.jsx(i,{type:r.ShmetroNumLineBadge,defaultTheme:A.color})}],T={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{num:s=A.num,color:c=A.color}=null!=a?a:A,[d,m]=s>=10?[22.67,10.75]:[21,10],h=N.useCallback((e=>o(n,e)),[n,o]),u=N.useCallback((e=>i(n,e)),[n,i]),x=N.useCallback((e=>r(n,e)),[n,r]);return y.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:h,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[y.jsx("rect",{fill:c[2],width:d,height:"22.67"}),y.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:m,y:"19",fill:c[3],fontSize:"21.33",letterSpacing:"-1.75",children:s}),y.jsx("text",{className:"rmp-name__zh",x:d+2,y:"12",fontSize:"14.67",children:"号线"}),y.jsxs("text",{className:"rmp-name__en",x:d+4,y:"21.5",fontSize:"8",children:["Line ",s]})]})},icon:y.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[y.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"10",height:"16"}),y.jsx("text",{x:"4",y:"18",fill:"white",children:"1"}),y.jsx("text",{x:"14",y:"10",fontSize:"5",children:"号线"}),y.jsx("text",{x:"14",y:"18",fontSize:"4",children:"Line 1"})]}),defaultAttrs:A,attrsComponent:()=>y.jsx(l,{fields:$}),metadata:{displayName:"panel.details.nodes.shmetroNumLineBadge.displayName",tags:[]}},U={names:["浦江线","Pujiang Line"],color:[a.Shanghai,"pjl","#B5B5B6",o.white]},D={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{names:s=U.names,color:c=U.color}=null!=a?a:U,d=N.useRef(null),[m,h]=N.useState({width:12});N.useEffect((()=>h(d.current.getBBox())),[...s,h,d]);const u=N.useCallback((e=>o(n,e)),[n,o]),x=N.useCallback((e=>i(n,e)),[n,i]),p=N.useCallback((e=>r(n,e)),[n,r]);return y.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:u,onPointerMove:x,onPointerUp:p,style:{cursor:"move"},children:[y.jsx("rect",{fill:c[2],x:"0",width:m.width+7,height:"21"}),y.jsxs("g",{ref:d,children:[y.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"hanging",x:(m.width+7)/2,y:"3",fontSize:"10",fill:c[3],letterSpacing:"-0.25",children:s[0]}),y.jsx("text",{className:"rmp-name__en",textAnchor:"middle",dominantBaseline:"hanging",x:(m.width+7)/2,y:"14",fontSize:"5",fill:c[3],letterSpacing:"-0.25",children:s[1]})]})]})},icon:y.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[y.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12"}),y.jsx("text",{x:"5",y:"11",fontSize:"5",fill:"white",children:"浦江线"}),y.jsx("text",{x:"3",y:"16",fontSize:"4",fill:"white",children:"Pujiang Line"})]}),defaultAttrs:U,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=C(),o=[{type:"input",label:a("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:e=>{t.names[0]=e,l(n,t)},minW:"full"},{type:"input",label:a("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:e=>{t.names[1]=e,l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:y.jsx(i,{type:r.ShmetroTextLineBadge,defaultTheme:U.color})}];return y.jsx(s,{fields:o})},metadata:{displayName:"panel.details.nodes.shmetroTextLineBadge.displayName",tags:[]}},W={names:["1号线","Line 1"],color:[a.Guangzhou,"gz1","#F3D03E",o.black],tram:!1,span:!0},E={component:e=>{var n,t;const{id:l,x:a,y:o,attrs:i,handlePointerDown:r,handlePointerMove:s,handlePointerUp:c}=e,{names:d=W.names,color:m=W.color,tram:h=W.tram,span:u=W.span}=null!=i?i:W,x=N.useCallback((e=>r(l,e)),[l,r]),p=N.useCallback((e=>s(l,e)),[l,s]),f=N.useCallback((e=>c(l,e)),[l,c]);return y.jsx("g",{id:l,transform:`translate(${a}, ${o})scale(${h?.5:1})`,onPointerDown:x,onPointerMove:p,onPointerUp:f,style:{cursor:"move"},children:y.jsx(P,{zhName:null!==(n=d.at(0))&&void 0!==n?n:"",enName:null!==(t=d.at(1))&&void 0!==t?t:"",zhClassName:"rmp-name__zh",enClassName:"rmp-name__en",foregroundColour:m[3],backgroundColour:m[2],spanDigits:u})})},icon:y.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[y.jsx("rect",{fill:"currentColor",x:"2",y:"5",width:"20",height:"14",rx:"1"}),y.jsx("text",{x:"6",y:"15",textAnchor:"middle",fontSize:"10",fill:"white",children:"1"}),y.jsx("text",{x:"15",y:"12",textAnchor:"middle",fontSize:"6",fill:"white",children:"号线"}),y.jsx("text",{x:"14.5",y:"17",textAnchor:"middle",fontSize:"4",fill:"white",children:"Line 1"})]}),defaultAttrs:W,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=C(),o=[{type:"input",label:a("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:e=>{t.names[0]=e,l(n,t)},minW:"full"},{type:"input",label:a("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:e=>{t.names[1]=e,l(n,t)},minW:"full"},{type:"switch",label:a("panel.details.nodes.gzmtrLineBadge.tram"),oneLine:!0,isChecked:t.tram,onChange:e=>{t.tram=e,l(n,t)},minW:"full"},{type:"switch",label:a("panel.details.nodes.gzmtrLineBadge.span"),oneLine:!0,isChecked:t.span,onChange:e=>{t.span=e,l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:y.jsx(i,{type:r.GzmtrLineBadge,defaultTheme:W.color})}];return y.jsx(s,{fields:o})},metadata:{displayName:"panel.details.nodes.gzmtrLineBadge.displayName",tags:[]}},R=11.84375,O={num:1,color:[a.Beijing,"bj1","#c23a30",o.white]},F=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:O).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:O;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"custom",label:"color",component:y.jsx(i,{type:r.BjsubwayNumLineBadge,defaultTheme:O.color})}],I={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:i,handlePointerMove:r,handlePointerUp:s}=e,{num:c=O.num,color:d=O.color}=null!=a?a:O,m=N.useCallback((e=>i(n,e)),[n,i]),h=N.useCallback((e=>r(n,e)),[n,r]),u=N.useCallback((e=>s(n,e)),[n,s]),x=d[3]===o.black?"#003670":o.white;return y.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:m,onPointerMove:h,onPointerUp:u,style:{cursor:"move"},children:[y.jsx("rect",{fill:d[2],x:"0",width:32.84375,height:"16",rx:"2"}),y.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:7.921875,y:"13.5",fill:x,fontSize:"15",letterSpacing:"-1.5",children:c}),y.jsx("text",{className:"rmp-name__zh",x:R+(c>9?5.5:3),y:"8.5",fontSize:"7",fill:x,children:"号线"}),y.jsxs("text",{className:"rmp-name__en",x:R+(c>9?6:4.5),y:"13.5",fontSize:"4",fill:x,children:["Line ",c]})]})},icon:y.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[y.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"2"}),y.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"1"}),y.jsx("text",{x:"11",y:"11",fill:"white",fontSize:"5",children:"号线"}),y.jsx("text",{x:"11",y:"17",fill:"white",fontSize:"4",children:"Line 1"})]}),defaultAttrs:O,attrsComponent:()=>y.jsx(l,{fields:F}),metadata:{displayName:"panel.details.nodes.bjsubwayNumLineBadge.displayName",tags:[]}},q={names:["八通线","Batong Line"],color:[a.Beijing,"bj1","#c23a30",o.white]},Q=[{type:"input",label:"panel.details.nodes.common.nameZh",value:e=>(null!=e?e:q).names[0],onChange:(e,n)=>{const t=null!=n?n:q;return t.names[0]=e.toString(),t}},{type:"input",label:"panel.details.nodes.common.nameEn",value:e=>(null!=e?e:q).names[1],onChange:(e,n)=>{const t=null!=n?n:q;return t.names[1]=e.toString(),t}},{type:"custom",label:"color",component:y.jsx(i,{type:r.BjsubwayTextLineBadge,defaultTheme:q.color})}],V={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:i,handlePointerMove:r,handlePointerUp:s}=e,{names:c=q.names,color:d=q.color}=null!=a?a:q,m=N.useRef(null),[h,u]=N.useState({width:12});N.useEffect((()=>u(m.current.getBBox())),[...c,u,m]);const x=N.useCallback((e=>i(n,e)),[n,i]),p=N.useCallback((e=>r(n,e)),[n,r]),f=N.useCallback((e=>s(n,e)),[n,s]),g=Math.max(28.84375,h.width),j=d[3]===o.black?"#003670":o.white;return y.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:x,onPointerMove:p,onPointerUp:f,style:{cursor:"move"},children:[y.jsx("rect",{fill:d[2],x:"0",width:g+4,height:"16",rx:"2"}),y.jsxs("g",{ref:m,children:[y.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:(g+4)/2,y:"8",fontSize:"7",fill:j,children:c[0]}),y.jsx("text",{className:"rmp-name__en",textAnchor:"middle",x:(g+4)/2,y:"13.5",fontSize:"4",fill:j,children:c[1]})]})]})},icon:y.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[y.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12",rx:"2"}),y.jsx("text",{x:"3",y:"12",fontSize:"6",fill:"white",children:"八通线"}),y.jsx("text",{x:"3",y:"16",fontSize:"3.2",fill:"white",children:"Batong Line"})]}),defaultAttrs:q,attrsComponent:()=>y.jsx(l,{fields:Q}),metadata:{displayName:"panel.details.nodes.bjsubwayTextLineBadge.displayName",tags:[]}},G={num:1,branch:!1,color:[a.Suzhou,"sz1","#78BA25",o.white]},Z=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:G).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:G;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"switch",label:"panel.details.nodes.suzhouRTNumLineBadge.branch",isChecked:e=>{var n;return null!==(n=null==e?void 0:e.branch)&&void 0!==n?n:G.branch},onChange:(e,n)=>{const t=null!=n?n:G;return t.branch=e,t}},{type:"custom",label:"color",component:y.jsx(i,{type:r.SuzhouRTNumLineBadge,defaultTheme:G.color})}],H={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{num:s=G.num,branch:c=G.branch,color:d=G.color}=null!=a?a:G,m=N.useCallback((e=>o(n,e)),[n,o]),h=N.useCallback((e=>i(n,e)),[n,i]),u=N.useCallback((e=>r(n,e)),[n,r]);return y.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:m,onPointerMove:h,onPointerUp:u,style:{cursor:"move"},children:[y.jsx("rect",{fill:d[2],width:"20",height:"20",rx:"2",ry:"2"}),y.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"middle",x:"10",y:"11.4",fill:d[3],fontSize:"15",letterSpacing:"-1",children:s}),c&&y.jsxs(y.Fragment,{children:[y.jsx("text",{className:"rmp-name__zh",x:22.5,y:"10",fontSize:"10",children:"支线"}),y.jsx("text",{className:"rmp-name__en",x:22.5,y:"18",fontSize:"5",fill:"gray",children:"Branch line"})]})]})},icon:y.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[y.jsx("rect",{fill:"currentColor",x:"4",y:"4",width:"16",height:"16",rx:"3",ry:"3"}),y.jsx("text",{x:"12",y:"13.4",textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:"14",children:"1"})]}),defaultAttrs:G,attrsComponent:()=>y.jsx(l,{fields:Z}),metadata:{displayName:"panel.details.nodes.suzhouRTNumLineBadge.displayName",tags:[]}},J={num:1,color:[a.Berlin,"bu1","#62AD2D",o.white]},Y=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:J).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:J;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"custom",label:"color",component:y.jsx(i,{type:r.BerlinUBahnLineBadge,defaultTheme:J.color})}],K={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{num:s=J.num,color:c=J.color}=null!=a?a:J,d=N.useCallback((e=>o(n,e)),[n,o]),m=N.useCallback((e=>i(n,e)),[n,i]),h=N.useCallback((e=>r(n,e)),[n,r]),u=c[3];return y.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:d,onPointerMove:m,onPointerUp:h,style:{cursor:"move"},children:[y.jsx("rect",{fill:c[2],x:"0",width:"25",height:"15"}),y.jsxs("text",{className:"rmp-name__berlin",textAnchor:"middle",x:"12.5",y:"12.5",fill:u,fontSize:"14",letterSpacing:"1",children:["U",s]})]})},icon:y.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[y.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16"}),y.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"U1"})]}),defaultAttrs:J,attrsComponent:()=>y.jsx(l,{fields:Y}),metadata:{displayName:"panel.details.nodes.berlinUBahnLineBadge.displayName",tags:[]}},X={num:1,color:[a.Berlin,"bs1","#DD6CA6",o.white]},ee=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:X).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:X;return Number.isNaN(e)||(t.num=Number(e)),t}},{type:"custom",label:"color",component:y.jsx(i,{type:r.BerlinSBahnLineBadge,defaultTheme:X.color})}],ne={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{num:s=X.num,color:c=X.color}=null!=a?a:X,[d,m]=s>=10?[6,19.75]:[10,20],h=N.useCallback((e=>o(n,e)),[n,o]),u=N.useCallback((e=>i(n,e)),[n,i]),x=N.useCallback((e=>r(n,e)),[n,r]),p=c[3];return y.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:h,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[y.jsx("rect",{fill:c[2],x:"0",width:"30",height:"15",rx:"8"}),y.jsx("text",{className:"rmp-name__berlin",textAnchor:"middle",x:d,y:"12.5",fill:p,fontSize:"14",letterSpacing:"0",children:"S"}),y.jsx("text",{className:"rmp-name__berlin",textAnchor:"middle",x:m,y:"12.5",fill:p,fontSize:"14",letterSpacing:"-0.2",children:s})]})},icon:y.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[y.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"8"}),y.jsx("text",{x:"4.5",y:"16.5",fill:"white",fontSize:"14",children:"S1"})]}),defaultAttrs:X,attrsComponent:()=>y.jsx(l,{fields:ee}),metadata:{displayName:"panel.details.nodes.berlinSBahnLineBadge.displayName",tags:[]}},te={num:1,color:[a.Chongqing,"cq1","#e4002b",o.white]},le=[{type:"input",label:"panel.details.nodes.common.num",value:e=>(null!=e?e:te).num,validator:e=>!Number.isNaN(e),onChange:(e,n)=>{const t=null!=n?n:te;return Number.isNaN(Number(e))?t.num=e:t.num=Number(e),t}},{type:"custom",label:"color",component:y.jsx(i,{type:r.ChongqingRTNumLineBadge,defaultTheme:te.color})}],ae={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{num:s=te.num,color:c=te.color}=null!=a?a:te,d=N.useCallback((e=>o(n,e)),[n,o]),m=N.useCallback((e=>i(n,e)),[n,i]),h=N.useCallback((e=>r(n,e)),[n,r]),u=c[3],x=Number.isInteger(s)?16:15,[p,f]=Number.isInteger(s)?Number(s)>=10?[-1.2,1.5]:[0,5.5]:[0,2.55];return y.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:d,onPointerMove:m,onPointerUp:h,style:{cursor:"move"},children:[y.jsx("rect",{fill:c[2],x:"0",width:"20",height:"20",rx:"10",ry:"10"}),y.jsx("text",{className:"rmp-name__zh",textAnchor:"left",x:f,y:"10",fill:u,fontSize:x,letterSpacing:p,dominantBaseline:"central",children:s})]})},icon:y.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[y.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),y.jsx("text",{x:"8",y:"18",fill:"white",fontSize:"18",children:"1"})]}),defaultAttrs:te,attrsComponent:()=>y.jsx(l,{fields:le}),metadata:{displayName:"panel.details.nodes.chongqingRTNumLineBadge.displayName",tags:[]}},oe={names:["空港线","Konggang Line"],color:[a.Chongqing,"cq3","#003da5",o.white]},ie=[{type:"input",label:"panel.details.nodes.common.nameZh",value:e=>(null!=e?e:oe).names[0],onChange:(e,n)=>{const t=null!=n?n:oe;return t.names[0]=e.toString(),t}},{type:"textarea",label:"panel.details.nodes.common.nameEn",value:e=>(null!=e?e:oe).names[1],onChange:(e,n)=>{const t=null!=n?n:oe;return t.names[1]=e.toString(),t}},{type:"custom",label:"color",component:y.jsx(i,{type:r.ChongqingRTTextLineBadge,defaultTheme:oe.color})}],re={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{names:s=oe.names,color:c=oe.color}=null!=a?a:oe,d=N.useRef(null),m=N.useCallback((e=>o(n,e)),[n,o]),h=N.useCallback((e=>i(n,e)),[n,i]),u=N.useCallback((e=>r(n,e)),[n,r]),x=c[3];return y.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:m,onPointerMove:h,onPointerUp:u,style:{cursor:"move"},children:[y.jsx("rect",{fill:c[2],x:"0",width:"20",height:"20",rx:"10",ry:"10"}),y.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:"10",y:"10.5",fill:x,fontSize:"6",letterSpacing:"0",children:s[0]}),y.jsx(S,{ref:d,text:s[1].split("\n"),className:"rmp-name__en",textAnchor:"middle",x:"10",y:"9.25",fill:x,fontSize:"2.5",letterSpacing:"0",lineHeight:2.25,grow:"down"})]})},icon:y.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[y.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),y.jsx("text",{x:"4.5",y:"12.5",fill:"white",fontSize:"5",children:"空港线"}),y.jsx("text",{x:"4.5",y:"15",fill:"white",fontSize:"2",children:"Konggang Line"})]}),defaultAttrs:oe,attrsComponent:()=>y.jsx(l,{fields:ie}),metadata:{displayName:"panel.details.nodes.chongqingRTTextLineBadge.displayName",tags:[]}},se=11.84375,ce={num:1,color:[a.Shenzhen,"sz1","#00b140",o.white],isBranch:!1},de={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{num:s=ce.num,color:c=ce.color,isBranch:d=ce.isBranch}=null!=a?a:ce,m=N.useCallback((e=>o(n,e)),[n,o]),h=N.useCallback((e=>i(n,e)),[n,i]),u=N.useCallback((e=>r(n,e)),[n,r]),x=c[3],p=d?10:se+(s>9?6.5:3),f=d?-1:0,g=d?11:se+(s>9?7:3.5),j=d?6:9.921875;return y.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:m,onPointerMove:h,onPointerUp:u,style:{cursor:"move"},children:[y.jsx("rect",{fill:c[2],x:"0",width:32.84375,height:"16",rx:"2"}),y.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",x:j,y:"13.5",fill:x,fontSize:"15",letterSpacing:"-1",children:s}),y.jsxs("text",{className:"rmp-name__zh",x:p,y:"9.5",fontSize:"6",fill:x,letterSpacing:f,children:["号线",d?"支线":""]}),y.jsxs("text",{className:"rmp-name__en",x:g,y:"13.5",fontSize:"3",fill:x,children:[d?"Branch":""," Line ",s]})]})},icon:y.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[y.jsx("rect",{fill:"currentColor",x:"2",y:"4",width:"20",height:"16",rx:"2"}),y.jsx("text",{x:"4",y:"17",fill:"white",fontSize:"14",children:"1"}),y.jsx("text",{x:"11",y:"14",fill:"white",fontSize:"5",children:"号线"}),y.jsx("text",{x:"12",y:"17",fill:"white",fontSize:"3",children:"Line 1"})]}),defaultAttrs:ce,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=C(),o=[{type:"input",label:a("panel.details.nodes.common.num"),value:String(t.num),validator:e=>!Number.isNaN(e),onChange:e=>{t.num=Number(e),l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:y.jsx(i,{type:r.ShenzhenMetroNumLineBadge,defaultTheme:ce.color}),minW:"full"},{type:"switch",label:a("panel.details.nodes.shenzhenMetroNumLineBadge.branch"),oneLine:!0,isChecked:t.isBranch,onChange:e=>{t.isBranch=e,l(n,t)},minW:"full"}];return y.jsx(s,{fields:o})},metadata:{displayName:"panel.details.nodes.shenzhenMetroNumLineBadge.displayName",tags:[]}},me={num:1,color:[a.Singapore,"ewl","#009739",o.white]},he={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{num:s=me.num,color:c=me.color}=null!=a?a:me,d=N.useCallback((e=>o(n,e)),[n,o]),m=N.useCallback((e=>i(n,e)),[n,i]),h=N.useCallback((e=>r(n,e)),[n,r]),u=c[3],x=c[2];return y.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:d,onPointerMove:m,onPointerUp:h,style:{cursor:"move"},children:[y.jsx("circle",{r:"8",fill:x}),y.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",x:"0",y:"0",width:"12",height:"12",fill:u,fontSize:"12",dominantBaseline:"central",letterSpacing:"-0.2",children:s})]})},icon:y.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[y.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),y.jsx("text",{x:"9",y:"17",fill:"white",fontSize:"14",children:"1"})]}),defaultAttrs:me,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=C(),o=[{type:"input",label:a("panel.details.nodes.common.num"),value:String(t.num),validator:e=>!Number.isNaN(e),onChange:e=>{t.num=Number(e),l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:y.jsx(i,{type:r.MRTDestinationNumbers,defaultTheme:me.color}),minW:"full"}];return y.jsx(s,{fields:o})},metadata:{displayName:"panel.details.nodes.mrtDestinationNumbers.displayName",tags:[]}},ue={lineCode:"EWL",name:"East-West Line",lines:"1, 2, 3, airport",isTram:!1,color:[a.Singapore,"ewl","#009739",o.white]},xe={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{lineCode:s=ue.lineCode,color:c=ue.color,lines:d=ue.lines,name:m=ue.name,isTram:h=ue.isTram}=null!=a?a:ue,u=N.useCallback((e=>o(n,e)),[n,o]),x=N.useCallback((e=>i(n,e)),[n,i]),p=N.useCallback((e=>r(n,e)),[n,r]),f=c[3],g=c[2];return y.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:u,onPointerMove:x,onPointerUp:p,style:{cursor:"move"},children:[y.jsx("rect",{transform:"scale(1.8)",x:-11.425,y:-6.4675,rx:"3",ry:"6",width:22.85,height:12.935,fill:g,stroke:"white",strokeWidth:"1"}),y.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",fill:f,fontSize:"15",dominantBaseline:"central",letterSpacing:"-0.2",children:s}),y.jsx("text",{className:"rmp-name__mrt",textAnchor:"left",x:"28",y:h?3.5:-3,fill:"black",fontSize:"10",letterSpacing:"-0.2",children:m}),!h&&d.split(",").map(((e,n)=>y.jsx("g",{transform:`translate(${34+14*n}, 4.5)`,children:"airport"!==e.trim()?y.jsxs(y.Fragment,{children:[y.jsx("circle",{r:"6",fill:g}),y.jsx("text",{className:"rmp-name__mrt",textAnchor:"middle",fill:f,fontSize:"9",dominantBaseline:"central",letterSpacing:"-0.2",children:e})]}):y.jsxs("g",{transform:"translate(-6, -6) scale(4.5)",children:[y.jsx("path",{d:"M2.467 0H.226A.226.226 0 0 0 0 .226v2.241a.225.225 0 0 0 .226.225h2.241a.225.225 0 0 0 .225-.225V.226A.226.226 0 0 0 2.467 0",style:{fill:"#2d2a26"}}),y.jsx("path",{d:"M1.5.746v.3l.73.642a.08.08 0 0 1 .022.05v.12c0 .017-.012.025-.027.018L1.5 1.529l-.06.541.2.113a.03.03 0 0 1 .013.023V2.3a.01.01 0 0 1-.014.011l-.293-.091-.286.087a.01.01 0 0 1-.014-.007v-.09a.03.03 0 0 1 .013-.023l.2-.113-.059-.545-.724.348a.018.018 0 0 1-.028-.018v-.12a.07.07 0 0 1 .023-.05l.73-.642v-.3c0-.482.3-.482.3 0",style:{fill:"#fff",fillRule:"evenodd"}})]})},n)))]})},icon:y.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[y.jsx("rect",{fill:"currentColor",x:"2",y:"2",rx:"10",ry:"10",width:"20",height:"20"}),y.jsx("text",{x:"9",y:"17",fill:"white",fontSize:"14",children:"1"})]}),defaultAttrs:ue,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=C(),o=[{type:"input",label:a("panel.details.nodes.common.nameEn"),value:t.name,onChange:e=>{t.name=e,l(n,t)},minW:"full"},{type:"input",label:a("panel.details.stations.common.lineCode"),value:t.lineCode,onChange:e=>{t.lineCode=e,l(n,t)},minW:"full"},{type:"switch",label:a("panel.details.nodes.mrtLineBadge.isTram"),isChecked:t.isTram,onChange:e=>{t.isTram=e,l(n,t)},minW:"full",oneLine:!0},...t.isTram?[]:[{type:"input",label:a("panel.details.nodes.common.num"),value:t.lines,onChange:e=>{t.lines=e,l(n,t)},minW:"full"}],{type:"custom",label:a("color"),component:y.jsx(i,{type:r.MRTLineBadge,defaultTheme:ue.color}),minW:"full"}];return y.jsx(s,{fields:o})},metadata:{displayName:"panel.details.nodes.mrtLineBadge.displayName",tags:[]}},pe=5*Math.SQRT1_2,fe=.25,ge=(pe*Math.SQRT2-fe)/2*Math.SQRT2,ye={names:["山手線","Yamanote Line"],color:[a.Tokyo,"jy","#9ACD32",o.black],num:9,crosshatchPatternFill:!1},je={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{names:s=ye.names,num:c=ye.num,color:d=ye.color,crosshatchPatternFill:m=ye.crosshatchPatternFill}=null!=a?a:ye,h=N.useRef(null),[u,x]=N.useState({height:10,width:12});N.useEffect((()=>x(h.current.getBBox())),[...s,x,h]);const p=N.useCallback((e=>o(n,e)),[n,o]),f=N.useCallback((e=>i(n,e)),[n,i]),g=N.useCallback((e=>r(n,e)),[n,r]);return y.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:p,onPointerMove:f,onPointerUp:g,style:{cursor:"move"},children:[y.jsxs("defs",{children:[y.jsxs("clipPath",{id:"jr_east_fill_pattern_clip_path",patternUnits:"userSpaceOnUse",children:[y.jsx("polygon",{points:`0,0 0,${ge} ${ge},0`}),y.jsx("polygon",{points:`${pe},${pe} ${pe-ge},${pe} ${pe},${pe-ge}`})]}),y.jsxs("pattern",{id:`jr_east_${n}_fill_pattern_${d[2]}`,width:pe,height:pe,patternUnits:"userSpaceOnUse",children:[y.jsx("rect",{width:pe,height:pe,fill:d[2]}),y.jsx("line",{x1:"0",y1:"0",x2:pe,y2:pe,stroke:"white",strokeWidth:fe,strokeOpacity:"33%",clipPath:"url(#jr_east_fill_pattern_clip_path)"}),y.jsx("line",{x1:pe,y1:"0",x2:"0",y2:pe,stroke:"white",strokeWidth:fe,strokeOpacity:"33%"})]})]}),y.jsx("rect",{fill:m?`url(#jr_east_${n}_fill_pattern_${d[2]})`:d[2],x:"0",y:"-1",width:u.width+4+10,height:u.height+1,rx:"1",stroke:"black",strokeWidth:"0.25"}),y.jsx("circle",{r:4,cx:7,cy:6,stroke:"black",strokeWidth:"0.25",fill:d[3]}),y.jsx("text",{x:7,y:6.75,textAnchor:"middle",dominantBaseline:"middle",fill:"#000"===d[3]?"white":d[2],fontSize:c>9?7:8,className:"rmp-name__jreast_en",children:c}),y.jsx(S,{ref:h,text:s[0].split("\n"),x:12,y:"-1",fill:d[3],fontSize:10,lineHeight:10,grow:"down",className:"rmp-name__jreast_ja"}),y.jsx(S,{text:s[1].split("\n"),textAnchor:"middle",dominantBaseline:"hanging",x:(u.width+4+10)/2,y:u.height+1,fontSize:5,lineHeight:5,baseOffset:0,grow:"down",className:"rmp-name__jreast_en"})]})},icon:y.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[y.jsx("rect",{fill:"currentColor",x:"1",y:"6",width:"22",height:"7"}),y.jsx("circle",{cx:"3.5",cy:"9.25",r:"2",fill:"white"}),y.jsx("text",{x:"3",y:"10.5",fontSize:"3",children:"9"}),y.jsx("text",{x:"6",y:"11.25",fontSize:"5",fill:"white",children:"山手線"}),y.jsx("text",{x:"1.5",y:"16",fontSize:"3",children:"Yamanote Line"})]}),defaultAttrs:ye,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=C(),o=[{type:"input",label:a("panel.details.nodes.common.num"),value:String(t.num),validator:e=>!Number.isNaN(e),onChange:e=>{t.num=Number(e),l(n,t)},minW:"full"},{type:"textarea",label:a("panel.details.nodes.common.nameJa"),value:t.names[0],onChange:e=>{t.names[0]=e,l(n,t)},minW:"full"},{type:"textarea",label:a("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:e=>{t.names[1]=e,l(n,t)},minW:"full"},{type:"switch",label:a("panel.details.nodes.jrEastLineBadge.crosshatchPatternFill"),oneLine:!0,isChecked:t.crosshatchPatternFill,onChange:e=>{t.crosshatchPatternFill=e,l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:y.jsx(i,{type:r.JREastLineBadge,defaultTheme:ye.color})}];return y.jsx(s,{fields:o})},metadata:{displayName:"panel.details.nodes.jrEastLineBadge.displayName",tags:[]}},be={num:1,numEn:"1",showText:!0,color:[a.Qingdao,"qd1","#f7b000",o.white]},we={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{num:s=be.num,numEn:c=be.numEn,color:d=be.color,showText:m=be.showText}=null!=a?a:be,h=N.useCallback((e=>o(n,e)),[n,o]),u=N.useCallback((e=>i(n,e)),[n,i]),x=N.useCallback((e=>r(n,e)),[n,r]),p=d[3],[f,g,j,b]=Number(s)>=10?[-2.4,0,10.25,20]:[0,4,10,22];return y.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:h,onPointerMove:u,onPointerUp:x,style:{cursor:"move"},children:[y.jsx("rect",{fill:d[2],x:"0",width:"20",height:"20",rx:"2",ry:"2"}),y.jsx("text",{className:"rmp-name__zh",textAnchor:"left",x:g,y:j,fill:p,fontSize:b,fontWeight:"bold",letterSpacing:f,dominantBaseline:"central",children:s}),m&&y.jsxs(y.Fragment,{children:[y.jsx("text",{className:"rmp-name__zh",x:"22",y:"10.5",fontSize:"13",children:"号线"}),y.jsxs("text",{className:"rmp-name__en",x:"22.5",y:"19.5",fontSize:"8",children:["Line ",c]})]})]})},icon:y.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[y.jsx("rect",{fill:"currentColor",x:"2",y:"6",rx:"1",ry:"1",width:"10",height:"10"}),y.jsx("text",{x:"4",y:"15",fill:"white",fontSize:"12",children:"1"}),y.jsx("text",{x:"12",y:"11.5",fill:"black",fontSize:"6",children:"号线"}),y.jsx("text",{x:"12",y:"15.5",fill:"black",fontSize:"4",children:"Line1"})]}),defaultAttrs:be,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=C(),o=[{type:"input",label:a("panel.details.nodes.common.num"),value:t.num.toString(),onChange:e=>{t.num=Number(e),t.numEn=e,l(n,t)}},{type:"input",label:a("panel.details.nodes.qingdaoMetroNumLineBadge.numEn"),value:t.numEn.toString(),onChange:e=>{t.numEn=e,l(n,t)}},{type:"switch",label:a("panel.details.nodes.qingdaoMetroNumLineBadge.showText"),isChecked:t.showText,oneLine:!0,onChange:e=>{t.showText=e,l(n,t)}},{type:"custom",label:a("color"),component:y.jsx(i,{type:r.QingdaoMetroNumLineBadge,defaultTheme:be.color})}];return y.jsx(s,{fields:o,minW:"full"})},metadata:{displayName:"panel.details.nodes.qingdaoMetroNumLineBadge.displayName",tags:[]}},ve={names:["广清城际","Guangzhou-Qingyuan Intercity"],color:[a.Guangzhou,"ir","#2559a8",o.white]},Ne={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{names:s=ve.names,color:c=ve.color}=null!=a?a:ve,d=N.useRef(null),[m,h]=N.useState({width:12});N.useEffect((()=>h(d.current.getBBox())),[...s,h,d]);const u=N.useCallback((e=>o(n,e)),[n,o]),x=N.useCallback((e=>i(n,e)),[n,i]),p=N.useCallback((e=>r(n,e)),[n,r]);return y.jsxs("g",{id:n,transform:`translate(${t}, ${l})`,onPointerDown:u,onPointerMove:x,onPointerUp:p,style:{cursor:"move"},children:[y.jsx("rect",{rx:"2",ry:"2",fill:c[2],x:"0",width:m.width+7,height:"21"}),y.jsxs("g",{ref:d,children:[y.jsx("text",{className:"rmp-name__zh",textAnchor:"middle",dominantBaseline:"hanging",x:(m.width+7)/2,y:"3",fontSize:"8.63",fill:c[3],children:s[0]}),y.jsx("text",{className:"rmp-name__en",textAnchor:"middle",dominantBaseline:"hanging",x:(m.width+7)/2,y:"14",fontSize:"3.54",fill:c[3],children:s[1]})]})]})},icon:y.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[y.jsx("rect",{fill:"currentColor",x:"2",y:"6",width:"20",height:"12"}),y.jsx("text",{x:"4.5",y:"11",fontSize:"4",fill:"white",children:"广清城际"}),y.jsx("text",{x:"3",y:"16",fontSize:"2",fill:"white",children:"Guangzhou-Qingyuan Intercity"})]}),defaultAttrs:ve,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=C(),o=[{type:"input",label:a("panel.details.nodes.common.nameZh"),value:t.names[0],onChange:e=>{t.names[0]=e,l(n,t)},minW:"full"},{type:"input",label:a("panel.details.nodes.common.nameEn"),value:t.names[1],onChange:e=>{t.names[1]=e,l(n,t)},minW:"full"}];return y.jsx(s,{fields:o})},metadata:{displayName:"panel.details.nodes.guangdongIntercityRailwayLineBadge.displayName",tags:[]}},Ce=`M0,0 L-10,-10 L${5*Math.SQRT2-10},-10 L${5*Math.SQRT2},0 L${5*Math.SQRT2-10},10 L-10,10 Z`,Pe={color:[a.London,"thameslink","#d28db0",o.white],rotate:0,type:"continuation"},Se={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,{color:s=Pe.color,rotate:c=Pe.rotate,type:d=Pe.type}=null!=a?a:Pe,m=N.useCallback((e=>o(n,e)),[n,o]),h=N.useCallback((e=>i(n,e)),[n,i]),u=N.useCallback((e=>r(n,e)),[n,r]);return y.jsx("g",{id:n,transform:`translate(${t}, ${l})rotate(${c})`,onPointerDown:m,onPointerMove:h,onPointerUp:u,style:{cursor:"move"},children:"continuation"===d?y.jsx("path",{id:`virtual_circle_${n}`,fill:s[2],d:Ce}):"sandwich"===d?y.jsx("path",{transform:"scale(0.5)",id:`virtual_circle_${n}`,stroke:"white",strokeWidth:"1",fill:s[2],d:Ce}):y.jsx("path",{transform:"scale(0.25)",id:`virtual_circle_${n}`,fill:"white",d:Ce})})},icon:y.jsx("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:y.jsx("path",{transform:"translate(14,12)scale(0.75)",fill:"currentColor",d:Ce})}),defaultAttrs:Pe,attrsComponent:e=>{const{id:n,attrs:t,handleAttrsUpdate:l}=e,{t:a}=C(),o=[{type:"select",label:a("panel.details.stations.common.rotate"),value:t.rotate,options:{0:"0",45:"45",90:"90",135:"135",180:"180",225:"225",270:"270",315:"315"},onChange:e=>{t.rotate=Number(e),l(n,t)},minW:"full"},{type:"select",label:a("panel.details.nodes.londonArrow.type"),value:t.type,options:{continuation:a("panel.details.nodes.londonArrow.continuation"),sandwich:a("panel.details.nodes.londonArrow.sandwich"),tube:a("panel.details.nodes.londonArrow.tube")},onChange:e=>{t.type=e,l(n,t)},minW:"full"},{type:"custom",label:a("color"),component:y.jsx(i,{type:r.LondonArrow,defaultTheme:Pe.color}),minW:"full"}];return y.jsx(s,{fields:o})},metadata:{displayName:"panel.details.nodes.londonArrow.displayName",tags:[]}},Be=n({contents:{}},_),_e={component:e=>{const{id:n,x:t,y:l,attrs:a,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r}=e,s=k();a.content=s(a.contents);const c=B.component;return y.jsx(c,{id:n,x:t,y:l,handlePointerDown:o,handlePointerMove:i,handlePointerUp:r,attrs:a})},icon:B.icon,defaultAttrs:Be,attrsComponent:B.attrsComponent,metadata:{displayName:"panel.details.nodes.i18nText.displayName",tags:[]}},ke={randomId:void 0,label:void 0,transform:c,nodeType:"MiscNode",svgs:[],components:[]},ze={component:e=>{var t;const{id:l,x:a,y:o,attrs:i,handlePointerDown:r,handlePointerMove:s,handlePointerUp:d}=e,m=N.useCallback((e=>r(l,e)),[l,r]),h=N.useCallback((e=>s(l,e)),[l,s]),u=N.useCallback((e=>d(l,e)),[l,d]),x=(e,...n)=>new Function(...n,`return ${e}`),p="MiscNode"===i.nodeType?{onPointerDown:m,onPointerMove:h,onPointerUp:u,style:{cursor:"move"}}:{},f=e=>e.map((e=>{var t,a;const o="Station"===i.nodeType&&i.core&&i.core===e.id?{id:`stn_core_${l}`,onPointerDown:m,onPointerMove:h,onPointerUp:u,style:{cursor:"move"}}:{},r=((e,n,t)=>{const l={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r))try{var a;l[r]=x(e[r].slice(1),...i.components.map((e=>e.label)),"color")(...n.map(((e,n)=>"number"!==t[n]||Number.isNaN(Number(e))?e:Number(e))),i.color?null!==(a=i.color.value)&&void 0!==a?a:i.color.defaultValue:"")}catch(o){l[r]=""}return l})(e.attrs,i.components.map((e=>e.value)),i.components.map((e=>e.type)));return y.jsx("g",{transform:`translate(${null!==(t=r.x)&&void 0!==t?t:0}, ${null!==(a=r.y)&&void 0!==a?a:0})`,children:N.createElement(e.type,n(n({},r),{},{x:0,y:0},o),e.children?f(e.children):"_rmp_children_text"in r?"style"===e.type?(s=r._rmp_children_text,s.replace(/(^|,)\s*([^{},]+)/g,`$1 #${l} $2`)):r._rmp_children_text:null)},e.id);var s})),g=null!==(t=i.transform)&&void 0!==t?t:c,j=N.useMemo((()=>f(i.svgs)),[i]);return N.createElement("g",n({id:l,transform:`translate(${a}, ${o})`},p),i.randomId?y.jsx("g",{transform:`translate(${g.translateX}, ${g.translateY}) scale(${g.scale}) rotate(${g.rotate})`,children:j}):y.jsxs("g",{children:[y.jsx("circle",{r:"5.5"}),y.jsx("g",{transform:"translate(-4.7, -5) scale(0.8)",children:y.jsx("polygon",{points:"6,1 7.5,4.25 11,4.65 8.5,7.1 9.2,10.75 6,9 2.8,10.75 3.5,7.1 1,4.65 4.5,4.25",fill:"white"})})]}))},icon:y.jsxs("svg",{viewBox:"0 0 24 24",height:40,width:40,focusable:!1,children:[y.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",fill:"none"}),y.jsx("g",{transform:"translate(7.25, 7) scale(0.8)",children:y.jsx("polygon",{points:"6,1 7.5,4.25 11,4.65 8.5,7.1 9.2,10.75 6,9 2.8,10.75 3.5,7.1 1,4.65 4.5,4.25",fill:"currentColor"})})]}),defaultAttrs:ke,attrsComponent:e=>{var t,l,a,i,r;const{id:c,attrs:P,handleAttrsUpdate:S}=e,B=d(),{paletteAppClip:{output:_}}=m((e=>e.runtime)),{t:k}=C(),[M,A]=N.useState(!1),[$,T]=N.useState(!1),U=P.components.map(((e,t)=>{const{label:l,type:a,defaultValue:o,value:i}=e;return"number"===a||"text"===a?{label:k(l),type:"input",value:null!=i?i:o,onChange:e=>{P.components[t].value=e,S(c,n(n({},P),{},{components:P.components}))}}:"switch"===a?{label:k(l),type:"switch",isChecked:void 0!==i?!!i:o,onChange:e=>{P.components[t].value=e,S(c,n(n({},P),{},{components:P.components}))}}:"textarea"===a?{label:k(l),type:"textarea",value:null!=i?i:o,onChange:e=>{P.components[t].value=e,S(c,n(n({},P),{},{components:P.components}))}}:{type:"input",label:"undefined",value:"none"}})),[D,W]=N.useState(!1);N.useEffect((()=>{P.color&&D&&_&&(P.color.value=_,S(c,n(n({},P),{},{color:P.color})),W(!1))}),[null==_?void 0:_.toString()]);const E=[{type:"custom",label:k("color"),component:y.jsx(h,{theme:null===(t=P.color)||void 0===t?void 0:t.value,onClick:()=>{var e;W(!0),B(u(null===(e=P.color)||void 0===e?void 0:e.value))}})}];return y.jsxs(y.Fragment,{children:[y.jsxs(j,{direction:"row",mr:"auto",width:"100%",children:[y.jsx(x,{width:"100%",overflow:"hidden",label:k("panel.details.nodes.master.type"),children:y.jsxs(j,{width:"100%",overflow:"hidden",children:[y.jsx(p,{name:null!==(l=P.label)&&void 0!==l?l:k("panel.details.nodes.master.undefined"),fg:null!==(a=P.labelColorFg)&&void 0!==a?a:o.white,bg:null!==(i=P.labelColorBg)&&void 0!==i?i:"#000000",sx:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"},mr:1}),y.jsx(p,{name:null!==(r=P.randomId)&&void 0!==r?r:"UNDEFINED",fg:o.white,bg:P.randomId?"#19B3EA":"#000000",sx:{display:"inline-block"},mr:1})]})}),y.jsx(b,{}),y.jsx(w,{icon:y.jsx(f,{}),onClick:()=>A(!0),"aria-label":"upload"})]}),y.jsx(v,{width:"100%",leftIcon:y.jsx(g,{}),onClick:()=>T(!0),children:k("header.settings.procedures.masterManager.title")}),P.randomId&&y.jsx(s,{fields:U,minW:"full"}),P.randomId&&void 0!==P.color&&y.jsx(s,{fields:E,minW:"full"}),y.jsx(z,{isOpen:M,onClose:()=>A(!1),onSubmit:e=>{e.components.forEach(((n,t)=>{var l;e.components[t].value=null!==(l=(e=>{var n;const t=P.components.find((n=>n.id===e));return t?null!==(n=t.value)&&void 0!==n?n:t.defaultValue:void 0})(n.id))&&void 0!==l?l:n.defaultValue})),void 0!==e.color&&(e.color.value=P.color?P.color.value:e.color.defaultValue),S(c,e)}}),y.jsx(L,{isOpen:$,onClose:()=>T(!1)})]})},metadata:{displayName:"panel.details.nodes.master.displayName",tags:[]}};e("m",{[r.Virtual]:t,[r.ShmetroNumLineBadge]:T,[r.ShmetroTextLineBadge]:D,[r.GzmtrLineBadge]:E,[r.BjsubwayNumLineBadge]:I,[r.BjsubwayTextLineBadge]:V,[r.SuzhouRTNumLineBadge]:H,[r.BerlinSBahnLineBadge]:ne,[r.BerlinUBahnLineBadge]:K,[r.ChongqingRTNumLineBadge]:ae,[r.ChongqingRTTextLineBadge]:re,[r.ShenzhenMetroNumLineBadge]:de,[r.MRTDestinationNumbers]:he,[r.MRTLineBadge]:xe,[r.JREastLineBadge]:je,[r.QingdaoMetroNumLineBadge]:we,[r.GuangdongIntercityRailwayLineBadge]:Ne,[r.LondonArrow]:Se,[r.Facilities]:M,[r.Text]:B,[r.I18nText]:_e,[r.Master]:ze})}}}))}(); diff --git a/assets/page-header-BpUv6R7o.js b/assets/page-header-DH4nmP-r.js similarity index 71% rename from assets/page-header-BpUv6R7o.js rename to assets/page-header-DH4nmP-r.js index 3dc7556e..7a2b8ddb 100644 --- a/assets/page-header-BpUv6R7o.js +++ b/assets/page-header-DH4nmP-r.js @@ -1,7 +1,7 @@ -import{j as e,at as Y,$ as F,au as J,a1 as q,a2 as X,a3 as Q,g as Ms,av as at,a4 as w,B as T,aw as Ce,ax as Ne,ay as ne,az as re,aA as oe,h as $e,O as E,a5 as xe,aB as lt,aC as ct,aD as ye,a7 as O,aE as N,a6 as Ds,aF as fs,aG as js,af as ee,aH as bs,aI as ce,U as le,aJ as es,aK as dt,aL as Us,al as Zs,d as Vs,R as Ks,q as Ys,Z as Fs,aM as ze,aN as ht,ak as De,ae as ut,aO as pt,aP as gt,aQ as D,aR as As,aS as mt,aT as k,aU as C,W as xt,m as ie,a8 as ft,a9 as jt}from"./chakra-xNcrfRXW.js";import{u as bt,r as M,C as wt,M as ws,n as ls,L as Js,S as I,R as Ts,a as qs,b as R,c as P,d as B,e as St,f as yt,g as Ct,h as zt,i as ke,E as Me,s as vt,j as Ye,k as ss,m as kt,l as Ot,o as Rs,p as Ss,q as K,t as V,v as se,w as Xs,x as Qs,y as cs,z as Oe,A as Ie,B as Es,D as Ns,F as Mt,G as At,H as Tt,I as Rt,J as Et,K as _s,N as Nt,O as _t,P as It,Q as Ht,T as Wt,U as Lt,V as Bt,W as Pt,X as Gt,Y as Dt,Z as Ut,_ as Zt,$ as Vt,a0 as Kt,a1 as Yt,a2 as Ft,a3 as Ue,a4 as fe,a5 as Jt,a6 as qt,a7 as Xt,a8 as Qt,a9 as pe,aa as $t,ab as en,ac as Is,ad as sn,ae as ts,af as tn,ag as nn,ah as rn,ai as on,aj as an,ak as ln,al as cn,am as dn,an as hn,ao as un}from"./index-BiHghyID.js";import{u as L,b,r as Ze,T as Hs}from"./react-D-_si4LB.js";import{d as ds,m as pn,a as gn,i as mn,s as xn,u as ys,M as fn}from"./master-manager-BoebmmSV.js";import{C as jn}from"./change-type-modal-BN8Wot4j.js";var Ws=function(s){return bt(M.ready(),s)},bn={ar:{ar:"العربية",en:"Arabic",ko:"아랍어","zh-Hans":"阿拉伯文","zh-Hant":"阿拉伯文"},az:{az:"Azərbaycanca",en:"Azerbaijani",ko:"아제르바이잔어","zh-Hans":"阿塞拜疆文","zh-Hant":"阿塞拜疆文"},ca:{ca:"Català",en:"Catalan",ko:"카탈루냐어","zh-Hans":"加泰罗尼亚文","zh-Hant":"加泰隆尼亞文"},da:{da:"Dansk",en:"Danish",ko:"덴마크어","zh-Hans":"丹麦文","zh-Hant":"丹麥文"},de:{de:"Deutsch",en:"German",ko:"독일어","zh-Hans":"德文","zh-Hant":"德文"},el:{el:"Ελληνικά",en:"Greek",ko:"그리스어","zh-Hans":"希腊文","zh-Hant":"希臘文"},en:{en:"English",ja:"英語",ko:"영어","zh-Hans":"英文","zh-Hant":"英文"},es:{en:"Spanish",es:"Español",ko:"스페인어","zh-Hans":"西班牙文","zh-Hant":"西班牙文"},fa:{en:"Persian",fa:"فارسی",ko:"페르시아어","zh-Hans":"波斯文","zh-Hant":"波斯文"},fr:{en:"French",fr:"Français",ko:"프랑스어","zh-Hans":"法文","zh-Hant":"法文"},ga:{en:"Irish",ga:"Gaeilge",ko:"아일랜드어","zh-Hans":"爱尔兰文","zh-Hant":"愛爾蘭文"},gd:{en:"Scottish Gaelic",gd:"Gàidhlig",ko:"스코틀랜드 게일어","zh-Hans":"苏格兰盖尔文","zh-Hant":"蘇格蘭蓋爾文"},hi:{en:"Hindi",hi:"हिन्दी",ko:"힌디어","zh-Hans":"印地文","zh-Hant":"印地文"},hu:{en:"Hungarian",hu:"Magyar",ko:"헝가리어","zh-Hans":"匈牙利文","zh-Hant":"匈牙利文"},id:{en:"Indoesian",id:"Bahasa Indonesia",ko:"인도네시아어","zh-Hans":"印尼文","zh-Hant":"印尼文"},it:{en:"Italian",it:"Italiano",ko:"이탈리아어","zh-Hans":"意大利文","zh-Hant":"意大利文"},ja:{en:"Japanese",ja:"日本語",ko:"일본어","zh-Hans":"日文","zh-Hant":"日文"},kk:{en:"Kazakh",kk:"Қазақша",ko:"카자흐어","zh-Hans":"哈萨克文","zh-Hant":"哈薩克文"},ko:{en:"Korean",ja:"韓国語",ko:"한국어","zh-Hans":"韩文","zh-Hant":"韓文"},ms:{en:"Malay",ko:"말레이어",ms:"Bahasa Melayu","zh-Hans":"马来文","zh-Hant":"馬來文"},no:{en:"Norwegian",ko:"노르웨이어",no:"Norsk","zh-Hans":"挪威文","zh-Hant":"挪威文"},pl:{en:"Polish",ko:"폴란드어",pl:"Polski","zh-Hans":"波兰文","zh-Hant":"波蘭文"},pt:{en:"Portuguese",ko:"포르투갈어",pt:"Português","zh-Hans":"葡萄牙文","zh-Hant":"葡萄牙文"},ro:{en:"Romanian",ko:"루마니아어",ro:"Română","zh-Hans":"罗马尼亚文","zh-Hant":"羅馬尼亞文"},ru:{en:"Russian",ko:"러시아어",ru:"Русский","zh-Hans":"俄文","zh-Hant":"俄文"},sv:{en:"Swedish",ko:"스웨덴어",sv:"Svenska","zh-Hans":"瑞典文","zh-Hant":"瑞典文"},th:{en:"Thai",ko:"태국어",th:"ภาษาไทย","zh-Hans":"泰文","zh-Hant":"泰文"},tr:{en:"Turkish",ko:"튀르키예어",tr:"Türkçe","zh-Hans":"土耳其文","zh-Hant":"土耳其文"},uk:{en:"Ukrainian",ko:"우크라이나어",uk:"Українська","zh-Hans":"乌克兰文","zh-Hant":"烏克蘭文"},ur:{en:"Urdo",ko:"우르두어",ur:"اردو","zh-Hans":"乌尔都文","zh-Hant":"烏爾都文"},uz:{en:"Uzbek",ko:"우즈베크어",uz:"Oʻzbekcha","zh-Hans":"乌兹别克文","zh-Hant":"烏茲別克文"},vi:{en:"Vietnamese",ko:"베트남어",vi:"Tiếng Việt","zh-Hans":"越南文","zh-Hant":"越南文"},zh:{en:"Chinese",ja:"中国語",ko:"중국어",zh:"中文","zh-Hans":"中文","zh-Hant":"中文"},"zh-Hans":{en:"Simplified Chinese",ja:"中国語(簡体字)",ko:"중국어 간체자","zh-Hans":"简体中文","zh-Hant":"簡體中文"},"zh-Hant":{en:"Traditional Chinese",ja:"中国語(繁体字)",ko:"중국어 정체자","zh-Hans":"繁体中文","zh-Hant":"繁體中文"}};const wn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAC9FBMVEUAAACabOutif+ve/+FbLiVcuaQaOCWb+WYceiLYtuccOingvOYcOeRad6ZcuifeumXcOWhfO6jfPCmhPOUa+aLYtyac+iVbuSMZN2VbeWNZt6RaeGRauKhee2acumQauClfvGTa+OOZd6JYNqWb+Sog/SSauGPaOCogvSNZN2NZN2ngfKogvSngPOfeu6bdemTauSlfvGYcOiohPSngfKQaOCXb+aifO+XcOaVbuWTbOOogfOlf/GmgPKTbOOYceaMZN2pg/WQaN+hee2OZt6RaeCRauGKYtuSa9+bdOmog/SifO+ddumie+6Zcuelf/GSa+Ked+uYcealf/GSauGJYdqpg/SQaOCJYduOZd6jffCJX9qNZN6mgfKMZN2SauKfeOyKYtuXcOWpg/SngfOdduuJYNqQaN+WbuWUbeWmgfOLY9yUbOWlf/GZceeKYNqOaN6mgvKpgvSZceiMZNyVb+WNZt2cdumSauOfee2Wb+WPaN+geu2ddeqMZNypg/Wheu6lf/GZcueJYNmQaN+jffCTbOSphPWog/SWb+WmgPKWb+aYcuekf/Gac+iKYtuVbuWWbuSogvSSa+KWb+SOZt6ifO+feeyngfKRaeGpg/SYcOefeOujfe+VbeSMZd6ac+iJYdqVbeSog/OVbOWcdeqKYtungvObdOmfd+uSa+KNZNyeduuRaeGjfe+XcOWMY9ybdOmngvSOZt6UbuWacuiSbOKgee2bdOmMY9yVbuOmgvSUbeKviP6xif+UaueVa+mMY92ZcOyqhPaOZOKuh/2shPybcu2mf/WhePKcdO6ddeyYb+qZceirhPmpgfmedfCacuuWbuWogfemffefdfKacuqSaOaPZeSRaOKyiv+qg/iogvShd/SYbuyWbeiQZuWNZN+MYt+thvqlffSie/CXbeqTaOeKYdu1jP+jevOccvCbce6Xbeuth/uqgvukevinf/eiePaVau2WbOqXb+ahdvuUaumfdPehee+thP6bb/MemaUsAAAAvXRSTlMAAwEEAwb+/Qv6Cfv8IRAOXiwaFP7++9p3TkwvJSEeGf7++/r59+ri0MmCeFZCPjk3NDEk9PHi4NLIwq2djHp1bmNZUVBIPzwU/v38+fj49/bz6+rl5N7a0s7Hw8LAvq+opqSjlZOSiIBuaGRjYmJaVU1HREQ1KykW+/X19O7r6OXf29vV0c3Mxry4taupnpqZlZGRi4uGgXxzbWtjWlJG8/Px7ezk3dfQwbq4tp2Zh3t6cVxaVtrXz7GdcGlhNM13AAAH1ElEQVRYw+1YVVgbQRDezd2RkODu7pS6u7u7u7u7u7u7u7slkCZESUKCuxQoLVD3vnSPSyW9S6ClD33o/xHOdv6b2f1nZhPwH//xz4EFcRwi/CU2RKY/hayK0+EYdWhr6eGN6CrKCEk6qzZNtwxY0Wtxr8EtK8qIob+Zo/v6i7Ozk8U54jeFMwFeoaUAcMIA/2RxrjhZ6O9v7n/szWjA+nMXkWWbAbni3Nzk3BXDhvUSmpsnZ08BsCJ8E/yTC8XCXqPbzHbpa24u/ODoUpE5hGBKbm6h44ApELj1TRLnvMm50IYUDoQ4UiWGQJBAB/IfXuaLcDB3RXLhsdFbwtyHfXjiKDa/51aWIKBJmRJgilBYOLXpmyfm2ULznNCWsHTRWZDgWLX1tvRwr9p6ZquWU5sjtDwyy9LqW0axjEd8NTm7Lwj7UohWw9Hx9OCBoQMHDx44MLRfv5V9goMX11qwwM8MISUlxcysVtDK8zsmuhOkHW40ZJds8WkOMUyY9CQ7R5jyITIp6UmkHlFRUW8RCkpKSjIzM2MyMwsKYmKyuq4e05owSokBN0ehGC3rkS39FvulILIoPSIjfZFXfgtq1QoK6hkcHNwzqFZX35ji4pismGLf+g/bIlsWY8jc0CeO5jfQKWf2zOZNXcLG7Nq1a0xY2NV9TSfcmOp2pHVV99keHpZeXmg+W0/dt61+z6yiGJ1U6tyEg6wZXWyVkyMUhnHLm6aWh7c5a6U6raLuYdKaBpRjTZPEwshQUi5IbKVxsCgZYjRQLrW9uU4n1SlU962QYBlTxS/KL8nsghundBIIAofMFQ6SiqFIW63TJrIz6s5CNximEbQJjUryi0rpN6aVN/USjMAgi17hWHoZkiSTaycEJMy/xTSRLBxwXYJLIs0iM836DGnsZknoXcIxXJ8WLETnbeNOMeqvvTbKLbSJBxiXhhzustKhxME361GBWc/6l/a18uB89w2WumTjHFt7zo86CdFbxypVKsUBetR64Vu1vNTHLKsgqyDz0aMs36DVQ3aMc61qyaUmpfoGrSrx9WFA/Jy1YLJTYjulDWBKROqmVevGQ/p0dXiEEEN+fLsGrd7qygXWY+cr2FrpcA6Ahia3nNopnWYAjLnrUYOtZk3ccf72cZ20qKiY5E2Q1h9XL0P3LsHZ5tfpghDYKJ3kpzwBZrwvU2dzq9qMHV7f+WSAtIiti03QshMCdralTT+pwibPnOIvskxUeCQ04ttT69kzXHfOfxcQoIpdVwUtHaPkNsd3jL8G8LLKrte4nY1noGnnbmWz32V0PwCRUpiLi/XZZ8pu1QFmui1UdU5QKLS1m9jUTmArFBs9qNLCzFi5ozJ+qMkuhAOi3ssAaaxOoZCi/Ko9mZx+E014VN4n5CJhqi3MOa7S1a3HZltYSJXDLUk3TI5elB+/x9SGCANzl8cmbtj2jm2R0d2Gthj0cjU079U5DEBTvfpKLFulstDKN3jS3aO//2B+3lKkRVNREHVjLSwyOjdBEwrL7sTVFubNq2yCED2Z3F1l8bouqb3ybBW8lsryWwBonA9FnJiYMdyKWtyyPbSvI8s7BKBRPtbm1xZKVZPSelIuQrulr3yMeggB3Piys7y7K6llDC/X7sh24asOEVT2MSYn4ltuC6haDcuzXW2RH9fDFh2ZdX/ttZP8rBdyD/F5o/jL4eHuuBerrAHO/LZZnZWxy70AQTKNPTlkbhl1BEKk6P4aSUPmYBDJqJftjlYBBMnt7vDx/TiTwqH8r9JJFjeJeRwOrO/K5aNK8xICb+f3Dq4GA1m/9lZgd7kR3C3RLLMHXMaIUaLLlS3QkSpiW28alCVIZq5hGjd8KhlUJ12y3p756xIOKjvJj1YH8Ec8LMP4DOseIkztEifz8emybKQnumQgnNHu2SIkmW8zDg348Mb1Jv7isl3/p+k+6XFxaYIelRgYMVCl47OOVQDOLA/XovcOyH0DnzmNaqplXWQSXnTaJADphJ6nnuUfREdmwuKPBoQQWI/cZGsfUdk2YlMaj3+iBs0QAuJcfN5QNNuMEmEZhozMw58+7bHXljw/xEt/3gxg9ETZE/+pWzVaWWBeFByMT+epU3khjabVaFZTpKYTohu23fLjLwIjjCxDbSDzQfzA9qJoQfuaj3kCKmSayagX817tZmCkawZZT6qZns4TCdSP+aJUwX4AGavlHc082Z6yaj/VusJFoseBlaaP6B3YPnANKRvmxr1Q1kkz1A6dYkZLTWml9Gwg4Imej0eX9tUiqhHGej0E0zppOr2oc5BL2jF2W0h6Z319SWpgtGg8GvRjQ2ikJFau87mDTNN/vJ1+rw5Z3wEhTrIBu/0hAjXv6ZJpiB6ZYGiQqW/4nps0cR1exNW53MLu+034IxGtp4/szee35/Mb1ChXHyNjOLRKkybTSHyWNQifXoPz0zP7as0anuHxo0XR/JBKtD2UiU7KmdS/g0SSlqZW+/QIWd+wUfj1B+F7t48Y1DvwMf/5Y75AtKYZlxxYTpCBwIjtq7pI+BK1WhLN50cj8AUCRBYtSBX1HjENI0f99k85EXsbnKmZxhcgJgSBIDVVIFqydnslO0qIZYIuDlJjlcJHNhi0NiRkzdr1Ixrtn16Dq9f1HwD/bga5HGuOPh1pkv9NPw3FDXHyukKgRIhTH1Q9/uM//nl8BYlod8WjsBdLAAAAAElFTkSuQmCC",Sn="data:image/svg+xml,%3csvg%20width='98'%20height='96'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M48.854%200C21.839%200%200%2022%200%2049.217c0%2021.756%2013.993%2040.172%2033.405%2046.69%202.427.49%203.316-1.059%203.316-2.362%200-1.141-.08-5.052-.08-9.127-13.59%202.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015%204.934.326%207.523%205.052%207.523%205.052%204.367%207.496%2011.404%205.378%2014.235%204.074.404-3.178%201.699-5.378%203.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283%200-5.378%201.94-9.778%205.014-13.2-.485-1.222-2.184-6.275.486-13.038%200%200%204.125-1.304%2013.426%205.052a46.97%2046.97%200%200%201%2012.214-1.63c4.125%200%208.33.571%2012.213%201.63%209.302-6.356%2013.427-5.052%2013.427-5.052%202.67%206.763.97%2011.816.485%2013.038%203.155%203.422%205.015%207.822%205.015%2013.2%200%2018.905-11.404%2023.06-22.324%2024.283%201.78%201.548%203.316%204.481%203.316%209.126%200%206.6-.08%2011.897-.08%2013.526%200%201.304.89%202.853%203.316%202.364%2019.412-6.52%2033.405-24.935%2033.405-46.691C97.707%2022%2075.788%200%2048.854%200z'%20fill='%2324292f'/%3e%3c/svg%3e",yn="/rmp/assets/opencollective-icon-Ciasch0w.webp",Cn="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2023.0.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20270%20270'%20style='enable-background:new%200%200%20270%20270;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23E01E5A;}%20.st1{fill:%2336C5F0;}%20.st2{fill:%232EB67D;}%20.st3{fill:%23ECB22E;}%20%3c/style%3e%3cg%3e%3cg%3e%3cpath%20class='st0'%20d='M99.4,151.2c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h12.9V151.2z'/%3e%3cpath%20class='st0'%20d='M105.9,151.2c0-7.1,5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v32.3c0,7.1-5.8,12.9-12.9,12.9%20s-12.9-5.8-12.9-12.9V151.2z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M118.8,99.4c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v12.9H118.8z'/%3e%3cpath%20class='st1'%20d='M118.8,105.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9H86.5c-7.1,0-12.9-5.8-12.9-12.9%20s5.8-12.9,12.9-12.9H118.8z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st2'%20d='M170.6,118.8c0-7.1,5.8-12.9,12.9-12.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9h-12.9V118.8z'/%3e%3cpath%20class='st2'%20d='M164.1,118.8c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9V86.5c0-7.1,5.8-12.9,12.9-12.9%20c7.1,0,12.9,5.8,12.9,12.9V118.8z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st3'%20d='M151.2,170.6c7.1,0,12.9,5.8,12.9,12.9c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9v-12.9H151.2z'/%3e%3cpath%20class='st3'%20d='M151.2,164.1c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h32.3c7.1,0,12.9,5.8,12.9,12.9%20c0,7.1-5.8,12.9-12.9,12.9H151.2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",zn=s=>{const{isOpen:a,onClose:i}=s,{t:n}=L(),o=M.getAppVersion();return e.jsxs(Y,{isOpen:a,onClose:i,size:"xl",scrollBehavior:"inside",children:[e.jsx(F,{}),e.jsxs(J,{children:[e.jsx(q,{children:n("header.about.title")}),e.jsx(X,{}),e.jsxs(Q,{paddingBottom:10,children:[e.jsxs(Ms,{direction:"row",children:[e.jsx(at,{boxSize:"128px",src:"/rmp//logo192.png"}),e.jsxs(Ms,{direction:"column",width:"100%",alignItems:"center",justifyContent:"center",children:[e.jsx(w,{fontSize:"xl",as:"b",children:n("header.about.rmp")}),e.jsx(w,{children:o}),e.jsx(w,{}),e.jsx(w,{fontSize:"sm",children:n("header.about.railmapgen")})]})]}),e.jsx(T,{margin:5,children:e.jsx(w,{fontSize:"xl",children:n("header.about.desc")})}),e.jsx(Ce,{as:"h5",size:"sm",mt:3,mb:2,children:n("header.about.contributors")}),e.jsx(Ce,{as:"h6",size:"xs",my:2,children:n("header.about.coreContributors")}),e.jsxs(Ne,{children:[e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/thekingofcity","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/thekingofcity.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"thekingofcity"}),e.jsx(w,{fontSize:"sm",children:n("header.about.content1")}),e.jsx(w,{fontSize:"sm",align:"right",mb:1,children:n("header.about.content2")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/langonginc","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/langonginc.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"langonginc"}),e.jsx(w,{fontSize:"sm",children:n("header.about.langonginc")}),e.jsx(w,{fontSize:"sm",align:"right",mb:1,children:"--Avicii"})]})]})]}),e.jsx(Ce,{as:"h6",size:"xs",my:2,children:n("header.about.styleContributors")}),e.jsxs(Ne,{children:[e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/203IhzElttil","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/203IhzElttil.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"203IhzElttil"}),e.jsx(w,{fontSize:"sm",mb:1,children:n("header.about.203IhzElttil")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/Swiftiecott","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/Swiftiecott.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"Swiftiecott"}),e.jsx(w,{fontSize:"sm",mb:1,children:n("header.about.Swiftiecott")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/Minwtraft","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/Minwtraft.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"Minwtraft"}),e.jsx(w,{fontSize:"sm",mb:1,children:n("header.about.Minwtraft")})]})]})]}),e.jsx(Ce,{as:"h5",size:"sm",mt:3,mb:2,children:n("header.about.contactUs")}),e.jsxs(Ne,{children:[e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/railmapgen/rmp/issues","_blank"),cursor:"pointer",children:[e.jsx(re,{src:Sn,size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.about.github")}),e.jsx(w,{fontSize:"sm",children:n("header.about.githubContent")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://join.slack.com/t/railmapgenerator/shared_invite/zt-1odhhta3n-DdZF~fnVwo_q0S0RJmgV8A","_blank"),cursor:"pointer",children:[e.jsx(re,{src:Cn,size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.about.slack")}),e.jsx(w,{fontSize:"sm",children:n("header.about.slackContent")}),e.jsx(w,{fontSize:"sm",as:"i",children:"#rmp, #gallery, #rmg, #palette-and-templates"})]})]})]}),e.jsx(Ce,{as:"h5",size:"sm",mt:3,mb:2,children:n("header.donation.title")}),e.jsxs(Ne,{children:[e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://afdian.com/a/rail-map-toolkit","_blank"),cursor:"pointer",children:[e.jsx(re,{src:wn,size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",pb:1,children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.donation.afdian")}),e.jsx(w,{fontSize:"sm",children:n("header.donation.viaCNY")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://opencollective.com/rail-map-toolkit","_blank"),cursor:"pointer",children:[e.jsx(re,{src:yn,size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",pb:1,children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.donation.openCollective")}),e.jsx(w,{fontSize:"sm",children:n("header.donation.viaUSD")})]})]})]})]})]})]})};/*! +import{j as e,ag as Y,M as F,ah as q,J,K as X,L as Q,h as Ms,ai as at,N as w,B as T,aj as Ce,ak as Ne,T as ne,al as re,b as oe,q as $e,t as E,O as xe,am as lt,an as ct,ao as ye,R as O,ap as N,Q as Ds,aq as fs,ar as js,a2 as ee,as as bs,at as ce,x as le,au as es,av as dt,aw as Us,a8 as Zs,e as Vs,w as Ks,m as Ys,E as Fs,ax as ze,a7 as De,a1 as ht,ay as ut,az as pt,aA as D,aB as As,aC as gt,aD as k,aE as C,aF as mt,k as xt,W as ie,U as ft,V as jt}from"./chakra-BF_mGyXb.js";import{u as bt,r as M,C as wt,M as ws,L as qs,n as ls,S as I,R as Ts,a as Js,b as R,c as P,d as B,e as St,f as yt,g as Ct,h as zt,i as ke,E as Me,s as vt,j as Ye,k as ss,m as kt,l as Rs,o as Ot,p as Ss,q as K,t as V,v as se,w as Xs,x as Qs,y as cs,z as Oe,A as Ie,B as Es,D as Ns,F as Mt,G as At,H as Tt,I as Rt,J as Et,K as _s,N as Nt,O as _t,P as It,Q as Ht,T as Wt,U as Lt,V as Bt,W as Pt,X as Gt,Y as Dt,Z as Ut,_ as Zt,$ as Vt,a0 as Kt,a1 as Yt,a2 as Ft,a3 as Ue,a4 as fe,a5 as qt,a6 as Jt,a7 as Xt,a8 as Qt,a9 as pe,aa as $t,ab as en,ac as Is,ad as sn,ae as ts,af as tn,ag as nn,ah as rn,ai as on,aj as an,ak as ln,al as cn,am as dn,an as hn,ao as un}from"./index-CsgTWcmq.js";import{u as L,b,a as Ze,T as Hs}from"./react-0YWW4C_I.js";import{d as ds,m as pn,a as gn,i as mn,s as xn,u as ys,M as fn}from"./master-manager-DW7JCfNm.js";import{C as jn}from"./change-type-modal-Cu7YVLn7.js";var Ws=function(s){return bt(M.ready(),s)},bn={ar:{ar:"العربية",en:"Arabic",ko:"아랍어","zh-Hans":"阿拉伯文","zh-Hant":"阿拉伯文"},az:{az:"Azərbaycanca",en:"Azerbaijani",ko:"아제르바이잔어","zh-Hans":"阿塞拜疆文","zh-Hant":"阿塞拜疆文"},ca:{ca:"Català",en:"Catalan",ko:"카탈루냐어","zh-Hans":"加泰罗尼亚文","zh-Hant":"加泰隆尼亞文"},da:{da:"Dansk",en:"Danish",ko:"덴마크어","zh-Hans":"丹麦文","zh-Hant":"丹麥文"},de:{de:"Deutsch",en:"German",ko:"독일어","zh-Hans":"德文","zh-Hant":"德文"},el:{el:"Ελληνικά",en:"Greek",ko:"그리스어","zh-Hans":"希腊文","zh-Hant":"希臘文"},en:{en:"English",ja:"英語",ko:"영어","zh-Hans":"英文","zh-Hant":"英文"},es:{en:"Spanish",es:"Español",ko:"스페인어","zh-Hans":"西班牙文","zh-Hant":"西班牙文"},fa:{en:"Persian",fa:"فارسی",ko:"페르시아어","zh-Hans":"波斯文","zh-Hant":"波斯文"},fr:{en:"French",fr:"Français",ko:"프랑스어","zh-Hans":"法文","zh-Hant":"法文"},ga:{en:"Irish",ga:"Gaeilge",ko:"아일랜드어","zh-Hans":"爱尔兰文","zh-Hant":"愛爾蘭文"},gd:{en:"Scottish Gaelic",gd:"Gàidhlig",ko:"스코틀랜드 게일어","zh-Hans":"苏格兰盖尔文","zh-Hant":"蘇格蘭蓋爾文"},hi:{en:"Hindi",hi:"हिन्दी",ko:"힌디어","zh-Hans":"印地文","zh-Hant":"印地文"},hu:{en:"Hungarian",hu:"Magyar",ko:"헝가리어","zh-Hans":"匈牙利文","zh-Hant":"匈牙利文"},id:{en:"Indoesian",id:"Bahasa Indonesia",ko:"인도네시아어","zh-Hans":"印尼文","zh-Hant":"印尼文"},it:{en:"Italian",it:"Italiano",ko:"이탈리아어","zh-Hans":"意大利文","zh-Hant":"意大利文"},ja:{en:"Japanese",ja:"日本語",ko:"일본어","zh-Hans":"日文","zh-Hant":"日文"},kk:{en:"Kazakh",kk:"Қазақша",ko:"카자흐어","zh-Hans":"哈萨克文","zh-Hant":"哈薩克文"},ko:{en:"Korean",ja:"韓国語",ko:"한국어","zh-Hans":"韩文","zh-Hant":"韓文"},ms:{en:"Malay",ko:"말레이어",ms:"Bahasa Melayu","zh-Hans":"马来文","zh-Hant":"馬來文"},no:{en:"Norwegian",ko:"노르웨이어",no:"Norsk","zh-Hans":"挪威文","zh-Hant":"挪威文"},pl:{en:"Polish",ko:"폴란드어",pl:"Polski","zh-Hans":"波兰文","zh-Hant":"波蘭文"},pt:{en:"Portuguese",ko:"포르투갈어",pt:"Português","zh-Hans":"葡萄牙文","zh-Hant":"葡萄牙文"},ro:{en:"Romanian",ko:"루마니아어",ro:"Română","zh-Hans":"罗马尼亚文","zh-Hant":"羅馬尼亞文"},ru:{en:"Russian",ko:"러시아어",ru:"Русский","zh-Hans":"俄文","zh-Hant":"俄文"},sv:{en:"Swedish",ko:"스웨덴어",sv:"Svenska","zh-Hans":"瑞典文","zh-Hant":"瑞典文"},th:{en:"Thai",ko:"태국어",th:"ภาษาไทย","zh-Hans":"泰文","zh-Hant":"泰文"},tr:{en:"Turkish",ko:"튀르키예어",tr:"Türkçe","zh-Hans":"土耳其文","zh-Hant":"土耳其文"},uk:{en:"Ukrainian",ko:"우크라이나어",uk:"Українська","zh-Hans":"乌克兰文","zh-Hant":"烏克蘭文"},ur:{en:"Urdo",ko:"우르두어",ur:"اردو","zh-Hans":"乌尔都文","zh-Hant":"烏爾都文"},uz:{en:"Uzbek",ko:"우즈베크어",uz:"Oʻzbekcha","zh-Hans":"乌兹别克文","zh-Hant":"烏茲別克文"},vi:{en:"Vietnamese",ko:"베트남어",vi:"Tiếng Việt","zh-Hans":"越南文","zh-Hant":"越南文"},zh:{en:"Chinese",ja:"中国語",ko:"중국어",zh:"中文","zh-Hans":"中文","zh-Hant":"中文"},"zh-Hans":{en:"Simplified Chinese",ja:"中国語(簡体字)",ko:"중국어 간체자","zh-Hans":"简体中文","zh-Hant":"簡體中文"},"zh-Hant":{en:"Traditional Chinese",ja:"中国語(繁体字)",ko:"중국어 정체자","zh-Hans":"繁体中文","zh-Hant":"繁體中文"}};const wn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAC9FBMVEUAAACabOutif+ve/+FbLiVcuaQaOCWb+WYceiLYtuccOingvOYcOeRad6ZcuifeumXcOWhfO6jfPCmhPOUa+aLYtyac+iVbuSMZN2VbeWNZt6RaeGRauKhee2acumQauClfvGTa+OOZd6JYNqWb+Sog/SSauGPaOCogvSNZN2NZN2ngfKogvSngPOfeu6bdemTauSlfvGYcOiohPSngfKQaOCXb+aifO+XcOaVbuWTbOOogfOlf/GmgPKTbOOYceaMZN2pg/WQaN+hee2OZt6RaeCRauGKYtuSa9+bdOmog/SifO+ddumie+6Zcuelf/GSa+Ked+uYcealf/GSauGJYdqpg/SQaOCJYduOZd6jffCJX9qNZN6mgfKMZN2SauKfeOyKYtuXcOWpg/SngfOdduuJYNqQaN+WbuWUbeWmgfOLY9yUbOWlf/GZceeKYNqOaN6mgvKpgvSZceiMZNyVb+WNZt2cdumSauOfee2Wb+WPaN+geu2ddeqMZNypg/Wheu6lf/GZcueJYNmQaN+jffCTbOSphPWog/SWb+WmgPKWb+aYcuekf/Gac+iKYtuVbuWWbuSogvSSa+KWb+SOZt6ifO+feeyngfKRaeGpg/SYcOefeOujfe+VbeSMZd6ac+iJYdqVbeSog/OVbOWcdeqKYtungvObdOmfd+uSa+KNZNyeduuRaeGjfe+XcOWMY9ybdOmngvSOZt6UbuWacuiSbOKgee2bdOmMY9yVbuOmgvSUbeKviP6xif+UaueVa+mMY92ZcOyqhPaOZOKuh/2shPybcu2mf/WhePKcdO6ddeyYb+qZceirhPmpgfmedfCacuuWbuWogfemffefdfKacuqSaOaPZeSRaOKyiv+qg/iogvShd/SYbuyWbeiQZuWNZN+MYt+thvqlffSie/CXbeqTaOeKYdu1jP+jevOccvCbce6Xbeuth/uqgvukevinf/eiePaVau2WbOqXb+ahdvuUaumfdPehee+thP6bb/MemaUsAAAAvXRSTlMAAwEEAwb+/Qv6Cfv8IRAOXiwaFP7++9p3TkwvJSEeGf7++/r59+ri0MmCeFZCPjk3NDEk9PHi4NLIwq2djHp1bmNZUVBIPzwU/v38+fj49/bz6+rl5N7a0s7Hw8LAvq+opqSjlZOSiIBuaGRjYmJaVU1HREQ1KykW+/X19O7r6OXf29vV0c3Mxry4taupnpqZlZGRi4uGgXxzbWtjWlJG8/Px7ezk3dfQwbq4tp2Zh3t6cVxaVtrXz7GdcGlhNM13AAAH1ElEQVRYw+1YVVgbQRDezd2RkODu7pS6u7u7u7u7u7u7u7slkCZESUKCuxQoLVD3vnSPSyW9S6ClD33o/xHOdv6b2f1nZhPwH//xz4EFcRwi/CU2RKY/hayK0+EYdWhr6eGN6CrKCEk6qzZNtwxY0Wtxr8EtK8qIob+Zo/v6i7Ozk8U54jeFMwFeoaUAcMIA/2RxrjhZ6O9v7n/szWjA+nMXkWWbAbni3Nzk3BXDhvUSmpsnZ08BsCJ8E/yTC8XCXqPbzHbpa24u/ODoUpE5hGBKbm6h44ApELj1TRLnvMm50IYUDoQ4UiWGQJBAB/IfXuaLcDB3RXLhsdFbwtyHfXjiKDa/51aWIKBJmRJgilBYOLXpmyfm2ULznNCWsHTRWZDgWLX1tvRwr9p6ZquWU5sjtDwyy9LqW0axjEd8NTm7Lwj7UohWw9Hx9OCBoQMHDx44MLRfv5V9goMX11qwwM8MISUlxcysVtDK8zsmuhOkHW40ZJds8WkOMUyY9CQ7R5jyITIp6UmkHlFRUW8RCkpKSjIzM2MyMwsKYmKyuq4e05owSokBN0ehGC3rkS39FvulILIoPSIjfZFXfgtq1QoK6hkcHNwzqFZX35ji4pismGLf+g/bIlsWY8jc0CeO5jfQKWf2zOZNXcLG7Nq1a0xY2NV9TSfcmOp2pHVV99keHpZeXmg+W0/dt61+z6yiGJ1U6tyEg6wZXWyVkyMUhnHLm6aWh7c5a6U6raLuYdKaBpRjTZPEwshQUi5IbKVxsCgZYjRQLrW9uU4n1SlU962QYBlTxS/KL8nsghundBIIAofMFQ6SiqFIW63TJrIz6s5CNximEbQJjUryi0rpN6aVN/USjMAgi17hWHoZkiSTaycEJMy/xTSRLBxwXYJLIs0iM836DGnsZknoXcIxXJ8WLETnbeNOMeqvvTbKLbSJBxiXhhzustKhxME361GBWc/6l/a18uB89w2WumTjHFt7zo86CdFbxypVKsUBetR64Vu1vNTHLKsgqyDz0aMs36DVQ3aMc61qyaUmpfoGrSrx9WFA/Jy1YLJTYjulDWBKROqmVevGQ/p0dXiEEEN+fLsGrd7qygXWY+cr2FrpcA6Ahia3nNopnWYAjLnrUYOtZk3ccf72cZ20qKiY5E2Q1h9XL0P3LsHZ5tfpghDYKJ3kpzwBZrwvU2dzq9qMHV7f+WSAtIiti03QshMCdralTT+pwibPnOIvskxUeCQ04ttT69kzXHfOfxcQoIpdVwUtHaPkNsd3jL8G8LLKrte4nY1noGnnbmWz32V0PwCRUpiLi/XZZ8pu1QFmui1UdU5QKLS1m9jUTmArFBs9qNLCzFi5ozJ+qMkuhAOi3ssAaaxOoZCi/Ko9mZx+E014VN4n5CJhqi3MOa7S1a3HZltYSJXDLUk3TI5elB+/x9SGCANzl8cmbtj2jm2R0d2Gthj0cjU079U5DEBTvfpKLFulstDKN3jS3aO//2B+3lKkRVNREHVjLSwyOjdBEwrL7sTVFubNq2yCED2Z3F1l8bouqb3ybBW8lsryWwBonA9FnJiYMdyKWtyyPbSvI8s7BKBRPtbm1xZKVZPSelIuQrulr3yMeggB3Piys7y7K6llDC/X7sh24asOEVT2MSYn4ltuC6haDcuzXW2RH9fDFh2ZdX/ttZP8rBdyD/F5o/jL4eHuuBerrAHO/LZZnZWxy70AQTKNPTlkbhl1BEKk6P4aSUPmYBDJqJftjlYBBMnt7vDx/TiTwqH8r9JJFjeJeRwOrO/K5aNK8xICb+f3Dq4GA1m/9lZgd7kR3C3RLLMHXMaIUaLLlS3QkSpiW28alCVIZq5hGjd8KhlUJ12y3p756xIOKjvJj1YH8Ec8LMP4DOseIkztEifz8emybKQnumQgnNHu2SIkmW8zDg348Mb1Jv7isl3/p+k+6XFxaYIelRgYMVCl47OOVQDOLA/XovcOyH0DnzmNaqplXWQSXnTaJADphJ6nnuUfREdmwuKPBoQQWI/cZGsfUdk2YlMaj3+iBs0QAuJcfN5QNNuMEmEZhozMw58+7bHXljw/xEt/3gxg9ETZE/+pWzVaWWBeFByMT+epU3khjabVaFZTpKYTohu23fLjLwIjjCxDbSDzQfzA9qJoQfuaj3kCKmSayagX817tZmCkawZZT6qZns4TCdSP+aJUwX4AGavlHc082Z6yaj/VusJFoseBlaaP6B3YPnANKRvmxr1Q1kkz1A6dYkZLTWml9Gwg4Imej0eX9tUiqhHGej0E0zppOr2oc5BL2jF2W0h6Z319SWpgtGg8GvRjQ2ikJFau87mDTNN/vJ1+rw5Z3wEhTrIBu/0hAjXv6ZJpiB6ZYGiQqW/4nps0cR1exNW53MLu+034IxGtp4/szee35/Mb1ChXHyNjOLRKkybTSHyWNQifXoPz0zP7as0anuHxo0XR/JBKtD2UiU7KmdS/g0SSlqZW+/QIWd+wUfj1B+F7t48Y1DvwMf/5Y75AtKYZlxxYTpCBwIjtq7pI+BK1WhLN50cj8AUCRBYtSBX1HjENI0f99k85EXsbnKmZxhcgJgSBIDVVIFqydnslO0qIZYIuDlJjlcJHNhi0NiRkzdr1Ixrtn16Dq9f1HwD/bga5HGuOPh1pkv9NPw3FDXHyukKgRIhTH1Q9/uM//nl8BYlod8WjsBdLAAAAAElFTkSuQmCC",Sn="data:image/svg+xml,%3csvg%20width='98'%20height='96'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M48.854%200C21.839%200%200%2022%200%2049.217c0%2021.756%2013.993%2040.172%2033.405%2046.69%202.427.49%203.316-1.059%203.316-2.362%200-1.141-.08-5.052-.08-9.127-13.59%202.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015%204.934.326%207.523%205.052%207.523%205.052%204.367%207.496%2011.404%205.378%2014.235%204.074.404-3.178%201.699-5.378%203.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283%200-5.378%201.94-9.778%205.014-13.2-.485-1.222-2.184-6.275.486-13.038%200%200%204.125-1.304%2013.426%205.052a46.97%2046.97%200%200%201%2012.214-1.63c4.125%200%208.33.571%2012.213%201.63%209.302-6.356%2013.427-5.052%2013.427-5.052%202.67%206.763.97%2011.816.485%2013.038%203.155%203.422%205.015%207.822%205.015%2013.2%200%2018.905-11.404%2023.06-22.324%2024.283%201.78%201.548%203.316%204.481%203.316%209.126%200%206.6-.08%2011.897-.08%2013.526%200%201.304.89%202.853%203.316%202.364%2019.412-6.52%2033.405-24.935%2033.405-46.691C97.707%2022%2075.788%200%2048.854%200z'%20fill='%2324292f'/%3e%3c/svg%3e",yn="/rmp/assets/opencollective-icon-Ciasch0w.webp",Cn="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2023.0.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20270%20270'%20style='enable-background:new%200%200%20270%20270;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23E01E5A;}%20.st1{fill:%2336C5F0;}%20.st2{fill:%232EB67D;}%20.st3{fill:%23ECB22E;}%20%3c/style%3e%3cg%3e%3cg%3e%3cpath%20class='st0'%20d='M99.4,151.2c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h12.9V151.2z'/%3e%3cpath%20class='st0'%20d='M105.9,151.2c0-7.1,5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v32.3c0,7.1-5.8,12.9-12.9,12.9%20s-12.9-5.8-12.9-12.9V151.2z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M118.8,99.4c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v12.9H118.8z'/%3e%3cpath%20class='st1'%20d='M118.8,105.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9H86.5c-7.1,0-12.9-5.8-12.9-12.9%20s5.8-12.9,12.9-12.9H118.8z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st2'%20d='M170.6,118.8c0-7.1,5.8-12.9,12.9-12.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9h-12.9V118.8z'/%3e%3cpath%20class='st2'%20d='M164.1,118.8c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9V86.5c0-7.1,5.8-12.9,12.9-12.9%20c7.1,0,12.9,5.8,12.9,12.9V118.8z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st3'%20d='M151.2,170.6c7.1,0,12.9,5.8,12.9,12.9c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9v-12.9H151.2z'/%3e%3cpath%20class='st3'%20d='M151.2,164.1c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h32.3c7.1,0,12.9,5.8,12.9,12.9%20c0,7.1-5.8,12.9-12.9,12.9H151.2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",zn=s=>{const{isOpen:a,onClose:i}=s,{t:n}=L(),o=M.getAppVersion();return e.jsxs(Y,{isOpen:a,onClose:i,size:"xl",scrollBehavior:"inside",children:[e.jsx(F,{}),e.jsxs(q,{children:[e.jsx(J,{children:n("header.about.title")}),e.jsx(X,{}),e.jsxs(Q,{paddingBottom:10,children:[e.jsxs(Ms,{direction:"row",children:[e.jsx(at,{boxSize:"128px",src:"/rmp//logo192.png"}),e.jsxs(Ms,{direction:"column",width:"100%",alignItems:"center",justifyContent:"center",children:[e.jsx(w,{fontSize:"xl",as:"b",children:n("header.about.rmp")}),e.jsx(w,{children:o}),e.jsx(w,{}),e.jsx(w,{fontSize:"sm",children:n("header.about.railmapgen")})]})]}),e.jsx(T,{margin:5,children:e.jsx(w,{fontSize:"xl",children:n("header.about.desc")})}),e.jsx(Ce,{as:"h5",size:"sm",mt:3,mb:2,children:n("header.about.contributors")}),e.jsx(Ce,{as:"h6",size:"xs",my:2,children:n("header.about.coreContributors")}),e.jsxs(Ne,{children:[e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/thekingofcity","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/thekingofcity.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"thekingofcity"}),e.jsx(w,{fontSize:"sm",children:n("header.about.content1")}),e.jsx(w,{fontSize:"sm",align:"right",mb:1,children:n("header.about.content2")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/langonginc","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/langonginc.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"langonginc"}),e.jsx(w,{fontSize:"sm",children:n("header.about.langonginc")}),e.jsx(w,{fontSize:"sm",align:"right",mb:1,children:"--Avicii"})]})]})]}),e.jsx(Ce,{as:"h6",size:"xs",my:2,children:n("header.about.styleContributors")}),e.jsxs(Ne,{children:[e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/203IhzElttil","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/203IhzElttil.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"203IhzElttil"}),e.jsx(w,{fontSize:"sm",mb:1,children:n("header.about.203IhzElttil")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/Swiftiecott","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/Swiftiecott.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"Swiftiecott"}),e.jsx(w,{fontSize:"sm",mb:1,children:n("header.about.Swiftiecott")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/Minwtraft","_blank"),cursor:"pointer",children:[e.jsx(re,{src:"https://github.com/Minwtraft.png",size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:"Minwtraft"}),e.jsx(w,{fontSize:"sm",mb:1,children:n("header.about.Minwtraft")})]})]})]}),e.jsx(Ce,{as:"h5",size:"sm",mt:3,mb:2,children:n("header.about.contactUs")}),e.jsxs(Ne,{children:[e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/railmapgen/rmp/issues","_blank"),cursor:"pointer",children:[e.jsx(re,{src:Sn,size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.about.github")}),e.jsx(w,{fontSize:"sm",children:n("header.about.githubContent")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://join.slack.com/t/railmapgenerator/shared_invite/zt-1odhhta3n-DdZF~fnVwo_q0S0RJmgV8A","_blank"),cursor:"pointer",children:[e.jsx(re,{src:Cn,size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.about.slack")}),e.jsx(w,{fontSize:"sm",children:n("header.about.slackContent")}),e.jsx(w,{fontSize:"sm",as:"i",children:"#rmp, #gallery, #rmg, #palette-and-templates"})]})]})]}),e.jsx(Ce,{as:"h5",size:"sm",mt:3,mb:2,children:n("header.donation.title")}),e.jsxs(Ne,{children:[e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://afdian.com/a/rail-map-toolkit","_blank"),cursor:"pointer",children:[e.jsx(re,{src:wn,size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",pb:1,children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.donation.afdian")}),e.jsx(w,{fontSize:"sm",children:n("header.donation.viaCNY")})]})]}),e.jsxs(ne,{size:"lg",w:"85%",onClick:()=>window.open("https://opencollective.com/rail-map-toolkit","_blank"),cursor:"pointer",children:[e.jsx(re,{src:yn,size:"lg",my:2,ml:-1,mr:2}),e.jsxs(oe,{display:"block",width:"100%",pb:1,children:[e.jsx(w,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.donation.openCollective")}),e.jsx(w,{fontSize:"sm",children:n("header.donation.viaUSD")})]})]})]})]})]})]})};/*! * canvas-size * v2.0.0 * https://github.com/jhildenbiddle/canvas-size * (c) 2015-2024 John Hildenbiddle * MIT license - */function He(s){const a=s.sizes.shift(),i=Math.max(Math.ceil(a[0]),1),n=Math.max(Math.ceil(a[1]),1),o=[i-1,n-1,1,1],t=performance.now(),r=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope;let h,g;r?(h=new OffscreenCanvas(1,1),g=new OffscreenCanvas(i,n)):(h=document.createElement("canvas"),h.width=1,h.height=1,g=document.createElement("canvas"),g.width=i,g.height=n);const f=h.getContext("2d"),d=g.getContext("2d");d&&(d.fillRect.apply(d,o),f.drawImage(g,i-1,n-1,1,1,0,0,1,1));const m=f&&f.getImageData(0,0,1,1).data[3]!==0,l=parseInt(performance.now()-t);return[h,g].forEach(u=>{u.height=0,u.width=0}),r?(postMessage({width:i,height:n,testTime:l,isTestPass:m}),!m&&s.sizes.length&&setTimeout(()=>{He(s)},0)):m?s.onSuccess({width:i,height:n,testTime:l}):(s.onError({width:i,height:n,testTime:l}),s.sizes.length&&setTimeout(()=>{He(s)},0)),m}const ns={area:[16384,14188,11402,11180,10836,8192,4096,1],height:[8388607,65535,32767,16384,8192,4096,1],width:[4194303,65535,32767,16384,8192,4096,1]},ve={max:null,min:1,sizes:[],step:1024,useWorker:!1,onError:Function.prototype,onSuccess:Function.prototype},Ee={};function rs(s){const a=s.width===s.height,i=s.height===1,n=s.width===1,o=[];if(!s.width||!s.height)s.sizes.forEach(t=>{const r=a||i?t:1,h=a||n?t:1;o.push([r,h])});else{const t=s.min||ve.min,r=s.step||ve.step;let h=Math.max(s.width,s.height);for(;h>=t;){const g=a||i?h:1,f=a||n?h:1;o.push([g,f]),h-=r}}return o}function Ve(s){const a=typeof window<"u",i=a&&"Promise"in window,n=a&&"HTMLCanvasElement"in window,o=a&&"OffscreenCanvas"in window,t=URL.createObjectURL(new Blob([])).slice(-36),r=performance.now(),{onError:h,onSuccess:g,...f}=s,d=()=>parseInt(performance.now()-r);let m=null;if(!n)return!1;if(s.useWorker&&o){const l="\n var canvasTest = ".concat(He.toString(),";\n onmessage = function(e) {\n canvasTest(e.data);\n };\n "),u=new Blob([l],{type:"application/javascript"}),c=URL.createObjectURL(u);m=new Worker(c),URL.revokeObjectURL(c),m.onmessage=function(p){const{width:x,height:j,testTime:S,isTestPass:y}=p.data,A={width:x,height:j,testTime:S,totalTime:d()};y?(Ee[t].onSuccess(A),delete Ee[t]):Ee[t].onError(A)}}if(i)return new Promise(l=>{const u={...s,onError(c){let{width:p,height:x,testTime:j}=c;const S={width:p,height:x,testTime:j,totalTime:d()};let y;if(s.sizes.length===0)y=!0;else{const[[A,H]]=s.sizes.slice(-1);y=p===A&&x===H}h(S),y&&l({...S,success:!1})},onSuccess(c){let{width:p,height:x,testTime:j}=c;const S={width:p,height:x,testTime:j,totalTime:d()};g(S),l({...S,success:!0})}};if(m){const{onError:c,onSuccess:p}=u;Ee[t]={onError:c,onSuccess:p},m.postMessage(f)}else He(u)});if(m)Ee[t]={onError:h,onSuccess:g},m.postMessage(f);else return He(s)}const vn={maxArea(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const a=rs({width:s.max,height:s.max,min:s.min,step:s.step,sizes:[...ns.area]}),i={...ve,...s,sizes:a};return Ve(i)},maxHeight(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const a=rs({width:1,height:s.max,min:s.min,step:s.step,sizes:[...ns.height]}),i={...ve,...s,sizes:a};return Ve(i)},maxWidth(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const a=rs({width:s.max,height:1,min:s.min,step:s.step,sizes:[...ns.width]}),i={...ve,...s,sizes:a};return Ve(i)},test(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const a={...ve,...s};return a.sizes=[...a.sizes],a.width&&a.height&&(a.sizes=[[a.width,a.height]]),Ve(a)}};var We=(s=>(s.left="l",s.right="r",s))(We||{}),be=(s=>(s.through="through",s.nonThrough="nonthrough",s))(be||{}),Fe=(s=>(s.local="local",s.express="express",s.direct="direct",s))(Fe||{}),ge=(s=>(s.MTR="mtr",s.GZMTR="gzmtr",s.SHMetro="shmetro",s))(ge||{}),Cs=(s=>(s.sh="sh",s.sh2020="sh2020",s))(Cs||{});const de=new Set,hs=new Set,us=new Set,ps=new Set,gs=new Map,me=new Map,os=new Set,is=new Map,Z=new Map;let _=[],_e=0;const Ke=new Map,as=new Map,ms=new Set,kn={localisedName:{en:"LEFT END"},num:"00",services:[Fe.local],parents:[],children:["lineend"],transfer:{groups:[{}],tick_direc:We.right,paid_area:!0},loop_pivot:!1,one_line:!0,int_padding:355},On={localisedName:{en:"RIGHT END"},num:"00",services:[Fe.local],parents:[],children:[],transfer:{groups:[{}],tick_direc:We.right,paid_area:!0},loop_pivot:!1,one_line:!0,int_padding:355},Mn={},$s={svgWidth:{destination:1500,runin:1500,railmap:1500,indoor:1500},svg_height:400,style:ge.SHMetro,y_pc:50,padding:10,branchSpacingPct:33,direction:We.right,platform_num:"1",theme:[wt.Shanghai,"sh1","#E3002B",ws.white],line_name:["地鐵線","Metro Line"],current_stn_idx:"jlaMj2",stn_list:Mn,namePosMTR:{isStagger:!0,isFlip:!0},customiseMTRDest:{isLegacy:!1,terminal:!1},line_num:"1",psd_num:"1",info_panel_type:Cs.sh,direction_gz_x:40,direction_gz_y:70,coline:{},loop:!1,loop_info:{bank:!0,left_and_right_factor:0,bottom_factor:1}},An={localisedName:{},num:"",services:[Fe.local],parents:[],children:[],transfer:{groups:[{}],tick_direc:We.right,paid_area:!0},loop_pivot:!1,one_line:!0,int_padding:355},z=s=>"".concat(s[0],"/").concat(s[1],"=").concat(s[2]).concat(s[3]),zs=s=>Js.includes(s),Tn=s=>{if(zs(s.style))return structuredClone(s[s.style].color)},Rn=(s,a)=>{const[i,n]=s.extremities(a),o=s.getEdgeAttributes(a),t=o.style;if(i!=n&&zs(t)){const r=Tn(o);ps.has(z(r))||(us.add(r),ps.add(z(r)),gs.set(r,i),me.set(z(r),new Set)),me.get(z(r)).add(i),me.get(z(r)).add(n),Z.has(i)?_.push({target:n,next:Z.get(i),color:r}):_.push({target:n,next:-1,color:r}),Z.set(i,_e),_e++,Z.has(n)?_.push({target:i,next:Z.get(n),color:r}):_.push({target:i,next:-1,color:r}),Z.set(n,_e),_e++}},et=(s,a,i)=>{if(me.get(z(i)).has(s)){me.get(z(i)).delete(s);for(let n=Z.get(s);n!=-1;n=_[n].next){const o=_[n].target,t=_[n].color;z(t)==z(i)&&et(o,s,i)}}},st=(s,a,i)=>{if(de.has(s))return;de.add(s);let n=0;const o=new Set;for(let t=Z.get(s);t!=-1;t=_[t].next){const r=_[t].target,h=_[t].color;z(h)==z(i)&&(o.has(r)||(o.add(r),n++,r!=a&&st(r,s,i)))}Ke.set(s,n)},Ls=(s,a)=>{const i=s.stn_list.lineend.parents;i.push(a),s.stn_list.lineend.parents=structuredClone(i).reverse(),s.stn_list.lineend.branch={...s.stn_list.lineend.branch,left:s.stn_list.lineend.parents.length==2?[be.through,i[1]]:void 0}},En=(s,a)=>{let i=0;for(let n=Z.get(s);n!=-1;n=_[n].next){_[n].target;const o=_[n].color;z(o)==z(a)&&i++}return i},tt=(s,a,i)=>{if(ms.has(s))return[];ms.add(s);const n=[];for(let o=Z.get(s);o!=-1;o=_[o].next){const t=_[o].target,r=_[o].color;t!=a&&z(r)==z(i)&&(t.startsWith("stn")?n.push(t):n.push(...tt(t,s,i)))}return n},xs=(s,a,i,n,o,t,r)=>{var l;if(de.has(s)&&(!s.startsWith("misc_node_")&&r.stn_list[s]==null||s.startsWith("misc_node_")&&!hs.has(s)||r.loop))return[];if(de.has(s)&&r.stn_list[s]!=null&&En(s,t)-1>=2){const u=[...r.stn_list[s].parents,a];if(r.stn_list[u[1]]==null){const x=u[0];u[0]=u[1],u[1]=x}r.stn_list[s].parents=structuredClone(u).reverse(),r.stn_list[s].branch={...r.stn_list[s].branch,left:[be.through,u[1]]};const c=[];for(const x of r.stn_list[s].children)x!=a&&c.push(x);r.stn_list[s].children=structuredClone(c),(l=r.stn_list[s].branch)==null||delete l.right;const p=[];for(const x of r.stn_list.lineend.parents)x!=s&&p.push(x);return r.stn_list.lineend.parents=structuredClone(p).reverse(),r.stn_list.lineend.branch={...r.stn_list.lineend.branch,left:r.stn_list.lineend.parents.length==2?[be.through,p[1]]:void 0},c.length==0&&(r.stn_list[s].children=["lineend"],Ls(r,s)),[s]}de.add(s);const h=[],g=[],f=[],d=new Set,m=new Set;for(let u=Z.get(s);u!=-1;u=_[u].next){const c=_[u].target,p=_[u].color;if(c!=i){if(z(p)==z(t)){if(m.has(c))continue;if(m.add(c),s.startsWith("misc_node_")){const x=xs(c,a,s,n+1,o,t,r);x.length!=0&&h.push(...x)}else{const x=xs(c,s,s,n+1,o,t,r);x.length!=0&&h.push(...x)}}if(!d.has(z(p))&&z(p)!=z(t)){d.add(z(p));const x={theme:p,name:["ch_".concat(z(p)),"en_".concat(z(p))]};f.push(x)}}}if(h.length==2){for(let u=0;u<2;u++)h[u]=="lineend"&&h.splice(u,1);if(r.stn_list[h[1]].parents.length>=2){const u=h[0];h[0]=h[1],h[1]=u}}if(de.has(s)&&r.stn_list[s]!=null){const u=[];for(const c of r.stn_list.lineend.parents)c!=s&&u.push(c);r.stn_list.lineend.parents=structuredClone(u).reverse(),r.stn_list.lineend.branch={...r.stn_list.lineend.branch,left:r.stn_list.lineend.parents.length==2?[be.through,u[1]]:void 0},h.length==0&&(ms.clear(),g.push(...tt(s,a,t)))}if(s.startsWith("misc_node_"))return hs.add(s),h;{const u=o.getNodeAttributes(s).type,c=o.getNodeAttributes(s)[u];if(r.stn_list[s]=structuredClone(An),r.stn_list[s].localisedName={zh:c.names[0],en:c.names[1]},r.stn_list[s].num=String(n),o.getNodeAttributes(s).type==I.GzmtrBasic){const p=c;r.stn_list[s].num=p.stationCode,(p.secondaryNames[0]!==""||p.secondaryNames[1]!=="")&&(r.stn_list[s].localisedSecondaryName={zh:p.secondaryNames[0],en:p.secondaryNames[1]})}if(o.getNodeAttributes(s).type==I.GzmtrInt){const p=c,x=p.transfer[0];for(const j of x)if(z(j)==z(t)){r.stn_list[s].num=String(j[5]);break}(p.secondaryNames[0]!==""||p.secondaryNames[1]!=="")&&(r.stn_list[s].localisedSecondaryName={zh:p.secondaryNames[0],en:p.secondaryNames[1]})}return h.length!=0?(r.stn_list[s].children=structuredClone(h).reverse(),h.length==2&&(r.stn_list[s].branch={...r.stn_list[s].branch,right:[be.through,h[1]]})):(r.stn_list[s].children=["lineend"],Ls(r,s)),g.push(a),r.stn_list[s].parents=structuredClone(g).reverse(),g.length==2&&(r.stn_list[s].branch={...r.stn_list[s].branch,left:[be.through,g[1]]}),f.length!=0&&(r.stn_list[s].transfer.groups[0].lines=structuredClone(f)),[s]}},Nn=(s,a,i,n)=>{const o=structuredClone($s);n=="LOOP"&&(o.loop=!0);let t;switch(s.getNodeAttributes(i).type){case I.GzmtrBasic:case I.GzmtrInt:t=ge.GZMTR;break;case I.MTR:t=ge.MTR;break;default:t=ge.SHMetro;break}o.theme=structuredClone(a),o.style=t,o.stn_list.linestart=structuredClone(kn),o.stn_list.lineend=structuredClone(On),de.clear(),hs.clear();const r=xs(i,"linestart","linestart",1,s,a,o);if(o.current_stn_idx=r[0],o.stn_list.linestart.children=[r[0]],!(Object.keys(o.stn_list).length<=3||o.stn_list.lineend.parents.length>=3))return structuredClone(o)},_n=s=>{var n,o;de.clear(),us.clear(),ps.clear(),gs.clear(),me.clear(),os.clear(),is.clear(),Z.clear(),_=[],_e=0,Ke.clear(),as.clear(),s.filterEdges(t=>t.startsWith("line")).forEach(t=>{zs(s.getEdgeAttributes(t).style)&&Rn(s,t)});let a=0;s.forEachNode(t=>{as.set(t,++a)}),as.set("lineend",++a);const i=[];for(const t of us){let r=0;for(;me.get(z(t)).size!=0;){let h="line_root";me.get(z(t)).forEach(f=>{h=="line_root"&&(h=f)}),et(h,"line_root",t);const g={theme:t,index:++r};os.add(g),is.set(g,h)}}for(const t of os){const{theme:r}=t;de.clear(),Ke.clear(),st(is.get(t),"line_root",r);let h=!0,g="LINE";const f=[];for(const[m,l]of Ke)l==1&&f.push(m),l==3&&(g="BRANCH"),l>3&&(h=!1);if(!h)continue;f.length==0&&(g="LOOP",f.push(gs.get(r)));const d=[];for(const m of f){const l=Nn(s,r,m,g);l!=null&&d.push([l,(n=l.stn_list[l.current_stn_idx].localisedName.zh)!=null?n:"",(o=l.stn_list[l.current_stn_idx].localisedName.en)!=null?o:""])}d.length!=0&&i.push({id:ls(10),theme:r,param:structuredClone(d),type:g})}return i},In=s=>s[0]!=""&&s[1]!=""?s[0]+"_"+s[1]:s[0]!=""?s[0]:s[1]!=""?s[1]:"".concat(new Date().valueOf()),Hn=(s,a)=>{let i=s;return a.forEach((n,o)=>{const t=new RegExp("ch_".concat(o),"g"),r=new RegExp("en_".concat(o),"g");i=i.replace(t,n[0]),i=i.replace(r,n[1])}),i},Wn=(s,a,i,n)=>{s.line_name=a,s.line_num=String(i),ds("RMG_".concat(In(a),".json"),"application/json",Hn(JSON.stringify(s),n))},Ln={LINE:"#33ccff",BRANCH:"#007B61",LOOP:"#ff6666"},Bn=s=>{const{isOpen:a,onClose:i}=s,{t:n}=L(),o=b.useRef(window.graph),[t,r]=b.useState(!1),[h,g]=b.useState([[$s,"",""]]),[f,d]=b.useState(["","",""]),[m,l]=b.useState(new Map),[u,c]=b.useState(new Map),[p,x]=b.useState([]);b.useEffect(()=>{if(a){const S=_n(o.current),y=new Map;S.forEach(({id:A,theme:H})=>{y.set(z(H),A)}),x(S),l(y)}},[a]);const j=(S,y)=>document.getElementById("2RMG_"+y+"_"+S).value.trim();return e.jsxs(Y,{isOpen:a,onClose:i,size:"2xl",scrollBehavior:"inside",children:[e.jsx(F,{}),e.jsxs(J,{children:[e.jsx(q,{children:e.jsx(w,{as:"b",fontSize:"xl",children:n("header.download.2rmg.title")})}),e.jsx(X,{}),e.jsxs(Q,{children:[e.jsx(w,{fontSize:"sm",mt:"3",lineHeight:"100%",children:n("header.download.2rmg.info1")}),e.jsx(w,{fontSize:"sm",mt:"3",lineHeight:"100%",children:n("header.download.2rmg.info2")}),e.jsx("br",{}),p.length===0?e.jsx(w,{fontSize:"md",children:n("header.download.2rmg.noline")}):e.jsx("table",{children:e.jsx("tbody",{children:p.map(({id:S,theme:y,param:A,type:H})=>e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx(Ts,{name:y[0]=="other"&&y[1]=="other"?y[2]:y[1],bg:y[2],fg:y[3]})}),e.jsx("td",{children:e.jsx($e,{placeholder:n("header.download.2rmg.placeholder.chinese"),id:"2RMG_nameCh_".concat(S),size:"sm"})}),e.jsx("td",{children:e.jsx($e,{placeholder:n("header.download.2rmg.placeholder.english"),id:"2RMG_nameEn_".concat(S),size:"sm"})}),e.jsx("td",{children:e.jsx($e,{placeholder:n("header.download.2rmg.placeholder.lineCode"),id:"2RMG_lineNum_".concat(S),size:"sm"})}),e.jsx("td",{children:e.jsx(Ts,{name:n("header.download.2rmg.type.".concat(H.toLowerCase())),bg:Ln[H],fg:ws.white})}),e.jsx("td",{children:e.jsx(E,{colorScheme:"blue",variant:"ghost",mr:"1",onClick:()=>{const G=j(S,"nameCh"),te=j(S,"nameEn"),he=j(S,"lineNum"),U=new Map;m.forEach(($,ue)=>{U.set(ue,[j($,"nameCh"),j($,"nameEn")])}),g(A),d([G,te,he]),c(U),r(!0)},size:"sm",children:e.jsx(qs,{})})})]},JSON.stringify(y)))})})]}),e.jsx(xe,{children:e.jsx(E,{colorScheme:"blue",variant:"outline",mr:"1",onClick:i,children:n("close")})})]}),e.jsx(Pn,{isOpen:t,onClose:()=>r(!1),param:h,nameList:f,interchangeName:u})]})},Pn=s=>{const{isOpen:a,onClose:i,param:n,nameList:o,interchangeName:t}=s,{t:r}=L(),[h,g]=b.useState("");return b.useEffect(()=>{o[0]!=""&&o[1]!=""?g(o[0]+"/"+o[1]):o[0]!=""?g(o[0]):o[1]!=""?g(o[1]):g("")},[...o]),e.jsxs(Y,{isOpen:a,onClose:i,size:"md",scrollBehavior:"inside",children:[e.jsx(F,{}),e.jsxs(J,{children:[e.jsx(q,{children:e.jsxs(w,{as:"b",fontSize:"xl",children:[r("header.download.2rmg.download")," ",h]})}),e.jsx(X,{}),e.jsx(Q,{children:e.jsxs(lt,{children:[e.jsx(w,{fontSize:"sm",mb:"2",lineHeight:"100%",children:r("header.download.2rmg.downloadInfo")}),n.map(([f,d,m])=>e.jsxs(E,{onClick:()=>{Wn(f,[o[0],o[1]],o[2],t)},overflow:"hidden",size:"md",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"ruby",children:[d.replaceAll("\n","⏎"),"/",m.replaceAll("\n","⏎")]},"".concat(d).concat(m)))]})}),e.jsx(xe,{children:e.jsx(E,{colorScheme:"blue",variant:"outline",mr:"1",onClick:i,children:r("close")})})]})]})},Gn=s=>{const{isOpen:a,onClose:i}=s,{t:n}=L();return e.jsxs(Y,{isOpen:a,onClose:i,size:"xl",scrollBehavior:"inside",children:[e.jsx(F,{}),e.jsxs(J,{children:[e.jsx(q,{children:n("header.download.termsAndConditions")}),e.jsx(X,{}),e.jsx(Q,{children:e.jsxs(ct,{children:[e.jsxs(ye,{children:["The layout of the elements on the signage or rail map, is designed by"," ",e.jsxs(O,{color:"teal.500",href:"https://www.shmetro.com/",isExternal:!0,children:["Shanghai Shentong Metro Group ",e.jsx(N,{as:R})]}),", ",e.jsxs(O,{color:"teal.500",href:"https://www.gzmtr.com/",isExternal:!0,children:["Guangzhou Metro Group ",e.jsx(N,{as:R})]})," or ",e.jsxs(O,{color:"teal.500",href:"https://www.mtr.com.hk/",isExternal:!0,children:["MTR Corporation ",e.jsx(N,{as:R})]}),", depending on your selection. You shall grant appropriate permit or license from the relevant company above before using the generated images for commercial purposes, if it is required to do so.",e.jsx("br",{}),"标志版或路线图的元素或布局,基于你所选择的风格,为",e.jsxs(O,{color:"teal.500",href:"https://www.shmetro.com/",isExternal:!0,children:["上海申通地铁集团 ",e.jsx(N,{as:R})]}),",",e.jsxs(O,{color:"teal.500",href:"https://www.gzmtr.com/",isExternal:!0,children:["广州地铁集团公司 ",e.jsx(N,{as:R})]}),"或",e.jsxs(O,{color:"teal.500",href:"https://www.mtr.com.hk/",isExternal:!0,children:["港铁公司 ",e.jsx(N,{as:R})]}),"所设计。在产生的图像用作商业用途前,你应向相关公司取得适当之许可证或授权。"]}),e.jsxs(ye,{children:["The elements including shapes and lines on the image are drawn by"," ",e.jsxs(O,{color:"teal.500",href:"https://www.github.com/thekingofcity",isExternal:!0,children:["thekingofcity ",e.jsx(N,{as:R})]})," and ",e.jsxs(O,{color:"teal.500",href:"https://www.github.com/wongchito",isExternal:!0,children:["Chito Wong ",e.jsx(N,{as:R})]}),", based on the design standards or rules of the companies listed above. You may use them for any purposes, but it is recommended to state the name and the link of software alongside.",e.jsx("br",{}),"图像的元素,包括图形及线条,均由",e.jsxs(O,{color:"teal.500",href:"https://www.github.com/thekingofcity",isExternal:!0,children:["thekingofcity ",e.jsx(N,{as:R})]}),"及",e.jsxs(O,{color:"teal.500",href:"https://www.github.com/wongchito",isExternal:!0,children:["Chito Wong ",e.jsx(N,{as:R})]}),"基于上述公司设计标准或准则绘制。你可将其用于任何目的,但我们建议你于使用同时附以我们的名字以及本网站地址。"]}),e.jsxs(ye,{children:["Due to copyright, licensing and other legal restrictions, Rail Map Painter uses"," ",e.jsxs(O,{color:"teal.500",href:"https://github.com/ButTaiwan/genyo-font",isExternal:!0,children:["GenYoMin provided by ButTaiwan ",e.jsx(N,{as:R})]}),", and Vegur instead of MTRSung and Myriad Pro respectively to display and generate MTR-style signage. You shall grant appropriate permit or license from the manufacturers before using those generated images for commercial purposes.",e.jsx("br",{}),"由于著作权及其他法律限制,铁路路线图绘制器使用由",e.jsxs(O,{color:"teal.500",href:"https://github.com/ButTaiwan/genyo-font",isExternal:!0,children:["ButTaiwan提供的源樣明體 ",e.jsx(N,{as:R})]}),",以及Vegur,以代替港铁样式标志牌所使用的地铁宋及Myriad Pro。在产生之图像用作商业用途前,你应向字型生产厂商取得适当之许可证或授权。"]}),e.jsxs(ye,{children:["The exported images in PNG or SVG format may be modified, published, or used for other purposes except commercial use, under the conditions above.",e.jsx("br",{}),"输出的PNG或SVG图像可基于上述条款,在非商业使用时,用于修改、发行或其他用途。"]}),e.jsxs(ye,{children:["All flag emojis shown on Windows platforms are designed by"," ",e.jsxs(O,{color:"teal.500",href:"https://openmoji.org/",isExternal:!0,children:["OpenMoji ",e.jsx(N,{as:R})]})," ","– the open-source emoji and icon project. License:",e.jsxs(O,{color:"teal.500",href:"https://creativecommons.org/licenses/by-sa/4.0/",isExternal:!0,children:["CC BY-SA 4.0 ",e.jsx(N,{as:R})]}),e.jsx("br",{}),"于Windows作业系统上显示的国旗Emoji为",e.jsxs(O,{color:"teal.500",href:"https://openmoji.org/",isExternal:!0,children:["OpenMoji ",e.jsx(N,{as:R})]}),"所设计。许可证:",e.jsxs(O,{color:"teal.500",href:"https://creativecommons.org/licenses/by-sa/4.0/",isExternal:!0,children:["CC BY-SA 4.0 ",e.jsx(N,{as:R})]})]}),e.jsxs(ye,{children:["We reserve the rights, without prior notice, to modify, add, or remove these terms. The Chinese translation is for reference only. In case of any discrepancy between the English version and the Chinese version, the English version shall prevail.",e.jsx("br",{}),"我们保留修改、新增或移除上述条款之权利,而无需另行通知。中文译本仅供参考,文义如与英文有歧异,概以英文本为准。"]})]})})]})]})};function Dn(){const s=Ds("white","var(--chakra-colors-gray-800)"),a=P(),{telemetry:{project:i}}=B(v=>v.app),n=B(v=>v.param),o=M.isAllowAnalytics(),{t}=L(),r=b.useRef(window.graph),[h,g]=b.useState("png"),f={png:t("header.download.png"),svg:t("header.download.svg")},[d,m]=b.useState(2),[l,u]=b.useState({width:1,height:1,benchmark:.001}),[c,p]=b.useState(200),x=[10,25,33,50,67,75,100,125,150,175,200,250,300,400,500,750,1e3],j=Object.fromEntries(x.map(v=>[v,"".concat(v,"%")])),[S,y]=b.useState([]),[A,H]=b.useState(!1),G=[{type:"select",label:t("header.download.format"),value:h,options:f,onChange:v=>g(v==="png"?"png":"svg")}],te=[{type:"select",label:t("header.download.svgVersion"),value:d,options:{1.1:t("header.download.svg1.1"),2:t("header.download.svg2")},onChange:v=>{m(v),v===1.1&&Ae(!0)}}],he=[{type:"select",label:t("header.download.scale"),value:c,options:j,disabledOptions:S,onChange:v=>p(v)},{type:"switch",label:t("header.download.transparent"),isChecked:A,onChange:H}],[U,$]=b.useState(!1),[ue,Le]=b.useState(!1),[Be,Ae]=b.useState(!1),[Pe,W]=b.useState(!1),[vs,nt]=b.useState(!1),[rt,ks]=b.useState(!1);b.useEffect(()=>{(async()=>{const Te=await vn.maxArea({usePromise:!0,useWorker:!0});u(Te)})()},[]),b.useEffect(()=>{if(U){const{xMin:v,yMin:Te,xMax:Je,yMax:Ge}=St(r.current),[qe,we]=[Je-v,Ge-Te],Re=x.filter(Se=>qe*Se/100>l.width&&we*Se/100>l.height);y(Re)}},[U]);const ot=()=>{o&&M.event(Me.DOWNLOAD_PARAM,i?{"#nodes":r.current.order,"#edges":r.current.size}:{}),ds("RMP_".concat(new Date().valueOf(),".json"),"application/json",vt(n))},it=async()=>{$(!1),o&&M.event(Me.DOWNLOAD_IMAGES,i?{numberOfNodes:r.current.order,numberOfEdges:r.current.size}:{});const{elem:v,width:Te,height:Je}=await pn(r.current,Pe,Be,d),Ge=v.outerHTML.replace(/ /g," ");if(h==="svg"){ds("RMP_".concat(new Date().valueOf(),".svg"),"image/svg+xml",Ge);return}document.body.appendChild(v);const qe="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(Ge)));document.body.removeChild(v),v.remove();const we=document.createElement("canvas"),[Re,Se]=[Te*c/100,Je*c/100];we.width=Re,we.height=Se;const Xe=we.getContext("2d");A||(Xe.fillStyle=s,Xe.fillRect(0,0,Re,Se));const Qe=new Image;Qe.onload=()=>{setTimeout(()=>{Xe.drawImage(Qe,0,0,Re,Se),we.toBlob(Os=>{if(!Os){a(Ye({status:"error",message:t("header.download.imageTooBig")}));return}gn("RMP_".concat(new Date().valueOf(),".png"),Os)},"image/png")},mn()?2e3:0)},Qe.src=qe};return e.jsxs(fs,{id:"download",children:[e.jsx(js,{as:ee,size:"sm",variant:"ghost",icon:e.jsx(qs,{})}),e.jsxs(bs,{children:[e.jsx(ce,{icon:e.jsx(yt,{}),onClick:ot,children:t("header.download.config")}),e.jsxs(ce,{icon:e.jsx(Ct,{}),onClick:()=>ks(!0),children:[t("header.download.2rmg.title"),e.jsx(le,{ml:"1",colorScheme:"green",children:"New"})]}),e.jsx(ce,{icon:e.jsx(zt,{}),onClick:()=>$(!0),children:t("header.download.image")})]}),e.jsxs(Y,{size:"xl",isOpen:U,onClose:()=>$(!1),children:[e.jsx(F,{}),e.jsxs(J,{children:[e.jsx(q,{children:t("header.download.image")}),e.jsx(X,{}),e.jsxs(Q,{children:[e.jsx(ke,{fields:G}),h==="svg"&&e.jsx(ke,{fields:te}),h==="png"&&e.jsx(ke,{fields:he}),h==="png"&&S.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(w,{as:"i",fontSize:"sm",children:t("header.download.disabledScaleOptions")}),e.jsx("br",{}),e.jsx(w,{as:"i",fontSize:"sm",children:t("header.download.disabledScaleOptionsWorkarounds")}),e.jsxs(O,{color:"teal.500",onClick:()=>window.open("https://github.com/RazrFalcon/resvg","_blank"),children:["RazrFalcon/resvg ",e.jsx(N,{as:R})]}),e.jsx("br",{})]}),e.jsx("br",{}),e.jsx(es,{isChecked:Be,isDisabled:h==="svg"&&d===1.1,onChange:v=>Ae(v.target.checked),children:e.jsx(w,{children:t("header.download.useSystemFonts")})}),e.jsx(es,{isChecked:Pe,onChange:v=>W(v.target.checked),children:e.jsxs(w,{children:[t("header.download.shareInfo1"),e.jsxs(O,{color:"teal.500",onClick:()=>window.open("https://railmapgen.github.io/rmp","_blank"),children:[t("header.about.rmp")," ",e.jsx(N,{as:R})]}),t("header.download.shareInfo2")]})}),e.jsx(es,{isChecked:vs,onChange:v=>nt(v.target.checked),children:e.jsxs(w,{children:[t("header.download.termsAndConditionsInfo"),e.jsxs(O,{color:"teal.500",onClick:()=>Le(!0),children:[t("header.download.termsAndConditions")," ",e.jsx(N,{as:R})]}),t("header.download.period")]})})]}),e.jsx(xe,{children:e.jsx(dt,{children:e.jsx(E,{colorScheme:"teal",variant:"outline",size:"sm",isDisabled:!vs||h==="png"&&S.includes(c),onClick:it,children:t("header.download.confirm")})})}),e.jsx(Gn,{isOpen:ue,onClose:()=>Le(!1)})]})]}),e.jsx(Bn,{isOpen:rt,onClose:()=>ks(!1)})]})}const Un=(s,{info_panel_type:a,line_num:i,stn_list:n,style:o,theme:t},r,h,g)=>{const f=Object.fromEntries(Object.keys(n).filter(l=>!["linestart","lineend"].includes(l)).map(l=>[l,"stn_".concat(ls(10))]));Object.entries(n).filter(([l,u])=>!["linestart","lineend"].includes(l)).forEach(([l,u])=>{const c=s.filterNodes((p,x)=>Object.values(I).includes(x.type)&&x[x.type].names[0]===u.localisedName.zh);c.length!==0&&(f[l]=c[0])});const d=[["linestart",-1,0]],m={};for(;d.length;){const[l,u,c]=d.shift();n[l].children.filter(x=>x!="lineend").forEach((x,j)=>{const S=Math.max(j,c+j);m[x]={x:u*150,y:S*75},d.push([x,u+1,S])})}Object.entries(n).filter(([l,u])=>!["linestart","lineend"].includes(l)).filter(([l,u])=>s.filterNodes((c,p)=>Object.values(I).includes(p.type)&&p[p.type].names[0]===u.localisedName.zh).length===0).map(([l,u])=>{var S,y,A;let c=I.ShmetroBasic;const p=u.transfer.groups,x=p.map(H=>{var G;return(G=H.lines)!=null?G:[]}).flat();o===ge.SHMetro?x.length>0?c=I.ShmetroInt:a===Cs.sh2020?c=I.ShmetroBasic2020:c=I.ShmetroBasic:o===ge.GZMTR?x.length>0?c=I.GzmtrInt:c=I.GzmtrBasic:o===ge.MTR&&(c=I.MTR);const j={...structuredClone(xn[c].defaultAttrs),names:[(S=u.localisedName.zh)!=null?S:"",(y=u.localisedName.en)!=null?y:""]};return c===I.ShmetroBasic2020?j.color=t:c===I.GzmtrBasic?(j.color=t,j.lineCode=i,j.stationCode=u.num):c===I.GzmtrInt?j.transfer=p.map((H,G)=>{var he,U;const te=(U=(he=H.lines)==null?void 0:he.map($=>{var ue;return[...(ue=$.theme)!=null?ue:t,"1","01"]}))!=null?U:[];return G===0?[[...t,i,u.num],...te]:te}):c===I.MTR&&((A=p[0].lines)!=null&&A.length?j.transfer=[[[...t,"",""],...p[0].lines.map(H=>{var G;return[...(G=H.theme)!=null?G:t,"",""]})]]:j.transfer=[[]]),{node:f[l],attr:{visible:!0,zIndex:0,x:r+m[l].x,y:h+m[l].y,type:c,[c]:j}}}).forEach(({node:l,attr:u})=>s.addNode(l,u)),Object.entries(n).filter(([l,u])=>!["linestart","lineend"].includes(l)).forEach(([l,u])=>{u.children.filter(c=>!["linestart","lineend"].includes(c)).forEach(c=>{const p=ss.Diagonal,[x,j]=[f[l],f[c]],S=g?kt(s,p,x,j,"from"):-1;s.addDirectedEdgeWithKey("line_".concat(ls(10)),x,j,{visible:!0,zIndex:0,type:p,[ss.Diagonal]:structuredClone(Ot[ss.Diagonal].defaultAttrs),style:Rs.SingleColor,[Rs.SingleColor]:{color:t},reconcileId:"",parallelIndex:S})})})},Zn="rmg-bridge--",Vn={h:500,maxH:"70%","& iframe":{h:"100%",w:"100%"}};function Kn(s){const{isOpen:a,onClose:i}=s,{t:n}=L(),{preference:{autoParallel:o}}=B(j=>j.app),{svgViewBoxZoom:t,svgViewBoxMin:r}=B(j=>j.param),h=P(),g=M.isAllowAnalytics(),f=ys(),{height:d,width:m}=Ss(f),l=Ze.useRef(window.graph),[u]=Ze.useState(crypto.randomUUID()),c="/rmg/#/import?"+new URLSearchParams({parentComponent:M.getAppName(),parentId:u}),p=Ze.useCallback(()=>{h(K()),h(V()),h(se(l.current.export()))},[h,K,V,se,l]),x=j=>{try{g&&M.event(Me.IMPORT_RMG_PARAM,{});const S=r.x+m*t/100/3,y=r.y+d*t/100/3;Un(l.current,j,S,y,o),p()}catch(S){h(Ye({status:"error",message:n("header.open.unknownError")})),console.error("OpenActions.handleUploadRMG():: Unknown error occurred while parsing the RMG project",S)}finally{i()}};return Ze.useEffect(()=>{const j=new BroadcastChannel(Zn+u);return j.onmessage=S=>{const{event:y,data:A}=S.data;console.log("[rmp] Received event from RMG app clip:",y),y==="CLOSE"?i():y==="IMPORT"&&x(A)},()=>j.close()},[r.x,r.y,t,d,m,o]),e.jsx(Xs,{isOpen:a,onClose:i,sx:Vn,children:e.jsx("iframe",{src:c,loading:"lazy"})})}const Yn="RMP_GALLERY_CHANNEL",Fn="OPEN_TEMPLATE",Bs=new BroadcastChannel(Yn),Jn={h:"80%",w:"80%","& iframe":{h:"100%",w:"100%"},"& div":{h:"100%",w:"100%"}};function qn(s){const{isOpen:a,onClose:i}=s,n=Us(),{t:o}=L(),t=P(),{telemetry:{project:r}}=B(l=>l.app),h=M.isAllowAnalytics(),g=b.useRef(window.graph),f=b.useCallback(()=>{t(K()),t(V()),t(se(g.current.export()))},[t,K,V,se,g]),d=async l=>{const{version:u,...c}=JSON.parse(await Qs(JSON.stringify(l)));t(cs()),g.current.clear(),g.current.import(c.graph),f();const{svgViewBoxZoom:p,svgViewBoxMin:x}=c;typeof p=="number"&&t(Oe(p)),typeof x.x=="number"&&typeof x.y=="number"&&t(Ie(x))},m=async(l,u)=>{var x;const c=u?"https://".concat(u):"",p=await((x=(await Promise.allSettled([fetch("".concat(c,"/rmp-gallery/resources/real_world/").concat(l,".json")),fetch("".concat(c,"/rmp-gallery/resources/fantasy/").concat(l,".json"))])).filter(j=>j.status==="fulfilled").find(j=>j.value.status===200))==null?void 0:x.value.json());if(p){if(h){const j={id:l};r&&u&&(j.host=u),M.event(Me.IMPORT_WORK_FROM_GALLERY,j)}d(p),n({title:o("header.open.importFromRMPGallery",{id:l}),status:"success",duration:9e3,isClosable:!0})}else n({title:o("header.open.failToImportFromRMPGallery",{id:l}),status:"error",duration:9e3,isClosable:!0});M.updateAppMetadata({hash:""})};return b.useEffect(()=>{const u=new URL(window.location.href).searchParams;if(u.size>0){const c=u.keys().next().value,p=c.indexOf("."),x=c.substring(0,p===-1?void 0:p);let j;p!==-1&&(j=c.substring(p+1)),m(x,j)}},[]),b.useEffect(()=>(Bs.onmessage=l=>{const{event:u,data:c}=l.data;u===Fn&&(m(c),i())},()=>Bs.close()),[]),e.jsxs(Xs,{isOpen:a,onClose:i,size:"full",sx:Jn,children:[e.jsx("iframe",{src:"/rmp-gallery/",loading:"lazy"}),e.jsx(Zs,{onClick:i,position:"fixed",top:"5px",right:"15px"})]})}function Xn(){const s=P(),{t:a}=L(),i=ys(),{height:n}=Ss(i),o=b.useRef(window.graph),t=b.useRef(null),[r,h]=b.useState(!1),[g,f]=b.useState(!1),d=b.useCallback(()=>{s(K()),s(V()),s(se(o.current.export()))},[s,K,V,se,o]),m=()=>{s(cs()),o.current.clear(),s(Oe(100)),s(Ie({x:0,y:0})),d()},l=async p=>{const{version:x,...j}=JSON.parse(await Qs(p));s(cs()),o.current.clear(),o.current.import(j.graph),d();const{svgViewBoxZoom:S,svgViewBoxMin:y}=j;typeof S=="number"&&s(Oe(S)),typeof y.x=="number"&&typeof y.y=="number"&&s(Ie(y))},u=async p=>{var j;const x=(j=p.target.files)==null?void 0:j[0];if(console.log("OpenActions.handleUpload():: received file",x),(x==null?void 0:x.type)!=="application/json")s(Ye({status:"error",message:a("header.open.invalidType")})),console.error("OpenActions.handleUpload():: Invalid file type! Only file in JSON format is accepted.");else try{const S=await Qn(x);await l(S)}catch(S){s(Ye({status:"error",message:a("header.open.unknownError")})),console.error("OpenActions.handleUpload():: Unknown error occurred while parsing the uploaded file",S)}p.target.value=""},c=async()=>{await l(await Rt()),s(Ie({x:-10,y:-13}));const p=Math.max(0,Math.min(400,-.132*n+117.772));s(Oe(p)),M.event(Me.LOAD_TUTORIAL,{})};return b.useEffect(()=>{const p=async x=>{const{type:j,key:S,from:y}=x.data;if(j===Et.SAVE_CHANGED&&S===_s.PARAM&&y==="rmt"){Nt.debug("Received save changed event on key: ".concat(S));const A=localStorage.getItem(_s.PARAM);if(!A)return;await l(A)}};return Es.addEventListener("message",p),()=>Es.removeEventListener("message",p)},[]),e.jsxs(fs,{children:[e.jsx(js,{as:ee,size:"sm",variant:"ghost",icon:e.jsx(Ns,{})}),e.jsxs(bs,{children:[e.jsx(ce,{icon:e.jsx(Mt,{}),onClick:m,children:a("header.open.new")}),e.jsx("input",{id:"upload_project",ref:t,type:"file",accept:".json",hidden:!0,onChange:u,"data-testid":"file-upload"}),e.jsx(ce,{icon:e.jsx(Ns,{}),onClick:()=>{var p;return(p=t==null?void 0:t.current)==null?void 0:p.click()},children:a("header.open.config")}),e.jsx(ce,{icon:e.jsx(At,{}),onClick:()=>h(!0),children:a("header.open.projectRMG")}),e.jsxs(ce,{icon:e.jsx(R,{}),onClick:()=>f(!0),children:[a("header.open.gallery"),e.jsx(le,{ml:"1",colorScheme:"green",children:"New"})]}),e.jsx(ce,{icon:e.jsx(Tt,{}),onClick:c,children:a("header.open.tutorial")})]}),e.jsx(Kn,{isOpen:r,onClose:()=>h(!1)}),e.jsx(qn,{isOpen:g,onClose:()=>f(!1)})]})}const Qn=s=>new Promise(a=>{const i=new FileReader;i.onloadend=()=>a(i.result),i.readAsText(s)}),$n=()=>{const[s,a]=b.useState(!1),{t:i}=L(),n=P(),o=b.useRef(window.graph),t=ys(),{width:r,height:h}=Ss(t),[g,f]=b.useState([]);b.useEffect(()=>{s&&f(o.current.nodes().filter(m=>m.startsWith("stn")).map(m=>{const l=o.current.getNodeAttributes(m),u=l.type,c=l[u].names.join("/");return{id:m,value:c}}))},[s]);const d=m=>{n(Wt(new Set([m])));const l=Math.max(0,Math.min(400,-.132*h+117.772)),{x:u,y:c}=Lt((r-300)/2,h/2,l,{x:-o.current.getNodeAttribute(m,"x"),y:-o.current.getNodeAttribute(m,"y")});n(Oe(l)),n(Ie({x:-u,y:-c}))};return e.jsxs(Vs,{isOpen:s,onOpen:()=>a(!0),onClose:()=>a(!1),children:[e.jsx(Ks,{children:e.jsx(ee,{"aria-label":"zoom",variant:"ghost",size:"sm",icon:e.jsx(_t,{}),onClick:()=>a(!s)})}),e.jsx(Ys,{children:e.jsx(Fs,{children:e.jsx(It,{label:i("header.search"),children:e.jsx(Ht,{data:g,displayHandler:m=>e.jsx(le,{children:m.value}),filter:(m,l)=>l.value.toLowerCase().includes(m.toLowerCase())||Object.values(l.value).some(u=>u.toLowerCase().includes(m.toLowerCase())),value:"",onChange:m=>d(m.id)})})})})]})},er=s=>{const{isOpen:a,onClose:i}=s,n=P(),{theme:o,paletteAppClip:{output:t}}=B(u=>u.runtime),{t:r}=L(),h=b.useRef(window.graph),[g,f]=b.useState(o),[d,m]=b.useState(!1);b.useEffect(()=>{d&&t&&(f(t),m(!1))},[t==null?void 0:t.toString()]);const l=()=>{h.current.filterEdges((u,c,p,x,j,S,y)=>Js.includes(c.style)&&JSON.stringify(c[c.style].color)===JSON.stringify(g)).forEach(u=>h.current.dropEdge(u)),n(V()),n(se(h.current.export())),i()};return e.jsxs(Y,{isOpen:a,onClose:i,size:"xl",scrollBehavior:"inside",trapFocus:!1,children:[e.jsx(F,{}),e.jsxs(J,{children:[e.jsx(q,{children:r("header.settings.procedures.removeLines.title")}),e.jsx(X,{}),e.jsxs(Q,{children:[r("header.settings.procedures.removeLines.content"),e.jsx(Bt,{theme:g,onClick:()=>{m(!0),n(Pt(g))}})]}),e.jsxs(xe,{children:[e.jsx(E,{colorScheme:"blue",variant:"outline",mr:"1",onClick:i,children:r("cancel")}),e.jsx(E,{colorScheme:"red",onClick:l,children:r("remove")})]})]})]})},sr=s=>{const{isOpen:a,onClose:i}=s,n=P(),{t:o}=L(),t=b.useRef(window.graph),[r,h]=b.useState(1),g=[{type:"input",label:o("header.settings.procedures.scale.factor"),value:r.toString(),variant:"number",onChange:d=>h(Number(d)),minW:"full"}],f=()=>{t.current.forEachNode((d,m)=>{t.current.updateNodeAttribute(d,"x",l=>(l!=null?l:0)*r),t.current.updateNodeAttribute(d,"y",l=>(l!=null?l:0)*r)}),n(K()),n(V()),n(se(t.current.export())),i()};return e.jsxs(Y,{isOpen:a,onClose:i,size:"xl",scrollBehavior:"inside",children:[e.jsx(F,{}),e.jsxs(J,{children:[e.jsx(q,{children:o("header.settings.procedures.scale.title")}),e.jsx(X,{}),e.jsxs(Q,{children:[o("header.settings.procedures.scale.content"),e.jsx(ke,{fields:g})]}),e.jsxs(xe,{children:[e.jsx(E,{colorScheme:"blue",variant:"outline",mr:"1",onClick:i,children:o("cancel")}),e.jsx(E,{colorScheme:"red",onClick:f,children:o("apply")})]})]})]})},tr=s=>{const{isOpen:a,onClose:i}=s,n=P(),{t:o}=L(),t=b.useRef(window.graph),[r,h]=b.useState(0),[g,f]=b.useState(0),d=[{type:"input",label:o("header.settings.procedures.translate.x"),value:r.toString(),variant:"number",onChange:l=>h(Number(l)),minW:"full"},{type:"input",label:o("header.settings.procedures.translate.y"),value:g.toString(),variant:"number",onChange:l=>f(Number(l)),minW:"full"}],m=()=>{t.current.forEachNode((l,u)=>{t.current.updateNodeAttribute(l,"x",c=>(c!=null?c:0)+r),t.current.updateNodeAttribute(l,"y",c=>(c!=null?c:0)+g)}),n(K()),n(V()),n(se(t.current.export())),i()};return e.jsxs(Y,{isOpen:a,onClose:i,size:"xl",scrollBehavior:"inside",children:[e.jsx(F,{}),e.jsxs(J,{children:[e.jsx(q,{children:o("header.settings.procedures.translate.title")}),e.jsx(X,{}),e.jsxs(Q,{children:[o("header.settings.procedures.translate.content"),e.jsx(ke,{fields:d})]}),e.jsxs(xe,{children:[e.jsx(E,{colorScheme:"blue",variant:"outline",mr:"1",onClick:i,children:o("cancel")}),e.jsx(E,{colorScheme:"red",onClick:m,children:o("apply")})]})]})]})},nr=s=>{const{isOpen:a,onClose:i}=s,n=P(),{preference:{unlockSimplePathAttempts:o}}=B(g=>g.app),{activeSubscriptions:t}=B(g=>g.account),{t:r}=L(),h=()=>{n(Gt(-1))};return e.jsxs(Y,{isOpen:a,onClose:i,size:"5xl",scrollBehavior:"inside",children:[e.jsx(F,{}),e.jsxs(J,{children:[e.jsx(q,{children:r("header.settings.procedures.unlockSimplePath.title")}),e.jsx(X,{}),e.jsxs(Q,{children:[e.jsx(w,{mb:"2",children:r("header.settings.procedures.unlockSimplePath.content1")}),e.jsx(w,{mb:"2",children:r("header.settings.procedures.unlockSimplePath.content2")}),e.jsx(w,{mb:"2",children:r("header.settings.procedures.unlockSimplePath.content3")})]}),e.jsx(xe,{children:e.jsx(ze,{label:r("header.settings.pro"),isOpen:!t.RMP_CLOUD&&o>=0,children:e.jsx(E,{onClick:h,isDisabled:!t.RMP_CLOUD||o<0,children:o>=0?r("header.settings.procedures.unlockSimplePath.check"):r("header.settings.procedures.unlockSimplePath.unlocked")})})})]})]})},rr=s=>{const{isOpen:a,onClose:i}=s,n=P(),o=Us(),{t}=L(),r=b.useRef(window.graph),[h,g]=b.useState(!1),f=async()=>{g(!0);const d=JSON.stringify(r.current.export());try{const m=await ar(d);r.current.clear(),r.current.import(m),n(K()),n(V()),n(se(r.current.export())),o({title:t("header.settings.procedures.updateColor.success"),status:"success",duration:9e3,isClosable:!0})}catch(m){console.error("[rmp] Error in updating all colors: ".concat(m)),o({title:t("header.settings.procedures.updateColor.error",{e:m}),status:"error",duration:9e3,isClosable:!0})}g(!1),i()};return e.jsxs(Y,{isOpen:a,onClose:i,size:"xl",scrollBehavior:"inside",children:[e.jsx(F,{}),e.jsxs(J,{children:[e.jsx(q,{children:t("header.settings.procedures.updateColor.title")}),e.jsx(X,{}),e.jsx(Q,{children:e.jsx(w,{children:t("header.settings.procedures.updateColor.content")})}),e.jsxs(xe,{children:[e.jsx(E,{colorScheme:"blue",variant:"outline",mr:"1",onClick:i,children:t("cancel")}),e.jsx(E,{colorScheme:"red",onClick:f,isLoading:h,children:t("apply")})]})]})]})},Ps=s=>s.length>=4&&s.every(a=>typeof a=="string")&&!!s[2].match(/^#[0-9a-fA-F]{6}$/)&&Object.values(ws).includes(s[3]),or=s=>{const a=[],i=(n,o)=>{if(Array.isArray(n)&&Ps(n)){a.push({path:o||"",value:n});return}for(const t in n){const r=n[t],h=o?"".concat(o,".").concat(t):t;Array.isArray(r)?Ps(r)?a.push({path:h,value:r}):r.forEach((g,f)=>i(g,"".concat(h,".").concat(f))):r&&typeof r=="object"&&i(r,h)}};return i(s),a},ir=(s,a,i)=>{const n=a.split(".");let o=s;for(let t=0;t{const a=JSON.parse(s),i=new Date().getTime(),n=or(a);console.log("[rmp] Found all themes pending for update",n);const o=1e4;let t,r=!1;const h=new Promise((g,f)=>{t=setTimeout(()=>{r=!0,f("Executing time exceeds ".concat(o,"ms"))},o),(async()=>{for(const{path:d,value:m}of n){if(r)throw new Error("Update aborted");const[l,u,c,p,...x]=m,j=await Dt([l,u,c,p]);ir(a,d,[...j,...x])}})().then(g).catch(f)});try{return await h,console.log("[rmp] Themes update completed, elapsed time ".concat((new Date().getTime()-i)/1e3," sec")),a}finally{clearTimeout(t)}},Gs=1,lr=()=>{const{state:s}=B(g=>g.account),{t:a}=L(),[i,n]=b.useState(!1),[o,t]=b.useState(Gs);b.useEffect(()=>{let g;return i&&o>0?g=window.setTimeout(()=>{t(o-1)},1e3):o===0&&n(!1),()=>clearTimeout(g)},[i,o]);const r=()=>{n(!0),t(Gs),Zt()},h={"logged-out":a("header.settings.subscription.logged-out"),free:a("header.settings.subscription.free"),subscriber:a("header.settings.subscription.subscriber"),expired:a("header.settings.subscription.expired")};return e.jsxs(T,{width:"100%",mb:"3",children:[e.jsx(w,{as:"b",fontSize:"xl",children:a("header.settings.subscription.title")}),e.jsx(T,{mt:"3",children:e.jsxs(T,{display:"flex",mb:"1",children:[e.jsx(w,{flex:"1",children:h[s]}),e.jsx(ee,{"aria-label":"refresh",variant:"ghost",size:"sm",icon:e.jsx(Ut,{}),isDisabled:i,onClick:()=>r()})]})})]})},je={width:"100%",justifyContent:"space-between"},ae={fontFamily:"-apple-system"},cr=s=>{const{isOpen:a,onClose:i}=s,{activeSubscriptions:n}=B(W=>W.account),{telemetry:{project:o},preference:{autoParallel:t,randomStationsNames:r}}=B(W=>W.app),{keepLastPath:h,parallelLinesCount:g}=B(W=>W.runtime),f=P(),{t:d}=L(),m=Ds("primary.500","primary.300"),[l,u]=b.useState(!1),[c,p]=b.useState(!1),[x,j]=b.useState(!1),[S,y]=b.useState(!1),[A,H]=b.useState(!1),[G,te]=b.useState(!1),[he,U]=b.useState(!1),$=M.isAllowAnalytics(),ue=W=>{f($t(W))},Le=n.RMP_CLOUD?Vt:Kt,Be=g>=Le,Ae=!n.RMP_CLOUD,Pe=W=>{f(en(W.target.value))};return e.jsxs(Y,{isOpen:a,onClose:i,size:"xl",scrollBehavior:"inside",trapFocus:!1,children:[e.jsx(F,{}),e.jsxs(J,{children:[e.jsx(q,{children:d("header.settings.title")}),e.jsx(X,{}),e.jsx(Q,{children:e.jsxs(Ne,{divider:e.jsx(ht,{borderColor:"gray.200"}),children:[e.jsx(lr,{}),e.jsxs(T,{width:"100%",mb:"3",children:[e.jsx(w,{as:"b",fontSize:"xl",children:d("header.settings.preference.title")}),e.jsxs(T,{mt:"3",children:[e.jsxs(T,{display:"flex",mb:"1",children:[e.jsx(w,{flex:"1",children:d("header.settings.preference.keepLastPath")}),e.jsx(De,{isChecked:h,onChange:({target:{checked:W}})=>f(Yt(W))})]}),e.jsxs(T,{display:"flex",mb:"1",children:[e.jsx(w,{children:d("header.settings.preference.autoParallel")}),e.jsx(le,{ml:"auto",colorScheme:"green",children:"New"}),e.jsx(ze,{label:d("header.settings.proWithTrial"),children:e.jsx(le,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",children:"PRO"})}),e.jsx(De,{ml:"1",isDisabled:Be,isChecked:t,onChange:({target:{checked:W}})=>f(Ft(W))})]}),e.jsxs(T,{mb:"1",display:"flex",children:[e.jsx(w,{flex:"1",children:d("header.settings.preference.randomStationNames.title")}),e.jsx(le,{ml:"auto",colorScheme:"green",children:"New"}),e.jsx(ze,{label:d("header.settings.pro"),children:e.jsx(le,{color:"gray.50",ml:"1",background:"radial-gradient(circle, #3f5efb, #fc466b)",children:"PRO"})}),e.jsxs(ut,{size:"xs",width:"auto",ml:"1",value:r,onChange:Pe,children:[e.jsx("option",{value:"none",children:d("header.settings.preference.randomStationNames.none")}),e.jsx("option",{value:Ue.Shmetro,disabled:Ae,children:d("header.settings.preference.randomStationNames.".concat(Ue.Shmetro))}),e.jsx("option",{value:Ue.Bjsubway,disabled:Ae,children:d("header.settings.preference.randomStationNames.".concat(Ue.Bjsubway))})]})]})]})]}),e.jsxs(T,{width:"100%",mb:"3",children:[e.jsx(w,{as:"b",fontSize:"xl",children:d("header.settings.procedures.title")}),e.jsxs(T,{mt:"3",children:[e.jsx(E,{sx:je,rightIcon:e.jsx(fe,{}),onClick:()=>u(!0),children:d("header.settings.procedures.translate.title")}),e.jsx(tr,{isOpen:l,onClose:()=>u(!1)}),e.jsx(E,{sx:je,rightIcon:e.jsx(fe,{}),onClick:()=>p(!0),children:d("header.settings.procedures.scale.title")}),e.jsx(sr,{isOpen:c,onClose:()=>p(!1)}),e.jsxs(E,{sx:je,rightIcon:e.jsx(fe,{}),onClick:()=>j(!0),children:[d("header.settings.procedures.changeType.title"),e.jsx(ze,{label:d("header.settings.pro"),children:e.jsx(le,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",mr:"auto",children:"PRO"})})]}),e.jsx(jn,{isOpen:x,onClose:()=>j(!1),isSelect:!1}),e.jsx(E,{sx:je,rightIcon:e.jsx(fe,{}),onClick:()=>y(!0),children:d("header.settings.procedures.removeLines.title")}),e.jsx(er,{isOpen:S,onClose:()=>y(!1)}),e.jsx(E,{sx:je,rightIcon:e.jsx(fe,{}),onClick:()=>H(!0),children:d("header.settings.procedures.updateColor.title")}),e.jsx(rr,{isOpen:A,onClose:()=>H(!1)}),e.jsxs(E,{sx:je,rightIcon:e.jsx(fe,{}),onClick:()=>te(!0),children:[d("header.settings.procedures.unlockSimplePath.title"),e.jsx(ze,{label:d("header.settings.pro"),children:e.jsx(le,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",mr:"auto",children:"PRO"})})]}),e.jsx(nr,{isOpen:G,onClose:()=>te(!1)}),e.jsx(E,{sx:je,rightIcon:e.jsx(fe,{}),onClick:()=>U(!0),children:d("header.settings.procedures.masterManager.title")}),e.jsx(fn,{isOpen:he,onClose:()=>U(!1)})]})]}),e.jsxs(T,{width:"100%",mb:"3",children:[e.jsx(w,{as:"b",fontSize:"xl",children:d("header.settings.shortcuts.title")}),e.jsx(T,{mt:"3",children:e.jsxs(pt,{children:[e.jsx(gt,{children:e.jsxs(D,{children:[e.jsx(As,{children:d("header.settings.shortcuts.keys")}),e.jsx(As,{children:d("header.settings.shortcuts.description")})]})}),e.jsxs(mt,{children:[e.jsxs(D,{children:[e.jsx(k,{children:e.jsx(C,{children:"f"})}),e.jsx(k,{children:d("header.settings.shortcuts.f")})]}),e.jsxs(D,{children:[e.jsx(k,{children:e.jsx(C,{children:"s"})}),e.jsx(k,{children:d("header.settings.shortcuts.s")})]}),e.jsxs(D,{children:[e.jsx(k,{children:e.jsxs(T,{display:"flex",flexDirection:"row",children:[e.jsx(Jt,{}),e.jsx(qt,{}),e.jsx(Xt,{}),e.jsx(Qt,{})]})}),e.jsx(k,{children:d("header.settings.shortcuts.arrows")})]}),e.jsxs(D,{children:[e.jsx(k,{children:e.jsxs(T,{display:"flex",flexDirection:"row",children:[e.jsx(C,{children:"i"}),e.jsx(C,{children:"j"}),e.jsx(C,{children:"k"}),e.jsx(C,{children:"l"})]})}),e.jsx(k,{children:d("header.settings.shortcuts.ijkl")})]}),e.jsxs(D,{children:[e.jsx(k,{children:pe?e.jsx(C,{sx:ae,children:"⇧"}):e.jsx(C,{children:"shift"})}),e.jsx(k,{children:d("header.settings.shortcuts.shift")})]}),e.jsxs(D,{children:[e.jsx(k,{children:pe?e.jsx(C,{sx:ae,children:"⌥"}):e.jsx(C,{children:"alt"})}),e.jsx(k,{children:d("header.settings.shortcuts.alt")})]}),e.jsxs(D,{children:[e.jsx(k,{children:pe?e.jsx(C,{sx:ae,children:"⌫"}):e.jsx(C,{children:"delete"})}),e.jsx(k,{children:d("header.settings.shortcuts.delete")})]}),e.jsxs(D,{children:[e.jsxs(k,{children:[pe?e.jsx(C,{sx:ae,children:"⌘"}):e.jsx(C,{children:"ctrl"})," + ",e.jsx(C,{children:"x"})]}),e.jsx(k,{children:d("header.settings.shortcuts.cut")})]}),e.jsxs(D,{children:[e.jsxs(k,{children:[pe?e.jsx(C,{sx:ae,children:"⌘"}):e.jsx(C,{children:"ctrl"})," + ",e.jsx(C,{children:"c"})]}),e.jsx(k,{children:d("header.settings.shortcuts.copy")})]}),e.jsxs(D,{children:[e.jsxs(k,{children:[pe?e.jsx(C,{sx:ae,children:"⌘"}):e.jsx(C,{children:"ctrl"})," + ",e.jsx(C,{children:"v"})]}),e.jsx(k,{children:d("header.settings.shortcuts.paste")})]}),e.jsxs(D,{children:[e.jsxs(k,{children:[pe?e.jsx(C,{sx:ae,children:"⌘"}):e.jsx(C,{children:"ctrl"})," + ",e.jsx(C,{children:"z"})]}),e.jsx(k,{children:d("header.settings.shortcuts.undo")})]}),e.jsxs(D,{children:[e.jsx(k,{children:pe?e.jsxs(e.Fragment,{children:[e.jsx(C,{sx:ae,children:"⇧"})," + ",e.jsx(C,{sx:ae,children:"⌘"})," + ",e.jsx(C,{children:"z"})]}):e.jsxs(e.Fragment,{children:[e.jsx(C,{children:"ctrl"})," + ",e.jsx(C,{children:"y"})]})}),e.jsx(k,{children:d("header.settings.shortcuts.redo")})]})]})]})})]}),e.jsxs(T,{width:"100%",mb:"3",children:[e.jsx(w,{as:"b",fontSize:"xl",children:d("header.settings.telemetry.title")}),e.jsxs(T,{mt:"3",children:[e.jsx(w,{fontSize:"sm",lineHeight:"100%",color:"gray.600",children:d("header.settings.telemetry.info")}),e.jsxs(T,{mt:"3",mb:"1",children:[e.jsxs(T,{display:"flex",mb:"1",children:[e.jsx(w,{flex:"1",children:d("header.settings.telemetry.essential")}),e.jsx(ze,{label:d("header.settings.telemetry.essentialTooltip"),children:e.jsx(De,{isChecked:$,isDisabled:!0})})]}),e.jsx(w,{fontSize:"sm",lineHeight:"100%",color:"gray.600",children:d("header.settings.telemetry.essentialInfo")}),e.jsxs(O,{color:m,fontSize:"sm",lineHeight:"100%",href:"https://support.google.com/analytics/answer/11593727",isExternal:!0,children:[d("header.settings.telemetry.essentialLink")," ",e.jsx(N,{as:R})]})]}),e.jsxs(T,{mt:"1",mb:"1",children:[e.jsxs(T,{display:"flex",children:[e.jsx(w,{flex:"1",children:d("header.settings.telemetry.additional")}),e.jsx(De,{isChecked:o,onChange:({target:{checked:W}})=>ue(W)})]}),e.jsx(w,{fontSize:"sm",lineHeight:"100%",color:"gray.600",children:d("header.settings.telemetry.additionalInfo")})]})]})]})]})})]})]})},dr=()=>{const[s,a]=b.useState(!1),{svgViewBoxZoom:i}=B(t=>t.param),n=P(),o=[{type:"slider",label:"",value:400-i,min:10,max:390,step:1,onChange:t=>n(Oe(400-t)),leftIcon:e.jsx(sn,{}),rightIcon:e.jsx(Is,{}),minW:160}];return e.jsxs(Vs,{isOpen:s,onOpen:()=>a(!0),onClose:()=>a(!1),children:[e.jsx(Ks,{children:e.jsx(ee,{"aria-label":"zoom",variant:"ghost",size:"sm",icon:e.jsx(Is,{}),onClick:()=>a(!s)})}),e.jsx(Ys,{children:e.jsx(Fs,{children:e.jsx(ke,{fields:o,noLabel:!0})})})]})};function hr(){const{t:s}=L(),a=P(),{past:i,future:n}=B(c=>c.param),o=M.isAllowAnalytics(),[t,r]=b.useState(!1),[h,g]=b.useState(!1),f=Ws(M.getEnv),d=Ws(M.getAppVersion);b.useEffect(()=>{o&&f!==ts.DEV&&M.event(Me.APP_LOAD,{isStandaloneWindow:M.isStandaloneWindow()})},[f]);const m=c=>{M.getI18nInstance().changeLanguage(c)},l=()=>{a(dn()),a(K()),a(V())},u=()=>{a(hn()),a(K()),a(V())};return e.jsxs(tn,{children:[e.jsx(Ce,{as:"h4",size:"md",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",children:s("header.about.rmp")}),e.jsx(nn,{environment:f,version:d,popoverHeader:f===ts.PRD?void 0:e.jsxs(Hs,{i18nKey:"header.popoverHeader",environment:f,children:["You're on ",{environment:f}," environment!"]}),popoverBody:f===ts.PRD?void 0:e.jsx(Hs,{i18nKey:"header.popoverBody",children:"This is a testing environment where we test the latest beta RMP."})}),e.jsxs(xt,{ml:"auto",children:[e.jsx(ie,{children:e.jsx($n,{})}),e.jsx(ie,{children:e.jsx(ee,{size:"sm",variant:"ghost","aria-label":"Undo",icon:e.jsx(rn,{}),isDisabled:i.length===0,onClick:l})}),e.jsx(ie,{children:e.jsx(ee,{size:"sm",variant:"ghost","aria-label":"Redo",icon:e.jsx(on,{}),isDisabled:n.length===0,onClick:u})}),e.jsx(ie,{children:e.jsx(dr,{})}),e.jsx(ie,{children:e.jsx(Xn,{})}),e.jsx(ie,{children:e.jsx(Dn,{})}),M.isStandaloneWindow()&&e.jsx(ie,{children:e.jsxs(fs,{children:[e.jsx(js,{as:ee,icon:e.jsx(an,{}),variant:"ghost",size:"sm"}),e.jsx(bs,{children:["en","zh-Hans","zh-Hant","ja","ko"].map(c=>e.jsx(ce,{onClick:()=>m(c),children:bn[c][c]},c))})]})}),e.jsx(ie,{children:e.jsx(ee,{size:"sm",variant:"ghost","aria-label":"Settings",icon:e.jsx(ln,{}),onClick:()=>r(!0)})}),e.jsx(ie,{children:e.jsx(ee,{size:"sm",variant:"ghost","aria-label":"Help",icon:e.jsx(cn,{}),onClick:()=>g(!0)})})]}),e.jsx(cr,{isOpen:t,onClose:()=>r(!1)}),e.jsx(zn,{isOpen:h,onClose:()=>g(!1)})]})}function ur(){const s=P(),a=B(n=>n.runtime.globalAlerts),i=n=>{M.isStandaloneWindow()?window.open("/".concat(n),"_blank"):M.openApp({appId:n})};return e.jsx(e.Fragment,{children:Object.entries(a).map(([n,{message:o,url:t,linkedApp:r}])=>e.jsxs(ft,{status:n,variant:"solid",size:"xs",pl:3,pr:1,py:0,zIndex:"1",children:[e.jsx(jt,{}),r?e.jsx(O,{onClick:()=>i(r),children:o}):t?e.jsx(O,{href:t,target:"_blank",children:o}):o,e.jsx(Zs,{ml:"auto",onClick:()=>s(un(n))})]},n))})}function jr(){return e.jsxs(e.Fragment,{children:[e.jsx(hr,{}),e.jsx(ur,{})]})}export{jr as default}; + */function He(s){const a=s.sizes.shift(),i=Math.max(Math.ceil(a[0]),1),n=Math.max(Math.ceil(a[1]),1),o=[i-1,n-1,1,1],t=performance.now(),r=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope;let h,g;r?(h=new OffscreenCanvas(1,1),g=new OffscreenCanvas(i,n)):(h=document.createElement("canvas"),h.width=1,h.height=1,g=document.createElement("canvas"),g.width=i,g.height=n);const f=h.getContext("2d"),d=g.getContext("2d");d&&(d.fillRect.apply(d,o),f.drawImage(g,i-1,n-1,1,1,0,0,1,1));const m=f&&f.getImageData(0,0,1,1).data[3]!==0,l=parseInt(performance.now()-t);return[h,g].forEach(u=>{u.height=0,u.width=0}),r?(postMessage({width:i,height:n,testTime:l,isTestPass:m}),!m&&s.sizes.length&&setTimeout(()=>{He(s)},0)):m?s.onSuccess({width:i,height:n,testTime:l}):(s.onError({width:i,height:n,testTime:l}),s.sizes.length&&setTimeout(()=>{He(s)},0)),m}const ns={area:[16384,14188,11402,11180,10836,8192,4096,1],height:[8388607,65535,32767,16384,8192,4096,1],width:[4194303,65535,32767,16384,8192,4096,1]},ve={max:null,min:1,sizes:[],step:1024,useWorker:!1,onError:Function.prototype,onSuccess:Function.prototype},Ee={};function rs(s){const a=s.width===s.height,i=s.height===1,n=s.width===1,o=[];if(!s.width||!s.height)s.sizes.forEach(t=>{const r=a||i?t:1,h=a||n?t:1;o.push([r,h])});else{const t=s.min||ve.min,r=s.step||ve.step;let h=Math.max(s.width,s.height);for(;h>=t;){const g=a||i?h:1,f=a||n?h:1;o.push([g,f]),h-=r}}return o}function Ve(s){const a=typeof window<"u",i=a&&"Promise"in window,n=a&&"HTMLCanvasElement"in window,o=a&&"OffscreenCanvas"in window,t=URL.createObjectURL(new Blob([])).slice(-36),r=performance.now(),{onError:h,onSuccess:g,...f}=s,d=()=>parseInt(performance.now()-r);let m=null;if(!n)return!1;if(s.useWorker&&o){const l="\n var canvasTest = ".concat(He.toString(),";\n onmessage = function(e) {\n canvasTest(e.data);\n };\n "),u=new Blob([l],{type:"application/javascript"}),c=URL.createObjectURL(u);m=new Worker(c),URL.revokeObjectURL(c),m.onmessage=function(p){const{width:x,height:j,testTime:S,isTestPass:y}=p.data,A={width:x,height:j,testTime:S,totalTime:d()};y?(Ee[t].onSuccess(A),delete Ee[t]):Ee[t].onError(A)}}if(i)return new Promise(l=>{const u={...s,onError(c){let{width:p,height:x,testTime:j}=c;const S={width:p,height:x,testTime:j,totalTime:d()};let y;if(s.sizes.length===0)y=!0;else{const[[A,H]]=s.sizes.slice(-1);y=p===A&&x===H}h(S),y&&l({...S,success:!1})},onSuccess(c){let{width:p,height:x,testTime:j}=c;const S={width:p,height:x,testTime:j,totalTime:d()};g(S),l({...S,success:!0})}};if(m){const{onError:c,onSuccess:p}=u;Ee[t]={onError:c,onSuccess:p},m.postMessage(f)}else He(u)});if(m)Ee[t]={onError:h,onSuccess:g},m.postMessage(f);else return He(s)}const vn={maxArea(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const a=rs({width:s.max,height:s.max,min:s.min,step:s.step,sizes:[...ns.area]}),i={...ve,...s,sizes:a};return Ve(i)},maxHeight(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const a=rs({width:1,height:s.max,min:s.min,step:s.step,sizes:[...ns.height]}),i={...ve,...s,sizes:a};return Ve(i)},maxWidth(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const a=rs({width:s.max,height:1,min:s.min,step:s.step,sizes:[...ns.width]}),i={...ve,...s,sizes:a};return Ve(i)},test(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const a={...ve,...s};return a.sizes=[...a.sizes],a.width&&a.height&&(a.sizes=[[a.width,a.height]]),Ve(a)}};var We=(s=>(s.left="l",s.right="r",s))(We||{}),be=(s=>(s.through="through",s.nonThrough="nonthrough",s))(be||{}),Fe=(s=>(s.local="local",s.express="express",s.direct="direct",s))(Fe||{}),ge=(s=>(s.MTR="mtr",s.GZMTR="gzmtr",s.SHMetro="shmetro",s))(ge||{}),Cs=(s=>(s.sh="sh",s.sh2020="sh2020",s))(Cs||{});const de=new Set,hs=new Set,us=new Set,ps=new Set,gs=new Map,me=new Map,os=new Set,is=new Map,Z=new Map;let _=[],_e=0;const Ke=new Map,as=new Map,ms=new Set,kn={localisedName:{en:"LEFT END"},num:"00",services:[Fe.local],parents:[],children:["lineend"],transfer:{groups:[{}],tick_direc:We.right,paid_area:!0},loop_pivot:!1,one_line:!0,int_padding:355},On={localisedName:{en:"RIGHT END"},num:"00",services:[Fe.local],parents:[],children:[],transfer:{groups:[{}],tick_direc:We.right,paid_area:!0},loop_pivot:!1,one_line:!0,int_padding:355},Mn={},$s={svgWidth:{destination:1500,runin:1500,railmap:1500,indoor:1500},svg_height:400,style:ge.SHMetro,y_pc:50,padding:10,branchSpacingPct:33,direction:We.right,platform_num:"1",theme:[wt.Shanghai,"sh1","#E3002B",ws.white],line_name:["地鐵線","Metro Line"],current_stn_idx:"jlaMj2",stn_list:Mn,namePosMTR:{isStagger:!0,isFlip:!0},customiseMTRDest:{isLegacy:!1,terminal:!1},line_num:"1",psd_num:"1",info_panel_type:Cs.sh,direction_gz_x:40,direction_gz_y:70,coline:{},loop:!1,loop_info:{bank:!0,left_and_right_factor:0,bottom_factor:1}},An={localisedName:{},num:"",services:[Fe.local],parents:[],children:[],transfer:{groups:[{}],tick_direc:We.right,paid_area:!0},loop_pivot:!1,one_line:!0,int_padding:355},z=s=>"".concat(s[0],"/").concat(s[1],"=").concat(s[2]).concat(s[3]),zs=s=>qs.includes(s),Tn=s=>{if(zs(s.style))return structuredClone(s[s.style].color)},Rn=(s,a)=>{const[i,n]=s.extremities(a),o=s.getEdgeAttributes(a),t=o.style;if(i!=n&&zs(t)){const r=Tn(o);ps.has(z(r))||(us.add(r),ps.add(z(r)),gs.set(r,i),me.set(z(r),new Set)),me.get(z(r)).add(i),me.get(z(r)).add(n),Z.has(i)?_.push({target:n,next:Z.get(i),color:r}):_.push({target:n,next:-1,color:r}),Z.set(i,_e),_e++,Z.has(n)?_.push({target:i,next:Z.get(n),color:r}):_.push({target:i,next:-1,color:r}),Z.set(n,_e),_e++}},et=(s,a,i)=>{if(me.get(z(i)).has(s)){me.get(z(i)).delete(s);for(let n=Z.get(s);n!=-1;n=_[n].next){const o=_[n].target,t=_[n].color;z(t)==z(i)&&et(o,s,i)}}},st=(s,a,i)=>{if(de.has(s))return;de.add(s);let n=0;const o=new Set;for(let t=Z.get(s);t!=-1;t=_[t].next){const r=_[t].target,h=_[t].color;z(h)==z(i)&&(o.has(r)||(o.add(r),n++,r!=a&&st(r,s,i)))}Ke.set(s,n)},Ls=(s,a)=>{const i=s.stn_list.lineend.parents;i.push(a),s.stn_list.lineend.parents=structuredClone(i).reverse(),s.stn_list.lineend.branch={...s.stn_list.lineend.branch,left:s.stn_list.lineend.parents.length==2?[be.through,i[1]]:void 0}},En=(s,a)=>{let i=0;for(let n=Z.get(s);n!=-1;n=_[n].next){_[n].target;const o=_[n].color;z(o)==z(a)&&i++}return i},tt=(s,a,i)=>{if(ms.has(s))return[];ms.add(s);const n=[];for(let o=Z.get(s);o!=-1;o=_[o].next){const t=_[o].target,r=_[o].color;t!=a&&z(r)==z(i)&&(t.startsWith("stn")?n.push(t):n.push(...tt(t,s,i)))}return n},xs=(s,a,i,n,o,t,r)=>{var l;if(de.has(s)&&(!s.startsWith("misc_node_")&&r.stn_list[s]==null||s.startsWith("misc_node_")&&!hs.has(s)||r.loop))return[];if(de.has(s)&&r.stn_list[s]!=null&&En(s,t)-1>=2){const u=[...r.stn_list[s].parents,a];if(r.stn_list[u[1]]==null){const x=u[0];u[0]=u[1],u[1]=x}r.stn_list[s].parents=structuredClone(u).reverse(),r.stn_list[s].branch={...r.stn_list[s].branch,left:[be.through,u[1]]};const c=[];for(const x of r.stn_list[s].children)x!=a&&c.push(x);r.stn_list[s].children=structuredClone(c),(l=r.stn_list[s].branch)==null||delete l.right;const p=[];for(const x of r.stn_list.lineend.parents)x!=s&&p.push(x);return r.stn_list.lineend.parents=structuredClone(p).reverse(),r.stn_list.lineend.branch={...r.stn_list.lineend.branch,left:r.stn_list.lineend.parents.length==2?[be.through,p[1]]:void 0},c.length==0&&(r.stn_list[s].children=["lineend"],Ls(r,s)),[s]}de.add(s);const h=[],g=[],f=[],d=new Set,m=new Set;for(let u=Z.get(s);u!=-1;u=_[u].next){const c=_[u].target,p=_[u].color;if(c!=i){if(z(p)==z(t)){if(m.has(c))continue;if(m.add(c),s.startsWith("misc_node_")){const x=xs(c,a,s,n+1,o,t,r);x.length!=0&&h.push(...x)}else{const x=xs(c,s,s,n+1,o,t,r);x.length!=0&&h.push(...x)}}if(!d.has(z(p))&&z(p)!=z(t)){d.add(z(p));const x={theme:p,name:["ch_".concat(z(p)),"en_".concat(z(p))]};f.push(x)}}}if(h.length==2){for(let u=0;u<2;u++)h[u]=="lineend"&&h.splice(u,1);if(r.stn_list[h[1]].parents.length>=2){const u=h[0];h[0]=h[1],h[1]=u}}if(de.has(s)&&r.stn_list[s]!=null){const u=[];for(const c of r.stn_list.lineend.parents)c!=s&&u.push(c);r.stn_list.lineend.parents=structuredClone(u).reverse(),r.stn_list.lineend.branch={...r.stn_list.lineend.branch,left:r.stn_list.lineend.parents.length==2?[be.through,u[1]]:void 0},h.length==0&&(ms.clear(),g.push(...tt(s,a,t)))}if(s.startsWith("misc_node_"))return hs.add(s),h;{const u=o.getNodeAttributes(s).type,c=o.getNodeAttributes(s)[u];if(r.stn_list[s]=structuredClone(An),r.stn_list[s].localisedName={zh:c.names[0],en:c.names[1]},r.stn_list[s].num=String(n),o.getNodeAttributes(s).type==I.GzmtrBasic){const p=c;r.stn_list[s].num=p.stationCode,(p.secondaryNames[0]!==""||p.secondaryNames[1]!=="")&&(r.stn_list[s].localisedSecondaryName={zh:p.secondaryNames[0],en:p.secondaryNames[1]})}if(o.getNodeAttributes(s).type==I.GzmtrInt){const p=c,x=p.transfer[0];for(const j of x)if(z(j)==z(t)){r.stn_list[s].num=String(j[5]);break}(p.secondaryNames[0]!==""||p.secondaryNames[1]!=="")&&(r.stn_list[s].localisedSecondaryName={zh:p.secondaryNames[0],en:p.secondaryNames[1]})}return h.length!=0?(r.stn_list[s].children=structuredClone(h).reverse(),h.length==2&&(r.stn_list[s].branch={...r.stn_list[s].branch,right:[be.through,h[1]]})):(r.stn_list[s].children=["lineend"],Ls(r,s)),g.push(a),r.stn_list[s].parents=structuredClone(g).reverse(),g.length==2&&(r.stn_list[s].branch={...r.stn_list[s].branch,left:[be.through,g[1]]}),f.length!=0&&(r.stn_list[s].transfer.groups[0].lines=structuredClone(f)),[s]}},Nn=(s,a,i,n)=>{const o=structuredClone($s);n=="LOOP"&&(o.loop=!0);let t;switch(s.getNodeAttributes(i).type){case I.GzmtrBasic:case I.GzmtrInt:t=ge.GZMTR;break;case I.MTR:t=ge.MTR;break;default:t=ge.SHMetro;break}o.theme=structuredClone(a),o.style=t,o.stn_list.linestart=structuredClone(kn),o.stn_list.lineend=structuredClone(On),de.clear(),hs.clear();const r=xs(i,"linestart","linestart",1,s,a,o);if(o.current_stn_idx=r[0],o.stn_list.linestart.children=[r[0]],!(Object.keys(o.stn_list).length<=3||o.stn_list.lineend.parents.length>=3))return structuredClone(o)},_n=s=>{var n,o;de.clear(),us.clear(),ps.clear(),gs.clear(),me.clear(),os.clear(),is.clear(),Z.clear(),_=[],_e=0,Ke.clear(),as.clear(),s.filterEdges(t=>t.startsWith("line")).forEach(t=>{zs(s.getEdgeAttributes(t).style)&&Rn(s,t)});let a=0;s.forEachNode(t=>{as.set(t,++a)}),as.set("lineend",++a);const i=[];for(const t of us){let r=0;for(;me.get(z(t)).size!=0;){let h="line_root";me.get(z(t)).forEach(f=>{h=="line_root"&&(h=f)}),et(h,"line_root",t);const g={theme:t,index:++r};os.add(g),is.set(g,h)}}for(const t of os){const{theme:r}=t;de.clear(),Ke.clear(),st(is.get(t),"line_root",r);let h=!0,g="LINE";const f=[];for(const[m,l]of Ke)l==1&&f.push(m),l==3&&(g="BRANCH"),l>3&&(h=!1);if(!h)continue;f.length==0&&(g="LOOP",f.push(gs.get(r)));const d=[];for(const m of f){const l=Nn(s,r,m,g);l!=null&&d.push([l,(n=l.stn_list[l.current_stn_idx].localisedName.zh)!=null?n:"",(o=l.stn_list[l.current_stn_idx].localisedName.en)!=null?o:""])}d.length!=0&&i.push({id:ls(10),theme:r,param:structuredClone(d),type:g})}return i},In=s=>s[0]!=""&&s[1]!=""?s[0]+"_"+s[1]:s[0]!=""?s[0]:s[1]!=""?s[1]:"".concat(new Date().valueOf()),Hn=(s,a)=>{let i=s;return a.forEach((n,o)=>{const t=new RegExp("ch_".concat(o),"g"),r=new RegExp("en_".concat(o),"g");i=i.replace(t,n[0]),i=i.replace(r,n[1])}),i},Wn=(s,a,i,n)=>{s.line_name=a,s.line_num=String(i),ds("RMG_".concat(In(a),".json"),"application/json",Hn(JSON.stringify(s),n))},Ln={LINE:"#33ccff",BRANCH:"#007B61",LOOP:"#ff6666"},Bn=s=>{const{isOpen:a,onClose:i}=s,{t:n}=L(),o=b.useRef(window.graph),[t,r]=b.useState(!1),[h,g]=b.useState([[$s,"",""]]),[f,d]=b.useState(["","",""]),[m,l]=b.useState(new Map),[u,c]=b.useState(new Map),[p,x]=b.useState([]);b.useEffect(()=>{if(a){const S=_n(o.current),y=new Map;S.forEach(({id:A,theme:H})=>{y.set(z(H),A)}),x(S),l(y)}},[a]);const j=(S,y)=>document.getElementById("2RMG_"+y+"_"+S).value.trim();return e.jsxs(Y,{isOpen:a,onClose:i,size:"2xl",scrollBehavior:"inside",children:[e.jsx(F,{}),e.jsxs(q,{children:[e.jsx(J,{children:e.jsx(w,{as:"b",fontSize:"xl",children:n("header.download.2rmg.title")})}),e.jsx(X,{}),e.jsxs(Q,{children:[e.jsx(w,{fontSize:"sm",mt:"3",lineHeight:"100%",children:n("header.download.2rmg.info1")}),e.jsx(w,{fontSize:"sm",mt:"3",lineHeight:"100%",children:n("header.download.2rmg.info2")}),e.jsx("br",{}),p.length===0?e.jsx(w,{fontSize:"md",children:n("header.download.2rmg.noline")}):e.jsx("table",{children:e.jsx("tbody",{children:p.map(({id:S,theme:y,param:A,type:H})=>e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx(Ts,{name:y[0]=="other"&&y[1]=="other"?y[2]:y[1],bg:y[2],fg:y[3]})}),e.jsx("td",{children:e.jsx($e,{placeholder:n("header.download.2rmg.placeholder.chinese"),id:"2RMG_nameCh_".concat(S),size:"sm"})}),e.jsx("td",{children:e.jsx($e,{placeholder:n("header.download.2rmg.placeholder.english"),id:"2RMG_nameEn_".concat(S),size:"sm"})}),e.jsx("td",{children:e.jsx($e,{placeholder:n("header.download.2rmg.placeholder.lineCode"),id:"2RMG_lineNum_".concat(S),size:"sm"})}),e.jsx("td",{children:e.jsx(Ts,{name:n("header.download.2rmg.type.".concat(H.toLowerCase())),bg:Ln[H],fg:ws.white})}),e.jsx("td",{children:e.jsx(E,{colorScheme:"blue",variant:"ghost",mr:"1",onClick:()=>{const G=j(S,"nameCh"),te=j(S,"nameEn"),he=j(S,"lineNum"),U=new Map;m.forEach(($,ue)=>{U.set(ue,[j($,"nameCh"),j($,"nameEn")])}),g(A),d([G,te,he]),c(U),r(!0)},size:"sm",children:e.jsx(Js,{})})})]},JSON.stringify(y)))})})]}),e.jsx(xe,{children:e.jsx(E,{colorScheme:"blue",variant:"outline",mr:"1",onClick:i,children:n("close")})})]}),e.jsx(Pn,{isOpen:t,onClose:()=>r(!1),param:h,nameList:f,interchangeName:u})]})},Pn=s=>{const{isOpen:a,onClose:i,param:n,nameList:o,interchangeName:t}=s,{t:r}=L(),[h,g]=b.useState("");return b.useEffect(()=>{o[0]!=""&&o[1]!=""?g(o[0]+"/"+o[1]):o[0]!=""?g(o[0]):o[1]!=""?g(o[1]):g("")},[...o]),e.jsxs(Y,{isOpen:a,onClose:i,size:"md",scrollBehavior:"inside",children:[e.jsx(F,{}),e.jsxs(q,{children:[e.jsx(J,{children:e.jsxs(w,{as:"b",fontSize:"xl",children:[r("header.download.2rmg.download")," ",h]})}),e.jsx(X,{}),e.jsx(Q,{children:e.jsxs(lt,{children:[e.jsx(w,{fontSize:"sm",mb:"2",lineHeight:"100%",children:r("header.download.2rmg.downloadInfo")}),n.map(([f,d,m])=>e.jsxs(E,{onClick:()=>{Wn(f,[o[0],o[1]],o[2],t)},overflow:"hidden",size:"md",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"ruby",children:[d.replaceAll("\n","⏎"),"/",m.replaceAll("\n","⏎")]},"".concat(d).concat(m)))]})}),e.jsx(xe,{children:e.jsx(E,{colorScheme:"blue",variant:"outline",mr:"1",onClick:i,children:r("close")})})]})]})},Gn=s=>{const{isOpen:a,onClose:i}=s,{t:n}=L();return e.jsxs(Y,{isOpen:a,onClose:i,size:"xl",scrollBehavior:"inside",children:[e.jsx(F,{}),e.jsxs(q,{children:[e.jsx(J,{children:n("header.download.termsAndConditions")}),e.jsx(X,{}),e.jsx(Q,{children:e.jsxs(ct,{children:[e.jsxs(ye,{children:["The layout of the elements on the signage or rail map, is designed by"," ",e.jsxs(O,{color:"teal.500",href:"https://www.shmetro.com/",isExternal:!0,children:["Shanghai Shentong Metro Group ",e.jsx(N,{as:R})]}),", ",e.jsxs(O,{color:"teal.500",href:"https://www.gzmtr.com/",isExternal:!0,children:["Guangzhou Metro Group ",e.jsx(N,{as:R})]})," or ",e.jsxs(O,{color:"teal.500",href:"https://www.mtr.com.hk/",isExternal:!0,children:["MTR Corporation ",e.jsx(N,{as:R})]}),", depending on your selection. You shall grant appropriate permit or license from the relevant company above before using the generated images for commercial purposes, if it is required to do so.",e.jsx("br",{}),"标志版或路线图的元素或布局,基于你所选择的风格,为",e.jsxs(O,{color:"teal.500",href:"https://www.shmetro.com/",isExternal:!0,children:["上海申通地铁集团 ",e.jsx(N,{as:R})]}),",",e.jsxs(O,{color:"teal.500",href:"https://www.gzmtr.com/",isExternal:!0,children:["广州地铁集团公司 ",e.jsx(N,{as:R})]}),"或",e.jsxs(O,{color:"teal.500",href:"https://www.mtr.com.hk/",isExternal:!0,children:["港铁公司 ",e.jsx(N,{as:R})]}),"所设计。在产生的图像用作商业用途前,你应向相关公司取得适当之许可证或授权。"]}),e.jsxs(ye,{children:["The elements including shapes and lines on the image are drawn by"," ",e.jsxs(O,{color:"teal.500",href:"https://www.github.com/thekingofcity",isExternal:!0,children:["thekingofcity ",e.jsx(N,{as:R})]})," and ",e.jsxs(O,{color:"teal.500",href:"https://www.github.com/wongchito",isExternal:!0,children:["Chito Wong ",e.jsx(N,{as:R})]}),", based on the design standards or rules of the companies listed above. You may use them for any purposes, but it is recommended to state the name and the link of software alongside.",e.jsx("br",{}),"图像的元素,包括图形及线条,均由",e.jsxs(O,{color:"teal.500",href:"https://www.github.com/thekingofcity",isExternal:!0,children:["thekingofcity ",e.jsx(N,{as:R})]}),"及",e.jsxs(O,{color:"teal.500",href:"https://www.github.com/wongchito",isExternal:!0,children:["Chito Wong ",e.jsx(N,{as:R})]}),"基于上述公司设计标准或准则绘制。你可将其用于任何目的,但我们建议你于使用同时附以我们的名字以及本网站地址。"]}),e.jsxs(ye,{children:["Due to copyright, licensing and other legal restrictions, Rail Map Painter uses"," ",e.jsxs(O,{color:"teal.500",href:"https://github.com/ButTaiwan/genyo-font",isExternal:!0,children:["GenYoMin provided by ButTaiwan ",e.jsx(N,{as:R})]}),", and Vegur instead of MTRSung and Myriad Pro respectively to display and generate MTR-style signage. You shall grant appropriate permit or license from the manufacturers before using those generated images for commercial purposes.",e.jsx("br",{}),"由于著作权及其他法律限制,铁路路线图绘制器使用由",e.jsxs(O,{color:"teal.500",href:"https://github.com/ButTaiwan/genyo-font",isExternal:!0,children:["ButTaiwan提供的源樣明體 ",e.jsx(N,{as:R})]}),",以及Vegur,以代替港铁样式标志牌所使用的地铁宋及Myriad Pro。在产生之图像用作商业用途前,你应向字型生产厂商取得适当之许可证或授权。"]}),e.jsxs(ye,{children:["The exported images in PNG or SVG format may be modified, published, or used for other purposes except commercial use, under the conditions above.",e.jsx("br",{}),"输出的PNG或SVG图像可基于上述条款,在非商业使用时,用于修改、发行或其他用途。"]}),e.jsxs(ye,{children:["All flag emojis shown on Windows platforms are designed by"," ",e.jsxs(O,{color:"teal.500",href:"https://openmoji.org/",isExternal:!0,children:["OpenMoji ",e.jsx(N,{as:R})]})," ","– the open-source emoji and icon project. License:",e.jsxs(O,{color:"teal.500",href:"https://creativecommons.org/licenses/by-sa/4.0/",isExternal:!0,children:["CC BY-SA 4.0 ",e.jsx(N,{as:R})]}),e.jsx("br",{}),"于Windows作业系统上显示的国旗Emoji为",e.jsxs(O,{color:"teal.500",href:"https://openmoji.org/",isExternal:!0,children:["OpenMoji ",e.jsx(N,{as:R})]}),"所设计。许可证:",e.jsxs(O,{color:"teal.500",href:"https://creativecommons.org/licenses/by-sa/4.0/",isExternal:!0,children:["CC BY-SA 4.0 ",e.jsx(N,{as:R})]})]}),e.jsxs(ye,{children:["We reserve the rights, without prior notice, to modify, add, or remove these terms. The Chinese translation is for reference only. In case of any discrepancy between the English version and the Chinese version, the English version shall prevail.",e.jsx("br",{}),"我们保留修改、新增或移除上述条款之权利,而无需另行通知。中文译本仅供参考,文义如与英文有歧异,概以英文本为准。"]})]})})]})]})};function Dn(){const s=Ds("white","var(--chakra-colors-gray-800)"),a=P(),{telemetry:{project:i}}=B(v=>v.app),n=B(v=>v.param),o=M.isAllowAnalytics(),{t}=L(),r=b.useRef(window.graph),[h,g]=b.useState("png"),f={png:t("header.download.png"),svg:t("header.download.svg")},[d,m]=b.useState(2),[l,u]=b.useState({width:1,height:1,benchmark:.001}),[c,p]=b.useState(200),x=[10,25,33,50,67,75,100,125,150,175,200,250,300,400,500,750,1e3],j=Object.fromEntries(x.map(v=>[v,"".concat(v,"%")])),[S,y]=b.useState([]),[A,H]=b.useState(!1),G=[{type:"select",label:t("header.download.format"),value:h,options:f,onChange:v=>g(v==="png"?"png":"svg")}],te=[{type:"select",label:t("header.download.svgVersion"),value:d,options:{1.1:t("header.download.svg1.1"),2:t("header.download.svg2")},onChange:v=>{m(v),v===1.1&&Ae(!0)}}],he=[{type:"select",label:t("header.download.scale"),value:c,options:j,disabledOptions:S,onChange:v=>p(v)},{type:"switch",label:t("header.download.transparent"),isChecked:A,onChange:H}],[U,$]=b.useState(!1),[ue,Le]=b.useState(!1),[Be,Ae]=b.useState(!1),[Pe,W]=b.useState(!1),[vs,nt]=b.useState(!1),[rt,ks]=b.useState(!1);b.useEffect(()=>{(async()=>{const Te=await vn.maxArea({usePromise:!0,useWorker:!0});u(Te)})()},[]),b.useEffect(()=>{if(U){const{xMin:v,yMin:Te,xMax:qe,yMax:Ge}=St(r.current),[Je,we]=[qe-v,Ge-Te],Re=x.filter(Se=>Je*Se/100>l.width&&we*Se/100>l.height);y(Re)}},[U]);const ot=()=>{o&&M.event(Me.DOWNLOAD_PARAM,i?{"#nodes":r.current.order,"#edges":r.current.size}:{}),ds("RMP_".concat(new Date().valueOf(),".json"),"application/json",vt(n))},it=async()=>{$(!1),o&&M.event(Me.DOWNLOAD_IMAGES,i?{numberOfNodes:r.current.order,numberOfEdges:r.current.size}:{});const{elem:v,width:Te,height:qe}=await pn(r.current,Pe,Be,d),Ge=v.outerHTML.replace(/ /g," ");if(h==="svg"){ds("RMP_".concat(new Date().valueOf(),".svg"),"image/svg+xml",Ge);return}document.body.appendChild(v);const Je="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(Ge)));document.body.removeChild(v),v.remove();const we=document.createElement("canvas"),[Re,Se]=[Te*c/100,qe*c/100];we.width=Re,we.height=Se;const Xe=we.getContext("2d");A||(Xe.fillStyle=s,Xe.fillRect(0,0,Re,Se));const Qe=new Image;Qe.onload=()=>{setTimeout(()=>{Xe.drawImage(Qe,0,0,Re,Se),we.toBlob(Os=>{if(!Os){a(Ye({status:"error",message:t("header.download.imageTooBig")}));return}gn("RMP_".concat(new Date().valueOf(),".png"),Os)},"image/png")},mn()?2e3:0)},Qe.src=Je};return e.jsxs(fs,{id:"download",children:[e.jsx(js,{as:ee,size:"sm",variant:"ghost",icon:e.jsx(Js,{})}),e.jsxs(bs,{children:[e.jsx(ce,{icon:e.jsx(yt,{}),onClick:ot,children:t("header.download.config")}),e.jsxs(ce,{icon:e.jsx(Ct,{}),onClick:()=>ks(!0),children:[t("header.download.2rmg.title"),e.jsx(le,{ml:"1",colorScheme:"green",children:"New"})]}),e.jsx(ce,{icon:e.jsx(zt,{}),onClick:()=>$(!0),children:t("header.download.image")})]}),e.jsxs(Y,{size:"xl",isOpen:U,onClose:()=>$(!1),children:[e.jsx(F,{}),e.jsxs(q,{children:[e.jsx(J,{children:t("header.download.image")}),e.jsx(X,{}),e.jsxs(Q,{children:[e.jsx(ke,{fields:G}),h==="svg"&&e.jsx(ke,{fields:te}),h==="png"&&e.jsx(ke,{fields:he}),h==="png"&&S.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(w,{as:"i",fontSize:"sm",children:t("header.download.disabledScaleOptions")}),e.jsx("br",{}),e.jsx(w,{as:"i",fontSize:"sm",children:t("header.download.disabledScaleOptionsWorkarounds")}),e.jsxs(O,{color:"teal.500",onClick:()=>window.open("https://github.com/RazrFalcon/resvg","_blank"),children:["RazrFalcon/resvg ",e.jsx(N,{as:R})]}),e.jsx("br",{})]}),e.jsx("br",{}),e.jsx(es,{isChecked:Be,isDisabled:h==="svg"&&d===1.1,onChange:v=>Ae(v.target.checked),children:e.jsx(w,{children:t("header.download.useSystemFonts")})}),e.jsx(es,{isChecked:Pe,onChange:v=>W(v.target.checked),children:e.jsxs(w,{children:[t("header.download.shareInfo1"),e.jsxs(O,{color:"teal.500",onClick:()=>window.open("https://railmapgen.github.io/rmp","_blank"),children:[t("header.about.rmp")," ",e.jsx(N,{as:R})]}),t("header.download.shareInfo2")]})}),e.jsx(es,{isChecked:vs,onChange:v=>nt(v.target.checked),children:e.jsxs(w,{children:[t("header.download.termsAndConditionsInfo"),e.jsxs(O,{color:"teal.500",onClick:()=>Le(!0),children:[t("header.download.termsAndConditions")," ",e.jsx(N,{as:R})]}),t("header.download.period")]})})]}),e.jsx(xe,{children:e.jsx(dt,{children:e.jsx(E,{colorScheme:"teal",variant:"outline",size:"sm",isDisabled:!vs||h==="png"&&S.includes(c),onClick:it,children:t("header.download.confirm")})})}),e.jsx(Gn,{isOpen:ue,onClose:()=>Le(!1)})]})]}),e.jsx(Bn,{isOpen:rt,onClose:()=>ks(!1)})]})}const Un=(s,{info_panel_type:a,line_num:i,stn_list:n,style:o,theme:t},r,h,g)=>{const f=Object.fromEntries(Object.keys(n).filter(l=>!["linestart","lineend"].includes(l)).map(l=>[l,"stn_".concat(ls(10))]));Object.entries(n).filter(([l,u])=>!["linestart","lineend"].includes(l)).forEach(([l,u])=>{const c=s.filterNodes((p,x)=>Object.values(I).includes(x.type)&&x[x.type].names[0]===u.localisedName.zh);c.length!==0&&(f[l]=c[0])});const d=[["linestart",-1,0]],m={};for(;d.length;){const[l,u,c]=d.shift();n[l].children.filter(x=>x!="lineend").forEach((x,j)=>{const S=Math.max(j,c+j);m[x]={x:u*150,y:S*75},d.push([x,u+1,S])})}Object.entries(n).filter(([l,u])=>!["linestart","lineend"].includes(l)).filter(([l,u])=>s.filterNodes((c,p)=>Object.values(I).includes(p.type)&&p[p.type].names[0]===u.localisedName.zh).length===0).map(([l,u])=>{var S,y,A;let c=I.ShmetroBasic;const p=u.transfer.groups,x=p.map(H=>{var G;return(G=H.lines)!=null?G:[]}).flat();o===ge.SHMetro?x.length>0?c=I.ShmetroInt:a===Cs.sh2020?c=I.ShmetroBasic2020:c=I.ShmetroBasic:o===ge.GZMTR?x.length>0?c=I.GzmtrInt:c=I.GzmtrBasic:o===ge.MTR&&(c=I.MTR);const j={...structuredClone(xn[c].defaultAttrs),names:[(S=u.localisedName.zh)!=null?S:"",(y=u.localisedName.en)!=null?y:""]};return c===I.ShmetroBasic2020?j.color=t:c===I.GzmtrBasic?(j.color=t,j.lineCode=i,j.stationCode=u.num):c===I.GzmtrInt?j.transfer=p.map((H,G)=>{var he,U;const te=(U=(he=H.lines)==null?void 0:he.map($=>{var ue;return[...(ue=$.theme)!=null?ue:t,"1","01"]}))!=null?U:[];return G===0?[[...t,i,u.num],...te]:te}):c===I.MTR&&((A=p[0].lines)!=null&&A.length?j.transfer=[[[...t,"",""],...p[0].lines.map(H=>{var G;return[...(G=H.theme)!=null?G:t,"",""]})]]:j.transfer=[[]]),{node:f[l],attr:{visible:!0,zIndex:0,x:r+m[l].x,y:h+m[l].y,type:c,[c]:j}}}).forEach(({node:l,attr:u})=>s.addNode(l,u)),Object.entries(n).filter(([l,u])=>!["linestart","lineend"].includes(l)).forEach(([l,u])=>{u.children.filter(c=>!["linestart","lineend"].includes(c)).forEach(c=>{const p=ss.Diagonal,[x,j]=[f[l],f[c]],S=g?kt(s,p,x,j,"from"):-1;s.addDirectedEdgeWithKey("line_".concat(ls(10)),x,j,{visible:!0,zIndex:0,type:p,[ss.Diagonal]:structuredClone(Ot[ss.Diagonal].defaultAttrs),style:Rs.SingleColor,[Rs.SingleColor]:{color:t},reconcileId:"",parallelIndex:S})})})},Zn="rmg-bridge--",Vn={h:500,maxH:"70%","& iframe":{h:"100%",w:"100%"}};function Kn(s){const{isOpen:a,onClose:i}=s,{t:n}=L(),{preference:{autoParallel:o}}=B(j=>j.app),{svgViewBoxZoom:t,svgViewBoxMin:r}=B(j=>j.param),h=P(),g=M.isAllowAnalytics(),f=ys(),{height:d,width:m}=Ss(f),l=Ze.useRef(window.graph),[u]=Ze.useState(crypto.randomUUID()),c="/rmg/#/import?"+new URLSearchParams({parentComponent:M.getAppName(),parentId:u}),p=Ze.useCallback(()=>{h(K()),h(V()),h(se(l.current.export()))},[h,K,V,se,l]),x=j=>{try{g&&M.event(Me.IMPORT_RMG_PARAM,{});const S=r.x+m*t/100/3,y=r.y+d*t/100/3;Un(l.current,j,S,y,o),p()}catch(S){h(Ye({status:"error",message:n("header.open.unknownError")})),console.error("OpenActions.handleUploadRMG():: Unknown error occurred while parsing the RMG project",S)}finally{i()}};return Ze.useEffect(()=>{const j=new BroadcastChannel(Zn+u);return j.onmessage=S=>{const{event:y,data:A}=S.data;console.log("[rmp] Received event from RMG app clip:",y),y==="CLOSE"?i():y==="IMPORT"&&x(A)},()=>j.close()},[r.x,r.y,t,d,m,o]),e.jsx(Xs,{isOpen:a,onClose:i,sx:Vn,children:e.jsx("iframe",{src:c,loading:"lazy"})})}const Yn="RMP_GALLERY_CHANNEL",Fn="OPEN_TEMPLATE",Bs=new BroadcastChannel(Yn),qn={h:"80%",w:"80%","& iframe":{h:"100%",w:"100%"},"& div":{h:"100%",w:"100%"}};function Jn(s){const{isOpen:a,onClose:i}=s,n=Us(),{t:o}=L(),t=P(),{telemetry:{project:r}}=B(l=>l.app),h=M.isAllowAnalytics(),g=b.useRef(window.graph),f=b.useCallback(()=>{t(K()),t(V()),t(se(g.current.export()))},[t,K,V,se,g]),d=async l=>{const{version:u,...c}=JSON.parse(await Qs(JSON.stringify(l)));t(cs()),g.current.clear(),g.current.import(c.graph),f();const{svgViewBoxZoom:p,svgViewBoxMin:x}=c;typeof p=="number"&&t(Oe(p)),typeof x.x=="number"&&typeof x.y=="number"&&t(Ie(x))},m=async(l,u)=>{var x;const c=u?"https://".concat(u):"",p=await((x=(await Promise.allSettled([fetch("".concat(c,"/rmp-gallery/resources/real_world/").concat(l,".json")),fetch("".concat(c,"/rmp-gallery/resources/fantasy/").concat(l,".json"))])).filter(j=>j.status==="fulfilled").find(j=>j.value.status===200))==null?void 0:x.value.json());if(p){if(h){const j={id:l};r&&u&&(j.host=u),M.event(Me.IMPORT_WORK_FROM_GALLERY,j)}d(p),n({title:o("header.open.importFromRMPGallery",{id:l}),status:"success",duration:9e3,isClosable:!0})}else n({title:o("header.open.failToImportFromRMPGallery",{id:l}),status:"error",duration:9e3,isClosable:!0});M.updateAppMetadata({hash:""})};return b.useEffect(()=>{const u=new URL(window.location.href).searchParams;if(u.size>0){const c=u.keys().next().value,p=c.indexOf("."),x=c.substring(0,p===-1?void 0:p);let j;p!==-1&&(j=c.substring(p+1)),m(x,j)}},[]),b.useEffect(()=>(Bs.onmessage=l=>{const{event:u,data:c}=l.data;u===Fn&&(m(c),i())},()=>Bs.close()),[]),e.jsxs(Xs,{isOpen:a,onClose:i,size:"full",sx:qn,children:[e.jsx("iframe",{src:"/rmp-gallery/",loading:"lazy"}),e.jsx(Zs,{onClick:i,position:"fixed",top:"5px",right:"15px"})]})}function Xn(){const s=P(),{t:a}=L(),i=ys(),{height:n}=Ss(i),o=b.useRef(window.graph),t=b.useRef(null),[r,h]=b.useState(!1),[g,f]=b.useState(!1),d=b.useCallback(()=>{s(K()),s(V()),s(se(o.current.export()))},[s,K,V,se,o]),m=()=>{s(cs()),o.current.clear(),s(Oe(100)),s(Ie({x:0,y:0})),d()},l=async p=>{const{version:x,...j}=JSON.parse(await Qs(p));s(cs()),o.current.clear(),o.current.import(j.graph),d();const{svgViewBoxZoom:S,svgViewBoxMin:y}=j;typeof S=="number"&&s(Oe(S)),typeof y.x=="number"&&typeof y.y=="number"&&s(Ie(y))},u=async p=>{var j;const x=(j=p.target.files)==null?void 0:j[0];if(console.log("OpenActions.handleUpload():: received file",x),(x==null?void 0:x.type)!=="application/json")s(Ye({status:"error",message:a("header.open.invalidType")})),console.error("OpenActions.handleUpload():: Invalid file type! Only file in JSON format is accepted.");else try{const S=await Qn(x);await l(S)}catch(S){s(Ye({status:"error",message:a("header.open.unknownError")})),console.error("OpenActions.handleUpload():: Unknown error occurred while parsing the uploaded file",S)}p.target.value=""},c=async()=>{await l(await Rt()),s(Ie({x:-10,y:-13}));const p=Math.max(0,Math.min(400,-.132*n+117.772));s(Oe(p)),M.event(Me.LOAD_TUTORIAL,{})};return b.useEffect(()=>{const p=async x=>{const{type:j,key:S,from:y}=x.data;if(j===Et.SAVE_CHANGED&&S===_s.PARAM&&y==="rmt"){Nt.debug("Received save changed event on key: ".concat(S));const A=localStorage.getItem(_s.PARAM);if(!A)return;await l(A)}};return Es.addEventListener("message",p),()=>Es.removeEventListener("message",p)},[]),e.jsxs(fs,{children:[e.jsx(js,{as:ee,size:"sm",variant:"ghost",icon:e.jsx(Ns,{})}),e.jsxs(bs,{children:[e.jsx(ce,{icon:e.jsx(Mt,{}),onClick:m,children:a("header.open.new")}),e.jsx("input",{id:"upload_project",ref:t,type:"file",accept:".json",hidden:!0,onChange:u,"data-testid":"file-upload"}),e.jsx(ce,{icon:e.jsx(Ns,{}),onClick:()=>{var p;return(p=t==null?void 0:t.current)==null?void 0:p.click()},children:a("header.open.config")}),e.jsx(ce,{icon:e.jsx(At,{}),onClick:()=>h(!0),children:a("header.open.projectRMG")}),e.jsxs(ce,{icon:e.jsx(R,{}),onClick:()=>f(!0),children:[a("header.open.gallery"),e.jsx(le,{ml:"1",colorScheme:"green",children:"New"})]}),e.jsx(ce,{icon:e.jsx(Tt,{}),onClick:c,children:a("header.open.tutorial")})]}),e.jsx(Kn,{isOpen:r,onClose:()=>h(!1)}),e.jsx(Jn,{isOpen:g,onClose:()=>f(!1)})]})}const Qn=s=>new Promise(a=>{const i=new FileReader;i.onloadend=()=>a(i.result),i.readAsText(s)}),$n=()=>{const[s,a]=b.useState(!1),{t:i}=L(),n=P(),o=b.useRef(window.graph),t=ys(),{width:r,height:h}=Ss(t),[g,f]=b.useState([]);b.useEffect(()=>{s&&f(o.current.nodes().filter(m=>m.startsWith("stn")).map(m=>{const l=o.current.getNodeAttributes(m),u=l.type,c=l[u].names.join("/");return{id:m,value:c}}))},[s]);const d=m=>{n(Wt(new Set([m])));const l=Math.max(0,Math.min(400,-.132*h+117.772)),{x:u,y:c}=Lt((r-300)/2,h/2,l,{x:-o.current.getNodeAttribute(m,"x"),y:-o.current.getNodeAttribute(m,"y")});n(Oe(l)),n(Ie({x:-u,y:-c}))};return e.jsxs(Vs,{isOpen:s,onOpen:()=>a(!0),onClose:()=>a(!1),children:[e.jsx(Ks,{children:e.jsx(ee,{"aria-label":"zoom",variant:"ghost",size:"sm",icon:e.jsx(_t,{}),onClick:()=>a(!s)})}),e.jsx(Ys,{children:e.jsx(Fs,{children:e.jsx(It,{label:i("header.search"),children:e.jsx(Ht,{data:g,displayHandler:m=>e.jsx(le,{children:m.value}),filter:(m,l)=>l.value.toLowerCase().includes(m.toLowerCase())||Object.values(l.value).some(u=>u.toLowerCase().includes(m.toLowerCase())),value:"",onChange:m=>d(m.id)})})})})]})},er=s=>{const{isOpen:a,onClose:i}=s,n=P(),{theme:o,paletteAppClip:{output:t}}=B(u=>u.runtime),{t:r}=L(),h=b.useRef(window.graph),[g,f]=b.useState(o),[d,m]=b.useState(!1);b.useEffect(()=>{d&&t&&(f(t),m(!1))},[t==null?void 0:t.toString()]);const l=()=>{h.current.filterEdges((u,c,p,x,j,S,y)=>qs.includes(c.style)&&JSON.stringify(c[c.style].color)===JSON.stringify(g)).forEach(u=>h.current.dropEdge(u)),n(V()),n(se(h.current.export())),i()};return e.jsxs(Y,{isOpen:a,onClose:i,size:"xl",scrollBehavior:"inside",trapFocus:!1,children:[e.jsx(F,{}),e.jsxs(q,{children:[e.jsx(J,{children:r("header.settings.procedures.removeLines.title")}),e.jsx(X,{}),e.jsxs(Q,{children:[r("header.settings.procedures.removeLines.content"),e.jsx(Bt,{theme:g,onClick:()=>{m(!0),n(Pt(g))}})]}),e.jsxs(xe,{children:[e.jsx(E,{colorScheme:"blue",variant:"outline",mr:"1",onClick:i,children:r("cancel")}),e.jsx(E,{colorScheme:"red",onClick:l,children:r("remove")})]})]})]})},sr=s=>{const{isOpen:a,onClose:i}=s,n=P(),{t:o}=L(),t=b.useRef(window.graph),[r,h]=b.useState(1),g=[{type:"input",label:o("header.settings.procedures.scale.factor"),value:r.toString(),variant:"number",onChange:d=>h(Number(d)),minW:"full"}],f=()=>{t.current.forEachNode((d,m)=>{t.current.updateNodeAttribute(d,"x",l=>(l!=null?l:0)*r),t.current.updateNodeAttribute(d,"y",l=>(l!=null?l:0)*r)}),n(K()),n(V()),n(se(t.current.export())),i()};return e.jsxs(Y,{isOpen:a,onClose:i,size:"xl",scrollBehavior:"inside",children:[e.jsx(F,{}),e.jsxs(q,{children:[e.jsx(J,{children:o("header.settings.procedures.scale.title")}),e.jsx(X,{}),e.jsxs(Q,{children:[o("header.settings.procedures.scale.content"),e.jsx(ke,{fields:g})]}),e.jsxs(xe,{children:[e.jsx(E,{colorScheme:"blue",variant:"outline",mr:"1",onClick:i,children:o("cancel")}),e.jsx(E,{colorScheme:"red",onClick:f,children:o("apply")})]})]})]})},tr=s=>{const{isOpen:a,onClose:i}=s,n=P(),{t:o}=L(),t=b.useRef(window.graph),[r,h]=b.useState(0),[g,f]=b.useState(0),d=[{type:"input",label:o("header.settings.procedures.translate.x"),value:r.toString(),variant:"number",onChange:l=>h(Number(l)),minW:"full"},{type:"input",label:o("header.settings.procedures.translate.y"),value:g.toString(),variant:"number",onChange:l=>f(Number(l)),minW:"full"}],m=()=>{t.current.forEachNode((l,u)=>{t.current.updateNodeAttribute(l,"x",c=>(c!=null?c:0)+r),t.current.updateNodeAttribute(l,"y",c=>(c!=null?c:0)+g)}),n(K()),n(V()),n(se(t.current.export())),i()};return e.jsxs(Y,{isOpen:a,onClose:i,size:"xl",scrollBehavior:"inside",children:[e.jsx(F,{}),e.jsxs(q,{children:[e.jsx(J,{children:o("header.settings.procedures.translate.title")}),e.jsx(X,{}),e.jsxs(Q,{children:[o("header.settings.procedures.translate.content"),e.jsx(ke,{fields:d})]}),e.jsxs(xe,{children:[e.jsx(E,{colorScheme:"blue",variant:"outline",mr:"1",onClick:i,children:o("cancel")}),e.jsx(E,{colorScheme:"red",onClick:m,children:o("apply")})]})]})]})},nr=s=>{const{isOpen:a,onClose:i}=s,n=P(),{preference:{unlockSimplePathAttempts:o}}=B(g=>g.app),{activeSubscriptions:t}=B(g=>g.account),{t:r}=L(),h=()=>{n(Gt(-1))};return e.jsxs(Y,{isOpen:a,onClose:i,size:"5xl",scrollBehavior:"inside",children:[e.jsx(F,{}),e.jsxs(q,{children:[e.jsx(J,{children:r("header.settings.procedures.unlockSimplePath.title")}),e.jsx(X,{}),e.jsxs(Q,{children:[e.jsx(w,{mb:"2",children:r("header.settings.procedures.unlockSimplePath.content1")}),e.jsx(w,{mb:"2",children:r("header.settings.procedures.unlockSimplePath.content2")}),e.jsx(w,{mb:"2",children:r("header.settings.procedures.unlockSimplePath.content3")})]}),e.jsx(xe,{children:e.jsx(ze,{label:r("header.settings.pro"),isOpen:!t.RMP_CLOUD&&o>=0,children:e.jsx(E,{onClick:h,isDisabled:!t.RMP_CLOUD||o<0,children:o>=0?r("header.settings.procedures.unlockSimplePath.check"):r("header.settings.procedures.unlockSimplePath.unlocked")})})})]})]})},rr=s=>{const{isOpen:a,onClose:i}=s,n=P(),o=Us(),{t}=L(),r=b.useRef(window.graph),[h,g]=b.useState(!1),f=async()=>{g(!0);const d=JSON.stringify(r.current.export());try{const m=await ar(d);r.current.clear(),r.current.import(m),n(K()),n(V()),n(se(r.current.export())),o({title:t("header.settings.procedures.updateColor.success"),status:"success",duration:9e3,isClosable:!0})}catch(m){console.error("[rmp] Error in updating all colors: ".concat(m)),o({title:t("header.settings.procedures.updateColor.error",{e:m}),status:"error",duration:9e3,isClosable:!0})}g(!1),i()};return e.jsxs(Y,{isOpen:a,onClose:i,size:"xl",scrollBehavior:"inside",children:[e.jsx(F,{}),e.jsxs(q,{children:[e.jsx(J,{children:t("header.settings.procedures.updateColor.title")}),e.jsx(X,{}),e.jsx(Q,{children:e.jsx(w,{children:t("header.settings.procedures.updateColor.content")})}),e.jsxs(xe,{children:[e.jsx(E,{colorScheme:"blue",variant:"outline",mr:"1",onClick:i,children:t("cancel")}),e.jsx(E,{colorScheme:"red",onClick:f,isLoading:h,children:t("apply")})]})]})]})},Ps=s=>s.length>=4&&s.every(a=>typeof a=="string")&&!!s[2].match(/^#[0-9a-fA-F]{6}$/)&&Object.values(ws).includes(s[3]),or=s=>{const a=[],i=(n,o)=>{if(Array.isArray(n)&&Ps(n)){a.push({path:o||"",value:n});return}for(const t in n){const r=n[t],h=o?"".concat(o,".").concat(t):t;Array.isArray(r)?Ps(r)?a.push({path:h,value:r}):r.forEach((g,f)=>i(g,"".concat(h,".").concat(f))):r&&typeof r=="object"&&i(r,h)}};return i(s),a},ir=(s,a,i)=>{const n=a.split(".");let o=s;for(let t=0;t{const a=JSON.parse(s),i=new Date().getTime(),n=or(a);console.log("[rmp] Found all themes pending for update",n);const o=1e4;let t,r=!1;const h=new Promise((g,f)=>{t=setTimeout(()=>{r=!0,f("Executing time exceeds ".concat(o,"ms"))},o),(async()=>{for(const{path:d,value:m}of n){if(r)throw new Error("Update aborted");const[l,u,c,p,...x]=m,j=await Dt([l,u,c,p]);ir(a,d,[...j,...x])}})().then(g).catch(f)});try{return await h,console.log("[rmp] Themes update completed, elapsed time ".concat((new Date().getTime()-i)/1e3," sec")),a}finally{clearTimeout(t)}},Gs=1,lr=()=>{const{state:s}=B(g=>g.account),{t:a}=L(),[i,n]=b.useState(!1),[o,t]=b.useState(Gs);b.useEffect(()=>{let g;return i&&o>0?g=window.setTimeout(()=>{t(o-1)},1e3):o===0&&n(!1),()=>clearTimeout(g)},[i,o]);const r=()=>{n(!0),t(Gs),Zt()},h={"logged-out":a("header.settings.subscription.logged-out"),free:a("header.settings.subscription.free"),subscriber:a("header.settings.subscription.subscriber"),expired:a("header.settings.subscription.expired")};return e.jsxs(T,{width:"100%",mb:"3",children:[e.jsx(w,{as:"b",fontSize:"xl",children:a("header.settings.subscription.title")}),e.jsx(T,{mt:"3",children:e.jsxs(T,{display:"flex",mb:"1",children:[e.jsx(w,{flex:"1",children:h[s]}),e.jsx(ee,{"aria-label":"refresh",variant:"ghost",size:"sm",icon:e.jsx(Ut,{}),isDisabled:i,onClick:()=>r()})]})})]})},je={width:"100%",justifyContent:"space-between"},ae={fontFamily:"-apple-system"},cr=s=>{const{isOpen:a,onClose:i}=s,{activeSubscriptions:n}=B(W=>W.account),{telemetry:{project:o},preference:{autoParallel:t,randomStationsNames:r}}=B(W=>W.app),{keepLastPath:h,parallelLinesCount:g}=B(W=>W.runtime),f=P(),{t:d}=L(),m=Ds("primary.500","primary.300"),[l,u]=b.useState(!1),[c,p]=b.useState(!1),[x,j]=b.useState(!1),[S,y]=b.useState(!1),[A,H]=b.useState(!1),[G,te]=b.useState(!1),[he,U]=b.useState(!1),$=M.isAllowAnalytics(),ue=W=>{f(en(W))},Le=n.RMP_CLOUD?Vt:Kt,Be=g>=Le,Ae=!n.RMP_CLOUD,Pe=W=>{f($t(W.target.value))};return e.jsxs(Y,{isOpen:a,onClose:i,size:"xl",scrollBehavior:"inside",trapFocus:!1,children:[e.jsx(F,{}),e.jsxs(q,{children:[e.jsx(J,{children:d("header.settings.title")}),e.jsx(X,{}),e.jsx(Q,{children:e.jsxs(Ne,{divider:e.jsx(mt,{borderColor:"gray.200"}),children:[e.jsx(lr,{}),e.jsxs(T,{width:"100%",mb:"3",children:[e.jsx(w,{as:"b",fontSize:"xl",children:d("header.settings.preference.title")}),e.jsxs(T,{mt:"3",children:[e.jsxs(T,{display:"flex",mb:"1",children:[e.jsx(w,{flex:"1",children:d("header.settings.preference.keepLastPath")}),e.jsx(De,{isChecked:h,onChange:({target:{checked:W}})=>f(Yt(W))})]}),e.jsxs(T,{display:"flex",mb:"1",children:[e.jsx(w,{children:d("header.settings.preference.autoParallel")}),e.jsx(le,{ml:"auto",colorScheme:"green",children:"New"}),e.jsx(ze,{label:d("header.settings.proWithTrial"),children:e.jsx(le,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",children:"PRO"})}),e.jsx(De,{ml:"1",isDisabled:Be,isChecked:t,onChange:({target:{checked:W}})=>f(Ft(W))})]}),e.jsxs(T,{mb:"1",display:"flex",children:[e.jsx(w,{flex:"1",children:d("header.settings.preference.randomStationNames.title")}),e.jsx(le,{ml:"auto",colorScheme:"green",children:"New"}),e.jsx(ze,{label:d("header.settings.pro"),children:e.jsx(le,{color:"gray.50",ml:"1",background:"radial-gradient(circle, #3f5efb, #fc466b)",children:"PRO"})}),e.jsxs(ht,{size:"xs",width:"auto",ml:"1",value:r,onChange:Pe,children:[e.jsx("option",{value:"none",children:d("header.settings.preference.randomStationNames.none")}),e.jsx("option",{value:Ue.Shmetro,disabled:Ae,children:d("header.settings.preference.randomStationNames.".concat(Ue.Shmetro))}),e.jsx("option",{value:Ue.Bjsubway,disabled:Ae,children:d("header.settings.preference.randomStationNames.".concat(Ue.Bjsubway))})]})]})]})]}),e.jsxs(T,{width:"100%",mb:"3",children:[e.jsx(w,{as:"b",fontSize:"xl",children:d("header.settings.procedures.title")}),e.jsxs(T,{mt:"3",children:[e.jsx(E,{sx:je,rightIcon:e.jsx(fe,{}),onClick:()=>u(!0),children:d("header.settings.procedures.translate.title")}),e.jsx(tr,{isOpen:l,onClose:()=>u(!1)}),e.jsx(E,{sx:je,rightIcon:e.jsx(fe,{}),onClick:()=>p(!0),children:d("header.settings.procedures.scale.title")}),e.jsx(sr,{isOpen:c,onClose:()=>p(!1)}),e.jsxs(E,{sx:je,rightIcon:e.jsx(fe,{}),onClick:()=>j(!0),children:[d("header.settings.procedures.changeType.title"),e.jsx(ze,{label:d("header.settings.pro"),children:e.jsx(le,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",mr:"auto",children:"PRO"})})]}),e.jsx(jn,{isOpen:x,onClose:()=>j(!1),isSelect:!1}),e.jsx(E,{sx:je,rightIcon:e.jsx(fe,{}),onClick:()=>y(!0),children:d("header.settings.procedures.removeLines.title")}),e.jsx(er,{isOpen:S,onClose:()=>y(!1)}),e.jsx(E,{sx:je,rightIcon:e.jsx(fe,{}),onClick:()=>H(!0),children:d("header.settings.procedures.updateColor.title")}),e.jsx(rr,{isOpen:A,onClose:()=>H(!1)}),e.jsxs(E,{sx:je,rightIcon:e.jsx(fe,{}),onClick:()=>te(!0),children:[d("header.settings.procedures.unlockSimplePath.title"),e.jsx(ze,{label:d("header.settings.pro"),children:e.jsx(le,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",mr:"auto",children:"PRO"})})]}),e.jsx(nr,{isOpen:G,onClose:()=>te(!1)}),e.jsx(E,{sx:je,rightIcon:e.jsx(fe,{}),onClick:()=>U(!0),children:d("header.settings.procedures.masterManager.title")}),e.jsx(fn,{isOpen:he,onClose:()=>U(!1)})]})]}),e.jsxs(T,{width:"100%",mb:"3",children:[e.jsx(w,{as:"b",fontSize:"xl",children:d("header.settings.shortcuts.title")}),e.jsx(T,{mt:"3",children:e.jsxs(ut,{children:[e.jsx(pt,{children:e.jsxs(D,{children:[e.jsx(As,{children:d("header.settings.shortcuts.keys")}),e.jsx(As,{children:d("header.settings.shortcuts.description")})]})}),e.jsxs(gt,{children:[e.jsxs(D,{children:[e.jsx(k,{children:e.jsx(C,{children:"f"})}),e.jsx(k,{children:d("header.settings.shortcuts.f")})]}),e.jsxs(D,{children:[e.jsx(k,{children:e.jsx(C,{children:"s"})}),e.jsx(k,{children:d("header.settings.shortcuts.s")})]}),e.jsxs(D,{children:[e.jsx(k,{children:e.jsxs(T,{display:"flex",flexDirection:"row",children:[e.jsx(qt,{}),e.jsx(Jt,{}),e.jsx(Xt,{}),e.jsx(Qt,{})]})}),e.jsx(k,{children:d("header.settings.shortcuts.arrows")})]}),e.jsxs(D,{children:[e.jsx(k,{children:e.jsxs(T,{display:"flex",flexDirection:"row",children:[e.jsx(C,{children:"i"}),e.jsx(C,{children:"j"}),e.jsx(C,{children:"k"}),e.jsx(C,{children:"l"})]})}),e.jsx(k,{children:d("header.settings.shortcuts.ijkl")})]}),e.jsxs(D,{children:[e.jsx(k,{children:pe?e.jsx(C,{sx:ae,children:"⇧"}):e.jsx(C,{children:"shift"})}),e.jsx(k,{children:d("header.settings.shortcuts.shift")})]}),e.jsxs(D,{children:[e.jsx(k,{children:pe?e.jsx(C,{sx:ae,children:"⌥"}):e.jsx(C,{children:"alt"})}),e.jsx(k,{children:d("header.settings.shortcuts.alt")})]}),e.jsxs(D,{children:[e.jsx(k,{children:pe?e.jsx(C,{sx:ae,children:"⌫"}):e.jsx(C,{children:"delete"})}),e.jsx(k,{children:d("header.settings.shortcuts.delete")})]}),e.jsxs(D,{children:[e.jsxs(k,{children:[pe?e.jsx(C,{sx:ae,children:"⌘"}):e.jsx(C,{children:"ctrl"})," + ",e.jsx(C,{children:"x"})]}),e.jsx(k,{children:d("header.settings.shortcuts.cut")})]}),e.jsxs(D,{children:[e.jsxs(k,{children:[pe?e.jsx(C,{sx:ae,children:"⌘"}):e.jsx(C,{children:"ctrl"})," + ",e.jsx(C,{children:"c"})]}),e.jsx(k,{children:d("header.settings.shortcuts.copy")})]}),e.jsxs(D,{children:[e.jsxs(k,{children:[pe?e.jsx(C,{sx:ae,children:"⌘"}):e.jsx(C,{children:"ctrl"})," + ",e.jsx(C,{children:"v"})]}),e.jsx(k,{children:d("header.settings.shortcuts.paste")})]}),e.jsxs(D,{children:[e.jsxs(k,{children:[pe?e.jsx(C,{sx:ae,children:"⌘"}):e.jsx(C,{children:"ctrl"})," + ",e.jsx(C,{children:"z"})]}),e.jsx(k,{children:d("header.settings.shortcuts.undo")})]}),e.jsxs(D,{children:[e.jsx(k,{children:pe?e.jsxs(e.Fragment,{children:[e.jsx(C,{sx:ae,children:"⇧"})," + ",e.jsx(C,{sx:ae,children:"⌘"})," + ",e.jsx(C,{children:"z"})]}):e.jsxs(e.Fragment,{children:[e.jsx(C,{children:"ctrl"})," + ",e.jsx(C,{children:"y"})]})}),e.jsx(k,{children:d("header.settings.shortcuts.redo")})]})]})]})})]}),e.jsxs(T,{width:"100%",mb:"3",children:[e.jsx(w,{as:"b",fontSize:"xl",children:d("header.settings.telemetry.title")}),e.jsxs(T,{mt:"3",children:[e.jsx(w,{fontSize:"sm",lineHeight:"100%",color:"gray.600",children:d("header.settings.telemetry.info")}),e.jsxs(T,{mt:"3",mb:"1",children:[e.jsxs(T,{display:"flex",mb:"1",children:[e.jsx(w,{flex:"1",children:d("header.settings.telemetry.essential")}),e.jsx(ze,{label:d("header.settings.telemetry.essentialTooltip"),children:e.jsx(De,{isChecked:$,isDisabled:!0})})]}),e.jsx(w,{fontSize:"sm",lineHeight:"100%",color:"gray.600",children:d("header.settings.telemetry.essentialInfo")}),e.jsxs(O,{color:m,fontSize:"sm",lineHeight:"100%",href:"https://support.google.com/analytics/answer/11593727",isExternal:!0,children:[d("header.settings.telemetry.essentialLink")," ",e.jsx(N,{as:R})]})]}),e.jsxs(T,{mt:"1",mb:"1",children:[e.jsxs(T,{display:"flex",children:[e.jsx(w,{flex:"1",children:d("header.settings.telemetry.additional")}),e.jsx(De,{isChecked:o,onChange:({target:{checked:W}})=>ue(W)})]}),e.jsx(w,{fontSize:"sm",lineHeight:"100%",color:"gray.600",children:d("header.settings.telemetry.additionalInfo")})]})]})]})]})})]})]})},dr=()=>{const[s,a]=b.useState(!1),{svgViewBoxZoom:i}=B(t=>t.param),n=P(),o=[{type:"slider",label:"",value:400-i,min:10,max:390,step:1,onChange:t=>n(Oe(400-t)),leftIcon:e.jsx(sn,{}),rightIcon:e.jsx(Is,{}),minW:160}];return e.jsxs(Vs,{isOpen:s,onOpen:()=>a(!0),onClose:()=>a(!1),children:[e.jsx(Ks,{children:e.jsx(ee,{"aria-label":"zoom",variant:"ghost",size:"sm",icon:e.jsx(Is,{}),onClick:()=>a(!s)})}),e.jsx(Ys,{children:e.jsx(Fs,{children:e.jsx(ke,{fields:o,noLabel:!0})})})]})};function hr(){const{t:s}=L(),a=P(),{past:i,future:n}=B(c=>c.param),o=M.isAllowAnalytics(),[t,r]=b.useState(!1),[h,g]=b.useState(!1),f=Ws(M.getEnv),d=Ws(M.getAppVersion);b.useEffect(()=>{o&&f!==ts.DEV&&M.event(Me.APP_LOAD,{isStandaloneWindow:M.isStandaloneWindow()})},[f]);const m=c=>{M.getI18nInstance().changeLanguage(c)},l=()=>{a(dn()),a(K()),a(V())},u=()=>{a(hn()),a(K()),a(V())};return e.jsxs(tn,{children:[e.jsx(Ce,{as:"h4",size:"md",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",children:s("header.about.rmp")}),e.jsx(nn,{environment:f,version:d,popoverHeader:f===ts.PRD?void 0:e.jsxs(Hs,{i18nKey:"header.popoverHeader",environment:f,children:["You're on ",{environment:f}," environment!"]}),popoverBody:f===ts.PRD?void 0:e.jsx(Hs,{i18nKey:"header.popoverBody",children:"This is a testing environment where we test the latest beta RMP."})}),e.jsxs(xt,{ml:"auto",children:[e.jsx(ie,{children:e.jsx($n,{})}),e.jsx(ie,{children:e.jsx(ee,{size:"sm",variant:"ghost","aria-label":"Undo",icon:e.jsx(rn,{}),isDisabled:i.length===0,onClick:l})}),e.jsx(ie,{children:e.jsx(ee,{size:"sm",variant:"ghost","aria-label":"Redo",icon:e.jsx(on,{}),isDisabled:n.length===0,onClick:u})}),e.jsx(ie,{children:e.jsx(dr,{})}),e.jsx(ie,{children:e.jsx(Xn,{})}),e.jsx(ie,{children:e.jsx(Dn,{})}),M.isStandaloneWindow()&&e.jsx(ie,{children:e.jsxs(fs,{children:[e.jsx(js,{as:ee,icon:e.jsx(an,{}),variant:"ghost",size:"sm"}),e.jsx(bs,{children:["en","zh-Hans","zh-Hant","ja","ko"].map(c=>e.jsx(ce,{onClick:()=>m(c),children:bn[c][c]},c))})]})}),e.jsx(ie,{children:e.jsx(ee,{size:"sm",variant:"ghost","aria-label":"Settings",icon:e.jsx(ln,{}),onClick:()=>r(!0)})}),e.jsx(ie,{children:e.jsx(ee,{size:"sm",variant:"ghost","aria-label":"Help",icon:e.jsx(cn,{}),onClick:()=>g(!0)})})]}),e.jsx(cr,{isOpen:t,onClose:()=>r(!1)}),e.jsx(zn,{isOpen:h,onClose:()=>g(!1)})]})}function ur(){const s=P(),a=B(n=>n.runtime.globalAlerts),i=n=>{M.isStandaloneWindow()?window.open("/".concat(n),"_blank"):M.openApp({appId:n})};return e.jsx(e.Fragment,{children:Object.entries(a).map(([n,{message:o,url:t,linkedApp:r}])=>e.jsxs(ft,{status:n,variant:"solid",size:"xs",pl:3,pr:1,py:0,zIndex:"1",children:[e.jsx(jt,{}),r?e.jsx(O,{onClick:()=>i(r),children:o}):t?e.jsx(O,{href:t,target:"_blank",children:o}):o,e.jsx(Zs,{ml:"auto",onClick:()=>s(un(n))})]},n))})}function jr(){return e.jsxs(e.Fragment,{children:[e.jsx(hr,{}),e.jsx(ur,{})]})}export{jr as default}; diff --git a/assets/page-header-legacy-D9UDrK14.js b/assets/page-header-legacy-D9UDrK14.js deleted file mode 100644 index 3eb44e76..00000000 --- a/assets/page-header-legacy-D9UDrK14.js +++ /dev/null @@ -1,9 +0,0 @@ -System.register(["./chakra-legacy-DsJcG_7N.js","./index-legacy-CKg3D7KT.js","./react-legacy-S3BmMPiz.js","./master-manager-legacy-DmddqoRb.js","./change-type-modal-legacy-Bi8yFeWH.js"],(function(e,s){"use strict";var t,n,r,i,a,o,l,c,d,h,u,x,p,g,m,j,f,b,w,y,v,S,z,C,k,O,M,_,E,N,A,H,R,W,T,P,L,I,B,Z,G,U,D,K,Y,V,F,J,q,X,Q,$,ee,se,te,ne,re,ie,ae,oe,le,ce,de,he,ue,xe,pe,ge,me,je,fe,be,we,ye,ve,Se,ze,Ce,ke,Oe,Me,_e,Ee,Ne,Ae,He,Re,We,Te,Pe,Le,Ie,Be,Ze,Ge,Ue,De,Ke,Ye,Ve,Fe,Je,qe,Xe,Qe,$e,es,ss,ts,ns,rs,is,as,os,ls,cs,ds,hs,us,xs,ps,gs,ms,js,fs,bs,ws,ys,vs,Ss,zs,Cs,ks,Os,Ms,_s,Es,Ns,As,Hs,Rs,Ws,Ts,Ps,Ls;return{setters:[e=>{t=e.j,n=e.at,r=e.$,i=e.au,a=e.a1,o=e.a2,l=e.a3,c=e.g,d=e.av,h=e.a4,u=e.B,x=e.aw,p=e.ax,g=e.ay,m=e.az,j=e.aA,f=e.h,b=e.O,w=e.a5,y=e.aB,v=e.aC,S=e.aD,z=e.a7,C=e.aE,k=e.a6,O=e.aF,M=e.aG,_=e.af,E=e.aH,N=e.aI,A=e.U,H=e.aJ,R=e.aK,W=e.aL,T=e.al,P=e.d,L=e.R,I=e.q,B=e.Z,Z=e.aM,G=e.aN,U=e.ak,D=e.ae,K=e.aO,Y=e.aP,V=e.aQ,F=e.aR,J=e.aS,q=e.aT,X=e.aU,Q=e.W,$=e.m,ee=e.a8,se=e.a9},e=>{te=e.u,ne=e.r,re=e.C,ie=e.M,ae=e.n,oe=e.L,le=e.S,ce=e.R,de=e.a,he=e.b,ue=e.c,xe=e.d,pe=e.e,ge=e.f,me=e.g,je=e.h,fe=e.i,be=e.E,we=e.s,ye=e.j,ve=e.k,Se=e.m,ze=e.l,Ce=e.o,ke=e.p,Oe=e.q,Me=e.t,_e=e.v,Ee=e.w,Ne=e.x,Ae=e.y,He=e.z,Re=e.A,We=e.B,Te=e.D,Pe=e.F,Le=e.G,Ie=e.H,Be=e.I,Ze=e.J,Ge=e.K,Ue=e.N,De=e.O,Ke=e.P,Ye=e.Q,Ve=e.T,Fe=e.U,Je=e.V,qe=e.W,Xe=e.X,Qe=e.Y,$e=e.Z,es=e._,ss=e.$,ts=e.a0,ns=e.a1,rs=e.a2,is=e.a3,as=e.a4,os=e.a5,ls=e.a6,cs=e.a7,ds=e.a8,hs=e.a9,us=e.aa,xs=e.ab,ps=e.ac,gs=e.ad,ms=e.ae,js=e.af,fs=e.ag,bs=e.ah,ws=e.ai,ys=e.aj,vs=e.ak,Ss=e.al,zs=e.am,Cs=e.an,ks=e.ao},e=>{Os=e.u,Ms=e.b,_s=e.r,Es=e.T},e=>{Ns=e.d,As=e.m,Hs=e.a,Rs=e.i,Ws=e.s,Ts=e.u,Ps=e.M},e=>{Ls=e.C}],execute:function(){e("default",(function(){return t.jsxs(t.Fragment,{children:[t.jsx(tn,{}),t.jsx(nn,{})]})}));var s=function(e){return te(ne.ready(),e)},Is={ar:{ar:"العربية",en:"Arabic",ko:"아랍어","zh-Hans":"阿拉伯文","zh-Hant":"阿拉伯文"},az:{az:"Azərbaycanca",en:"Azerbaijani",ko:"아제르바이잔어","zh-Hans":"阿塞拜疆文","zh-Hant":"阿塞拜疆文"},ca:{ca:"Català",en:"Catalan",ko:"카탈루냐어","zh-Hans":"加泰罗尼亚文","zh-Hant":"加泰隆尼亞文"},da:{da:"Dansk",en:"Danish",ko:"덴마크어","zh-Hans":"丹麦文","zh-Hant":"丹麥文"},de:{de:"Deutsch",en:"German",ko:"독일어","zh-Hans":"德文","zh-Hant":"德文"},el:{el:"Ελληνικά",en:"Greek",ko:"그리스어","zh-Hans":"希腊文","zh-Hant":"希臘文"},en:{en:"English",ja:"英語",ko:"영어","zh-Hans":"英文","zh-Hant":"英文"},es:{en:"Spanish",es:"Español",ko:"스페인어","zh-Hans":"西班牙文","zh-Hant":"西班牙文"},fa:{en:"Persian",fa:"فارسی",ko:"페르시아어","zh-Hans":"波斯文","zh-Hant":"波斯文"},fr:{en:"French",fr:"Français",ko:"프랑스어","zh-Hans":"法文","zh-Hant":"法文"},ga:{en:"Irish",ga:"Gaeilge",ko:"아일랜드어","zh-Hans":"爱尔兰文","zh-Hant":"愛爾蘭文"},gd:{en:"Scottish Gaelic",gd:"Gàidhlig",ko:"스코틀랜드 게일어","zh-Hans":"苏格兰盖尔文","zh-Hant":"蘇格蘭蓋爾文"},hi:{en:"Hindi",hi:"हिन्दी",ko:"힌디어","zh-Hans":"印地文","zh-Hant":"印地文"},hu:{en:"Hungarian",hu:"Magyar",ko:"헝가리어","zh-Hans":"匈牙利文","zh-Hant":"匈牙利文"},id:{en:"Indoesian",id:"Bahasa Indonesia",ko:"인도네시아어","zh-Hans":"印尼文","zh-Hant":"印尼文"},it:{en:"Italian",it:"Italiano",ko:"이탈리아어","zh-Hans":"意大利文","zh-Hant":"意大利文"},ja:{en:"Japanese",ja:"日本語",ko:"일본어","zh-Hans":"日文","zh-Hant":"日文"},kk:{en:"Kazakh",kk:"Қазақша",ko:"카자흐어","zh-Hans":"哈萨克文","zh-Hant":"哈薩克文"},ko:{en:"Korean",ja:"韓国語",ko:"한국어","zh-Hans":"韩文","zh-Hant":"韓文"},ms:{en:"Malay",ko:"말레이어",ms:"Bahasa Melayu","zh-Hans":"马来文","zh-Hant":"馬來文"},no:{en:"Norwegian",ko:"노르웨이어",no:"Norsk","zh-Hans":"挪威文","zh-Hant":"挪威文"},pl:{en:"Polish",ko:"폴란드어",pl:"Polski","zh-Hans":"波兰文","zh-Hant":"波蘭文"},pt:{en:"Portuguese",ko:"포르투갈어",pt:"Português","zh-Hans":"葡萄牙文","zh-Hant":"葡萄牙文"},ro:{en:"Romanian",ko:"루마니아어",ro:"Română","zh-Hans":"罗马尼亚文","zh-Hant":"羅馬尼亞文"},ru:{en:"Russian",ko:"러시아어",ru:"Русский","zh-Hans":"俄文","zh-Hant":"俄文"},sv:{en:"Swedish",ko:"스웨덴어",sv:"Svenska","zh-Hans":"瑞典文","zh-Hant":"瑞典文"},th:{en:"Thai",ko:"태국어",th:"ภาษาไทย","zh-Hans":"泰文","zh-Hant":"泰文"},tr:{en:"Turkish",ko:"튀르키예어",tr:"Türkçe","zh-Hans":"土耳其文","zh-Hant":"土耳其文"},uk:{en:"Ukrainian",ko:"우크라이나어",uk:"Українська","zh-Hans":"乌克兰文","zh-Hant":"烏克蘭文"},ur:{en:"Urdo",ko:"우르두어",ur:"اردو","zh-Hans":"乌尔都文","zh-Hant":"烏爾都文"},uz:{en:"Uzbek",ko:"우즈베크어",uz:"Oʻzbekcha","zh-Hans":"乌兹别克文","zh-Hant":"烏茲別克文"},vi:{en:"Vietnamese",ko:"베트남어",vi:"Tiếng Việt","zh-Hans":"越南文","zh-Hant":"越南文"},zh:{en:"Chinese",ja:"中国語",ko:"중국어",zh:"中文","zh-Hans":"中文","zh-Hant":"中文"},"zh-Hans":{en:"Simplified Chinese",ja:"中国語(簡体字)",ko:"중국어 간체자","zh-Hans":"简体中文","zh-Hant":"簡體中文"},"zh-Hant":{en:"Traditional Chinese",ja:"中国語(繁体字)",ko:"중국어 정체자","zh-Hans":"繁体中文","zh-Hant":"繁體中文"}};const Bs=e=>{const{isOpen:s,onClose:f}=e,{t:b}=Os(),w=ne.getAppVersion();return t.jsxs(n,{isOpen:s,onClose:f,size:"xl",scrollBehavior:"inside",children:[t.jsx(r,{}),t.jsxs(i,{children:[t.jsx(a,{children:b("header.about.title")}),t.jsx(o,{}),t.jsxs(l,{paddingBottom:10,children:[t.jsxs(c,{direction:"row",children:[t.jsx(d,{boxSize:"128px",src:"/rmp//logo192.png"}),t.jsxs(c,{direction:"column",width:"100%",alignItems:"center",justifyContent:"center",children:[t.jsx(h,{fontSize:"xl",as:"b",children:b("header.about.rmp")}),t.jsx(h,{children:w}),t.jsx(h,{}),t.jsx(h,{fontSize:"sm",children:b("header.about.railmapgen")})]})]}),t.jsx(u,{margin:5,children:t.jsx(h,{fontSize:"xl",children:b("header.about.desc")})}),t.jsx(x,{as:"h5",size:"sm",mt:3,mb:2,children:b("header.about.contributors")}),t.jsx(x,{as:"h6",size:"xs",my:2,children:b("header.about.coreContributors")}),t.jsxs(p,{children:[t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/thekingofcity","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"https://github.com/thekingofcity.png",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:"thekingofcity"}),t.jsx(h,{fontSize:"sm",children:b("header.about.content1")}),t.jsx(h,{fontSize:"sm",align:"right",mb:1,children:b("header.about.content2")})]})]}),t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/langonginc","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"https://github.com/langonginc.png",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:"langonginc"}),t.jsx(h,{fontSize:"sm",children:b("header.about.langonginc")}),t.jsx(h,{fontSize:"sm",align:"right",mb:1,children:"--Avicii"})]})]})]}),t.jsx(x,{as:"h6",size:"xs",my:2,children:b("header.about.styleContributors")}),t.jsxs(p,{children:[t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/203IhzElttil","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"https://github.com/203IhzElttil.png",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:"203IhzElttil"}),t.jsx(h,{fontSize:"sm",mb:1,children:b("header.about.203IhzElttil")})]})]}),t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/Swiftiecott","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"https://github.com/Swiftiecott.png",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:"Swiftiecott"}),t.jsx(h,{fontSize:"sm",mb:1,children:b("header.about.Swiftiecott")})]})]}),t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/Minwtraft","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"https://github.com/Minwtraft.png",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:"Minwtraft"}),t.jsx(h,{fontSize:"sm",mb:1,children:b("header.about.Minwtraft")})]})]})]}),t.jsx(x,{as:"h5",size:"sm",mt:3,mb:2,children:b("header.about.contactUs")}),t.jsxs(p,{children:[t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/railmapgen/rmp/issues","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"data:image/svg+xml,%3csvg%20width='98'%20height='96'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M48.854%200C21.839%200%200%2022%200%2049.217c0%2021.756%2013.993%2040.172%2033.405%2046.69%202.427.49%203.316-1.059%203.316-2.362%200-1.141-.08-5.052-.08-9.127-13.59%202.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015%204.934.326%207.523%205.052%207.523%205.052%204.367%207.496%2011.404%205.378%2014.235%204.074.404-3.178%201.699-5.378%203.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283%200-5.378%201.94-9.778%205.014-13.2-.485-1.222-2.184-6.275.486-13.038%200%200%204.125-1.304%2013.426%205.052a46.97%2046.97%200%200%201%2012.214-1.63c4.125%200%208.33.571%2012.213%201.63%209.302-6.356%2013.427-5.052%2013.427-5.052%202.67%206.763.97%2011.816.485%2013.038%203.155%203.422%205.015%207.822%205.015%2013.2%200%2018.905-11.404%2023.06-22.324%2024.283%201.78%201.548%203.316%204.481%203.316%209.126%200%206.6-.08%2011.897-.08%2013.526%200%201.304.89%202.853%203.316%202.364%2019.412-6.52%2033.405-24.935%2033.405-46.691C97.707%2022%2075.788%200%2048.854%200z'%20fill='%2324292f'/%3e%3c/svg%3e",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:b("header.about.github")}),t.jsx(h,{fontSize:"sm",children:b("header.about.githubContent")})]})]}),t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://join.slack.com/t/railmapgenerator/shared_invite/zt-1odhhta3n-DdZF~fnVwo_q0S0RJmgV8A","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2023.0.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20270%20270'%20style='enable-background:new%200%200%20270%20270;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23E01E5A;}%20.st1{fill:%2336C5F0;}%20.st2{fill:%232EB67D;}%20.st3{fill:%23ECB22E;}%20%3c/style%3e%3cg%3e%3cg%3e%3cpath%20class='st0'%20d='M99.4,151.2c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h12.9V151.2z'/%3e%3cpath%20class='st0'%20d='M105.9,151.2c0-7.1,5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v32.3c0,7.1-5.8,12.9-12.9,12.9%20s-12.9-5.8-12.9-12.9V151.2z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M118.8,99.4c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v12.9H118.8z'/%3e%3cpath%20class='st1'%20d='M118.8,105.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9H86.5c-7.1,0-12.9-5.8-12.9-12.9%20s5.8-12.9,12.9-12.9H118.8z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st2'%20d='M170.6,118.8c0-7.1,5.8-12.9,12.9-12.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9h-12.9V118.8z'/%3e%3cpath%20class='st2'%20d='M164.1,118.8c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9V86.5c0-7.1,5.8-12.9,12.9-12.9%20c7.1,0,12.9,5.8,12.9,12.9V118.8z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st3'%20d='M151.2,170.6c7.1,0,12.9,5.8,12.9,12.9c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9v-12.9H151.2z'/%3e%3cpath%20class='st3'%20d='M151.2,164.1c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h32.3c7.1,0,12.9,5.8,12.9,12.9%20c0,7.1-5.8,12.9-12.9,12.9H151.2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:b("header.about.slack")}),t.jsx(h,{fontSize:"sm",children:b("header.about.slackContent")}),t.jsx(h,{fontSize:"sm",as:"i",children:"#rmp, #gallery, #rmg, #palette-and-templates"})]})]})]}),t.jsx(x,{as:"h5",size:"sm",mt:3,mb:2,children:b("header.donation.title")}),t.jsxs(p,{children:[t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://afdian.com/a/rail-map-toolkit","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAC9FBMVEUAAACabOutif+ve/+FbLiVcuaQaOCWb+WYceiLYtuccOingvOYcOeRad6ZcuifeumXcOWhfO6jfPCmhPOUa+aLYtyac+iVbuSMZN2VbeWNZt6RaeGRauKhee2acumQauClfvGTa+OOZd6JYNqWb+Sog/SSauGPaOCogvSNZN2NZN2ngfKogvSngPOfeu6bdemTauSlfvGYcOiohPSngfKQaOCXb+aifO+XcOaVbuWTbOOogfOlf/GmgPKTbOOYceaMZN2pg/WQaN+hee2OZt6RaeCRauGKYtuSa9+bdOmog/SifO+ddumie+6Zcuelf/GSa+Ked+uYcealf/GSauGJYdqpg/SQaOCJYduOZd6jffCJX9qNZN6mgfKMZN2SauKfeOyKYtuXcOWpg/SngfOdduuJYNqQaN+WbuWUbeWmgfOLY9yUbOWlf/GZceeKYNqOaN6mgvKpgvSZceiMZNyVb+WNZt2cdumSauOfee2Wb+WPaN+geu2ddeqMZNypg/Wheu6lf/GZcueJYNmQaN+jffCTbOSphPWog/SWb+WmgPKWb+aYcuekf/Gac+iKYtuVbuWWbuSogvSSa+KWb+SOZt6ifO+feeyngfKRaeGpg/SYcOefeOujfe+VbeSMZd6ac+iJYdqVbeSog/OVbOWcdeqKYtungvObdOmfd+uSa+KNZNyeduuRaeGjfe+XcOWMY9ybdOmngvSOZt6UbuWacuiSbOKgee2bdOmMY9yVbuOmgvSUbeKviP6xif+UaueVa+mMY92ZcOyqhPaOZOKuh/2shPybcu2mf/WhePKcdO6ddeyYb+qZceirhPmpgfmedfCacuuWbuWogfemffefdfKacuqSaOaPZeSRaOKyiv+qg/iogvShd/SYbuyWbeiQZuWNZN+MYt+thvqlffSie/CXbeqTaOeKYdu1jP+jevOccvCbce6Xbeuth/uqgvukevinf/eiePaVau2WbOqXb+ahdvuUaumfdPehee+thP6bb/MemaUsAAAAvXRSTlMAAwEEAwb+/Qv6Cfv8IRAOXiwaFP7++9p3TkwvJSEeGf7++/r59+ri0MmCeFZCPjk3NDEk9PHi4NLIwq2djHp1bmNZUVBIPzwU/v38+fj49/bz6+rl5N7a0s7Hw8LAvq+opqSjlZOSiIBuaGRjYmJaVU1HREQ1KykW+/X19O7r6OXf29vV0c3Mxry4taupnpqZlZGRi4uGgXxzbWtjWlJG8/Px7ezk3dfQwbq4tp2Zh3t6cVxaVtrXz7GdcGlhNM13AAAH1ElEQVRYw+1YVVgbQRDezd2RkODu7pS6u7u7u7u7u7u7u7slkCZESUKCuxQoLVD3vnSPSyW9S6ClD33o/xHOdv6b2f1nZhPwH//xz4EFcRwi/CU2RKY/hayK0+EYdWhr6eGN6CrKCEk6qzZNtwxY0Wtxr8EtK8qIob+Zo/v6i7Ozk8U54jeFMwFeoaUAcMIA/2RxrjhZ6O9v7n/szWjA+nMXkWWbAbni3Nzk3BXDhvUSmpsnZ08BsCJ8E/yTC8XCXqPbzHbpa24u/ODoUpE5hGBKbm6h44ApELj1TRLnvMm50IYUDoQ4UiWGQJBAB/IfXuaLcDB3RXLhsdFbwtyHfXjiKDa/51aWIKBJmRJgilBYOLXpmyfm2ULznNCWsHTRWZDgWLX1tvRwr9p6ZquWU5sjtDwyy9LqW0axjEd8NTm7Lwj7UohWw9Hx9OCBoQMHDx44MLRfv5V9goMX11qwwM8MISUlxcysVtDK8zsmuhOkHW40ZJds8WkOMUyY9CQ7R5jyITIp6UmkHlFRUW8RCkpKSjIzM2MyMwsKYmKyuq4e05owSokBN0ehGC3rkS39FvulILIoPSIjfZFXfgtq1QoK6hkcHNwzqFZX35ji4pismGLf+g/bIlsWY8jc0CeO5jfQKWf2zOZNXcLG7Nq1a0xY2NV9TSfcmOp2pHVV99keHpZeXmg+W0/dt61+z6yiGJ1U6tyEg6wZXWyVkyMUhnHLm6aWh7c5a6U6raLuYdKaBpRjTZPEwshQUi5IbKVxsCgZYjRQLrW9uU4n1SlU962QYBlTxS/KL8nsghundBIIAofMFQ6SiqFIW63TJrIz6s5CNximEbQJjUryi0rpN6aVN/USjMAgi17hWHoZkiSTaycEJMy/xTSRLBxwXYJLIs0iM836DGnsZknoXcIxXJ8WLETnbeNOMeqvvTbKLbSJBxiXhhzustKhxME361GBWc/6l/a18uB89w2WumTjHFt7zo86CdFbxypVKsUBetR64Vu1vNTHLKsgqyDz0aMs36DVQ3aMc61qyaUmpfoGrSrx9WFA/Jy1YLJTYjulDWBKROqmVevGQ/p0dXiEEEN+fLsGrd7qygXWY+cr2FrpcA6Ahia3nNopnWYAjLnrUYOtZk3ccf72cZ20qKiY5E2Q1h9XL0P3LsHZ5tfpghDYKJ3kpzwBZrwvU2dzq9qMHV7f+WSAtIiti03QshMCdralTT+pwibPnOIvskxUeCQ04ttT69kzXHfOfxcQoIpdVwUtHaPkNsd3jL8G8LLKrte4nY1noGnnbmWz32V0PwCRUpiLi/XZZ8pu1QFmui1UdU5QKLS1m9jUTmArFBs9qNLCzFi5ozJ+qMkuhAOi3ssAaaxOoZCi/Ko9mZx+E014VN4n5CJhqi3MOa7S1a3HZltYSJXDLUk3TI5elB+/x9SGCANzl8cmbtj2jm2R0d2Gthj0cjU079U5DEBTvfpKLFulstDKN3jS3aO//2B+3lKkRVNREHVjLSwyOjdBEwrL7sTVFubNq2yCED2Z3F1l8bouqb3ybBW8lsryWwBonA9FnJiYMdyKWtyyPbSvI8s7BKBRPtbm1xZKVZPSelIuQrulr3yMeggB3Piys7y7K6llDC/X7sh24asOEVT2MSYn4ltuC6haDcuzXW2RH9fDFh2ZdX/ttZP8rBdyD/F5o/jL4eHuuBerrAHO/LZZnZWxy70AQTKNPTlkbhl1BEKk6P4aSUPmYBDJqJftjlYBBMnt7vDx/TiTwqH8r9JJFjeJeRwOrO/K5aNK8xICb+f3Dq4GA1m/9lZgd7kR3C3RLLMHXMaIUaLLlS3QkSpiW28alCVIZq5hGjd8KhlUJ12y3p756xIOKjvJj1YH8Ec8LMP4DOseIkztEifz8emybKQnumQgnNHu2SIkmW8zDg348Mb1Jv7isl3/p+k+6XFxaYIelRgYMVCl47OOVQDOLA/XovcOyH0DnzmNaqplXWQSXnTaJADphJ6nnuUfREdmwuKPBoQQWI/cZGsfUdk2YlMaj3+iBs0QAuJcfN5QNNuMEmEZhozMw58+7bHXljw/xEt/3gxg9ETZE/+pWzVaWWBeFByMT+epU3khjabVaFZTpKYTohu23fLjLwIjjCxDbSDzQfzA9qJoQfuaj3kCKmSayagX817tZmCkawZZT6qZns4TCdSP+aJUwX4AGavlHc082Z6yaj/VusJFoseBlaaP6B3YPnANKRvmxr1Q1kkz1A6dYkZLTWml9Gwg4Imej0eX9tUiqhHGej0E0zppOr2oc5BL2jF2W0h6Z319SWpgtGg8GvRjQ2ikJFau87mDTNN/vJ1+rw5Z3wEhTrIBu/0hAjXv6ZJpiB6ZYGiQqW/4nps0cR1exNW53MLu+034IxGtp4/szee35/Mb1ChXHyNjOLRKkybTSHyWNQifXoPz0zP7as0anuHxo0XR/JBKtD2UiU7KmdS/g0SSlqZW+/QIWd+wUfj1B+F7t48Y1DvwMf/5Y75AtKYZlxxYTpCBwIjtq7pI+BK1WhLN50cj8AUCRBYtSBX1HjENI0f99k85EXsbnKmZxhcgJgSBIDVVIFqydnslO0qIZYIuDlJjlcJHNhi0NiRkzdr1Ixrtn16Dq9f1HwD/bga5HGuOPh1pkv9NPw3FDXHyukKgRIhTH1Q9/uM//nl8BYlod8WjsBdLAAAAAElFTkSuQmCC",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",pb:1,children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:b("header.donation.afdian")}),t.jsx(h,{fontSize:"sm",children:b("header.donation.viaCNY")})]})]}),t.jsxs(g,{size:"lg",w:"85%",onClick:()=>window.open("https://opencollective.com/rail-map-toolkit","_blank"),cursor:"pointer",children:[t.jsx(m,{src:"/rmp/assets/opencollective-icon-Ciasch0w.webp",size:"lg",my:2,ml:-1,mr:2}),t.jsxs(j,{display:"block",width:"100%",pb:1,children:[t.jsx(h,{fontSize:"lg",fontWeight:"bold",mb:1,children:b("header.donation.openCollective")}),t.jsx(h,{fontSize:"sm",children:b("header.donation.viaUSD")})]})]})]})]})]})]})}; -/*! - * canvas-size - * v2.0.0 - * https://github.com/jhildenbiddle/canvas-size - * (c) 2015-2024 John Hildenbiddle - * MIT license - */ -function Zs(e){const s=e.sizes.shift(),t=Math.max(Math.ceil(s[0]),1),n=Math.max(Math.ceil(s[1]),1),r=[t-1,n-1,1,1],i=performance.now(),a="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope;let o,l;a?(o=new OffscreenCanvas(1,1),l=new OffscreenCanvas(t,n)):(o=document.createElement("canvas"),o.width=1,o.height=1,l=document.createElement("canvas"),l.width=t,l.height=n);const c=o.getContext("2d"),d=l.getContext("2d");d&&(d.fillRect.apply(d,r),c.drawImage(l,t-1,n-1,1,1,0,0,1,1));const h=c&&0!==c.getImageData(0,0,1,1).data[3],u=parseInt(performance.now()-i);return[o,l].forEach((e=>{e.height=0,e.width=0})),a?(postMessage({width:t,height:n,testTime:u,isTestPass:h}),!h&&e.sizes.length&&setTimeout((()=>{Zs(e)}),0)):h?e.onSuccess({width:t,height:n,testTime:u}):(e.onError({width:t,height:n,testTime:u}),e.sizes.length&&setTimeout((()=>{Zs(e)}),0)),h}const Gs={area:[16384,14188,11402,11180,10836,8192,4096,1],height:[8388607,65535,32767,16384,8192,4096,1],width:[4194303,65535,32767,16384,8192,4096,1]},Us={max:null,min:1,sizes:[],step:1024,useWorker:!1,onError:Function.prototype,onSuccess:Function.prototype},Ds={};function Ks(e){const s=e.width===e.height,t=1===e.height,n=1===e.width,r=[];if(e.width&&e.height){const i=e.min||Us.min,a=e.step||Us.step;let o=Math.max(e.width,e.height);for(;o>=i;){const e=s||t?o:1,i=s||n?o:1;r.push([e,i]),o-=a}}else e.sizes.forEach((e=>{const i=s||t?e:1,a=s||n?e:1;r.push([i,a])}));return r}function Ys(e){const s="undefined"!=typeof window,t=s&&"Promise"in window,n=s&&"HTMLCanvasElement"in window,r=s&&"OffscreenCanvas"in window,i=URL.createObjectURL(new Blob([])).slice(-36),a=performance.now(),{onError:o,onSuccess:l,...c}=e,d=()=>parseInt(performance.now()-a);let h=null;if(!n)return!1;if(e.useWorker&&r){const e=`\n var canvasTest = ${Zs.toString()};\n onmessage = function(e) {\n canvasTest(e.data);\n };\n `,s=new Blob([e],{type:"application/javascript"}),t=URL.createObjectURL(s);h=new Worker(t),URL.revokeObjectURL(t),h.onmessage=function(e){const{width:s,height:t,testTime:n,isTestPass:r}=e.data,a={width:s,height:t,testTime:n,totalTime:d()};r?(Ds[i].onSuccess(a),delete Ds[i]):Ds[i].onError(a)}}return t?new Promise((s=>{const t={...e,onError(t){let{width:n,height:r,testTime:i}=t;const a={width:n,height:r,testTime:i,totalTime:d()};let l;if(0===e.sizes.length)l=!0;else{const[[s,t]]=e.sizes.slice(-1);l=n===s&&r===t}o(a),l&&s({...a,success:!1})},onSuccess(e){let{width:t,height:n,testTime:r}=e;const i={width:t,height:n,testTime:r,totalTime:d()};l(i),s({...i,success:!0})}};if(h){const{onError:e,onSuccess:s}=t;Ds[i]={onError:e,onSuccess:s},h.postMessage(c)}else Zs(t)})):h?(Ds[i]={onError:o,onSuccess:l},void h.postMessage(c)):Zs(e)}const Vs={maxArea(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=Ks({width:e.max,height:e.max,min:e.min,step:e.step,sizes:[...Gs.area]});return Ys({...Us,...e,sizes:s})},maxHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=Ks({width:1,height:e.max,min:e.min,step:e.step,sizes:[...Gs.height]});return Ys({...Us,...e,sizes:s})},maxWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=Ks({width:e.max,height:1,min:e.min,step:e.step,sizes:[...Gs.width]});return Ys({...Us,...e,sizes:s})},test(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s={...Us,...e};return s.sizes=[...s.sizes],s.width&&s.height&&(s.sizes=[[s.width,s.height]]),Ys(s)}};var Fs=(e=>(e.left="l",e.right="r",e))(Fs||{}),Js=(e=>(e.through="through",e.nonThrough="nonthrough",e))(Js||{}),qs=(e=>(e.local="local",e.express="express",e.direct="direct",e))(qs||{}),Xs=(e=>(e.MTR="mtr",e.GZMTR="gzmtr",e.SHMetro="shmetro",e))(Xs||{}),Qs=(e=>(e.sh="sh",e.sh2020="sh2020",e))(Qs||{});const $s=new Set,et=new Set,st=new Set,tt=new Set,nt=new Map,rt=new Map,it=new Set,at=new Map,ot=new Map;let lt=[],ct=0;const dt=new Map,ht=new Map,ut=new Set,xt={localisedName:{en:"LEFT END"},num:"00",services:[qs.local],parents:[],children:["lineend"],transfer:{groups:[{}],tick_direc:Fs.right,paid_area:!0},loop_pivot:!1,one_line:!0,int_padding:355},pt={localisedName:{en:"RIGHT END"},num:"00",services:[qs.local],parents:[],children:[],transfer:{groups:[{}],tick_direc:Fs.right,paid_area:!0},loop_pivot:!1,one_line:!0,int_padding:355},gt={svgWidth:{destination:1500,runin:1500,railmap:1500,indoor:1500},svg_height:400,style:Xs.SHMetro,y_pc:50,padding:10,branchSpacingPct:33,direction:Fs.right,platform_num:"1",theme:[re.Shanghai,"sh1","#E3002B",ie.white],line_name:["地鐵線","Metro Line"],current_stn_idx:"jlaMj2",stn_list:{},namePosMTR:{isStagger:!0,isFlip:!0},customiseMTRDest:{isLegacy:!1,terminal:!1},line_num:"1",psd_num:"1",info_panel_type:Qs.sh,direction_gz_x:40,direction_gz_y:70,coline:{},loop:!1,loop_info:{bank:!0,left_and_right_factor:0,bottom_factor:1}},mt={localisedName:{},num:"",services:[qs.local],parents:[],children:[],transfer:{groups:[{}],tick_direc:Fs.right,paid_area:!0},loop_pivot:!1,one_line:!0,int_padding:355},jt=e=>`${e[0]}/${e[1]}=${e[2]}${e[3]}`,ft=e=>oe.includes(e),bt=(e,s)=>{const[t,n]=e.extremities(s),r=e.getEdgeAttributes(s),i=r.style;if(t!=n&&ft(i)){const e=(e=>{if(ft(e.style))return structuredClone(e[e.style].color)})(r);tt.has(jt(e))||(st.add(e),tt.add(jt(e)),nt.set(e,t),rt.set(jt(e),new Set)),rt.get(jt(e)).add(t),rt.get(jt(e)).add(n),ot.has(t)?lt.push({target:n,next:ot.get(t),color:e}):lt.push({target:n,next:-1,color:e}),ot.set(t,ct),ct++,ot.has(n)?lt.push({target:t,next:ot.get(n),color:e}):lt.push({target:t,next:-1,color:e}),ot.set(n,ct),ct++}},wt=(e,s,t)=>{if(rt.get(jt(t)).has(e)){rt.get(jt(t)).delete(e);for(let s=ot.get(e);-1!=s;s=lt[s].next){const n=lt[s].target,r=lt[s].color;jt(r)==jt(t)&&wt(n,e,t)}}},yt=(e,s,t)=>{if($s.has(e))return;$s.add(e);let n=0;const r=new Set;for(let i=ot.get(e);-1!=i;i=lt[i].next){const a=lt[i].target,o=lt[i].color;jt(o)==jt(t)&&(r.has(a)||(r.add(a),n++,a!=s&&yt(a,e,t)))}dt.set(e,n)},vt=(e,s)=>{const t=e.stn_list.lineend.parents;t.push(s),e.stn_list.lineend.parents=structuredClone(t).reverse(),e.stn_list.lineend.branch={...e.stn_list.lineend.branch,left:2==e.stn_list.lineend.parents.length?[Js.through,t[1]]:void 0}},St=(e,s,t)=>{if(ut.has(e))return[];ut.add(e);const n=[];for(let r=ot.get(e);-1!=r;r=lt[r].next){const i=lt[r].target,a=lt[r].color;i!=s&&jt(a)==jt(t)&&(i.startsWith("stn")?n.push(i):n.push(...St(i,e,t)))}return n},zt=(e,s,t,n,r,i,a)=>{if($s.has(e)&&(!e.startsWith("misc_node_")&&null==a.stn_list[e]||e.startsWith("misc_node_")&&!et.has(e)||a.loop))return[];if($s.has(e)&&null!=a.stn_list[e]&&((e,s)=>{let t=0;for(let n=ot.get(e);-1!=n;n=lt[n].next){lt[n].target;const e=lt[n].color;jt(e)==jt(s)&&t++}return t})(e,i)-1>=2){var o;const t=[...a.stn_list[e].parents,s];if(null==a.stn_list[t[1]]){const e=t[0];t[0]=t[1],t[1]=e}a.stn_list[e].parents=structuredClone(t).reverse(),a.stn_list[e].branch={...a.stn_list[e].branch,left:[Js.through,t[1]]};const n=[];for(const i of a.stn_list[e].children)i!=s&&n.push(i);a.stn_list[e].children=structuredClone(n),null===(o=a.stn_list[e].branch)||void 0===o||delete o.right;const r=[];for(const s of a.stn_list.lineend.parents)s!=e&&r.push(s);return a.stn_list.lineend.parents=structuredClone(r).reverse(),a.stn_list.lineend.branch={...a.stn_list.lineend.branch,left:2==a.stn_list.lineend.parents.length?[Js.through,r[1]]:void 0},0==n.length&&(a.stn_list[e].children=["lineend"],vt(a,e)),[e]}$s.add(e);const l=[],c=[],d=[],h=new Set,u=new Set;for(let x=ot.get(e);-1!=x;x=lt[x].next){const o=lt[x].target,c=lt[x].color;if(o!=t){if(jt(c)==jt(i)){if(u.has(o))continue;if(u.add(o),e.startsWith("misc_node_")){const t=zt(o,s,e,n+1,r,i,a);0!=t.length&&l.push(...t)}else{const s=zt(o,e,e,n+1,r,i,a);0!=s.length&&l.push(...s)}}if(!h.has(jt(c))&&jt(c)!=jt(i)){h.add(jt(c));const e={theme:c,name:[`ch_${jt(c)}`,`en_${jt(c)}`]};d.push(e)}}}if(2==l.length){for(let e=0;e<2;e++)"lineend"==l[e]&&l.splice(e,1);if(a.stn_list[l[1]].parents.length>=2){const e=l[0];l[0]=l[1],l[1]=e}}if($s.has(e)&&null!=a.stn_list[e]){const t=[];for(const s of a.stn_list.lineend.parents)s!=e&&t.push(s);a.stn_list.lineend.parents=structuredClone(t).reverse(),a.stn_list.lineend.branch={...a.stn_list.lineend.branch,left:2==a.stn_list.lineend.parents.length?[Js.through,t[1]]:void 0},0==l.length&&(ut.clear(),c.push(...St(e,s,i)))}if(e.startsWith("misc_node_"))return et.add(e),l;{const t=r.getNodeAttributes(e).type,o=r.getNodeAttributes(e)[t];if(a.stn_list[e]=structuredClone(mt),a.stn_list[e].localisedName={zh:o.names[0],en:o.names[1]},a.stn_list[e].num=String(n),r.getNodeAttributes(e).type==le.GzmtrBasic){const s=o;a.stn_list[e].num=s.stationCode,""===s.secondaryNames[0]&&""===s.secondaryNames[1]||(a.stn_list[e].localisedSecondaryName={zh:s.secondaryNames[0],en:s.secondaryNames[1]})}if(r.getNodeAttributes(e).type==le.GzmtrInt){const s=o,t=s.transfer[0];for(const n of t)if(jt(n)==jt(i)){a.stn_list[e].num=String(n[5]);break}""===s.secondaryNames[0]&&""===s.secondaryNames[1]||(a.stn_list[e].localisedSecondaryName={zh:s.secondaryNames[0],en:s.secondaryNames[1]})}return 0!=l.length?(a.stn_list[e].children=structuredClone(l).reverse(),2==l.length&&(a.stn_list[e].branch={...a.stn_list[e].branch,right:[Js.through,l[1]]})):(a.stn_list[e].children=["lineend"],vt(a,e)),c.push(s),a.stn_list[e].parents=structuredClone(c).reverse(),2==c.length&&(a.stn_list[e].branch={...a.stn_list[e].branch,left:[Js.through,c[1]]}),0!=d.length&&(a.stn_list[e].transfer.groups[0].lines=structuredClone(d)),[e]}},Ct=(e,s,t,n)=>{const r=structuredClone(gt);let i;switch("LOOP"==n&&(r.loop=!0),e.getNodeAttributes(t).type){case le.GzmtrBasic:case le.GzmtrInt:i=Xs.GZMTR;break;case le.MTR:i=Xs.MTR;break;default:i=Xs.SHMetro}r.theme=structuredClone(s),r.style=i,r.stn_list.linestart=structuredClone(xt),r.stn_list.lineend=structuredClone(pt),$s.clear(),et.clear();const a=zt(t,"linestart","linestart",1,e,s,r);return r.current_stn_idx=a[0],r.stn_list.linestart.children=[a[0]],Object.keys(r.stn_list).length<=3||r.stn_list.lineend.parents.length>=3?void 0:structuredClone(r)},kt=(e,s,t,n)=>{var r;e.line_name=s,e.line_num=String(t),Ns(`RMG_${r=s,""!=r[0]&&""!=r[1]?r[0]+"_"+r[1]:""!=r[0]?r[0]:""!=r[1]?r[1]:`${(new Date).valueOf()}`}.json`,"application/json",((e,s)=>{let t=e;return s.forEach(((e,s)=>{const n=new RegExp(`ch_${s}`,"g"),r=new RegExp(`en_${s}`,"g");t=t.replace(n,e[0]),t=t.replace(r,e[1])})),t})(JSON.stringify(e),n))},Ot={LINE:"#33ccff",BRANCH:"#007B61",LOOP:"#ff6666"},Mt=e=>{const{isOpen:s,onClose:c}=e,{t:d}=Os(),u=Ms.useRef(window.graph),[x,p]=Ms.useState(!1),[g,m]=Ms.useState([[gt,"",""]]),[j,y]=Ms.useState(["","",""]),[v,S]=Ms.useState(new Map),[z,C]=Ms.useState(new Map),[k,O]=Ms.useState([]);Ms.useEffect((()=>{if(s){const e=(e=>{$s.clear(),st.clear(),tt.clear(),nt.clear(),rt.clear(),it.clear(),at.clear(),ot.clear(),lt=[],ct=0,dt.clear(),ht.clear(),e.filterEdges((e=>e.startsWith("line"))).forEach((s=>{ft(e.getEdgeAttributes(s).style)&&bt(e,s)}));let s=0;e.forEachNode((e=>{ht.set(e,++s)})),ht.set("lineend",++s);const t=[];for(const i of st){let e=0;for(;0!=rt.get(jt(i)).size;){let s="line_root";rt.get(jt(i)).forEach((e=>{"line_root"==s&&(s=e)})),wt(s,"line_root",i);const t={theme:i,index:++e};it.add(t),at.set(t,s)}}for(const i of it){const{theme:s}=i;$s.clear(),dt.clear(),yt(at.get(i),"line_root",s);let a=!0,o="LINE";const l=[];for(const[e,t]of dt)1==t&&l.push(e),3==t&&(o="BRANCH"),t>3&&(a=!1);if(!a)continue;0==l.length&&(o="LOOP",l.push(nt.get(s)));const c=[];for(const t of l){const i=Ct(e,s,t,o);var n,r;null!=i&&c.push([i,null!==(n=i.stn_list[i.current_stn_idx].localisedName.zh)&&void 0!==n?n:"",null!==(r=i.stn_list[i.current_stn_idx].localisedName.en)&&void 0!==r?r:""])}0!=c.length&&t.push({id:ae(10),theme:s,param:structuredClone(c),type:o})}return t})(u.current),s=new Map;e.forEach((({id:e,theme:t})=>{s.set(jt(t),e)})),O(e),S(s)}}),[s]);const M=(e,s)=>document.getElementById("2RMG_"+s+"_"+e).value.trim();return t.jsxs(n,{isOpen:s,onClose:c,size:"2xl",scrollBehavior:"inside",children:[t.jsx(r,{}),t.jsxs(i,{children:[t.jsx(a,{children:t.jsx(h,{as:"b",fontSize:"xl",children:d("header.download.2rmg.title")})}),t.jsx(o,{}),t.jsxs(l,{children:[t.jsx(h,{fontSize:"sm",mt:"3",lineHeight:"100%",children:d("header.download.2rmg.info1")}),t.jsx(h,{fontSize:"sm",mt:"3",lineHeight:"100%",children:d("header.download.2rmg.info2")}),t.jsx("br",{}),0===k.length?t.jsx(h,{fontSize:"md",children:d("header.download.2rmg.noline")}):t.jsx("table",{children:t.jsx("tbody",{children:k.map((({id:e,theme:s,param:n,type:r})=>t.jsxs("tr",{children:[t.jsx("td",{children:t.jsx(ce,{name:"other"==s[0]&&"other"==s[1]?s[2]:s[1],bg:s[2],fg:s[3]})}),t.jsx("td",{children:t.jsx(f,{placeholder:d("header.download.2rmg.placeholder.chinese"),id:`2RMG_nameCh_${e}`,size:"sm"})}),t.jsx("td",{children:t.jsx(f,{placeholder:d("header.download.2rmg.placeholder.english"),id:`2RMG_nameEn_${e}`,size:"sm"})}),t.jsx("td",{children:t.jsx(f,{placeholder:d("header.download.2rmg.placeholder.lineCode"),id:`2RMG_lineNum_${e}`,size:"sm"})}),t.jsx("td",{children:t.jsx(ce,{name:d(`header.download.2rmg.type.${r.toLowerCase()}`),bg:Ot[r],fg:ie.white})}),t.jsx("td",{children:t.jsx(b,{colorScheme:"blue",variant:"ghost",mr:"1",onClick:()=>{const s=M(e,"nameCh"),t=M(e,"nameEn"),r=M(e,"lineNum"),i=new Map;v.forEach(((e,s)=>{i.set(s,[M(e,"nameCh"),M(e,"nameEn")])})),m(n),y([s,t,r]),C(i),p(!0)},size:"sm",children:t.jsx(de,{})})})]},JSON.stringify(s))))})})]}),t.jsx(w,{children:t.jsx(b,{colorScheme:"blue",variant:"outline",mr:"1",onClick:c,children:d("close")})})]}),t.jsx(_t,{isOpen:x,onClose:()=>p(!1),param:g,nameList:j,interchangeName:z})]})},_t=e=>{const{isOpen:s,onClose:c,param:d,nameList:u,interchangeName:x}=e,{t:p}=Os(),[g,m]=Ms.useState("");return Ms.useEffect((()=>{""!=u[0]&&""!=u[1]?m(u[0]+"/"+u[1]):""!=u[0]?m(u[0]):""!=u[1]?m(u[1]):m("")}),[...u]),t.jsxs(n,{isOpen:s,onClose:c,size:"md",scrollBehavior:"inside",children:[t.jsx(r,{}),t.jsxs(i,{children:[t.jsx(a,{children:t.jsxs(h,{as:"b",fontSize:"xl",children:[p("header.download.2rmg.download")," ",g]})}),t.jsx(o,{}),t.jsx(l,{children:t.jsxs(y,{children:[t.jsx(h,{fontSize:"sm",mb:"2",lineHeight:"100%",children:p("header.download.2rmg.downloadInfo")}),d.map((([e,s,n])=>t.jsxs(b,{onClick:()=>{kt(e,[u[0],u[1]],u[2],x)},overflow:"hidden",size:"md",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"ruby",children:[s.replaceAll("\n","⏎"),"/",n.replaceAll("\n","⏎")]},`${s}${n}`)))]})}),t.jsx(w,{children:t.jsx(b,{colorScheme:"blue",variant:"outline",mr:"1",onClick:c,children:p("close")})})]})]})},Et=e=>{const{isOpen:s,onClose:c}=e,{t:d}=Os();return t.jsxs(n,{isOpen:s,onClose:c,size:"xl",scrollBehavior:"inside",children:[t.jsx(r,{}),t.jsxs(i,{children:[t.jsx(a,{children:d("header.download.termsAndConditions")}),t.jsx(o,{}),t.jsx(l,{children:t.jsxs(v,{children:[t.jsxs(S,{children:["The layout of the elements on the signage or rail map, is designed by"," ",t.jsxs(z,{color:"teal.500",href:"https://www.shmetro.com/",isExternal:!0,children:["Shanghai Shentong Metro Group ",t.jsx(C,{as:he})]}),", ",t.jsxs(z,{color:"teal.500",href:"https://www.gzmtr.com/",isExternal:!0,children:["Guangzhou Metro Group ",t.jsx(C,{as:he})]})," or ",t.jsxs(z,{color:"teal.500",href:"https://www.mtr.com.hk/",isExternal:!0,children:["MTR Corporation ",t.jsx(C,{as:he})]}),", depending on your selection. You shall grant appropriate permit or license from the relevant company above before using the generated images for commercial purposes, if it is required to do so.",t.jsx("br",{}),"标志版或路线图的元素或布局,基于你所选择的风格,为",t.jsxs(z,{color:"teal.500",href:"https://www.shmetro.com/",isExternal:!0,children:["上海申通地铁集团 ",t.jsx(C,{as:he})]}),",",t.jsxs(z,{color:"teal.500",href:"https://www.gzmtr.com/",isExternal:!0,children:["广州地铁集团公司 ",t.jsx(C,{as:he})]}),"或",t.jsxs(z,{color:"teal.500",href:"https://www.mtr.com.hk/",isExternal:!0,children:["港铁公司 ",t.jsx(C,{as:he})]}),"所设计。在产生的图像用作商业用途前,你应向相关公司取得适当之许可证或授权。"]}),t.jsxs(S,{children:["The elements including shapes and lines on the image are drawn by"," ",t.jsxs(z,{color:"teal.500",href:"https://www.github.com/thekingofcity",isExternal:!0,children:["thekingofcity ",t.jsx(C,{as:he})]})," and ",t.jsxs(z,{color:"teal.500",href:"https://www.github.com/wongchito",isExternal:!0,children:["Chito Wong ",t.jsx(C,{as:he})]}),", based on the design standards or rules of the companies listed above. You may use them for any purposes, but it is recommended to state the name and the link of software alongside.",t.jsx("br",{}),"图像的元素,包括图形及线条,均由",t.jsxs(z,{color:"teal.500",href:"https://www.github.com/thekingofcity",isExternal:!0,children:["thekingofcity ",t.jsx(C,{as:he})]}),"及",t.jsxs(z,{color:"teal.500",href:"https://www.github.com/wongchito",isExternal:!0,children:["Chito Wong ",t.jsx(C,{as:he})]}),"基于上述公司设计标准或准则绘制。你可将其用于任何目的,但我们建议你于使用同时附以我们的名字以及本网站地址。"]}),t.jsxs(S,{children:["Due to copyright, licensing and other legal restrictions, Rail Map Painter uses"," ",t.jsxs(z,{color:"teal.500",href:"https://github.com/ButTaiwan/genyo-font",isExternal:!0,children:["GenYoMin provided by ButTaiwan ",t.jsx(C,{as:he})]}),", and Vegur instead of MTRSung and Myriad Pro respectively to display and generate MTR-style signage. You shall grant appropriate permit or license from the manufacturers before using those generated images for commercial purposes.",t.jsx("br",{}),"由于著作权及其他法律限制,铁路路线图绘制器使用由",t.jsxs(z,{color:"teal.500",href:"https://github.com/ButTaiwan/genyo-font",isExternal:!0,children:["ButTaiwan提供的源樣明體 ",t.jsx(C,{as:he})]}),",以及Vegur,以代替港铁样式标志牌所使用的地铁宋及Myriad Pro。在产生之图像用作商业用途前,你应向字型生产厂商取得适当之许可证或授权。"]}),t.jsxs(S,{children:["The exported images in PNG or SVG format may be modified, published, or used for other purposes except commercial use, under the conditions above.",t.jsx("br",{}),"输出的PNG或SVG图像可基于上述条款,在非商业使用时,用于修改、发行或其他用途。"]}),t.jsxs(S,{children:["All flag emojis shown on Windows platforms are designed by"," ",t.jsxs(z,{color:"teal.500",href:"https://openmoji.org/",isExternal:!0,children:["OpenMoji ",t.jsx(C,{as:he})]})," ","– the open-source emoji and icon project. License:",t.jsxs(z,{color:"teal.500",href:"https://creativecommons.org/licenses/by-sa/4.0/",isExternal:!0,children:["CC BY-SA 4.0 ",t.jsx(C,{as:he})]}),t.jsx("br",{}),"于Windows作业系统上显示的国旗Emoji为",t.jsxs(z,{color:"teal.500",href:"https://openmoji.org/",isExternal:!0,children:["OpenMoji ",t.jsx(C,{as:he})]}),"所设计。许可证:",t.jsxs(z,{color:"teal.500",href:"https://creativecommons.org/licenses/by-sa/4.0/",isExternal:!0,children:["CC BY-SA 4.0 ",t.jsx(C,{as:he})]})]}),t.jsxs(S,{children:["We reserve the rights, without prior notice, to modify, add, or remove these terms. The Chinese translation is for reference only. In case of any discrepancy between the English version and the Chinese version, the English version shall prevail.",t.jsx("br",{}),"我们保留修改、新增或移除上述条款之权利,而无需另行通知。中文译本仅供参考,文义如与英文有歧异,概以英文本为准。"]})]})})]})]})};function Nt(){const e=k("white","var(--chakra-colors-gray-800)"),s=ue(),{telemetry:{project:c}}=xe((e=>e.app)),d=xe((e=>e.param)),u=ne.isAllowAnalytics(),{t:x}=Os(),p=Ms.useRef(window.graph),[g,m]=Ms.useState("png"),j={png:x("header.download.png"),svg:x("header.download.svg")},[f,y]=Ms.useState(2),[v,S]=Ms.useState({width:1,height:1,benchmark:.001}),[W,T]=Ms.useState(200),P=[10,25,33,50,67,75,100,125,150,175,200,250,300,400,500,750,1e3],L=Object.fromEntries(P.map((e=>[e,`${e}%`]))),[I,B]=Ms.useState([]),[Z,G]=Ms.useState(!1),U=[{type:"select",label:x("header.download.format"),value:g,options:j,onChange:e=>m("png"===e?"png":"svg")}],D=[{type:"select",label:x("header.download.svgVersion"),value:f,options:{1.1:x("header.download.svg1.1"),2:x("header.download.svg2")},onChange:e=>{y(e),1.1===e&&X(!0)}}],K=[{type:"select",label:x("header.download.scale"),value:W,options:L,disabledOptions:I,onChange:e=>T(e)},{type:"switch",label:x("header.download.transparent"),isChecked:Z,onChange:G}],[Y,V]=Ms.useState(!1),[F,J]=Ms.useState(!1),[q,X]=Ms.useState(!1),[Q,$]=Ms.useState(!1),[ee,se]=Ms.useState(!1),[te,re]=Ms.useState(!1);return Ms.useEffect((()=>{(async()=>{const e=await Vs.maxArea({usePromise:!0,useWorker:!0});S(e)})()}),[]),Ms.useEffect((()=>{if(Y){const{xMin:e,yMin:s,xMax:t,yMax:n}=pe(p.current),[r,i]=[t-e,n-s],a=P.filter((e=>r*e/100>v.width&&i*e/100>v.height));B(a)}}),[Y]),t.jsxs(O,{id:"download",children:[t.jsx(M,{as:_,size:"sm",variant:"ghost",icon:t.jsx(de,{})}),t.jsxs(E,{children:[t.jsx(N,{icon:t.jsx(ge,{}),onClick:()=>{u&&ne.event(be.DOWNLOAD_PARAM,c?{"#nodes":p.current.order,"#edges":p.current.size}:{}),Ns(`RMP_${(new Date).valueOf()}.json`,"application/json",we(d))},children:x("header.download.config")}),t.jsxs(N,{icon:t.jsx(me,{}),onClick:()=>re(!0),children:[x("header.download.2rmg.title"),t.jsx(A,{ml:"1",colorScheme:"green",children:"New"})]}),t.jsx(N,{icon:t.jsx(je,{}),onClick:()=>V(!0),children:x("header.download.image")})]}),t.jsxs(n,{size:"xl",isOpen:Y,onClose:()=>V(!1),children:[t.jsx(r,{}),t.jsxs(i,{children:[t.jsx(a,{children:x("header.download.image")}),t.jsx(o,{}),t.jsxs(l,{children:[t.jsx(fe,{fields:U}),"svg"===g&&t.jsx(fe,{fields:D}),"png"===g&&t.jsx(fe,{fields:K}),"png"===g&&I.length>0&&t.jsxs(t.Fragment,{children:[t.jsx(h,{as:"i",fontSize:"sm",children:x("header.download.disabledScaleOptions")}),t.jsx("br",{}),t.jsx(h,{as:"i",fontSize:"sm",children:x("header.download.disabledScaleOptionsWorkarounds")}),t.jsxs(z,{color:"teal.500",onClick:()=>window.open("https://github.com/RazrFalcon/resvg","_blank"),children:["RazrFalcon/resvg ",t.jsx(C,{as:he})]}),t.jsx("br",{})]}),t.jsx("br",{}),t.jsx(H,{isChecked:q,isDisabled:"svg"===g&&1.1===f,onChange:e=>X(e.target.checked),children:t.jsx(h,{children:x("header.download.useSystemFonts")})}),t.jsx(H,{isChecked:Q,onChange:e=>$(e.target.checked),children:t.jsxs(h,{children:[x("header.download.shareInfo1"),t.jsxs(z,{color:"teal.500",onClick:()=>window.open("https://railmapgen.github.io/rmp","_blank"),children:[x("header.about.rmp")," ",t.jsx(C,{as:he})]}),x("header.download.shareInfo2")]})}),t.jsx(H,{isChecked:ee,onChange:e=>se(e.target.checked),children:t.jsxs(h,{children:[x("header.download.termsAndConditionsInfo"),t.jsxs(z,{color:"teal.500",onClick:()=>J(!0),children:[x("header.download.termsAndConditions")," ",t.jsx(C,{as:he})]}),x("header.download.period")]})})]}),t.jsx(w,{children:t.jsx(R,{children:t.jsx(b,{colorScheme:"teal",variant:"outline",size:"sm",isDisabled:!ee||"png"===g&&I.includes(W),onClick:async()=>{V(!1),u&&ne.event(be.DOWNLOAD_IMAGES,c?{numberOfNodes:p.current.order,numberOfEdges:p.current.size}:{});const{elem:t,width:n,height:r}=await As(p.current,Q,q,f),i=t.outerHTML.replace(/ /g," ");if("svg"===g)return void Ns(`RMP_${(new Date).valueOf()}.svg`,"image/svg+xml",i);document.body.appendChild(t);const a="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(i)));document.body.removeChild(t),t.remove();const o=document.createElement("canvas"),[l,d]=[n*W/100,r*W/100];o.width=l,o.height=d;const h=o.getContext("2d");Z||(h.fillStyle=e,h.fillRect(0,0,l,d));const m=new Image;m.onload=()=>{setTimeout((()=>{h.drawImage(m,0,0,l,d),o.toBlob((e=>{e?Hs(`RMP_${(new Date).valueOf()}.png`,e):s(ye({status:"error",message:x("header.download.imageTooBig")}))}),"image/png")}),Rs()?2e3:0)},m.src=a},children:x("header.download.confirm")})})}),t.jsx(Et,{isOpen:F,onClose:()=>J(!1)})]})]}),t.jsx(Mt,{isOpen:te,onClose:()=>re(!1)})]})}const At=(e,{info_panel_type:s,line_num:t,stn_list:n,style:r,theme:i},a,o,l)=>{const c=Object.fromEntries(Object.keys(n).filter((e=>!["linestart","lineend"].includes(e))).map((e=>[e,`stn_${ae(10)}`])));Object.entries(n).filter((([e,s])=>!["linestart","lineend"].includes(e))).forEach((([s,t])=>{const n=e.filterNodes(((e,s)=>Object.values(le).includes(s.type)&&s[s.type].names[0]===t.localisedName.zh));0!==n.length&&(c[s]=n[0])}));const d=[["linestart",-1,0]],h={};for(;d.length;){const[e,s,t]=d.shift();n[e].children.filter((e=>"lineend"!=e)).forEach(((e,n)=>{const r=Math.max(n,t+n);h[e]={x:150*s,y:75*r},d.push([e,s+1,r])}))}Object.entries(n).filter((([e,s])=>!["linestart","lineend"].includes(e))).filter((([s,t])=>0===e.filterNodes(((e,s)=>Object.values(le).includes(s.type)&&s[s.type].names[0]===t.localisedName.zh)).length)).map((([e,n])=>{var l,d;let u=le.ShmetroBasic;const x=n.transfer.groups,p=x.map((e=>{var s;return null!==(s=e.lines)&&void 0!==s?s:[]})).flat();r===Xs.SHMetro?u=p.length>0?le.ShmetroInt:s===Qs.sh2020?le.ShmetroBasic2020:le.ShmetroBasic:r===Xs.GZMTR?u=p.length>0?le.GzmtrInt:le.GzmtrBasic:r===Xs.MTR&&(u=le.MTR);const g={...structuredClone(Ws[u].defaultAttrs),names:[null!==(l=n.localisedName.zh)&&void 0!==l?l:"",null!==(d=n.localisedName.en)&&void 0!==d?d:""]};if(u===le.ShmetroBasic2020)g.color=i;else if(u===le.GzmtrBasic)g.color=i,g.lineCode=t,g.stationCode=n.num;else if(u===le.GzmtrInt)g.transfer=x.map(((e,s)=>{var r,a;const o=null!==(r=null===(a=e.lines)||void 0===a?void 0:a.map((e=>{var s;return[...null!==(s=e.theme)&&void 0!==s?s:i,"1","01"]})))&&void 0!==r?r:[];return 0===s?[[...i,t,n.num],...o]:o}));else if(u===le.MTR){var m;null!==(m=x[0].lines)&&void 0!==m&&m.length?g.transfer=[[[...i,"",""],...x[0].lines.map((e=>{var s;return[...null!==(s=e.theme)&&void 0!==s?s:i,"",""]}))]]:g.transfer=[[]]}return{node:c[e],attr:{visible:!0,zIndex:0,x:a+h[e].x,y:o+h[e].y,type:u,[u]:g}}})).forEach((({node:s,attr:t})=>e.addNode(s,t))),Object.entries(n).filter((([e,s])=>!["linestart","lineend"].includes(e))).forEach((([s,t])=>{t.children.filter((e=>!["linestart","lineend"].includes(e))).forEach((t=>{const n=ve.Diagonal,[r,a]=[c[s],c[t]],o=l?Se(e,n,r,a,"from"):-1;e.addDirectedEdgeWithKey(`line_${ae(10)}`,r,a,{visible:!0,zIndex:0,type:n,[ve.Diagonal]:structuredClone(ze[ve.Diagonal].defaultAttrs),style:Ce.SingleColor,[Ce.SingleColor]:{color:i},reconcileId:"",parallelIndex:o})}))}))},Ht="rmg-bridge--",Rt={h:500,maxH:"70%","& iframe":{h:"100%",w:"100%"}};function Wt(e){const{isOpen:s,onClose:n}=e,{t:r}=Os(),{preference:{autoParallel:i}}=xe((e=>e.app)),{svgViewBoxZoom:a,svgViewBoxMin:o}=xe((e=>e.param)),l=ue(),c=ne.isAllowAnalytics(),d=Ts(),{height:h,width:u}=ke(d),x=_s.useRef(window.graph),[p]=_s.useState(crypto.randomUUID()),g="/rmg/#/import?"+new URLSearchParams({parentComponent:ne.getAppName(),parentId:p}),m=_s.useCallback((()=>{l(Oe()),l(Me()),l(_e(x.current.export()))}),[l,Oe,Me,_e,x]);return _s.useEffect((()=>{const e=new BroadcastChannel(Ht+p);return e.onmessage=e=>{const{event:s,data:t}=e.data;console.log("[rmp] Received event from RMG app clip:",s),"CLOSE"===s?n():"IMPORT"===s&&(e=>{try{c&&ne.event(be.IMPORT_RMG_PARAM,{});const s=o.x+u*a/100/3,t=o.y+h*a/100/3;At(x.current,e,s,t,i),m()}catch(s){l(ye({status:"error",message:r("header.open.unknownError")})),console.error("OpenActions.handleUploadRMG():: Unknown error occurred while parsing the RMG project",s)}finally{n()}})(t)},()=>e.close()}),[o.x,o.y,a,h,u,i]),t.jsx(Ee,{isOpen:s,onClose:n,sx:Rt,children:t.jsx("iframe",{src:g,loading:"lazy"})})}const Tt="OPEN_TEMPLATE",Pt=new BroadcastChannel("RMP_GALLERY_CHANNEL"),Lt={h:"80%",w:"80%","& iframe":{h:"100%",w:"100%"},"& div":{h:"100%",w:"100%"}};function It(e){const{isOpen:s,onClose:n}=e,r=W(),{t:i}=Os(),a=ue(),{telemetry:{project:o}}=xe((e=>e.app)),l=ne.isAllowAnalytics(),c=Ms.useRef(window.graph),d=Ms.useCallback((()=>{a(Oe()),a(Me()),a(_e(c.current.export()))}),[a,Oe,Me,_e,c]),h=async(e,s)=>{var t;const n=s?`https://${s}`:"",h=await(null===(t=(await Promise.allSettled([fetch(`${n}/rmp-gallery/resources/real_world/${e}.json`),fetch(`${n}/rmp-gallery/resources/fantasy/${e}.json`)])).filter((e=>"fulfilled"===e.status)).find((e=>200===e.value.status)))||void 0===t?void 0:t.value.json());if(h){if(l){const t={id:e};o&&s&&(t.host=s),ne.event(be.IMPORT_WORK_FROM_GALLERY,t)}(async e=>{const{version:s,...t}=JSON.parse(await Ne(JSON.stringify(e)));a(Ae()),c.current.clear(),c.current.import(t.graph),d();const{svgViewBoxZoom:n,svgViewBoxMin:r}=t;"number"==typeof n&&a(He(n)),"number"==typeof r.x&&"number"==typeof r.y&&a(Re(r))})(h),r({title:i("header.open.importFromRMPGallery",{id:e}),status:"success",duration:9e3,isClosable:!0})}else r({title:i("header.open.failToImportFromRMPGallery",{id:e}),status:"error",duration:9e3,isClosable:!0});ne.updateAppMetadata({hash:""})};return Ms.useEffect((()=>{const e=new URL(window.location.href).searchParams;if(e.size>0){const s=e.keys().next().value,t=s.indexOf("."),n=s.substring(0,-1===t?void 0:t);let r;-1!==t&&(r=s.substring(t+1)),h(n,r)}}),[]),Ms.useEffect((()=>(Pt.onmessage=e=>{const{event:s,data:t}=e.data;s===Tt&&(h(t),n())},()=>Pt.close())),[]),t.jsxs(Ee,{isOpen:s,onClose:n,size:"full",sx:Lt,children:[t.jsx("iframe",{src:"/rmp-gallery/",loading:"lazy"}),t.jsx(T,{onClick:n,position:"fixed",top:"5px",right:"15px"})]})}function Bt(){const e=ue(),{t:s}=Os(),n=Ts(),{height:r}=ke(n),i=Ms.useRef(window.graph),a=Ms.useRef(null),[o,l]=Ms.useState(!1),[c,d]=Ms.useState(!1),h=Ms.useCallback((()=>{e(Oe()),e(Me()),e(_e(i.current.export()))}),[e,Oe,Me,_e,i]),u=async s=>{const{version:t,...n}=JSON.parse(await Ne(s));e(Ae()),i.current.clear(),i.current.import(n.graph),h();const{svgViewBoxZoom:r,svgViewBoxMin:a}=n;"number"==typeof r&&e(He(r)),"number"==typeof a.x&&"number"==typeof a.y&&e(Re(a))};return Ms.useEffect((()=>{const e=async e=>{const{type:s,key:t,from:n}=e.data;if(s===Ze.SAVE_CHANGED&&t===Ge.PARAM&&"rmt"===n){Ue.debug(`Received save changed event on key: ${t}`);const e=localStorage.getItem(Ge.PARAM);if(!e)return;await u(e)}};return We.addEventListener("message",e),()=>We.removeEventListener("message",e)}),[]),t.jsxs(O,{children:[t.jsx(M,{as:_,size:"sm",variant:"ghost",icon:t.jsx(Te,{})}),t.jsxs(E,{children:[t.jsx(N,{icon:t.jsx(Pe,{}),onClick:()=>{e(Ae()),i.current.clear(),e(He(100)),e(Re({x:0,y:0})),h()},children:s("header.open.new")}),t.jsx("input",{id:"upload_project",ref:a,type:"file",accept:".json",hidden:!0,onChange:async t=>{var n;const r=null===(n=t.target.files)||void 0===n?void 0:n[0];if(console.log("OpenActions.handleUpload():: received file",r),"application/json"!==(null==r?void 0:r.type))e(ye({status:"error",message:s("header.open.invalidType")})),console.error("OpenActions.handleUpload():: Invalid file type! Only file in JSON format is accepted.");else try{const e=await Zt(r);await u(e)}catch(i){e(ye({status:"error",message:s("header.open.unknownError")})),console.error("OpenActions.handleUpload():: Unknown error occurred while parsing the uploaded file",i)}t.target.value=""},"data-testid":"file-upload"}),t.jsx(N,{icon:t.jsx(Te,{}),onClick:()=>{var e;return null==a||null===(e=a.current)||void 0===e?void 0:e.click()},children:s("header.open.config")}),t.jsx(N,{icon:t.jsx(Le,{}),onClick:()=>l(!0),children:s("header.open.projectRMG")}),t.jsxs(N,{icon:t.jsx(he,{}),onClick:()=>d(!0),children:[s("header.open.gallery"),t.jsx(A,{ml:"1",colorScheme:"green",children:"New"})]}),t.jsx(N,{icon:t.jsx(Ie,{}),onClick:async()=>{await u(await Be()),e(Re({x:-10,y:-13}));const s=Math.max(0,Math.min(400,-.132*r+117.772));e(He(s)),ne.event(be.LOAD_TUTORIAL,{})},children:s("header.open.tutorial")})]}),t.jsx(Wt,{isOpen:o,onClose:()=>l(!1)}),t.jsx(It,{isOpen:c,onClose:()=>d(!1)})]})}const Zt=e=>new Promise((s=>{const t=new FileReader;t.onloadend=()=>s(t.result),t.readAsText(e)})),Gt=()=>{const[e,s]=Ms.useState(!1),{t:n}=Os(),r=ue(),i=Ms.useRef(window.graph),a=Ts(),{width:o,height:l}=ke(a),[c,d]=Ms.useState([]);return Ms.useEffect((()=>{e&&d(i.current.nodes().filter((e=>e.startsWith("stn"))).map((e=>{const s=i.current.getNodeAttributes(e);return{id:e,value:s[s.type].names.join("/")}})))}),[e]),t.jsxs(P,{isOpen:e,onOpen:()=>s(!0),onClose:()=>s(!1),children:[t.jsx(L,{children:t.jsx(_,{"aria-label":"zoom",variant:"ghost",size:"sm",icon:t.jsx(De,{}),onClick:()=>s(!e)})}),t.jsx(I,{children:t.jsx(B,{children:t.jsx(Ke,{label:n("header.search"),children:t.jsx(Ye,{data:c,displayHandler:e=>t.jsx(A,{children:e.value}),filter:(e,s)=>s.value.toLowerCase().includes(e.toLowerCase())||Object.values(s.value).some((s=>s.toLowerCase().includes(e.toLowerCase()))),value:"",onChange:e=>(e=>{r(Ve(new Set([e])));const s=Math.max(0,Math.min(400,-.132*l+117.772)),{x:t,y:n}=Fe((o-300)/2,l/2,s,{x:-i.current.getNodeAttribute(e,"x"),y:-i.current.getNodeAttribute(e,"y")});r(He(s)),r(Re({x:-t,y:-n}))})(e.id)})})})})]})},Ut=e=>{const{isOpen:s,onClose:c}=e,d=ue(),{theme:h,paletteAppClip:{output:u}}=xe((e=>e.runtime)),{t:x}=Os(),p=Ms.useRef(window.graph),[g,m]=Ms.useState(h),[j,f]=Ms.useState(!1);return Ms.useEffect((()=>{j&&u&&(m(u),f(!1))}),[null==u?void 0:u.toString()]),t.jsxs(n,{isOpen:s,onClose:c,size:"xl",scrollBehavior:"inside",trapFocus:!1,children:[t.jsx(r,{}),t.jsxs(i,{children:[t.jsx(a,{children:x("header.settings.procedures.removeLines.title")}),t.jsx(o,{}),t.jsxs(l,{children:[x("header.settings.procedures.removeLines.content"),t.jsx(Je,{theme:g,onClick:()=>{f(!0),d(qe(g))}})]}),t.jsxs(w,{children:[t.jsx(b,{colorScheme:"blue",variant:"outline",mr:"1",onClick:c,children:x("cancel")}),t.jsx(b,{colorScheme:"red",onClick:()=>{p.current.filterEdges(((e,s,t,n,r,i,a)=>oe.includes(s.style)&&JSON.stringify(s[s.style].color)===JSON.stringify(g))).forEach((e=>p.current.dropEdge(e))),d(Me()),d(_e(p.current.export())),c()},children:x("remove")})]})]})]})},Dt=e=>{const{isOpen:s,onClose:c}=e,d=ue(),{t:h}=Os(),u=Ms.useRef(window.graph),[x,p]=Ms.useState(1),g=[{type:"input",label:h("header.settings.procedures.scale.factor"),value:x.toString(),variant:"number",onChange:e=>p(Number(e)),minW:"full"}];return t.jsxs(n,{isOpen:s,onClose:c,size:"xl",scrollBehavior:"inside",children:[t.jsx(r,{}),t.jsxs(i,{children:[t.jsx(a,{children:h("header.settings.procedures.scale.title")}),t.jsx(o,{}),t.jsxs(l,{children:[h("header.settings.procedures.scale.content"),t.jsx(fe,{fields:g})]}),t.jsxs(w,{children:[t.jsx(b,{colorScheme:"blue",variant:"outline",mr:"1",onClick:c,children:h("cancel")}),t.jsx(b,{colorScheme:"red",onClick:()=>{u.current.forEachNode(((e,s)=>{u.current.updateNodeAttribute(e,"x",(e=>(null!=e?e:0)*x)),u.current.updateNodeAttribute(e,"y",(e=>(null!=e?e:0)*x))})),d(Oe()),d(Me()),d(_e(u.current.export())),c()},children:h("apply")})]})]})]})},Kt=e=>{const{isOpen:s,onClose:c}=e,d=ue(),{t:h}=Os(),u=Ms.useRef(window.graph),[x,p]=Ms.useState(0),[g,m]=Ms.useState(0),j=[{type:"input",label:h("header.settings.procedures.translate.x"),value:x.toString(),variant:"number",onChange:e=>p(Number(e)),minW:"full"},{type:"input",label:h("header.settings.procedures.translate.y"),value:g.toString(),variant:"number",onChange:e=>m(Number(e)),minW:"full"}];return t.jsxs(n,{isOpen:s,onClose:c,size:"xl",scrollBehavior:"inside",children:[t.jsx(r,{}),t.jsxs(i,{children:[t.jsx(a,{children:h("header.settings.procedures.translate.title")}),t.jsx(o,{}),t.jsxs(l,{children:[h("header.settings.procedures.translate.content"),t.jsx(fe,{fields:j})]}),t.jsxs(w,{children:[t.jsx(b,{colorScheme:"blue",variant:"outline",mr:"1",onClick:c,children:h("cancel")}),t.jsx(b,{colorScheme:"red",onClick:()=>{u.current.forEachNode(((e,s)=>{u.current.updateNodeAttribute(e,"x",(e=>(null!=e?e:0)+x)),u.current.updateNodeAttribute(e,"y",(e=>(null!=e?e:0)+g))})),d(Oe()),d(Me()),d(_e(u.current.export())),c()},children:h("apply")})]})]})]})},Yt=e=>{const{isOpen:s,onClose:c}=e,d=ue(),{preference:{unlockSimplePathAttempts:u}}=xe((e=>e.app)),{activeSubscriptions:x}=xe((e=>e.account)),{t:p}=Os();return t.jsxs(n,{isOpen:s,onClose:c,size:"5xl",scrollBehavior:"inside",children:[t.jsx(r,{}),t.jsxs(i,{children:[t.jsx(a,{children:p("header.settings.procedures.unlockSimplePath.title")}),t.jsx(o,{}),t.jsxs(l,{children:[t.jsx(h,{mb:"2",children:p("header.settings.procedures.unlockSimplePath.content1")}),t.jsx(h,{mb:"2",children:p("header.settings.procedures.unlockSimplePath.content2")}),t.jsx(h,{mb:"2",children:p("header.settings.procedures.unlockSimplePath.content3")})]}),t.jsx(w,{children:t.jsx(Z,{label:p("header.settings.pro"),isOpen:!x.RMP_CLOUD&&u>=0,children:t.jsx(b,{onClick:()=>{d(Xe(-1))},isDisabled:!x.RMP_CLOUD||u<0,children:p(u>=0?"header.settings.procedures.unlockSimplePath.check":"header.settings.procedures.unlockSimplePath.unlocked")})})})]})]})},Vt=e=>{const{isOpen:s,onClose:c}=e,d=ue(),u=W(),{t:x}=Os(),p=Ms.useRef(window.graph),[g,m]=Ms.useState(!1);return t.jsxs(n,{isOpen:s,onClose:c,size:"xl",scrollBehavior:"inside",children:[t.jsx(r,{}),t.jsxs(i,{children:[t.jsx(a,{children:x("header.settings.procedures.updateColor.title")}),t.jsx(o,{}),t.jsx(l,{children:t.jsx(h,{children:x("header.settings.procedures.updateColor.content")})}),t.jsxs(w,{children:[t.jsx(b,{colorScheme:"blue",variant:"outline",mr:"1",onClick:c,children:x("cancel")}),t.jsx(b,{colorScheme:"red",onClick:async()=>{m(!0);const e=JSON.stringify(p.current.export());try{const s=await qt(e);p.current.clear(),p.current.import(s),d(Oe()),d(Me()),d(_e(p.current.export())),u({title:x("header.settings.procedures.updateColor.success"),status:"success",duration:9e3,isClosable:!0})}catch(s){console.error(`[rmp] Error in updating all colors: ${s}`),u({title:x("header.settings.procedures.updateColor.error",{e:s}),status:"error",duration:9e3,isClosable:!0})}m(!1),c()},isLoading:g,children:x("apply")})]})]})]})},Ft=e=>e.length>=4&&e.every((e=>"string"==typeof e))&&!!e[2].match(/^#[0-9a-fA-F]{6}$/)&&Object.values(ie).includes(e[3]),Jt=(e,s,t)=>{const n=s.split(".");let r=e;for(let i=0;i{const s=JSON.parse(e),t=(new Date).getTime(),n=(e=>{const s=[],t=(e,n)=>{if(Array.isArray(e)&&Ft(e))s.push({path:n||"",value:e});else for(const r in e){const i=e[r],a=n?`${n}.${r}`:r;Array.isArray(i)?Ft(i)?s.push({path:a,value:i}):i.forEach(((e,s)=>t(e,`${a}.${s}`))):i&&"object"==typeof i&&t(i,a)}};return t(e),s})(s);console.log("[rmp] Found all themes pending for update",n);let r,i=!1;const a=new Promise(((e,t)=>{r=setTimeout((()=>{i=!0,t("Executing time exceeds 10000ms")}),1e4),(async()=>{for(const{path:e,value:t}of n){if(i)throw new Error("Update aborted");const[n,r,a,o,...l]=t,c=await Qe([n,r,a,o]);Jt(s,e,[...c,...l])}})().then(e).catch(t)}));try{return await a,console.log(`[rmp] Themes update completed, elapsed time ${((new Date).getTime()-t)/1e3} sec`),s}finally{clearTimeout(r)}},Xt=()=>{const{state:e}=xe((e=>e.account)),{t:s}=Os(),[n,r]=Ms.useState(!1),[i,a]=Ms.useState(1);Ms.useEffect((()=>{let e;return n&&i>0?e=window.setTimeout((()=>{a(i-1)}),1e3):0===i&&r(!1),()=>clearTimeout(e)}),[n,i]);const o={"logged-out":s("header.settings.subscription.logged-out"),free:s("header.settings.subscription.free"),subscriber:s("header.settings.subscription.subscriber"),expired:s("header.settings.subscription.expired")};return t.jsxs(u,{width:"100%",mb:"3",children:[t.jsx(h,{as:"b",fontSize:"xl",children:s("header.settings.subscription.title")}),t.jsx(u,{mt:"3",children:t.jsxs(u,{display:"flex",mb:"1",children:[t.jsx(h,{flex:"1",children:o[e]}),t.jsx(_,{"aria-label":"refresh",variant:"ghost",size:"sm",icon:t.jsx($e,{}),isDisabled:n,onClick:()=>(r(!0),a(1),void es())})]})})]})},Qt={width:"100%",justifyContent:"space-between"},$t={fontFamily:"-apple-system"},en=e=>{const{isOpen:s,onClose:c}=e,{activeSubscriptions:d}=xe((e=>e.account)),{telemetry:{project:x},preference:{autoParallel:g,randomStationsNames:m}}=xe((e=>e.app)),{keepLastPath:j,parallelLinesCount:f}=xe((e=>e.runtime)),w=ue(),{t:y}=Os(),v=k("primary.500","primary.300"),[S,O]=Ms.useState(!1),[M,_]=Ms.useState(!1),[E,N]=Ms.useState(!1),[H,R]=Ms.useState(!1),[W,T]=Ms.useState(!1),[P,L]=Ms.useState(!1),[I,B]=Ms.useState(!1),Q=ne.isAllowAnalytics(),$=f>=(d.RMP_CLOUD?ss:ts),ee=!d.RMP_CLOUD;return t.jsxs(n,{isOpen:s,onClose:c,size:"xl",scrollBehavior:"inside",trapFocus:!1,children:[t.jsx(r,{}),t.jsxs(i,{children:[t.jsx(a,{children:y("header.settings.title")}),t.jsx(o,{}),t.jsx(l,{children:t.jsxs(p,{divider:t.jsx(G,{borderColor:"gray.200"}),children:[t.jsx(Xt,{}),t.jsxs(u,{width:"100%",mb:"3",children:[t.jsx(h,{as:"b",fontSize:"xl",children:y("header.settings.preference.title")}),t.jsxs(u,{mt:"3",children:[t.jsxs(u,{display:"flex",mb:"1",children:[t.jsx(h,{flex:"1",children:y("header.settings.preference.keepLastPath")}),t.jsx(U,{isChecked:j,onChange:({target:{checked:e}})=>w(ns(e))})]}),t.jsxs(u,{display:"flex",mb:"1",children:[t.jsx(h,{children:y("header.settings.preference.autoParallel")}),t.jsx(A,{ml:"auto",colorScheme:"green",children:"New"}),t.jsx(Z,{label:y("header.settings.proWithTrial"),children:t.jsx(A,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",children:"PRO"})}),t.jsx(U,{ml:"1",isDisabled:$,isChecked:g,onChange:({target:{checked:e}})=>w(rs(e))})]}),t.jsxs(u,{mb:"1",display:"flex",children:[t.jsx(h,{flex:"1",children:y("header.settings.preference.randomStationNames.title")}),t.jsx(A,{ml:"auto",colorScheme:"green",children:"New"}),t.jsx(Z,{label:y("header.settings.pro"),children:t.jsx(A,{color:"gray.50",ml:"1",background:"radial-gradient(circle, #3f5efb, #fc466b)",children:"PRO"})}),t.jsxs(D,{size:"xs",width:"auto",ml:"1",value:m,onChange:e=>{w(xs(e.target.value))},children:[t.jsx("option",{value:"none",children:y("header.settings.preference.randomStationNames.none")}),t.jsx("option",{value:is.Shmetro,disabled:ee,children:y(`header.settings.preference.randomStationNames.${is.Shmetro}`)}),t.jsx("option",{value:is.Bjsubway,disabled:ee,children:y(`header.settings.preference.randomStationNames.${is.Bjsubway}`)})]})]})]})]}),t.jsxs(u,{width:"100%",mb:"3",children:[t.jsx(h,{as:"b",fontSize:"xl",children:y("header.settings.procedures.title")}),t.jsxs(u,{mt:"3",children:[t.jsx(b,{sx:Qt,rightIcon:t.jsx(as,{}),onClick:()=>O(!0),children:y("header.settings.procedures.translate.title")}),t.jsx(Kt,{isOpen:S,onClose:()=>O(!1)}),t.jsx(b,{sx:Qt,rightIcon:t.jsx(as,{}),onClick:()=>_(!0),children:y("header.settings.procedures.scale.title")}),t.jsx(Dt,{isOpen:M,onClose:()=>_(!1)}),t.jsxs(b,{sx:Qt,rightIcon:t.jsx(as,{}),onClick:()=>N(!0),children:[y("header.settings.procedures.changeType.title"),t.jsx(Z,{label:y("header.settings.pro"),children:t.jsx(A,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",mr:"auto",children:"PRO"})})]}),t.jsx(Ls,{isOpen:E,onClose:()=>N(!1),isSelect:!1}),t.jsx(b,{sx:Qt,rightIcon:t.jsx(as,{}),onClick:()=>R(!0),children:y("header.settings.procedures.removeLines.title")}),t.jsx(Ut,{isOpen:H,onClose:()=>R(!1)}),t.jsx(b,{sx:Qt,rightIcon:t.jsx(as,{}),onClick:()=>T(!0),children:y("header.settings.procedures.updateColor.title")}),t.jsx(Vt,{isOpen:W,onClose:()=>T(!1)}),t.jsxs(b,{sx:Qt,rightIcon:t.jsx(as,{}),onClick:()=>L(!0),children:[y("header.settings.procedures.unlockSimplePath.title"),t.jsx(Z,{label:y("header.settings.pro"),children:t.jsx(A,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",mr:"auto",children:"PRO"})})]}),t.jsx(Yt,{isOpen:P,onClose:()=>L(!1)}),t.jsx(b,{sx:Qt,rightIcon:t.jsx(as,{}),onClick:()=>B(!0),children:y("header.settings.procedures.masterManager.title")}),t.jsx(Ps,{isOpen:I,onClose:()=>B(!1)})]})]}),t.jsxs(u,{width:"100%",mb:"3",children:[t.jsx(h,{as:"b",fontSize:"xl",children:y("header.settings.shortcuts.title")}),t.jsx(u,{mt:"3",children:t.jsxs(K,{children:[t.jsx(Y,{children:t.jsxs(V,{children:[t.jsx(F,{children:y("header.settings.shortcuts.keys")}),t.jsx(F,{children:y("header.settings.shortcuts.description")})]})}),t.jsxs(J,{children:[t.jsxs(V,{children:[t.jsx(q,{children:t.jsx(X,{children:"f"})}),t.jsx(q,{children:y("header.settings.shortcuts.f")})]}),t.jsxs(V,{children:[t.jsx(q,{children:t.jsx(X,{children:"s"})}),t.jsx(q,{children:y("header.settings.shortcuts.s")})]}),t.jsxs(V,{children:[t.jsx(q,{children:t.jsxs(u,{display:"flex",flexDirection:"row",children:[t.jsx(os,{}),t.jsx(ls,{}),t.jsx(cs,{}),t.jsx(ds,{})]})}),t.jsx(q,{children:y("header.settings.shortcuts.arrows")})]}),t.jsxs(V,{children:[t.jsx(q,{children:t.jsxs(u,{display:"flex",flexDirection:"row",children:[t.jsx(X,{children:"i"}),t.jsx(X,{children:"j"}),t.jsx(X,{children:"k"}),t.jsx(X,{children:"l"})]})}),t.jsx(q,{children:y("header.settings.shortcuts.ijkl")})]}),t.jsxs(V,{children:[t.jsx(q,{children:hs?t.jsx(X,{sx:$t,children:"⇧"}):t.jsx(X,{children:"shift"})}),t.jsx(q,{children:y("header.settings.shortcuts.shift")})]}),t.jsxs(V,{children:[t.jsx(q,{children:hs?t.jsx(X,{sx:$t,children:"⌥"}):t.jsx(X,{children:"alt"})}),t.jsx(q,{children:y("header.settings.shortcuts.alt")})]}),t.jsxs(V,{children:[t.jsx(q,{children:hs?t.jsx(X,{sx:$t,children:"⌫"}):t.jsx(X,{children:"delete"})}),t.jsx(q,{children:y("header.settings.shortcuts.delete")})]}),t.jsxs(V,{children:[t.jsxs(q,{children:[hs?t.jsx(X,{sx:$t,children:"⌘"}):t.jsx(X,{children:"ctrl"})," + ",t.jsx(X,{children:"x"})]}),t.jsx(q,{children:y("header.settings.shortcuts.cut")})]}),t.jsxs(V,{children:[t.jsxs(q,{children:[hs?t.jsx(X,{sx:$t,children:"⌘"}):t.jsx(X,{children:"ctrl"})," + ",t.jsx(X,{children:"c"})]}),t.jsx(q,{children:y("header.settings.shortcuts.copy")})]}),t.jsxs(V,{children:[t.jsxs(q,{children:[hs?t.jsx(X,{sx:$t,children:"⌘"}):t.jsx(X,{children:"ctrl"})," + ",t.jsx(X,{children:"v"})]}),t.jsx(q,{children:y("header.settings.shortcuts.paste")})]}),t.jsxs(V,{children:[t.jsxs(q,{children:[hs?t.jsx(X,{sx:$t,children:"⌘"}):t.jsx(X,{children:"ctrl"})," + ",t.jsx(X,{children:"z"})]}),t.jsx(q,{children:y("header.settings.shortcuts.undo")})]}),t.jsxs(V,{children:[t.jsx(q,{children:hs?t.jsxs(t.Fragment,{children:[t.jsx(X,{sx:$t,children:"⇧"})," + ",t.jsx(X,{sx:$t,children:"⌘"})," + ",t.jsx(X,{children:"z"})]}):t.jsxs(t.Fragment,{children:[t.jsx(X,{children:"ctrl"})," + ",t.jsx(X,{children:"y"})]})}),t.jsx(q,{children:y("header.settings.shortcuts.redo")})]})]})]})})]}),t.jsxs(u,{width:"100%",mb:"3",children:[t.jsx(h,{as:"b",fontSize:"xl",children:y("header.settings.telemetry.title")}),t.jsxs(u,{mt:"3",children:[t.jsx(h,{fontSize:"sm",lineHeight:"100%",color:"gray.600",children:y("header.settings.telemetry.info")}),t.jsxs(u,{mt:"3",mb:"1",children:[t.jsxs(u,{display:"flex",mb:"1",children:[t.jsx(h,{flex:"1",children:y("header.settings.telemetry.essential")}),t.jsx(Z,{label:y("header.settings.telemetry.essentialTooltip"),children:t.jsx(U,{isChecked:Q,isDisabled:!0})})]}),t.jsx(h,{fontSize:"sm",lineHeight:"100%",color:"gray.600",children:y("header.settings.telemetry.essentialInfo")}),t.jsxs(z,{color:v,fontSize:"sm",lineHeight:"100%",href:"https://support.google.com/analytics/answer/11593727",isExternal:!0,children:[y("header.settings.telemetry.essentialLink")," ",t.jsx(C,{as:he})]})]}),t.jsxs(u,{mt:"1",mb:"1",children:[t.jsxs(u,{display:"flex",children:[t.jsx(h,{flex:"1",children:y("header.settings.telemetry.additional")}),t.jsx(U,{isChecked:x,onChange:({target:{checked:e}})=>{w(us(e))}})]}),t.jsx(h,{fontSize:"sm",lineHeight:"100%",color:"gray.600",children:y("header.settings.telemetry.additionalInfo")})]})]})]})]})})]})]})},sn=()=>{const[e,s]=Ms.useState(!1),{svgViewBoxZoom:n}=xe((e=>e.param)),r=ue(),i=[{type:"slider",label:"",value:400-n,min:10,max:390,step:1,onChange:e=>r(He(400-e)),leftIcon:t.jsx(gs,{}),rightIcon:t.jsx(ps,{}),minW:160}];return t.jsxs(P,{isOpen:e,onOpen:()=>s(!0),onClose:()=>s(!1),children:[t.jsx(L,{children:t.jsx(_,{"aria-label":"zoom",variant:"ghost",size:"sm",icon:t.jsx(ps,{}),onClick:()=>s(!e)})}),t.jsx(I,{children:t.jsx(B,{children:t.jsx(fe,{fields:i,noLabel:!0})})})]})};function tn(){const{t:e}=Os(),n=ue(),{past:r,future:i}=xe((e=>e.param)),a=ne.isAllowAnalytics(),[o,l]=Ms.useState(!1),[c,d]=Ms.useState(!1),h=s(ne.getEnv),u=s(ne.getAppVersion);return Ms.useEffect((()=>{a&&h!==ms.DEV&&ne.event(be.APP_LOAD,{isStandaloneWindow:ne.isStandaloneWindow()})}),[h]),t.jsxs(js,{children:[t.jsx(x,{as:"h4",size:"md",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",children:e("header.about.rmp")}),t.jsx(fs,{environment:h,version:u,popoverHeader:h===ms.PRD?void 0:t.jsxs(Es,{i18nKey:"header.popoverHeader",environment:h,children:["You're on ",{environment:h}," environment!"]}),popoverBody:h===ms.PRD?void 0:t.jsx(Es,{i18nKey:"header.popoverBody",children:"This is a testing environment where we test the latest beta RMP."})}),t.jsxs(Q,{ml:"auto",children:[t.jsx($,{children:t.jsx(Gt,{})}),t.jsx($,{children:t.jsx(_,{size:"sm",variant:"ghost","aria-label":"Undo",icon:t.jsx(bs,{}),isDisabled:0===r.length,onClick:()=>{n(zs()),n(Oe()),n(Me())}})}),t.jsx($,{children:t.jsx(_,{size:"sm",variant:"ghost","aria-label":"Redo",icon:t.jsx(ws,{}),isDisabled:0===i.length,onClick:()=>{n(Cs()),n(Oe()),n(Me())}})}),t.jsx($,{children:t.jsx(sn,{})}),t.jsx($,{children:t.jsx(Bt,{})}),t.jsx($,{children:t.jsx(Nt,{})}),ne.isStandaloneWindow()&&t.jsx($,{children:t.jsxs(O,{children:[t.jsx(M,{as:_,icon:t.jsx(ys,{}),variant:"ghost",size:"sm"}),t.jsx(E,{children:["en","zh-Hans","zh-Hant","ja","ko"].map((e=>t.jsx(N,{onClick:()=>{return s=e,void ne.getI18nInstance().changeLanguage(s);var s},children:Is[e][e]},e)))})]})}),t.jsx($,{children:t.jsx(_,{size:"sm",variant:"ghost","aria-label":"Settings",icon:t.jsx(vs,{}),onClick:()=>l(!0)})}),t.jsx($,{children:t.jsx(_,{size:"sm",variant:"ghost","aria-label":"Help",icon:t.jsx(Ss,{}),onClick:()=>d(!0)})})]}),t.jsx(en,{isOpen:o,onClose:()=>l(!1)}),t.jsx(Bs,{isOpen:c,onClose:()=>d(!1)})]})}function nn(){const e=ue(),s=xe((e=>e.runtime.globalAlerts));return t.jsx(t.Fragment,{children:Object.entries(s).map((([s,{message:n,url:r,linkedApp:i}])=>t.jsxs(ee,{status:s,variant:"solid",size:"xs",pl:3,pr:1,py:0,zIndex:"1",children:[t.jsx(se,{}),i?t.jsx(z,{onClick:()=>(e=>{ne.isStandaloneWindow()?window.open(`/${e}`,"_blank"):ne.openApp({appId:e})})(i),children:n}):r?t.jsx(z,{href:r,target:"_blank",children:n}):n,t.jsx(T,{ml:"auto",onClick:()=>e(ks(s))})]},s)))})}}}})); diff --git a/assets/page-header-legacy-DbtpRsfW.js b/assets/page-header-legacy-DbtpRsfW.js new file mode 100644 index 00000000..e65d193b --- /dev/null +++ b/assets/page-header-legacy-DbtpRsfW.js @@ -0,0 +1,9 @@ +!function(){const e=["onError","onSuccess"],s=["version"],t=["version"];function n(e,s){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);s&&(n=n.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),t.push.apply(t,n)}return t}function r(e){for(var s=1;s{o=e.j,l=e.ag,c=e.M,d=e.ah,h=e.J,u=e.K,p=e.L,x=e.h,g=e.ai,m=e.N,j=e.B,f=e.aj,b=e.ak,w=e.T,y=e.al,v=e.b,S=e.q,z=e.t,C=e.O,k=e.am,O=e.an,M=e.ao,E=e.R,_=e.ap,N=e.Q,A=e.aq,H=e.ar,R=e.a2,W=e.as,P=e.at,T=e.x,L=e.au,I=e.av,B=e.aw,Z=e.a8,D=e.e,G=e.w,U=e.m,K=e.E,Y=e.ax,V=e.a7,F=e.a1,q=e.ay,J=e.az,X=e.aA,Q=e.aB,$=e.aC,ee=e.aD,se=e.aE,te=e.aF,ne=e.k,re=e.W,ie=e.U,ae=e.V},e=>{oe=e.u,le=e.r,ce=e.C,de=e.M,he=e.L,ue=e.n,pe=e.S,xe=e.R,ge=e.a,me=e.b,je=e.c,fe=e.d,be=e.e,we=e.f,ye=e.g,ve=e.h,Se=e.i,ze=e.E,Ce=e.s,ke=e.j,Oe=e.k,Me=e.m,Ee=e.l,_e=e.o,Ne=e.p,Ae=e.q,He=e.t,Re=e.v,We=e.w,Pe=e.x,Te=e.y,Le=e.z,Ie=e.A,Be=e.B,Ze=e.D,De=e.F,Ge=e.G,Ue=e.H,Ke=e.I,Ye=e.J,Ve=e.K,Fe=e.N,qe=e.O,Je=e.P,Xe=e.Q,Qe=e.T,$e=e.U,es=e.V,ss=e.W,ts=e.X,ns=e.Y,rs=e.Z,is=e._,as=e.$,os=e.a0,ls=e.a1,cs=e.a2,ds=e.a3,hs=e.a4,us=e.a5,ps=e.a6,xs=e.a7,gs=e.a8,ms=e.a9,js=e.aa,fs=e.ab,bs=e.ac,ws=e.ad,ys=e.ae,vs=e.af,Ss=e.ag,zs=e.ah,Cs=e.ai,ks=e.aj,Os=e.ak,Ms=e.al,Es=e.am,_s=e.an,Ns=e.ao},e=>{As=e.u,Hs=e.b,Rs=e.a,Ws=e.T},e=>{Ps=e.d,Ts=e.m,Ls=e.a,Is=e.i,Bs=e.s,Zs=e.u,Ds=e.M},e=>{Gs=e.C}],execute:function(){n("default",(function(){return o.jsxs(o.Fragment,{children:[o.jsx(ln,{}),o.jsx(cn,{})]})}));var i=function(e){return oe(le.ready(),e)},Us={ar:{ar:"العربية",en:"Arabic",ko:"아랍어","zh-Hans":"阿拉伯文","zh-Hant":"阿拉伯文"},az:{az:"Azərbaycanca",en:"Azerbaijani",ko:"아제르바이잔어","zh-Hans":"阿塞拜疆文","zh-Hant":"阿塞拜疆文"},ca:{ca:"Català",en:"Catalan",ko:"카탈루냐어","zh-Hans":"加泰罗尼亚文","zh-Hant":"加泰隆尼亞文"},da:{da:"Dansk",en:"Danish",ko:"덴마크어","zh-Hans":"丹麦文","zh-Hant":"丹麥文"},de:{de:"Deutsch",en:"German",ko:"독일어","zh-Hans":"德文","zh-Hant":"德文"},el:{el:"Ελληνικά",en:"Greek",ko:"그리스어","zh-Hans":"希腊文","zh-Hant":"希臘文"},en:{en:"English",ja:"英語",ko:"영어","zh-Hans":"英文","zh-Hant":"英文"},es:{en:"Spanish",es:"Español",ko:"스페인어","zh-Hans":"西班牙文","zh-Hant":"西班牙文"},fa:{en:"Persian",fa:"فارسی",ko:"페르시아어","zh-Hans":"波斯文","zh-Hant":"波斯文"},fr:{en:"French",fr:"Français",ko:"프랑스어","zh-Hans":"法文","zh-Hant":"法文"},ga:{en:"Irish",ga:"Gaeilge",ko:"아일랜드어","zh-Hans":"爱尔兰文","zh-Hant":"愛爾蘭文"},gd:{en:"Scottish Gaelic",gd:"Gàidhlig",ko:"스코틀랜드 게일어","zh-Hans":"苏格兰盖尔文","zh-Hant":"蘇格蘭蓋爾文"},hi:{en:"Hindi",hi:"हिन्दी",ko:"힌디어","zh-Hans":"印地文","zh-Hant":"印地文"},hu:{en:"Hungarian",hu:"Magyar",ko:"헝가리어","zh-Hans":"匈牙利文","zh-Hant":"匈牙利文"},id:{en:"Indoesian",id:"Bahasa Indonesia",ko:"인도네시아어","zh-Hans":"印尼文","zh-Hant":"印尼文"},it:{en:"Italian",it:"Italiano",ko:"이탈리아어","zh-Hans":"意大利文","zh-Hant":"意大利文"},ja:{en:"Japanese",ja:"日本語",ko:"일본어","zh-Hans":"日文","zh-Hant":"日文"},kk:{en:"Kazakh",kk:"Қазақша",ko:"카자흐어","zh-Hans":"哈萨克文","zh-Hant":"哈薩克文"},ko:{en:"Korean",ja:"韓国語",ko:"한국어","zh-Hans":"韩文","zh-Hant":"韓文"},ms:{en:"Malay",ko:"말레이어",ms:"Bahasa Melayu","zh-Hans":"马来文","zh-Hant":"馬來文"},no:{en:"Norwegian",ko:"노르웨이어",no:"Norsk","zh-Hans":"挪威文","zh-Hant":"挪威文"},pl:{en:"Polish",ko:"폴란드어",pl:"Polski","zh-Hans":"波兰文","zh-Hant":"波蘭文"},pt:{en:"Portuguese",ko:"포르투갈어",pt:"Português","zh-Hans":"葡萄牙文","zh-Hant":"葡萄牙文"},ro:{en:"Romanian",ko:"루마니아어",ro:"Română","zh-Hans":"罗马尼亚文","zh-Hant":"羅馬尼亞文"},ru:{en:"Russian",ko:"러시아어",ru:"Русский","zh-Hans":"俄文","zh-Hant":"俄文"},sv:{en:"Swedish",ko:"스웨덴어",sv:"Svenska","zh-Hans":"瑞典文","zh-Hant":"瑞典文"},th:{en:"Thai",ko:"태국어",th:"ภาษาไทย","zh-Hans":"泰文","zh-Hant":"泰文"},tr:{en:"Turkish",ko:"튀르키예어",tr:"Türkçe","zh-Hans":"土耳其文","zh-Hant":"土耳其文"},uk:{en:"Ukrainian",ko:"우크라이나어",uk:"Українська","zh-Hans":"乌克兰文","zh-Hant":"烏克蘭文"},ur:{en:"Urdo",ko:"우르두어",ur:"اردو","zh-Hans":"乌尔都文","zh-Hant":"烏爾都文"},uz:{en:"Uzbek",ko:"우즈베크어",uz:"Oʻzbekcha","zh-Hans":"乌兹别克文","zh-Hant":"烏茲別克文"},vi:{en:"Vietnamese",ko:"베트남어",vi:"Tiếng Việt","zh-Hans":"越南文","zh-Hant":"越南文"},zh:{en:"Chinese",ja:"中国語",ko:"중국어",zh:"中文","zh-Hans":"中文","zh-Hant":"中文"},"zh-Hans":{en:"Simplified Chinese",ja:"中国語(簡体字)",ko:"중국어 간체자","zh-Hans":"简体中文","zh-Hant":"簡體中文"},"zh-Hant":{en:"Traditional Chinese",ja:"中国語(繁体字)",ko:"중국어 정체자","zh-Hans":"繁体中文","zh-Hant":"繁體中文"}};const Ks=e=>{const{isOpen:s,onClose:t}=e,{t:n}=As(),r=le.getAppVersion();return o.jsxs(l,{isOpen:s,onClose:t,size:"xl",scrollBehavior:"inside",children:[o.jsx(c,{}),o.jsxs(d,{children:[o.jsx(h,{children:n("header.about.title")}),o.jsx(u,{}),o.jsxs(p,{paddingBottom:10,children:[o.jsxs(x,{direction:"row",children:[o.jsx(g,{boxSize:"128px",src:"/rmp//logo192.png"}),o.jsxs(x,{direction:"column",width:"100%",alignItems:"center",justifyContent:"center",children:[o.jsx(m,{fontSize:"xl",as:"b",children:n("header.about.rmp")}),o.jsx(m,{children:r}),o.jsx(m,{}),o.jsx(m,{fontSize:"sm",children:n("header.about.railmapgen")})]})]}),o.jsx(j,{margin:5,children:o.jsx(m,{fontSize:"xl",children:n("header.about.desc")})}),o.jsx(f,{as:"h5",size:"sm",mt:3,mb:2,children:n("header.about.contributors")}),o.jsx(f,{as:"h6",size:"xs",my:2,children:n("header.about.coreContributors")}),o.jsxs(b,{children:[o.jsxs(w,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/thekingofcity","_blank"),cursor:"pointer",children:[o.jsx(y,{src:"https://github.com/thekingofcity.png",size:"lg",my:2,ml:-1,mr:2}),o.jsxs(v,{display:"block",width:"100%",children:[o.jsx(m,{fontSize:"lg",fontWeight:"bold",mb:1,children:"thekingofcity"}),o.jsx(m,{fontSize:"sm",children:n("header.about.content1")}),o.jsx(m,{fontSize:"sm",align:"right",mb:1,children:n("header.about.content2")})]})]}),o.jsxs(w,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/langonginc","_blank"),cursor:"pointer",children:[o.jsx(y,{src:"https://github.com/langonginc.png",size:"lg",my:2,ml:-1,mr:2}),o.jsxs(v,{display:"block",width:"100%",children:[o.jsx(m,{fontSize:"lg",fontWeight:"bold",mb:1,children:"langonginc"}),o.jsx(m,{fontSize:"sm",children:n("header.about.langonginc")}),o.jsx(m,{fontSize:"sm",align:"right",mb:1,children:"--Avicii"})]})]})]}),o.jsx(f,{as:"h6",size:"xs",my:2,children:n("header.about.styleContributors")}),o.jsxs(b,{children:[o.jsxs(w,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/203IhzElttil","_blank"),cursor:"pointer",children:[o.jsx(y,{src:"https://github.com/203IhzElttil.png",size:"lg",my:2,ml:-1,mr:2}),o.jsxs(v,{display:"block",width:"100%",children:[o.jsx(m,{fontSize:"lg",fontWeight:"bold",mb:1,children:"203IhzElttil"}),o.jsx(m,{fontSize:"sm",mb:1,children:n("header.about.203IhzElttil")})]})]}),o.jsxs(w,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/Swiftiecott","_blank"),cursor:"pointer",children:[o.jsx(y,{src:"https://github.com/Swiftiecott.png",size:"lg",my:2,ml:-1,mr:2}),o.jsxs(v,{display:"block",width:"100%",children:[o.jsx(m,{fontSize:"lg",fontWeight:"bold",mb:1,children:"Swiftiecott"}),o.jsx(m,{fontSize:"sm",mb:1,children:n("header.about.Swiftiecott")})]})]}),o.jsxs(w,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/Minwtraft","_blank"),cursor:"pointer",children:[o.jsx(y,{src:"https://github.com/Minwtraft.png",size:"lg",my:2,ml:-1,mr:2}),o.jsxs(v,{display:"block",width:"100%",children:[o.jsx(m,{fontSize:"lg",fontWeight:"bold",mb:1,children:"Minwtraft"}),o.jsx(m,{fontSize:"sm",mb:1,children:n("header.about.Minwtraft")})]})]})]}),o.jsx(f,{as:"h5",size:"sm",mt:3,mb:2,children:n("header.about.contactUs")}),o.jsxs(b,{children:[o.jsxs(w,{size:"lg",w:"85%",onClick:()=>window.open("https://github.com/railmapgen/rmp/issues","_blank"),cursor:"pointer",children:[o.jsx(y,{src:"data:image/svg+xml,%3csvg%20width='98'%20height='96'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M48.854%200C21.839%200%200%2022%200%2049.217c0%2021.756%2013.993%2040.172%2033.405%2046.69%202.427.49%203.316-1.059%203.316-2.362%200-1.141-.08-5.052-.08-9.127-13.59%202.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015%204.934.326%207.523%205.052%207.523%205.052%204.367%207.496%2011.404%205.378%2014.235%204.074.404-3.178%201.699-5.378%203.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283%200-5.378%201.94-9.778%205.014-13.2-.485-1.222-2.184-6.275.486-13.038%200%200%204.125-1.304%2013.426%205.052a46.97%2046.97%200%200%201%2012.214-1.63c4.125%200%208.33.571%2012.213%201.63%209.302-6.356%2013.427-5.052%2013.427-5.052%202.67%206.763.97%2011.816.485%2013.038%203.155%203.422%205.015%207.822%205.015%2013.2%200%2018.905-11.404%2023.06-22.324%2024.283%201.78%201.548%203.316%204.481%203.316%209.126%200%206.6-.08%2011.897-.08%2013.526%200%201.304.89%202.853%203.316%202.364%2019.412-6.52%2033.405-24.935%2033.405-46.691C97.707%2022%2075.788%200%2048.854%200z'%20fill='%2324292f'/%3e%3c/svg%3e",size:"lg",my:2,ml:-1,mr:2}),o.jsxs(v,{display:"block",width:"100%",children:[o.jsx(m,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.about.github")}),o.jsx(m,{fontSize:"sm",children:n("header.about.githubContent")})]})]}),o.jsxs(w,{size:"lg",w:"85%",onClick:()=>window.open("https://join.slack.com/t/railmapgenerator/shared_invite/zt-1odhhta3n-DdZF~fnVwo_q0S0RJmgV8A","_blank"),cursor:"pointer",children:[o.jsx(y,{src:"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2023.0.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20270%20270'%20style='enable-background:new%200%200%20270%20270;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23E01E5A;}%20.st1{fill:%2336C5F0;}%20.st2{fill:%232EB67D;}%20.st3{fill:%23ECB22E;}%20%3c/style%3e%3cg%3e%3cg%3e%3cpath%20class='st0'%20d='M99.4,151.2c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h12.9V151.2z'/%3e%3cpath%20class='st0'%20d='M105.9,151.2c0-7.1,5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v32.3c0,7.1-5.8,12.9-12.9,12.9%20s-12.9-5.8-12.9-12.9V151.2z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st1'%20d='M118.8,99.4c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9s12.9,5.8,12.9,12.9v12.9H118.8z'/%3e%3cpath%20class='st1'%20d='M118.8,105.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9H86.5c-7.1,0-12.9-5.8-12.9-12.9%20s5.8-12.9,12.9-12.9H118.8z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st2'%20d='M170.6,118.8c0-7.1,5.8-12.9,12.9-12.9c7.1,0,12.9,5.8,12.9,12.9s-5.8,12.9-12.9,12.9h-12.9V118.8z'/%3e%3cpath%20class='st2'%20d='M164.1,118.8c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9V86.5c0-7.1,5.8-12.9,12.9-12.9%20c7.1,0,12.9,5.8,12.9,12.9V118.8z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st3'%20d='M151.2,170.6c7.1,0,12.9,5.8,12.9,12.9c0,7.1-5.8,12.9-12.9,12.9c-7.1,0-12.9-5.8-12.9-12.9v-12.9H151.2z'/%3e%3cpath%20class='st3'%20d='M151.2,164.1c-7.1,0-12.9-5.8-12.9-12.9c0-7.1,5.8-12.9,12.9-12.9h32.3c7.1,0,12.9,5.8,12.9,12.9%20c0,7.1-5.8,12.9-12.9,12.9H151.2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",size:"lg",my:2,ml:-1,mr:2}),o.jsxs(v,{display:"block",width:"100%",children:[o.jsx(m,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.about.slack")}),o.jsx(m,{fontSize:"sm",children:n("header.about.slackContent")}),o.jsx(m,{fontSize:"sm",as:"i",children:"#rmp, #gallery, #rmg, #palette-and-templates"})]})]})]}),o.jsx(f,{as:"h5",size:"sm",mt:3,mb:2,children:n("header.donation.title")}),o.jsxs(b,{children:[o.jsxs(w,{size:"lg",w:"85%",onClick:()=>window.open("https://afdian.com/a/rail-map-toolkit","_blank"),cursor:"pointer",children:[o.jsx(y,{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAC9FBMVEUAAACabOutif+ve/+FbLiVcuaQaOCWb+WYceiLYtuccOingvOYcOeRad6ZcuifeumXcOWhfO6jfPCmhPOUa+aLYtyac+iVbuSMZN2VbeWNZt6RaeGRauKhee2acumQauClfvGTa+OOZd6JYNqWb+Sog/SSauGPaOCogvSNZN2NZN2ngfKogvSngPOfeu6bdemTauSlfvGYcOiohPSngfKQaOCXb+aifO+XcOaVbuWTbOOogfOlf/GmgPKTbOOYceaMZN2pg/WQaN+hee2OZt6RaeCRauGKYtuSa9+bdOmog/SifO+ddumie+6Zcuelf/GSa+Ked+uYcealf/GSauGJYdqpg/SQaOCJYduOZd6jffCJX9qNZN6mgfKMZN2SauKfeOyKYtuXcOWpg/SngfOdduuJYNqQaN+WbuWUbeWmgfOLY9yUbOWlf/GZceeKYNqOaN6mgvKpgvSZceiMZNyVb+WNZt2cdumSauOfee2Wb+WPaN+geu2ddeqMZNypg/Wheu6lf/GZcueJYNmQaN+jffCTbOSphPWog/SWb+WmgPKWb+aYcuekf/Gac+iKYtuVbuWWbuSogvSSa+KWb+SOZt6ifO+feeyngfKRaeGpg/SYcOefeOujfe+VbeSMZd6ac+iJYdqVbeSog/OVbOWcdeqKYtungvObdOmfd+uSa+KNZNyeduuRaeGjfe+XcOWMY9ybdOmngvSOZt6UbuWacuiSbOKgee2bdOmMY9yVbuOmgvSUbeKviP6xif+UaueVa+mMY92ZcOyqhPaOZOKuh/2shPybcu2mf/WhePKcdO6ddeyYb+qZceirhPmpgfmedfCacuuWbuWogfemffefdfKacuqSaOaPZeSRaOKyiv+qg/iogvShd/SYbuyWbeiQZuWNZN+MYt+thvqlffSie/CXbeqTaOeKYdu1jP+jevOccvCbce6Xbeuth/uqgvukevinf/eiePaVau2WbOqXb+ahdvuUaumfdPehee+thP6bb/MemaUsAAAAvXRSTlMAAwEEAwb+/Qv6Cfv8IRAOXiwaFP7++9p3TkwvJSEeGf7++/r59+ri0MmCeFZCPjk3NDEk9PHi4NLIwq2djHp1bmNZUVBIPzwU/v38+fj49/bz6+rl5N7a0s7Hw8LAvq+opqSjlZOSiIBuaGRjYmJaVU1HREQ1KykW+/X19O7r6OXf29vV0c3Mxry4taupnpqZlZGRi4uGgXxzbWtjWlJG8/Px7ezk3dfQwbq4tp2Zh3t6cVxaVtrXz7GdcGlhNM13AAAH1ElEQVRYw+1YVVgbQRDezd2RkODu7pS6u7u7u7u7u7u7u7slkCZESUKCuxQoLVD3vnSPSyW9S6ClD33o/xHOdv6b2f1nZhPwH//xz4EFcRwi/CU2RKY/hayK0+EYdWhr6eGN6CrKCEk6qzZNtwxY0Wtxr8EtK8qIob+Zo/v6i7Ozk8U54jeFMwFeoaUAcMIA/2RxrjhZ6O9v7n/szWjA+nMXkWWbAbni3Nzk3BXDhvUSmpsnZ08BsCJ8E/yTC8XCXqPbzHbpa24u/ODoUpE5hGBKbm6h44ApELj1TRLnvMm50IYUDoQ4UiWGQJBAB/IfXuaLcDB3RXLhsdFbwtyHfXjiKDa/51aWIKBJmRJgilBYOLXpmyfm2ULznNCWsHTRWZDgWLX1tvRwr9p6ZquWU5sjtDwyy9LqW0axjEd8NTm7Lwj7UohWw9Hx9OCBoQMHDx44MLRfv5V9goMX11qwwM8MISUlxcysVtDK8zsmuhOkHW40ZJds8WkOMUyY9CQ7R5jyITIp6UmkHlFRUW8RCkpKSjIzM2MyMwsKYmKyuq4e05owSokBN0ehGC3rkS39FvulILIoPSIjfZFXfgtq1QoK6hkcHNwzqFZX35ji4pismGLf+g/bIlsWY8jc0CeO5jfQKWf2zOZNXcLG7Nq1a0xY2NV9TSfcmOp2pHVV99keHpZeXmg+W0/dt61+z6yiGJ1U6tyEg6wZXWyVkyMUhnHLm6aWh7c5a6U6raLuYdKaBpRjTZPEwshQUi5IbKVxsCgZYjRQLrW9uU4n1SlU962QYBlTxS/KL8nsghundBIIAofMFQ6SiqFIW63TJrIz6s5CNximEbQJjUryi0rpN6aVN/USjMAgi17hWHoZkiSTaycEJMy/xTSRLBxwXYJLIs0iM836DGnsZknoXcIxXJ8WLETnbeNOMeqvvTbKLbSJBxiXhhzustKhxME361GBWc/6l/a18uB89w2WumTjHFt7zo86CdFbxypVKsUBetR64Vu1vNTHLKsgqyDz0aMs36DVQ3aMc61qyaUmpfoGrSrx9WFA/Jy1YLJTYjulDWBKROqmVevGQ/p0dXiEEEN+fLsGrd7qygXWY+cr2FrpcA6Ahia3nNopnWYAjLnrUYOtZk3ccf72cZ20qKiY5E2Q1h9XL0P3LsHZ5tfpghDYKJ3kpzwBZrwvU2dzq9qMHV7f+WSAtIiti03QshMCdralTT+pwibPnOIvskxUeCQ04ttT69kzXHfOfxcQoIpdVwUtHaPkNsd3jL8G8LLKrte4nY1noGnnbmWz32V0PwCRUpiLi/XZZ8pu1QFmui1UdU5QKLS1m9jUTmArFBs9qNLCzFi5ozJ+qMkuhAOi3ssAaaxOoZCi/Ko9mZx+E014VN4n5CJhqi3MOa7S1a3HZltYSJXDLUk3TI5elB+/x9SGCANzl8cmbtj2jm2R0d2Gthj0cjU079U5DEBTvfpKLFulstDKN3jS3aO//2B+3lKkRVNREHVjLSwyOjdBEwrL7sTVFubNq2yCED2Z3F1l8bouqb3ybBW8lsryWwBonA9FnJiYMdyKWtyyPbSvI8s7BKBRPtbm1xZKVZPSelIuQrulr3yMeggB3Piys7y7K6llDC/X7sh24asOEVT2MSYn4ltuC6haDcuzXW2RH9fDFh2ZdX/ttZP8rBdyD/F5o/jL4eHuuBerrAHO/LZZnZWxy70AQTKNPTlkbhl1BEKk6P4aSUPmYBDJqJftjlYBBMnt7vDx/TiTwqH8r9JJFjeJeRwOrO/K5aNK8xICb+f3Dq4GA1m/9lZgd7kR3C3RLLMHXMaIUaLLlS3QkSpiW28alCVIZq5hGjd8KhlUJ12y3p756xIOKjvJj1YH8Ec8LMP4DOseIkztEifz8emybKQnumQgnNHu2SIkmW8zDg348Mb1Jv7isl3/p+k+6XFxaYIelRgYMVCl47OOVQDOLA/XovcOyH0DnzmNaqplXWQSXnTaJADphJ6nnuUfREdmwuKPBoQQWI/cZGsfUdk2YlMaj3+iBs0QAuJcfN5QNNuMEmEZhozMw58+7bHXljw/xEt/3gxg9ETZE/+pWzVaWWBeFByMT+epU3khjabVaFZTpKYTohu23fLjLwIjjCxDbSDzQfzA9qJoQfuaj3kCKmSayagX817tZmCkawZZT6qZns4TCdSP+aJUwX4AGavlHc082Z6yaj/VusJFoseBlaaP6B3YPnANKRvmxr1Q1kkz1A6dYkZLTWml9Gwg4Imej0eX9tUiqhHGej0E0zppOr2oc5BL2jF2W0h6Z319SWpgtGg8GvRjQ2ikJFau87mDTNN/vJ1+rw5Z3wEhTrIBu/0hAjXv6ZJpiB6ZYGiQqW/4nps0cR1exNW53MLu+034IxGtp4/szee35/Mb1ChXHyNjOLRKkybTSHyWNQifXoPz0zP7as0anuHxo0XR/JBKtD2UiU7KmdS/g0SSlqZW+/QIWd+wUfj1B+F7t48Y1DvwMf/5Y75AtKYZlxxYTpCBwIjtq7pI+BK1WhLN50cj8AUCRBYtSBX1HjENI0f99k85EXsbnKmZxhcgJgSBIDVVIFqydnslO0qIZYIuDlJjlcJHNhi0NiRkzdr1Ixrtn16Dq9f1HwD/bga5HGuOPh1pkv9NPw3FDXHyukKgRIhTH1Q9/uM//nl8BYlod8WjsBdLAAAAAElFTkSuQmCC",size:"lg",my:2,ml:-1,mr:2}),o.jsxs(v,{display:"block",width:"100%",pb:1,children:[o.jsx(m,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.donation.afdian")}),o.jsx(m,{fontSize:"sm",children:n("header.donation.viaCNY")})]})]}),o.jsxs(w,{size:"lg",w:"85%",onClick:()=>window.open("https://opencollective.com/rail-map-toolkit","_blank"),cursor:"pointer",children:[o.jsx(y,{src:"/rmp/assets/opencollective-icon-Ciasch0w.webp",size:"lg",my:2,ml:-1,mr:2}),o.jsxs(v,{display:"block",width:"100%",pb:1,children:[o.jsx(m,{fontSize:"lg",fontWeight:"bold",mb:1,children:n("header.donation.openCollective")}),o.jsx(m,{fontSize:"sm",children:n("header.donation.viaUSD")})]})]})]})]})]})]})}; +/*! + * canvas-size + * v2.0.0 + * https://github.com/jhildenbiddle/canvas-size + * (c) 2015-2024 John Hildenbiddle + * MIT license + */ +function Ys(e){const s=e.sizes.shift(),t=Math.max(Math.ceil(s[0]),1),n=Math.max(Math.ceil(s[1]),1),r=[t-1,n-1,1,1],i=performance.now(),a="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope;let o,l;a?(o=new OffscreenCanvas(1,1),l=new OffscreenCanvas(t,n)):(o=document.createElement("canvas"),o.width=1,o.height=1,l=document.createElement("canvas"),l.width=t,l.height=n);const c=o.getContext("2d"),d=l.getContext("2d");d&&(d.fillRect.apply(d,r),c.drawImage(l,t-1,n-1,1,1,0,0,1,1));const h=c&&0!==c.getImageData(0,0,1,1).data[3],u=parseInt(performance.now()-i);return[o,l].forEach((e=>{e.height=0,e.width=0})),a?(postMessage({width:t,height:n,testTime:u,isTestPass:h}),!h&&e.sizes.length&&setTimeout((()=>{Ys(e)}),0)):h?e.onSuccess({width:t,height:n,testTime:u}):(e.onError({width:t,height:n,testTime:u}),e.sizes.length&&setTimeout((()=>{Ys(e)}),0)),h}const Vs={area:[16384,14188,11402,11180,10836,8192,4096,1],height:[8388607,65535,32767,16384,8192,4096,1],width:[4194303,65535,32767,16384,8192,4096,1]},Fs={max:null,min:1,sizes:[],step:1024,useWorker:!1,onError:Function.prototype,onSuccess:Function.prototype},qs={};function Js(e){const s=e.width===e.height,t=1===e.height,n=1===e.width,r=[];if(e.width&&e.height){const i=e.min||Fs.min,a=e.step||Fs.step;let o=Math.max(e.width,e.height);for(;o>=i;){const e=s||t?o:1,i=s||n?o:1;r.push([e,i]),o-=a}}else e.sizes.forEach((e=>{const i=s||t?e:1,a=s||n?e:1;r.push([i,a])}));return r}function Xs(s){const t="undefined"!=typeof window,n=t&&"Promise"in window,i=t&&"HTMLCanvasElement"in window,o=t&&"OffscreenCanvas"in window,l=URL.createObjectURL(new Blob([])).slice(-36),c=performance.now(),{onError:d,onSuccess:h}=s,u=a(s,e),p=()=>parseInt(performance.now()-c);let x=null;if(!i)return!1;if(s.useWorker&&o){const e=`\n var canvasTest = ${Ys.toString()};\n onmessage = function(e) {\n canvasTest(e.data);\n };\n `,s=new Blob([e],{type:"application/javascript"}),t=URL.createObjectURL(s);x=new Worker(t),URL.revokeObjectURL(t),x.onmessage=function(e){const{width:s,height:t,testTime:n,isTestPass:r}=e.data,i={width:s,height:t,testTime:n,totalTime:p()};r?(qs[l].onSuccess(i),delete qs[l]):qs[l].onError(i)}}return n?new Promise((e=>{const t=r(r({},s),{},{onError(t){let{width:n,height:i,testTime:a}=t;const o={width:n,height:i,testTime:a,totalTime:p()};let l;if(0===s.sizes.length)l=!0;else{const[[e,t]]=s.sizes.slice(-1);l=n===e&&i===t}d(o),l&&e(r(r({},o),{},{success:!1}))},onSuccess(s){let{width:t,height:n,testTime:i}=s;const a={width:t,height:n,testTime:i,totalTime:p()};h(a),e(r(r({},a),{},{success:!0}))}});if(x){const{onError:e,onSuccess:s}=t;qs[l]={onError:e,onSuccess:s},x.postMessage(u)}else Ys(t)})):x?(qs[l]={onError:d,onSuccess:h},void x.postMessage(u)):Ys(s)}const Qs={maxArea(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=Js({width:e.max,height:e.max,min:e.min,step:e.step,sizes:[...Vs.area]});return Xs(r(r(r({},Fs),e),{},{sizes:s}))},maxHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=Js({width:1,height:e.max,min:e.min,step:e.step,sizes:[...Vs.height]});return Xs(r(r(r({},Fs),e),{},{sizes:s}))},maxWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=Js({width:e.max,height:1,min:e.min,step:e.step,sizes:[...Vs.width]});return Xs(r(r(r({},Fs),e),{},{sizes:s}))},test(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=r(r({},Fs),e);return s.sizes=[...s.sizes],s.width&&s.height&&(s.sizes=[[s.width,s.height]]),Xs(s)}};var $s=(e=>(e.left="l",e.right="r",e))($s||{}),et=(e=>(e.through="through",e.nonThrough="nonthrough",e))(et||{}),st=(e=>(e.local="local",e.express="express",e.direct="direct",e))(st||{}),tt=(e=>(e.MTR="mtr",e.GZMTR="gzmtr",e.SHMetro="shmetro",e))(tt||{}),nt=(e=>(e.sh="sh",e.sh2020="sh2020",e))(nt||{});const rt=new Set,it=new Set,at=new Set,ot=new Set,lt=new Map,ct=new Map,dt=new Set,ht=new Map,ut=new Map;let pt=[],xt=0;const gt=new Map,mt=new Map,jt=new Set,ft={localisedName:{en:"LEFT END"},num:"00",services:[st.local],parents:[],children:["lineend"],transfer:{groups:[{}],tick_direc:$s.right,paid_area:!0},loop_pivot:!1,one_line:!0,int_padding:355},bt={localisedName:{en:"RIGHT END"},num:"00",services:[st.local],parents:[],children:[],transfer:{groups:[{}],tick_direc:$s.right,paid_area:!0},loop_pivot:!1,one_line:!0,int_padding:355},wt={svgWidth:{destination:1500,runin:1500,railmap:1500,indoor:1500},svg_height:400,style:tt.SHMetro,y_pc:50,padding:10,branchSpacingPct:33,direction:$s.right,platform_num:"1",theme:[ce.Shanghai,"sh1","#E3002B",de.white],line_name:["地鐵線","Metro Line"],current_stn_idx:"jlaMj2",stn_list:{},namePosMTR:{isStagger:!0,isFlip:!0},customiseMTRDest:{isLegacy:!1,terminal:!1},line_num:"1",psd_num:"1",info_panel_type:nt.sh,direction_gz_x:40,direction_gz_y:70,coline:{},loop:!1,loop_info:{bank:!0,left_and_right_factor:0,bottom_factor:1}},yt={localisedName:{},num:"",services:[st.local],parents:[],children:[],transfer:{groups:[{}],tick_direc:$s.right,paid_area:!0},loop_pivot:!1,one_line:!0,int_padding:355},vt=e=>`${e[0]}/${e[1]}=${e[2]}${e[3]}`,St=e=>he.includes(e),zt=(e,s)=>{const[t,n]=e.extremities(s),r=e.getEdgeAttributes(s),i=r.style;if(t!=n&&St(i)){const e=(e=>{if(St(e.style))return structuredClone(e[e.style].color)})(r);ot.has(vt(e))||(at.add(e),ot.add(vt(e)),lt.set(e,t),ct.set(vt(e),new Set)),ct.get(vt(e)).add(t),ct.get(vt(e)).add(n),ut.has(t)?pt.push({target:n,next:ut.get(t),color:e}):pt.push({target:n,next:-1,color:e}),ut.set(t,xt),xt++,ut.has(n)?pt.push({target:t,next:ut.get(n),color:e}):pt.push({target:t,next:-1,color:e}),ut.set(n,xt),xt++}},Ct=(e,s,t)=>{if(ct.get(vt(t)).has(e)){ct.get(vt(t)).delete(e);for(let s=ut.get(e);-1!=s;s=pt[s].next){const n=pt[s].target,r=pt[s].color;vt(r)==vt(t)&&Ct(n,e,t)}}},kt=(e,s,t)=>{if(rt.has(e))return;rt.add(e);let n=0;const r=new Set;for(let i=ut.get(e);-1!=i;i=pt[i].next){const a=pt[i].target,o=pt[i].color;vt(o)==vt(t)&&(r.has(a)||(r.add(a),n++,a!=s&&kt(a,e,t)))}gt.set(e,n)},Ot=(e,s)=>{const t=e.stn_list.lineend.parents;t.push(s),e.stn_list.lineend.parents=structuredClone(t).reverse(),e.stn_list.lineend.branch=r(r({},e.stn_list.lineend.branch),{},{left:2==e.stn_list.lineend.parents.length?[et.through,t[1]]:void 0})},Mt=(e,s,t)=>{if(jt.has(e))return[];jt.add(e);const n=[];for(let r=ut.get(e);-1!=r;r=pt[r].next){const i=pt[r].target,a=pt[r].color;i!=s&&(vt(a)==vt(t)&&(i.startsWith("stn")?n.push(i):n.push(...Mt(i,e,t))))}return n},Et=(e,s,t,n,i,a,o)=>{if(rt.has(e)&&(!e.startsWith("misc_node_")&&null==o.stn_list[e]||e.startsWith("misc_node_")&&!it.has(e)||o.loop))return[];if(rt.has(e)&&null!=o.stn_list[e]&&((e,s)=>{let t=0;for(let n=ut.get(e);-1!=n;n=pt[n].next){pt[n].target;const e=pt[n].color;vt(e)==vt(s)&&t++}return t})(e,a)-1>=2){var l;const t=[...o.stn_list[e].parents,s];if(null==o.stn_list[t[1]]){const e=t[0];t[0]=t[1],t[1]=e}o.stn_list[e].parents=structuredClone(t).reverse(),o.stn_list[e].branch=r(r({},o.stn_list[e].branch),{},{left:[et.through,t[1]]});const n=[];for(const r of o.stn_list[e].children)r!=s&&n.push(r);o.stn_list[e].children=structuredClone(n),null===(l=o.stn_list[e].branch)||void 0===l||delete l.right;const i=[];for(const s of o.stn_list.lineend.parents)s!=e&&i.push(s);return o.stn_list.lineend.parents=structuredClone(i).reverse(),o.stn_list.lineend.branch=r(r({},o.stn_list.lineend.branch),{},{left:2==o.stn_list.lineend.parents.length?[et.through,i[1]]:void 0}),0==n.length&&(o.stn_list[e].children=["lineend"],Ot(o,e)),[e]}rt.add(e);const c=[],d=[],h=[],u=new Set,p=new Set;for(let r=ut.get(e);-1!=r;r=pt[r].next){const l=pt[r].target,d=pt[r].color;if(l!=t){if(vt(d)==vt(a)){if(p.has(l))continue;if(p.add(l),e.startsWith("misc_node_")){const t=Et(l,s,e,n+1,i,a,o);0!=t.length&&c.push(...t)}else{const s=Et(l,e,e,n+1,i,a,o);0!=s.length&&c.push(...s)}}if(!u.has(vt(d))&&vt(d)!=vt(a)){u.add(vt(d));const e={theme:d,name:[`ch_${vt(d)}`,`en_${vt(d)}`]};h.push(e)}}}if(2==c.length){for(let e=0;e<2;e++)"lineend"==c[e]&&c.splice(e,1);if(o.stn_list[c[1]].parents.length>=2){const e=c[0];c[0]=c[1],c[1]=e}}if(rt.has(e)&&null!=o.stn_list[e]){const t=[];for(const s of o.stn_list.lineend.parents)s!=e&&t.push(s);o.stn_list.lineend.parents=structuredClone(t).reverse(),o.stn_list.lineend.branch=r(r({},o.stn_list.lineend.branch),{},{left:2==o.stn_list.lineend.parents.length?[et.through,t[1]]:void 0}),0==c.length&&(jt.clear(),d.push(...Mt(e,s,a)))}if(e.startsWith("misc_node_"))return it.add(e),c;{const t=i.getNodeAttributes(e).type,l=i.getNodeAttributes(e)[t];if(o.stn_list[e]=structuredClone(yt),o.stn_list[e].localisedName={zh:l.names[0],en:l.names[1]},o.stn_list[e].num=String(n),i.getNodeAttributes(e).type==pe.GzmtrBasic){const s=l;o.stn_list[e].num=s.stationCode,""===s.secondaryNames[0]&&""===s.secondaryNames[1]||(o.stn_list[e].localisedSecondaryName={zh:s.secondaryNames[0],en:s.secondaryNames[1]})}if(i.getNodeAttributes(e).type==pe.GzmtrInt){const s=l,t=s.transfer[0];for(const n of t)if(vt(n)==vt(a)){o.stn_list[e].num=String(n[5]);break}""===s.secondaryNames[0]&&""===s.secondaryNames[1]||(o.stn_list[e].localisedSecondaryName={zh:s.secondaryNames[0],en:s.secondaryNames[1]})}return 0!=c.length?(o.stn_list[e].children=structuredClone(c).reverse(),2==c.length&&(o.stn_list[e].branch=r(r({},o.stn_list[e].branch),{},{right:[et.through,c[1]]}))):(o.stn_list[e].children=["lineend"],Ot(o,e)),d.push(s),o.stn_list[e].parents=structuredClone(d).reverse(),2==d.length&&(o.stn_list[e].branch=r(r({},o.stn_list[e].branch),{},{left:[et.through,d[1]]})),0!=h.length&&(o.stn_list[e].transfer.groups[0].lines=structuredClone(h)),[e]}},_t=(e,s,t,n)=>{const r=structuredClone(wt);let i;switch("LOOP"==n&&(r.loop=!0),e.getNodeAttributes(t).type){case pe.GzmtrBasic:case pe.GzmtrInt:i=tt.GZMTR;break;case pe.MTR:i=tt.MTR;break;default:i=tt.SHMetro}r.theme=structuredClone(s),r.style=i,r.stn_list.linestart=structuredClone(ft),r.stn_list.lineend=structuredClone(bt),rt.clear(),it.clear();const a=Et(t,"linestart","linestart",1,e,s,r);return r.current_stn_idx=a[0],r.stn_list.linestart.children=[a[0]],Object.keys(r.stn_list).length<=3||r.stn_list.lineend.parents.length>=3?void 0:structuredClone(r)},Nt=(e,s,t,n)=>{var r;e.line_name=s,e.line_num=String(t),Ps(`RMG_${r=s,""!=r[0]&&""!=r[1]?r[0]+"_"+r[1]:""!=r[0]?r[0]:""!=r[1]?r[1]:`${(new Date).valueOf()}`}.json`,"application/json",((e,s)=>{let t=e;return s.forEach(((e,s)=>{const n=new RegExp(`ch_${s}`,"g"),r=new RegExp(`en_${s}`,"g");t=t.replace(n,e[0]),t=t.replace(r,e[1])})),t})(JSON.stringify(e),n))},At={LINE:"#33ccff",BRANCH:"#007B61",LOOP:"#ff6666"},Ht=e=>{const{isOpen:s,onClose:t}=e,{t:n}=As(),r=Hs.useRef(window.graph),[i,a]=Hs.useState(!1),[x,g]=Hs.useState([[wt,"",""]]),[j,f]=Hs.useState(["","",""]),[b,w]=Hs.useState(new Map),[y,v]=Hs.useState(new Map),[k,O]=Hs.useState([]);Hs.useEffect((()=>{if(s){const e=(e=>{rt.clear(),at.clear(),ot.clear(),lt.clear(),ct.clear(),dt.clear(),ht.clear(),ut.clear(),pt=[],xt=0,gt.clear(),mt.clear(),e.filterEdges((e=>e.startsWith("line"))).forEach((s=>{St(e.getEdgeAttributes(s).style)&&zt(e,s)}));let s=0;e.forEachNode((e=>{mt.set(e,++s)})),mt.set("lineend",++s);const t=[];for(const i of at){let e=0;for(;0!=ct.get(vt(i)).size;){let s="line_root";ct.get(vt(i)).forEach((e=>{"line_root"==s&&(s=e)})),Ct(s,"line_root",i);const t={theme:i,index:++e};dt.add(t),ht.set(t,s)}}for(const i of dt){const{theme:s}=i;rt.clear(),gt.clear(),kt(ht.get(i),"line_root",s);let a=!0,o="LINE";const l=[];for(const[e,t]of gt)1==t&&l.push(e),3==t&&(o="BRANCH"),t>3&&(a=!1);if(!a)continue;0==l.length&&(o="LOOP",l.push(lt.get(s)));const c=[];for(const t of l){const i=_t(e,s,t,o);var n,r;null!=i&&c.push([i,null!==(n=i.stn_list[i.current_stn_idx].localisedName.zh)&&void 0!==n?n:"",null!==(r=i.stn_list[i.current_stn_idx].localisedName.en)&&void 0!==r?r:""])}0!=c.length&&t.push({id:ue(10),theme:s,param:structuredClone(c),type:o})}return t})(r.current),s=new Map;e.forEach((({id:e,theme:t})=>{s.set(vt(t),e)})),O(e),w(s)}}),[s]);const M=(e,s)=>document.getElementById("2RMG_"+s+"_"+e).value.trim();return o.jsxs(l,{isOpen:s,onClose:t,size:"2xl",scrollBehavior:"inside",children:[o.jsx(c,{}),o.jsxs(d,{children:[o.jsx(h,{children:o.jsx(m,{as:"b",fontSize:"xl",children:n("header.download.2rmg.title")})}),o.jsx(u,{}),o.jsxs(p,{children:[o.jsx(m,{fontSize:"sm",mt:"3",lineHeight:"100%",children:n("header.download.2rmg.info1")}),o.jsx(m,{fontSize:"sm",mt:"3",lineHeight:"100%",children:n("header.download.2rmg.info2")}),o.jsx("br",{}),0===k.length?o.jsx(m,{fontSize:"md",children:n("header.download.2rmg.noline")}):o.jsx("table",{children:o.jsx("tbody",{children:k.map((({id:e,theme:s,param:t,type:r})=>o.jsxs("tr",{children:[o.jsx("td",{children:o.jsx(xe,{name:"other"==s[0]&&"other"==s[1]?s[2]:s[1],bg:s[2],fg:s[3]})}),o.jsx("td",{children:o.jsx(S,{placeholder:n("header.download.2rmg.placeholder.chinese"),id:`2RMG_nameCh_${e}`,size:"sm"})}),o.jsx("td",{children:o.jsx(S,{placeholder:n("header.download.2rmg.placeholder.english"),id:`2RMG_nameEn_${e}`,size:"sm"})}),o.jsx("td",{children:o.jsx(S,{placeholder:n("header.download.2rmg.placeholder.lineCode"),id:`2RMG_lineNum_${e}`,size:"sm"})}),o.jsx("td",{children:o.jsx(xe,{name:n(`header.download.2rmg.type.${r.toLowerCase()}`),bg:At[r],fg:de.white})}),o.jsx("td",{children:o.jsx(z,{colorScheme:"blue",variant:"ghost",mr:"1",onClick:()=>{const s=M(e,"nameCh"),n=M(e,"nameEn"),r=M(e,"lineNum"),i=new Map;b.forEach(((e,s)=>{i.set(s,[M(e,"nameCh"),M(e,"nameEn")])})),g(t),f([s,n,r]),v(i),a(!0)},size:"sm",children:o.jsx(ge,{})})})]},JSON.stringify(s))))})})]}),o.jsx(C,{children:o.jsx(z,{colorScheme:"blue",variant:"outline",mr:"1",onClick:t,children:n("close")})})]}),o.jsx(Rt,{isOpen:i,onClose:()=>a(!1),param:x,nameList:j,interchangeName:y})]})},Rt=e=>{const{isOpen:s,onClose:t,param:n,nameList:r,interchangeName:i}=e,{t:a}=As(),[x,g]=Hs.useState("");return Hs.useEffect((()=>{""!=r[0]&&""!=r[1]?g(r[0]+"/"+r[1]):""!=r[0]?g(r[0]):""!=r[1]?g(r[1]):g("")}),[...r]),o.jsxs(l,{isOpen:s,onClose:t,size:"md",scrollBehavior:"inside",children:[o.jsx(c,{}),o.jsxs(d,{children:[o.jsx(h,{children:o.jsxs(m,{as:"b",fontSize:"xl",children:[a("header.download.2rmg.download")," ",x]})}),o.jsx(u,{}),o.jsx(p,{children:o.jsxs(k,{children:[o.jsx(m,{fontSize:"sm",mb:"2",lineHeight:"100%",children:a("header.download.2rmg.downloadInfo")}),n.map((([e,s,t])=>o.jsxs(z,{onClick:()=>{Nt(e,[r[0],r[1]],r[2],i)},overflow:"hidden",size:"md",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"ruby",children:[s.replaceAll("\n","⏎"),"/",t.replaceAll("\n","⏎")]},`${s}${t}`)))]})}),o.jsx(C,{children:o.jsx(z,{colorScheme:"blue",variant:"outline",mr:"1",onClick:t,children:a("close")})})]})]})},Wt=e=>{const{isOpen:s,onClose:t}=e,{t:n}=As();return o.jsxs(l,{isOpen:s,onClose:t,size:"xl",scrollBehavior:"inside",children:[o.jsx(c,{}),o.jsxs(d,{children:[o.jsx(h,{children:n("header.download.termsAndConditions")}),o.jsx(u,{}),o.jsx(p,{children:o.jsxs(O,{children:[o.jsxs(M,{children:["The layout of the elements on the signage or rail map, is designed by"," ",o.jsxs(E,{color:"teal.500",href:"https://www.shmetro.com/",isExternal:!0,children:["Shanghai Shentong Metro Group ",o.jsx(_,{as:me})]}),", ",o.jsxs(E,{color:"teal.500",href:"https://www.gzmtr.com/",isExternal:!0,children:["Guangzhou Metro Group ",o.jsx(_,{as:me})]})," or ",o.jsxs(E,{color:"teal.500",href:"https://www.mtr.com.hk/",isExternal:!0,children:["MTR Corporation ",o.jsx(_,{as:me})]}),", depending on your selection. You shall grant appropriate permit or license from the relevant company above before using the generated images for commercial purposes, if it is required to do so.",o.jsx("br",{}),"标志版或路线图的元素或布局,基于你所选择的风格,为",o.jsxs(E,{color:"teal.500",href:"https://www.shmetro.com/",isExternal:!0,children:["上海申通地铁集团 ",o.jsx(_,{as:me})]}),",",o.jsxs(E,{color:"teal.500",href:"https://www.gzmtr.com/",isExternal:!0,children:["广州地铁集团公司 ",o.jsx(_,{as:me})]}),"或",o.jsxs(E,{color:"teal.500",href:"https://www.mtr.com.hk/",isExternal:!0,children:["港铁公司 ",o.jsx(_,{as:me})]}),"所设计。在产生的图像用作商业用途前,你应向相关公司取得适当之许可证或授权。"]}),o.jsxs(M,{children:["The elements including shapes and lines on the image are drawn by"," ",o.jsxs(E,{color:"teal.500",href:"https://www.github.com/thekingofcity",isExternal:!0,children:["thekingofcity ",o.jsx(_,{as:me})]})," and ",o.jsxs(E,{color:"teal.500",href:"https://www.github.com/wongchito",isExternal:!0,children:["Chito Wong ",o.jsx(_,{as:me})]}),", based on the design standards or rules of the companies listed above. You may use them for any purposes, but it is recommended to state the name and the link of software alongside.",o.jsx("br",{}),"图像的元素,包括图形及线条,均由",o.jsxs(E,{color:"teal.500",href:"https://www.github.com/thekingofcity",isExternal:!0,children:["thekingofcity ",o.jsx(_,{as:me})]}),"及",o.jsxs(E,{color:"teal.500",href:"https://www.github.com/wongchito",isExternal:!0,children:["Chito Wong ",o.jsx(_,{as:me})]}),"基于上述公司设计标准或准则绘制。你可将其用于任何目的,但我们建议你于使用同时附以我们的名字以及本网站地址。"]}),o.jsxs(M,{children:["Due to copyright, licensing and other legal restrictions, Rail Map Painter uses"," ",o.jsxs(E,{color:"teal.500",href:"https://github.com/ButTaiwan/genyo-font",isExternal:!0,children:["GenYoMin provided by ButTaiwan ",o.jsx(_,{as:me})]}),", and Vegur instead of MTRSung and Myriad Pro respectively to display and generate MTR-style signage. You shall grant appropriate permit or license from the manufacturers before using those generated images for commercial purposes.",o.jsx("br",{}),"由于著作权及其他法律限制,铁路路线图绘制器使用由",o.jsxs(E,{color:"teal.500",href:"https://github.com/ButTaiwan/genyo-font",isExternal:!0,children:["ButTaiwan提供的源樣明體 ",o.jsx(_,{as:me})]}),",以及Vegur,以代替港铁样式标志牌所使用的地铁宋及Myriad Pro。在产生之图像用作商业用途前,你应向字型生产厂商取得适当之许可证或授权。"]}),o.jsxs(M,{children:["The exported images in PNG or SVG format may be modified, published, or used for other purposes except commercial use, under the conditions above.",o.jsx("br",{}),"输出的PNG或SVG图像可基于上述条款,在非商业使用时,用于修改、发行或其他用途。"]}),o.jsxs(M,{children:["All flag emojis shown on Windows platforms are designed by"," ",o.jsxs(E,{color:"teal.500",href:"https://openmoji.org/",isExternal:!0,children:["OpenMoji ",o.jsx(_,{as:me})]})," ","– the open-source emoji and icon project. License:",o.jsxs(E,{color:"teal.500",href:"https://creativecommons.org/licenses/by-sa/4.0/",isExternal:!0,children:["CC BY-SA 4.0 ",o.jsx(_,{as:me})]}),o.jsx("br",{}),"于Windows作业系统上显示的国旗Emoji为",o.jsxs(E,{color:"teal.500",href:"https://openmoji.org/",isExternal:!0,children:["OpenMoji ",o.jsx(_,{as:me})]}),"所设计。许可证:",o.jsxs(E,{color:"teal.500",href:"https://creativecommons.org/licenses/by-sa/4.0/",isExternal:!0,children:["CC BY-SA 4.0 ",o.jsx(_,{as:me})]})]}),o.jsxs(M,{children:["We reserve the rights, without prior notice, to modify, add, or remove these terms. The Chinese translation is for reference only. In case of any discrepancy between the English version and the Chinese version, the English version shall prevail.",o.jsx("br",{}),"我们保留修改、新增或移除上述条款之权利,而无需另行通知。中文译本仅供参考,文义如与英文有歧异,概以英文本为准。"]})]})})]})]})};function Pt(){const e=N("white","var(--chakra-colors-gray-800)"),s=je(),{telemetry:{project:t}}=fe((e=>e.app)),n=fe((e=>e.param)),r=le.isAllowAnalytics(),{t:i}=As(),a=Hs.useRef(window.graph),[x,g]=Hs.useState("png"),j={png:i("header.download.png"),svg:i("header.download.svg")},[f,b]=Hs.useState(2),[w,y]=Hs.useState({width:1,height:1,benchmark:.001}),[v,S]=Hs.useState(200),k=[10,25,33,50,67,75,100,125,150,175,200,250,300,400,500,750,1e3],O=Object.fromEntries(k.map((e=>[e,`${e}%`]))),[M,B]=Hs.useState([]),[Z,D]=Hs.useState(!1),G=[{type:"select",label:i("header.download.format"),value:x,options:j,onChange:e=>g("png"===e?"png":"svg")}],U=[{type:"select",label:i("header.download.svgVersion"),value:f,options:{1.1:i("header.download.svg1.1"),2:i("header.download.svg2")},onChange:e=>{b(e),1.1===e&&X(!0)}}],K=[{type:"select",label:i("header.download.scale"),value:v,options:O,disabledOptions:M,onChange:e=>S(e)},{type:"switch",label:i("header.download.transparent"),isChecked:Z,onChange:D}],[Y,V]=Hs.useState(!1),[F,q]=Hs.useState(!1),[J,X]=Hs.useState(!1),[Q,$]=Hs.useState(!1),[ee,se]=Hs.useState(!1),[te,ne]=Hs.useState(!1);Hs.useEffect((()=>{(async()=>{const e=await Qs.maxArea({usePromise:!0,useWorker:!0});y(e)})()}),[]),Hs.useEffect((()=>{if(Y){const{xMin:e,yMin:s,xMax:t,yMax:n}=be(a.current),[r,i]=[t-e,n-s],o=k.filter((e=>r*e/100>w.width&&i*e/100>w.height));B(o)}}),[Y]);return o.jsxs(A,{id:"download",children:[o.jsx(H,{as:R,size:"sm",variant:"ghost",icon:o.jsx(ge,{})}),o.jsxs(W,{children:[o.jsx(P,{icon:o.jsx(we,{}),onClick:()=>{r&&le.event(ze.DOWNLOAD_PARAM,t?{"#nodes":a.current.order,"#edges":a.current.size}:{}),Ps(`RMP_${(new Date).valueOf()}.json`,"application/json",Ce(n))},children:i("header.download.config")}),o.jsxs(P,{icon:o.jsx(ye,{}),onClick:()=>ne(!0),children:[i("header.download.2rmg.title"),o.jsx(T,{ml:"1",colorScheme:"green",children:"New"})]}),o.jsx(P,{icon:o.jsx(ve,{}),onClick:()=>V(!0),children:i("header.download.image")})]}),o.jsxs(l,{size:"xl",isOpen:Y,onClose:()=>V(!1),children:[o.jsx(c,{}),o.jsxs(d,{children:[o.jsx(h,{children:i("header.download.image")}),o.jsx(u,{}),o.jsxs(p,{children:[o.jsx(Se,{fields:G}),"svg"===x&&o.jsx(Se,{fields:U}),"png"===x&&o.jsx(Se,{fields:K}),"png"===x&&M.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(m,{as:"i",fontSize:"sm",children:i("header.download.disabledScaleOptions")}),o.jsx("br",{}),o.jsx(m,{as:"i",fontSize:"sm",children:i("header.download.disabledScaleOptionsWorkarounds")}),o.jsxs(E,{color:"teal.500",onClick:()=>window.open("https://github.com/RazrFalcon/resvg","_blank"),children:["RazrFalcon/resvg ",o.jsx(_,{as:me})]}),o.jsx("br",{})]}),o.jsx("br",{}),o.jsx(L,{isChecked:J,isDisabled:"svg"===x&&1.1===f,onChange:e=>X(e.target.checked),children:o.jsx(m,{children:i("header.download.useSystemFonts")})}),o.jsx(L,{isChecked:Q,onChange:e=>$(e.target.checked),children:o.jsxs(m,{children:[i("header.download.shareInfo1"),o.jsxs(E,{color:"teal.500",onClick:()=>window.open("https://railmapgen.github.io/rmp","_blank"),children:[i("header.about.rmp")," ",o.jsx(_,{as:me})]}),i("header.download.shareInfo2")]})}),o.jsx(L,{isChecked:ee,onChange:e=>se(e.target.checked),children:o.jsxs(m,{children:[i("header.download.termsAndConditionsInfo"),o.jsxs(E,{color:"teal.500",onClick:()=>q(!0),children:[i("header.download.termsAndConditions")," ",o.jsx(_,{as:me})]}),i("header.download.period")]})})]}),o.jsx(C,{children:o.jsx(I,{children:o.jsx(z,{colorScheme:"teal",variant:"outline",size:"sm",isDisabled:!ee||"png"===x&&M.includes(v),onClick:async()=>{V(!1),r&&le.event(ze.DOWNLOAD_IMAGES,t?{numberOfNodes:a.current.order,numberOfEdges:a.current.size}:{});const{elem:n,width:o,height:l}=await Ts(a.current,Q,J,f),c=n.outerHTML.replace(/ /g," ");if("svg"===x)return void Ps(`RMP_${(new Date).valueOf()}.svg`,"image/svg+xml",c);document.body.appendChild(n);const d="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(c)));document.body.removeChild(n),n.remove();const h=document.createElement("canvas"),[u,p]=[o*v/100,l*v/100];h.width=u,h.height=p;const g=h.getContext("2d");Z||(g.fillStyle=e,g.fillRect(0,0,u,p));const m=new Image;m.onload=()=>{setTimeout((()=>{g.drawImage(m,0,0,u,p),h.toBlob((e=>{e?Ls(`RMP_${(new Date).valueOf()}.png`,e):s(ke({status:"error",message:i("header.download.imageTooBig")}))}),"image/png")}),Is()?2e3:0)},m.src=d},children:i("header.download.confirm")})})}),o.jsx(Wt,{isOpen:F,onClose:()=>q(!1)})]})]}),o.jsx(Ht,{isOpen:te,onClose:()=>ne(!1)})]})}const Tt=(e,{info_panel_type:s,line_num:t,stn_list:n,style:i,theme:a},o,l,c)=>{const d=Object.fromEntries(Object.keys(n).filter((e=>!["linestart","lineend"].includes(e))).map((e=>[e,`stn_${ue(10)}`])));Object.entries(n).filter((([e,s])=>!["linestart","lineend"].includes(e))).forEach((([s,t])=>{const n=e.filterNodes(((e,s)=>Object.values(pe).includes(s.type)&&s[s.type].names[0]===t.localisedName.zh));0!==n.length&&(d[s]=n[0])}));const h=[["linestart",-1,0]],u={};for(;h.length;){const[e,s,t]=h.shift();n[e].children.filter((e=>"lineend"!=e)).forEach(((e,n)=>{const r=Math.max(n,t+n);u[e]={x:150*s,y:75*r},h.push([e,s+1,r])}))}Object.entries(n).filter((([e,s])=>!["linestart","lineend"].includes(e))).filter((([s,t])=>0===e.filterNodes(((e,s)=>Object.values(pe).includes(s.type)&&s[s.type].names[0]===t.localisedName.zh)).length)).map((([e,n])=>{var c,h;let p=pe.ShmetroBasic;const x=n.transfer.groups,g=x.map((e=>{var s;return null!==(s=e.lines)&&void 0!==s?s:[]})).flat();i===tt.SHMetro?p=g.length>0?pe.ShmetroInt:s===nt.sh2020?pe.ShmetroBasic2020:pe.ShmetroBasic:i===tt.GZMTR?p=g.length>0?pe.GzmtrInt:pe.GzmtrBasic:i===tt.MTR&&(p=pe.MTR);const m=r(r({},structuredClone(Bs[p].defaultAttrs)),{},{names:[null!==(c=n.localisedName.zh)&&void 0!==c?c:"",null!==(h=n.localisedName.en)&&void 0!==h?h:""]});if(p===pe.ShmetroBasic2020)m.color=a;else if(p===pe.GzmtrBasic)m.color=a,m.lineCode=t,m.stationCode=n.num;else if(p===pe.GzmtrInt)m.transfer=x.map(((e,s)=>{var r,i;const o=null!==(r=null===(i=e.lines)||void 0===i?void 0:i.map((e=>{var s;return[...null!==(s=e.theme)&&void 0!==s?s:a,"1","01"]})))&&void 0!==r?r:[];return 0===s?[[...a,t,n.num],...o]:o}));else if(p===pe.MTR){var j;null!==(j=x[0].lines)&&void 0!==j&&j.length?m.transfer=[[[...a,"",""],...x[0].lines.map((e=>{var s;return[...null!==(s=e.theme)&&void 0!==s?s:a,"",""]}))]]:m.transfer=[[]]}return{node:d[e],attr:{visible:!0,zIndex:0,x:o+u[e].x,y:l+u[e].y,type:p,[p]:m}}})).forEach((({node:s,attr:t})=>e.addNode(s,t))),Object.entries(n).filter((([e,s])=>!["linestart","lineend"].includes(e))).forEach((([s,t])=>{t.children.filter((e=>!["linestart","lineend"].includes(e))).forEach((t=>{const n=Oe.Diagonal,[r,i]=[d[s],d[t]],o=c?Me(e,n,r,i,"from"):-1;e.addDirectedEdgeWithKey(`line_${ue(10)}`,r,i,{visible:!0,zIndex:0,type:n,[Oe.Diagonal]:structuredClone(_e[Oe.Diagonal].defaultAttrs),style:Ee.SingleColor,[Ee.SingleColor]:{color:a},reconcileId:"",parallelIndex:o})}))}))},Lt="rmg-bridge--",It={h:500,maxH:"70%","& iframe":{h:"100%",w:"100%"}};function Bt(e){const{isOpen:s,onClose:t}=e,{t:n}=As(),{preference:{autoParallel:r}}=fe((e=>e.app)),{svgViewBoxZoom:i,svgViewBoxMin:a}=fe((e=>e.param)),l=je(),c=le.isAllowAnalytics(),d=Zs(),{height:h,width:u}=Ne(d),p=Rs.useRef(window.graph),[x]=Rs.useState(crypto.randomUUID()),g="/rmg/#/import?"+new URLSearchParams({parentComponent:le.getAppName(),parentId:x}),m=Rs.useCallback((()=>{l(Ae()),l(He()),l(Re(p.current.export()))}),[l,Ae,He,Re,p]);return Rs.useEffect((()=>{const e=new BroadcastChannel(Lt+x);return e.onmessage=e=>{const{event:s,data:o}=e.data;console.log("[rmp] Received event from RMG app clip:",s),"CLOSE"===s?t():"IMPORT"===s&&(e=>{try{c&&le.event(ze.IMPORT_RMG_PARAM,{});const s=a.x+u*i/100/3,t=a.y+h*i/100/3;Tt(p.current,e,s,t,r),m()}catch(s){l(ke({status:"error",message:n("header.open.unknownError")})),console.error("OpenActions.handleUploadRMG():: Unknown error occurred while parsing the RMG project",s)}finally{t()}})(o)},()=>e.close()}),[a.x,a.y,i,h,u,r]),o.jsx(We,{isOpen:s,onClose:t,sx:It,children:o.jsx("iframe",{src:g,loading:"lazy"})})}const Zt="OPEN_TEMPLATE",Dt=new BroadcastChannel("RMP_GALLERY_CHANNEL"),Gt={h:"80%",w:"80%","& iframe":{h:"100%",w:"100%"},"& div":{h:"100%",w:"100%"}};function Ut(e){const{isOpen:t,onClose:n}=e,r=B(),{t:i}=As(),l=je(),{telemetry:{project:c}}=fe((e=>e.app)),d=le.isAllowAnalytics(),h=Hs.useRef(window.graph),u=Hs.useCallback((()=>{l(Ae()),l(He()),l(Re(h.current.export()))}),[l,Ae,He,Re,h]),p=async(e,t)=>{var n;const o=t?`https://${t}`:"",p=await(null===(n=(await Promise.allSettled([fetch(`${o}/rmp-gallery/resources/real_world/${e}.json`),fetch(`${o}/rmp-gallery/resources/fantasy/${e}.json`)])).filter((e=>"fulfilled"===e.status)).find((e=>200===e.value.status)))||void 0===n?void 0:n.value.json());if(p){if(d){const s={id:e};c&&t&&(s.host=t),le.event(ze.IMPORT_WORK_FROM_GALLERY,s)}(async e=>{const t=JSON.parse(await Pe(JSON.stringify(e))),{version:n}=t,r=a(t,s);l(Te()),h.current.clear(),h.current.import(r.graph),u();const{svgViewBoxZoom:i,svgViewBoxMin:o}=r;"number"==typeof i&&l(Le(i)),"number"==typeof o.x&&"number"==typeof o.y&&l(Ie(o))})(p),r({title:i("header.open.importFromRMPGallery",{id:e}),status:"success",duration:9e3,isClosable:!0})}else r({title:i("header.open.failToImportFromRMPGallery",{id:e}),status:"error",duration:9e3,isClosable:!0});le.updateAppMetadata({hash:""})};return Hs.useEffect((()=>{const e=new URL(window.location.href).searchParams;if(e.size>0){const s=e.keys().next().value,t=s.indexOf("."),n=s.substring(0,-1===t?void 0:t);let r;-1!==t&&(r=s.substring(t+1)),p(n,r)}}),[]),Hs.useEffect((()=>(Dt.onmessage=e=>{const{event:s,data:t}=e.data;s===Zt&&(p(t),n())},()=>Dt.close())),[]),o.jsxs(We,{isOpen:t,onClose:n,size:"full",sx:Gt,children:[o.jsx("iframe",{src:"/rmp-gallery/",loading:"lazy"}),o.jsx(Z,{onClick:n,position:"fixed",top:"5px",right:"15px"})]})}function Kt(){const e=je(),{t:s}=As(),n=Zs(),{height:r}=Ne(n),i=Hs.useRef(window.graph),l=Hs.useRef(null),[c,d]=Hs.useState(!1),[h,u]=Hs.useState(!1),p=Hs.useCallback((()=>{e(Ae()),e(He()),e(Re(i.current.export()))}),[e,Ae,He,Re,i]),x=async s=>{const n=JSON.parse(await Pe(s)),{version:r}=n,o=a(n,t);e(Te()),i.current.clear(),i.current.import(o.graph),p();const{svgViewBoxZoom:l,svgViewBoxMin:c}=o;"number"==typeof l&&e(Le(l)),"number"==typeof c.x&&"number"==typeof c.y&&e(Ie(c))};return Hs.useEffect((()=>{const e=async e=>{const{type:s,key:t,from:n}=e.data;if(s===Ye.SAVE_CHANGED&&t===Ve.PARAM&&"rmt"===n){Fe.debug(`Received save changed event on key: ${t}`);const e=localStorage.getItem(Ve.PARAM);if(!e)return;await x(e)}};return Be.addEventListener("message",e),()=>Be.removeEventListener("message",e)}),[]),o.jsxs(A,{children:[o.jsx(H,{as:R,size:"sm",variant:"ghost",icon:o.jsx(Ze,{})}),o.jsxs(W,{children:[o.jsx(P,{icon:o.jsx(De,{}),onClick:()=>{e(Te()),i.current.clear(),e(Le(100)),e(Ie({x:0,y:0})),p()},children:s("header.open.new")}),o.jsx("input",{id:"upload_project",ref:l,type:"file",accept:".json",hidden:!0,onChange:async t=>{var n;const r=null===(n=t.target.files)||void 0===n?void 0:n[0];if(console.log("OpenActions.handleUpload():: received file",r),"application/json"!==(null==r?void 0:r.type))e(ke({status:"error",message:s("header.open.invalidType")})),console.error("OpenActions.handleUpload():: Invalid file type! Only file in JSON format is accepted.");else try{const e=await Yt(r);await x(e)}catch(i){e(ke({status:"error",message:s("header.open.unknownError")})),console.error("OpenActions.handleUpload():: Unknown error occurred while parsing the uploaded file",i)}t.target.value=""},"data-testid":"file-upload"}),o.jsx(P,{icon:o.jsx(Ze,{}),onClick:()=>{var e;return null==l||null===(e=l.current)||void 0===e?void 0:e.click()},children:s("header.open.config")}),o.jsx(P,{icon:o.jsx(Ge,{}),onClick:()=>d(!0),children:s("header.open.projectRMG")}),o.jsxs(P,{icon:o.jsx(me,{}),onClick:()=>u(!0),children:[s("header.open.gallery"),o.jsx(T,{ml:"1",colorScheme:"green",children:"New"})]}),o.jsx(P,{icon:o.jsx(Ue,{}),onClick:async()=>{await x(await Ke()),e(Ie({x:-10,y:-13}));const s=Math.max(0,Math.min(400,-.132*r+117.772));e(Le(s)),le.event(ze.LOAD_TUTORIAL,{})},children:s("header.open.tutorial")})]}),o.jsx(Bt,{isOpen:c,onClose:()=>d(!1)}),o.jsx(Ut,{isOpen:h,onClose:()=>u(!1)})]})}const Yt=e=>new Promise((s=>{const t=new FileReader;t.onloadend=()=>s(t.result),t.readAsText(e)})),Vt=()=>{const[e,s]=Hs.useState(!1),{t:t}=As(),n=je(),r=Hs.useRef(window.graph),i=Zs(),{width:a,height:l}=Ne(i),[c,d]=Hs.useState([]);Hs.useEffect((()=>{e&&d(r.current.nodes().filter((e=>e.startsWith("stn"))).map((e=>{const s=r.current.getNodeAttributes(e);return{id:e,value:s[s.type].names.join("/")}})))}),[e]);return o.jsxs(D,{isOpen:e,onOpen:()=>s(!0),onClose:()=>s(!1),children:[o.jsx(G,{children:o.jsx(R,{"aria-label":"zoom",variant:"ghost",size:"sm",icon:o.jsx(qe,{}),onClick:()=>s(!e)})}),o.jsx(U,{children:o.jsx(K,{children:o.jsx(Je,{label:t("header.search"),children:o.jsx(Xe,{data:c,displayHandler:e=>o.jsx(T,{children:e.value}),filter:(e,s)=>s.value.toLowerCase().includes(e.toLowerCase())||Object.values(s.value).some((s=>s.toLowerCase().includes(e.toLowerCase()))),value:"",onChange:e=>(e=>{n(Qe(new Set([e])));const s=Math.max(0,Math.min(400,-.132*l+117.772)),{x:t,y:i}=$e((a-300)/2,l/2,s,{x:-r.current.getNodeAttribute(e,"x"),y:-r.current.getNodeAttribute(e,"y")});n(Le(s)),n(Ie({x:-t,y:-i}))})(e.id)})})})})]})},Ft=e=>{const{isOpen:s,onClose:t}=e,n=je(),{theme:r,paletteAppClip:{output:i}}=fe((e=>e.runtime)),{t:a}=As(),x=Hs.useRef(window.graph),[g,m]=Hs.useState(r),[j,f]=Hs.useState(!1);Hs.useEffect((()=>{j&&i&&(m(i),f(!1))}),[null==i?void 0:i.toString()]);return o.jsxs(l,{isOpen:s,onClose:t,size:"xl",scrollBehavior:"inside",trapFocus:!1,children:[o.jsx(c,{}),o.jsxs(d,{children:[o.jsx(h,{children:a("header.settings.procedures.removeLines.title")}),o.jsx(u,{}),o.jsxs(p,{children:[a("header.settings.procedures.removeLines.content"),o.jsx(es,{theme:g,onClick:()=>{f(!0),n(ss(g))}})]}),o.jsxs(C,{children:[o.jsx(z,{colorScheme:"blue",variant:"outline",mr:"1",onClick:t,children:a("cancel")}),o.jsx(z,{colorScheme:"red",onClick:()=>{x.current.filterEdges(((e,s,t,n,r,i,a)=>he.includes(s.style)&&JSON.stringify(s[s.style].color)===JSON.stringify(g))).forEach((e=>x.current.dropEdge(e))),n(He()),n(Re(x.current.export())),t()},children:a("remove")})]})]})]})},qt=e=>{const{isOpen:s,onClose:t}=e,n=je(),{t:r}=As(),i=Hs.useRef(window.graph),[a,x]=Hs.useState(1),g=[{type:"input",label:r("header.settings.procedures.scale.factor"),value:a.toString(),variant:"number",onChange:e=>x(Number(e)),minW:"full"}];return o.jsxs(l,{isOpen:s,onClose:t,size:"xl",scrollBehavior:"inside",children:[o.jsx(c,{}),o.jsxs(d,{children:[o.jsx(h,{children:r("header.settings.procedures.scale.title")}),o.jsx(u,{}),o.jsxs(p,{children:[r("header.settings.procedures.scale.content"),o.jsx(Se,{fields:g})]}),o.jsxs(C,{children:[o.jsx(z,{colorScheme:"blue",variant:"outline",mr:"1",onClick:t,children:r("cancel")}),o.jsx(z,{colorScheme:"red",onClick:()=>{i.current.forEachNode(((e,s)=>{i.current.updateNodeAttribute(e,"x",(e=>(null!=e?e:0)*a)),i.current.updateNodeAttribute(e,"y",(e=>(null!=e?e:0)*a))})),n(Ae()),n(He()),n(Re(i.current.export())),t()},children:r("apply")})]})]})]})},Jt=e=>{const{isOpen:s,onClose:t}=e,n=je(),{t:r}=As(),i=Hs.useRef(window.graph),[a,x]=Hs.useState(0),[g,m]=Hs.useState(0),j=[{type:"input",label:r("header.settings.procedures.translate.x"),value:a.toString(),variant:"number",onChange:e=>x(Number(e)),minW:"full"},{type:"input",label:r("header.settings.procedures.translate.y"),value:g.toString(),variant:"number",onChange:e=>m(Number(e)),minW:"full"}];return o.jsxs(l,{isOpen:s,onClose:t,size:"xl",scrollBehavior:"inside",children:[o.jsx(c,{}),o.jsxs(d,{children:[o.jsx(h,{children:r("header.settings.procedures.translate.title")}),o.jsx(u,{}),o.jsxs(p,{children:[r("header.settings.procedures.translate.content"),o.jsx(Se,{fields:j})]}),o.jsxs(C,{children:[o.jsx(z,{colorScheme:"blue",variant:"outline",mr:"1",onClick:t,children:r("cancel")}),o.jsx(z,{colorScheme:"red",onClick:()=>{i.current.forEachNode(((e,s)=>{i.current.updateNodeAttribute(e,"x",(e=>(null!=e?e:0)+a)),i.current.updateNodeAttribute(e,"y",(e=>(null!=e?e:0)+g))})),n(Ae()),n(He()),n(Re(i.current.export())),t()},children:r("apply")})]})]})]})},Xt=e=>{const{isOpen:s,onClose:t}=e,n=je(),{preference:{unlockSimplePathAttempts:r}}=fe((e=>e.app)),{activeSubscriptions:i}=fe((e=>e.account)),{t:a}=As();return o.jsxs(l,{isOpen:s,onClose:t,size:"5xl",scrollBehavior:"inside",children:[o.jsx(c,{}),o.jsxs(d,{children:[o.jsx(h,{children:a("header.settings.procedures.unlockSimplePath.title")}),o.jsx(u,{}),o.jsxs(p,{children:[o.jsx(m,{mb:"2",children:a("header.settings.procedures.unlockSimplePath.content1")}),o.jsx(m,{mb:"2",children:a("header.settings.procedures.unlockSimplePath.content2")}),o.jsx(m,{mb:"2",children:a("header.settings.procedures.unlockSimplePath.content3")})]}),o.jsx(C,{children:o.jsx(Y,{label:a("header.settings.pro"),isOpen:!i.RMP_CLOUD&&r>=0,children:o.jsx(z,{onClick:()=>{n(ts(-1))},isDisabled:!i.RMP_CLOUD||r<0,children:a(r>=0?"header.settings.procedures.unlockSimplePath.check":"header.settings.procedures.unlockSimplePath.unlocked")})})})]})]})},Qt=e=>{const{isOpen:s,onClose:t}=e,n=je(),r=B(),{t:i}=As(),a=Hs.useRef(window.graph),[x,g]=Hs.useState(!1);return o.jsxs(l,{isOpen:s,onClose:t,size:"xl",scrollBehavior:"inside",children:[o.jsx(c,{}),o.jsxs(d,{children:[o.jsx(h,{children:i("header.settings.procedures.updateColor.title")}),o.jsx(u,{}),o.jsx(p,{children:o.jsx(m,{children:i("header.settings.procedures.updateColor.content")})}),o.jsxs(C,{children:[o.jsx(z,{colorScheme:"blue",variant:"outline",mr:"1",onClick:t,children:i("cancel")}),o.jsx(z,{colorScheme:"red",onClick:async()=>{g(!0);const e=JSON.stringify(a.current.export());try{const s=await sn(e);a.current.clear(),a.current.import(s),n(Ae()),n(He()),n(Re(a.current.export())),r({title:i("header.settings.procedures.updateColor.success"),status:"success",duration:9e3,isClosable:!0})}catch(s){console.error(`[rmp] Error in updating all colors: ${s}`),r({title:i("header.settings.procedures.updateColor.error",{e:s}),status:"error",duration:9e3,isClosable:!0})}g(!1),t()},isLoading:x,children:i("apply")})]})]})]})},$t=e=>e.length>=4&&e.every((e=>"string"==typeof e))&&!!e[2].match(/^#[0-9a-fA-F]{6}$/)&&Object.values(de).includes(e[3]),en=(e,s,t)=>{const n=s.split(".");let r=e;for(let i=0;i{const s=JSON.parse(e),t=(new Date).getTime(),n=(e=>{const s=[],t=(e,n)=>{if(Array.isArray(e)&&$t(e))s.push({path:n||"",value:e});else for(const r in e){const i=e[r],a=n?`${n}.${r}`:r;Array.isArray(i)?$t(i)?s.push({path:a,value:i}):i.forEach(((e,s)=>t(e,`${a}.${s}`))):i&&"object"==typeof i&&t(i,a)}};return t(e),s})(s);console.log("[rmp] Found all themes pending for update",n);let r,i=!1;const a=new Promise(((e,t)=>{r=setTimeout((()=>{i=!0,t("Executing time exceeds 10000ms")}),1e4),(async()=>{for(const{path:e,value:t}of n){if(i)throw new Error("Update aborted");const[n,r,a,o,...l]=t,c=await ns([n,r,a,o]);en(s,e,[...c,...l])}})().then(e).catch(t)}));try{return await a,console.log(`[rmp] Themes update completed, elapsed time ${((new Date).getTime()-t)/1e3} sec`),s}finally{clearTimeout(r)}},tn=()=>{const{state:e}=fe((e=>e.account)),{t:s}=As(),[t,n]=Hs.useState(!1),[r,i]=Hs.useState(1);Hs.useEffect((()=>{let e;return t&&r>0?e=window.setTimeout((()=>{i(r-1)}),1e3):0===r&&n(!1),()=>clearTimeout(e)}),[t,r]);const a={"logged-out":s("header.settings.subscription.logged-out"),free:s("header.settings.subscription.free"),subscriber:s("header.settings.subscription.subscriber"),expired:s("header.settings.subscription.expired")};return o.jsxs(j,{width:"100%",mb:"3",children:[o.jsx(m,{as:"b",fontSize:"xl",children:s("header.settings.subscription.title")}),o.jsx(j,{mt:"3",children:o.jsxs(j,{display:"flex",mb:"1",children:[o.jsx(m,{flex:"1",children:a[e]}),o.jsx(R,{"aria-label":"refresh",variant:"ghost",size:"sm",icon:o.jsx(rs,{}),isDisabled:t,onClick:()=>(n(!0),i(1),void is())})]})})]})},nn={width:"100%",justifyContent:"space-between"},rn={fontFamily:"-apple-system"},an=e=>{const{isOpen:s,onClose:t}=e,{activeSubscriptions:n}=fe((e=>e.account)),{telemetry:{project:r},preference:{autoParallel:i,randomStationsNames:a}}=fe((e=>e.app)),{keepLastPath:x,parallelLinesCount:g}=fe((e=>e.runtime)),f=je(),{t:w}=As(),y=N("primary.500","primary.300"),[v,S]=Hs.useState(!1),[C,k]=Hs.useState(!1),[O,M]=Hs.useState(!1),[A,H]=Hs.useState(!1),[R,W]=Hs.useState(!1),[P,L]=Hs.useState(!1),[I,B]=Hs.useState(!1),Z=le.isAllowAnalytics(),D=g>=(n.RMP_CLOUD?as:os),G=!n.RMP_CLOUD;return o.jsxs(l,{isOpen:s,onClose:t,size:"xl",scrollBehavior:"inside",trapFocus:!1,children:[o.jsx(c,{}),o.jsxs(d,{children:[o.jsx(h,{children:w("header.settings.title")}),o.jsx(u,{}),o.jsx(p,{children:o.jsxs(b,{divider:o.jsx(te,{borderColor:"gray.200"}),children:[o.jsx(tn,{}),o.jsxs(j,{width:"100%",mb:"3",children:[o.jsx(m,{as:"b",fontSize:"xl",children:w("header.settings.preference.title")}),o.jsxs(j,{mt:"3",children:[o.jsxs(j,{display:"flex",mb:"1",children:[o.jsx(m,{flex:"1",children:w("header.settings.preference.keepLastPath")}),o.jsx(V,{isChecked:x,onChange:({target:{checked:e}})=>f(ls(e))})]}),o.jsxs(j,{display:"flex",mb:"1",children:[o.jsx(m,{children:w("header.settings.preference.autoParallel")}),o.jsx(T,{ml:"auto",colorScheme:"green",children:"New"}),o.jsx(Y,{label:w("header.settings.proWithTrial"),children:o.jsx(T,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",children:"PRO"})}),o.jsx(V,{ml:"1",isDisabled:D,isChecked:i,onChange:({target:{checked:e}})=>f(cs(e))})]}),o.jsxs(j,{mb:"1",display:"flex",children:[o.jsx(m,{flex:"1",children:w("header.settings.preference.randomStationNames.title")}),o.jsx(T,{ml:"auto",colorScheme:"green",children:"New"}),o.jsx(Y,{label:w("header.settings.pro"),children:o.jsx(T,{color:"gray.50",ml:"1",background:"radial-gradient(circle, #3f5efb, #fc466b)",children:"PRO"})}),o.jsxs(F,{size:"xs",width:"auto",ml:"1",value:a,onChange:e=>{f(js(e.target.value))},children:[o.jsx("option",{value:"none",children:w("header.settings.preference.randomStationNames.none")}),o.jsx("option",{value:ds.Shmetro,disabled:G,children:w(`header.settings.preference.randomStationNames.${ds.Shmetro}`)}),o.jsx("option",{value:ds.Bjsubway,disabled:G,children:w(`header.settings.preference.randomStationNames.${ds.Bjsubway}`)})]})]})]})]}),o.jsxs(j,{width:"100%",mb:"3",children:[o.jsx(m,{as:"b",fontSize:"xl",children:w("header.settings.procedures.title")}),o.jsxs(j,{mt:"3",children:[o.jsx(z,{sx:nn,rightIcon:o.jsx(hs,{}),onClick:()=>S(!0),children:w("header.settings.procedures.translate.title")}),o.jsx(Jt,{isOpen:v,onClose:()=>S(!1)}),o.jsx(z,{sx:nn,rightIcon:o.jsx(hs,{}),onClick:()=>k(!0),children:w("header.settings.procedures.scale.title")}),o.jsx(qt,{isOpen:C,onClose:()=>k(!1)}),o.jsxs(z,{sx:nn,rightIcon:o.jsx(hs,{}),onClick:()=>M(!0),children:[w("header.settings.procedures.changeType.title"),o.jsx(Y,{label:w("header.settings.pro"),children:o.jsx(T,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",mr:"auto",children:"PRO"})})]}),o.jsx(Gs,{isOpen:O,onClose:()=>M(!1),isSelect:!1}),o.jsx(z,{sx:nn,rightIcon:o.jsx(hs,{}),onClick:()=>H(!0),children:w("header.settings.procedures.removeLines.title")}),o.jsx(Ft,{isOpen:A,onClose:()=>H(!1)}),o.jsx(z,{sx:nn,rightIcon:o.jsx(hs,{}),onClick:()=>W(!0),children:w("header.settings.procedures.updateColor.title")}),o.jsx(Qt,{isOpen:R,onClose:()=>W(!1)}),o.jsxs(z,{sx:nn,rightIcon:o.jsx(hs,{}),onClick:()=>L(!0),children:[w("header.settings.procedures.unlockSimplePath.title"),o.jsx(Y,{label:w("header.settings.pro"),children:o.jsx(T,{ml:"1",color:"gray.50",background:"radial-gradient(circle, #3f5efb, #fc466b)",mr:"auto",children:"PRO"})})]}),o.jsx(Xt,{isOpen:P,onClose:()=>L(!1)}),o.jsx(z,{sx:nn,rightIcon:o.jsx(hs,{}),onClick:()=>B(!0),children:w("header.settings.procedures.masterManager.title")}),o.jsx(Ds,{isOpen:I,onClose:()=>B(!1)})]})]}),o.jsxs(j,{width:"100%",mb:"3",children:[o.jsx(m,{as:"b",fontSize:"xl",children:w("header.settings.shortcuts.title")}),o.jsx(j,{mt:"3",children:o.jsxs(q,{children:[o.jsx(J,{children:o.jsxs(X,{children:[o.jsx(Q,{children:w("header.settings.shortcuts.keys")}),o.jsx(Q,{children:w("header.settings.shortcuts.description")})]})}),o.jsxs($,{children:[o.jsxs(X,{children:[o.jsx(ee,{children:o.jsx(se,{children:"f"})}),o.jsx(ee,{children:w("header.settings.shortcuts.f")})]}),o.jsxs(X,{children:[o.jsx(ee,{children:o.jsx(se,{children:"s"})}),o.jsx(ee,{children:w("header.settings.shortcuts.s")})]}),o.jsxs(X,{children:[o.jsx(ee,{children:o.jsxs(j,{display:"flex",flexDirection:"row",children:[o.jsx(us,{}),o.jsx(ps,{}),o.jsx(xs,{}),o.jsx(gs,{})]})}),o.jsx(ee,{children:w("header.settings.shortcuts.arrows")})]}),o.jsxs(X,{children:[o.jsx(ee,{children:o.jsxs(j,{display:"flex",flexDirection:"row",children:[o.jsx(se,{children:"i"}),o.jsx(se,{children:"j"}),o.jsx(se,{children:"k"}),o.jsx(se,{children:"l"})]})}),o.jsx(ee,{children:w("header.settings.shortcuts.ijkl")})]}),o.jsxs(X,{children:[o.jsx(ee,{children:ms?o.jsx(se,{sx:rn,children:"⇧"}):o.jsx(se,{children:"shift"})}),o.jsx(ee,{children:w("header.settings.shortcuts.shift")})]}),o.jsxs(X,{children:[o.jsx(ee,{children:ms?o.jsx(se,{sx:rn,children:"⌥"}):o.jsx(se,{children:"alt"})}),o.jsx(ee,{children:w("header.settings.shortcuts.alt")})]}),o.jsxs(X,{children:[o.jsx(ee,{children:ms?o.jsx(se,{sx:rn,children:"⌫"}):o.jsx(se,{children:"delete"})}),o.jsx(ee,{children:w("header.settings.shortcuts.delete")})]}),o.jsxs(X,{children:[o.jsxs(ee,{children:[ms?o.jsx(se,{sx:rn,children:"⌘"}):o.jsx(se,{children:"ctrl"})," + ",o.jsx(se,{children:"x"})]}),o.jsx(ee,{children:w("header.settings.shortcuts.cut")})]}),o.jsxs(X,{children:[o.jsxs(ee,{children:[ms?o.jsx(se,{sx:rn,children:"⌘"}):o.jsx(se,{children:"ctrl"})," + ",o.jsx(se,{children:"c"})]}),o.jsx(ee,{children:w("header.settings.shortcuts.copy")})]}),o.jsxs(X,{children:[o.jsxs(ee,{children:[ms?o.jsx(se,{sx:rn,children:"⌘"}):o.jsx(se,{children:"ctrl"})," + ",o.jsx(se,{children:"v"})]}),o.jsx(ee,{children:w("header.settings.shortcuts.paste")})]}),o.jsxs(X,{children:[o.jsxs(ee,{children:[ms?o.jsx(se,{sx:rn,children:"⌘"}):o.jsx(se,{children:"ctrl"})," + ",o.jsx(se,{children:"z"})]}),o.jsx(ee,{children:w("header.settings.shortcuts.undo")})]}),o.jsxs(X,{children:[o.jsx(ee,{children:ms?o.jsxs(o.Fragment,{children:[o.jsx(se,{sx:rn,children:"⇧"})," + ",o.jsx(se,{sx:rn,children:"⌘"})," + ",o.jsx(se,{children:"z"})]}):o.jsxs(o.Fragment,{children:[o.jsx(se,{children:"ctrl"})," + ",o.jsx(se,{children:"y"})]})}),o.jsx(ee,{children:w("header.settings.shortcuts.redo")})]})]})]})})]}),o.jsxs(j,{width:"100%",mb:"3",children:[o.jsx(m,{as:"b",fontSize:"xl",children:w("header.settings.telemetry.title")}),o.jsxs(j,{mt:"3",children:[o.jsx(m,{fontSize:"sm",lineHeight:"100%",color:"gray.600",children:w("header.settings.telemetry.info")}),o.jsxs(j,{mt:"3",mb:"1",children:[o.jsxs(j,{display:"flex",mb:"1",children:[o.jsx(m,{flex:"1",children:w("header.settings.telemetry.essential")}),o.jsx(Y,{label:w("header.settings.telemetry.essentialTooltip"),children:o.jsx(V,{isChecked:Z,isDisabled:!0})})]}),o.jsx(m,{fontSize:"sm",lineHeight:"100%",color:"gray.600",children:w("header.settings.telemetry.essentialInfo")}),o.jsxs(E,{color:y,fontSize:"sm",lineHeight:"100%",href:"https://support.google.com/analytics/answer/11593727",isExternal:!0,children:[w("header.settings.telemetry.essentialLink")," ",o.jsx(_,{as:me})]})]}),o.jsxs(j,{mt:"1",mb:"1",children:[o.jsxs(j,{display:"flex",children:[o.jsx(m,{flex:"1",children:w("header.settings.telemetry.additional")}),o.jsx(V,{isChecked:r,onChange:({target:{checked:e}})=>{f(fs(e))}})]}),o.jsx(m,{fontSize:"sm",lineHeight:"100%",color:"gray.600",children:w("header.settings.telemetry.additionalInfo")})]})]})]})]})})]})]})},on=()=>{const[e,s]=Hs.useState(!1),{svgViewBoxZoom:t}=fe((e=>e.param)),n=je(),r=[{type:"slider",label:"",value:400-t,min:10,max:390,step:1,onChange:e=>n(Le(400-e)),leftIcon:o.jsx(ws,{}),rightIcon:o.jsx(bs,{}),minW:160}];return o.jsxs(D,{isOpen:e,onOpen:()=>s(!0),onClose:()=>s(!1),children:[o.jsx(G,{children:o.jsx(R,{"aria-label":"zoom",variant:"ghost",size:"sm",icon:o.jsx(bs,{}),onClick:()=>s(!e)})}),o.jsx(U,{children:o.jsx(K,{children:o.jsx(Se,{fields:r,noLabel:!0})})})]})};function ln(){const{t:e}=As(),s=je(),{past:t,future:n}=fe((e=>e.param)),r=le.isAllowAnalytics(),[a,l]=Hs.useState(!1),[c,d]=Hs.useState(!1),h=i(le.getEnv),u=i(le.getAppVersion);Hs.useEffect((()=>{r&&h!==ys.DEV&&le.event(ze.APP_LOAD,{isStandaloneWindow:le.isStandaloneWindow()})}),[h]);return o.jsxs(vs,{children:[o.jsx(f,{as:"h4",size:"md",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",children:e("header.about.rmp")}),o.jsx(Ss,{environment:h,version:u,popoverHeader:h===ys.PRD?void 0:o.jsxs(Ws,{i18nKey:"header.popoverHeader",environment:h,children:["You're on ",{environment:h}," environment!"]}),popoverBody:h===ys.PRD?void 0:o.jsx(Ws,{i18nKey:"header.popoverBody",children:"This is a testing environment where we test the latest beta RMP."})}),o.jsxs(ne,{ml:"auto",children:[o.jsx(re,{children:o.jsx(Vt,{})}),o.jsx(re,{children:o.jsx(R,{size:"sm",variant:"ghost","aria-label":"Undo",icon:o.jsx(zs,{}),isDisabled:0===t.length,onClick:()=>{s(Es()),s(Ae()),s(He())}})}),o.jsx(re,{children:o.jsx(R,{size:"sm",variant:"ghost","aria-label":"Redo",icon:o.jsx(Cs,{}),isDisabled:0===n.length,onClick:()=>{s(_s()),s(Ae()),s(He())}})}),o.jsx(re,{children:o.jsx(on,{})}),o.jsx(re,{children:o.jsx(Kt,{})}),o.jsx(re,{children:o.jsx(Pt,{})}),le.isStandaloneWindow()&&o.jsx(re,{children:o.jsxs(A,{children:[o.jsx(H,{as:R,icon:o.jsx(ks,{}),variant:"ghost",size:"sm"}),o.jsx(W,{children:["en","zh-Hans","zh-Hant","ja","ko"].map((e=>o.jsx(P,{onClick:()=>{return s=e,void le.getI18nInstance().changeLanguage(s);var s},children:Us[e][e]},e)))})]})}),o.jsx(re,{children:o.jsx(R,{size:"sm",variant:"ghost","aria-label":"Settings",icon:o.jsx(Os,{}),onClick:()=>l(!0)})}),o.jsx(re,{children:o.jsx(R,{size:"sm",variant:"ghost","aria-label":"Help",icon:o.jsx(Ms,{}),onClick:()=>d(!0)})})]}),o.jsx(an,{isOpen:a,onClose:()=>l(!1)}),o.jsx(Ks,{isOpen:c,onClose:()=>d(!1)})]})}function cn(){const e=je(),s=fe((e=>e.runtime.globalAlerts));return o.jsx(o.Fragment,{children:Object.entries(s).map((([s,{message:t,url:n,linkedApp:r}])=>o.jsxs(ie,{status:s,variant:"solid",size:"xs",pl:3,pr:1,py:0,zIndex:"1",children:[o.jsx(ae,{}),r?o.jsx(E,{onClick:()=>(e=>{le.isStandaloneWindow()?window.open(`/${e}`,"_blank"):le.openApp({appId:e})})(r),children:t}):n?o.jsx(E,{href:n,target:"_blank",children:t}):t,o.jsx(Z,{ml:"auto",onClick:()=>e(Ns(s))})]},s)))})}}}}))}(); diff --git a/assets/polyfills-BFlSQA7b.js b/assets/polyfills-BFlSQA7b.js new file mode 100644 index 00000000..bd8b67d6 --- /dev/null +++ b/assets/polyfills-BFlSQA7b.js @@ -0,0 +1 @@ +export function __vite_legacy_guard(){import.meta.url,import("_").catch((()=>1)),async function*(){}().next()}var r,t,e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n={};function i(){if(t)return r;t=1;var n=function(r){return r&&r.Math===Math&&r};return r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||n("object"==typeof r&&r)||function(){return this}()||Function("return this")()}var o,u,a,f,c,s,l,h,v={};function p(){return u?o:(u=1,o=function(r){try{return!!r()}catch(t){return!0}})}function d(){if(f)return a;f=1;var r=p();return a=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function g(){if(s)return c;s=1;var r=p();return c=!r((function(){var r=function(){}.bind();return"function"!=typeof r||r.hasOwnProperty("prototype")}))}function y(){if(h)return l;h=1;var r=g(),t=Function.prototype.call;return l=r?t.bind(t):function(){return t.apply(t,arguments)},l}var m,w,b,E,S,R,A,O,T,I,x,k,P,L,C,U,D,j,M,_,B,N,F,H,z,V,q,$,W,G,Y,J,K,Q,X,Z,rr,tr,er,nr,ir,or={};function ur(){if(m)return or;m=1;var r={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,e=t&&!r.call({1:2},1);return or.f=e?function(r){var e=t(this,r);return!!e&&e.enumerable}:r,or}function ar(){return b?w:(b=1,w=function(r,t){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:t}})}function fr(){if(S)return E;S=1;var r=g(),t=Function.prototype,e=t.call,n=r&&t.bind.bind(e,e);return E=r?n:function(r){return function(){return e.apply(r,arguments)}},E}function cr(){if(A)return R;A=1;var r=fr(),t=r({}.toString),e=r("".slice);return R=function(r){return e(t(r),8,-1)}}function sr(){if(T)return O;T=1;var r=fr(),t=p(),e=cr(),n=Object,i=r("".split);return O=t((function(){return!n("z").propertyIsEnumerable(0)}))?function(r){return"String"===e(r)?i(r,""):n(r)}:n}function lr(){return x?I:(x=1,I=function(r){return null==r})}function hr(){if(P)return k;P=1;var r=lr(),t=TypeError;return k=function(e){if(r(e))throw new t("Can't call method on "+e);return e}}function vr(){if(C)return L;C=1;var r=sr(),t=hr();return L=function(e){return r(t(e))}}function pr(){if(D)return U;D=1;var r="object"==typeof document&&document.all;return U=void 0===r&&void 0!==r?function(t){return"function"==typeof t||t===r}:function(r){return"function"==typeof r}}function dr(){if(M)return j;M=1;var r=pr();return j=function(t){return"object"==typeof t?null!==t:r(t)}}function gr(){if(B)return _;B=1;var r=i(),t=pr();return _=function(e,n){return arguments.length<2?(i=r[e],t(i)?i:void 0):r[e]&&r[e][n];var i},_}function yr(){if(F)return N;F=1;var r=fr();return N=r({}.isPrototypeOf)}function mr(){if(z)return H;z=1;var r=i().navigator,t=r&&r.userAgent;return H=t?String(t):""}function wr(){if(q)return V;q=1;var r,t,e=i(),n=mr(),o=e.process,u=e.Deno,a=o&&o.versions||u&&u.version,f=a&&a.v8;return f&&(t=(r=f.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!t&&n&&(!(r=n.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=n.match(/Chrome\/(\d+)/))&&(t=+r[1]),V=t}function br(){if(W)return $;W=1;var r=wr(),t=p(),e=i().String;return $=!!Object.getOwnPropertySymbols&&!t((function(){var t=Symbol("symbol detection");return!e(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))}function Er(){if(Y)return G;Y=1;var r=br();return G=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function Sr(){if(K)return J;K=1;var r=gr(),t=pr(),e=yr(),n=Er(),i=Object;return J=n?function(r){return"symbol"==typeof r}:function(n){var o=r("Symbol");return t(o)&&e(o.prototype,i(n))}}function Rr(){if(X)return Q;X=1;var r=String;return Q=function(t){try{return r(t)}catch(e){return"Object"}}}function Ar(){if(rr)return Z;rr=1;var r=pr(),t=Rr(),e=TypeError;return Z=function(n){if(r(n))return n;throw new e(t(n)+" is not a function")}}function Or(){if(er)return tr;er=1;var r=Ar(),t=lr();return tr=function(e,n){var i=e[n];return t(i)?void 0:r(i)}}function Tr(){if(ir)return nr;ir=1;var r=y(),t=pr(),e=dr(),n=TypeError;return nr=function(i,o){var u,a;if("string"===o&&t(u=i.toString)&&!e(a=r(u,i)))return a;if(t(u=i.valueOf)&&!e(a=r(u,i)))return a;if("string"!==o&&t(u=i.toString)&&!e(a=r(u,i)))return a;throw new n("Can't convert object to primitive value")}}var Ir,xr,kr,Pr,Lr,Cr,Ur,Dr,jr,Mr,_r,Br,Nr,Fr,Hr,zr,Vr,qr,$r,Wr,Gr,Yr,Jr,Kr,Qr={exports:{}};function Xr(){return xr?Ir:(xr=1,Ir=!1)}function Zr(){if(Pr)return kr;Pr=1;var r=i(),t=Object.defineProperty;return kr=function(e,n){try{t(r,e,{value:n,configurable:!0,writable:!0})}catch(i){r[e]=n}return n}}function rt(){if(Lr)return Qr.exports;Lr=1;var r=Xr(),t=i(),e=Zr(),n="__core-js_shared__",o=Qr.exports=t[n]||e(n,{});return(o.versions||(o.versions=[])).push({version:"3.40.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.40.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Qr.exports}function tt(){if(Ur)return Cr;Ur=1;var r=rt();return Cr=function(t,e){return r[t]||(r[t]=e||{})}}function et(){if(jr)return Dr;jr=1;var r=hr(),t=Object;return Dr=function(e){return t(r(e))}}function nt(){if(_r)return Mr;_r=1;var r=fr(),t=et(),e=r({}.hasOwnProperty);return Mr=Object.hasOwn||function(r,n){return e(t(r),n)}}function it(){if(Nr)return Br;Nr=1;var r=fr(),t=0,e=Math.random(),n=r(1..toString);return Br=function(r){return"Symbol("+(void 0===r?"":r)+")_"+n(++t+e,36)}}function ot(){if(Hr)return Fr;Hr=1;var r=i(),t=tt(),e=nt(),n=it(),o=br(),u=Er(),a=r.Symbol,f=t("wks"),c=u?a.for||a:a&&a.withoutSetter||n;return Fr=function(r){return e(f,r)||(f[r]=o&&e(a,r)?a[r]:c("Symbol."+r)),f[r]}}function ut(){if(Vr)return zr;Vr=1;var r=y(),t=dr(),e=Sr(),n=Or(),i=Tr(),o=ot(),u=TypeError,a=o("toPrimitive");return zr=function(o,f){if(!t(o)||e(o))return o;var c,s=n(o,a);if(s){if(void 0===f&&(f="default"),c=r(s,o,f),!t(c)||e(c))return c;throw new u("Can't convert object to primitive value")}return void 0===f&&(f="number"),i(o,f)}}function at(){if($r)return qr;$r=1;var r=ut(),t=Sr();return qr=function(e){var n=r(e,"string");return t(n)?n:n+""}}function ft(){if(Gr)return Wr;Gr=1;var r=i(),t=dr(),e=r.document,n=t(e)&&t(e.createElement);return Wr=function(r){return n?e.createElement(r):{}}}function ct(){if(Jr)return Yr;Jr=1;var r=d(),t=p(),e=ft();return Yr=!r&&!t((function(){return 7!==Object.defineProperty(e("div"),"a",{get:function(){return 7}}).a}))}function st(){if(Kr)return v;Kr=1;var r=d(),t=y(),e=ur(),n=ar(),i=vr(),o=at(),u=nt(),a=ct(),f=Object.getOwnPropertyDescriptor;return v.f=r?f:function(r,c){if(r=i(r),c=o(c),a)try{return f(r,c)}catch(s){}if(u(r,c))return n(!t(e.f,r,c),r[c])},v}var lt,ht,vt,pt,dt,gt,yt,mt={};function wt(){if(ht)return lt;ht=1;var r=d(),t=p();return lt=r&&t((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))}function bt(){if(pt)return vt;pt=1;var r=dr(),t=String,e=TypeError;return vt=function(n){if(r(n))return n;throw new e(t(n)+" is not an object")}}function Et(){if(dt)return mt;dt=1;var r=d(),t=ct(),e=wt(),n=bt(),i=at(),o=TypeError,u=Object.defineProperty,a=Object.getOwnPropertyDescriptor,f="enumerable",c="configurable",s="writable";return mt.f=r?e?function(r,t,e){if(n(r),t=i(t),n(e),"function"==typeof r&&"prototype"===t&&"value"in e&&s in e&&!e[s]){var o=a(r,t);o&&o[s]&&(r[t]=e.value,e={configurable:c in e?e[c]:o[c],enumerable:f in e?e[f]:o[f],writable:!1})}return u(r,t,e)}:u:function(r,e,a){if(n(r),e=i(e),n(a),t)try{return u(r,e,a)}catch(f){}if("get"in a||"set"in a)throw new o("Accessors not supported");return"value"in a&&(r[e]=a.value),r},mt}function St(){if(yt)return gt;yt=1;var r=d(),t=Et(),e=ar();return gt=r?function(r,n,i){return t.f(r,n,e(1,i))}:function(r,t,e){return r[t]=e,r}}var Rt,At,Ot,Tt,It,xt,kt,Pt,Lt,Ct,Ut,Dt,jt,Mt,_t,Bt={exports:{}};function Nt(){if(At)return Rt;At=1;var r=d(),t=nt(),e=Function.prototype,n=r&&Object.getOwnPropertyDescriptor,i=t(e,"name"),o=i&&"something"===function(){}.name,u=i&&(!r||r&&n(e,"name").configurable);return Rt={EXISTS:i,PROPER:o,CONFIGURABLE:u}}function Ft(){if(Tt)return Ot;Tt=1;var r=fr(),t=pr(),e=rt(),n=r(Function.toString);return t(e.inspectSource)||(e.inspectSource=function(r){return n(r)}),Ot=e.inspectSource}function Ht(){if(Pt)return kt;Pt=1;var r=tt(),t=it(),e=r("keys");return kt=function(r){return e[r]||(e[r]=t(r))}}function zt(){return Ct?Lt:(Ct=1,Lt={})}function Vt(){if(Dt)return Ut;Dt=1;var r,t,e,n=function(){if(xt)return It;xt=1;var r=i(),t=pr(),e=r.WeakMap;return It=t(e)&&/native code/.test(String(e))}(),o=i(),u=dr(),a=St(),f=nt(),c=rt(),s=Ht(),l=zt(),h="Object already initialized",v=o.TypeError,p=o.WeakMap;if(n||c.state){var d=c.state||(c.state=new p);d.get=d.get,d.has=d.has,d.set=d.set,r=function(r,t){if(d.has(r))throw new v(h);return t.facade=r,d.set(r,t),t},t=function(r){return d.get(r)||{}},e=function(r){return d.has(r)}}else{var g=s("state");l[g]=!0,r=function(r,t){if(f(r,g))throw new v(h);return t.facade=r,a(r,g,t),t},t=function(r){return f(r,g)?r[g]:{}},e=function(r){return f(r,g)}}return Ut={set:r,get:t,has:e,enforce:function(n){return e(n)?t(n):r(n,{})},getterFor:function(r){return function(e){var n;if(!u(e)||(n=t(e)).type!==r)throw new v("Incompatible receiver, "+r+" required");return n}}}}function qt(){if(jt)return Bt.exports;jt=1;var r=fr(),t=p(),e=pr(),n=nt(),i=d(),o=Nt().CONFIGURABLE,u=Ft(),a=Vt(),f=a.enforce,c=a.get,s=String,l=Object.defineProperty,h=r("".slice),v=r("".replace),g=r([].join),y=i&&!t((function(){return 8!==l((function(){}),"length",{value:8}).length})),m=String(String).split("String"),w=Bt.exports=function(r,t,e){"Symbol("===h(s(t),0,7)&&(t="["+v(s(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),e&&e.getter&&(t="get "+t),e&&e.setter&&(t="set "+t),(!n(r,"name")||o&&r.name!==t)&&(i?l(r,"name",{value:t,configurable:!0}):r.name=t),y&&e&&n(e,"arity")&&r.length!==e.arity&&l(r,"length",{value:e.arity});try{e&&n(e,"constructor")&&e.constructor?i&&l(r,"prototype",{writable:!1}):r.prototype&&(r.prototype=void 0)}catch(a){}var u=f(r);return n(u,"source")||(u.source=g(m,"string"==typeof t?t:"")),r};return Function.prototype.toString=w((function(){return e(this)&&c(this).source||u(this)}),"toString"),Bt.exports}function $t(){if(_t)return Mt;_t=1;var r=pr(),t=Et(),e=qt(),n=Zr();return Mt=function(i,o,u,a){a||(a={});var f=a.enumerable,c=void 0!==a.name?a.name:o;if(r(u)&&e(u,c,a),a.global)f?i[o]=u:n(o,u);else{try{a.unsafe?i[o]&&(f=!0):delete i[o]}catch(s){}f?i[o]=u:t.f(i,o,{value:u,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return i}}var Wt,Gt,Yt,Jt,Kt,Qt,Xt,Zt,re,te,ee,ne,ie,oe,ue,ae,fe,ce={};function se(){if(Jt)return Yt;Jt=1;var r=function(){if(Gt)return Wt;Gt=1;var r=Math.ceil,t=Math.floor;return Wt=Math.trunc||function(e){var n=+e;return(n>0?t:r)(n)}}();return Yt=function(t){var e=+t;return e!=e||0===e?0:r(e)}}function le(){if(Qt)return Kt;Qt=1;var r=se(),t=Math.max,e=Math.min;return Kt=function(n,i){var o=r(n);return o<0?t(o+i,0):e(o,i)}}function he(){if(Zt)return Xt;Zt=1;var r=se(),t=Math.min;return Xt=function(e){var n=r(e);return n>0?t(n,9007199254740991):0}}function ve(){if(te)return re;te=1;var r=he();return re=function(t){return r(t.length)}}function pe(){if(ne)return ee;ne=1;var r=vr(),t=le(),e=ve(),n=function(n){return function(i,o,u){var a=r(i),f=e(a);if(0===f)return!n&&-1;var c,s=t(u,f);if(n&&o!=o){for(;f>s;)if((c=a[s++])!=c)return!0}else for(;f>s;s++)if((n||s in a)&&a[s]===o)return n||s||0;return!n&&-1}};return ee={includes:n(!0),indexOf:n(!1)}}function de(){if(oe)return ie;oe=1;var r=fr(),t=nt(),e=vr(),n=pe().indexOf,i=zt(),o=r([].push);return ie=function(r,u){var a,f=e(r),c=0,s=[];for(a in f)!t(i,a)&&t(f,a)&&o(s,a);for(;u.length>c;)t(f,a=u[c++])&&(~n(s,a)||o(s,a));return s}}function ge(){return ae?ue:(ae=1,ue=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function ye(){if(fe)return ce;fe=1;var r=de(),t=ge().concat("length","prototype");return ce.f=Object.getOwnPropertyNames||function(e){return r(e,t)},ce}var me,we,be,Ee,Se,Re,Ae,Oe,Te,Ie,xe,ke,Pe,Le,Ce,Ue,De,je,Me={};function _e(){return me||(me=1,Me.f=Object.getOwnPropertySymbols),Me}function Be(){if(be)return we;be=1;var r=gr(),t=fr(),e=ye(),n=_e(),i=bt(),o=t([].concat);return we=r("Reflect","ownKeys")||function(r){var t=e.f(i(r)),u=n.f;return u?o(t,u(r)):t}}function Ne(){if(Se)return Ee;Se=1;var r=nt(),t=Be(),e=st(),n=Et();return Ee=function(i,o,u){for(var a=t(o),f=n.f,c=e.f,s=0;sm&&c(o,arguments[m]),o}));if(A.prototype=S,"Error"!==b?i?i(A,R):o(A,R,{name:!0}):l&&y in E&&(u(A,E,y),u(A,E,"prepareStackTrace")),o(A,E),!h)try{S.name!==b&&e(S,"name",b),S.constructor=A}catch(O){}return A}},gn}!function(){if(mn)return wn;mn=1;var r=He(),t=i(),e=bn(),n=Cn(),o="WebAssembly",u=t[o],a=7!==new Error("e",{cause:7}).cause,f=function(t,e){var i={};i[t]=n(t,e,a),r({global:!0,constructor:!0,arity:1,forced:a},i)},c=function(t,e){if(u&&u[t]){var i={};i[t]=n(o+"."+t,e,a),r({target:o,stat:!0,constructor:!0,arity:1,forced:a},i)}};f("Error",(function(r){return function(t){return e(r,this,arguments)}})),f("EvalError",(function(r){return function(t){return e(r,this,arguments)}})),f("RangeError",(function(r){return function(t){return e(r,this,arguments)}})),f("ReferenceError",(function(r){return function(t){return e(r,this,arguments)}})),f("SyntaxError",(function(r){return function(t){return e(r,this,arguments)}})),f("TypeError",(function(r){return function(t){return e(r,this,arguments)}})),f("URIError",(function(r){return function(t){return e(r,this,arguments)}})),c("CompileError",(function(r){return function(t){return e(r,this,arguments)}})),c("LinkError",(function(r){return function(t){return e(r,this,arguments)}})),c("RuntimeError",(function(r){return function(t){return e(r,this,arguments)}}))}();var Un,Dn,jn,Mn,_n,Bn,Nn,Fn,Hn,zn,Vn,qn,$n,Wn,Gn,Yn,Jn,Kn,Qn,Xn,Zn,ri,ti,ei,ni,ii,oi,ui,ai={},fi={};function ci(){if(Dn)return Un;Dn=1;var r=de(),t=ge();return Un=Object.keys||function(e){return r(e,t)}}function si(){if(_n)return Mn;_n=1;var r=gr();return Mn=r("document","documentElement")}function li(){if(Nn)return Bn;Nn=1;var r,t=bt(),e=function(){if(jn)return fi;jn=1;var r=d(),t=wt(),e=Et(),n=bt(),i=vr(),o=ci();return fi.f=r&&!t?Object.defineProperties:function(r,t){n(r);for(var u,a=i(t),f=o(t),c=f.length,s=0;c>s;)e.f(r,u=f[s++],a[u]);return r},fi}(),n=ge(),i=zt(),o=si(),u=ft(),a=Ht(),f="prototype",c="script",s=a("IE_PROTO"),l=function(){},h=function(r){return"<"+c+">"+r+""},v=function(r){r.write(h("")),r.close();var t=r.parentWindow.Object;return r=null,t},p=function(){try{r=new ActiveXObject("htmlfile")}catch(s){}var t,e,i;p="undefined"!=typeof document?document.domain&&r?v(r):(e=u("iframe"),i="java"+c+":",e.style.display="none",o.appendChild(e),e.src=String(i),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F):v(r);for(var a=n.length;a--;)delete p[f][n[a]];return p()};return i[s]=!0,Bn=Object.create||function(r,n){var i;return null!==r?(l[f]=t(r),i=new l,l[f]=null,i[s]=r):i=p(),void 0===n?i:e.f(i,n)}}function hi(){if(Hn)return Fn;Hn=1;var r=ot(),t=li(),e=Et().f,n=r("unscopables"),i=Array.prototype;return void 0===i[n]&&e(i,n,{configurable:!0,value:t(null)}),Fn=function(r){i[n][r]=!0}}function vi(){return qn?Vn:(qn=1,Vn={})}function pi(){if(Yn)return Gn;Yn=1;var r=nt(),t=pr(),e=et(),n=Ht(),i=function(){if(Wn)return $n;Wn=1;var r=p();return $n=!r((function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}))}(),o=n("IE_PROTO"),u=Object,a=u.prototype;return Gn=i?u.getPrototypeOf:function(n){var i=e(n);if(r(i,o))return i[o];var f=i.constructor;return t(f)&&i instanceof f?f.prototype:i instanceof u?a:null}}function di(){if(Kn)return Jn;Kn=1;var r,t,e,n=p(),i=pr(),o=dr(),u=li(),a=pi(),f=$t(),c=ot(),s=Xr(),l=c("iterator"),h=!1;return[].keys&&("next"in(e=[].keys())?(t=a(a(e)))!==Object.prototype&&(r=t):h=!0),!o(r)||n((function(){var t={};return r[l].call(t)!==t}))?r={}:s&&(r=u(r)),i(r[l])||f(r,l,(function(){return this})),Jn={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}}function gi(){if(Xn)return Qn;Xn=1;var r=Et().f,t=nt(),e=ot()("toStringTag");return Qn=function(n,i,o){n&&!o&&(n=n.prototype),n&&!t(n,e)&&r(n,e,{configurable:!0,value:i})}}function yi(){if(ri)return Zn;ri=1;var r=di().IteratorPrototype,t=li(),e=ar(),n=gi(),i=vi(),o=function(){return this};return Zn=function(u,a,f,c){var s=a+" Iterator";return u.prototype=t(r,{next:e(+!c,f)}),n(u,s,!1,!0),i[s]=o,u}}function mi(){if(ei)return ti;ei=1;var r=He(),t=y(),e=Xr(),n=Nt(),i=pr(),o=yi(),u=pi(),a=An(),f=gi(),c=St(),s=$t(),l=ot(),h=vi(),v=di(),p=n.PROPER,d=n.CONFIGURABLE,g=v.IteratorPrototype,m=v.BUGGY_SAFARI_ITERATORS,w=l("iterator"),b="keys",E="values",S="entries",R=function(){return this};return ti=function(n,l,v,y,A,O,T){o(v,l,y);var I,x,k,P=function(r){if(r===A&&j)return j;if(!m&&r&&r in U)return U[r];switch(r){case b:case E:case S:return function(){return new v(this,r)}}return function(){return new v(this)}},L=l+" Iterator",C=!1,U=n.prototype,D=U[w]||U["@@iterator"]||A&&U[A],j=!m&&D||P(A),M="Array"===l&&U.entries||D;if(M&&(I=u(M.call(new n)))!==Object.prototype&&I.next&&(e||u(I)===g||(a?a(I,g):i(I[w])||s(I,w,R)),f(I,L,!0,!0),e&&(h[L]=R)),p&&A===E&&D&&D.name!==E&&(!e&&d?c(U,"name",E):(C=!0,j=function(){return t(D,this)})),A)if(x={values:P(E),keys:O?j:P(b),entries:P(S)},T)for(k in x)(m||C||!(k in U))&&s(U,k,x[k]);else r({target:l,proto:!0,forced:m||C},x);return e&&!T||U[w]===j||s(U,w,j,{name:A}),h[l]=j,x}}function wi(){return ii?ni:(ii=1,ni=function(r,t){return{value:r,done:t}})}function bi(){if(ui)return oi;ui=1;var r=vr(),t=hi(),e=vi(),n=Vt(),i=Et().f,o=mi(),u=wi(),a=Xr(),f=d(),c="Array Iterator",s=n.set,l=n.getterFor(c);oi=o(Array,"Array",(function(t,e){s(this,{type:c,target:r(t),index:0,kind:e})}),(function(){var r=l(this),t=r.target,e=r.index++;if(!t||e>=t.length)return r.target=null,u(void 0,!0);switch(r.kind){case"keys":return u(e,!1);case"values":return u(t[e],!1)}return u([e,t[e]],!1)}),"values");var h=e.Arguments=e.Array;if(t("keys"),t("values"),t("entries"),!a&&f&&"values"!==h.name)try{i(h,"name",{value:"values"})}catch(v){}return oi}!function(){if(zn)return ai;zn=1;var r=He(),t=pe().includes,e=p(),n=hi();r({target:"Array",proto:!0,forced:e((function(){return!Array(1).includes()}))},{includes:function(r){return t(this,r,arguments.length>1?arguments[1]:void 0)}}),n("includes")}(),bi();var Ei,Si,Ri,Ai,Oi,Ti,Ii,xi={};function ki(){if(Si)return Ei;Si=1;var r=cr();return Ei=Array.isArray||function(t){return"Array"===r(t)}}function Pi(){if(Ai)return Ri;Ai=1;var r=d(),t=ki(),e=TypeError,n=Object.getOwnPropertyDescriptor,i=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(r){return r instanceof TypeError}}();return Ri=i?function(r,i){if(t(r)&&!n(r,"length").writable)throw new e("Cannot set read only .length");return r.length=i}:function(r,t){return r.length=t}}function Li(){if(Ti)return Oi;Ti=1;var r=TypeError;return Oi=function(t){if(t>9007199254740991)throw r("Maximum allowed index exceeded");return t}}!function(){if(Ii)return xi;Ii=1;var r=He(),t=et(),e=ve(),n=Pi(),i=Li();r({target:"Array",proto:!0,arity:1,forced:p()((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(r){return r instanceof TypeError}}()},{push:function(r){var o=t(this),u=e(o),a=arguments.length;i(u+a);for(var f=0;f=0:v>p;p+=d)p in h&&(s=f(s,h[p],p,l));return s}};return Ci={left:u(!1),right:u(!0)}}().left,e=zi(),n=wr();r({target:"Array",proto:!0,forced:!qi()&&n>79&&n<83||!e("reduce")},{reduce:function(r){var e=arguments.length;return t(this,r,e,e>1?arguments[1]:void 0)}})}();var $i,Wi,Gi,Yi={};function Ji(){if(Wi)return $i;Wi=1;var r=Rr(),t=TypeError;return $i=function(e,n){if(!delete e[n])throw new t("Cannot delete property "+r(n)+" of "+r(e))}}!function(){if(Gi)return Yi;Gi=1;var r=He(),t=et(),e=ve(),n=Pi(),i=Ji(),o=Li();r({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(r){return r instanceof TypeError}}()},{unshift:function(r){var u=t(this),a=e(u),f=arguments.length;if(f){o(a+f);for(var c=a;c--;){var s=c+f;c in u?u[s]=u[c]:i(u,s)}for(var l=0;lm;m++)if((b=P(v[m]))&&u(h,b))return b;return new l(!1)}g=a(v,y)}for(E=O?v.next:g.next;!(S=t(E,g)).done;){try{b=P(S.value)}catch(L){c(g,"throw",L)}if("object"==typeof b&&b&&u(h,b))return b}return new l(!1)}}function Uu(){if(Ru)return Su;Ru=1;var r=ot()("iterator"),t=!1;try{var e=0,n={next:function(){return{done:!!e++}},return:function(){t=!0}};n[r]=function(){return this},Array.from(n,(function(){throw 2}))}catch(i){}return Su=function(e,n){try{if(!n&&!t)return!1}catch(i){return!1}var o=!1;try{var u={};u[r]=function(){return{next:function(){return{done:o=!0}}}},e(u)}catch(i){}return o}}function Du(){if(Ou)return Au;Ou=1;var r=uu(),t=Uu(),e=au().CONSTRUCTOR;return Au=e||!t((function(t){r.all(t).then(void 0,(function(){}))}))}var ju,Mu={};var _u,Bu={};var Nu,Fu={};var Hu,zu,Vu,qu,$u={};function Wu(){if(zu)return Hu;zu=1;var r=bt(),t=dr(),e=lu();return Hu=function(n,i){if(r(n),t(i)&&i.constructor===n)return i;var o=e.f(n);return(0,o.resolve)(i),o.promise}}qu||(qu=1,function(){if(cu)return qo;cu=1;var r,t,e,n=He(),o=Xr(),u=qi(),a=i(),f=y(),c=$t(),s=An(),l=gi(),h=$o(),v=Ar(),p=pr(),d=dr(),g=Wo(),m=Jo(),w=ru().set,b=nu(),E=iu(),S=ou(),R=eu(),A=Vt(),O=uu(),T=au(),I=lu(),x="Promise",k=T.CONSTRUCTOR,P=T.REJECTION_EVENT,L=T.SUBCLASSING,C=A.getterFor(x),U=A.set,D=O&&O.prototype,j=O,M=D,_=a.TypeError,B=a.document,N=a.process,F=I.f,H=F,z=!!(B&&B.createEvent&&a.dispatchEvent),V="unhandledrejection",q=function(r){var t;return!(!d(r)||!p(t=r.then))&&t},$=function(r,t){var e,n,i,o=t.value,u=1===t.state,a=u?r.ok:r.fail,c=r.resolve,s=r.reject,l=r.domain;try{a?(u||(2===t.rejection&&K(t),t.rejection=1),!0===a?e=o:(l&&l.enter(),e=a(o),l&&(l.exit(),i=!0)),e===r.promise?s(new _("Promise-chain cycle")):(n=q(e))?f(n,e,c,s):c(e)):s(o)}catch(h){l&&!i&&l.exit(),s(h)}},W=function(r,t){r.notified||(r.notified=!0,b((function(){for(var e,n=r.reactions;e=n.get();)$(e,r);r.notified=!1,t&&!r.rejection&&Y(r)})))},G=function(r,t,e){var n,i;z?((n=B.createEvent("Event")).promise=t,n.reason=e,n.initEvent(r,!1,!0),a.dispatchEvent(n)):n={promise:t,reason:e},!P&&(i=a["on"+r])?i(n):r===V&&E("Unhandled promise rejection",e)},Y=function(r){f(w,a,(function(){var t,e=r.facade,n=r.value;if(J(r)&&(t=S((function(){u?N.emit("unhandledRejection",n,e):G(V,e,n)})),r.rejection=u||J(r)?2:1,t.error))throw t.value}))},J=function(r){return 1!==r.rejection&&!r.parent},K=function(r){f(w,a,(function(){var t=r.facade;u?N.emit("rejectionHandled",t):G("rejectionhandled",t,r.value)}))},Q=function(r,t,e){return function(n){r(t,n,e)}},X=function(r,t,e){r.done||(r.done=!0,e&&(r=e),r.value=t,r.state=2,W(r,!0))},Z=function(r,t,e){if(!r.done){r.done=!0,e&&(r=e);try{if(r.facade===t)throw new _("Promise can't be resolved itself");var n=q(t);n?b((function(){var e={done:!1};try{f(n,t,Q(Z,e,r),Q(X,e,r))}catch(i){X(e,i,r)}})):(r.value=t,r.state=1,W(r,!1))}catch(i){X({done:!1},i,r)}}};if(k&&(M=(j=function(t){g(this,M),v(t),f(r,this);var e=C(this);try{t(Q(Z,e),Q(X,e))}catch(n){X(e,n)}}).prototype,(r=function(r){U(this,{type:x,done:!1,notified:!1,parent:!1,reactions:new R,rejection:!1,state:0,value:null})}).prototype=c(M,"then",(function(r,t){var e=C(this),n=F(m(this,j));return e.parent=!0,n.ok=!p(r)||r,n.fail=p(t)&&t,n.domain=u?N.domain:void 0,0===e.state?e.reactions.add(n):b((function(){$(n,e)})),n.promise})),t=function(){var t=new r,e=C(t);this.promise=t,this.resolve=Q(Z,e),this.reject=Q(X,e)},I.f=F=function(r){return r===j||void 0===r?new t(r):H(r)},!o&&p(O)&&D!==Object.prototype)){e=D.then,L||c(D,"then",(function(r,t){var n=this;return new j((function(r,t){f(e,n,r,t)})).then(r,t)}),{unsafe:!0});try{delete D.constructor}catch(rr){}s&&s(D,M)}n({global:!0,constructor:!0,wrap:!0,forced:k},{Promise:j}),l(j,x,!1,!0),h(x)}(),function(){if(Tu)return Iu;Tu=1;var r=He(),t=y(),e=Ar(),n=lu(),i=ou(),o=Cu();r({target:"Promise",stat:!0,forced:Du()},{all:function(r){var u=this,a=n.f(u),f=a.resolve,c=a.reject,s=i((function(){var n=e(u.resolve),i=[],a=0,s=1;o(r,(function(r){var e=a++,o=!1;s++,t(n,u,r).then((function(r){o||(o=!0,i[e]=r,--s||f(i))}),c)})),--s||f(i)}));return s.error&&c(s.value),a.promise}})}(),function(){if(ju)return Mu;ju=1;var r=He(),t=Xr(),e=au().CONSTRUCTOR,n=uu(),i=gr(),o=pr(),u=$t(),a=n&&n.prototype;if(r({target:"Promise",proto:!0,forced:e,real:!0},{catch:function(r){return this.then(void 0,r)}}),!t&&o(n)){var f=i("Promise").prototype.catch;a.catch!==f&&u(a,"catch",f,{unsafe:!0})}}(),function(){if(_u)return Bu;_u=1;var r=He(),t=y(),e=Ar(),n=lu(),i=ou(),o=Cu();r({target:"Promise",stat:!0,forced:Du()},{race:function(r){var u=this,a=n.f(u),f=a.reject,c=i((function(){var n=e(u.resolve);o(r,(function(r){t(n,u,r).then(a.resolve,f)}))}));return c.error&&f(c.value),a.promise}})}(),function(){if(Nu)return Fu;Nu=1;var r=He(),t=lu();r({target:"Promise",stat:!0,forced:au().CONSTRUCTOR},{reject:function(r){var e=t.f(this);return(0,e.reject)(r),e.promise}})}(),function(){if(Vu)return $u;Vu=1;var r=He(),t=gr(),e=Xr(),n=uu(),i=au().CONSTRUCTOR,o=Wu(),u=t("Promise"),a=e&&!i;r({target:"Promise",stat:!0,forced:e||i},{resolve:function(r){return o(a&&this===u?n:this,r)}})}());var Gu,Yu={};!function(){if(Gu)return Yu;Gu=1;var r=He(),t=i(),e=gi();r({global:!0},{Reflect:{}}),e(t.Reflect,"Reflect",!0)}();var Ju,Ku,Qu,Xu,Zu,ra,ta,ea,na,ia,oa,ua,aa,fa={};function ca(){if(Ku)return Ju;Ku=1;var r=dr(),t=cr(),e=ot()("match");return Ju=function(n){var i;return r(n)&&(void 0!==(i=n[e])?!!i:"RegExp"===t(n))}}function sa(){if(Xu)return Qu;Xu=1;var r=bt();return Qu=function(){var t=r(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}}function la(){if(ra)return Zu;ra=1;var r=y(),t=nt(),e=yr(),n=sa(),i=RegExp.prototype;return Zu=function(o){var u=o.flags;return void 0!==u||"flags"in i||t(o,"flags")||!e(i,o)?u:r(n,o)}}function ha(){if(ea)return ta;ea=1;var r=p(),t=i().RegExp,e=r((function(){var r=t("a","y");return r.lastIndex=2,null!==r.exec("abcd")})),n=e||r((function(){return!t("a","y").sticky})),o=e||r((function(){var r=t("^r","gy");return r.lastIndex=2,null!==r.exec("str")}));return ta={BROKEN_CARET:o,MISSED_STICKY:n,UNSUPPORTED_Y:e}}function va(){if(ia)return na;ia=1;var r=p(),t=i().RegExp;return na=r((function(){var r=t(".","s");return!(r.dotAll&&r.test("\n")&&"s"===r.flags)}))}function pa(){if(ua)return oa;ua=1;var r=p(),t=i().RegExp;return oa=r((function(){var r=t("(?b)","g");return"b"!==r.exec("b").groups.a||"bc"!=="b".replace(r,"$c")}))}!function(){if(aa)return fa;aa=1;var r=d(),t=i(),e=fr(),n=Fe(),o=Tn(),u=St(),a=li(),f=ye().f,c=yr(),s=ca(),l=Ve(),h=la(),v=ha(),g=On(),y=$t(),m=p(),w=nt(),b=Vt().enforce,E=$o(),S=ot(),R=va(),A=pa(),O=S("match"),T=t.RegExp,I=T.prototype,x=t.SyntaxError,k=e(I.exec),P=e("".charAt),L=e("".replace),C=e("".indexOf),U=e("".slice),D=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,j=/a/g,M=/a/g,_=new T(j)!==j,B=v.MISSED_STICKY,N=v.UNSUPPORTED_Y,F=r&&(!_||B||R||A||m((function(){return M[O]=!1,T(j)!==j||T(M)===M||"/a/i"!==String(T(j,"i"))})));if(n("RegExp",F)){for(var H=function(r,t){var e,n,i,f,v,p,d=c(I,this),g=s(r),y=void 0===t,m=[],E=r;if(!d&&g&&y&&r.constructor===H)return r;if((g||c(I,r))&&(r=r.source,y&&(t=h(E))),r=void 0===r?"":l(r),t=void 0===t?"":l(t),E=r,R&&"dotAll"in j&&(n=!!t&&C(t,"s")>-1)&&(t=L(t,/s/g,"")),e=t,B&&"sticky"in j&&(i=!!t&&C(t,"y")>-1)&&N&&(t=L(t,/y/g,"")),A&&(f=function(r){for(var t,e=r.length,n=0,i="",o=[],u=a(null),f=!1,c=!1,s=0,l="";n<=e;n++){if("\\"===(t=P(r,n)))t+=P(r,++n);else if("]"===t)f=!1;else if(!f)switch(!0){case"["===t:f=!0;break;case"("===t:if(i+=t,"?:"===U(r,n+1,n+3))continue;k(D,U(r,n+1))&&(n+=2,c=!0),s++;continue;case">"===t&&c:if(""===l||w(u,l))throw new x("Invalid capture group name");u[l]=!0,o[o.length]=[l,s],c=!1,l="";continue}c?l+=t:i+=t}return[i,o]}(r),r=f[0],m=f[1]),v=o(T(r,t),d?this:I,H),(n||i||m.length)&&(p=b(v),n&&(p.dotAll=!0,p.raw=H(function(r){for(var t,e=r.length,n=0,i="",o=!1;n<=e;n++)"\\"!==(t=P(r,n))?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),i+=t):i+="[\\s\\S]":i+=t+P(r,++n);return i}(r),e)),i&&(p.sticky=!0),m.length&&(p.groups=m)),r!==E)try{u(v,"source",""===E?"(?:)":E)}catch(S){}return v},z=f(T),V=0;z.length>V;)g(H,T,z[V++]);I.constructor=H,H.prototype=I,y(t,"RegExp",H,{constructor:!0})}E("RegExp")}();var da,ga={};!function(){if(da)return ga;da=1;var r=d(),t=va(),e=cr(),n=qe(),i=Vt().get,o=RegExp.prototype,u=TypeError;r&&t&&n(o,"dotAll",{configurable:!0,get:function(){if(this!==o){if("RegExp"===e(this))return!!i(this).dotAll;throw new u("Incompatible receiver, RegExp required")}}})}();var ya,ma,wa,ba={};function Ea(){if(ma)return ya;ma=1;var r,t,e=y(),n=fr(),i=Ve(),o=sa(),u=ha(),a=tt(),f=li(),c=Vt().get,s=va(),l=pa(),h=a("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,p=v,d=n("".charAt),g=n("".indexOf),m=n("".replace),w=n("".slice),b=(t=/b*/g,e(v,r=/a/,"a"),e(v,t,"a"),0!==r.lastIndex||0!==t.lastIndex),E=u.BROKEN_CARET,S=void 0!==/()??/.exec("")[1];return(b||S||E||s||l)&&(p=function(r){var t,n,u,a,s,l,y,R=this,A=c(R),O=i(r),T=A.raw;if(T)return T.lastIndex=R.lastIndex,t=e(p,T,O),R.lastIndex=T.lastIndex,t;var I=A.groups,x=E&&R.sticky,k=e(o,R),P=R.source,L=0,C=O;if(x&&(k=m(k,"y",""),-1===g(k,"g")&&(k+="g"),C=w(O,R.lastIndex),R.lastIndex>0&&(!R.multiline||R.multiline&&"\n"!==d(O,R.lastIndex-1))&&(P="(?: "+P+")",C=" "+C,L++),n=new RegExp("^(?:"+P+")",k)),S&&(n=new RegExp("^"+P+"$(?!\\s)",k)),b&&(u=R.lastIndex),a=e(v,x?n:R,C),x?a?(a.input=w(a.input,L),a[0]=w(a[0],L),a.index=R.lastIndex,R.lastIndex+=a[0].length):R.lastIndex=0:b&&a&&(R.lastIndex=R.global?a.index+a[0].length:u),S&&a&&a.length>1&&e(h,a[0],n,(function(){for(s=1;ss.size?o(s.getIterator(),(function(r){f(c,r)&&a(l,r)})):i(c,(function(r){s.includes(r)&&a(l,r)})),l}}();r({target:"Set",proto:!0,real:!0,forced:!tf()("intersection",(function(r){return 2===r.size&&r.has(1)&&r.has(2)}))||t((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}))},{intersection:e})}();var af,ff,cf,sf={};!function(){if(cf)return sf;cf=1;var r=He(),t=function(){if(ff)return af;ff=1;var r=Ya(),t=Ga().has,e=Xa(),n=rf(),i=Ka(),o=Ja(),u=Lu();return af=function(a){var f=r(this),c=n(a);if(e(f)<=c.size)return!1!==i(f,(function(r){if(c.includes(r))return!1}),!0);var s=c.getIterator();return!1!==o(s,(function(r){if(t(f,r))return u(s,"normal",!1)}))}}();r({target:"Set",proto:!0,real:!0,forced:!tf()("isDisjointFrom",(function(r){return!r}))},{isDisjointFrom:t})}();var lf,hf,vf,pf={};!function(){if(vf)return pf;vf=1;var r=He(),t=function(){if(hf)return lf;hf=1;var r=Ya(),t=Xa(),e=Ka(),n=rf();return lf=function(i){var o=r(this),u=n(i);return!(t(o)>u.size)&&!1!==e(o,(function(r){if(!u.includes(r))return!1}),!0)}}();r({target:"Set",proto:!0,real:!0,forced:!tf()("isSubsetOf",(function(r){return r}))},{isSubsetOf:t})}();var df,gf,yf,mf={};!function(){if(yf)return mf;yf=1;var r=He(),t=function(){if(gf)return df;gf=1;var r=Ya(),t=Ga().has,e=Xa(),n=rf(),i=Ja(),o=Lu();return df=function(u){var a=r(this),f=n(u);if(e(a)=v?r?"":void 0:(c=o(l,h))<55296||c>56319||h+1===v||(s=o(l,h+1))<56320||s>57343?r?i(l,h):c:r?u(l,h,h+2):s-56320+(c-55296<<10)+65536}};return kf={codeAt:a(!1),charAt:a(!0)}}function Ff(){if(Cf)return Lf;Cf=1;var r=Nf().charAt;return Lf=function(t,e,n){return e+(n?r(t,e).length:1)}}function Hf(){if(Df)return Uf;Df=1;var r=fr(),t=et(),e=Math.floor,n=r("".charAt),i=r("".replace),o=r("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,a=/\$([$&'`]|\d{1,2})/g;return Uf=function(r,f,c,s,l,h){var v=c+r.length,p=s.length,d=a;return void 0!==l&&(l=t(l),d=u),i(h,d,(function(t,i){var u;switch(n(i,0)){case"$":return"$";case"&":return r;case"`":return o(f,0,c);case"'":return o(f,v);case"<":u=l[o(i,1,-1)];break;default:var a=+i;if(0===a)return t;if(a>p){var h=e(a/10);return 0===h?t:h<=p?void 0===s[h-1]?n(i,1):s[h-1]+n(i,1):t}u=s[a-1]}return void 0===u?"":u}))}}!function(){if(_f)return Bf;_f=1;var r=bn(),t=y(),e=fr(),n=function(){if(xf)return If;xf=1,Sa();var r=y(),t=$t(),e=Ea(),n=p(),i=ot(),o=St(),u=i("species"),a=RegExp.prototype;return If=function(f,c,s,l){var h=i(f),v=!n((function(){var r={};return r[h]=function(){return 7},7!==""[f](r)})),p=v&&!n((function(){var r=!1,t=/a/;return"split"===f&&((t={}).constructor={},t.constructor[u]=function(){return t},t.flags="",t[h]=/./[h]),t.exec=function(){return r=!0,null},t[h](""),!r}));if(!v||!p||s){var d=/./[h],g=c(h,""[f],(function(t,n,i,o,u){var f=n.exec;return f===e||f===a.exec?v&&!u?{done:!0,value:r(d,n,i,o)}:{done:!0,value:r(t,i,n,o)}:{done:!1}}));t(String.prototype,f,g[0]),t(a,h,g[1])}l&&o(a[h],"sham",!0)}}(),i=p(),o=bt(),u=pr(),a=lr(),f=se(),c=he(),s=Ve(),l=hr(),h=Ff(),v=Or(),d=Hf(),g=function(){if(Mf)return jf;Mf=1;var r=y(),t=bt(),e=pr(),n=cr(),i=Ea(),o=TypeError;return jf=function(u,a){var f=u.exec;if(e(f)){var c=r(f,u,a);return null!==c&&t(c),c}if("RegExp"===n(u))return r(i,u,a);throw new o("RegExp#exec called on incompatible receiver")}}(),m=ot()("replace"),w=Math.max,b=Math.min,E=e([].concat),S=e([].push),R=e("".indexOf),A=e("".slice),O="$0"==="a".replace(/./,"$0"),T=!!/./[m]&&""===/./[m]("a","$0");n("replace",(function(e,n,i){var p=T?"$":"$0";return[function(r,e){var i=l(this),o=a(r)?void 0:v(r,m);return o?t(o,r,i,e):t(n,s(i),r,e)},function(t,e){var a=o(this),l=s(t);if("string"==typeof e&&-1===R(e,p)&&-1===R(e,"$<")){var v=i(n,a,l,e);if(v.done)return v.value}var y=u(e);y||(e=s(e));var m,O=a.global;O&&(m=a.unicode,a.lastIndex=0);for(var T,I=[];null!==(T=g(a,l))&&(S(I,T),O);){""===s(T[0])&&(a.lastIndex=h(l,c(a.lastIndex),m))}for(var x,k="",P=0,L=0;L=P&&(k+=A(l,P,D)+C,P=D+U.length)}return k+A(l,P)}]}),!!i((function(){var r=/./;return r.exec=function(){var r=[];return r.groups={a:"7"},r},"7"!=="".replace(r,"$")}))||!O||T)}();var zf,Vf,qf,$f,Wf,Gf,Yf,Jf={};function Kf(){return Vf?zf:(Vf=1,zf="\t\n\v\f\r                 \u2028\u2029\ufeff")}!function(){if(Yf)return Jf;Yf=1;var r=He(),t=function(){if($f)return qf;$f=1;var r=fr(),t=hr(),e=Ve(),n=Kf(),i=r("".replace),o=RegExp("^["+n+"]+"),u=RegExp("(^|[^"+n+"])["+n+"]+$"),a=function(r){return function(n){var a=e(t(n));return 1&r&&(a=i(a,o,"")),2&r&&(a=i(a,u,"$1")),a}};return qf={start:a(1),end:a(2),trim:a(3)}}().trim,e=function(){if(Gf)return Wf;Gf=1;var r=Nt().PROPER,t=p(),e=Kf();return Wf=function(n){return t((function(){return!!e[n]()||"​…᠎"!=="​…᠎"[n]()||r&&e[n].name!==n}))}}();r({target:"String",proto:!0,forced:e("trim")},{trim:function(){return t(this)}})}();var Qf,Xf,Zf,rc,tc={};function ec(){if(Xf)return Qf;Xf=1;var r=d(),t=Et(),e=ar();return Qf=function(n,i,o){r?t.f(n,i,e(0,o)):n[i]=o}}rc||(rc=1,function(){if(Zf)return tc;Zf=1;var r=He(),t=i(),e=Wo(),n=bt(),o=pr(),u=pi(),a=qe(),f=ec(),c=p(),s=nt(),l=ot(),h=di().IteratorPrototype,v=d(),g=Xr(),y="constructor",m="Iterator",w=l("toStringTag"),b=TypeError,E=t[m],S=g||!o(E)||E.prototype!==h||!c((function(){E({})})),R=function(){if(e(this,h),u(this)===h)throw new b("Abstract class Iterator not directly constructable")},A=function(r,t){v?a(h,r,{configurable:!0,get:function(){return t},set:function(t){if(n(this),this===h)throw new b("You can't redefine this property");s(this,r)?this[r]=t:f(this,r,t)}}):h[r]=t};s(h,w)||A(w,m),!S&&s(h,y)&&h[y]!==Object||A(y,R),R.prototype=h,r({global:!0,constructor:!0,forced:S},{Iterator:R})}());var nc,ic,oc={};ic||(ic=1,function(){if(nc)return oc;nc=1;var r=He(),t=Cu(),e=Ar(),n=bt(),i=Za();r({target:"Iterator",proto:!0,real:!0},{every:function(r){n(this),e(r);var o=i(this),u=0;return!t(o,(function(t,e){if(!r(t,u++))return e()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}());var uc,ac,fc,cc,sc,lc,hc,vc,pc={};function dc(){if(ac)return uc;ac=1;var r=$t();return uc=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}}function gc(){if(cc)return fc;cc=1;var r=y(),t=li(),e=St(),n=dc(),i=ot(),o=Vt(),u=Or(),a=di().IteratorPrototype,f=wi(),c=Lu(),s=i("toStringTag"),l="IteratorHelper",h="WrapForValidIterator",v=o.set,p=function(e){var i=o.getterFor(e?h:l);return n(t(a),{next:function(){var r=i(this);if(e)return r.nextHandler();if(r.done)return f(void 0,!0);try{var t=r.nextHandler();return r.returnHandlerResult?t:f(t,r.done)}catch(n){throw r.done=!0,n}},return:function(){var t=i(this),n=t.iterator;if(t.done=!0,e){var o=u(n,"return");return o?r(o,n):f(void 0,!0)}if(t.inner)try{c(t.inner.iterator,"normal")}catch(a){return c(n,"throw",a)}return n&&c(n,"normal"),f(void 0,!0)}})},d=p(!0),g=p(!1);return e(g,s,"Iterator Helper"),fc=function(r,t,e){var n=function(n,i){i?(i.iterator=n.iterator,i.next=n.next):i=n,i.type=t?h:l,i.returnHandlerResult=!!e,i.nextHandler=r,i.counter=0,i.done=!1,v(this,i)};return n.prototype=t?d:g,n}}function yc(){if(lc)return sc;lc=1;var r=bt(),t=Lu();return sc=function(e,n,i,o){try{return o?n(r(i)[0],i[1]):n(i)}catch(u){t(e,"throw",u)}}}vc||(vc=1,function(){if(hc)return pc;hc=1;var r=He(),t=y(),e=Ar(),n=bt(),i=Za(),o=gc(),u=yc(),a=Xr(),f=o((function(){for(var r,e,i=this.iterator,o=this.predicate,a=this.next;;){if(r=n(t(a,i)),this.done=!!r.done)return;if(e=r.value,u(i,o,[e,this.counter++],!0))return e}}));r({target:"Iterator",proto:!0,real:!0,forced:a},{filter:function(r){return n(this),e(r),new f(i(this),{predicate:r})}})}());var mc,wc,bc={};wc||(wc=1,function(){if(mc)return bc;mc=1;var r=He(),t=Cu(),e=Ar(),n=bt(),i=Za();r({target:"Iterator",proto:!0,real:!0},{forEach:function(r){n(this),e(r);var o=i(this),u=0;t(o,(function(t){r(t,u++)}),{IS_RECORD:!0})}})}());var Ec,Sc,Rc,Ac,Oc={};function Tc(){if(Rc)return Oc;Rc=1;var r=He(),t=function(){if(Sc)return Ec;Sc=1;var r=y(),t=Ar(),e=bt(),n=Za(),i=gc(),o=yc(),u=i((function(){var t=this.iterator,n=e(r(this.next,t));if(!(this.done=!!n.done))return o(t,this.mapper,[n.value,this.counter++],!0)}));return Ec=function(r){return e(this),t(r),new u(n(this),{mapper:r})}}();return r({target:"Iterator",proto:!0,real:!0,forced:Xr()},{map:t}),Oc}Ac||(Ac=1,Tc());var Ic,xc,kc={};xc||(xc=1,function(){if(Ic)return kc;Ic=1;var r=He(),t=Cu(),e=Ar(),n=bt(),i=Za(),o=TypeError;r({target:"Iterator",proto:!0,real:!0},{reduce:function(r){n(this),e(r);var u=i(this),a=arguments.length<2,f=a?void 0:arguments[1],c=0;if(t(u,(function(t){a?(a=!1,f=t):f=r(f,t,c),c++}),{IS_RECORD:!0}),a)throw new o("Reduce of empty iterator with no initial value");return f}})}());var Pc,Lc,Cc={};Lc||(Lc=1,function(){if(Pc)return Cc;Pc=1;var r=He(),t=Cu(),e=Ar(),n=bt(),i=Za();r({target:"Iterator",proto:!0,real:!0},{some:function(r){n(this),e(r);var o=i(this),u=0;return t(o,(function(t,e){if(r(t,u++))return e()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}());var Uc,Dc,jc,Mc,_c,Bc={};!function(){if(_c)return Bc;_c=1;var r=i(),t=Dc?Uc:(Dc=1,Uc={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),e=function(){if(Mc)return jc;Mc=1;var r=ft()("span").classList,t=r&&r.constructor&&r.constructor.prototype;return jc=t===Object.prototype?void 0:t}(),n=bi(),o=St(),u=gi(),a=ot()("iterator"),f=n.values,c=function(r,e){if(r){if(r[a]!==f)try{o(r,a,f)}catch(c){r[a]=f}if(u(r,e,!0),t[e])for(var i in n)if(r[i]!==n[i])try{o(r,i,n[i])}catch(c){r[i]=n[i]}}};for(var s in t)c(r[s]&&r[s].prototype,s);c(e,"DOMTokenList")}();var Nc,Fc={};var Hc,zc,Vc,qc,$c={};function Wc(){if(zc)return Hc;zc=1;var r,t=i(),e=bn(),n=pr(),o=Vi(),u=mr(),a=io(),f=Xo(),c=t.Function,s=/MSIE .\./.test(u)||"BUN"===o&&((r=t.Bun.version.split(".")).length<3||"0"===r[0]&&(r[1]<3||"3"===r[1]&&"0"===r[2]));return Hc=function(r,t){var i=t?2:1;return s?function(o,u){var s=f(arguments.length,1)>i,l=n(o)?o:c(o),h=s?a(arguments,i):[],v=s?function(){e(l,this,h)}:l;return t?r(v,u):r(v)}:r},Hc}qc||(qc=1,function(){if(Nc)return Fc;Nc=1;var r=He(),t=i(),e=ru().clear;r({global:!0,bind:!0,enumerable:!0,forced:t.clearImmediate!==e},{clearImmediate:e})}(),function(){if(Vc)return $c;Vc=1;var r=He(),t=i(),e=ru().set,n=Wc(),o=t.setImmediate?n(e,!1):e;r({global:!0,bind:!0,enumerable:!0,forced:t.setImmediate!==o},{setImmediate:o})}());var Gc,Yc={};!function(){if(Gc)return Yc;Gc=1;var r=He(),t=i(),e=nu(),n=Ar(),o=Xo(),u=p(),a=d();r({global:!0,enumerable:!0,dontCallGetSet:!0,forced:u((function(){return a&&1!==Object.getOwnPropertyDescriptor(t,"queueMicrotask").value.length}))},{queueMicrotask:function(r){o(arguments.length,1),e(n(r))}})}();var Jc,Kc={};!function(){if(Jc)return Kc;Jc=1;var r=He(),t=i(),e=qe(),n=d(),o=TypeError,u=Object.defineProperty,a=t.self!==t;try{if(n){var f=Object.getOwnPropertyDescriptor(t,"self");!a&&f&&f.get&&f.enumerable||e(t,"self",{get:function(){return t},set:function(r){if(this!==t)throw new o("Illegal invocation");u(t,"self",{value:r,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else r({global:!0,simple:!0,forced:a},{self:t})}catch(c){}}();var Qc,Xc={};!function(){if(Qc)return Xc;Qc=1;var r=He(),t=fr(),e=ki(),n=t([].reverse),i=[1,2];r({target:"Array",proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return e(this)&&(this.length=this.length),n(this)}})}();var Zc,rs,ts,es,ns,is,os,us,as,fs={};function cs(){if(rs)return Zc;rs=1;var r=io(),t=Math.floor,e=function(n,i){var o=n.length;if(o<8)for(var u,a,f=1;f0;)n[a]=n[--a];a!==f++&&(n[a]=u)}else for(var c=t(o/2),s=e(r(n,0,c),i),l=e(r(n,c),i),h=s.length,v=l.length,p=0,d=0;p3)){if(l)return!0;if(v)return v<603;var r,t,e,n,i="";for(r=65;r<76;r++){switch(t=String.fromCharCode(r),r){case 66:case 69:case 70:case 72:e=3;break;case 68:case 71:e=4;break;default:e=2}for(n=0;n<47;n++)d.push({k:t+n,v:e})}for(d.sort((function(r,t){return t.v-r.v})),n=0;nu(e)?1:-1}}(r)),a=i(s),c=0;co||l!=l?c*(1/0):c*l}}function Ms(){if(Ts)return Os;Ts=1;var r=Array,t=Math.abs,e=Math.pow,n=Math.floor,i=Math.log,o=Math.LN2;return Os={pack:function(u,a,f){var c,s,l,h=r(f),v=8*f-a-1,p=(1<>1,g=23===a?e(2,-24)-e(2,-77):0,y=u<0||0===u&&1/u<0?1:0,m=0;for((u=t(u))!=u||u===1/0?(s=u!=u?1:0,c=p):(c=n(i(u)/o),u*(l=e(2,-c))<1&&(c--,l*=2),(u+=c+d>=1?g/l:g*e(2,1-d))*l>=2&&(c++,l/=2),c+d>=p?(s=0,c=p):c+d>=1?(s=(u*l-1)*e(2,a),c+=d):(s=u*e(2,d-1)*e(2,a),c=0));a>=8;)h[m++]=255&s,s/=256,a-=8;for(c=c<0;)h[m++]=255&c,c/=256,v-=8;return h[m-1]|=128*y,h},unpack:function(r,t){var n,i=r.length,o=8*i-t-1,u=(1<>1,f=o-7,c=i-1,s=r[c--],l=127&s;for(s>>=7;f>0;)l=256*l+r[c--],f-=8;for(n=l&(1<<-f)-1,l>>=-f,f+=t;f>0;)n=256*n+r[c--],f-=8;if(0===l)l=1-a;else{if(l===u)return n?NaN:s?-1/0:1/0;n+=e(2,t),l-=a}return(s?-1:1)*n*e(2,l-t)}}}function _s(){if(xs)return Is;xs=1;var r=et(),t=le(),e=ve();return Is=function(n){for(var i=r(this),o=e(i),u=arguments.length,a=t(u>1?arguments[1]:void 0,o),f=u>2?arguments[2]:void 0,c=void 0===f?o:t(f,o);c>a;)i[a++]=n;return i},Is}function Bs(){if(Ps)return ks;Ps=1;var r=i(),t=fr(),e=d(),n=Us(),o=Nt(),u=St(),a=qe(),f=dc(),c=p(),s=Wo(),l=se(),h=he(),v=Ds(),g=function(){if(As)return Rs;As=1;var r=js();return Rs=Math.fround||function(t){return r(t,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)}}(),y=Ms(),m=pi(),w=An(),b=_s(),E=io(),S=Tn(),R=Ne(),A=gi(),O=Vt(),T=o.PROPER,I=o.CONFIGURABLE,x="ArrayBuffer",k="DataView",P="prototype",L="Wrong index",C=O.getterFor(x),U=O.getterFor(k),D=O.set,j=r[x],M=j,_=M&&M[P],B=r[k],N=B&&B[P],F=Object.prototype,H=r.Array,z=r.RangeError,V=t(b),q=t([].reverse),$=y.pack,W=y.unpack,G=function(r){return[255&r]},Y=function(r){return[255&r,r>>8&255]},J=function(r){return[255&r,r>>8&255,r>>16&255,r>>24&255]},K=function(r){return r[3]<<24|r[2]<<16|r[1]<<8|r[0]},Q=function(r){return $(g(r),23,4)},X=function(r){return $(r,52,8)},Z=function(r,t,e){a(r[P],t,{configurable:!0,get:function(){return e(this)[t]}})},rr=function(r,t,e,n){var i=U(r),o=v(e),u=!!n;if(o+t>i.byteLength)throw new z(L);var a=i.bytes,f=o+i.byteOffset,c=E(a,f,f+t);return u?c:q(c)},tr=function(r,t,e,n,i,o){var u=U(r),a=v(e),f=n(+i),c=!!o;if(a+t>u.byteLength)throw new z(L);for(var s=u.bytes,l=a+u.byteOffset,h=0;h>24)},setUint8:function(r,t){ir(this,r,t<<24>>24)}},{unsafe:!0})}else _=(M=function(r){s(this,_);var t=v(r);D(this,{type:x,bytes:V(H(t),0),byteLength:t}),e||(this.byteLength=t,this.detached=!1)})[P],N=(B=function(r,t,n){s(this,N),s(r,_);var i=C(r),o=i.byteLength,u=l(t);if(u<0||u>o)throw new z("Wrong offset");if(u+(n=void 0===n?o-u:h(n))>o)throw new z("Wrong length");D(this,{type:k,buffer:r,byteLength:n,byteOffset:u,bytes:i.bytes}),e||(this.buffer=r,this.byteLength=n,this.byteOffset=u)})[P],e&&(Z(M,"byteLength",C),Z(B,"buffer",U),Z(B,"byteLength",U),Z(B,"byteOffset",U)),f(N,{getInt8:function(r){return rr(this,1,r)[0]<<24>>24},getUint8:function(r){return rr(this,1,r)[0]},getInt16:function(r){var t=rr(this,2,r,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(r){var t=rr(this,2,r,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(r){return K(rr(this,4,r,arguments.length>1&&arguments[1]))},getUint32:function(r){return K(rr(this,4,r,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(r){return W(rr(this,4,r,arguments.length>1&&arguments[1]),23)},getFloat64:function(r){return W(rr(this,8,r,arguments.length>1&&arguments[1]),52)},setInt8:function(r,t){tr(this,1,r,G,t)},setUint8:function(r,t){tr(this,1,r,G,t)},setInt16:function(r,t){tr(this,2,r,Y,t,arguments.length>2&&arguments[2])},setUint16:function(r,t){tr(this,2,r,Y,t,arguments.length>2&&arguments[2])},setInt32:function(r,t){tr(this,4,r,J,t,arguments.length>2&&arguments[2])},setUint32:function(r,t){tr(this,4,r,J,t,arguments.length>2&&arguments[2])},setFloat32:function(r,t){tr(this,4,r,Q,t,arguments.length>2&&arguments[2])},setFloat64:function(r,t){tr(this,8,r,X,t,arguments.length>2&&arguments[2])}});return A(M,x),A(B,k),ks={ArrayBuffer:M,DataView:B}}!function(){if(Ls)return Cs;Ls=1;var r=He(),t=Ko(),e=p(),n=Bs(),i=bt(),o=le(),u=he(),a=n.ArrayBuffer,f=n.DataView,c=f.prototype,s=t(a.prototype.slice),l=t(c.getUint8),h=t(c.setUint8);r({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:e((function(){return!new a(2).slice(1,void 0).byteLength}))},{slice:function(r,t){if(s&&void 0===t)return s(i(this),r);for(var e=i(this).byteLength,n=o(r,e),c=o(void 0===t?e:t,e),v=new a(u(c-n)),p=new f(this),d=new f(v),g=0;n92||"NODE"===n&&e>94||"BROWSER"===n&&e>97)return!1;var r=new ArrayBuffer(8),t=o(r,{transfer:[r]});return 0!==r.byteLength||8!==t.byteLength}))}function al(){if(rl)return Zs;rl=1;var r,t,e,n,o=i(),u=ol(),a=ul(),f=o.structuredClone,c=o.ArrayBuffer,s=o.MessageChannel,l=!1;if(a)l=function(r){f(r,{transfer:[r]})};else if(c)try{s||(r=u("worker_threads"))&&(s=r.MessageChannel),s&&(t=new s,e=new c(2),n=function(r){t.port1.postMessage(null,[r])},2===e.byteLength&&(n(e),0===e.byteLength&&(l=n)))}catch(h){}return Zs=l}function fl(){if(el)return tl;el=1;var r=i(),t=fr(),e=En(),n=Ds(),o=function(){if(Ys)return Gs;Ys=1;var r=Ws(),t=TypeError;return Gs=function(e){if(r(e))throw new t("ArrayBuffer is detached");return e}}(),u=$s(),a=al(),f=ul(),c=r.structuredClone,s=r.ArrayBuffer,l=r.DataView,h=Math.min,v=s.prototype,p=l.prototype,d=t(v.slice),g=e(v,"resizable","get"),y=e(v,"maxByteLength","get"),m=t(p.getInt8),w=t(p.setInt8);return tl=(f||a)&&function(r,t,e){var i,v=u(r),p=void 0===t?v:n(t),b=!g||!g(r);if(o(r),f&&(r=c(r,{transfer:[r]}),v===p&&(e||b)))return r;if(v>=p&&(!e||b))i=d(r,0,p);else{var E=e&&!b&&y?{maxByteLength:y(r)}:void 0;i=new s(p,E);for(var S=new l(r),R=new l(i),A=h(p,v),O=0;O2?n:r(e),u=new t(o);o>i;)u[i]=e[i++];return u},dl}!function(){if(wl)return bl;wl=1;var r=He(),t=function(){if(ml)return yl;ml=1;var r=Qo(),t=fr(),e=sr(),n=et(),i=at(),o=ve(),u=li(),a=El(),f=Array,c=t([].push);return yl=function(t,s,l,h){for(var v,p,d,g=n(t),y=e(g),m=r(s,l),w=u(null),b=o(y),E=0;b>E;E++)d=y[E],(p=i(m(d,E,g)))in w?c(w[p],d):w[p]=[d];if(h&&(v=h(g))!==f)for(p in w)w[p]=a(v,w[p]);return w}}(),e=hi();r({target:"Array",proto:!0},{group:function(r){return t(this,r,arguments.length>1?arguments[1]:void 0)}}),e("group")}();var Sl,Rl,Al={};Rl||(Rl=1,function(){if(Sl)return Al;Sl=1;var r=He(),t=Cu(),e=Ar(),n=bt(),i=Za();r({target:"Iterator",proto:!0,real:!0},{find:function(r){n(this),e(r);var o=i(this),u=0;return t(o,(function(t,e){if(r(t,u++))return e(t)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}})}());var Ol,Tl,Il={};Tl||(Tl=1,function(){if(Ol)return Il;Ol=1;var r=He(),t=bt(),e=Cu(),n=Za(),i=[].push;r({target:"Iterator",proto:!0,real:!0},{toArray:function(){var r=[];return e(n(t(this)),i,{that:r,IS_RECORD:!0}),r}})}());var xl,kl={};!function(){if(xl)return kl;xl=1;var r=He(),t=et(),e=ve(),n=se(),i=hi();r({target:"Array",proto:!0},{at:function(r){var i=t(this),o=e(i),u=n(r),a=u>=0?u:o+u;return a<0||a>=o?void 0:i[a]}}),i("at")}();var Pl,Ll,Cl,Ul,Dl,jl,Ml,_l={};function Bl(){if(Ul)return Cl;Ul=1;var r=ki(),t=Go(),e=dr(),n=ot()("species"),i=Array;return Cl=function(o){var u;return r(o)&&(u=o.constructor,(t(u)&&(u===i||r(u.prototype))||e(u)&&null===(u=u[n]))&&(u=void 0)),void 0===u?i:u}}function Nl(){if(jl)return Dl;jl=1;var r=Bl();return Dl=function(t,e){return new(r(t))(0===e?0:e)}}!function(){if(Ml)return _l;Ml=1;var r=He(),t=function(){if(Ll)return Pl;Ll=1;var r=ki(),t=ve(),e=Li(),n=Qo(),i=function(o,u,a,f,c,s,l,h){for(var v,p,d=c,g=0,y=!!l&&n(l,h);g0&&r(v)?(p=t(v),d=i(o,u,v,p,d,s-1)-1):(e(d+1),o[d]=v),d++),g++;return d};return Pl=i}(),e=et(),n=ve(),i=se(),o=Nl();r({target:"Array",proto:!0},{flat:function(){var r=arguments.length?arguments[0]:void 0,u=e(this),a=n(u),f=o(u,0);return f.length=t(f,u,u,a,0,void 0===r?1:i(r)),f}})}();var Fl;Fl||(Fl=1,hi()("flat"));var Hl,zl={};!function(){if(Hl)return zl;Hl=1;var r=He(),t=y(),e=Ar(),n=lu(),i=ou(),o=Cu();r({target:"Promise",stat:!0,forced:Du()},{allSettled:function(r){var u=this,a=n.f(u),f=a.resolve,c=a.reject,s=i((function(){var n=e(u.resolve),i=[],a=0,c=1;o(r,(function(r){var e=a++,o=!1;c++,t(n,u,r).then((function(r){o||(o=!0,i[e]={status:"fulfilled",value:r},--c||f(i))}),(function(r){o||(o=!0,i[e]={status:"rejected",reason:r},--c||f(i))}))})),--c||f(i)}));return s.error&&c(s.value),a.promise}})}();var Vl,ql={};!function(){if(Vl)return ql;Vl=1;var r=He(),t=fr(),e=hr(),n=se(),i=Ve(),o=p(),u=t("".charAt);r({target:"String",proto:!0,forced:o((function(){return"\ud842"!=="𠮷".at(-2)}))},{at:function(r){var t=i(e(this)),o=t.length,a=n(r),f=a>=0?a:o+a;return f<0||f>=o?void 0:u(t,f)}})}();var $l,Wl={};!function(){if($l)return Wl;$l=1;var r=He(),t=y(),e=fr(),n=hr(),i=pr(),o=lr(),u=ca(),a=Ve(),f=Or(),c=la(),s=Hf(),l=ot(),h=Xr(),v=l("replace"),p=TypeError,d=e("".indexOf),g=e("".replace),m=e("".slice),w=Math.max;r({target:"String",proto:!0},{replaceAll:function(r,e){var l,y,b,E,S,R,A,O,T,I,x=n(this),k=0,P="";if(!o(r)){if((l=u(r))&&(y=a(n(c(r))),!~d(y,"g")))throw new p("`.replaceAll` does not allow non-global regexes");if(b=f(r,v))return t(b,r,x,e);if(h&&l)return g(a(x),r,e)}for(E=a(x),S=a(r),(R=i(e))||(e=a(e)),A=S.length,O=w(1,A),T=d(E,S);-1!==T;)I=R?a(e(S,T,E)):s(S,E,T,[],void 0,e),P+=m(E,k,T)+I,k=T+A,T=T+O>E.length?-1:d(E,S,T+O);return k255?255:255&e}}function Eh(){if(uh)return oh;uh=1;var r=ze();return oh=function(t){var e=r(t);return"BigInt64Array"===e||"BigUint64Array"===e}}function Sh(){if(fh)return ah;fh=1;var r=ut(),t=TypeError;return ah=function(e){var n=r(e,"number");if("number"==typeof n)throw new t("Can't convert number to bigint");return BigInt(n)}}function Rh(){if(sh)return ch;sh=1;var r=Qo(),t=y(),e=Yo(),n=et(),i=ve(),o=Pu(),u=ku(),a=xu(),f=Eh(),c=gh().aTypedArrayConstructor,s=Sh();return ch=function(l){var h,v,p,d,g,y,m,w,b=e(this),E=n(l),S=arguments.length,R=S>1?arguments[1]:void 0,A=void 0!==R,O=u(E);if(O&&!a(O))for(w=(m=o(E,O)).next,E=[];!(y=t(w,m)).done;)E.push(y.value);for(A&&S>2&&(R=r(R,arguments[2])),v=i(E),p=new(c(b))(v),d=f(p),h=0;v>h;h++)g=A?R(E[h],h):E[h],p[h]=d?s(g):+g;return p},ch}function Ah(){if(vh)return dh.exports;vh=1;var r=He(),t=i(),e=y(),n=d(),o=function(){if(Kl)return Jl;Kl=1;var r=i(),t=p(),e=Uu(),n=gh().NATIVE_ARRAY_BUFFER_VIEWS,o=r.ArrayBuffer,u=r.Int8Array;return Jl=!n||!t((function(){u(1)}))||!t((function(){new u(-1)}))||!e((function(r){new u,new u(null),new u(1.5),new u(r)}),!0)||t((function(){return 1!==new u(new o(2),1,void 0).length}))}(),u=gh(),a=Bs(),f=Wo(),c=ar(),s=St(),l=yh(),h=he(),v=Ds(),g=wh(),m=bh(),w=at(),b=nt(),E=ze(),S=dr(),R=Sr(),A=li(),O=yr(),T=An(),I=ye().f,x=Rh(),k=function(){if(hh)return lh;hh=1;var r=Qo(),t=fr(),e=sr(),n=et(),i=ve(),o=Nl(),u=t([].push),a=function(t){var a=1===t,f=2===t,c=3===t,s=4===t,l=6===t,h=7===t,v=5===t||l;return function(p,d,g,y){for(var m,w,b=n(p),E=e(b),S=i(E),R=r(d,g),A=0,O=y||o,T=a?O(p,S):f||h?O(p,0):void 0;S>A;A++)if((v||A in E)&&(w=R(m=E[A],A,b),t))if(a)T[A]=w;else if(w)switch(t){case 3:return!0;case 5:return m;case 6:return A;case 2:u(T,m)}else switch(t){case 4:return!1;case 7:u(T,m)}return l?-1:c||s?s:T}};return lh={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)}}().forEach,P=$o(),L=qe(),C=Et(),U=st(),D=El(),j=Vt(),M=Tn(),_=j.get,B=j.set,N=j.enforce,F=C.f,H=U.f,z=t.RangeError,V=a.ArrayBuffer,q=V.prototype,$=a.DataView,W=u.NATIVE_ARRAY_BUFFER_VIEWS,G=u.TYPED_ARRAY_TAG,Y=u.TypedArray,J=u.TypedArrayPrototype,K=u.isTypedArray,Q="BYTES_PER_ELEMENT",X="Wrong length",Z=function(r,t){L(r,t,{configurable:!0,get:function(){return _(this)[t]}})},rr=function(r){var t;return O(q,r)||"ArrayBuffer"===(t=E(r))||"SharedArrayBuffer"===t},tr=function(r,t){return K(r)&&!R(t)&&t in r&&l(+t)&&t>=0},er=function(r,t){return t=w(t),tr(r,t)?c(2,r[t]):H(r,t)},nr=function(r,t,e){return t=w(t),!(tr(r,t)&&S(e)&&b(e,"value"))||b(e,"get")||b(e,"set")||e.configurable||b(e,"writable")&&!e.writable||b(e,"enumerable")&&!e.enumerable?F(r,t,e):(r[t]=e.value,r)};return n?(W||(U.f=er,C.f=nr,Z(J,"buffer"),Z(J,"byteOffset"),Z(J,"byteLength"),Z(J,"length")),r({target:"Object",stat:!0,forced:!W},{getOwnPropertyDescriptor:er,defineProperty:nr}),dh.exports=function(n,i,u){var a=n.match(/\d+/)[0]/8,c=n+(u?"Clamped":"")+"Array",l="get"+n,p="set"+n,d=t[c],y=d,w=y&&y.prototype,b={},E=function(r,t){F(r,t,{get:function(){return function(r,t){var e=_(r);return e.view[l](t*a+e.byteOffset,!0)}(this,t)},set:function(r){return function(r,t,e){var n=_(r);n.view[p](t*a+n.byteOffset,u?m(e):e,!0)}(this,t,r)},enumerable:!0})};W?o&&(y=i((function(r,t,n,i){return f(r,w),M(S(t)?rr(t)?void 0!==i?new d(t,g(n,a),i):void 0!==n?new d(t,g(n,a)):new d(t):K(t)?D(y,t):e(x,y,t):new d(v(t)),r,y)})),T&&T(y,Y),k(I(d),(function(r){r in y||s(y,r,d[r])})),y.prototype=w):(y=i((function(r,t,n,i){f(r,w);var o,u,c,s=0,l=0;if(S(t)){if(!rr(t))return K(t)?D(y,t):e(x,y,t);o=t,l=g(n,a);var p=t.byteLength;if(void 0===i){if(p%a)throw new z(X);if((u=p-l)<0)throw new z(X)}else if((u=h(i)*a)+l>p)throw new z(X);c=u/a}else c=v(t),o=new V(u=c*a);for(B(r,{buffer:o,byteOffset:l,byteLength:u,length:c,view:new $(o)});s=0?u:o+u;return a<0||a>=o?void 0:i[a]}))}();var Ih,xh={};!function(){if(Ih)return xh;Ih=1;var r=gh(),t=_s(),e=Sh(),n=ze(),i=y(),o=fr(),u=p(),a=r.aTypedArray,f=r.exportTypedArrayMethod,c=o("".slice);f("fill",(function(r){var o=arguments.length;a(this);var u="Big"===c(n(this),0,3)?e(r):+r;return i(t,this,u,o>1?arguments[1]:void 0,o>2?arguments[2]:void 0)}),u((function(){var r=0;return new Int8Array(2).fill({valueOf:function(){return r++}}),1!==r})))}();var kh,Ph,Lh,Ch={};function Uh(){if(Ph)return kh;Ph=1;var r=Qo(),t=sr(),e=et(),n=ve(),i=function(i){var o=1===i;return function(u,a,f){for(var c,s=e(u),l=t(s),h=n(l),v=r(a,f);h-- >0;)if(v(c=l[h],h,s))switch(i){case 0:return c;case 1:return h}return o?-1:void 0}};return kh={findLast:i(0),findLastIndex:i(1)}}!function(){if(Lh)return Ch;Lh=1;var r=gh(),t=Uh().findLast,e=r.aTypedArray;(0,r.exportTypedArrayMethod)("findLast",(function(r){return t(e(this),r,arguments.length>1?arguments[1]:void 0)}))}();var Dh,jh={};!function(){if(Dh)return jh;Dh=1;var r=gh(),t=Uh().findLastIndex,e=r.aTypedArray;(0,r.exportTypedArrayMethod)("findLastIndex",(function(r){return t(e(this),r,arguments.length>1?arguments[1]:void 0)}))}();var Mh,_h={};!function(){if(Mh)return _h;Mh=1;var r=i(),t=y(),e=gh(),n=ve(),o=wh(),u=et(),a=p(),f=r.RangeError,c=r.Int8Array,s=c&&c.prototype,l=s&&s.set,h=e.aTypedArray,v=e.exportTypedArrayMethod,d=!a((function(){var r=new Uint8ClampedArray(2);return t(l,r,{length:1,0:3},1),3!==r[1]})),g=d&&e.NATIVE_ARRAY_BUFFER_VIEWS&&a((function(){var r=new c(2);return r.set(1),r.set("2",1),0!==r[0]||2!==r[1]}));v("set",(function(r){h(this);var e=o(arguments.length>1?arguments[1]:void 0,1),i=u(r);if(d)return t(l,this,i,e);var a=this.length,c=n(i),s=0;if(c+e>a)throw new f("Wrong length");for(;s0&&1/e<0?1:-1:t>e}}(r))}),!y||g)}();var Fh,Hh,zh,Vh={};function qh(){if(Hh)return Fh;Hh=1;var r=ve();return Fh=function(t,e){for(var n=r(t),i=new e(n),o=0;o=a||c<0)throw new e("Incorrect index");for(var s=new i(a),l=0;l1&&!l(arguments[1])?g(arguments[1]):void 0,o=i?i.transfer:void 0;void 0!==o&&(e=function(r,t){if(!h(r))throw new D("Transfer option cannot be converted to a sequence");var e=[];d(r,(function(r){$(e,g(r))}));for(var i,o,u,a,f,l=0,v=E(e),p=new H;l1?arguments[1]:void 0,g=void 0!==d;g&&(d=r(d,p>2?arguments[2]:void 0));var y,m,w,b,E,S,R=c(h),A=0;if(!R||this===s&&i(R))for(y=u(h),m=v?new this(y):s(y);y>A;A++)S=g?d(h[A],A):h[A],a(m,A,S);else for(m=v?new this:[],E=(b=f(h,R)).next;!(w=t(E,b)).done;A++)S=g?n(b,d,[w.value,A],!0):w.value,a(m,A,S);return m.length=A,m},yv}function Ov(){if(bv)return wv;bv=1;var r=fr(),t=2147483647,e=/[^\0-\u007E]/,n=/[.\u3002\uFF0E\uFF61]/g,i="Overflow: input needs wider integers to process",o=RangeError,u=r(n.exec),a=Math.floor,f=String.fromCharCode,c=r("".charCodeAt),s=r([].join),l=r([].push),h=r("".replace),v=r("".split),p=r("".toLowerCase),d=function(r){return r+22+75*(r<26)},g=function(r,t,e){var n=0;for(r=e?a(r/700):r>>1,r+=a(r/t);r>455;)r=a(r/35),n+=36;return a(n+36*r/(r+38))},y=function(r){var e=[];r=function(r){for(var t=[],e=0,n=r.length;e=55296&&i<=56319&&e=v&&ua((t-p)/E))throw new o(i);for(p+=(b-v)*E,v=b,n=0;nt)throw new o(i);if(u===v){for(var S=p,R=36;;){var A=R<=y?1:R>=y+26?26:R-y;if(Sf;){if(t=+arguments[f++],e(t,1114111)!==t)throw new n(t+" is not a valid code point");o[f]=t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320)}return u(o,"")}})}();var r=He(),t=i(),e=tu(),n=gr(),o=y(),u=fr(),a=d(),f=Rv(),c=$t(),s=qe(),l=dc(),h=gi(),v=yi(),p=Vt(),g=Wo(),m=pr(),w=nt(),b=Qo(),E=ze(),S=bt(),R=dr(),A=Ve(),O=li(),T=ar(),I=Pu(),x=ku(),k=wi(),P=Xo(),L=ot(),C=cs(),U=L("iterator"),D="URLSearchParams",j=D+"Iterator",M=p.set,_=p.getterFor(D),B=p.getterFor(j),N=e("fetch"),F=e("Request"),H=e("Headers"),z=F&&F.prototype,V=H&&H.prototype,q=t.TypeError,$=t.encodeURIComponent,W=String.fromCharCode,G=n("String","fromCodePoint"),Y=parseInt,J=u("".charAt),K=u([].join),Q=u([].push),X=u("".replace),Z=u([].shift),rr=u([].splice),tr=u("".split),er=u("".slice),nr=u(/./.exec),ir=/\+/g,or=/^[0-9a-f]+$/i,ur=function(r,t){var e=er(r,t,t+2);return nr(or,e)?Y(e,16):NaN},cr=function(r){for(var t=0,e=128;e>0&&0!=(r&e);e>>=1)t++;return t},sr=function(r){var t=null;switch(r.length){case 1:t=r[0];break;case 2:t=(31&r[0])<<6|63&r[1];break;case 3:t=(15&r[0])<<12|(63&r[1])<<6|63&r[2];break;case 4:t=(7&r[0])<<18|(63&r[1])<<12|(63&r[2])<<6|63&r[3]}return t>1114111?null:t},lr=function(r){for(var t=(r=X(r,ir," ")).length,e="",n=0;nt){e+="%",n++;continue}var o=ur(r,n+1);if(o!=o){e+=i,n++;continue}n+=2;var u=cr(o);if(0===u)i=W(o);else{if(1===u||u>4){e+="�",n++;continue}for(var a=[o],f=1;ft||"%"!==J(r,n));){var c=ur(r,n+1);if(c!=c){n+=3;break}if(c>191||c<128)break;Q(a,c),n+=2,f++}if(a.length!==u){e+="�";continue}var s=sr(a);null===s?e+="�":i=G(s)}}e+=i,n++}return e},hr=/[!'()~]|%20/g,vr={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},yr=function(r){return vr[r]},mr=function(r){return X($(r),hr,yr)},wr=v((function(r,t){M(this,{type:j,target:_(r).entries,index:0,kind:t})}),D,(function(){var r=B(this),t=r.target,e=r.index++;if(!t||e>=t.length)return r.target=null,k(void 0,!0);var n=t[e];switch(r.kind){case"keys":return k(n.key,!1);case"values":return k(n.value,!1)}return k([n.key,n.value],!1)}),!0),br=function(r){this.entries=[],this.url=null,void 0!==r&&(R(r)?this.parseObject(r):this.parseQuery("string"==typeof r?"?"===J(r,0)?er(r,1):r:A(r)))};br.prototype={type:D,bindURL:function(r){this.url=r,this.update()},parseObject:function(r){var t,e,n,i,u,a,f,c=this.entries,s=x(r);if(s)for(e=(t=I(r,s)).next;!(n=o(e,t)).done;){if(u=(i=I(S(n.value))).next,(a=o(u,i)).done||(f=o(u,i)).done||!o(u,i).done)throw new q("Expected sequence with length 2");Q(c,{key:A(a.value),value:A(f.value)})}else for(var l in r)w(r,l)&&Q(c,{key:l,value:A(r[l])})},parseQuery:function(r){if(r)for(var t,e,n=this.entries,i=tr(r,"&"),o=0;o0?arguments[0]:void 0));a||(this.size=r.entries.length)},Sr=Er.prototype;if(l(Sr,{append:function(r,t){var e=_(this);P(arguments.length,2),Q(e.entries,{key:A(r),value:A(t)}),a||this.length++,e.updateURL()},delete:function(r){for(var t=_(this),e=P(arguments.length,1),n=t.entries,i=A(r),o=e<2?void 0:arguments[1],u=void 0===o?o:A(o),f=0;ft.key?1:-1})),r.updateURL()},forEach:function(r){for(var t,e=_(this).entries,n=b(r,arguments.length>1?arguments[1]:void 0),i=0;i1?Or(arguments[1]):{})}}),m(F)){var Tr=function(r){return g(this,z),new F(r,arguments.length>1?Or(arguments[1]):{})};z.constructor=Tr,Tr.prototype=z,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Tr})}}return Iv={URLSearchParams:Er,getState:_}}function Uv(){if(kv)return Ev;kv=1,function(){if(hv)return Sv;hv=1;var r=Nf().charAt,t=Ve(),e=Vt(),n=mi(),i=wi(),o="String Iterator",u=e.set,a=e.getterFor(o);n(String,"String",(function(r){u(this,{type:o,string:t(r),index:0})}),(function(){var t,e=a(this),n=e.string,o=e.index;return o>=n.length?i(void 0,!0):(t=r(n,o),e.index+=t.length,i(t,!1))}))}();var r,t=He(),e=d(),n=Rv(),o=i(),u=Qo(),a=fr(),f=$t(),c=qe(),s=Wo(),l=nt(),h=function(){if(gv)return dv;gv=1;var r=d(),t=fr(),e=y(),n=p(),i=ci(),o=_e(),u=ur(),a=et(),f=sr(),c=Object.assign,s=Object.defineProperty,l=t([].concat);return dv=!c||n((function(){if(r&&1!==c({b:1},c(s({},"a",{enumerable:!0,get:function(){s(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(r){e[r]=r})),7!==c({},t)[n]||i(c({},e)).join("")!==o}))?function(t,n){for(var c=a(t),s=arguments.length,h=1,v=o.f,p=u.f;s>h;)for(var d,g=f(arguments[h++]),y=v?l(i(g),v(g)):i(g),m=y.length,w=0;m>w;)d=y[w++],r&&!e(p,g,d)||(c[d]=g[d]);return c}:c,dv}(),v=Av(),g=io(),m=Nf().codeAt,w=Ov(),b=Ve(),E=gi(),S=Xo(),R=Cv(),A=Vt(),O=A.set,T=A.getterFor("URL"),I=R.URLSearchParams,x=R.getState,k=o.URL,P=o.TypeError,L=o.parseInt,C=Math.floor,U=Math.pow,D=a("".charAt),j=a(/./.exec),M=a([].join),_=a(1..toString),B=a([].pop),N=a([].push),F=a("".replace),H=a([].shift),z=a("".split),V=a("".slice),q=a("".toLowerCase),$=a([].unshift),W="Invalid scheme",G="Invalid host",Y="Invalid port",J=/[a-z]/i,K=/[\d+-.a-z]/i,Q=/\d/,X=/^0x/i,Z=/^[0-7]+$/,rr=/^\d+$/,tr=/^[\da-f]+$/i,er=/[\0\t\n\r #%/:<>?@[\\\]^|]/,nr=/[\0\t\n\r #/:<>?@[\\\]^|]/,ir=/^[\u0000-\u0020]+/,or=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ar=/[\t\n\r]/g,cr=function(r){var t,e,n,i;if("number"==typeof r){for(t=[],e=0;e<4;e++)$(t,r%256),r=C(r/256);return M(t,".")}if("object"==typeof r){for(t="",n=function(r){for(var t=null,e=1,n=null,i=0,o=0;o<8;o++)0!==r[o]?(i>e&&(t=n,e=i),n=null,i=0):(null===n&&(n=o),++i);return i>e?n:t}(r),e=0;e<8;e++)i&&0===r[e]||(i&&(i=!1),n===e?(t+=e?":":"::",i=!0):(t+=_(r[e],16),e<7&&(t+=":")));return"["+t+"]"}return r},lr={},hr=h({},lr,{" ":1,'"':1,"<":1,">":1,"`":1}),vr=h({},hr,{"#":1,"?":1,"{":1,"}":1}),pr=h({},vr,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),dr=function(r,t){var e=m(r,0);return e>32&&e<127&&!l(t,r)?r:encodeURIComponent(r)},gr={ftp:21,file:null,http:80,https:443,ws:80,wss:443},yr=function(r,t){var e;return 2===r.length&&j(J,D(r,0))&&(":"===(e=D(r,1))||!t&&"|"===e)},mr=function(r){var t;return r.length>1&&yr(V(r,0,2))&&(2===r.length||"/"===(t=D(r,2))||"\\"===t||"?"===t||"#"===t)},wr=function(r){return"."===r||"%2e"===q(r)},br={},Er={},Sr={},Rr={},Ar={},Or={},Tr={},Ir={},xr={},kr={},Pr={},Lr={},Cr={},Ur={},Dr={},jr={},Mr={},_r={},Br={},Nr={},Fr={},Hr=function(r,t,e){var n,i,o,u=b(r);if(t){if(i=this.parse(u))throw new P(i);this.searchParams=null}else{if(void 0!==e&&(n=new Hr(e,!0)),i=this.parse(u,null,n))throw new P(i);(o=x(new I)).bindURL(this),this.searchParams=o}};Hr.prototype={type:"URL",parse:function(t,e,n){var i,o,u,a,f,c=this,s=e||br,h=0,p="",d=!1,y=!1,m=!1;for(t=b(t),e||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,t=F(t,ir,""),t=F(t,or,"$1")),t=F(t,ar,""),i=v(t);h<=i.length;){switch(o=i[h],s){case br:if(!o||!j(J,o)){if(e)return W;s=Sr;continue}p+=q(o),s=Er;break;case Er:if(o&&(j(K,o)||"+"===o||"-"===o||"."===o))p+=q(o);else{if(":"!==o){if(e)return W;p="",s=Sr,h=0;continue}if(e&&(c.isSpecial()!==l(gr,p)||"file"===p&&(c.includesCredentials()||null!==c.port)||"file"===c.scheme&&!c.host))return;if(c.scheme=p,e)return void(c.isSpecial()&&gr[c.scheme]===c.port&&(c.port=null));p="","file"===c.scheme?s=Ur:c.isSpecial()&&n&&n.scheme===c.scheme?s=Rr:c.isSpecial()?s=Ir:"/"===i[h+1]?(s=Ar,h++):(c.cannotBeABaseURL=!0,N(c.path,""),s=Br)}break;case Sr:if(!n||n.cannotBeABaseURL&&"#"!==o)return W;if(n.cannotBeABaseURL&&"#"===o){c.scheme=n.scheme,c.path=g(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,s=Fr;break}s="file"===n.scheme?Ur:Or;continue;case Rr:if("/"!==o||"/"!==i[h+1]){s=Or;continue}s=xr,h++;break;case Ar:if("/"===o){s=kr;break}s=_r;continue;case Or:if(c.scheme=n.scheme,o===r)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.query=n.query;else if("/"===o||"\\"===o&&c.isSpecial())s=Tr;else if("?"===o)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.query="",s=Nr;else{if("#"!==o){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.path.length--,s=_r;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.query=n.query,c.fragment="",s=Fr}break;case Tr:if(!c.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,s=_r;continue}s=kr}else s=xr;break;case Ir:if(s=xr,"/"!==o||"/"!==D(p,h+1))continue;h++;break;case xr:if("/"!==o&&"\\"!==o){s=kr;continue}break;case kr:if("@"===o){d&&(p="%40"+p),d=!0,u=v(p);for(var w=0;w65535)return Y;c.port=c.isSpecial()&&R===gr[c.scheme]?null:R,p=""}if(e)return;s=Mr;continue}return Y}p+=o;break;case Ur:if(c.scheme="file","/"===o||"\\"===o)s=Dr;else{if(!n||"file"!==n.scheme){s=_r;continue}switch(o){case r:c.host=n.host,c.path=g(n.path),c.query=n.query;break;case"?":c.host=n.host,c.path=g(n.path),c.query="",s=Nr;break;case"#":c.host=n.host,c.path=g(n.path),c.query=n.query,c.fragment="",s=Fr;break;default:mr(M(g(i,h),""))||(c.host=n.host,c.path=g(n.path),c.shortenPath()),s=_r;continue}}break;case Dr:if("/"===o||"\\"===o){s=jr;break}n&&"file"===n.scheme&&!mr(M(g(i,h),""))&&(yr(n.path[0],!0)?N(c.path,n.path[0]):c.host=n.host),s=_r;continue;case jr:if(o===r||"/"===o||"\\"===o||"?"===o||"#"===o){if(!e&&yr(p))s=_r;else if(""===p){if(c.host="",e)return;s=Mr}else{if(a=c.parseHost(p))return a;if("localhost"===c.host&&(c.host=""),e)return;p="",s=Mr}continue}p+=o;break;case Mr:if(c.isSpecial()){if(s=_r,"/"!==o&&"\\"!==o)continue}else if(e||"?"!==o)if(e||"#"!==o){if(o!==r&&(s=_r,"/"!==o))continue}else c.fragment="",s=Fr;else c.query="",s=Nr;break;case _r:if(o===r||"/"===o||"\\"===o&&c.isSpecial()||!e&&("?"===o||"#"===o)){if(".."===(f=q(f=p))||"%2e."===f||".%2e"===f||"%2e%2e"===f?(c.shortenPath(),"/"===o||"\\"===o&&c.isSpecial()||N(c.path,"")):wr(p)?"/"===o||"\\"===o&&c.isSpecial()||N(c.path,""):("file"===c.scheme&&!c.path.length&&yr(p)&&(c.host&&(c.host=""),p=D(p,0)+":"),N(c.path,p)),p="","file"===c.scheme&&(o===r||"?"===o||"#"===o))for(;c.path.length>1&&""===c.path[0];)H(c.path);"?"===o?(c.query="",s=Nr):"#"===o&&(c.fragment="",s=Fr)}else p+=dr(o,vr);break;case Br:"?"===o?(c.query="",s=Nr):"#"===o?(c.fragment="",s=Fr):o!==r&&(c.path[0]+=dr(o,lr));break;case Nr:e||"#"!==o?o!==r&&("'"===o&&c.isSpecial()?c.query+="%27":c.query+="#"===o?"%23":dr(o,lr)):(c.fragment="",s=Fr);break;case Fr:o!==r&&(c.fragment+=dr(o,hr))}h++}},parseHost:function(r){var t,e,n;if("["===D(r,0)){if("]"!==D(r,r.length-1))return G;if(t=function(r){var t,e,n,i,o,u,a,f=[0,0,0,0,0,0,0,0],c=0,s=null,l=0,h=function(){return D(r,l)};if(":"===h()){if(":"!==D(r,1))return;l+=2,s=++c}for(;h();){if(8===c)return;if(":"!==h()){for(t=e=0;e<4&&j(tr,h());)t=16*t+L(h(),16),l++,e++;if("."===h()){if(0===e)return;if(l-=e,c>6)return;for(n=0;h();){if(i=null,n>0){if(!("."===h()&&n<4))return;l++}if(!j(Q,h()))return;for(;j(Q,h());){if(o=L(h(),10),null===i)i=o;else{if(0===i)return;i=10*i+o}if(i>255)return;l++}f[c]=256*f[c]+i,2!=++n&&4!==n||c++}if(4!==n)return;break}if(":"===h()){if(l++,!h())return}else if(h())return;f[c++]=t}else{if(null!==s)return;l++,s=++c}}if(null!==s)for(u=c-s,c=7;0!==c&&u>0;)a=f[c],f[c--]=f[s+u-1],f[s+--u]=a;else if(8!==c)return;return f}(V(r,1,-1)),!t)return G;this.host=t}else if(this.isSpecial()){if(r=w(r),j(er,r))return G;if(t=function(r){var t,e,n,i,o,u,a,f=z(r,".");if(f.length&&""===f[f.length-1]&&f.length--,(t=f.length)>4)return r;for(e=[],n=0;n1&&"0"===D(i,0)&&(o=j(X,i)?16:8,i=V(i,8===o?1:2)),""===i)u=0;else{if(!j(10===o?rr:8===o?Z:tr,i))return r;u=L(i,o)}N(e,u)}for(n=0;n=U(256,5-t))return null}else if(u>255)return null;for(a=B(e),n=0;n1?arguments[1]:void 0,i=O(t,new Hr(r,!1,n));e||(t.href=i.serialize(),t.origin=i.getOrigin(),t.protocol=i.getProtocol(),t.username=i.getUsername(),t.password=i.getPassword(),t.host=i.getHost(),t.hostname=i.getHostname(),t.port=i.getPort(),t.pathname=i.getPathname(),t.search=i.getSearch(),t.searchParams=i.getSearchParams(),t.hash=i.getHash())},Vr=zr.prototype,qr=function(r,t){return{get:function(){return T(this)[r]()},set:t&&function(r){return T(this)[t](r)},configurable:!0,enumerable:!0}};if(e&&(c(Vr,"href",qr("serialize","setHref")),c(Vr,"origin",qr("getOrigin")),c(Vr,"protocol",qr("getProtocol","setProtocol")),c(Vr,"username",qr("getUsername","setUsername")),c(Vr,"password",qr("getPassword","setPassword")),c(Vr,"host",qr("getHost","setHost")),c(Vr,"hostname",qr("getHostname","setHostname")),c(Vr,"port",qr("getPort","setPort")),c(Vr,"pathname",qr("getPathname","setPathname")),c(Vr,"search",qr("getSearch","setSearch")),c(Vr,"searchParams",qr("getSearchParams")),c(Vr,"hash",qr("getHash","setHash"))),f(Vr,"toJSON",(function(){return T(this).serialize()}),{enumerable:!0}),f(Vr,"toString",(function(){return T(this).serialize()}),{enumerable:!0}),k){var $r=k.createObjectURL,Wr=k.revokeObjectURL;$r&&f(zr,"createObjectURL",u($r,k)),Wr&&f(zr,"revokeObjectURL",u(Wr,k))}return E(zr,"URL"),t({global:!0,constructor:!0,forced:!n,sham:!e},{URL:zr}),Ev}Pv||(Pv=1,Uv());var Dv,jv={};!function(){if(Dv)return jv;Dv=1;var r=He(),t=y();r({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return t(URL.prototype.toString,this)}})}();var Mv;Mv||(Mv=1,Cv());var _v,Bv={};!function(){if(_v)return Bv;_v=1;var r=$t(),t=fr(),e=Ve(),n=Xo(),i=URLSearchParams,o=i.prototype,u=t(o.append),a=t(o.delete),f=t(o.forEach),c=t([].push),s=new i("a=1&a=2&b=3");s.delete("a",1),s.delete("b",void 0),s+""!="a=2"&&r(o,"delete",(function(r){var t=arguments.length,i=t<2?void 0:arguments[1];if(t&&void 0===i)return a(this,r);var o=[];f(this,(function(r,t){c(o,{key:t,value:r})})),n(t,1);for(var s,l=e(r),h=e(i),v=0,p=0,d=!1,g=o.length;v1);(async function*(){})().next()};var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=function(t){return t&&t.Math===Math&&t},r=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof t&&t)||e("object"==typeof t&&t)||function(){return this}()||Function("return this")(),n={},o=function(t){try{return!!t()}catch(e){return!0}},i=!o((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),a=!o((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),u=a,c=Function.prototype.call,s=u?c.bind(c):function(){return c.apply(c,arguments)},f={},l={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,p=h&&!l.call({1:2},1);f.f=p?function(t){var e=h(this,t);return!!e&&e.enumerable}:l;var v,d,g=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},y=a,m=Function.prototype,w=m.call,b=y&&m.bind.bind(w,w),E=y?b:function(t){return function(){return w.apply(t,arguments)}},S=E,A=S({}.toString),R=S("".slice),O=function(t){return R(A(t),8,-1)},T=o,I=O,x=Object,k=E("".split),P=T((function(){return!x("z").propertyIsEnumerable(0)}))?function(t){return"String"===I(t)?k(t,""):x(t)}:x,L=function(t){return null==t},U=L,C=TypeError,j=function(t){if(U(t))throw new C("Can't call method on "+t);return t},D=P,M=j,_=function(t){return D(M(t))},B="object"==typeof document&&document.all,F=void 0===B&&void 0!==B?function(t){return"function"==typeof t||t===B}:function(t){return"function"==typeof t},N=F,H=function(t){return"object"==typeof t?null!==t:N(t)},z=r,V=F,q=function(t,e){return arguments.length<2?(r=z[t],V(r)?r:void 0):z[t]&&z[t][e];var r},$=E({}.isPrototypeOf),G="undefined"!=typeof navigator&&String(navigator.userAgent)||"",W=r,Y=G,K=W.process,J=W.Deno,Q=K&&K.versions||J&&J.version,X=Q&&Q.v8;X&&(d=(v=X.split("."))[0]>0&&v[0]<4?1:+(v[0]+v[1])),!d&&Y&&(!(v=Y.match(/Edge\/(\d+)/))||v[1]>=74)&&(v=Y.match(/Chrome\/(\d+)/))&&(d=+v[1]);var Z=d,tt=Z,et=o,rt=r.String,nt=!!Object.getOwnPropertySymbols&&!et((function(){var t=Symbol("symbol detection");return!rt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&tt&&tt<41})),ot=nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,it=q,at=F,ut=$,ct=Object,st=ot?function(t){return"symbol"==typeof t}:function(t){var e=it("Symbol");return at(e)&&ut(e.prototype,ct(t))},ft=String,lt=function(t){try{return ft(t)}catch(e){return"Object"}},ht=F,pt=lt,vt=TypeError,dt=function(t){if(ht(t))return t;throw new vt(pt(t)+" is not a function")},gt=dt,yt=L,mt=function(t,e){var r=t[e];return yt(r)?void 0:gt(r)},wt=s,bt=F,Et=H,St=TypeError,At={exports:{}},Rt=r,Ot=Object.defineProperty,Tt=function(t,e){try{Ot(Rt,t,{value:e,configurable:!0,writable:!0})}catch(r){Rt[t]=e}return e},It=r,xt=Tt,kt="__core-js_shared__",Pt=At.exports=It[kt]||xt(kt,{});(Pt.versions||(Pt.versions=[])).push({version:"3.37.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Lt=At.exports,Ut=Lt,Ct=function(t,e){return Ut[t]||(Ut[t]=e||{})},jt=j,Dt=Object,Mt=function(t){return Dt(jt(t))},_t=Mt,Bt=E({}.hasOwnProperty),Ft=Object.hasOwn||function(t,e){return Bt(_t(t),e)},Nt=E,Ht=0,zt=Math.random(),Vt=Nt(1..toString),qt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Vt(++Ht+zt,36)},$t=Ct,Gt=Ft,Wt=qt,Yt=nt,Kt=ot,Jt=r.Symbol,Qt=$t("wks"),Xt=Kt?Jt.for||Jt:Jt&&Jt.withoutSetter||Wt,Zt=function(t){return Gt(Qt,t)||(Qt[t]=Yt&&Gt(Jt,t)?Jt[t]:Xt("Symbol."+t)),Qt[t]},te=s,ee=H,re=st,ne=mt,oe=function(t,e){var r,n;if("string"===e&&bt(r=t.toString)&&!Et(n=wt(r,t)))return n;if(bt(r=t.valueOf)&&!Et(n=wt(r,t)))return n;if("string"!==e&&bt(r=t.toString)&&!Et(n=wt(r,t)))return n;throw new St("Can't convert object to primitive value")},ie=TypeError,ae=Zt("toPrimitive"),ue=function(t,e){if(!ee(t)||re(t))return t;var r,n=ne(t,ae);if(n){if(void 0===e&&(e="default"),r=te(n,t,e),!ee(r)||re(r))return r;throw new ie("Can't convert object to primitive value")}return void 0===e&&(e="number"),oe(t,e)},ce=ue,se=st,fe=function(t){var e=ce(t,"string");return se(e)?e:e+""},le=H,he=r.document,pe=le(he)&&le(he.createElement),ve=function(t){return pe?he.createElement(t):{}},de=ve,ge=!i&&!o((function(){return 7!==Object.defineProperty(de("div"),"a",{get:function(){return 7}}).a})),ye=i,me=s,we=f,be=g,Ee=_,Se=fe,Ae=Ft,Re=ge,Oe=Object.getOwnPropertyDescriptor;n.f=ye?Oe:function(t,e){if(t=Ee(t),e=Se(e),Re)try{return Oe(t,e)}catch(r){}if(Ae(t,e))return be(!me(we.f,t,e),t[e])};var Te={},Ie=i&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),xe=H,ke=String,Pe=TypeError,Le=function(t){if(xe(t))return t;throw new Pe(ke(t)+" is not an object")},Ue=i,Ce=ge,je=Ie,De=Le,Me=fe,_e=TypeError,Be=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,Ne="enumerable",He="configurable",ze="writable";Te.f=Ue?je?function(t,e,r){if(De(t),e=Me(e),De(r),"function"==typeof t&&"prototype"===e&&"value"in r&&ze in r&&!r[ze]){var n=Fe(t,e);n&&n[ze]&&(t[e]=r.value,r={configurable:He in r?r[He]:n[He],enumerable:Ne in r?r[Ne]:n[Ne],writable:!1})}return Be(t,e,r)}:Be:function(t,e,r){if(De(t),e=Me(e),De(r),Ce)try{return Be(t,e,r)}catch(n){}if("get"in r||"set"in r)throw new _e("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var Ve=Te,qe=g,$e=i?function(t,e,r){return Ve.f(t,e,qe(1,r))}:function(t,e,r){return t[e]=r,t},Ge={exports:{}},We=i,Ye=Ft,Ke=Function.prototype,Je=We&&Object.getOwnPropertyDescriptor,Qe=Ye(Ke,"name"),Xe={EXISTS:Qe,PROPER:Qe&&"something"===function(){}.name,CONFIGURABLE:Qe&&(!We||We&&Je(Ke,"name").configurable)},Ze=F,tr=Lt,er=E(Function.toString);Ze(tr.inspectSource)||(tr.inspectSource=function(t){return er(t)});var rr,nr,or,ir=tr.inspectSource,ar=F,ur=r.WeakMap,cr=ar(ur)&&/native code/.test(String(ur)),sr=qt,fr=Ct("keys"),lr=function(t){return fr[t]||(fr[t]=sr(t))},hr={},pr=cr,vr=r,dr=H,gr=$e,yr=Ft,mr=Lt,wr=lr,br=hr,Er="Object already initialized",Sr=vr.TypeError,Ar=vr.WeakMap;if(pr||mr.state){var Rr=mr.state||(mr.state=new Ar);Rr.get=Rr.get,Rr.has=Rr.has,Rr.set=Rr.set,rr=function(t,e){if(Rr.has(t))throw new Sr(Er);return e.facade=t,Rr.set(t,e),e},nr=function(t){return Rr.get(t)||{}},or=function(t){return Rr.has(t)}}else{var Or=wr("state");br[Or]=!0,rr=function(t,e){if(yr(t,Or))throw new Sr(Er);return e.facade=t,gr(t,Or,e),e},nr=function(t){return yr(t,Or)?t[Or]:{}},or=function(t){return yr(t,Or)}}var Tr={set:rr,get:nr,has:or,enforce:function(t){return or(t)?nr(t):rr(t,{})},getterFor:function(t){return function(e){var r;if(!dr(e)||(r=nr(e)).type!==t)throw new Sr("Incompatible receiver, "+t+" required");return r}}},Ir=E,xr=o,kr=F,Pr=Ft,Lr=i,Ur=Xe.CONFIGURABLE,Cr=ir,jr=Tr.enforce,Dr=Tr.get,Mr=String,_r=Object.defineProperty,Br=Ir("".slice),Fr=Ir("".replace),Nr=Ir([].join),Hr=Lr&&!xr((function(){return 8!==_r((function(){}),"length",{value:8}).length})),zr=String(String).split("String"),Vr=Ge.exports=function(t,e,r){"Symbol("===Br(Mr(e),0,7)&&(e="["+Fr(Mr(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!Pr(t,"name")||Ur&&t.name!==e)&&(Lr?_r(t,"name",{value:e,configurable:!0}):t.name=e),Hr&&r&&Pr(r,"arity")&&t.length!==r.arity&&_r(t,"length",{value:r.arity});try{r&&Pr(r,"constructor")&&r.constructor?Lr&&_r(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(o){}var n=jr(t);return Pr(n,"source")||(n.source=Nr(zr,"string"==typeof e?e:"")),t};Function.prototype.toString=Vr((function(){return kr(this)&&Dr(this).source||Cr(this)}),"toString");var qr=Ge.exports,$r=F,Gr=Te,Wr=qr,Yr=Tt,Kr=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if($r(r)&&Wr(r,i,n),n.global)o?t[e]=r:Yr(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(a){}o?t[e]=r:Gr.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},Jr={},Qr=Math.ceil,Xr=Math.floor,Zr=Math.trunc||function(t){var e=+t;return(e>0?Xr:Qr)(e)},tn=function(t){var e=+t;return e!=e||0===e?0:Zr(e)},en=tn,rn=Math.max,nn=Math.min,on=function(t,e){var r=en(t);return r<0?rn(r+e,0):nn(r,e)},an=tn,un=Math.min,cn=function(t){var e=an(t);return e>0?un(e,9007199254740991):0},sn=cn,fn=function(t){return sn(t.length)},ln=_,hn=on,pn=fn,vn=function(t){return function(e,r,n){var o=ln(e),i=pn(o);if(0===i)return!t&&-1;var a,u=hn(n,i);if(t&&r!=r){for(;i>u;)if((a=o[u++])!=a)return!0}else for(;i>u;u++)if((t||u in o)&&o[u]===r)return t||u||0;return!t&&-1}},dn={includes:vn(!0),indexOf:vn(!1)},gn=Ft,yn=_,mn=dn.indexOf,wn=hr,bn=E([].push),En=function(t,e){var r,n=yn(t),o=0,i=[];for(r in n)!gn(wn,r)&&gn(n,r)&&bn(i,r);for(;e.length>o;)gn(n,r=e[o++])&&(~mn(i,r)||bn(i,r));return i},Sn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],An=En,Rn=Sn.concat("length","prototype");Jr.f=Object.getOwnPropertyNames||function(t){return An(t,Rn)};var On={};On.f=Object.getOwnPropertySymbols;var Tn=q,In=Jr,xn=On,kn=Le,Pn=E([].concat),Ln=Tn("Reflect","ownKeys")||function(t){var e=In.f(kn(t)),r=xn.f;return r?Pn(e,r(t)):e},Un=Ft,Cn=Ln,jn=n,Dn=Te,Mn=function(t,e,r){for(var n=Cn(e),o=Dn.f,i=jn.f,a=0;ai&&ki(o,arguments[i]),o}));l.prototype=s,"Error"!==u?Ri?Ri(l,f):Oi(l,f,{name:!0}):Li&&o in c&&(Ti(l,c,o),Ti(l,c,"prepareStackTrace")),Oi(l,c);try{s.name!==u&&Si(s,"name",u),s.constructor=l}catch(h){}return l}},Di="WebAssembly",Mi=r[Di],_i=7!==new Error("e",{cause:7}).cause,Bi=function(t,e){var r={};r[t]=ji(t,e,_i),Ui({global:!0,constructor:!0,arity:1,forced:_i},r)},Fi=function(t,e){if(Mi&&Mi[t]){var r={};r[t]=ji(Di+"."+t,e,_i),Ui({target:Di,stat:!0,constructor:!0,arity:1,forced:_i},r)}};Bi("Error",(function(t){return function(e){return Ci(t,this,arguments)}})),Bi("EvalError",(function(t){return function(e){return Ci(t,this,arguments)}})),Bi("RangeError",(function(t){return function(e){return Ci(t,this,arguments)}})),Bi("ReferenceError",(function(t){return function(e){return Ci(t,this,arguments)}})),Bi("SyntaxError",(function(t){return function(e){return Ci(t,this,arguments)}})),Bi("TypeError",(function(t){return function(e){return Ci(t,this,arguments)}})),Bi("URIError",(function(t){return function(e){return Ci(t,this,arguments)}})),Fi("CompileError",(function(t){return function(e){return Ci(t,this,arguments)}})),Fi("LinkError",(function(t){return function(e){return Ci(t,this,arguments)}})),Fi("RuntimeError",(function(t){return function(e){return Ci(t,this,arguments)}}));var Ni={},Hi=En,zi=Sn,Vi=Object.keys||function(t){return Hi(t,zi)},qi=i,$i=Ie,Gi=Te,Wi=Le,Yi=_,Ki=Vi;Ni.f=qi&&!$i?Object.defineProperties:function(t,e){Wi(t);for(var r,n=Yi(e),o=Ki(e),i=o.length,a=0;i>a;)Gi.f(t,r=o[a++],n[r]);return t};var Ji,Qi=q("document","documentElement"),Xi=Le,Zi=Ni,ta=Sn,ea=hr,ra=Qi,na=ve,oa="prototype",ia="script",aa=lr("IE_PROTO"),ua=function(){},ca=function(t){return"<"+ia+">"+t+""},sa=function(t){t.write(ca("")),t.close();var e=t.parentWindow.Object;return t=null,e},fa=function(){try{Ji=new ActiveXObject("htmlfile")}catch(o){}var t,e,r;fa="undefined"!=typeof document?document.domain&&Ji?sa(Ji):(e=na("iframe"),r="java"+ia+":",e.style.display="none",ra.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(ca("document.F=Object")),t.close(),t.F):sa(Ji);for(var n=ta.length;n--;)delete fa[oa][ta[n]];return fa()};ea[aa]=!0;var la=Object.create||function(t,e){var r;return null!==t?(ua[oa]=Xi(t),r=new ua,ua[oa]=null,r[aa]=t):r=fa(),void 0===e?r:Zi.f(r,e)},ha=Zt,pa=la,va=Te.f,da=ha("unscopables"),ga=Array.prototype;void 0===ga[da]&&va(ga,da,{configurable:!0,value:pa(null)});var ya=function(t){ga[da][t]=!0},ma=dn.includes,wa=ya;Zn({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(t){return ma(this,t,arguments.length>1?arguments[1]:void 0)}}),wa("includes");var ba,Ea,Sa,Aa={},Ra=!o((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Oa=Ft,Ta=F,Ia=Mt,xa=Ra,ka=lr("IE_PROTO"),Pa=Object,La=Pa.prototype,Ua=xa?Pa.getPrototypeOf:function(t){var e=Ia(t);if(Oa(e,ka))return e[ka];var r=e.constructor;return Ta(r)&&e instanceof r?r.prototype:e instanceof Pa?La:null},Ca=o,ja=F,Da=H,Ma=Ua,_a=Kr,Ba=Zt("iterator"),Fa=!1;[].keys&&("next"in(Sa=[].keys())?(Ea=Ma(Ma(Sa)))!==Object.prototype&&(ba=Ea):Fa=!0);var Na=!Da(ba)||Ca((function(){var t={};return ba[Ba].call(t)!==t}));Na&&(ba={}),ja(ba[Ba])||_a(ba,Ba,(function(){return this}));var Ha={IteratorPrototype:ba,BUGGY_SAFARI_ITERATORS:Fa},za=Te.f,Va=Ft,qa=Zt("toStringTag"),$a=function(t,e,r){t&&!r&&(t=t.prototype),t&&!Va(t,qa)&&za(t,qa,{configurable:!0,value:e})},Ga=Ha.IteratorPrototype,Wa=la,Ya=g,Ka=$a,Ja=Aa,Qa=function(){return this},Xa=function(t,e,r,n){var o=e+" Iterator";return t.prototype=Wa(Ga,{next:Ya(+!n,r)}),Ka(t,o,!1),Ja[o]=Qa,t},Za=Zn,tu=s,eu=F,ru=Xa,nu=Ua,ou=Jo,iu=$a,au=$e,uu=Kr,cu=Aa,su=Xe.PROPER,fu=Xe.CONFIGURABLE,lu=Ha.IteratorPrototype,hu=Ha.BUGGY_SAFARI_ITERATORS,pu=Zt("iterator"),vu="keys",du="values",gu="entries",yu=function(){return this},mu=function(t,e,r,n,o,i,a){ru(r,e,n);var u,c,s,f=function(t){if(t===o&&d)return d;if(!hu&&t&&t in p)return p[t];switch(t){case vu:case du:case gu:return function(){return new r(this,t)}}return function(){return new r(this)}},l=e+" Iterator",h=!1,p=t.prototype,v=p[pu]||p["@@iterator"]||o&&p[o],d=!hu&&v||f(o),g="Array"===e&&p.entries||v;if(g&&(u=nu(g.call(new t)))!==Object.prototype&&u.next&&(nu(u)!==lu&&(ou?ou(u,lu):eu(u[pu])||uu(u,pu,yu)),iu(u,l,!0)),su&&o===du&&v&&v.name!==du&&(fu?au(p,"name",du):(h=!0,d=function(){return tu(v,this)})),o)if(c={values:f(du),keys:i?d:f(vu),entries:f(gu)},a)for(s in c)(hu||h||!(s in p))&&uu(p,s,c[s]);else Za({target:e,proto:!0,forced:hu||h},c);return p[pu]!==d&&uu(p,pu,d,{name:o}),cu[e]=d,c},wu=function(t,e){return{value:t,done:e}},bu=_,Eu=ya,Su=Aa,Au=Tr,Ru=Te.f,Ou=mu,Tu=wu,Iu=i,xu="Array Iterator",ku=Au.set,Pu=Au.getterFor(xu),Lu=Ou(Array,"Array",(function(t,e){ku(this,{type:xu,target:bu(t),index:0,kind:e})}),(function(){var t=Pu(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=void 0,Tu(void 0,!0);switch(t.kind){case"keys":return Tu(r,!1);case"values":return Tu(e[r],!1)}return Tu([r,e[r]],!1)}),"values"),Uu=Su.Arguments=Su.Array;if(Eu("keys"),Eu("values"),Eu("entries"),Iu&&"values"!==Uu.name)try{Ru(Uu,"name",{value:"values"})}catch(vM){}var Cu=O,ju=Array.isArray||function(t){return"Array"===Cu(t)},Du=i,Mu=ju,_u=TypeError,Bu=Object.getOwnPropertyDescriptor,Fu=Du&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(vM){return vM instanceof TypeError}}()?function(t,e){if(Mu(t)&&!Bu(t,"length").writable)throw new _u("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Nu=TypeError,Hu=function(t){if(t>9007199254740991)throw Nu("Maximum allowed index exceeded");return t},zu=Mt,Vu=fn,qu=Fu,$u=Hu;Zn({target:"Array",proto:!0,arity:1,forced:o((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(vM){return vM instanceof TypeError}}()},{push:function(t){var e=zu(this),r=Vu(e),n=arguments.length;$u(r+n);for(var o=0;o=0:u>c;c+=s)c in a&&(o=r(o,a[c],c,i));return o}},Zu={left:Xu(!1),right:Xu(!0)},tc=o,ec=function(t,e){var r=[][t];return!!r&&tc((function(){r.call(null,e||function(){return 1},1)}))},rc="process"===O(r.process),nc=Zu.left;Zn({target:"Array",proto:!0,forced:!rc&&Z>79&&Z<83||!ec("reduce")},{reduce:function(t){var e=arguments.length;return nc(this,t,e,e>1?arguments[1]:void 0)}});var oc=lt,ic=TypeError,ac=function(t,e){if(!delete t[e])throw new ic("Cannot delete property "+oc(e)+" of "+oc(t))},uc=Mt,cc=fn,sc=Fu,fc=ac,lc=Hu;Zn({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(vM){return vM instanceof TypeError}}()},{unshift:function(t){var e=uc(this),r=cc(e),n=arguments.length;if(n){lc(r+n);for(var o=r;o--;){var i=o+n;o in e?e[i]=e[o]:fc(e,i)}for(var a=0;ai;i++)if((u=y(t[i]))&&kh(Dh,u))return u;return new jh(!1)}n=Ph(t,o)}for(c=h?t.next:n.next;!(s=Rh(c,n)).done;){try{u=y(s.value)}catch(vM){Uh(n,"throw",vM)}if("object"==typeof u&&u&&kh(Dh,u))return u}return new jh(!1)},_h=Zt("iterator"),Bh=!1;try{var Fh=0,Nh={next:function(){return{done:!!Fh++}},return:function(){Bh=!0}};Nh[_h]=function(){return this},Array.from(Nh,(function(){throw 2}))}catch(vM){}var Hh=function(t,e){try{if(!e&&!Bh)return!1}catch(vM){return!1}var r=!1;try{var n={};n[_h]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(vM){}return r},zh=Ff,Vh=el.CONSTRUCTOR||!Hh((function(t){zh.all(t).then(void 0,(function(){}))})),qh=s,$h=dt,Gh=rl,Wh=Bf,Yh=Mh;Zn({target:"Promise",stat:!0,forced:Vh},{all:function(t){var e=this,r=Gh.f(e),n=r.resolve,o=r.reject,i=Wh((function(){var r=$h(e.resolve),i=[],a=0,u=1;Yh(t,(function(t){var c=a++,s=!1;u++,qh(r,e,t).then((function(t){s||(s=!0,i[c]=t,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise}});var Kh=Zn,Jh=el.CONSTRUCTOR,Qh=Ff,Xh=q,Zh=F,tp=Kr,ep=Qh&&Qh.prototype;if(Kh({target:"Promise",proto:!0,forced:Jh,real:!0},{catch:function(t){return this.then(void 0,t)}}),Zh(Qh)){var rp=Xh("Promise").prototype.catch;ep.catch!==rp&&tp(ep,"catch",rp,{unsafe:!0})}var np=s,op=dt,ip=rl,ap=Bf,up=Mh;Zn({target:"Promise",stat:!0,forced:Vh},{race:function(t){var e=this,r=ip.f(e),n=r.reject,o=ap((function(){var o=op(e.resolve);up(t,(function(t){np(o,e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var cp=rl;Zn({target:"Promise",stat:!0,forced:el.CONSTRUCTOR},{reject:function(t){var e=cp.f(this);return(0,e.reject)(t),e.promise}});var sp=Le,fp=H,lp=rl,hp=function(t,e){if(sp(t),fp(e)&&e.constructor===t)return e;var r=lp.f(t);return(0,r.resolve)(e),r.promise},pp=Zn,vp=el.CONSTRUCTOR,dp=hp;q("Promise"),pp({target:"Promise",stat:!0,forced:vp},{resolve:function(t){return dp(this,t)}});var gp=r,yp=$a;Zn({global:!0},{Reflect:{}}),yp(gp.Reflect,"Reflect",!0);var mp=H,wp=O,bp=Zt("match"),Ep=function(t){var e;return mp(t)&&(void 0!==(e=t[bp])?!!e:"RegExp"===wp(t))},Sp=Le,Ap=function(){var t=Sp(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},Rp=s,Op=Ft,Tp=$,Ip=Ap,xp=RegExp.prototype,kp=function(t){var e=t.flags;return void 0!==e||"flags"in xp||Op(t,"flags")||!Tp(xp,t)?e:Rp(Ip,t)},Pp=o,Lp=r.RegExp,Up=Pp((function(){var t=Lp("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),Cp=Up||Pp((function(){return!Lp("a","y").sticky})),jp={BROKEN_CARET:Up||Pp((function(){var t=Lp("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:Cp,UNSUPPORTED_Y:Up},Dp=o,Mp=r.RegExp,_p=Dp((function(){var t=Mp(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),Bp=o,Fp=r.RegExp,Np=Bp((function(){var t=Fp("(?b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")})),Hp=i,zp=r,Vp=E,qp=$n,$p=ri,Gp=$e,Wp=la,Yp=Jr.f,Kp=$,Jp=Ep,Qp=fo,Xp=kp,Zp=jp,tv=Xo,ev=Kr,rv=o,nv=Ft,ov=Tr.enforce,iv=Yc,av=_p,uv=Np,cv=Zt("match"),sv=zp.RegExp,fv=sv.prototype,lv=zp.SyntaxError,hv=Vp(fv.exec),pv=Vp("".charAt),vv=Vp("".replace),dv=Vp("".indexOf),gv=Vp("".slice),yv=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,mv=/a/g,wv=/a/g,bv=new sv(mv)!==mv,Ev=Zp.MISSED_STICKY,Sv=Zp.UNSUPPORTED_Y,Av=Hp&&(!bv||Ev||av||uv||rv((function(){return wv[cv]=!1,sv(mv)!==mv||sv(wv)===wv||"/a/i"!==String(sv(mv,"i"))})));if(qp("RegExp",Av)){for(var Rv=function(t,e){var r,n,o,i,a,u,c=Kp(fv,this),s=Jp(t),f=void 0===e,l=[],h=t;if(!c&&s&&f&&t.constructor===Rv)return t;if((s||Kp(fv,t))&&(t=t.source,f&&(e=Xp(h))),t=void 0===t?"":Qp(t),e=void 0===e?"":Qp(e),h=t,av&&"dotAll"in mv&&(n=!!e&&dv(e,"s")>-1)&&(e=vv(e,/s/g,"")),r=e,Ev&&"sticky"in mv&&(o=!!e&&dv(e,"y")>-1)&&Sv&&(e=vv(e,/y/g,"")),uv&&(i=function(t){for(var e,r=t.length,n=0,o="",i=[],a=Wp(null),u=!1,c=!1,s=0,f="";n<=r;n++){if("\\"===(e=pv(t,n)))e+=pv(t,++n);else if("]"===e)u=!1;else if(!u)switch(!0){case"["===e:u=!0;break;case"("===e:hv(yv,gv(t,n+1))&&(n+=2,c=!0),o+=e,s++;continue;case">"===e&&c:if(""===f||nv(a,f))throw new lv("Invalid capture group name");a[f]=!0,i[i.length]=[f,s],c=!1,f="";continue}c?f+=e:o+=e}return[o,i]}(t),t=i[0],l=i[1]),a=$p(sv(t,e),c?this:fv,Rv),(n||o||l.length)&&(u=ov(a),n&&(u.dotAll=!0,u.raw=Rv(function(t){for(var e,r=t.length,n=0,o="",i=!1;n<=r;n++)"\\"!==(e=pv(t,n))?i||"."!==e?("["===e?i=!0:"]"===e&&(i=!1),o+=e):o+="[\\s\\S]":o+=e+pv(t,++n);return o}(t),r)),o&&(u.sticky=!0),l.length&&(u.groups=l)),t!==h)try{Gp(a,"source",""===h?"(?:)":h)}catch(vM){}return a},Ov=Yp(sv),Tv=0;Ov.length>Tv;)tv(Rv,sv,Ov[Tv++]);fv.constructor=Rv,Rv.prototype=fv,ev(zp,"RegExp",Rv,{constructor:!0})}iv("RegExp");var Iv=i,xv=_p,kv=O,Pv=po,Lv=Tr.get,Uv=RegExp.prototype,Cv=TypeError;Iv&&xv&&Pv(Uv,"dotAll",{configurable:!0,get:function(){if(this!==Uv){if("RegExp"===kv(this))return!!Lv(this).dotAll;throw new Cv("Incompatible receiver, RegExp required")}}});var jv=s,Dv=E,Mv=fo,_v=Ap,Bv=jp,Fv=la,Nv=Tr.get,Hv=_p,zv=Np,Vv=Ct("native-string-replace",String.prototype.replace),qv=RegExp.prototype.exec,$v=qv,Gv=Dv("".charAt),Wv=Dv("".indexOf),Yv=Dv("".replace),Kv=Dv("".slice),Jv=function(){var t=/a/,e=/b*/g;return jv(qv,t,"a"),jv(qv,e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),Qv=Bv.BROKEN_CARET,Xv=void 0!==/()??/.exec("")[1];(Jv||Xv||Qv||Hv||zv)&&($v=function(t){var e,r,n,o,i,a,u,c=this,s=Nv(c),f=Mv(t),l=s.raw;if(l)return l.lastIndex=c.lastIndex,e=jv($v,l,f),c.lastIndex=l.lastIndex,e;var h=s.groups,p=Qv&&c.sticky,v=jv(_v,c),d=c.source,g=0,y=f;if(p&&(v=Yv(v,"y",""),-1===Wv(v,"g")&&(v+="g"),y=Kv(f,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Gv(f,c.lastIndex-1))&&(d="(?: "+d+")",y=" "+y,g++),r=new RegExp("^(?:"+d+")",v)),Xv&&(r=new RegExp("^"+d+"$(?!\\s)",v)),Jv&&(n=c.lastIndex),o=jv(qv,p?r:c,y),p?o?(o.input=Kv(o.input,g),o[0]=Kv(o[0],g),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Jv&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),Xv&&o&&o.length>1&&jv(Vv,o[0],r,(function(){for(i=1;i=u?t?"":void 0:(n=bd(i,a))<55296||n>56319||a+1===u||(o=bd(i,a+1))<56320||o>57343?t?wd(i,a):n:t?Ed(i,a,a+2):o-56320+(n-55296<<10)+65536}},Ad={codeAt:Sd(!1),charAt:Sd(!0)},Rd=Ad.charAt,Od=E,Td=Mt,Id=Math.floor,xd=Od("".charAt),kd=Od("".replace),Pd=Od("".slice),Ld=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Ud=/\$([$&'`]|\d{1,2})/g,Cd=function(t,e,r,n,o,i){var a=r+t.length,u=n.length,c=Ud;return void 0!==o&&(o=Td(o),c=Ld),kd(i,c,(function(i,c){var s;switch(xd(c,0)){case"$":return"$";case"&":return t;case"`":return Pd(e,0,r);case"'":return Pd(e,a);case"<":s=o[Pd(c,1,-1)];break;default:var f=+c;if(0===f)return i;if(f>u){var l=Id(f/10);return 0===l?i:l<=u?void 0===n[l-1]?xd(c,1):n[l-1]+xd(c,1):i}s=n[f-1]}return void 0===s?"":s}))},jd=s,Dd=Le,Md=F,_d=O,Bd=Zv,Fd=TypeError,Nd=Bo,Hd=s,zd=E,Vd=function(t,e,r,n){var o=ld(t),i=!fd((function(){var e={};return e[o]=function(){return 7},7!==""[t](e)})),a=i&&!fd((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[pd]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!a||r){var u=/./[o],c=e(o,""[t],(function(t,e,r,n,o){var a=e.exec;return a===sd||a===vd.exec?i&&!o?{done:!0,value:ud(u,e,r,n)}:{done:!0,value:ud(t,r,e,n)}:{done:!1}}));cd(String.prototype,t,c[0]),cd(vd,o,c[1])}n&&hd(vd[o],"sham",!0)},qd=o,$d=Le,Gd=F,Wd=L,Yd=tn,Kd=cn,Jd=fo,Qd=j,Xd=function(t,e,r){return e+(r?Rd(t,e).length:1)},Zd=mt,tg=Cd,eg=function(t,e){var r=t.exec;if(Md(r)){var n=jd(r,t,e);return null!==n&&Dd(n),n}if("RegExp"===_d(t))return jd(Bd,t,e);throw new Fd("RegExp#exec called on incompatible receiver")},rg=Zt("replace"),ng=Math.max,og=Math.min,ig=zd([].concat),ag=zd([].push),ug=zd("".indexOf),cg=zd("".slice),sg="$0"==="a".replace(/./,"$0"),fg=!!/./[rg]&&""===/./[rg]("a","$0");Vd("replace",(function(t,e,r){var n=fg?"$":"$0";return[function(t,r){var n=Qd(this),o=Wd(t)?void 0:Zd(t,rg);return o?Hd(o,t,n,r):Hd(e,Jd(n),t,r)},function(t,o){var i=$d(this),a=Jd(t);if("string"==typeof o&&-1===ug(o,n)&&-1===ug(o,"$<")){var u=r(e,i,a,o);if(u.done)return u.value}var c=Gd(o);c||(o=Jd(o));var s,f=i.global;f&&(s=i.unicode,i.lastIndex=0);for(var l,h=[];null!==(l=eg(i,a))&&(ag(h,l),f);){""===Jd(l[0])&&(i.lastIndex=Xd(a,Kd(i.lastIndex),s))}for(var p,v="",d=0,g=0;g=d&&(v+=cg(a,d,w)+y,d=w+m.length)}return v+cg(a,d)}]}),!!qd((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}))||!sg||fg);var lg="\t\n\v\f\r                 \u2028\u2029\ufeff",hg=j,pg=fo,vg=lg,dg=E("".replace),gg=RegExp("^["+vg+"]+"),yg=RegExp("(^|[^"+vg+"])["+vg+"]+$"),mg=function(t){return function(e){var r=pg(hg(e));return 1&t&&(r=dg(r,gg,"")),2&t&&(r=dg(r,yg,"$1")),r}},wg={start:mg(1),end:mg(2),trim:mg(3)},bg=Xe.PROPER,Eg=o,Sg=lg,Ag=wg.trim;Zn({target:"String",proto:!0,forced:function(t){return Eg((function(){return!!Sg[t]()||"​…᠎"!=="​…᠎"[t]()||bg&&Sg[t].name!==t}))}("trim")},{trim:function(){return Ag(this)}});var Rg=i,Og=Te,Tg=g,Ig=function(t,e,r){Rg?Og.f(t,e,Tg(0,r)):t[e]=r},xg=Zn,kg=r,Pg=Qc,Lg=Le,Ug=F,Cg=Ua,jg=po,Dg=Ig,Mg=o,_g=Ft,Bg=Ha.IteratorPrototype,Fg=i,Ng="constructor",Hg="Iterator",zg=Zt("toStringTag"),Vg=TypeError,qg=kg[Hg],$g=!Ug(qg)||qg.prototype!==Bg||!Mg((function(){qg({})})),Gg=function(){if(Pg(this,Bg),Cg(this)===Bg)throw new Vg("Abstract class Iterator not directly constructable")},Wg=function(t,e){Fg?jg(Bg,t,{configurable:!0,get:function(){return e},set:function(e){if(Lg(this),this===Bg)throw new Vg("You can't redefine this property");_g(this,t)?this[t]=e:Dg(this,t,e)}}):Bg[t]=e};_g(Bg,zg)||Wg(zg,Hg),!$g&&_g(Bg,Ng)&&Bg[Ng]!==Object||Wg(Ng,Gg),Gg.prototype=Bg,xg({global:!0,constructor:!0,forced:$g},{Iterator:Gg});var Yg=function(t){return{iterator:t,next:t.next,done:!1}},Kg=Mh,Jg=dt,Qg=Le,Xg=Yg;Zn({target:"Iterator",proto:!0,real:!0},{every:function(t){Qg(this),Jg(t);var e=Xg(this),r=0;return!Kg(e,(function(e,n){if(!t(e,r++))return n()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}});var Zg=Kr,ty=function(t,e,r){for(var n in e)Zg(t,n,e[n],r);return t},ey=s,ry=la,ny=$e,oy=ty,iy=Tr,ay=mt,uy=Ha.IteratorPrototype,cy=wu,sy=Sh,fy=Zt("toStringTag"),ly="IteratorHelper",hy="WrapForValidIterator",py=iy.set,vy=function(t){var e=iy.getterFor(t?hy:ly);return oy(ry(uy),{next:function(){var r=e(this);if(t)return r.nextHandler();try{var n=r.done?void 0:r.nextHandler();return cy(n,r.done)}catch(vM){throw r.done=!0,vM}},return:function(){var r=e(this),n=r.iterator;if(r.done=!0,t){var o=ay(n,"return");return o?ey(o,n):cy(void 0,!0)}if(r.inner)try{sy(r.inner.iterator,"normal")}catch(vM){return sy(n,"throw",vM)}return sy(n,"normal"),cy(void 0,!0)}})},dy=vy(!0),gy=vy(!1);ny(gy,fy,"Iterator Helper");var yy=function(t,e){var r=function(r,n){n?(n.iterator=r.iterator,n.next=r.next):n=r,n.type=e?hy:ly,n.nextHandler=t,n.counter=0,n.done=!1,py(this,n)};return r.prototype=e?dy:gy,r},my=Le,wy=Sh,by=function(t,e,r,n){try{return n?e(my(r)[0],r[1]):e(r)}catch(vM){wy(t,"throw",vM)}},Ey=Zn,Sy=s,Ay=dt,Ry=Le,Oy=Yg,Ty=by,Iy=yy((function(){for(var t,e,r=this.iterator,n=this.predicate,o=this.next;;){if(t=Ry(Sy(o,r)),this.done=!!t.done)return;if(e=t.value,Ty(r,n,[e,this.counter++],!0))return e}}));Ey({target:"Iterator",proto:!0,real:!0,forced:false},{filter:function(t){return Ry(this),Ay(t),new Iy(Oy(this),{predicate:t})}});var xy=Mh,ky=dt,Py=Le,Ly=Yg;Zn({target:"Iterator",proto:!0,real:!0},{forEach:function(t){Py(this),ky(t);var e=Ly(this),r=0;xy(e,(function(e){t(e,r++)}),{IS_RECORD:!0})}});var Uy=s,Cy=dt,jy=Le,Dy=Yg,My=by,_y=yy((function(){var t=this.iterator,e=jy(Uy(this.next,t));if(!(this.done=!!e.done))return My(t,this.mapper,[e.value,this.counter++],!0)}));Zn({target:"Iterator",proto:!0,real:!0,forced:false},{map:function(t){return jy(this),Cy(t),new _y(Dy(this),{mapper:t})}});var By=Mh,Fy=dt,Ny=Le,Hy=Yg,zy=TypeError;Zn({target:"Iterator",proto:!0,real:!0},{reduce:function(t){Ny(this),Fy(t);var e=Hy(this),r=arguments.length<2,n=r?void 0:arguments[1],o=0;if(By(e,(function(e){r?(r=!1,n=e):n=t(n,e,o),o++}),{IS_RECORD:!0}),r)throw new zy("Reduce of empty iterator with no initial value");return n}});var Vy=Mh,qy=dt,$y=Le,Gy=Yg;Zn({target:"Iterator",proto:!0,real:!0},{some:function(t){$y(this),qy(t);var e=Gy(this),r=0;return Vy(e,(function(e,n){if(t(e,r++))return n()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}});var Wy=E,Yy=Set.prototype,Ky={Set:Set,add:Wy(Yy.add),has:Wy(Yy.has),remove:Wy(Yy.delete),proto:Yy},Jy=Ky.has,Qy=function(t){return Jy(t),t},Xy=s,Zy=function(t,e,r){for(var n,o,i=r?t:t.iterator,a=t.next;!(n=Xy(a,i)).done;)if(void 0!==(o=e(n.value)))return o},tm=E,em=Zy,rm=Ky.Set,nm=Ky.proto,om=tm(nm.forEach),im=tm(nm.keys),am=im(new rm).next,um=function(t,e,r){return r?em({iterator:im(t),next:am},e):om(t,e)},cm=um,sm=Ky.Set,fm=Ky.add,lm=function(t){var e=new sm;return cm(t,(function(t){fm(e,t)})),e},hm=Ho(Ky.proto,"size","get")||function(t){return t.size},pm=dt,vm=Le,dm=s,gm=tn,ym=Yg,mm="Invalid size",wm=RangeError,bm=TypeError,Em=Math.max,Sm=function(t,e){this.set=t,this.size=Em(e,0),this.has=pm(t.has),this.keys=pm(t.keys)};Sm.prototype={getIterator:function(){return ym(vm(dm(this.keys,this.set)))},includes:function(t){return dm(this.has,this.set,t)}};var Am=function(t){vm(t);var e=+t.size;if(e!=e)throw new bm(mm);var r=gm(e);if(r<0)throw new wm(mm);return new Sm(t,r)},Rm=Qy,Om=lm,Tm=hm,Im=Am,xm=um,km=Zy,Pm=Ky.has,Lm=Ky.remove,Um=q,Cm=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},jm=function(t){var e=Um("Set");try{(new e)[t](Cm(0));try{return(new e)[t](Cm(-1)),!1}catch(r){return!0}}catch(vM){return!1}},Dm=function(t){var e=Rm(this),r=Im(t),n=Om(e);return Tm(e)<=r.size?xm(e,(function(t){r.includes(t)&&Lm(n,t)})):km(r.getIterator(),(function(t){Pm(e,t)&&Lm(n,t)})),n};Zn({target:"Set",proto:!0,real:!0,forced:!jm("difference")},{difference:Dm});var Mm=Qy,_m=hm,Bm=Am,Fm=um,Nm=Zy,Hm=Ky.Set,zm=Ky.add,Vm=Ky.has,qm=o,$m=function(t){var e=Mm(this),r=Bm(t),n=new Hm;return _m(e)>r.size?Nm(r.getIterator(),(function(t){Vm(e,t)&&zm(n,t)})):Fm(e,(function(t){r.includes(t)&&zm(n,t)})),n};Zn({target:"Set",proto:!0,real:!0,forced:!jm("intersection")||qm((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}))},{intersection:$m});var Gm=Qy,Wm=Ky.has,Ym=hm,Km=Am,Jm=um,Qm=Zy,Xm=Sh,Zm=function(t){var e=Gm(this),r=Km(t);if(Ym(e)<=r.size)return!1!==Jm(e,(function(t){if(r.includes(t))return!1}),!0);var n=r.getIterator();return!1!==Qm(n,(function(t){if(Wm(e,t))return Xm(n,"normal",!1)}))};Zn({target:"Set",proto:!0,real:!0,forced:!jm("isDisjointFrom")},{isDisjointFrom:Zm});var tw=Qy,ew=hm,rw=um,nw=Am,ow=function(t){var e=tw(this),r=nw(t);return!(ew(e)>r.size)&&!1!==rw(e,(function(t){if(!r.includes(t))return!1}),!0)};Zn({target:"Set",proto:!0,real:!0,forced:!jm("isSubsetOf")},{isSubsetOf:ow});var iw=Qy,aw=Ky.has,uw=hm,cw=Am,sw=Zy,fw=Sh,lw=function(t){var e=iw(this),r=cw(t);if(uw(e)r,a=Vw(n)?n:Yw(n),u=i?Gw(arguments,r):[],c=i?function(){zw(a,this,u)}:a;return e?t(c,o):t(c)}:t},tb=Qw.setImmediate?Zw(Xw,!1):Xw;Jw({global:!0,bind:!0,enumerable:!0,forced:Qw.setImmediate!==tb},{setImmediate:tb});var eb=r,rb=_f,nb=dt,ob=Us,ib=i;Zn({global:!0,enumerable:!0,dontCallGetSet:!0,forced:o((function(){return ib&&1!==Object.getOwnPropertyDescriptor(eb,"queueMicrotask").value.length}))},{queueMicrotask:function(t){ob(arguments.length,1),rb(nb(t))}});var ab=Zn,ub=r,cb=po,sb=i,fb=TypeError,lb=Object.defineProperty,hb=ub.self!==ub;try{if(sb){var pb=Object.getOwnPropertyDescriptor(ub,"self");!hb&&pb&&pb.get&&pb.enumerable||cb(ub,"self",{get:function(){return ub},set:function(t){if(this!==ub)throw new fb("Illegal invocation");lb(ub,"self",{value:t,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else ab({global:!0,simple:!0,forced:hb},{self:ub})}catch(vM){}var vb=Zn,db=ju,gb=E([].reverse),yb=[1,2];vb({target:"Array",proto:!0,forced:String(yb)===String(yb.reverse())},{reverse:function(){return db(this)&&(this.length=this.length),gb(this)}});var mb=pc,wb=Math.floor,bb=function(t,e){var r=t.length;if(r<8)for(var n,o,i=1;i0;)t[o]=t[--o];o!==i++&&(t[o]=n)}else for(var a=wb(r/2),u=bb(mb(t,0,a),e),c=bb(mb(t,a),e),s=u.length,f=c.length,l=0,h=0;l3)){if(Bb)return!0;if(Nb)return Nb<603;var t,e,r,n,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)Hb.push({k:e+n,v:r})}for(Hb.sort((function(t,e){return e.v-t.v})),n=0;nCb(r)?1:-1}}(t)),r=Lb(o),n=0;nr||c!=c?a*(1/0):a*c},oE=Math.fround||function(t){return nE(t,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)},iE=Array,aE=Math.abs,uE=Math.pow,cE=Math.floor,sE=Math.log,fE=Math.LN2,lE={pack:function(t,e,r){var n,o,i,a=iE(r),u=8*r-e-1,c=(1<>1,f=23===e?uE(2,-24)-uE(2,-77):0,l=t<0||0===t&&1/t<0?1:0,h=0;for((t=aE(t))!=t||t===1/0?(o=t!=t?1:0,n=c):(n=cE(sE(t)/fE),t*(i=uE(2,-n))<1&&(n--,i*=2),(t+=n+s>=1?f/i:f*uE(2,1-s))*i>=2&&(n++,i/=2),n+s>=c?(o=0,n=c):n+s>=1?(o=(t*i-1)*uE(2,e),n+=s):(o=t*uE(2,s-1)*uE(2,e),n=0));e>=8;)a[h++]=255&o,o/=256,e-=8;for(n=n<0;)a[h++]=255&n,n/=256,u-=8;return a[--h]|=128*l,a},unpack:function(t,e){var r,n=t.length,o=8*n-e-1,i=(1<>1,u=o-7,c=n-1,s=t[c--],f=127&s;for(s>>=7;u>0;)f=256*f+t[c--],u-=8;for(r=f&(1<<-u)-1,f>>=-u,u+=e;u>0;)r=256*r+t[c--],u-=8;if(0===f)f=1-a;else{if(f===i)return r?NaN:s?-1/0:1/0;r+=uE(2,e),f-=a}return(s?-1:1)*r*uE(2,f-e)}},hE=Mt,pE=on,vE=fn,dE=function(t){for(var e=hE(this),r=vE(e),n=arguments.length,o=pE(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,a=void 0===i?r:pE(i,r);a>o;)e[o++]=t;return e},gE=r,yE=E,mE=i,wE=Yb,bE=$e,EE=po,SE=ty,AE=o,RE=Qc,OE=tn,TE=cn,IE=Xb,xE=oE,kE=lE,PE=Ua,LE=Jo,UE=dE,CE=pc,jE=ri,DE=Mn,ME=$a,_E=Tr,BE=Xe.PROPER,FE=Xe.CONFIGURABLE,NE="ArrayBuffer",HE="DataView",zE="prototype",VE="Wrong index",qE=_E.getterFor(NE),$E=_E.getterFor(HE),GE=_E.set,WE=gE[NE],YE=WE,KE=YE&&YE[zE],JE=gE[HE],QE=JE&&JE[zE],XE=Object.prototype,ZE=gE.Array,tS=gE.RangeError,eS=yE(UE),rS=yE([].reverse),nS=kE.pack,oS=kE.unpack,iS=function(t){return[255&t]},aS=function(t){return[255&t,t>>8&255]},uS=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},cS=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},sS=function(t){return nS(xE(t),23,4)},fS=function(t){return nS(t,52,8)},lS=function(t,e,r){EE(t[zE],e,{configurable:!0,get:function(){return r(this)[e]}})},hS=function(t,e,r,n){var o=$E(t),i=IE(r),a=!!n;if(i+e>o.byteLength)throw new tS(VE);var u=o.bytes,c=i+o.byteOffset,s=CE(u,c,c+e);return a?s:rS(s)},pS=function(t,e,r,n,o,i){var a=$E(t),u=IE(r),c=n(+o),s=!!i;if(u+e>a.byteLength)throw new tS(VE);for(var f=a.bytes,l=u+a.byteOffset,h=0;h>24)},setUint8:function(t,e){gS(this,t,e<<24>>24)}},{unsafe:!0})}else KE=(YE=function(t){RE(this,KE);var e=IE(t);GE(this,{type:NE,bytes:eS(ZE(e),0),byteLength:e}),mE||(this.byteLength=e,this.detached=!1)})[zE],JE=function(t,e,r){RE(this,QE),RE(t,KE);var n=qE(t),o=n.byteLength,i=OE(e);if(i<0||i>o)throw new tS("Wrong offset");if(i+(r=void 0===r?o-i:TE(r))>o)throw new tS("Wrong length");GE(this,{type:HE,buffer:t,byteLength:r,byteOffset:i,bytes:n.bytes}),mE||(this.buffer=t,this.byteLength=r,this.byteOffset=i)},QE=JE[zE],mE&&(lS(YE,"byteLength",qE),lS(JE,"buffer",$E),lS(JE,"byteLength",$E),lS(JE,"byteOffset",$E)),SE(QE,{getInt8:function(t){return hS(this,1,t)[0]<<24>>24},getUint8:function(t){return hS(this,1,t)[0]},getInt16:function(t){var e=hS(this,2,t,arguments.length>1&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=hS(this,2,t,arguments.length>1&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return cS(hS(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function(t){return cS(hS(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(t){return oS(hS(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function(t){return oS(hS(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function(t,e){pS(this,1,t,iS,e)},setUint8:function(t,e){pS(this,1,t,iS,e)},setInt16:function(t,e){pS(this,2,t,aS,e,arguments.length>2&&arguments[2])},setUint16:function(t,e){pS(this,2,t,aS,e,arguments.length>2&&arguments[2])},setInt32:function(t,e){pS(this,4,t,uS,e,arguments.length>2&&arguments[2])},setUint32:function(t,e){pS(this,4,t,uS,e,arguments.length>2&&arguments[2])},setFloat32:function(t,e){pS(this,4,t,sS,e,arguments.length>2&&arguments[2])},setFloat64:function(t,e){pS(this,8,t,fS,e,arguments.length>2&&arguments[2])}});ME(YE,NE),ME(JE,HE);var yS={ArrayBuffer:YE,DataView:JE},mS=Zn,wS=Ts,bS=o,ES=Le,SS=on,AS=cn,RS=As,OS=yS.ArrayBuffer,TS=yS.DataView,IS=TS.prototype,xS=wS(OS.prototype.slice),kS=wS(IS.getUint8),PS=wS(IS.setUint8);mS({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:bS((function(){return!new OS(2).slice(1,void 0).byteLength}))},{slice:function(t,e){if(xS&&void 0===e)return xS(ES(this),t);for(var r=ES(this).byteLength,n=SS(t,r),o=SS(void 0===e?r:e,r),i=new(RS(this,OS))(AS(o-n)),a=new TS(this),u=new TS(i),c=0;n92||JS&&WS>94||YS&&WS>97)return!1;var t=new ArrayBuffer(8),e=QS(t,{transfer:[t]});return 0!==t.byteLength||8!==e.byteLength})),ZS=r,tA=function(t){try{if($S)return Function('return require("'+t+'")')()}catch(vM){}},eA=XS,rA=ZS.structuredClone,nA=ZS.ArrayBuffer,oA=ZS.MessageChannel,iA=!1;if(eA)iA=function(t){rA(t,{transfer:[t]})};else if(nA)try{oA||(HS=tA("worker_threads"))&&(oA=HS.MessageChannel),oA&&(zS=new oA,VS=new nA(2),qS=function(t){zS.port1.postMessage(null,[t])},2===VS.byteLength&&(qS(VS),0===VS.byteLength&&(iA=qS)))}catch(vM){}var aA=iA,uA=r,cA=E,sA=Ho,fA=Xb,lA=MS,hA=CS,pA=aA,vA=XS,dA=uA.structuredClone,gA=uA.ArrayBuffer,yA=uA.DataView,mA=uA.TypeError,wA=Math.min,bA=gA.prototype,EA=yA.prototype,SA=cA(bA.slice),AA=sA(bA,"resizable","get"),RA=sA(bA,"maxByteLength","get"),OA=cA(EA.getInt8),TA=cA(EA.setInt8),IA=(vA||pA)&&function(t,e,r){var n,o=hA(t),i=void 0===e?o:fA(e),a=!AA||!AA(t);if(lA(t))throw new mA("ArrayBuffer is detached");if(vA&&(t=dA(t,{transfer:[t]}),o===i&&(r||a)))return t;if(o>=i&&(!r||a))n=SA(t,0,i);else{var u=r&&!a&&RA?{maxByteLength:RA(t)}:void 0;n=new gA(i,u);for(var c=new yA(t),s=new yA(n),f=wA(i,o),l=0;l2?r:XA(e),i=new t(o);o>n;)i[n]=e[n++];return i},tR=Ps,eR=P,rR=Mt,nR=fe,oR=fn,iR=la,aR=ZA,uR=Array,cR=E([].push),sR=function(t,e,r,n){for(var o,i,a,u=rR(t),c=eR(u),s=tR(e,r),f=iR(null),l=oR(c),h=0;l>h;h++)a=c[h],(i=nR(s(a,h,u)))in f?cR(f[i],a):f[i]=[a];if(n&&(o=n(u))!==uR)for(i in f)f[i]=aR(o,f[i]);return f},fR=ya;Zn({target:"Array",proto:!0},{group:function(t){return sR(this,t,arguments.length>1?arguments[1]:void 0)}}),fR("group");var lR=Mh,hR=dt,pR=Le,vR=Yg;Zn({target:"Iterator",proto:!0,real:!0},{find:function(t){pR(this),hR(t);var e=vR(this),r=0;return lR(e,(function(e,n){if(t(e,r++))return n(e)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}});var dR=Le,gR=Mh,yR=Yg,mR=[].push;Zn({target:"Iterator",proto:!0,real:!0},{toArray:function(){var t=[];return gR(yR(dR(this)),mR,{that:t,IS_RECORD:!0}),t}});var wR=Mt,bR=fn,ER=tn,SR=ya;Zn({target:"Array",proto:!0},{at:function(t){var e=wR(this),r=bR(e),n=ER(t),o=n>=0?n:r+n;return o<0||o>=r?void 0:e[o]}}),SR("at");var AR=ju,RR=fn,OR=Hu,TR=Ps,IR=function(t,e,r,n,o,i,a,u){for(var c,s,f=o,l=0,h=!!a&&TR(a,u);l0&&AR(c)?(s=RR(c),f=IR(t,e,c,s,f,i-1)-1):(OR(f+1),t[f]=c),f++),l++;return f},xR=IR,kR=ju,PR=vs,LR=H,UR=Zt("species"),CR=Array,jR=function(t){var e;return kR(t)&&(e=t.constructor,(PR(e)&&(e===CR||kR(e.prototype))||LR(e)&&null===(e=e[UR]))&&(e=void 0)),void 0===e?CR:e},DR=function(t,e){return new(jR(t))(0===e?0:e)},MR=xR,_R=Mt,BR=fn,FR=tn,NR=DR;Zn({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=_R(this),r=BR(e),n=NR(e,0);return n.length=MR(n,e,e,r,0,void 0===t?1:FR(t)),n}}),ya("flat");var HR=s,zR=dt,VR=rl,qR=Bf,$R=Mh;Zn({target:"Promise",stat:!0,forced:Vh},{allSettled:function(t){var e=this,r=VR.f(e),n=r.resolve,o=r.reject,i=qR((function(){var r=zR(e.resolve),o=[],i=0,a=1;$R(t,(function(t){var u=i++,c=!1;a++,HR(r,e,t).then((function(t){c||(c=!0,o[u]={status:"fulfilled",value:t},--a||n(o))}),(function(t){c||(c=!0,o[u]={status:"rejected",reason:t},--a||n(o))}))})),--a||n(o)}));return i.error&&o(i.value),r.promise}});var GR=Zn,WR=j,YR=tn,KR=fo,JR=o,QR=E("".charAt);GR({target:"String",proto:!0,forced:JR((function(){return"\ud842"!=="𠮷".at(-2)}))},{at:function(t){var e=KR(WR(this)),r=e.length,n=YR(t),o=n>=0?n:r+n;return o<0||o>=r?void 0:QR(e,o)}});var XR=Zn,ZR=s,tO=E,eO=j,rO=F,nO=L,oO=Ep,iO=fo,aO=mt,uO=kp,cO=Cd,sO=Zt("replace"),fO=TypeError,lO=tO("".indexOf);tO("".replace);var hO=tO("".slice),pO=Math.max;XR({target:"String",proto:!0},{replaceAll:function(t,e){var r,n,o,i,a,u,c,s,f=eO(this),l=0,h=0,p="";if(!nO(t)){if(oO(t)&&(r=iO(eO(uO(t))),!~lO(r,"g")))throw new fO("`.replaceAll` does not allow non-global regexes");if(n=aO(t,sO))return ZR(n,t,f,e)}for(o=iO(f),i=iO(t),(a=rO(e))||(e=iO(e)),u=i.length,c=pO(1,u),l=lO(o,i);-1!==l;)s=a?iO(e(i,l,o)):cO(i,o,l,[],void 0,e),p+=hO(o,h,l)+s,h=l+u,l=l+c>o.length?-1:lO(o,i,l+c);return hm;m++)if((u||m in d)&&(p=y(h=d[m],m,v),t))if(e)b[m]=p;else if(p)switch(t){case 3:return!0;case 5:return h;case 6:return m;case 2:_T(b,h)}else switch(t){case 4:return!1;case 7:_T(b,h)}return i?-1:n||o?o:b}},FT={forEach:BT(0),map:BT(1),filter:BT(2),some:BT(3),every:BT(4),find:BT(5),findIndex:BT(6),filterReject:BT(7)},NT=Zn,HT=r,zT=s,VT=i,qT=aT,$T=ZO,GT=yS,WT=Qc,YT=g,KT=$e,JT=sT,QT=cn,XT=Xb,ZT=vT,tI=function(t){var e=dT(t);return e<0?0:e>255?255:255&e},eI=fe,rI=Ft,nI=uo,oI=H,iI=st,aI=la,uI=$,cI=Jo,sI=Jr.f,fI=function(t){var e,r,n,o,i,a,u,c,s=AT(this),f=RT(t),l=arguments.length,h=l>1?arguments[1]:void 0,p=void 0!==h,v=IT(f);if(v&&!xT(v))for(c=(u=TT(f,v)).next,f=[];!(a=ST(c,u)).done;)f.push(a.value);for(p&&l>2&&(h=ET(h,arguments[2])),r=OT(f),n=new(PT(s))(r),o=kT(n),e=0;r>e;e++)i=p?h(f[e],e):f[e],n[e]=o?LT(i):+i;return n},lI=FT.forEach,hI=Yc,pI=po,vI=Te,dI=n,gI=ZA,yI=ri,mI=Tr.get,wI=Tr.set,bI=Tr.enforce,EI=vI.f,SI=dI.f,AI=HT.RangeError,RI=GT.ArrayBuffer,OI=RI.prototype,TI=GT.DataView,II=$T.NATIVE_ARRAY_BUFFER_VIEWS,xI=$T.TYPED_ARRAY_TAG,kI=$T.TypedArray,PI=$T.TypedArrayPrototype,LI=$T.isTypedArray,UI="BYTES_PER_ELEMENT",CI="Wrong length",jI=function(t,e){pI(t,e,{configurable:!0,get:function(){return mI(this)[e]}})},DI=function(t){var e;return uI(OI,t)||"ArrayBuffer"===(e=nI(t))||"SharedArrayBuffer"===e},MI=function(t,e){return LI(t)&&!iI(e)&&e in t&&JT(+e)&&e>=0},_I=function(t,e){return e=eI(e),MI(t,e)?YT(2,t[e]):SI(t,e)},BI=function(t,e,r){return e=eI(e),!(MI(t,e)&&oI(r)&&rI(r,"value"))||rI(r,"get")||rI(r,"set")||r.configurable||rI(r,"writable")&&!r.writable||rI(r,"enumerable")&&!r.enumerable?EI(t,e,r):(t[e]=r.value,t)};VT?(II||(dI.f=_I,vI.f=BI,jI(PI,"buffer"),jI(PI,"byteOffset"),jI(PI,"byteLength"),jI(PI,"length")),NT({target:"Object",stat:!0,forced:!II},{getOwnPropertyDescriptor:_I,defineProperty:BI}),yO.exports=function(t,e,r){var n=t.match(/\d+/)[0]/8,o=t+(r?"Clamped":"")+"Array",i="get"+t,a="set"+t,u=HT[o],c=u,s=c&&c.prototype,f={},l=function(t,e){EI(t,e,{get:function(){return function(t,e){var r=mI(t);return r.view[i](e*n+r.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,o){var i=mI(t);i.view[a](e*n+i.byteOffset,r?tI(o):o,!0)}(this,e,t)},enumerable:!0})};II?qT&&(c=e((function(t,e,r,o){return WT(t,s),yI(oI(e)?DI(e)?void 0!==o?new u(e,ZT(r,n),o):void 0!==r?new u(e,ZT(r,n)):new u(e):LI(e)?gI(c,e):zT(fI,c,e):new u(XT(e)),t,c)})),cI&&cI(c,kI),lI(sI(u),(function(t){t in c||KT(c,t,u[t])})),c.prototype=s):(c=e((function(t,e,r,o){WT(t,s);var i,a,u,f=0,h=0;if(oI(e)){if(!DI(e))return LI(e)?gI(c,e):zT(fI,c,e);i=e,h=ZT(r,n);var p=e.byteLength;if(void 0===o){if(p%n)throw new AI(CI);if((a=p-h)<0)throw new AI(CI)}else if((a=QT(o)*n)+h>p)throw new AI(CI);u=a/n}else u=XT(e),i=new RI(a=u*n);for(wI(t,{buffer:i,byteOffset:h,byteLength:a,length:u,view:new TI(i)});f=0?n:r+n;return o<0||o>=r?void 0:e[o]}));var zI=dE,VI=bT,qI=uo,$I=s,GI=o,WI=ZO.aTypedArray,YI=ZO.exportTypedArrayMethod,KI=E("".slice);YI("fill",(function(t){var e=arguments.length;WI(this);var r="Big"===KI(qI(this),0,3)?VI(t):+t;return $I(zI,this,r,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),GI((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t})));var JI=Ps,QI=P,XI=Mt,ZI=fn,tx=function(t){var e=1===t;return function(r,n,o){for(var i,a=XI(r),u=QI(a),c=ZI(u),s=JI(n,o);c-- >0;)if(s(i=u[c],c,a))switch(t){case 0:return i;case 1:return c}return e?-1:void 0}},ex={findLast:tx(0),findLastIndex:tx(1)},rx=ex.findLast,nx=ZO.aTypedArray;(0,ZO.exportTypedArrayMethod)("findLast",(function(t){return rx(nx(this),t,arguments.length>1?arguments[1]:void 0)}));var ox=ex.findLastIndex,ix=ZO.aTypedArray;(0,ZO.exportTypedArrayMethod)("findLastIndex",(function(t){return ox(ix(this),t,arguments.length>1?arguments[1]:void 0)}));var ax=r,ux=s,cx=ZO,sx=fn,fx=vT,lx=Mt,hx=o,px=ax.RangeError,vx=ax.Int8Array,dx=vx&&vx.prototype,gx=dx&&dx.set,yx=cx.aTypedArray,mx=cx.exportTypedArrayMethod,wx=!hx((function(){var t=new Uint8ClampedArray(2);return ux(gx,t,{length:1,0:3},1),3!==t[1]})),bx=wx&&cx.NATIVE_ARRAY_BUFFER_VIEWS&&hx((function(){var t=new vx(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));mx("set",(function(t){yx(this);var e=fx(arguments.length>1?arguments[1]:void 0,1),r=lx(t);if(wx)return ux(gx,this,r,e);var n=this.length,o=sx(r),i=0;if(o+e>n)throw new px("Wrong length");for(;i0&&1/r<0?1:-1:e>r}}(t))}),!jx||Cx);var Dx=fn,Mx=function(t,e){for(var r=Dx(t),n=new e(r),o=0;o=o||a<0)throw new Wx("Incorrect index");for(var u=new e(o),c=0;c1&&!jP(arguments[1])?BP(arguments[1]):void 0,o=n?n.transfer:void 0;void 0!==o&&(r=function(t,e){if(!DP(t))throw new rL("Transfer option cannot be converted to a sequence");var r=[];_P(t,(function(t){pL(r,BP(t))}));for(var n,o,i,a,u,c=0,s=VP(r),f=new sL;c=r.length?ML(void 0,!0):(t=UL(r,n),e.index+=t.length,ML(t,!1))}));var NL=o,HL=i,zL=Zt("iterator"),VL=!NL((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),r.delete("a",2),r.delete("b",void 0),!e.size&&!HL||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[zL]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),qL=i,$L=E,GL=s,WL=o,YL=Vi,KL=On,JL=f,QL=Mt,XL=P,ZL=Object.assign,tU=Object.defineProperty,eU=$L([].concat),rU=!ZL||WL((function(){if(qL&&1!==ZL({b:1},ZL(tU({},"a",{enumerable:!0,get:function(){tU(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!==ZL({},t)[r]||YL(ZL({},e)).join("")!==n}))?function(t,e){for(var r=QL(t),n=arguments.length,o=1,i=KL.f,a=JL.f;n>o;)for(var u,c=XL(arguments[o++]),s=i?eU(YL(c),i(c)):YL(c),f=s.length,l=0;f>l;)u=s[l++],qL&&!GL(a,c,u)||(r[u]=c[u]);return r}:ZL,nU=Ps,oU=s,iU=Mt,aU=by,uU=ih,cU=vs,sU=fn,fU=Ig,lU=mh,hU=lh,pU=Array,vU=E,dU=2147483647,gU=/[^\0-\u007E]/,yU=/[.\u3002\uFF0E\uFF61]/g,mU="Overflow: input needs wider integers to process",wU=RangeError,bU=vU(yU.exec),EU=Math.floor,SU=String.fromCharCode,AU=vU("".charCodeAt),RU=vU([].join),OU=vU([].push),TU=vU("".replace),IU=vU("".split),xU=vU("".toLowerCase),kU=function(t){return t+22+75*(t<26)},PU=function(t,e,r){var n=0;for(t=r?EU(t/700):t>>1,t+=EU(t/e);t>455;)t=EU(t/35),n+=36;return EU(n+36*t/(t+38))},LU=function(t){var e=[];t=function(t){for(var e=[],r=0,n=t.length;r=55296&&o<=56319&&r=i&&nEU((dU-a)/l))throw new wU(mU);for(a+=(f-i)*l,i=f,r=0;rdU)throw new wU(mU);if(n===i){for(var h=a,p=36;;){var v=p<=u?1:p>=u+26?26:p-u;if(h=e.length)return t.target=void 0,nC(void 0,!0);var n=e[r];switch(t.kind){case"keys":return nC(n.key,!1);case"values":return nC(n.value,!1)}return nC([n.key,n.value],!1)}),!0),FC=function(t){this.entries=[],this.url=null,void 0!==t&&(QU(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===EC(t,0)?xC(t,1):t:XU(t)))};FC.prototype={type:uC,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,o,i,a,u,c=this.entries,s=rC(t);if(s)for(r=(e=eC(t,s)).next;!(n=DU(r,e)).done;){if(i=(o=eC(JU(n.value))).next,(a=DU(i,o)).done||(u=DU(i,o)).done||!DU(i,o).done)throw new mC("Expected sequence with length 2");AC(c,{key:XU(a.value),value:XU(u.value)})}else for(var f in t)WU(t,f)&&AC(c,{key:f,value:XU(t[f])})},parseQuery:function(t){if(t)for(var e,r,n=this.entries,o=IC(t,"&"),i=0;i0?arguments[0]:void 0));_U||(this.size=t.entries.length)},HC=NC.prototype;if(HU(HC,{append:function(t,e){var r=fC(this);oC(arguments.length,2),AC(r.entries,{key:XU(t),value:XU(e)}),_U||this.length++,r.updateURL()},delete:function(t){for(var e=fC(this),r=oC(arguments.length,1),n=e.entries,o=XU(t),i=r<2?void 0:arguments[1],a=void 0===i?i:XU(i),u=0;ue.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,r=fC(this).entries,n=YU(t,arguments.length>1?arguments[1]:void 0),o=0;o1?qC(arguments[1]):{})}}),GU(pC)){var $C=function(t){return $U(this,dC),new pC(t,arguments.length>1?qC(arguments[1]):{})};dC.constructor=$C,$C.prototype=dC,UU({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:$C})}}var GC,WC=Zn,YC=i,KC=VL,JC=r,QC=Ps,XC=E,ZC=Kr,tj=po,ej=Qc,rj=Ft,nj=rU,oj=function(t){var e=iU(t),r=cU(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=nU(o,n>2?arguments[2]:void 0));var a,u,c,s,f,l,h=hU(e),p=0;if(!h||this===pU&&uU(h))for(a=sU(e),u=r?new this(a):pU(a);a>p;p++)l=i?o(e[p],p):e[p],fU(u,p,l);else for(u=r?new this:[],f=(s=lU(e,h)).next;!(c=oU(f,s)).done;p++)l=i?aU(s,o,[c.value,p],!0):c.value,fU(u,p,l);return u.length=p,u},ij=pc,aj=Ad.codeAt,uj=function(t){var e,r,n=[],o=IU(TU(xU(t),yU,"."),".");for(e=0;e?@[\\\]^|]/,$j=/[\0\t\n\r #/:<>?@[\\\]^|]/,Gj=/^[\u0000-\u0020]+/,Wj=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Yj=/[\t\n\r]/g,Kj=function(t){var e,r,n,o;if("number"==typeof t){for(e=[],r=0;r<4;r++)Cj(e,t%256),t=bj(t/256);return Rj(e,".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,o=0,i=0;i<8;i++)0!==t[i]?(o>r&&(e=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(e=n,r=o),e}(t),r=0;r<8;r++)o&&0===t[r]||(o&&(o=!1),n===r?(e+=r?":":"::",o=!0):(e+=Oj(t[r],16),r<7&&(e+=":")));return"["+e+"]"}return t},Jj={},Qj=nj({},Jj,{" ":1,'"':1,"<":1,">":1,"`":1}),Xj=nj({},Qj,{"#":1,"?":1,"{":1,"}":1}),Zj=nj({},Xj,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),tD=function(t,e){var r=aj(t,0);return r>32&&r<127&&!rj(e,t)?t:encodeURIComponent(t)},eD={ftp:21,file:null,http:80,https:443,ws:80,wss:443},rD=function(t,e){var r;return 2===t.length&&Aj(_j,Sj(t,0))&&(":"===(r=Sj(t,1))||!e&&"|"===r)},nD=function(t){var e;return t.length>1&&rD(Lj(t,0,2))&&(2===t.length||"/"===(e=Sj(t,2))||"\\"===e||"?"===e||"#"===e)},oD=function(t){return"."===t||"%2e"===Uj(t)},iD={},aD={},uD={},cD={},sD={},fD={},lD={},hD={},pD={},vD={},dD={},gD={},yD={},mD={},wD={},bD={},ED={},SD={},AD={},RD={},OD={},TD=function(t,e,r){var n,o,i,a=cj(t);if(e){if(o=this.parse(a))throw new mj(o);this.searchParams=null}else{if(void 0!==r&&(n=new TD(r,!0)),o=this.parse(a,null,n))throw new mj(o);(i=gj(new dj)).bindURL(this),this.searchParams=i}};TD.prototype={type:"URL",parse:function(t,e,r){var n,o,i,a,u,c=this,s=e||iD,f=0,l="",h=!1,p=!1,v=!1;for(t=cj(t),e||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,t=xj(t,Gj,""),t=xj(t,Wj,"$1")),t=xj(t,Yj,""),n=oj(t);f<=n.length;){switch(o=n[f],s){case iD:if(!o||!Aj(_j,o)){if(e)return jj;s=uD;continue}l+=Uj(o),s=aD;break;case aD:if(o&&(Aj(Bj,o)||"+"===o||"-"===o||"."===o))l+=Uj(o);else{if(":"!==o){if(e)return jj;l="",s=uD,f=0;continue}if(e&&(c.isSpecial()!==rj(eD,l)||"file"===l&&(c.includesCredentials()||null!==c.port)||"file"===c.scheme&&!c.host))return;if(c.scheme=l,e)return void(c.isSpecial()&&eD[c.scheme]===c.port&&(c.port=null));l="","file"===c.scheme?s=mD:c.isSpecial()&&r&&r.scheme===c.scheme?s=cD:c.isSpecial()?s=hD:"/"===n[f+1]?(s=sD,f++):(c.cannotBeABaseURL=!0,Ij(c.path,""),s=AD)}break;case uD:if(!r||r.cannotBeABaseURL&&"#"!==o)return jj;if(r.cannotBeABaseURL&&"#"===o){c.scheme=r.scheme,c.path=ij(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,s=OD;break}s="file"===r.scheme?mD:fD;continue;case cD:if("/"!==o||"/"!==n[f+1]){s=fD;continue}s=pD,f++;break;case sD:if("/"===o){s=vD;break}s=SD;continue;case fD:if(c.scheme=r.scheme,o===GC)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=ij(r.path),c.query=r.query;else if("/"===o||"\\"===o&&c.isSpecial())s=lD;else if("?"===o)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=ij(r.path),c.query="",s=RD;else{if("#"!==o){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=ij(r.path),c.path.length--,s=SD;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=ij(r.path),c.query=r.query,c.fragment="",s=OD}break;case lD:if(!c.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,s=SD;continue}s=vD}else s=pD;break;case hD:if(s=pD,"/"!==o||"/"!==Sj(l,f+1))continue;f++;break;case pD:if("/"!==o&&"\\"!==o){s=vD;continue}break;case vD:if("@"===o){h&&(l="%40"+l),h=!0,i=oj(l);for(var d=0;d65535)return Mj;c.port=c.isSpecial()&&m===eD[c.scheme]?null:m,l=""}if(e)return;s=ED;continue}return Mj}l+=o;break;case mD:if(c.scheme="file","/"===o||"\\"===o)s=wD;else{if(!r||"file"!==r.scheme){s=SD;continue}switch(o){case GC:c.host=r.host,c.path=ij(r.path),c.query=r.query;break;case"?":c.host=r.host,c.path=ij(r.path),c.query="",s=RD;break;case"#":c.host=r.host,c.path=ij(r.path),c.query=r.query,c.fragment="",s=OD;break;default:nD(Rj(ij(n,f),""))||(c.host=r.host,c.path=ij(r.path),c.shortenPath()),s=SD;continue}}break;case wD:if("/"===o||"\\"===o){s=bD;break}r&&"file"===r.scheme&&!nD(Rj(ij(n,f),""))&&(rD(r.path[0],!0)?Ij(c.path,r.path[0]):c.host=r.host),s=SD;continue;case bD:if(o===GC||"/"===o||"\\"===o||"?"===o||"#"===o){if(!e&&rD(l))s=SD;else if(""===l){if(c.host="",e)return;s=ED}else{if(a=c.parseHost(l))return a;if("localhost"===c.host&&(c.host=""),e)return;l="",s=ED}continue}l+=o;break;case ED:if(c.isSpecial()){if(s=SD,"/"!==o&&"\\"!==o)continue}else if(e||"?"!==o)if(e||"#"!==o){if(o!==GC&&(s=SD,"/"!==o))continue}else c.fragment="",s=OD;else c.query="",s=RD;break;case SD:if(o===GC||"/"===o||"\\"===o&&c.isSpecial()||!e&&("?"===o||"#"===o)){if(".."===(u=Uj(u=l))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(c.shortenPath(),"/"===o||"\\"===o&&c.isSpecial()||Ij(c.path,"")):oD(l)?"/"===o||"\\"===o&&c.isSpecial()||Ij(c.path,""):("file"===c.scheme&&!c.path.length&&rD(l)&&(c.host&&(c.host=""),l=Sj(l,0)+":"),Ij(c.path,l)),l="","file"===c.scheme&&(o===GC||"?"===o||"#"===o))for(;c.path.length>1&&""===c.path[0];)kj(c.path);"?"===o?(c.query="",s=RD):"#"===o&&(c.fragment="",s=OD)}else l+=tD(o,Xj);break;case AD:"?"===o?(c.query="",s=RD):"#"===o?(c.fragment="",s=OD):o!==GC&&(c.path[0]+=tD(o,Jj));break;case RD:e||"#"!==o?o!==GC&&("'"===o&&c.isSpecial()?c.query+="%27":c.query+="#"===o?"%23":tD(o,Jj)):(c.fragment="",s=OD);break;case OD:o!==GC&&(c.fragment+=tD(o,Qj))}f++}},parseHost:function(t){var e,r,n;if("["===Sj(t,0)){if("]"!==Sj(t,t.length-1))return Dj;if(e=function(t){var e,r,n,o,i,a,u,c=[0,0,0,0,0,0,0,0],s=0,f=null,l=0,h=function(){return Sj(t,l)};if(":"===h()){if(":"!==Sj(t,1))return;l+=2,f=++s}for(;h();){if(8===s)return;if(":"!==h()){for(e=r=0;r<4&&Aj(Vj,h());)e=16*e+wj(h(),16),l++,r++;if("."===h()){if(0===r)return;if(l-=r,s>6)return;for(n=0;h();){if(o=null,n>0){if(!("."===h()&&n<4))return;l++}if(!Aj(Fj,h()))return;for(;Aj(Fj,h());){if(i=wj(h(),10),null===o)o=i;else{if(0===o)return;o=10*o+i}if(o>255)return;l++}c[s]=256*c[s]+o,2!=++n&&4!==n||s++}if(4!==n)return;break}if(":"===h()){if(l++,!h())return}else if(h())return;c[s++]=e}else{if(null!==f)return;l++,f=++s}}if(null!==f)for(a=s-f,s=7;0!==s&&a>0;)u=c[s],c[s--]=c[f+a-1],c[f+--a]=u;else if(8!==s)return;return c}(Lj(t,1,-1)),!e)return Dj;this.host=e}else if(this.isSpecial()){if(t=uj(t),Aj(qj,t))return Dj;if(e=function(t){var e,r,n,o,i,a,u,c=Pj(t,".");if(c.length&&""===c[c.length-1]&&c.length--,(e=c.length)>4)return t;for(r=[],n=0;n1&&"0"===Sj(o,0)&&(i=Aj(Nj,o)?16:8,o=Lj(o,8===i?1:2)),""===o)a=0;else{if(!Aj(10===i?zj:8===i?Hj:Vj,o))return t;a=wj(o,i)}Ij(r,a)}for(n=0;n=Ej(256,5-e))return null}else if(a>255)return null;for(u=Tj(r),n=0;n1?arguments[1]:void 0,n=pj(e,new TD(t,!1,r));YC||(e.href=n.serialize(),e.origin=n.getOrigin(),e.protocol=n.getProtocol(),e.username=n.getUsername(),e.password=n.getPassword(),e.host=n.getHost(),e.hostname=n.getHostname(),e.port=n.getPort(),e.pathname=n.getPathname(),e.search=n.getSearch(),e.searchParams=n.getSearchParams(),e.hash=n.getHash())},xD=ID.prototype,kD=function(t,e){return{get:function(){return vj(this)[t]()},set:e&&function(t){return vj(this)[e](t)},configurable:!0,enumerable:!0}};if(YC&&(tj(xD,"href",kD("serialize","setHref")),tj(xD,"origin",kD("getOrigin")),tj(xD,"protocol",kD("getProtocol","setProtocol")),tj(xD,"username",kD("getUsername","setUsername")),tj(xD,"password",kD("getPassword","setPassword")),tj(xD,"host",kD("getHost","setHost")),tj(xD,"hostname",kD("getHostname","setHostname")),tj(xD,"port",kD("getPort","setPort")),tj(xD,"pathname",kD("getPathname","setPathname")),tj(xD,"search",kD("getSearch","setSearch")),tj(xD,"searchParams",kD("getSearchParams")),tj(xD,"hash",kD("getHash","setHash"))),ZC(xD,"toJSON",(function(){return vj(this).serialize()}),{enumerable:!0}),ZC(xD,"toString",(function(){return vj(this).serialize()}),{enumerable:!0}),yj){var PD=yj.createObjectURL,LD=yj.revokeObjectURL;PD&&ZC(ID,"createObjectURL",QC(PD,yj)),LD&&ZC(ID,"revokeObjectURL",QC(LD,yj))}sj(ID,"URL"),WC({global:!0,constructor:!0,forced:!KC,sham:!YC},{URL:ID});var UD=s;Zn({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return UD(URL.prototype.toString,this)}});var CD=Kr,jD=E,DD=fo,MD=Us,_D=URLSearchParams,BD=_D.prototype,FD=jD(BD.append),ND=jD(BD.delete),HD=jD(BD.forEach),zD=jD([].push),VD=new _D("a=1&a=2&b=3");VD.delete("a",1),VD.delete("b",void 0),VD+""!="a=2"&&CD(BD,"delete",(function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return ND(this,t);var n=[];HD(this,(function(t,e){zD(n,{key:e,value:t})})),MD(e,1);for(var o,i=DD(t),a=DD(r),u=0,c=0,s=!1,f=n.length;u0&&v[0]<4?1:+(v[0]+v[1])),!d&&Y&&(!(v=Y.match(/Edge\/(\d+)/))||v[1]>=74)&&(v=Y.match(/Chrome\/(\d+)/))&&(d=+v[1]);var Z=d,tt=Z,et=o,rt=r.String,nt=!!Object.getOwnPropertySymbols&&!et((function(){var t=Symbol("symbol detection");return!rt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&tt&&tt<41})),ot=nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,it=V,at=F,ut=W,st=Object,ct=ot?function(t){return"symbol"==typeof t}:function(t){var e=it("Symbol");return at(e)&&ut(e.prototype,st(t))},ft=String,lt=function(t){try{return ft(t)}catch(e){return"Object"}},ht=F,pt=lt,vt=TypeError,dt=function(t){if(ht(t))return t;throw new vt(pt(t)+" is not a function")},yt=dt,gt=L,mt=function(t,e){var r=t[e];return gt(r)?void 0:yt(r)},wt=c,bt=F,Et=H,St=TypeError,At={exports:{}},Rt=r,Ot=Object.defineProperty,It=function(t,e){try{Ot(Rt,t,{value:e,configurable:!0,writable:!0})}catch(r){Rt[t]=e}return e},xt=r,Tt=It,kt="__core-js_shared__",Pt=At.exports=xt[kt]||Tt(kt,{});(Pt.versions||(Pt.versions=[])).push({version:"3.37.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Lt=At.exports,Ut=Lt,Ct=function(t,e){return Ut[t]||(Ut[t]=e||{})},jt=j,Mt=Object,_t=function(t){return Mt(jt(t))},Dt=_t,Bt=E({}.hasOwnProperty),Ft=Object.hasOwn||function(t,e){return Bt(Dt(t),e)},Nt=E,Ht=0,zt=Math.random(),qt=Nt(1..toString),Vt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+qt(++Ht+zt,36)},Wt=Ct,$t=Ft,Gt=Vt,Yt=nt,Jt=ot,Qt=r.Symbol,Kt=Wt("wks"),Xt=Jt?Qt.for||Qt:Qt&&Qt.withoutSetter||Gt,Zt=function(t){return $t(Kt,t)||(Kt[t]=Yt&&$t(Qt,t)?Qt[t]:Xt("Symbol."+t)),Kt[t]},te=c,ee=H,re=ct,ne=mt,oe=function(t,e){var r,n;if("string"===e&&bt(r=t.toString)&&!Et(n=wt(r,t)))return n;if(bt(r=t.valueOf)&&!Et(n=wt(r,t)))return n;if("string"!==e&&bt(r=t.toString)&&!Et(n=wt(r,t)))return n;throw new St("Can't convert object to primitive value")},ie=TypeError,ae=Zt("toPrimitive"),ue=function(t,e){if(!ee(t)||re(t))return t;var r,n=ne(t,ae);if(n){if(void 0===e&&(e="default"),r=te(n,t,e),!ee(r)||re(r))return r;throw new ie("Can't convert object to primitive value")}return void 0===e&&(e="number"),oe(t,e)},se=ue,ce=ct,fe=function(t){var e=se(t,"string");return ce(e)?e:e+""},le=H,he=r.document,pe=le(he)&&le(he.createElement),ve=function(t){return pe?he.createElement(t):{}},de=ve,ye=!i&&!o((function(){return 7!==Object.defineProperty(de("div"),"a",{get:function(){return 7}}).a})),ge=i,me=c,we=f,be=y,Ee=D,Se=fe,Ae=Ft,Re=ye,Oe=Object.getOwnPropertyDescriptor;n.f=ge?Oe:function(t,e){if(t=Ee(t),e=Se(e),Re)try{return Oe(t,e)}catch(r){}if(Ae(t,e))return be(!me(we.f,t,e),t[e])};var Ie={},xe=i&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Te=H,ke=String,Pe=TypeError,Le=function(t){if(Te(t))return t;throw new Pe(ke(t)+" is not an object")},Ue=i,Ce=ye,je=xe,Me=Le,_e=fe,De=TypeError,Be=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,Ne="enumerable",He="configurable",ze="writable";Ie.f=Ue?je?function(t,e,r){if(Me(t),e=_e(e),Me(r),"function"==typeof t&&"prototype"===e&&"value"in r&&ze in r&&!r[ze]){var n=Fe(t,e);n&&n[ze]&&(t[e]=r.value,r={configurable:He in r?r[He]:n[He],enumerable:Ne in r?r[Ne]:n[Ne],writable:!1})}return Be(t,e,r)}:Be:function(t,e,r){if(Me(t),e=_e(e),Me(r),Ce)try{return Be(t,e,r)}catch(n){}if("get"in r||"set"in r)throw new De("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var qe=Ie,Ve=y,We=i?function(t,e,r){return qe.f(t,e,Ve(1,r))}:function(t,e,r){return t[e]=r,t},$e={exports:{}},Ge=i,Ye=Ft,Je=Function.prototype,Qe=Ge&&Object.getOwnPropertyDescriptor,Ke=Ye(Je,"name"),Xe={EXISTS:Ke,PROPER:Ke&&"something"===function(){}.name,CONFIGURABLE:Ke&&(!Ge||Ge&&Qe(Je,"name").configurable)},Ze=F,tr=Lt,er=E(Function.toString);Ze(tr.inspectSource)||(tr.inspectSource=function(t){return er(t)});var rr,nr,or,ir=tr.inspectSource,ar=F,ur=r.WeakMap,sr=ar(ur)&&/native code/.test(String(ur)),cr=Vt,fr=Ct("keys"),lr=function(t){return fr[t]||(fr[t]=cr(t))},hr={},pr=sr,vr=r,dr=H,yr=We,gr=Ft,mr=Lt,wr=lr,br=hr,Er="Object already initialized",Sr=vr.TypeError,Ar=vr.WeakMap;if(pr||mr.state){var Rr=mr.state||(mr.state=new Ar);Rr.get=Rr.get,Rr.has=Rr.has,Rr.set=Rr.set,rr=function(t,e){if(Rr.has(t))throw new Sr(Er);return e.facade=t,Rr.set(t,e),e},nr=function(t){return Rr.get(t)||{}},or=function(t){return Rr.has(t)}}else{var Or=wr("state");br[Or]=!0,rr=function(t,e){if(gr(t,Or))throw new Sr(Er);return e.facade=t,yr(t,Or,e),e},nr=function(t){return gr(t,Or)?t[Or]:{}},or=function(t){return gr(t,Or)}}var Ir={set:rr,get:nr,has:or,enforce:function(t){return or(t)?nr(t):rr(t,{})},getterFor:function(t){return function(e){var r;if(!dr(e)||(r=nr(e)).type!==t)throw new Sr("Incompatible receiver, "+t+" required");return r}}},xr=E,Tr=o,kr=F,Pr=Ft,Lr=i,Ur=Xe.CONFIGURABLE,Cr=ir,jr=Ir.enforce,Mr=Ir.get,_r=String,Dr=Object.defineProperty,Br=xr("".slice),Fr=xr("".replace),Nr=xr([].join),Hr=Lr&&!Tr((function(){return 8!==Dr((function(){}),"length",{value:8}).length})),zr=String(String).split("String"),qr=$e.exports=function(t,e,r){"Symbol("===Br(_r(e),0,7)&&(e="["+Fr(_r(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!Pr(t,"name")||Ur&&t.name!==e)&&(Lr?Dr(t,"name",{value:e,configurable:!0}):t.name=e),Hr&&r&&Pr(r,"arity")&&t.length!==r.arity&&Dr(t,"length",{value:r.arity});try{r&&Pr(r,"constructor")&&r.constructor?Lr&&Dr(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(o){}var n=jr(t);return Pr(n,"source")||(n.source=Nr(zr,"string"==typeof e?e:"")),t};Function.prototype.toString=qr((function(){return kr(this)&&Mr(this).source||Cr(this)}),"toString");var Vr=$e.exports,Wr=F,$r=Ie,Gr=Vr,Yr=It,Jr=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(Wr(r)&&Gr(r,i,n),n.global)o?t[e]=r:Yr(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(a){}o?t[e]=r:$r.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},Qr={},Kr=Math.ceil,Xr=Math.floor,Zr=Math.trunc||function(t){var e=+t;return(e>0?Xr:Kr)(e)},tn=function(t){var e=+t;return e!=e||0===e?0:Zr(e)},en=tn,rn=Math.max,nn=Math.min,on=function(t,e){var r=en(t);return r<0?rn(r+e,0):nn(r,e)},an=tn,un=Math.min,sn=function(t){var e=an(t);return e>0?un(e,9007199254740991):0},cn=sn,fn=function(t){return cn(t.length)},ln=D,hn=on,pn=fn,vn=function(t){return function(e,r,n){var o=ln(e),i=pn(o);if(0===i)return!t&&-1;var a,u=hn(n,i);if(t&&r!=r){for(;i>u;)if((a=o[u++])!=a)return!0}else for(;i>u;u++)if((t||u in o)&&o[u]===r)return t||u||0;return!t&&-1}},dn={includes:vn(!0),indexOf:vn(!1)},yn=Ft,gn=D,mn=dn.indexOf,wn=hr,bn=E([].push),En=function(t,e){var r,n=gn(t),o=0,i=[];for(r in n)!yn(wn,r)&&yn(n,r)&&bn(i,r);for(;e.length>o;)yn(n,r=e[o++])&&(~mn(i,r)||bn(i,r));return i},Sn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],An=En,Rn=Sn.concat("length","prototype");Qr.f=Object.getOwnPropertyNames||function(t){return An(t,Rn)};var On={};On.f=Object.getOwnPropertySymbols;var In=V,xn=Qr,Tn=On,kn=Le,Pn=E([].concat),Ln=In("Reflect","ownKeys")||function(t){var e=xn.f(kn(t)),r=Tn.f;return r?Pn(e,r(t)):e},Un=Ft,Cn=Ln,jn=n,Mn=Ie,_n=function(t,e,r){for(var n=Cn(e),o=Mn.f,i=jn.f,a=0;ai&&ai(o,arguments[i]),o}));l.prototype=c,"Error"!==u?ei?ei(l,f):ri(l,f,{name:!0}):si&&o in s&&(ni(l,s,o),ni(l,s,"prepareStackTrace")),ri(l,s);try{c.name!==u&&Zo(c,"name",u),c.constructor=l}catch(h){}return l}},hi="WebAssembly",pi=r[hi],vi=7!==new Error("e",{cause:7}).cause,di=function(t,e){var r={};r[t]=li(t,e,vi),ci({global:!0,constructor:!0,arity:1,forced:vi},r)},yi=function(t,e){if(pi&&pi[t]){var r={};r[t]=li(hi+"."+t,e,vi),ci({target:hi,stat:!0,constructor:!0,arity:1,forced:vi},r)}};di("Error",(function(t){return function(e){return fi(t,this,arguments)}})),di("EvalError",(function(t){return function(e){return fi(t,this,arguments)}})),di("RangeError",(function(t){return function(e){return fi(t,this,arguments)}})),di("ReferenceError",(function(t){return function(e){return fi(t,this,arguments)}})),di("SyntaxError",(function(t){return function(e){return fi(t,this,arguments)}})),di("TypeError",(function(t){return function(e){return fi(t,this,arguments)}})),di("URIError",(function(t){return function(e){return fi(t,this,arguments)}})),yi("CompileError",(function(t){return function(e){return fi(t,this,arguments)}})),yi("LinkError",(function(t){return function(e){return fi(t,this,arguments)}})),yi("RuntimeError",(function(t){return function(e){return fi(t,this,arguments)}}));var gi=O,mi=Array.isArray||function(t){return"Array"===gi(t)},wi=i,bi=mi,Ei=TypeError,Si=Object.getOwnPropertyDescriptor,Ai=wi&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}()?function(t,e){if(bi(t)&&!Si(t,"length").writable)throw new Ei("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Ri=TypeError,Oi=function(t){if(t>9007199254740991)throw Ri("Maximum allowed index exceeded");return t},Ii=_t,xi=fn,Ti=Ai,ki=Oi;Zn({target:"Array",proto:!0,arity:1,forced:o((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=Ii(this),r=xi(e),n=arguments.length;ki(r+n);for(var o=0;oa;)ha.f(t,r=o[a++],n[r]);return t};var ya,ga=V("document","documentElement"),ma=Le,wa=aa,ba=Sn,Ea=hr,Sa=ga,Aa=ve,Ra="prototype",Oa="script",Ia=lr("IE_PROTO"),xa=function(){},Ta=function(t){return"<"+Oa+">"+t+""},ka=function(t){t.write(Ta("")),t.close();var e=t.parentWindow.Object;return t=null,e},Pa=function(){try{ya=new ActiveXObject("htmlfile")}catch(o){}var t,e,r;Pa="undefined"!=typeof document?document.domain&&ya?ka(ya):(e=Aa("iframe"),r="java"+Oa+":",e.style.display="none",Sa.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(Ta("document.F=Object")),t.close(),t.F):ka(ya);for(var n=ba.length;n--;)delete Pa[Ra][ba[n]];return Pa()};Ea[Ia]=!0;var La,Ua,Ca=Object.create||function(t,e){var r;return null!==t?(xa[Ra]=ma(t),r=new xa,xa[Ra]=null,r[Ia]=t):r=Pa(),void 0===e?r:wa.f(r,e)},ja=o,Ma=r.RegExp,_a=ja((function(){var t=Ma(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),Da=o,Ba=r.RegExp,Fa=Da((function(){var t=Ba("(?b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")})),Na=c,Ha=E,za=Co,qa=Gi,Va=ia,Wa=Ca,$a=Ir.get,Ga=_a,Ya=Fa,Ja=Ct("native-string-replace",String.prototype.replace),Qa=RegExp.prototype.exec,Ka=Qa,Xa=Ha("".charAt),Za=Ha("".indexOf),tu=Ha("".replace),eu=Ha("".slice),ru=(Ua=/b*/g,Na(Qa,La=/a/,"a"),Na(Qa,Ua,"a"),0!==La.lastIndex||0!==Ua.lastIndex),nu=Va.BROKEN_CARET,ou=void 0!==/()??/.exec("")[1];(ru||ou||nu||Ga||Ya)&&(Ka=function(t){var e,r,n,o,i,a,u,s=this,c=$a(s),f=za(t),l=c.raw;if(l)return l.lastIndex=s.lastIndex,e=Na(Ka,l,f),s.lastIndex=l.lastIndex,e;var h=c.groups,p=nu&&s.sticky,v=Na(qa,s),d=s.source,y=0,g=f;if(p&&(v=tu(v,"y",""),-1===Za(v,"g")&&(v+="g"),g=eu(f,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==Xa(f,s.lastIndex-1))&&(d="(?: "+d+")",g=" "+g,y++),r=new RegExp("^(?:"+d+")",v)),ou&&(r=new RegExp("^"+d+"$(?!\\s)",v)),ru&&(n=s.lastIndex),o=Na(Qa,p?r:s,g),p?o?(o.input=eu(o.input,y),o[0]=eu(o[0],y),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:ru&&o&&(s.lastIndex=s.global?o.index+o[0].length:n),ou&&o&&o.length>1&&Na(Ja,o[0],r,(function(){for(i=1;i=u?t?"":void 0:(n=wu(i,a))<55296||n>56319||a+1===u||(o=wu(i,a+1))<56320||o>57343?t?mu(i,a):n:t?bu(i,a,a+2):o-56320+(n-55296<<10)+65536}},Su={codeAt:Eu(!1),charAt:Eu(!0)},Au=Su.charAt,Ru=E,Ou=_t,Iu=Math.floor,xu=Ru("".charAt),Tu=Ru("".replace),ku=Ru("".slice),Pu=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Lu=/\$([$&'`]|\d{1,2})/g,Uu=function(t,e,r,n,o,i){var a=r+t.length,u=n.length,s=Lu;return void 0!==o&&(o=Ou(o),s=Pu),Tu(i,s,(function(i,s){var c;switch(xu(s,0)){case"$":return"$";case"&":return t;case"`":return ku(e,0,r);case"'":return ku(e,a);case"<":c=o[ku(s,1,-1)];break;default:var f=+s;if(0===f)return i;if(f>u){var l=Iu(f/10);return 0===l?i:l<=u?void 0===n[l-1]?xu(s,1):n[l-1]+xu(s,1):i}c=n[f-1]}return void 0===c?"":c}))},Cu=c,ju=Le,Mu=F,_u=O,Du=iu,Bu=TypeError,Fu=oo,Nu=c,Hu=E,zu=function(t,e,r,n){var o=fu(t),i=!cu((function(){var e={};return e[o]=function(){return 7},7!==""[t](e)})),a=i&&!cu((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[hu]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!a||r){var u=/./[o],s=e(o,""[t],(function(t,e,r,n,o){var a=e.exec;return a===su||a===pu.exec?i&&!o?{done:!0,value:au(u,e,r,n)}:{done:!0,value:au(t,r,e,n)}:{done:!1}}));uu(String.prototype,t,s[0]),uu(pu,o,s[1])}n&&lu(pu[o],"sham",!0)},qu=o,Vu=Le,Wu=F,$u=L,Gu=tn,Yu=sn,Ju=Co,Qu=j,Ku=function(t,e,r){return e+(r?Au(t,e).length:1)},Xu=mt,Zu=Uu,ts=function(t,e){var r=t.exec;if(Mu(r)){var n=Cu(r,t,e);return null!==n&&ju(n),n}if("RegExp"===_u(t))return Cu(Du,t,e);throw new Bu("RegExp#exec called on incompatible receiver")},es=Zt("replace"),rs=Math.max,ns=Math.min,os=Hu([].concat),is=Hu([].push),as=Hu("".indexOf),us=Hu("".slice),ss="$0"==="a".replace(/./,"$0"),cs=!!/./[es]&&""===/./[es]("a","$0");zu("replace",(function(t,e,r){var n=cs?"$":"$0";return[function(t,r){var n=Qu(this),o=$u(t)?void 0:Xu(t,es);return o?Nu(o,t,n,r):Nu(e,Ju(n),t,r)},function(t,o){var i=Vu(this),a=Ju(t);if("string"==typeof o&&-1===as(o,n)&&-1===as(o,"$<")){var u=r(e,i,a,o);if(u.done)return u.value}var s=Wu(o);s||(o=Ju(o));var c,f=i.global;f&&(c=i.unicode,i.lastIndex=0);for(var l,h=[];null!==(l=ts(i,a))&&(is(h,l),f);){""===Ju(l[0])&&(i.lastIndex=Ku(a,Yu(i.lastIndex),c))}for(var p,v="",d=0,y=0;y=d&&(v+=us(a,d,w)+g,d=w+m.length)}return v+us(a,d)}]}),!!qu((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}))||!ss||cs);var fs,ls,hs,ps=W,vs=TypeError,ds=function(t,e){if(ps(e,t))return t;throw new vs("Incorrect invocation")},ys=!o((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),gs=Ft,ms=F,ws=_t,bs=ys,Es=lr("IE_PROTO"),Ss=Object,As=Ss.prototype,Rs=bs?Ss.getPrototypeOf:function(t){var e=ws(t);if(gs(e,Es))return e[Es];var r=e.constructor;return ms(r)&&e instanceof r?r.prototype:e instanceof Ss?As:null},Os=i,Is=Ie,xs=y,Ts=function(t,e,r){Os?Is.f(t,e,xs(0,r)):t[e]=r},ks=o,Ps=F,Ls=H,Us=Rs,Cs=Jr,js=Zt("iterator"),Ms=!1;[].keys&&("next"in(hs=[].keys())?(ls=Us(Us(hs)))!==Object.prototype&&(fs=ls):Ms=!0);var _s=!Ls(fs)||ks((function(){var t={};return fs[js].call(t)!==t}));_s&&(fs={}),Ps(fs[js])||Cs(fs,js,(function(){return this}));var Ds={IteratorPrototype:fs,BUGGY_SAFARI_ITERATORS:Ms},Bs=Zn,Fs=r,Ns=ds,Hs=Le,zs=F,qs=Rs,Vs=Wi,Ws=Ts,$s=o,Gs=Ft,Ys=Ds.IteratorPrototype,Js=i,Qs="constructor",Ks="Iterator",Xs=Zt("toStringTag"),Zs=TypeError,tc=Fs[Ks],ec=!zs(tc)||tc.prototype!==Ys||!$s((function(){tc({})})),rc=function(){if(Ns(this,Ys),qs(this)===Ys)throw new Zs("Abstract class Iterator not directly constructable")},nc=function(t,e){Js?Vs(Ys,t,{configurable:!0,get:function(){return e},set:function(e){if(Hs(this),this===Ys)throw new Zs("You can't redefine this property");Gs(this,t)?this[t]=e:Ws(this,t,e)}}):Ys[t]=e};Gs(Ys,Xs)||nc(Xs,Ks),!ec&&Gs(Ys,Qs)&&Ys[Qs]!==Object||nc(Qs,rc),rc.prototype=Ys,Bs({global:!0,constructor:!0,forced:ec},{Iterator:rc});var oc=O,ic=E,ac=function(t){if("Function"===oc(t))return ic(t)},uc=dt,sc=a,cc=ac(ac.bind),fc=function(t,e){return uc(t),void 0===e?t:sc?cc(t,e):function(){return t.apply(e,arguments)}},lc={},hc=lc,pc=Zt("iterator"),vc=Array.prototype,dc=function(t){return void 0!==t&&(hc.Array===t||vc[pc]===t)},yc=Po,gc=mt,mc=L,wc=lc,bc=Zt("iterator"),Ec=function(t){if(!mc(t))return gc(t,bc)||gc(t,"@@iterator")||wc[yc(t)]},Sc=c,Ac=dt,Rc=Le,Oc=lt,Ic=Ec,xc=TypeError,Tc=function(t,e){var r=arguments.length<2?Ic(t):e;if(Ac(r))return Rc(Sc(r,t));throw new xc(Oc(t)+" is not iterable")},kc=c,Pc=Le,Lc=mt,Uc=function(t,e,r){var n,o;Pc(t);try{if(!(n=Lc(t,"return"))){if("throw"===e)throw r;return r}n=kc(n,t)}catch(i){o=!0,n=i}if("throw"===e)throw r;if(o)throw n;return Pc(n),r},Cc=fc,jc=c,Mc=Le,_c=lt,Dc=dc,Bc=fn,Fc=W,Nc=Tc,Hc=Ec,zc=Uc,qc=TypeError,Vc=function(t,e){this.stopped=t,this.result=e},Wc=Vc.prototype,$c=function(t,e,r){var n,o,i,a,u,s,c,f=r&&r.that,l=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),d=Cc(e,f),y=function(t){return n&&zc(n,"normal",t),new Vc(!0,t)},g=function(t){return l?(Mc(t),v?d(t[0],t[1],y):d(t[0],t[1])):v?d(t,y):d(t)};if(h)n=t.iterator;else if(p)n=t;else{if(!(o=Hc(t)))throw new qc(_c(t)+" is not iterable");if(Dc(o)){for(i=0,a=Bc(t);a>i;i++)if((u=g(t[i]))&&Fc(Wc,u))return u;return new Vc(!1)}n=Nc(t,o)}for(s=h?t.next:n.next;!(c=jc(s,n)).done;){try{u=g(c.value)}catch(m){zc(n,"throw",m)}if("object"==typeof u&&u&&Fc(Wc,u))return u}return new Vc(!1)},Gc=function(t){return{iterator:t,next:t.next,done:!1}},Yc=$c,Jc=dt,Qc=Le,Kc=Gc;Zn({target:"Iterator",proto:!0,real:!0},{every:function(t){Qc(this),Jc(t);var e=Kc(this),r=0;return!Yc(e,(function(e,n){if(!t(e,r++))return n()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}});var Xc=Jr,Zc=function(t,e,r){for(var n in e)Xc(t,n,e[n],r);return t},tf=function(t,e){return{value:t,done:e}},ef=c,rf=Ca,nf=We,of=Zc,af=Ir,uf=mt,sf=Ds.IteratorPrototype,cf=tf,ff=Uc,lf=Zt("toStringTag"),hf="IteratorHelper",pf="WrapForValidIterator",vf=af.set,df=function(t){var e=af.getterFor(t?pf:hf);return of(rf(sf),{next:function(){var r=e(this);if(t)return r.nextHandler();try{var n=r.done?void 0:r.nextHandler();return cf(n,r.done)}catch(o){throw r.done=!0,o}},return:function(){var r=e(this),n=r.iterator;if(r.done=!0,t){var o=uf(n,"return");return o?ef(o,n):cf(void 0,!0)}if(r.inner)try{ff(r.inner.iterator,"normal")}catch(i){return ff(n,"throw",i)}return ff(n,"normal"),cf(void 0,!0)}})},yf=df(!0),gf=df(!1);nf(gf,lf,"Iterator Helper");var mf=function(t,e){var r=function(r,n){n?(n.iterator=r.iterator,n.next=r.next):n=r,n.type=e?pf:hf,n.nextHandler=t,n.counter=0,n.done=!1,vf(this,n)};return r.prototype=e?yf:gf,r},wf=Le,bf=Uc,Ef=function(t,e,r,n){try{return n?e(wf(r)[0],r[1]):e(r)}catch(o){bf(t,"throw",o)}},Sf=Zn,Af=c,Rf=dt,Of=Le,If=Gc,xf=Ef,Tf=mf((function(){for(var t,e,r=this.iterator,n=this.predicate,o=this.next;;){if(t=Of(Af(o,r)),this.done=!!t.done)return;if(e=t.value,xf(r,n,[e,this.counter++],!0))return e}}));Sf({target:"Iterator",proto:!0,real:!0,forced:false},{filter:function(t){return Of(this),Rf(t),new Tf(If(this),{predicate:t})}});var kf=$c,Pf=dt,Lf=Le,Uf=Gc;Zn({target:"Iterator",proto:!0,real:!0},{forEach:function(t){Lf(this),Pf(t);var e=Uf(this),r=0;kf(e,(function(e){t(e,r++)}),{IS_RECORD:!0})}});var Cf=c,jf=dt,Mf=Le,_f=Gc,Df=Ef,Bf=mf((function(){var t=this.iterator,e=Mf(Cf(this.next,t));if(!(this.done=!!e.done))return Df(t,this.mapper,[e.value,this.counter++],!0)}));Zn({target:"Iterator",proto:!0,real:!0,forced:false},{map:function(t){return Mf(this),jf(t),new Bf(_f(this),{mapper:t})}});var Ff=$c,Nf=dt,Hf=Le,zf=Gc,qf=TypeError;Zn({target:"Iterator",proto:!0,real:!0},{reduce:function(t){Hf(this),Nf(t);var e=zf(this),r=arguments.length<2,n=r?void 0:arguments[1],o=0;if(Ff(e,(function(e){r?(r=!1,n=e):n=t(n,e,o),o++}),{IS_RECORD:!0}),r)throw new qf("Reduce of empty iterator with no initial value");return n}});var Vf=$c,Wf=dt,$f=Le,Gf=Gc;Zn({target:"Iterator",proto:!0,real:!0},{some:function(t){$f(this),Wf(t);var e=Gf(this),r=0;return Vf(e,(function(e,n){if(t(e,r++))return n()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}});var Yf=E,Jf=Set.prototype,Qf={Set:Set,add:Yf(Jf.add),has:Yf(Jf.has),remove:Yf(Jf.delete),proto:Jf},Kf=Qf.has,Xf=function(t){return Kf(t),t},Zf=c,tl=function(t,e,r){for(var n,o,i=r?t:t.iterator,a=t.next;!(n=Zf(a,i)).done;)if(void 0!==(o=e(n.value)))return o},el=E,rl=tl,nl=Qf.Set,ol=Qf.proto,il=el(ol.forEach),al=el(ol.keys),ul=al(new nl).next,sl=function(t,e,r){return r?rl({iterator:al(t),next:ul},e):il(t,e)},cl=sl,fl=Qf.Set,ll=Qf.add,hl=function(t){var e=new fl;return cl(t,(function(t){ll(e,t)})),e},pl=uo(Qf.proto,"size","get")||function(t){return t.size},vl=dt,dl=Le,yl=c,gl=tn,ml=Gc,wl="Invalid size",bl=RangeError,El=TypeError,Sl=Math.max,Al=function(t,e){this.set=t,this.size=Sl(e,0),this.has=vl(t.has),this.keys=vl(t.keys)};Al.prototype={getIterator:function(){return ml(dl(yl(this.keys,this.set)))},includes:function(t){return yl(this.has,this.set,t)}};var Rl=function(t){dl(t);var e=+t.size;if(e!=e)throw new El(wl);var r=gl(e);if(r<0)throw new bl(wl);return new Al(t,r)},Ol=Xf,Il=hl,xl=pl,Tl=Rl,kl=sl,Pl=tl,Ll=Qf.has,Ul=Qf.remove,Cl=V,jl=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},Ml=function(t){var e=Cl("Set");try{(new e)[t](jl(0));try{return(new e)[t](jl(-1)),!1}catch(r){return!0}}catch(n){return!1}},_l=function(t){var e=Ol(this),r=Tl(t),n=Il(e);return xl(e)<=r.size?kl(e,(function(t){r.includes(t)&&Ul(n,t)})):Pl(r.getIterator(),(function(t){Ll(e,t)&&Ul(n,t)})),n};Zn({target:"Set",proto:!0,real:!0,forced:!Ml("difference")},{difference:_l});var Dl=Xf,Bl=pl,Fl=Rl,Nl=sl,Hl=tl,zl=Qf.Set,ql=Qf.add,Vl=Qf.has,Wl=o,$l=function(t){var e=Dl(this),r=Fl(t),n=new zl;return Bl(e)>r.size?Hl(r.getIterator(),(function(t){Vl(e,t)&&ql(n,t)})):Nl(e,(function(t){r.includes(t)&&ql(n,t)})),n};Zn({target:"Set",proto:!0,real:!0,forced:!Ml("intersection")||Wl((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}))},{intersection:$l});var Gl=Xf,Yl=Qf.has,Jl=pl,Ql=Rl,Kl=sl,Xl=tl,Zl=Uc,th=function(t){var e=Gl(this),r=Ql(t);if(Jl(e)<=r.size)return!1!==Kl(e,(function(t){if(r.includes(t))return!1}),!0);var n=r.getIterator();return!1!==Xl(n,(function(t){if(Yl(e,t))return Zl(n,"normal",!1)}))};Zn({target:"Set",proto:!0,real:!0,forced:!Ml("isDisjointFrom")},{isDisjointFrom:th});var eh=Xf,rh=pl,nh=sl,oh=Rl,ih=function(t){var e=eh(this),r=oh(t);return!(rh(e)>r.size)&&!1!==nh(e,(function(t){if(!r.includes(t))return!1}),!0)};Zn({target:"Set",proto:!0,real:!0,forced:!Ml("isSubsetOf")},{isSubsetOf:ih});var ah=Xf,uh=Qf.has,sh=pl,ch=Rl,fh=tl,lh=Uc,hh=function(t){var e=ah(this),r=ch(t);if(sh(e)=e.length)return t.target=void 0,dp(void 0,!0);switch(t.kind){case"keys":return dp(r,!1);case"values":return dp(e[r],!1)}return dp([r,e[r]],!1)}),"values"),Ep=lp.Arguments=lp.Array;if(fp("keys"),fp("values"),fp("entries"),yp&&"values"!==Ep.name)try{pp(Ep,"name",{value:"values"})}catch(WP){}var Sp=r,Ap={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Rp=kh,Op=bp,Ip=We,xp=Ni,Tp=Zt("iterator"),kp=Op.values,Pp=function(t,e){if(t){if(t[Tp]!==kp)try{Ip(t,Tp,kp)}catch(WP){t[Tp]=kp}if(xp(t,e,!0),Ap[e])for(var r in Op)if(t[r]!==Op[r])try{Ip(t,r,Op[r])}catch(WP){t[r]=Op[r]}}};for(var Lp in Ap)Pp(Sp[Lp]&&Sp[Lp].prototype,Lp);Pp(Rp,"DOMTokenList");var Up,Cp,jp,Mp,_p=E([].slice),Dp=TypeError,Bp=function(t,e){if(tr,a=mv(n)?n:Av(n),u=i?Ev(arguments,r):[],s=i?function(){gv(a,this,u)}:a;return e?t(s,o):t(s)}:t},kv=Iv.setImmediate?Tv(xv,!1):xv;Ov({global:!0,bind:!0,enumerable:!0,forced:Iv.setImmediate!==kv},{setImmediate:kv});var Pv=O,Lv=TypeError,Uv=uo(ArrayBuffer.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==Pv(t))throw new Lv("ArrayBuffer expected");return t.byteLength},Cv=Uv,jv=E(ArrayBuffer.prototype.slice),Mv=function(t){if(0!==Cv(t))return!1;try{return jv(t,0,0),!1}catch(WP){return!0}},_v=i,Dv=Wi,Bv=Mv,Fv=ArrayBuffer.prototype;_v&&!("detached"in Fv)&&Dv(Fv,"detached",{configurable:!0,get:function(){return Bv(this)}});var Nv,Hv,zv,qv,Vv=tn,Wv=sn,$v=RangeError,Gv=function(t){if(void 0===t)return 0;var e=Vv(t),r=Wv(e);if(e!==r)throw new $v("Wrong length or index");return r},Yv=Np,Jv="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Qv=!Jv&&!Np&&"object"==typeof window&&"object"==typeof document,Kv=o,Xv=Z,Zv=Qv,td=Jv,ed=Np,rd=r.structuredClone,nd=!!rd&&!Kv((function(){if(td&&Xv>92||ed&&Xv>94||Zv&&Xv>97)return!1;var t=new ArrayBuffer(8),e=rd(t,{transfer:[t]});return 0!==t.byteLength||8!==e.byteLength})),od=r,id=function(t){try{if(Yv)return Function('return require("'+t+'")')()}catch(WP){}},ad=nd,ud=od.structuredClone,sd=od.ArrayBuffer,cd=od.MessageChannel,fd=!1;if(ad)fd=function(t){ud(t,{transfer:[t]})};else if(sd)try{cd||(Nv=id("worker_threads"))&&(cd=Nv.MessageChannel),cd&&(Hv=new cd,zv=new sd(2),qv=function(t){Hv.port1.postMessage(null,[t])},2===zv.byteLength&&(qv(zv),0===zv.byteLength&&(fd=qv)))}catch(WP){}var ld=fd,hd=r,pd=E,vd=uo,dd=Gv,yd=Mv,gd=Uv,md=ld,wd=nd,bd=hd.structuredClone,Ed=hd.ArrayBuffer,Sd=hd.DataView,Ad=hd.TypeError,Rd=Math.min,Od=Ed.prototype,Id=Sd.prototype,xd=pd(Od.slice),Td=vd(Od,"resizable","get"),kd=vd(Od,"maxByteLength","get"),Pd=pd(Id.getInt8),Ld=pd(Id.setInt8),Ud=(wd||md)&&function(t,e,r){var n,o=gd(t),i=void 0===e?o:dd(e),a=!Td||!Td(t);if(yd(t))throw new Ad("ArrayBuffer is detached");if(wd&&(t=bd(t,{transfer:[t]}),o===i&&(r||a)))return t;if(o>=i&&(!r||a))n=xd(t,0,i);else{var u=r&&!a&&kd?{maxByteLength:kd(t)}:void 0;n=new Ed(i,u);for(var s=new Sd(t),c=new Sd(n),f=Rd(i,o),l=0;l2?r:ey(e),i=new t(o);o>n;)i[n]=e[n++];return i},ny=fc,oy=P,iy=_t,ay=fe,uy=fn,sy=Ca,cy=ry,fy=Array,ly=E([].push),hy=function(t,e,r,n){for(var o,i,a,u=iy(t),s=oy(u),c=ny(e,r),f=sy(null),l=uy(s),h=0;l>h;h++)a=s[h],(i=ay(c(a,h,u)))in f?ly(f[i],a):f[i]=[a];if(n&&(o=n(u))!==fy)for(i in f)f[i]=cy(o,f[i]);return f},py=Mh;Zn({target:"Array",proto:!0},{group:function(t){return hy(this,t,arguments.length>1?arguments[1]:void 0)}}),py("group");var vy=$c,dy=dt,yy=Le,gy=Gc;Zn({target:"Iterator",proto:!0,real:!0},{find:function(t){yy(this),dy(t);var e=gy(this),r=0;return vy(e,(function(e,n){if(t(e,r++))return n(e)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}});var my=Le,wy=$c,by=Gc,Ey=[].push;Zn({target:"Iterator",proto:!0,real:!0},{toArray:function(){var t=[];return wy(by(my(this)),Ey,{that:t,IS_RECORD:!0}),t}});var Sy=_t,Ay=fn,Ry=tn,Oy=Mh;Zn({target:"Array",proto:!0},{at:function(t){var e=Sy(this),r=Ay(e),n=Ry(t),o=n>=0?n:r+n;return o<0||o>=r?void 0:e[o]}}),Oy("at"),Mh("flat");var Iy={},xy=dt,Ty=TypeError,ky=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw new Ty("Bad Promise constructor");e=t,r=n})),this.resolve=xy(e),this.reject=xy(r)};Iy.f=function(t){return new ky(t)};var Py=r.Promise,Ly=Zt("iterator"),Uy=!1;try{var Cy=0,jy={next:function(){return{done:!!Cy++}},return:function(){Uy=!0}};jy[Ly]=function(){return this},Array.from(jy,(function(){throw 2}))}catch(WP){}var My=function(t,e){try{if(!e&&!Uy)return!1}catch(WP){return!1}var r=!1;try{var n={};n[Ly]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(WP){}return r},_y=r,Dy=Py,By=F,Fy=Wn,Ny=ir,Hy=Zt,zy=Qv,qy=Jv,Vy=Z;Dy&&Dy.prototype;var Wy=Hy("species"),$y=!1,Gy=By(_y.PromiseRejectionEvent),Yy=Fy("Promise",(function(){var t=Ny(Dy),e=t!==String(Dy);if(!e&&66===Vy)return!0;if(!Vy||Vy<51||!/native code/.test(t)){var r=new Dy((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[Wy]=n,!($y=r.then((function(){}))instanceof n))return!0}return!e&&(zy||qy)&&!Gy})),Jy=Py,Qy={CONSTRUCTOR:Yy,REJECTION_EVENT:Gy,SUBCLASSING:$y}.CONSTRUCTOR||!My((function(t){Jy.all(t).then(void 0,(function(){}))})),Ky=c,Xy=dt,Zy=Iy,tg=function(t){try{return{error:!1,value:t()}}catch(WP){return{error:!0,value:WP}}},eg=$c;Zn({target:"Promise",stat:!0,forced:Qy},{allSettled:function(t){var e=this,r=Zy.f(e),n=r.resolve,o=r.reject,i=tg((function(){var r=Xy(e.resolve),o=[],i=0,a=1;eg(t,(function(t){var u=i++,s=!1;a++,Ky(r,e,t).then((function(t){s||(s=!0,o[u]={status:"fulfilled",value:t},--a||n(o))}),(function(t){s||(s=!0,o[u]={status:"rejected",reason:t},--a||n(o))}))})),--a||n(o)}));return i.error&&o(i.value),r.promise}});var rg=Zn,ng=j,og=tn,ig=Co,ag=o,ug=E("".charAt);rg({target:"String",proto:!0,forced:ag((function(){return"\ud842"!=="𠮷".at(-2)}))},{at:function(t){var e=ig(ng(this)),r=e.length,n=og(t),o=n>=0?n:r+n;return o<0||o>=r?void 0:ug(e,o)}});var sg=H,cg=O,fg=Zt("match"),lg=c,hg=Ft,pg=W,vg=Gi,dg=RegExp.prototype,yg=function(t){var e=t.flags;return void 0!==e||"flags"in dg||hg(t,"flags")||!pg(dg,t)?e:lg(vg,t)},gg=Zn,mg=c,wg=E,bg=j,Eg=F,Sg=L,Ag=function(t){var e;return sg(t)&&(void 0!==(e=t[fg])?!!e:"RegExp"===cg(t))},Rg=Co,Og=mt,Ig=yg,xg=Uu,Tg=Zt("replace"),kg=TypeError,Pg=wg("".indexOf);wg("".replace);var Lg=wg("".slice),Ug=Math.max;gg({target:"String",proto:!0},{replaceAll:function(t,e){var r,n,o,i,a,u,s,c,f=bg(this),l=0,h=0,p="";if(!Sg(t)){if(Ag(t)&&(r=Rg(bg(Ig(t))),!~Pg(r,"g")))throw new kg("`.replaceAll` does not allow non-global regexes");if(n=Og(t,Tg))return mg(n,t,f,e)}for(o=Rg(f),i=Rg(t),(a=Eg(e))||(e=Rg(e)),u=i.length,s=Ug(1,u),l=Pg(o,i);-1!==l;)c=a?Rg(e(i,l,o)):xg(i,o,l,[],void 0,e),p+=Lg(o,h,l)+c,h=l+u,l=l+s>o.length?-1:Pg(o,i,l+s);return hr||s!=s?a*(1/0):a*s},Um=Math.fround||function(t){return Lm(t,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)},Cm=Array,jm=Math.abs,Mm=Math.pow,_m=Math.floor,Dm=Math.log,Bm=Math.LN2,Fm={pack:function(t,e,r){var n,o,i,a=Cm(r),u=8*r-e-1,s=(1<>1,f=23===e?Mm(2,-24)-Mm(2,-77):0,l=t<0||0===t&&1/t<0?1:0,h=0;for((t=jm(t))!=t||t===1/0?(o=t!=t?1:0,n=s):(n=_m(Dm(t)/Bm),t*(i=Mm(2,-n))<1&&(n--,i*=2),(t+=n+c>=1?f/i:f*Mm(2,1-c))*i>=2&&(n++,i/=2),n+c>=s?(o=0,n=s):n+c>=1?(o=(t*i-1)*Mm(2,e),n+=c):(o=t*Mm(2,c-1)*Mm(2,e),n=0));e>=8;)a[h++]=255&o,o/=256,e-=8;for(n=n<0;)a[h++]=255&n,n/=256,u-=8;return a[--h]|=128*l,a},unpack:function(t,e){var r,n=t.length,o=8*n-e-1,i=(1<>1,u=o-7,s=n-1,c=t[s--],f=127&c;for(c>>=7;u>0;)f=256*f+t[s--],u-=8;for(r=f&(1<<-u)-1,f>>=-u,u+=e;u>0;)r=256*r+t[s--],u-=8;if(0===f)f=1-a;else{if(f===i)return r?NaN:c?-1/0:1/0;r+=Mm(2,e),f-=a}return(c?-1:1)*r*Mm(2,f-e)}},Nm=_t,Hm=on,zm=fn,qm=function(t){for(var e=Nm(this),r=zm(e),n=arguments.length,o=Hm(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,a=void 0===i?r:Hm(i,r);a>o;)e[o++]=t;return e},Vm=r,Wm=E,$m=i,Gm=Dg,Ym=We,Jm=Wi,Qm=Zc,Km=o,Xm=ds,Zm=tn,tw=sn,ew=Gv,rw=Um,nw=Fm,ow=Rs,iw=go,aw=qm,uw=_p,sw=So,cw=_n,fw=Ni,lw=Ir,hw=Xe.PROPER,pw=Xe.CONFIGURABLE,vw="ArrayBuffer",dw="DataView",yw="prototype",gw="Wrong index",mw=lw.getterFor(vw),ww=lw.getterFor(dw),bw=lw.set,Ew=Vm[vw],Sw=Ew,Aw=Sw&&Sw[yw],Rw=Vm[dw],Ow=Rw&&Rw[yw],Iw=Object.prototype,xw=Vm.Array,Tw=Vm.RangeError,kw=Wm(aw),Pw=Wm([].reverse),Lw=nw.pack,Uw=nw.unpack,Cw=function(t){return[255&t]},jw=function(t){return[255&t,t>>8&255]},Mw=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},_w=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},Dw=function(t){return Lw(rw(t),23,4)},Bw=function(t){return Lw(t,52,8)},Fw=function(t,e,r){Jm(t[yw],e,{configurable:!0,get:function(){return r(this)[e]}})},Nw=function(t,e,r,n){var o=ww(t),i=ew(r),a=!!n;if(i+e>o.byteLength)throw new Tw(gw);var u=o.bytes,s=i+o.byteOffset,c=uw(u,s,s+e);return a?c:Pw(c)},Hw=function(t,e,r,n,o,i){var a=ww(t),u=ew(r),s=n(+o),c=!!i;if(u+e>a.byteLength)throw new Tw(gw);for(var f=a.bytes,l=u+a.byteOffset,h=0;h>24)},setUint8:function(t,e){Vw(this,t,e<<24>>24)}},{unsafe:!0})}else Aw=(Sw=function(t){Xm(this,Aw);var e=ew(t);bw(this,{type:vw,bytes:kw(xw(e),0),byteLength:e}),$m||(this.byteLength=e,this.detached=!1)})[yw],Rw=function(t,e,r){Xm(this,Ow),Xm(t,Aw);var n=mw(t),o=n.byteLength,i=Zm(e);if(i<0||i>o)throw new Tw("Wrong offset");if(i+(r=void 0===r?o-i:tw(r))>o)throw new Tw("Wrong length");bw(this,{type:dw,buffer:t,byteLength:r,byteOffset:i,bytes:n.bytes}),$m||(this.buffer=t,this.byteLength=r,this.byteOffset=i)},Ow=Rw[yw],$m&&(Fw(Sw,"byteLength",mw),Fw(Rw,"buffer",ww),Fw(Rw,"byteLength",ww),Fw(Rw,"byteOffset",ww)),Qm(Ow,{getInt8:function(t){return Nw(this,1,t)[0]<<24>>24},getUint8:function(t){return Nw(this,1,t)[0]},getInt16:function(t){var e=Nw(this,2,t,arguments.length>1&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=Nw(this,2,t,arguments.length>1&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return _w(Nw(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function(t){return _w(Nw(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(t){return Uw(Nw(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function(t){return Uw(Nw(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function(t,e){Hw(this,1,t,Cw,e)},setUint8:function(t,e){Hw(this,1,t,Cw,e)},setInt16:function(t,e){Hw(this,2,t,jw,e,arguments.length>2&&arguments[2])},setUint16:function(t,e){Hw(this,2,t,jw,e,arguments.length>2&&arguments[2])},setInt32:function(t,e){Hw(this,4,t,Mw,e,arguments.length>2&&arguments[2])},setUint32:function(t,e){Hw(this,4,t,Mw,e,arguments.length>2&&arguments[2])},setFloat32:function(t,e){Hw(this,4,t,Dw,e,arguments.length>2&&arguments[2])},setFloat64:function(t,e){Hw(this,8,t,Bw,e,arguments.length>2&&arguments[2])}});fw(Sw,vw),fw(Rw,dw);var Ww={ArrayBuffer:Sw,DataView:Rw},$w=H,Gw=Math.floor,Yw=Number.isInteger||function(t){return!$w(t)&&isFinite(t)&&Gw(t)===t},Jw=tn,Qw=RangeError,Kw=function(t){var e=Jw(t);if(e<0)throw new Qw("The argument can't be less than 0");return e},Xw=RangeError,Zw=function(t,e){var r=Kw(t);if(r%e)throw new Xw("Wrong offset");return r},tb=Math.round,eb=E,rb=o,nb=F,ob=Po,ib=ir,ab=function(){},ub=V("Reflect","construct"),sb=/^\s*(?:class|function)\b/,cb=eb(sb.exec),fb=!sb.test(ab),lb=function(t){if(!nb(t))return!1;try{return ub(ab,[],t),!0}catch(WP){return!1}},hb=function(t){if(!nb(t))return!1;switch(ob(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return fb||!!cb(sb,ib(t))}catch(WP){return!0}};hb.sham=!0;var pb=!ub||rb((function(){var t;return lb(lb.call)||!lb(Object)||!lb((function(){t=!0}))||t}))?hb:lb,vb=pb,db=lt,yb=TypeError,gb=function(t){if(vb(t))return t;throw new yb(db(t)+" is not a constructor")},mb=Po,wb=function(t){var e=mb(t);return"BigInt64Array"===e||"BigUint64Array"===e},bb=ue,Eb=TypeError,Sb=function(t){var e=bb(t,"number");if("number"==typeof e)throw new Eb("Can't convert number to bigint");return BigInt(e)},Ab=fc,Rb=c,Ob=gb,Ib=_t,xb=fn,Tb=Tc,kb=Ec,Pb=dc,Lb=wb,Ub=wm.aTypedArrayConstructor,Cb=Sb,jb=mi,Mb=pb,_b=H,Db=Zt("species"),Bb=Array,Fb=function(t){var e;return jb(t)&&(e=t.constructor,(Mb(e)&&(e===Bb||jb(e.prototype))||_b(e)&&null===(e=e[Db]))&&(e=void 0)),void 0===e?Bb:e},Nb=fc,Hb=P,zb=_t,qb=fn,Vb=function(t,e){return new(Fb(t))(0===e?0:e)},Wb=E([].push),$b=function(t){var e=1===t,r=2===t,n=3===t,o=4===t,i=6===t,a=7===t,u=5===t||i;return function(s,c,f,l){for(var h,p,v=zb(s),d=Hb(v),y=qb(d),g=Nb(c,f),m=0,w=l||Vb,b=e?w(s,y):r||a?w(s,0):void 0;y>m;m++)if((u||m in d)&&(p=g(h=d[m],m,v),t))if(e)b[m]=p;else if(p)switch(t){case 3:return!0;case 5:return h;case 6:return m;case 2:Wb(b,h)}else switch(t){case 4:return!1;case 7:Wb(b,h)}return i?-1:n||o?o:b}},Gb={forEach:$b(0),map:$b(1),filter:$b(2),some:$b(3),every:$b(4),find:$b(5),findIndex:$b(6),filterReject:$b(7)},Yb=V,Jb=Wi,Qb=i,Kb=Zt("species"),Xb=Zn,Zb=r,tE=c,eE=i,rE=Im,nE=wm,oE=Ww,iE=ds,aE=y,uE=We,sE=Yw,cE=sn,fE=Gv,lE=Zw,hE=function(t){var e=tb(t);return e<0?0:e>255?255:255&e},pE=fe,vE=Ft,dE=Po,yE=H,gE=ct,mE=Ca,wE=W,bE=go,EE=Qr.f,SE=function(t){var e,r,n,o,i,a,u,s,c=Ob(this),f=Ib(t),l=arguments.length,h=l>1?arguments[1]:void 0,p=void 0!==h,v=kb(f);if(v&&!Pb(v))for(s=(u=Tb(f,v)).next,f=[];!(a=Rb(s,u)).done;)f.push(a.value);for(p&&l>2&&(h=Ab(h,arguments[2])),r=xb(f),n=new(Ub(c))(r),o=Lb(n),e=0;r>e;e++)i=p?h(f[e],e):f[e],n[e]=o?Cb(i):+i;return n},AE=Gb.forEach,RE=function(t){var e=Yb(t);Qb&&e&&!e[Kb]&&Jb(e,Kb,{configurable:!0,get:function(){return this}})},OE=Wi,IE=Ie,xE=n,TE=ry,kE=So,PE=Ir.get,LE=Ir.set,UE=Ir.enforce,CE=IE.f,jE=xE.f,ME=Zb.RangeError,_E=oE.ArrayBuffer,DE=_E.prototype,BE=oE.DataView,FE=nE.NATIVE_ARRAY_BUFFER_VIEWS,NE=nE.TYPED_ARRAY_TAG,HE=nE.TypedArray,zE=nE.TypedArrayPrototype,qE=nE.isTypedArray,VE="BYTES_PER_ELEMENT",WE="Wrong length",$E=function(t,e){OE(t,e,{configurable:!0,get:function(){return PE(this)[e]}})},GE=function(t){var e;return wE(DE,t)||"ArrayBuffer"===(e=dE(t))||"SharedArrayBuffer"===e},YE=function(t,e){return qE(t)&&!gE(e)&&e in t&&sE(+e)&&e>=0},JE=function(t,e){return e=pE(e),YE(t,e)?aE(2,t[e]):jE(t,e)},QE=function(t,e,r){return e=pE(e),!(YE(t,e)&&yE(r)&&vE(r,"value"))||vE(r,"get")||vE(r,"set")||r.configurable||vE(r,"writable")&&!r.writable||vE(r,"enumerable")&&!r.enumerable?CE(t,e,r):(t[e]=r.value,t)};eE?(FE||(xE.f=JE,IE.f=QE,$E(zE,"buffer"),$E(zE,"byteOffset"),$E(zE,"byteLength"),$E(zE,"length")),Xb({target:"Object",stat:!0,forced:!FE},{getOwnPropertyDescriptor:JE,defineProperty:QE}),_g.exports=function(t,e,r){var n=t.match(/\d+/)[0]/8,o=t+(r?"Clamped":"")+"Array",i="get"+t,a="set"+t,u=Zb[o],s=u,c=s&&s.prototype,f={},l=function(t,e){CE(t,e,{get:function(){return function(t,e){var r=PE(t);return r.view[i](e*n+r.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,o){var i=PE(t);i.view[a](e*n+i.byteOffset,r?hE(o):o,!0)}(this,e,t)},enumerable:!0})};FE?rE&&(s=e((function(t,e,r,o){return iE(t,c),kE(yE(e)?GE(e)?void 0!==o?new u(e,lE(r,n),o):void 0!==r?new u(e,lE(r,n)):new u(e):qE(e)?TE(s,e):tE(SE,s,e):new u(fE(e)),t,s)})),bE&&bE(s,HE),AE(EE(u),(function(t){t in s||uE(s,t,u[t])})),s.prototype=c):(s=e((function(t,e,r,o){iE(t,c);var i,a,u,f=0,h=0;if(yE(e)){if(!GE(e))return qE(e)?TE(s,e):tE(SE,s,e);i=e,h=lE(r,n);var p=e.byteLength;if(void 0===o){if(p%n)throw new ME(WE);if((a=p-h)<0)throw new ME(WE)}else if((a=cE(o)*n)+h>p)throw new ME(WE);u=a/n}else u=fE(e),i=new _E(a=u*n);for(LE(t,{buffer:i,byteOffset:h,byteLength:a,length:u,view:new BE(i)});f=0?n:r+n;return o<0||o>=r?void 0:e[o]}));var tS=qm,eS=Sb,rS=Po,nS=c,oS=o,iS=wm.aTypedArray,aS=wm.exportTypedArrayMethod,uS=E("".slice);aS("fill",(function(t){var e=arguments.length;iS(this);var r="Big"===uS(rS(this),0,3)?eS(t):+t;return nS(tS,this,r,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),oS((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t})));var sS=fc,cS=P,fS=_t,lS=fn,hS=function(t){var e=1===t;return function(r,n,o){for(var i,a=fS(r),u=cS(a),s=lS(u),c=sS(n,o);s-- >0;)if(c(i=u[s],s,a))switch(t){case 0:return i;case 1:return s}return e?-1:void 0}},pS={findLast:hS(0),findLastIndex:hS(1)},vS=pS.findLast,dS=wm.aTypedArray;(0,wm.exportTypedArrayMethod)("findLast",(function(t){return vS(dS(this),t,arguments.length>1?arguments[1]:void 0)}));var yS=pS.findLastIndex,gS=wm.aTypedArray;(0,wm.exportTypedArrayMethod)("findLastIndex",(function(t){return yS(gS(this),t,arguments.length>1?arguments[1]:void 0)}));var mS=r,wS=c,bS=wm,ES=fn,SS=Zw,AS=_t,RS=o,OS=mS.RangeError,IS=mS.Int8Array,xS=IS&&IS.prototype,TS=xS&&xS.set,kS=bS.aTypedArray,PS=bS.exportTypedArrayMethod,LS=!RS((function(){var t=new Uint8ClampedArray(2);return wS(TS,t,{length:1,0:3},1),3!==t[1]})),US=LS&&bS.NATIVE_ARRAY_BUFFER_VIEWS&&RS((function(){var t=new IS(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));PS("set",(function(t){kS(this);var e=SS(arguments.length>1?arguments[1]:void 0,1),r=AS(t);if(LS)return wS(TS,this,r,e);var n=this.length,o=ES(r),i=0;if(o+e>n)throw new OS("Wrong length");for(;i0;)t[o]=t[--o];o!==i++&&(t[o]=n)}else for(var a=jS(r/2),u=MS(CS(t,0,a),e),s=MS(CS(t,a),e),c=u.length,f=s.length,l=0,h=0;l0&&1/r<0?1:-1:e>r}}(t))}),!eA||tA);var rA=fn,nA=function(t,e){for(var r=rA(t),n=new e(r),o=0;o=o||a<0)throw new vA("Incorrect index");for(var u=new e(o),s=0;s1&&!eO(arguments[1])?iO(arguments[1]):void 0,o=n?n.transfer:void 0;void 0!==o&&(r=function(t,e){if(!rO(t))throw new AO("Transfer option cannot be converted to a sequence");var r=[];oO(t,(function(t){jO(r,iO(t))}));for(var n,o,i,a,u,s=0,c=fO(r),f=new PO;s=r.length?nI(void 0,!0):(t=ZO(r,n),e.index+=t.length,nI(t,!1))}));var uI=o,sI=i,cI=Zt("iterator"),fI=!uI((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),r.delete("a",2),r.delete("b",void 0),!e.size&&!sI||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[cI]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),lI=i,hI=E,pI=c,vI=o,dI=ca,yI=On,gI=f,mI=_t,wI=P,bI=Object.assign,EI=Object.defineProperty,SI=hI([].concat),AI=!bI||vI((function(){if(lI&&1!==bI({b:1},bI(EI({},"a",{enumerable:!0,get:function(){EI(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!==bI({},t)[r]||dI(bI({},e)).join("")!==n}))?function(t,e){for(var r=mI(t),n=arguments.length,o=1,i=yI.f,a=gI.f;n>o;)for(var u,s=wI(arguments[o++]),c=i?SI(dI(s),i(s)):dI(s),f=c.length,l=0;f>l;)u=c[l++],lI&&!pI(a,s,u)||(r[u]=s[u]);return r}:bI,RI=fc,OI=c,II=_t,xI=Ef,TI=dc,kI=pb,PI=fn,LI=Ts,UI=Tc,CI=Ec,jI=Array,MI=E,_I=2147483647,DI=/[^\0-\u007E]/,BI=/[.\u3002\uFF0E\uFF61]/g,FI="Overflow: input needs wider integers to process",NI=RangeError,HI=MI(BI.exec),zI=Math.floor,qI=String.fromCharCode,VI=MI("".charCodeAt),WI=MI([].join),$I=MI([].push),GI=MI("".replace),YI=MI("".split),JI=MI("".toLowerCase),QI=function(t){return t+22+75*(t<26)},KI=function(t,e,r){var n=0;for(t=r?zI(t/700):t>>1,t+=zI(t/e);t>455;)t=zI(t/35),n+=36;return zI(n+36*t/(t+38))},XI=function(t){var e=[];t=function(t){for(var e=[],r=0,n=t.length;r=55296&&o<=56319&&r=i&&nzI((_I-a)/l))throw new NI(FI);for(a+=(f-i)*l,i=f,r=0;r_I)throw new NI(FI);if(n===i){for(var h=a,p=36;;){var v=p<=u?1:p>=u+26?26:p-u;if(h=e.length)return t.target=void 0,xx(void 0,!0);var n=e[r];switch(t.kind){case"keys":return xx(n.key,!1);case"values":return xx(n.value,!1)}return xx([n.key,n.value],!1)}),!0),cT=function(t){this.entries=[],this.url=null,void 0!==t&&(Ex(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===Wx(t,0)?Xx(t,1):t:Sx(t)))};cT.prototype={type:Lx,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,o,i,a,u,s=this.entries,c=Ix(t);if(c)for(r=(e=Ox(t,c)).next;!(n=ix(r,e)).done;){if(i=(o=Ox(bx(n.value))).next,(a=ix(i,o)).done||(u=ix(i,o)).done||!ix(i,o).done)throw new zx("Expected sequence with length 2");Gx(s,{key:Sx(a.value),value:Sx(u.value)})}else for(var f in t)gx(t,f)&&Gx(s,{key:f,value:Sx(t[f])})},parseQuery:function(t){if(t)for(var e,r,n=this.entries,o=Kx(t,"&"),i=0;i0?arguments[0]:void 0));ux||(this.size=t.entries.length)},lT=fT.prototype;if(lx(lT,{append:function(t,e){var r=jx(this);Tx(arguments.length,2),Gx(r.entries,{key:Sx(t),value:Sx(e)}),ux||this.length++,r.updateURL()},delete:function(t){for(var e=jx(this),r=Tx(arguments.length,1),n=e.entries,o=Sx(t),i=r<2?void 0:arguments[1],a=void 0===i?i:Sx(i),u=0;ue.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,r=jx(this).entries,n=mx(t,arguments.length>1?arguments[1]:void 0),o=0;o1?vT(arguments[1]):{})}}),yx(Dx)){var dT=function(t){return dx(this,Fx),new Dx(t,arguments.length>1?vT(arguments[1]):{})};Fx.constructor=dT,dT.prototype=Fx,rx({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:dT})}}var yT,gT=Zn,mT=i,wT=fI,bT=r,ET=fc,ST=E,AT=Jr,RT=Wi,OT=ds,IT=Ft,xT=AI,TT=function(t){var e=II(t),r=kI(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=RI(o,n>2?arguments[2]:void 0));var a,u,s,c,f,l,h=CI(e),p=0;if(!h||this===jI&&TI(h))for(a=PI(e),u=r?new this(a):jI(a);a>p;p++)l=i?o(e[p],p):e[p],LI(u,p,l);else for(u=r?new this:[],f=(c=UI(e,h)).next;!(s=OI(f,c)).done;p++)l=i?xI(c,o,[s.value,p],!0):s.value,LI(u,p,l);return u.length=p,u},kT=_p,PT=Su.codeAt,LT=function(t){var e,r,n=[],o=YI(GI(JI(t),BI,"."),".");for(e=0;e?@[\\\]^|]/,dk=/[\0\t\n\r #/:<>?@[\\\]^|]/,yk=/^[\u0000-\u0020]+/,gk=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,mk=/[\t\n\r]/g,wk=function(t){var e,r,n,o;if("number"==typeof t){for(e=[],r=0;r<4;r++)nk(e,t%256),t=VT(t/256);return YT(e,".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,o=0,i=0;i<8;i++)0!==t[i]?(o>r&&(e=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(e=n,r=o),e}(t),r=0;r<8;r++)o&&0===t[r]||(o&&(o=!1),n===r?(e+=r?":":"::",o=!0):(e+=JT(t[r],16),r<7&&(e+=":")));return"["+e+"]"}return t},bk={},Ek=xT({},bk,{" ":1,'"':1,"<":1,">":1,"`":1}),Sk=xT({},Ek,{"#":1,"?":1,"{":1,"}":1}),Ak=xT({},Sk,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Rk=function(t,e){var r=PT(t,0);return r>32&&r<127&&!IT(e,t)?t:encodeURIComponent(t)},Ok={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Ik=function(t,e){var r;return 2===t.length&>(uk,$T(t,0))&&(":"===(r=$T(t,1))||!e&&"|"===r)},xk=function(t){var e;return t.length>1&&Ik(ek(t,0,2))&&(2===t.length||"/"===(e=$T(t,2))||"\\"===e||"?"===e||"#"===e)},Tk=function(t){return"."===t||"%2e"===rk(t)},kk={},Pk={},Lk={},Uk={},Ck={},jk={},Mk={},_k={},Dk={},Bk={},Fk={},Nk={},Hk={},zk={},qk={},Vk={},Wk={},$k={},Gk={},Yk={},Jk={},Qk=function(t,e,r){var n,o,i,a=UT(t);if(e){if(o=this.parse(a))throw new zT(o);this.searchParams=null}else{if(void 0!==r&&(n=new Qk(r,!0)),o=this.parse(a,null,n))throw new zT(o);(i=NT(new FT)).bindURL(this),this.searchParams=i}};Qk.prototype={type:"URL",parse:function(t,e,r){var n,o,i,a,u,s=this,c=e||kk,f=0,l="",h=!1,p=!1,v=!1;for(t=UT(t),e||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,t=XT(t,yk,""),t=XT(t,gk,"$1")),t=XT(t,mk,""),n=TT(t);f<=n.length;){switch(o=n[f],c){case kk:if(!o||!GT(uk,o)){if(e)return ok;c=Lk;continue}l+=rk(o),c=Pk;break;case Pk:if(o&&(GT(sk,o)||"+"===o||"-"===o||"."===o))l+=rk(o);else{if(":"!==o){if(e)return ok;l="",c=Lk,f=0;continue}if(e&&(s.isSpecial()!==IT(Ok,l)||"file"===l&&(s.includesCredentials()||null!==s.port)||"file"===s.scheme&&!s.host))return;if(s.scheme=l,e)return void(s.isSpecial()&&Ok[s.scheme]===s.port&&(s.port=null));l="","file"===s.scheme?c=zk:s.isSpecial()&&r&&r.scheme===s.scheme?c=Uk:s.isSpecial()?c=_k:"/"===n[f+1]?(c=Ck,f++):(s.cannotBeABaseURL=!0,KT(s.path,""),c=Gk)}break;case Lk:if(!r||r.cannotBeABaseURL&&"#"!==o)return ok;if(r.cannotBeABaseURL&&"#"===o){s.scheme=r.scheme,s.path=kT(r.path),s.query=r.query,s.fragment="",s.cannotBeABaseURL=!0,c=Jk;break}c="file"===r.scheme?zk:jk;continue;case Uk:if("/"!==o||"/"!==n[f+1]){c=jk;continue}c=Dk,f++;break;case Ck:if("/"===o){c=Bk;break}c=$k;continue;case jk:if(s.scheme=r.scheme,o===yT)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=kT(r.path),s.query=r.query;else if("/"===o||"\\"===o&&s.isSpecial())c=Mk;else if("?"===o)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=kT(r.path),s.query="",c=Yk;else{if("#"!==o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=kT(r.path),s.path.length--,c=$k;continue}s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=kT(r.path),s.query=r.query,s.fragment="",c=Jk}break;case Mk:if(!s.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,c=$k;continue}c=Bk}else c=Dk;break;case _k:if(c=Dk,"/"!==o||"/"!==$T(l,f+1))continue;f++;break;case Dk:if("/"!==o&&"\\"!==o){c=Bk;continue}break;case Bk:if("@"===o){h&&(l="%40"+l),h=!0,i=TT(l);for(var d=0;d65535)return ak;s.port=s.isSpecial()&&m===Ok[s.scheme]?null:m,l=""}if(e)return;c=Wk;continue}return ak}l+=o;break;case zk:if(s.scheme="file","/"===o||"\\"===o)c=qk;else{if(!r||"file"!==r.scheme){c=$k;continue}switch(o){case yT:s.host=r.host,s.path=kT(r.path),s.query=r.query;break;case"?":s.host=r.host,s.path=kT(r.path),s.query="",c=Yk;break;case"#":s.host=r.host,s.path=kT(r.path),s.query=r.query,s.fragment="",c=Jk;break;default:xk(YT(kT(n,f),""))||(s.host=r.host,s.path=kT(r.path),s.shortenPath()),c=$k;continue}}break;case qk:if("/"===o||"\\"===o){c=Vk;break}r&&"file"===r.scheme&&!xk(YT(kT(n,f),""))&&(Ik(r.path[0],!0)?KT(s.path,r.path[0]):s.host=r.host),c=$k;continue;case Vk:if(o===yT||"/"===o||"\\"===o||"?"===o||"#"===o){if(!e&&Ik(l))c=$k;else if(""===l){if(s.host="",e)return;c=Wk}else{if(a=s.parseHost(l))return a;if("localhost"===s.host&&(s.host=""),e)return;l="",c=Wk}continue}l+=o;break;case Wk:if(s.isSpecial()){if(c=$k,"/"!==o&&"\\"!==o)continue}else if(e||"?"!==o)if(e||"#"!==o){if(o!==yT&&(c=$k,"/"!==o))continue}else s.fragment="",c=Jk;else s.query="",c=Yk;break;case $k:if(o===yT||"/"===o||"\\"===o&&s.isSpecial()||!e&&("?"===o||"#"===o)){if(".."===(u=rk(u=l))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(s.shortenPath(),"/"===o||"\\"===o&&s.isSpecial()||KT(s.path,"")):Tk(l)?"/"===o||"\\"===o&&s.isSpecial()||KT(s.path,""):("file"===s.scheme&&!s.path.length&&Ik(l)&&(s.host&&(s.host=""),l=$T(l,0)+":"),KT(s.path,l)),l="","file"===s.scheme&&(o===yT||"?"===o||"#"===o))for(;s.path.length>1&&""===s.path[0];)ZT(s.path);"?"===o?(s.query="",c=Yk):"#"===o&&(s.fragment="",c=Jk)}else l+=Rk(o,Sk);break;case Gk:"?"===o?(s.query="",c=Yk):"#"===o?(s.fragment="",c=Jk):o!==yT&&(s.path[0]+=Rk(o,bk));break;case Yk:e||"#"!==o?o!==yT&&("'"===o&&s.isSpecial()?s.query+="%27":s.query+="#"===o?"%23":Rk(o,bk)):(s.fragment="",c=Jk);break;case Jk:o!==yT&&(s.fragment+=Rk(o,Ek))}f++}},parseHost:function(t){var e,r,n;if("["===$T(t,0)){if("]"!==$T(t,t.length-1))return ik;if(e=function(t){var e,r,n,o,i,a,u,s=[0,0,0,0,0,0,0,0],c=0,f=null,l=0,h=function(){return $T(t,l)};if(":"===h()){if(":"!==$T(t,1))return;l+=2,f=++c}for(;h();){if(8===c)return;if(":"!==h()){for(e=r=0;r<4&>(pk,h());)e=16*e+qT(h(),16),l++,r++;if("."===h()){if(0===r)return;if(l-=r,c>6)return;for(n=0;h();){if(o=null,n>0){if(!("."===h()&&n<4))return;l++}if(!GT(ck,h()))return;for(;GT(ck,h());){if(i=qT(h(),10),null===o)o=i;else{if(0===o)return;o=10*o+i}if(o>255)return;l++}s[c]=256*s[c]+o,2!=++n&&4!==n||c++}if(4!==n)return;break}if(":"===h()){if(l++,!h())return}else if(h())return;s[c++]=e}else{if(null!==f)return;l++,f=++c}}if(null!==f)for(a=c-f,c=7;0!==c&&a>0;)u=s[c],s[c--]=s[f+a-1],s[f+--a]=u;else if(8!==c)return;return s}(ek(t,1,-1)),!e)return ik;this.host=e}else if(this.isSpecial()){if(t=LT(t),GT(vk,t))return ik;if(e=function(t){var e,r,n,o,i,a,u,s=tk(t,".");if(s.length&&""===s[s.length-1]&&s.length--,(e=s.length)>4)return t;for(r=[],n=0;n1&&"0"===$T(o,0)&&(i=GT(fk,o)?16:8,o=ek(o,8===i?1:2)),""===o)a=0;else{if(!GT(10===i?hk:8===i?lk:pk,o))return t;a=qT(o,i)}KT(r,a)}for(n=0;n=WT(256,5-e))return null}else if(a>255)return null;for(u=QT(r),n=0;n1?arguments[1]:void 0,n=DT(e,new Qk(t,!1,r));mT||(e.href=n.serialize(),e.origin=n.getOrigin(),e.protocol=n.getProtocol(),e.username=n.getUsername(),e.password=n.getPassword(),e.host=n.getHost(),e.hostname=n.getHostname(),e.port=n.getPort(),e.pathname=n.getPathname(),e.search=n.getSearch(),e.searchParams=n.getSearchParams(),e.hash=n.getHash())},Xk=Kk.prototype,Zk=function(t,e){return{get:function(){return BT(this)[t]()},set:e&&function(t){return BT(this)[e](t)},configurable:!0,enumerable:!0}};if(mT&&(RT(Xk,"href",Zk("serialize","setHref")),RT(Xk,"origin",Zk("getOrigin")),RT(Xk,"protocol",Zk("getProtocol","setProtocol")),RT(Xk,"username",Zk("getUsername","setUsername")),RT(Xk,"password",Zk("getPassword","setPassword")),RT(Xk,"host",Zk("getHost","setHost")),RT(Xk,"hostname",Zk("getHostname","setHostname")),RT(Xk,"port",Zk("getPort","setPort")),RT(Xk,"pathname",Zk("getPathname","setPathname")),RT(Xk,"search",Zk("getSearch","setSearch")),RT(Xk,"searchParams",Zk("getSearchParams")),RT(Xk,"hash",Zk("getHash","setHash"))),AT(Xk,"toJSON",(function(){return BT(this).serialize()}),{enumerable:!0}),AT(Xk,"toString",(function(){return BT(this).serialize()}),{enumerable:!0}),HT){var tP=HT.createObjectURL,eP=HT.revokeObjectURL;tP&&AT(Kk,"createObjectURL",ET(tP,HT)),eP&&AT(Kk,"revokeObjectURL",ET(eP,HT))}CT(Kk,"URL"),gT({global:!0,constructor:!0,forced:!wT,sham:!mT},{URL:Kk});var rP=c;Zn({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return rP(URL.prototype.toString,this)}});var nP=Jr,oP=E,iP=Co,aP=Bp,uP=URLSearchParams,sP=uP.prototype,cP=oP(sP.append),fP=oP(sP.delete),lP=oP(sP.forEach),hP=oP([].push),pP=new uP("a=1&a=2&b=3");pP.delete("a",1),pP.delete("b",void 0),pP+""!="a=2"&&nP(sP,"delete",(function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return fP(this,t);var n=[];lP(this,(function(t,e){hP(n,{key:e,value:t})})),aP(e,1);for(var o,i=iP(t),a=iP(r),u=0,s=0,c=!1,f=n.length;ur.length&&"/"!==n[n.length-1]))return n+t.slice(r.length);s("W2",r,n)}}function s(t,r,n){console.warn(e(t,[n,r].join(", ")))}function c(t,e,r){for(var n=t.scopes,o=r&&a(r,n);o;){var i=u(e,n[o]);if(i)return i;o=a(o.slice(0,o.lastIndexOf("/")),n)}return u(e,t.imports)||-1!==e.indexOf(":")&&e}function f(){this[I]={}}function l(t,r,n,o){var i=t[I][r];if(i)return i;var a=[],u=Object.create(null);O&&Object.defineProperty(u,O,{value:"Module"});var s=Promise.resolve().then((function(){return t.instantiate(r,n,o)})).then((function(n){if(!n)throw Error(e(2,r));var o=n[1]((function(t,e){i.h=!0;var r=!1;if("string"==typeof t)t in u&&u[t]===e||(u[t]=e,r=!0);else{for(var n in t)e=t[n],n in u&&u[n]===e||(u[n]=e,r=!0);t&&t.__esModule&&(u.__esModule=t.__esModule)}if(r)for(var o=0;o-1){var r=document.createEvent("Event");r.initEvent("error",!1,!1),t.dispatchEvent(r)}return Promise.reject(e)}))}else if("systemjs-importmap"===t.type){t.sp=!0;var r=t.src?(System.fetch||fetch)(t.src,{integrity:t.integrity,priority:t.fetchPriority,passThrough:!0}).then((function(t){if(!t.ok)throw Error(t.status);return t.text()})).catch((function(r){return r.message=e("W4",t.src)+"\n"+r.message,console.warn(r),"function"==typeof t.onerror&&t.onerror(),"{}"})):t.innerHTML;L=L.then((function(){return r})).then((function(r){!function(t,r,n){var o={};try{o=JSON.parse(r)}catch(u){console.warn(Error(e("W5")))}i(o,n,t)}(U,r,t.src||y)}))}}))}var y,g="undefined"!=typeof Symbol,m="undefined"!=typeof self,w="undefined"!=typeof document,b=m?self:t;if(w){var E=document.querySelector("base[href]");E&&(y=E.href)}if(!y&&"undefined"!=typeof location){var S=(y=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==S&&(y=y.slice(0,S+1))}var A,R=/\\/g,O=g&&Symbol.toStringTag,I=g?Symbol():"@",x=f.prototype;x.import=function(t,e,r){var n=this;return e&&"object"==typeof e&&(r=e,e=void 0),Promise.resolve(n.prepareImport()).then((function(){return n.resolve(t,e,r)})).then((function(t){var e=l(n,t,void 0,r);return e.C||p(n,e)}))},x.createContext=function(t){var e=this;return{url:t,resolve:function(r,n){return Promise.resolve(e.resolve(r,n||t))}}},x.register=function(t,e,r){A=[t,e,r]},x.getRegister=function(){var t=A;return A=void 0,t};var T=Object.freeze(Object.create(null));b.System=new f;var k,P,L=Promise.resolve(),U={imports:{},scopes:{},depcache:{},integrity:{}},C=w;if(x.prepareImport=function(t){return(C||t)&&(d(),C=!1),L},x.getImportMap=function(){return JSON.parse(JSON.stringify(U))},w&&(d(),window.addEventListener("DOMContentLoaded",d)),x.addImportMap=function(t,e){i(t,e||y,U)},w){window.addEventListener("error",(function(t){M=t.filename,_=t.error}));var j=location.origin}x.createScript=function(t){var e=document.createElement("script");e.async=!0,t.indexOf(j+"/")&&(e.crossOrigin="anonymous");var r=U.integrity[t];return r&&(e.integrity=r),e.src=t,e};var M,_,D={},B=x.register;x.register=function(t,e){if(w&&"loading"===document.readyState&&"string"!=typeof t){var r=document.querySelectorAll("script[src]"),n=r[r.length-1];if(n){k=t;var o=this;P=setTimeout((function(){D[n.src]=[t,e],o.import(n.src)}))}}else k=void 0;return B.call(this,t,e)},x.instantiate=function(t,r){var n=D[t];if(n)return delete D[t],n;var o=this;return Promise.resolve(x.createScript(t)).then((function(n){return new Promise((function(i,a){n.addEventListener("error",(function(){a(Error(e(3,[t,r].join(", "))))})),n.addEventListener("load",(function(){if(document.head.removeChild(n),M===t)a(_);else{var e=o.getRegister(t);e&&e[0]===k&&clearTimeout(P),i(e)}})),document.head.appendChild(n)}))}))},x.shouldFetch=function(){return!1},"undefined"!=typeof fetch&&(x.fetch=fetch);var F=x.instantiate,N=/^(text|application)\/(x-)?javascript(;|$)/;x.instantiate=function(t,r,n){var o=this;return this.shouldFetch(t,r,n)?this.fetch(t,{credentials:"same-origin",integrity:U.integrity[t],meta:n}).then((function(n){if(!n.ok)throw Error(e(7,[n.status,n.statusText,t,r].join(", ")));var i=n.headers.get("content-type");if(!i||!N.test(i))throw Error(e(4,i));return n.text().then((function(e){return e.indexOf("//# sourceURL=")<0&&(e+="\n//# sourceURL="+t),(0,eval)(e),o.getRegister(t)}))})):F.apply(this,arguments)},x.resolve=function(t,n){return c(U,r(t,n=n||y)||t,n)||function(t,r){throw Error(e(8,[t,r].join(", ")))}(t,n)};var H=x.instantiate;x.instantiate=function(t,e,r){var n=U.depcache[t];if(n)for(var o=0;o0&&r[0]<4?1:+(r[0]+r[1])),!t&&n&&(!(r=n.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=n.match(/Chrome\/(\d+)/))&&(t=+r[1]),q=t}function br(){if($)return W;$=1;var r=wr(),t=p(),e=i().String;return W=!!Object.getOwnPropertySymbols&&!t((function(){var t=Symbol("symbol detection");return!e(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))}function Er(){if(Y)return G;Y=1;var r=br();return G=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function Sr(){if(K)return J;K=1;var r=gr(),t=pr(),e=yr(),n=Er(),i=Object;return J=n?function(r){return"symbol"==typeof r}:function(n){var o=r("Symbol");return t(o)&&e(o.prototype,i(n))}}function Rr(){if(X)return Q;X=1;var r=String;return Q=function(t){try{return r(t)}catch(e){return"Object"}}}function Ar(){if(rr)return Z;rr=1;var r=pr(),t=Rr(),e=TypeError;return Z=function(n){if(r(n))return n;throw new e(t(n)+" is not a function")}}function Or(){if(er)return tr;er=1;var r=Ar(),t=lr();return tr=function(e,n){var i=e[n];return t(i)?void 0:r(i)}}function xr(){if(ir)return nr;ir=1;var r=y(),t=pr(),e=dr(),n=TypeError;return nr=function(i,o){var u,a;if("string"===o&&t(u=i.toString)&&!e(a=r(u,i)))return a;if(t(u=i.valueOf)&&!e(a=r(u,i)))return a;if("string"!==o&&t(u=i.toString)&&!e(a=r(u,i)))return a;throw new n("Can't convert object to primitive value")}}var Ir,Tr,kr,Pr,Lr,Cr,Ur,Dr,Mr,jr,_r,Br,Nr,Fr,Hr,zr,qr,Vr,Wr,$r,Gr,Yr,Jr,Kr,Qr={exports:{}};function Xr(){return Tr?Ir:(Tr=1,Ir=!1)}function Zr(){if(Pr)return kr;Pr=1;var r=i(),t=Object.defineProperty;return kr=function(e,n){try{t(r,e,{value:n,configurable:!0,writable:!0})}catch(i){r[e]=n}return n}}function rt(){if(Lr)return Qr.exports;Lr=1;var r=Xr(),t=i(),e=Zr(),n="__core-js_shared__",o=Qr.exports=t[n]||e(n,{});return(o.versions||(o.versions=[])).push({version:"3.40.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.40.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Qr.exports}function tt(){if(Ur)return Cr;Ur=1;var r=rt();return Cr=function(t,e){return r[t]||(r[t]=e||{})}}function et(){if(Mr)return Dr;Mr=1;var r=hr(),t=Object;return Dr=function(e){return t(r(e))}}function nt(){if(_r)return jr;_r=1;var r=fr(),t=et(),e=r({}.hasOwnProperty);return jr=Object.hasOwn||function(r,n){return e(t(r),n)}}function it(){if(Nr)return Br;Nr=1;var r=fr(),t=0,e=Math.random(),n=r(1..toString);return Br=function(r){return"Symbol("+(void 0===r?"":r)+")_"+n(++t+e,36)}}function ot(){if(Hr)return Fr;Hr=1;var r=i(),t=tt(),e=nt(),n=it(),o=br(),u=Er(),a=r.Symbol,f=t("wks"),c=u?a.for||a:a&&a.withoutSetter||n;return Fr=function(r){return e(f,r)||(f[r]=o&&e(a,r)?a[r]:c("Symbol."+r)),f[r]}}function ut(){if(qr)return zr;qr=1;var r=y(),t=dr(),e=Sr(),n=Or(),i=xr(),o=ot(),u=TypeError,a=o("toPrimitive");return zr=function(o,f){if(!t(o)||e(o))return o;var c,s=n(o,a);if(s){if(void 0===f&&(f="default"),c=r(s,o,f),!t(c)||e(c))return c;throw new u("Can't convert object to primitive value")}return void 0===f&&(f="number"),i(o,f)}}function at(){if(Wr)return Vr;Wr=1;var r=ut(),t=Sr();return Vr=function(e){var n=r(e,"string");return t(n)?n:n+""}}function ft(){if(Gr)return $r;Gr=1;var r=i(),t=dr(),e=r.document,n=t(e)&&t(e.createElement);return $r=function(r){return n?e.createElement(r):{}}}function ct(){if(Jr)return Yr;Jr=1;var r=d(),t=p(),e=ft();return Yr=!r&&!t((function(){return 7!==Object.defineProperty(e("div"),"a",{get:function(){return 7}}).a}))}function st(){if(Kr)return v;Kr=1;var r=d(),t=y(),e=ur(),n=ar(),i=vr(),o=at(),u=nt(),a=ct(),f=Object.getOwnPropertyDescriptor;return v.f=r?f:function(r,c){if(r=i(r),c=o(c),a)try{return f(r,c)}catch(s){}if(u(r,c))return n(!t(e.f,r,c),r[c])},v}var lt,ht,vt,pt,dt,gt,yt,mt={};function wt(){if(ht)return lt;ht=1;var r=d(),t=p();return lt=r&&t((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))}function bt(){if(pt)return vt;pt=1;var r=dr(),t=String,e=TypeError;return vt=function(n){if(r(n))return n;throw new e(t(n)+" is not an object")}}function Et(){if(dt)return mt;dt=1;var r=d(),t=ct(),e=wt(),n=bt(),i=at(),o=TypeError,u=Object.defineProperty,a=Object.getOwnPropertyDescriptor,f="enumerable",c="configurable",s="writable";return mt.f=r?e?function(r,t,e){if(n(r),t=i(t),n(e),"function"==typeof r&&"prototype"===t&&"value"in e&&s in e&&!e[s]){var o=a(r,t);o&&o[s]&&(r[t]=e.value,e={configurable:c in e?e[c]:o[c],enumerable:f in e?e[f]:o[f],writable:!1})}return u(r,t,e)}:u:function(r,e,a){if(n(r),e=i(e),n(a),t)try{return u(r,e,a)}catch(f){}if("get"in a||"set"in a)throw new o("Accessors not supported");return"value"in a&&(r[e]=a.value),r},mt}function St(){if(yt)return gt;yt=1;var r=d(),t=Et(),e=ar();return gt=r?function(r,n,i){return t.f(r,n,e(1,i))}:function(r,t,e){return r[t]=e,r}}var Rt,At,Ot,xt,It,Tt,kt,Pt,Lt,Ct,Ut,Dt,Mt,jt,_t,Bt={exports:{}};function Nt(){if(At)return Rt;At=1;var r=d(),t=nt(),e=Function.prototype,n=r&&Object.getOwnPropertyDescriptor,i=t(e,"name"),o=i&&"something"===function(){}.name,u=i&&(!r||r&&n(e,"name").configurable);return Rt={EXISTS:i,PROPER:o,CONFIGURABLE:u}}function Ft(){if(xt)return Ot;xt=1;var r=fr(),t=pr(),e=rt(),n=r(Function.toString);return t(e.inspectSource)||(e.inspectSource=function(r){return n(r)}),Ot=e.inspectSource}function Ht(){if(Pt)return kt;Pt=1;var r=tt(),t=it(),e=r("keys");return kt=function(r){return e[r]||(e[r]=t(r))}}function zt(){return Ct?Lt:(Ct=1,Lt={})}function qt(){if(Dt)return Ut;Dt=1;var r,t,e,n=function(){if(Tt)return It;Tt=1;var r=i(),t=pr(),e=r.WeakMap;return It=t(e)&&/native code/.test(String(e))}(),o=i(),u=dr(),a=St(),f=nt(),c=rt(),s=Ht(),l=zt(),h="Object already initialized",v=o.TypeError,p=o.WeakMap;if(n||c.state){var d=c.state||(c.state=new p);d.get=d.get,d.has=d.has,d.set=d.set,r=function(r,t){if(d.has(r))throw new v(h);return t.facade=r,d.set(r,t),t},t=function(r){return d.get(r)||{}},e=function(r){return d.has(r)}}else{var g=s("state");l[g]=!0,r=function(r,t){if(f(r,g))throw new v(h);return t.facade=r,a(r,g,t),t},t=function(r){return f(r,g)?r[g]:{}},e=function(r){return f(r,g)}}return Ut={set:r,get:t,has:e,enforce:function(n){return e(n)?t(n):r(n,{})},getterFor:function(r){return function(e){var n;if(!u(e)||(n=t(e)).type!==r)throw new v("Incompatible receiver, "+r+" required");return n}}}}function Vt(){if(Mt)return Bt.exports;Mt=1;var r=fr(),t=p(),e=pr(),n=nt(),i=d(),o=Nt().CONFIGURABLE,u=Ft(),a=qt(),f=a.enforce,c=a.get,s=String,l=Object.defineProperty,h=r("".slice),v=r("".replace),g=r([].join),y=i&&!t((function(){return 8!==l((function(){}),"length",{value:8}).length})),m=String(String).split("String"),w=Bt.exports=function(r,t,e){"Symbol("===h(s(t),0,7)&&(t="["+v(s(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),e&&e.getter&&(t="get "+t),e&&e.setter&&(t="set "+t),(!n(r,"name")||o&&r.name!==t)&&(i?l(r,"name",{value:t,configurable:!0}):r.name=t),y&&e&&n(e,"arity")&&r.length!==e.arity&&l(r,"length",{value:e.arity});try{e&&n(e,"constructor")&&e.constructor?i&&l(r,"prototype",{writable:!1}):r.prototype&&(r.prototype=void 0)}catch(a){}var u=f(r);return n(u,"source")||(u.source=g(m,"string"==typeof t?t:"")),r};return Function.prototype.toString=w((function(){return e(this)&&c(this).source||u(this)}),"toString"),Bt.exports}function Wt(){if(_t)return jt;_t=1;var r=pr(),t=Et(),e=Vt(),n=Zr();return jt=function(i,o,u,a){a||(a={});var f=a.enumerable,c=void 0!==a.name?a.name:o;if(r(u)&&e(u,c,a),a.global)f?i[o]=u:n(o,u);else{try{a.unsafe?i[o]&&(f=!0):delete i[o]}catch(s){}f?i[o]=u:t.f(i,o,{value:u,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return i}}var $t,Gt,Yt,Jt,Kt,Qt,Xt,Zt,re,te,ee,ne,ie,oe,ue,ae,fe,ce={};function se(){if(Jt)return Yt;Jt=1;var r=function(){if(Gt)return $t;Gt=1;var r=Math.ceil,t=Math.floor;return $t=Math.trunc||function(e){var n=+e;return(n>0?t:r)(n)}}();return Yt=function(t){var e=+t;return e!=e||0===e?0:r(e)}}function le(){if(Qt)return Kt;Qt=1;var r=se(),t=Math.max,e=Math.min;return Kt=function(n,i){var o=r(n);return o<0?t(o+i,0):e(o,i)}}function he(){if(Zt)return Xt;Zt=1;var r=se(),t=Math.min;return Xt=function(e){var n=r(e);return n>0?t(n,9007199254740991):0}}function ve(){if(te)return re;te=1;var r=he();return re=function(t){return r(t.length)}}function pe(){if(oe)return ie;oe=1;var r=fr(),t=nt(),e=vr(),n=function(){if(ne)return ee;ne=1;var r=vr(),t=le(),e=ve(),n=function(n){return function(i,o,u){var a=r(i),f=e(a);if(0===f)return!n&&-1;var c,s=t(u,f);if(n&&o!=o){for(;f>s;)if((c=a[s++])!=c)return!0}else for(;f>s;s++)if((n||s in a)&&a[s]===o)return n||s||0;return!n&&-1}};return ee={includes:n(!0),indexOf:n(!1)}}().indexOf,i=zt(),o=r([].push);return ie=function(r,u){var a,f=e(r),c=0,s=[];for(a in f)!t(i,a)&&t(f,a)&&o(s,a);for(;u.length>c;)t(f,a=u[c++])&&(~n(s,a)||o(s,a));return s}}function de(){return ae?ue:(ae=1,ue=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function ge(){if(fe)return ce;fe=1;var r=pe(),t=de().concat("length","prototype");return ce.f=Object.getOwnPropertyNames||function(e){return r(e,t)},ce}var ye,me,we,be,Ee,Se,Re,Ae,Oe,xe,Ie,Te,ke,Pe,Le,Ce,Ue,De,Me={};function je(){return ye||(ye=1,Me.f=Object.getOwnPropertySymbols),Me}function _e(){if(we)return me;we=1;var r=gr(),t=fr(),e=ge(),n=je(),i=bt(),o=t([].concat);return me=r("Reflect","ownKeys")||function(r){var t=e.f(i(r)),u=n.f;return u?o(t,u(r)):t}}function Be(){if(Ee)return be;Ee=1;var r=nt(),t=_e(),e=st(),n=Et();return be=function(i,o,u){for(var a=t(o),f=n.f,c=e.f,s=0;sm&&c(o,arguments[m]),o}));if(A.prototype=S,"Error"!==b?i?i(A,R):o(A,R,{name:!0}):l&&y in E&&(u(A,E,y),u(A,E,"prepareStackTrace")),o(A,E),!h)try{S.name!==b&&e(S,"name",b),S.constructor=A}catch(O){}return A}},dn}!function(){if(yn)return mn;yn=1;var r=Fe(),t=i(),e=wn(),n=Ln(),o="WebAssembly",u=t[o],a=7!==new Error("e",{cause:7}).cause,f=function(t,e){var i={};i[t]=n(t,e,a),r({global:!0,constructor:!0,arity:1,forced:a},i)},c=function(t,e){if(u&&u[t]){var i={};i[t]=n(o+"."+t,e,a),r({target:o,stat:!0,constructor:!0,arity:1,forced:a},i)}};f("Error",(function(r){return function(t){return e(r,this,arguments)}})),f("EvalError",(function(r){return function(t){return e(r,this,arguments)}})),f("RangeError",(function(r){return function(t){return e(r,this,arguments)}})),f("ReferenceError",(function(r){return function(t){return e(r,this,arguments)}})),f("SyntaxError",(function(r){return function(t){return e(r,this,arguments)}})),f("TypeError",(function(r){return function(t){return e(r,this,arguments)}})),f("URIError",(function(r){return function(t){return e(r,this,arguments)}})),c("CompileError",(function(r){return function(t){return e(r,this,arguments)}})),c("LinkError",(function(r){return function(t){return e(r,this,arguments)}})),c("RuntimeError",(function(r){return function(t){return e(r,this,arguments)}}))}();var Cn,Un,Dn,Mn,jn,_n,Bn,Nn={};function Fn(){if(Un)return Cn;Un=1;var r=cr();return Cn=Array.isArray||function(t){return"Array"===r(t)}}function Hn(){if(Mn)return Dn;Mn=1;var r=d(),t=Fn(),e=TypeError,n=Object.getOwnPropertyDescriptor,i=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(r){return r instanceof TypeError}}();return Dn=i?function(r,i){if(t(r)&&!n(r,"length").writable)throw new e("Cannot set read only .length");return r.length=i}:function(r,t){return r.length=t}}function zn(){if(_n)return jn;_n=1;var r=TypeError;return jn=function(t){if(t>9007199254740991)throw r("Maximum allowed index exceeded");return t}}!function(){if(Bn)return Nn;Bn=1;var r=Fe(),t=et(),e=ve(),n=Hn(),i=zn();r({target:"Array",proto:!0,arity:1,forced:p()((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(r){return r instanceof TypeError}}()},{push:function(r){var o=t(this),u=e(o),a=arguments.length;i(u+a);for(var f=0;fs;)e.f(r,u=f[s++],a[u]);return r},Li}(),n=de(),i=zt(),o=Ui(),u=ft(),a=Ht(),f="prototype",c="script",s=a("IE_PROTO"),l=function(){},h=function(r){return"<"+c+">"+r+""},v=function(r){r.write(h("")),r.close();var t=r.parentWindow.Object;return r=null,t},p=function(){try{r=new ActiveXObject("htmlfile")}catch(s){}var t,e,i;p="undefined"!=typeof document?document.domain&&r?v(r):(e=u("iframe"),i="java"+c+":",e.style.display="none",o.appendChild(e),e.src=String(i),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F):v(r);for(var a=n.length;a--;)delete p[f][n[a]];return p()};return i[s]=!0,vi=Object.create||function(r,n){var i;return null!==r?(l[f]=t(r),i=new l,l[f]=null,i[s]=r):i=p(),void 0===n?i:e.f(i,n)}}function Mi(){if(gi)return di;gi=1;var r=dr(),t=cr(),e=ot()("match");return di=function(n){var i;return r(n)&&(void 0!==(i=n[e])?!!i:"RegExp"===t(n))}}function ji(){if(mi)return yi;mi=1;var r=bt();return yi=function(){var t=r(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}}function _i(){if(bi)return wi;bi=1;var r=y(),t=nt(),e=yr(),n=ji(),i=RegExp.prototype;return wi=function(o){var u=o.flags;return void 0!==u||"flags"in i||t(o,"flags")||!e(i,o)?u:r(n,o)}}function Bi(){if(Si)return Ei;Si=1;var r=p(),t=i().RegExp,e=r((function(){var r=t("a","y");return r.lastIndex=2,null!==r.exec("abcd")})),n=e||r((function(){return!t("a","y").sticky})),o=e||r((function(){var r=t("^r","gy");return r.lastIndex=2,null!==r.exec("str")}));return Ei={BROKEN_CARET:o,MISSED_STICKY:n,UNSUPPORTED_Y:e}}function Ni(){if(Ai)return Ri;Ai=1;var r=gr(),t=qe(),e=ot(),n=d(),i=e("species");return Ri=function(e){var o=r(e);n&&o&&!o[i]&&t(o,i,{configurable:!0,get:function(){return this}})}}function Fi(){if(xi)return Oi;xi=1;var r=p(),t=i().RegExp;return Oi=r((function(){var r=t(".","s");return!(r.dotAll&&r.test("\n")&&"s"===r.flags)}))}function Hi(){if(Ti)return Ii;Ti=1;var r=p(),t=i().RegExp;return Ii=r((function(){var r=t("(?b)","g");return"b"!==r.exec("b").groups.a||"bc"!=="b".replace(r,"$c")}))}!function(){if(ki)return Pi;ki=1;var r=d(),t=i(),e=fr(),n=Ne(),o=On(),u=St(),a=Di(),f=ge().f,c=yr(),s=Mi(),l=ze(),h=_i(),v=Bi(),g=An(),y=Wt(),m=p(),w=nt(),b=qt().enforce,E=Ni(),S=ot(),R=Fi(),A=Hi(),O=S("match"),x=t.RegExp,I=x.prototype,T=t.SyntaxError,k=e(I.exec),P=e("".charAt),L=e("".replace),C=e("".indexOf),U=e("".slice),D=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,M=/a/g,j=/a/g,_=new x(M)!==M,B=v.MISSED_STICKY,N=v.UNSUPPORTED_Y,F=r&&(!_||B||R||A||m((function(){return j[O]=!1,x(M)!==M||x(j)===j||"/a/i"!==String(x(M,"i"))})));if(n("RegExp",F)){for(var H=function(r,t){var e,n,i,f,v,p,d=c(I,this),g=s(r),y=void 0===t,m=[],E=r;if(!d&&g&&y&&r.constructor===H)return r;if((g||c(I,r))&&(r=r.source,y&&(t=h(E))),r=void 0===r?"":l(r),t=void 0===t?"":l(t),E=r,R&&"dotAll"in M&&(n=!!t&&C(t,"s")>-1)&&(t=L(t,/s/g,"")),e=t,B&&"sticky"in M&&(i=!!t&&C(t,"y")>-1)&&N&&(t=L(t,/y/g,"")),A&&(f=function(r){for(var t,e=r.length,n=0,i="",o=[],u=a(null),f=!1,c=!1,s=0,l="";n<=e;n++){if("\\"===(t=P(r,n)))t+=P(r,++n);else if("]"===t)f=!1;else if(!f)switch(!0){case"["===t:f=!0;break;case"("===t:if(i+=t,"?:"===U(r,n+1,n+3))continue;k(D,U(r,n+1))&&(n+=2,c=!0),s++;continue;case">"===t&&c:if(""===l||w(u,l))throw new T("Invalid capture group name");u[l]=!0,o[o.length]=[l,s],c=!1,l="";continue}c?l+=t:i+=t}return[i,o]}(r),r=f[0],m=f[1]),v=o(x(r,t),d?this:I,H),(n||i||m.length)&&(p=b(v),n&&(p.dotAll=!0,p.raw=H(function(r){for(var t,e=r.length,n=0,i="",o=!1;n<=e;n++)"\\"!==(t=P(r,n))?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),i+=t):i+="[\\s\\S]":i+=t+P(r,++n);return i}(r),e)),i&&(p.sticky=!0),m.length&&(p.groups=m)),r!==E)try{u(v,"source",""===E?"(?:)":E)}catch(S){}return v},z=f(x),q=0;z.length>q;)g(H,x,z[q++]);I.constructor=H,H.prototype=I,y(t,"RegExp",H,{constructor:!0})}E("RegExp")}();var zi,qi={};!function(){if(zi)return qi;zi=1;var r=d(),t=Fi(),e=cr(),n=qe(),i=qt().get,o=RegExp.prototype,u=TypeError;r&&t&&n(o,"dotAll",{configurable:!0,get:function(){if(this!==o){if("RegExp"===e(this))return!!i(this).dotAll;throw new u("Incompatible receiver, RegExp required")}}})}();var Vi,Wi,$i,Gi={};function Yi(){if(Wi)return Vi;Wi=1;var r,t,e=y(),n=fr(),i=ze(),o=ji(),u=Bi(),a=tt(),f=Di(),c=qt().get,s=Fi(),l=Hi(),h=a("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,p=v,d=n("".charAt),g=n("".indexOf),m=n("".replace),w=n("".slice),b=(t=/b*/g,e(v,r=/a/,"a"),e(v,t,"a"),0!==r.lastIndex||0!==t.lastIndex),E=u.BROKEN_CARET,S=void 0!==/()??/.exec("")[1];return(b||S||E||s||l)&&(p=function(r){var t,n,u,a,s,l,y,R=this,A=c(R),O=i(r),x=A.raw;if(x)return x.lastIndex=R.lastIndex,t=e(p,x,O),R.lastIndex=x.lastIndex,t;var I=A.groups,T=E&&R.sticky,k=e(o,R),P=R.source,L=0,C=O;if(T&&(k=m(k,"y",""),-1===g(k,"g")&&(k+="g"),C=w(O,R.lastIndex),R.lastIndex>0&&(!R.multiline||R.multiline&&"\n"!==d(O,R.lastIndex-1))&&(P="(?: "+P+")",C=" "+C,L++),n=new RegExp("^(?:"+P+")",k)),S&&(n=new RegExp("^"+P+"$(?!\\s)",k)),b&&(u=R.lastIndex),a=e(v,T?n:R,C),T?a?(a.input=w(a.input,L),a[0]=w(a[0],L),a.index=R.lastIndex,R.lastIndex+=a[0].length):R.lastIndex=0:b&&a&&(R.lastIndex=R.global?a.index+a[0].length:u),S&&a&&a.length>1&&e(h,a[0],n,(function(){for(s=1;ss.size?o(s.getIterator(),(function(r){f(c,r)&&a(l,r)})):i(c,(function(r){s.includes(r)&&a(l,r)})),l}}();r({target:"Set",proto:!0,real:!0,forced:!ko()("intersection",(function(r){return 2===r.size&&r.has(1)&&r.has(2)}))||t((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}))},{intersection:e})}();var Do,Mo,jo,_o,Bo,No={};function Fo(){if(Mo)return Do;Mo=1;var r=y(),t=bt(),e=Or();return Do=function(n,i,o){var u,a;t(n);try{if(!(u=e(n,"return"))){if("throw"===i)throw o;return o}u=r(u,n)}catch(f){a=!0,u=f}if("throw"===i)throw o;if(a)throw u;return t(u),o}}!function(){if(Bo)return No;Bo=1;var r=Fe(),t=function(){if(_o)return jo;_o=1;var r=So(),t=Eo().has,e=xo(),n=To(),i=Ao(),o=Ro(),u=Fo();return jo=function(a){var f=r(this),c=n(a);if(e(f)<=c.size)return!1!==i(f,(function(r){if(c.includes(r))return!1}),!0);var s=c.getIterator();return!1!==o(s,(function(r){if(t(f,r))return u(s,"normal",!1)}))}}();r({target:"Set",proto:!0,real:!0,forced:!ko()("isDisjointFrom",(function(r){return!r}))},{isDisjointFrom:t})}();var Ho,zo,qo,Vo={};!function(){if(qo)return Vo;qo=1;var r=Fe(),t=function(){if(zo)return Ho;zo=1;var r=So(),t=xo(),e=Ao(),n=To();return Ho=function(i){var o=r(this),u=n(i);return!(t(o)>u.size)&&!1!==e(o,(function(r){if(!u.includes(r))return!1}),!0)}}();r({target:"Set",proto:!0,real:!0,forced:!ko()("isSubsetOf",(function(r){return r}))},{isSubsetOf:t})}();var Wo,$o,Go,Yo={};!function(){if(Go)return Yo;Go=1;var r=Fe(),t=function(){if($o)return Wo;$o=1;var r=So(),t=Eo().has,e=xo(),n=To(),i=Ro(),o=Fo();return Wo=function(u){var a=r(this),f=n(u);if(e(a)=v?r?"":void 0:(c=o(l,h))<55296||c>56319||h+1===v||(s=o(l,h+1))<56320||s>57343?r?i(l,h):c:r?u(l,h,h+2):s-56320+(c-55296<<10)+65536}};return ou={codeAt:a(!1),charAt:a(!0)}}function gu(){if(fu)return au;fu=1;var r=du().charAt;return au=function(t,e,n){return e+(n?r(t,e).length:1)}}function yu(){if(su)return cu;su=1;var r=fr(),t=et(),e=Math.floor,n=r("".charAt),i=r("".replace),o=r("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,a=/\$([$&'`]|\d{1,2})/g;return cu=function(r,f,c,s,l,h){var v=c+r.length,p=s.length,d=a;return void 0!==l&&(l=t(l),d=u),i(h,d,(function(t,i){var u;switch(n(i,0)){case"$":return"$";case"&":return r;case"`":return o(f,0,c);case"'":return o(f,v);case"<":u=l[o(i,1,-1)];break;default:var a=+i;if(0===a)return t;if(a>p){var h=e(a/10);return 0===h?t:h<=p?void 0===s[h-1]?n(i,1):s[h-1]+n(i,1):t}u=s[a-1]}return void 0===u?"":u}))}}!function(){if(vu)return pu;vu=1;var r=wn(),t=y(),e=fr(),n=function(){if(iu)return nu;iu=1,Ji();var r=y(),t=Wt(),e=Yi(),n=p(),i=ot(),o=St(),u=i("species"),a=RegExp.prototype;return nu=function(f,c,s,l){var h=i(f),v=!n((function(){var r={};return r[h]=function(){return 7},7!==""[f](r)})),p=v&&!n((function(){var r=!1,t=/a/;return"split"===f&&((t={}).constructor={},t.constructor[u]=function(){return t},t.flags="",t[h]=/./[h]),t.exec=function(){return r=!0,null},t[h](""),!r}));if(!v||!p||s){var d=/./[h],g=c(h,""[f],(function(t,n,i,o,u){var f=n.exec;return f===e||f===a.exec?v&&!u?{done:!0,value:r(d,n,i,o)}:{done:!0,value:r(t,i,n,o)}:{done:!1}}));t(String.prototype,f,g[0]),t(a,h,g[1])}l&&o(a[h],"sham",!0)}}(),i=p(),o=bt(),u=pr(),a=lr(),f=se(),c=he(),s=ze(),l=hr(),h=gu(),v=Or(),d=yu(),g=function(){if(hu)return lu;hu=1;var r=y(),t=bt(),e=pr(),n=cr(),i=Yi(),o=TypeError;return lu=function(u,a){var f=u.exec;if(e(f)){var c=r(f,u,a);return null!==c&&t(c),c}if("RegExp"===n(u))return r(i,u,a);throw new o("RegExp#exec called on incompatible receiver")}}(),m=ot()("replace"),w=Math.max,b=Math.min,E=e([].concat),S=e([].push),R=e("".indexOf),A=e("".slice),O="$0"==="a".replace(/./,"$0"),x=!!/./[m]&&""===/./[m]("a","$0");n("replace",(function(e,n,i){var p=x?"$":"$0";return[function(r,e){var i=l(this),o=a(r)?void 0:v(r,m);return o?t(o,r,i,e):t(n,s(i),r,e)},function(t,e){var a=o(this),l=s(t);if("string"==typeof e&&-1===R(e,p)&&-1===R(e,"$<")){var v=i(n,a,l,e);if(v.done)return v.value}var y=u(e);y||(e=s(e));var m,O=a.global;O&&(m=a.unicode,a.lastIndex=0);for(var x,I=[];null!==(x=g(a,l))&&(S(I,x),O);){""===s(x[0])&&(a.lastIndex=h(l,c(a.lastIndex),m))}for(var T,k="",P=0,L=0;L=P&&(k+=A(l,P,D)+C,P=D+U.length)}return k+A(l,P)}]}),!!i((function(){var r=/./;return r.exec=function(){var r=[];return r.groups={a:"7"},r},"7"!=="".replace(r,"$")}))||!O||x)}();var mu,wu,bu,Eu,Su,Ru,Au,Ou={};function xu(){return wu?mu:(wu=1,mu="\t\n\v\f\r                 \u2028\u2029\ufeff")}!function(){if(Au)return Ou;Au=1;var r=Fe(),t=function(){if(Eu)return bu;Eu=1;var r=fr(),t=hr(),e=ze(),n=xu(),i=r("".replace),o=RegExp("^["+n+"]+"),u=RegExp("(^|[^"+n+"])["+n+"]+$"),a=function(r){return function(n){var a=e(t(n));return 1&r&&(a=i(a,o,"")),2&r&&(a=i(a,u,"$1")),a}};return bu={start:a(1),end:a(2),trim:a(3)}}().trim,e=function(){if(Ru)return Su;Ru=1;var r=Nt().PROPER,t=p(),e=xu();return Su=function(n){return t((function(){return!!e[n]()||"​…᠎"!=="​…᠎"[n]()||r&&e[n].name!==n}))}}();r({target:"String",proto:!0,forced:e("trim")},{trim:function(){return t(this)}})}();var Iu,Tu,ku,Pu,Lu,Cu,Uu,Du,Mu,ju,_u,Bu,Nu={};function Fu(){if(Tu)return Iu;Tu=1;var r=yr(),t=TypeError;return Iu=function(e,n){if(r(n,e))return e;throw new t("Incorrect invocation")}}function Hu(){if(Cu)return Lu;Cu=1;var r=nt(),t=pr(),e=et(),n=Ht(),i=function(){if(Pu)return ku;Pu=1;var r=p();return ku=!r((function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}))}(),o=n("IE_PROTO"),u=Object,a=u.prototype;return Lu=i?u.getPrototypeOf:function(n){var i=e(n);if(r(i,o))return i[o];var f=i.constructor;return t(f)&&i instanceof f?f.prototype:i instanceof u?a:null}}function zu(){if(Du)return Uu;Du=1;var r=d(),t=Et(),e=ar();return Uu=function(n,i,o){r?t.f(n,i,e(0,o)):n[i]=o}}function qu(){if(ju)return Mu;ju=1;var r,t,e,n=p(),i=pr(),o=dr(),u=Di(),a=Hu(),f=Wt(),c=ot(),s=Xr(),l=c("iterator"),h=!1;return[].keys&&("next"in(e=[].keys())?(t=a(a(e)))!==Object.prototype&&(r=t):h=!0),!o(r)||n((function(){var t={};return r[l].call(t)!==t}))?r={}:s&&(r=u(r)),i(r[l])||f(r,l,(function(){return this})),Mu={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}}Bu||(Bu=1,function(){if(_u)return Nu;_u=1;var r=Fe(),t=i(),e=Fu(),n=bt(),o=pr(),u=Hu(),a=qe(),f=zu(),c=p(),s=nt(),l=ot(),h=qu().IteratorPrototype,v=d(),g=Xr(),y="constructor",m="Iterator",w=l("toStringTag"),b=TypeError,E=t[m],S=g||!o(E)||E.prototype!==h||!c((function(){E({})})),R=function(){if(e(this,h),u(this)===h)throw new b("Abstract class Iterator not directly constructable")},A=function(r,t){v?a(h,r,{configurable:!0,get:function(){return t},set:function(t){if(n(this),this===h)throw new b("You can't redefine this property");s(this,r)?this[r]=t:f(this,r,t)}}):h[r]=t};s(h,w)||A(w,m),!S&&s(h,y)&&h[y]!==Object||A(y,R),R.prototype=h,r({global:!0,constructor:!0,forced:S},{Iterator:R})}());var Vu,Wu,$u,Gu,Yu,Ju,Ku,Qu,Xu,Zu,ra,ta,ea,na,ia,oa,ua={};function aa(){if(Wu)return Vu;Wu=1;var r=cr(),t=fr();return Vu=function(e){if("Function"===r(e))return t(e)}}function fa(){if(Gu)return $u;Gu=1;var r=aa(),t=Ar(),e=g(),n=r(r.bind);return $u=function(r,i){return t(r),void 0===i?r:e?n(r,i):function(){return r.apply(i,arguments)}},$u}function ca(){return Ju?Yu:(Ju=1,Yu={})}function sa(){if(Qu)return Ku;Qu=1;var r=ot(),t=ca(),e=r("iterator"),n=Array.prototype;return Ku=function(r){return void 0!==r&&(t.Array===r||n[e]===r)}}function la(){if(Zu)return Xu;Zu=1;var r=He(),t=Or(),e=lr(),n=ca(),i=ot()("iterator");return Xu=function(o){if(!e(o))return t(o,i)||t(o,"@@iterator")||n[r(o)]}}function ha(){if(ta)return ra;ta=1;var r=y(),t=Ar(),e=bt(),n=Rr(),i=la(),o=TypeError;return ra=function(u,a){var f=arguments.length<2?i(u):a;if(t(f))return e(r(f,u));throw new o(n(u)+" is not iterable")},ra}function va(){if(na)return ea;na=1;var r=fa(),t=y(),e=bt(),n=Rr(),i=sa(),o=ve(),u=yr(),a=ha(),f=la(),c=Fo(),s=TypeError,l=function(r,t){this.stopped=r,this.result=t},h=l.prototype;return ea=function(v,p,d){var g,y,m,w,b,E,S,R=d&&d.that,A=!(!d||!d.AS_ENTRIES),O=!(!d||!d.IS_RECORD),x=!(!d||!d.IS_ITERATOR),I=!(!d||!d.INTERRUPTED),T=r(p,R),k=function(r){return g&&c(g,"normal",r),new l(!0,r)},P=function(r){return A?(e(r),I?T(r[0],r[1],k):T(r[0],r[1])):I?T(r,k):T(r)};if(O)g=v.iterator;else if(x)g=v;else{if(!(y=f(v)))throw new s(n(v)+" is not iterable");if(i(y)){for(m=0,w=o(v);w>m;m++)if((b=P(v[m]))&&u(h,b))return b;return new l(!1)}g=a(v,y)}for(E=O?v.next:g.next;!(S=t(E,g)).done;){try{b=P(S.value)}catch(L){c(g,"throw",L)}if("object"==typeof b&&b&&u(h,b))return b}return new l(!1)}}oa||(oa=1,function(){if(ia)return ua;ia=1;var r=Fe(),t=va(),e=Ar(),n=bt(),i=Io();r({target:"Iterator",proto:!0,real:!0},{every:function(r){n(this),e(r);var o=i(this),u=0;return!t(o,(function(t,e){if(!r(t,u++))return e()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}());var pa,da,ga,ya,ma,wa,ba,Ea,Sa,Ra,Aa={};function Oa(){if(da)return pa;da=1;var r=Wt();return pa=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}}function xa(){return ya?ga:(ya=1,ga=function(r,t){return{value:r,done:t}})}function Ia(){if(wa)return ma;wa=1;var r=y(),t=Di(),e=St(),n=Oa(),i=ot(),o=qt(),u=Or(),a=qu().IteratorPrototype,f=xa(),c=Fo(),s=i("toStringTag"),l="IteratorHelper",h="WrapForValidIterator",v=o.set,p=function(e){var i=o.getterFor(e?h:l);return n(t(a),{next:function(){var r=i(this);if(e)return r.nextHandler();if(r.done)return f(void 0,!0);try{var t=r.nextHandler();return r.returnHandlerResult?t:f(t,r.done)}catch(n){throw r.done=!0,n}},return:function(){var t=i(this),n=t.iterator;if(t.done=!0,e){var o=u(n,"return");return o?r(o,n):f(void 0,!0)}if(t.inner)try{c(t.inner.iterator,"normal")}catch(a){return c(n,"throw",a)}return n&&c(n,"normal"),f(void 0,!0)}})},d=p(!0),g=p(!1);return e(g,s,"Iterator Helper"),ma=function(r,t,e){var n=function(n,i){i?(i.iterator=n.iterator,i.next=n.next):i=n,i.type=t?h:l,i.returnHandlerResult=!!e,i.nextHandler=r,i.counter=0,i.done=!1,v(this,i)};return n.prototype=t?d:g,n}}function Ta(){if(Ea)return ba;Ea=1;var r=bt(),t=Fo();return ba=function(e,n,i,o){try{return o?n(r(i)[0],i[1]):n(i)}catch(u){t(e,"throw",u)}}}Ra||(Ra=1,function(){if(Sa)return Aa;Sa=1;var r=Fe(),t=y(),e=Ar(),n=bt(),i=Io(),o=Ia(),u=Ta(),a=Xr(),f=o((function(){for(var r,e,i=this.iterator,o=this.predicate,a=this.next;;){if(r=n(t(a,i)),this.done=!!r.done)return;if(e=r.value,u(i,o,[e,this.counter++],!0))return e}}));r({target:"Iterator",proto:!0,real:!0,forced:a},{filter:function(r){return n(this),e(r),new f(i(this),{predicate:r})}})}());var ka,Pa,La={};Pa||(Pa=1,function(){if(ka)return La;ka=1;var r=Fe(),t=va(),e=Ar(),n=bt(),i=Io();r({target:"Iterator",proto:!0,real:!0},{forEach:function(r){n(this),e(r);var o=i(this),u=0;t(o,(function(t){r(t,u++)}),{IS_RECORD:!0})}})}());var Ca,Ua,Da,Ma,ja={};function _a(){if(Da)return ja;Da=1;var r=Fe(),t=function(){if(Ua)return Ca;Ua=1;var r=y(),t=Ar(),e=bt(),n=Io(),i=Ia(),o=Ta(),u=i((function(){var t=this.iterator,n=e(r(this.next,t));if(!(this.done=!!n.done))return o(t,this.mapper,[n.value,this.counter++],!0)}));return Ca=function(r){return e(this),t(r),new u(n(this),{mapper:r})}}();return r({target:"Iterator",proto:!0,real:!0,forced:Xr()},{map:t}),ja}Ma||(Ma=1,_a());var Ba,Na,Fa={};Na||(Na=1,function(){if(Ba)return Fa;Ba=1;var r=Fe(),t=va(),e=Ar(),n=bt(),i=Io(),o=TypeError;r({target:"Iterator",proto:!0,real:!0},{reduce:function(r){n(this),e(r);var u=i(this),a=arguments.length<2,f=a?void 0:arguments[1],c=0;if(t(u,(function(t){a?(a=!1,f=t):f=r(f,t,c),c++}),{IS_RECORD:!0}),a)throw new o("Reduce of empty iterator with no initial value");return f}})}());var Ha,za,qa={};za||(za=1,function(){if(Ha)return qa;Ha=1;var r=Fe(),t=va(),e=Ar(),n=bt(),i=Io();r({target:"Iterator",proto:!0,real:!0},{some:function(r){n(this),e(r);var o=i(this),u=0;return t(o,(function(t,e){if(r(t,u++))return e()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}());var Va,Wa,$a,Ga,Ya,Ja,Ka,Qa,Xa,Za,rf,tf,ef,nf={};function of(){if(Ja)return Ya;Ja=1;var r=ot(),t=Di(),e=Et().f,n=r("unscopables"),i=Array.prototype;return void 0===i[n]&&e(i,n,{configurable:!0,value:t(null)}),Ya=function(r){i[n][r]=!0}}function uf(){if(Qa)return Ka;Qa=1;var r=qu().IteratorPrototype,t=Di(),e=ar(),n=ai(),i=ca(),o=function(){return this};return Ka=function(u,a,f,c){var s=a+" Iterator";return u.prototype=t(r,{next:e(+!c,f)}),n(u,s,!1,!0),i[s]=o,u}}function af(){if(Za)return Xa;Za=1;var r=Fe(),t=y(),e=Xr(),n=Nt(),i=pr(),o=uf(),u=Hu(),a=Rn(),f=ai(),c=St(),s=Wt(),l=ot(),h=ca(),v=qu(),p=n.PROPER,d=n.CONFIGURABLE,g=v.IteratorPrototype,m=v.BUGGY_SAFARI_ITERATORS,w=l("iterator"),b="keys",E="values",S="entries",R=function(){return this};return Xa=function(n,l,v,y,A,O,x){o(v,l,y);var I,T,k,P=function(r){if(r===A&&M)return M;if(!m&&r&&r in U)return U[r];switch(r){case b:case E:case S:return function(){return new v(this,r)}}return function(){return new v(this)}},L=l+" Iterator",C=!1,U=n.prototype,D=U[w]||U["@@iterator"]||A&&U[A],M=!m&&D||P(A),j="Array"===l&&U.entries||D;if(j&&(I=u(j.call(new n)))!==Object.prototype&&I.next&&(e||u(I)===g||(a?a(I,g):i(I[w])||s(I,w,R)),f(I,L,!0,!0),e&&(h[L]=R)),p&&A===E&&D&&D.name!==E&&(!e&&d?c(U,"name",E):(C=!0,M=function(){return t(D,this)})),A)if(T={values:P(E),keys:O?M:P(b),entries:P(S)},x)for(k in T)(m||C||!(k in U))&&s(U,k,T[k]);else r({target:l,proto:!0,forced:m||C},T);return e&&!x||U[w]===M||s(U,w,M,{name:A}),h[l]=M,T}}function ff(){if(tf)return rf;tf=1;var r=vr(),t=of(),e=ca(),n=qt(),i=Et().f,o=af(),u=xa(),a=Xr(),f=d(),c="Array Iterator",s=n.set,l=n.getterFor(c);rf=o(Array,"Array",(function(t,e){s(this,{type:c,target:r(t),index:0,kind:e})}),(function(){var r=l(this),t=r.target,e=r.index++;if(!t||e>=t.length)return r.target=null,u(void 0,!0);switch(r.kind){case"keys":return u(e,!1);case"values":return u(t[e],!1)}return u([e,t[e]],!1)}),"values");var h=e.Arguments=e.Array;if(t("keys"),t("values"),t("entries"),!a&&f&&"values"!==h.name)try{i(h,"name",{value:"values"})}catch(v){}return rf}!function(){if(ef)return nf;ef=1;var r=i(),t=Wa?Va:(Wa=1,Va={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),e=function(){if(Ga)return $a;Ga=1;var r=ft()("span").classList,t=r&&r.constructor&&r.constructor.prototype;return $a=t===Object.prototype?void 0:t}(),n=ff(),o=St(),u=ai(),a=ot()("iterator"),f=n.values,c=function(r,e){if(r){if(r[a]!==f)try{o(r,a,f)}catch(c){r[a]=f}if(u(r,e,!0),t[e])for(var i in n)if(r[i]!==n[i])try{o(r,i,n[i])}catch(c){r[i]=n[i]}}};for(var s in t)c(r[s]&&r[s].prototype,s);c(e,"DOMTokenList")}();var cf,sf,lf,hf,vf,pf,df,gf,yf,mf,wf,bf={};function Ef(){if(sf)return cf;sf=1;var r=TypeError;return cf=function(t,e){if(ti,l=n(o)?o:c(o),h=s?a(arguments,i):[],v=s?function(){e(l,this,h)}:l;return t?r(v,u):r(v)}:r},xf}kf||(kf=1,function(){if(wf)return bf;wf=1;var r=Fe(),t=i(),e=Of().clear;r({global:!0,bind:!0,enumerable:!0,forced:t.clearImmediate!==e},{clearImmediate:e})}(),function(){if(Tf)return Pf;Tf=1;var r=Fe(),t=i(),e=Of().set,n=Lf(),o=t.setImmediate?n(e,!1):e;r({global:!0,bind:!0,enumerable:!0,forced:t.setImmediate!==o},{setImmediate:o})}());var Cf,Uf,Df,Mf,jf,_f,Bf,Nf,Ff,Hf,zf,qf={};function Vf(){if(Uf)return Cf;Uf=1;var r=i(),t=d(),e=Object.getOwnPropertyDescriptor;return Cf=function(n){if(!t)return r[n];var i=e(r,n);return i&&i.value}}function Wf(){if(Mf)return Df;Mf=1;var r=function(){this.head=null,this.tail=null};return r.prototype={add:function(r){var t={item:r,next:null},e=this.tail;e?e.next=t:this.head=t,this.tail=t},get:function(){var r=this.head;if(r)return null===(this.head=r.next)&&(this.tail=null),r.item}},Df=r}function $f(){if(Hf)return Ff;Hf=1;var r,t,e,n,o,u=i(),a=Vf(),f=fa(),c=Of().set,s=Wf(),l=Sf(),h=function(){if(_f)return jf;_f=1;var r=mr();return jf=/ipad|iphone|ipod/i.test(r)&&"undefined"!=typeof Pebble}(),v=function(){if(Nf)return Bf;Nf=1;var r=mr();return Bf=/web0s(?!.*chrome)/i.test(r)}(),p=Af(),d=u.MutationObserver||u.WebKitMutationObserver,g=u.document,y=u.process,m=u.Promise,w=a("queueMicrotask");if(!w){var b=new s,E=function(){var t,e;for(p&&(t=y.domain)&&t.exit();e=b.get();)try{e()}catch(n){throw b.head&&r(),n}t&&t.enter()};l||p||v||!d||!g?!h&&m&&m.resolve?((n=m.resolve(void 0)).constructor=m,o=f(n.then,n),r=function(){o(E)}):p?r=function(){y.nextTick(E)}:(c=f(c,u),r=function(){c(E)}):(t=!0,e=g.createTextNode(""),new d(E).observe(e,{characterData:!0}),r=function(){e.data=t=!t}),w=function(t){b.head||r(),b.add(t)}}return Ff=w}!function(){if(zf)return qf;zf=1;var r=Fe(),t=i(),e=$f(),n=Ar(),o=Ef(),u=p(),a=d();r({global:!0,enumerable:!0,dontCallGetSet:!0,forced:u((function(){return a&&1!==Object.getOwnPropertyDescriptor(t,"queueMicrotask").value.length}))},{queueMicrotask:function(r){o(arguments.length,1),e(n(r))}})}();var Gf,Yf={};!function(){if(Gf)return Yf;Gf=1;var r=Fe(),t=fr(),e=Fn(),n=t([].reverse),i=[1,2];r({target:"Array",proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return e(this)&&(this.length=this.length),n(this)}})}();var Jf,Kf,Qf,Xf,Zf,rc,tc,ec,nc,ic,oc,uc={};function ac(){if(Kf)return Jf;Kf=1;var r=ei(),t=Math.floor,e=function(n,i){var o=n.length;if(o<8)for(var u,a,f=1;f0;)n[a]=n[--a];a!==f++&&(n[a]=u)}else for(var c=t(o/2),s=e(r(n,0,c),i),l=e(r(n,c),i),h=s.length,v=l.length,p=0,d=0;p3)){if(l)return!0;if(v)return v<603;var r,t,e,n,i="";for(r=65;r<76;r++){switch(t=String.fromCharCode(r),r){case 66:case 69:case 70:case 72:e=3;break;case 68:case 71:e=4;break;default:e=2}for(n=0;n<47;n++)d.push({k:t+n,v:e})}for(d.sort((function(r,t){return t.v-r.v})),n=0;nu(e)?1:-1}}(r)),a=i(s),c=0;co||l!=l?c*(1/0):c*l}}function Mc(){if(Oc)return Ac;Oc=1;var r=Array,t=Math.abs,e=Math.pow,n=Math.floor,i=Math.log,o=Math.LN2;return Ac={pack:function(u,a,f){var c,s,l,h=r(f),v=8*f-a-1,p=(1<>1,g=23===a?e(2,-24)-e(2,-77):0,y=u<0||0===u&&1/u<0?1:0,m=0;for((u=t(u))!=u||u===1/0?(s=u!=u?1:0,c=p):(c=n(i(u)/o),u*(l=e(2,-c))<1&&(c--,l*=2),(u+=c+d>=1?g/l:g*e(2,1-d))*l>=2&&(c++,l/=2),c+d>=p?(s=0,c=p):c+d>=1?(s=(u*l-1)*e(2,a),c+=d):(s=u*e(2,d-1)*e(2,a),c=0));a>=8;)h[m++]=255&s,s/=256,a-=8;for(c=c<0;)h[m++]=255&c,c/=256,v-=8;return h[m-1]|=128*y,h},unpack:function(r,t){var n,i=r.length,o=8*i-t-1,u=(1<>1,f=o-7,c=i-1,s=r[c--],l=127&s;for(s>>=7;f>0;)l=256*l+r[c--],f-=8;for(n=l&(1<<-f)-1,l>>=-f,f+=t;f>0;)n=256*n+r[c--],f-=8;if(0===l)l=1-a;else{if(l===u)return n?NaN:s?-1/0:1/0;n+=e(2,t),l-=a}return(s?-1:1)*n*e(2,l-t)}}}function jc(){if(Ic)return xc;Ic=1;var r=et(),t=le(),e=ve();return xc=function(n){for(var i=r(this),o=e(i),u=arguments.length,a=t(u>1?arguments[1]:void 0,o),f=u>2?arguments[2]:void 0,c=void 0===f?o:t(f,o);c>a;)i[a++]=n;return i},xc}function _c(){if(kc)return Tc;kc=1;var r=i(),t=fr(),e=d(),n=Cc(),o=Nt(),u=St(),a=qe(),f=Oa(),c=p(),s=Fu(),l=se(),h=he(),v=Uc(),g=function(){if(Rc)return Sc;Rc=1;var r=Dc();return Sc=Math.fround||function(t){return r(t,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)}}(),y=Mc(),m=Hu(),w=Rn(),b=jc(),E=ei(),S=On(),R=Be(),A=ai(),O=qt(),x=o.PROPER,I=o.CONFIGURABLE,T="ArrayBuffer",k="DataView",P="prototype",L="Wrong index",C=O.getterFor(T),U=O.getterFor(k),D=O.set,M=r[T],j=M,_=j&&j[P],B=r[k],N=B&&B[P],F=Object.prototype,H=r.Array,z=r.RangeError,q=t(b),V=t([].reverse),W=y.pack,$=y.unpack,G=function(r){return[255&r]},Y=function(r){return[255&r,r>>8&255]},J=function(r){return[255&r,r>>8&255,r>>16&255,r>>24&255]},K=function(r){return r[3]<<24|r[2]<<16|r[1]<<8|r[0]},Q=function(r){return W(g(r),23,4)},X=function(r){return W(r,52,8)},Z=function(r,t,e){a(r[P],t,{configurable:!0,get:function(){return e(this)[t]}})},rr=function(r,t,e,n){var i=U(r),o=v(e),u=!!n;if(o+t>i.byteLength)throw new z(L);var a=i.bytes,f=o+i.byteOffset,c=E(a,f,f+t);return u?c:V(c)},tr=function(r,t,e,n,i,o){var u=U(r),a=v(e),f=n(+i),c=!!o;if(a+t>u.byteLength)throw new z(L);for(var s=u.bytes,l=a+u.byteOffset,h=0;h>24)},setUint8:function(r,t){ir(this,r,t<<24>>24)}},{unsafe:!0})}else _=(j=function(r){s(this,_);var t=v(r);D(this,{type:T,bytes:q(H(t),0),byteLength:t}),e||(this.byteLength=t,this.detached=!1)})[P],N=(B=function(r,t,n){s(this,N),s(r,_);var i=C(r),o=i.byteLength,u=l(t);if(u<0||u>o)throw new z("Wrong offset");if(u+(n=void 0===n?o-u:h(n))>o)throw new z("Wrong length");D(this,{type:k,buffer:r,byteLength:n,byteOffset:u,bytes:i.bytes}),e||(this.buffer=r,this.byteLength=n,this.byteOffset=u)})[P],e&&(Z(j,"byteLength",C),Z(B,"buffer",U),Z(B,"byteLength",U),Z(B,"byteOffset",U)),f(N,{getInt8:function(r){return rr(this,1,r)[0]<<24>>24},getUint8:function(r){return rr(this,1,r)[0]},getInt16:function(r){var t=rr(this,2,r,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(r){var t=rr(this,2,r,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(r){return K(rr(this,4,r,arguments.length>1&&arguments[1]))},getUint32:function(r){return K(rr(this,4,r,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(r){return $(rr(this,4,r,arguments.length>1&&arguments[1]),23)},getFloat64:function(r){return $(rr(this,8,r,arguments.length>1&&arguments[1]),52)},setInt8:function(r,t){tr(this,1,r,G,t)},setUint8:function(r,t){tr(this,1,r,G,t)},setInt16:function(r,t){tr(this,2,r,Y,t,arguments.length>2&&arguments[2])},setUint16:function(r,t){tr(this,2,r,Y,t,arguments.length>2&&arguments[2])},setInt32:function(r,t){tr(this,4,r,J,t,arguments.length>2&&arguments[2])},setUint32:function(r,t){tr(this,4,r,J,t,arguments.length>2&&arguments[2])},setFloat32:function(r,t){tr(this,4,r,Q,t,arguments.length>2&&arguments[2])},setFloat64:function(r,t){tr(this,8,r,X,t,arguments.length>2&&arguments[2])}});return A(j,T),A(B,k),Tc={ArrayBuffer:j,DataView:B}}!function(){if(Pc)return Lc;Pc=1;var r=Fe(),t=i(),e=_c(),n=Ni(),o="ArrayBuffer",u=e[o];r({global:!0,constructor:!0,forced:t[o]!==u},{ArrayBuffer:u}),n(o)}();var Bc,Nc={};!function(){if(Bc)return Nc;Bc=1;var r=Fe(),t=aa(),e=p(),n=_c(),i=bt(),o=le(),u=he(),a=n.ArrayBuffer,f=n.DataView,c=f.prototype,s=t(a.prototype.slice),l=t(c.getUint8),h=t(c.setUint8);r({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:e((function(){return!new a(2).slice(1,void 0).byteLength}))},{slice:function(r,t){if(s&&void 0===t)return s(i(this),r);for(var e=i(this).byteLength,n=o(r,e),c=o(void 0===t?e:t,e),v=new a(u(c-n)),p=new f(this),d=new f(v),g=0;n92||"NODE"===n&&e>94||"BROWSER"===n&&e>97)return!1;var r=new ArrayBuffer(8),t=o(r,{transfer:[r]});return 0!==r.byteLength||8!==t.byteLength}))}function fs(){if(ts)return rs;ts=1;var r,t,e,n,o=i(),u=us(),a=as(),f=o.structuredClone,c=o.ArrayBuffer,s=o.MessageChannel,l=!1;if(a)l=function(r){f(r,{transfer:[r]})};else if(c)try{s||(r=u("worker_threads"))&&(s=r.MessageChannel),s&&(t=new s,e=new c(2),n=function(r){t.port1.postMessage(null,[r])},2===e.byteLength&&(n(e),0===e.byteLength&&(l=n)))}catch(h){}return rs=l}function cs(){if(ns)return es;ns=1;var r=i(),t=fr(),e=bn(),n=Uc(),o=function(){if(Jc)return Yc;Jc=1;var r=Gc(),t=TypeError;return Yc=function(e){if(r(e))throw new t("ArrayBuffer is detached");return e}}(),u=$c(),a=fs(),f=as(),c=r.structuredClone,s=r.ArrayBuffer,l=r.DataView,h=Math.min,v=s.prototype,p=l.prototype,d=t(v.slice),g=e(v,"resizable","get"),y=e(v,"maxByteLength","get"),m=t(p.getInt8),w=t(p.setInt8);return es=(f||a)&&function(r,t,e){var i,v=u(r),p=void 0===t?v:n(t),b=!g||!g(r);if(o(r),f&&(r=c(r,{transfer:[r]}),v===p&&(e||b)))return r;if(v>=p&&(!e||b))i=d(r,0,p);else{var E=e&&!b&&y?{maxByteLength:y(r)}:void 0;i=new s(p,E);for(var S=new l(r),R=new l(i),A=h(p,v),O=0;O2?n:r(e),u=new t(o);o>i;)u[i]=e[i++];return u},gs}!function(){if(bs)return Es;bs=1;var r=Fe(),t=function(){if(ws)return ms;ws=1;var r=fa(),t=fr(),e=sr(),n=et(),i=at(),o=ve(),u=Di(),a=Ss(),f=Array,c=t([].push);return ms=function(t,s,l,h){for(var v,p,d,g=n(t),y=e(g),m=r(s,l),w=u(null),b=o(y),E=0;b>E;E++)d=y[E],(p=i(m(d,E,g)))in w?c(w[p],d):w[p]=[d];if(h&&(v=h(g))!==f)for(p in w)w[p]=a(v,w[p]);return w}}(),e=of();r({target:"Array",proto:!0},{group:function(r){return t(this,r,arguments.length>1?arguments[1]:void 0)}}),e("group")}();var Rs,As,Os={};As||(As=1,function(){if(Rs)return Os;Rs=1;var r=Fe(),t=va(),e=Ar(),n=bt(),i=Io();r({target:"Iterator",proto:!0,real:!0},{find:function(r){n(this),e(r);var o=i(this),u=0;return t(o,(function(t,e){if(r(t,u++))return e(t)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}})}());var xs,Is,Ts={};Is||(Is=1,function(){if(xs)return Ts;xs=1;var r=Fe(),t=bt(),e=va(),n=Io(),i=[].push;r({target:"Iterator",proto:!0,real:!0},{toArray:function(){var r=[];return e(n(t(this)),i,{that:r,IS_RECORD:!0}),r}})}());var ks,Ps={};!function(){if(ks)return Ps;ks=1;var r=Fe(),t=et(),e=ve(),n=se(),i=of();r({target:"Array",proto:!0},{at:function(r){var i=t(this),o=e(i),u=n(r),a=u>=0?u:o+u;return a<0||a>=o?void 0:i[a]}}),i("at")}();var Ls,Cs,Us,Ds,Ms,js,_s,Bs,Ns,Fs={};function Hs(){if(Ds)return Us;Ds=1;var r=fr(),t=p(),e=pr(),n=He(),i=gr(),o=Ft(),u=function(){},a=i("Reflect","construct"),f=/^\s*(?:class|function)\b/,c=r(f.exec),s=!f.test(u),l=function(r){if(!e(r))return!1;try{return a(u,[],r),!0}catch(t){return!1}},h=function(r){if(!e(r))return!1;switch(n(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return s||!!c(f,o(r))}catch(t){return!0}};return h.sham=!0,Us=!a||t((function(){var r;return l(l.call)||!l(Object)||!l((function(){r=!0}))||r}))?h:l}function zs(){if(js)return Ms;js=1;var r=Fn(),t=Hs(),e=dr(),n=ot()("species"),i=Array;return Ms=function(o){var u;return r(o)&&(u=o.constructor,(t(u)&&(u===i||r(u.prototype))||e(u)&&null===(u=u[n]))&&(u=void 0)),void 0===u?i:u}}function qs(){if(Bs)return _s;Bs=1;var r=zs();return _s=function(t,e){return new(r(t))(0===e?0:e)}}!function(){if(Ns)return Fs;Ns=1;var r=Fe(),t=function(){if(Cs)return Ls;Cs=1;var r=Fn(),t=ve(),e=zn(),n=fa(),i=function(o,u,a,f,c,s,l,h){for(var v,p,d=c,g=0,y=!!l&&n(l,h);g0&&r(v)?(p=t(v),d=i(o,u,v,p,d,s-1)-1):(e(d+1),o[d]=v),d++),g++;return d};return Ls=i}(),e=et(),n=ve(),i=se(),o=qs();r({target:"Array",proto:!0},{flat:function(){var r=arguments.length?arguments[0]:void 0,u=e(this),a=n(u),f=o(u,0);return f.length=t(f,u,u,a,0,void 0===r?1:i(r)),f}})}();var Vs;Vs||(Vs=1,of()("flat"));var Ws,$s,Gs,Ys,Js,Ks,Qs,Xs,Zs,rl,tl,el,nl={},il={};function ol(){if(Ws)return il;Ws=1;var r=Ar(),t=TypeError,e=function(e){var n,i;this.promise=new e((function(r,e){if(void 0!==n||void 0!==i)throw new t("Bad Promise constructor");n=r,i=e})),this.resolve=r(n),this.reject=r(i)};return il.f=function(r){return new e(r)},il}function ul(){return Gs?$s:(Gs=1,$s=function(r){try{return{error:!1,value:r()}}catch(t){return{error:!0,value:t}}})}function al(){if(Js)return Ys;Js=1;var r=i();return Ys=r.Promise}function fl(){if(Qs)return Ks;Qs=1;var r=ot()("iterator"),t=!1;try{var e=0,n={next:function(){return{done:!!e++}},return:function(){t=!0}};n[r]=function(){return this},Array.from(n,(function(){throw 2}))}catch(i){}return Ks=function(e,n){try{if(!n&&!t)return!1}catch(i){return!1}var o=!1;try{var u={};u[r]=function(){return{next:function(){return{done:o=!0}}}},e(u)}catch(i){}return o}}function cl(){if(tl)return rl;tl=1;var r=al(),t=fl(),e=function(){if(Zs)return Xs;Zs=1;var r=i(),t=al(),e=pr(),n=Ne(),o=Ft(),u=ot(),a=Rf(),f=Xr(),c=wr(),s=t&&t.prototype,l=u("species"),h=!1,v=e(r.PromiseRejectionEvent),p=n("Promise",(function(){var r=o(t),e=r!==String(t);if(!e&&66===c)return!0;if(f&&(!s.catch||!s.finally))return!0;if(!c||c<51||!/native code/.test(r)){var n=new t((function(r){r(1)})),i=function(r){r((function(){}),(function(){}))};if((n.constructor={})[l]=i,!(h=n.then((function(){}))instanceof i))return!0}return!(e||"BROWSER"!==a&&"DENO"!==a||v)}));return Xs={CONSTRUCTOR:p,REJECTION_EVENT:v,SUBCLASSING:h}}().CONSTRUCTOR;return rl=e||!t((function(t){r.all(t).then(void 0,(function(){}))}))}!function(){if(el)return nl;el=1;var r=Fe(),t=y(),e=Ar(),n=ol(),i=ul(),o=va();r({target:"Promise",stat:!0,forced:cl()},{allSettled:function(r){var u=this,a=n.f(u),f=a.resolve,c=a.reject,s=i((function(){var n=e(u.resolve),i=[],a=0,c=1;o(r,(function(r){var e=a++,o=!1;c++,t(n,u,r).then((function(r){o||(o=!0,i[e]={status:"fulfilled",value:r},--c||f(i))}),(function(r){o||(o=!0,i[e]={status:"rejected",reason:r},--c||f(i))}))})),--c||f(i)}));return s.error&&c(s.value),a.promise}})}();var sl,ll={};!function(){if(sl)return ll;sl=1;var r=Fe(),t=fr(),e=hr(),n=se(),i=ze(),o=p(),u=t("".charAt);r({target:"String",proto:!0,forced:o((function(){return"\ud842"!=="𠮷".at(-2)}))},{at:function(r){var t=i(e(this)),o=t.length,a=n(r),f=a>=0?a:o+a;return f<0||f>=o?void 0:u(t,f)}})}();var hl,vl={};!function(){if(hl)return vl;hl=1;var r=Fe(),t=y(),e=fr(),n=hr(),i=pr(),o=lr(),u=Mi(),a=ze(),f=Or(),c=_i(),s=yu(),l=ot(),h=Xr(),v=l("replace"),p=TypeError,d=e("".indexOf),g=e("".replace),m=e("".slice),w=Math.max;r({target:"String",proto:!0},{replaceAll:function(r,e){var l,y,b,E,S,R,A,O,x,I,T=n(this),k=0,P="";if(!o(r)){if((l=u(r))&&(y=a(n(c(r))),!~d(y,"g")))throw new p("`.replaceAll` does not allow non-global regexes");if(b=f(r,v))return t(b,r,T,e);if(h&&l)return g(a(T),r,e)}for(E=a(T),S=a(r),(R=i(e))||(e=a(e)),A=S.length,O=w(1,A),x=d(E,S);-1!==x;)I=R?a(e(S,x,E)):s(S,E,x,[],void 0,e),P+=m(E,k,x)+I,k=x+A,x=x+O>E.length?-1:d(E,S,x+O);return k255?255:255&e}}function Vl(){if(Il)return xl;Il=1;var r=Hs(),t=Rr(),e=TypeError;return xl=function(n){if(r(n))return n;throw new e(t(n)+" is not a constructor")}}function Wl(){if(kl)return Tl;kl=1;var r=He();return Tl=function(t){var e=r(t);return"BigInt64Array"===e||"BigUint64Array"===e}}function $l(){if(Ll)return Pl;Ll=1;var r=ut(),t=TypeError;return Pl=function(e){var n=r(e,"number");if("number"==typeof n)throw new t("Can't convert number to bigint");return BigInt(n)}}function Gl(){if(Ul)return Cl;Ul=1;var r=fa(),t=y(),e=Vl(),n=et(),i=ve(),o=ha(),u=la(),a=sa(),f=Wl(),c=Nl().aTypedArrayConstructor,s=$l();return Cl=function(l){var h,v,p,d,g,y,m,w,b=e(this),E=n(l),S=arguments.length,R=S>1?arguments[1]:void 0,A=void 0!==R,O=u(E);if(O&&!a(O))for(w=(m=o(E,O)).next,E=[];!(y=t(w,m)).done;)E.push(y.value);for(A&&S>2&&(R=r(R,arguments[2])),v=i(E),p=new(c(b))(v),d=f(p),h=0;v>h;h++)g=A?R(E[h],h):E[h],p[h]=d?s(g):+g;return p},Cl}function Yl(){if(jl)return Bl.exports;jl=1;var r=Fe(),t=i(),e=y(),n=d(),o=function(){if(yl)return gl;yl=1;var r=i(),t=p(),e=fl(),n=Nl().NATIVE_ARRAY_BUFFER_VIEWS,o=r.ArrayBuffer,u=r.Int8Array;return gl=!n||!t((function(){u(1)}))||!t((function(){new u(-1)}))||!e((function(r){new u,new u(null),new u(1.5),new u(r)}),!0)||t((function(){return 1!==new u(new o(2),1,void 0).length}))}(),u=Nl(),a=_c(),f=Fu(),c=ar(),s=St(),l=Fl(),h=he(),v=Uc(),g=zl(),m=ql(),w=at(),b=nt(),E=He(),S=dr(),R=Sr(),A=Di(),O=yr(),x=Rn(),I=ge().f,T=Gl(),k=function(){if(Ml)return Dl;Ml=1;var r=fa(),t=fr(),e=sr(),n=et(),i=ve(),o=qs(),u=t([].push),a=function(t){var a=1===t,f=2===t,c=3===t,s=4===t,l=6===t,h=7===t,v=5===t||l;return function(p,d,g,y){for(var m,w,b=n(p),E=e(b),S=i(E),R=r(d,g),A=0,O=y||o,x=a?O(p,S):f||h?O(p,0):void 0;S>A;A++)if((v||A in E)&&(w=R(m=E[A],A,b),t))if(a)x[A]=w;else if(w)switch(t){case 3:return!0;case 5:return m;case 6:return A;case 2:u(x,m)}else switch(t){case 4:return!1;case 7:u(x,m)}return l?-1:c||s?s:x}};return Dl={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)}}().forEach,P=Ni(),L=qe(),C=Et(),U=st(),D=Ss(),M=qt(),j=On(),_=M.get,B=M.set,N=M.enforce,F=C.f,H=U.f,z=t.RangeError,q=a.ArrayBuffer,V=q.prototype,W=a.DataView,$=u.NATIVE_ARRAY_BUFFER_VIEWS,G=u.TYPED_ARRAY_TAG,Y=u.TypedArray,J=u.TypedArrayPrototype,K=u.isTypedArray,Q="BYTES_PER_ELEMENT",X="Wrong length",Z=function(r,t){L(r,t,{configurable:!0,get:function(){return _(this)[t]}})},rr=function(r){var t;return O(V,r)||"ArrayBuffer"===(t=E(r))||"SharedArrayBuffer"===t},tr=function(r,t){return K(r)&&!R(t)&&t in r&&l(+t)&&t>=0},er=function(r,t){return t=w(t),tr(r,t)?c(2,r[t]):H(r,t)},nr=function(r,t,e){return t=w(t),!(tr(r,t)&&S(e)&&b(e,"value"))||b(e,"get")||b(e,"set")||e.configurable||b(e,"writable")&&!e.writable||b(e,"enumerable")&&!e.enumerable?F(r,t,e):(r[t]=e.value,r)};return n?($||(U.f=er,C.f=nr,Z(J,"buffer"),Z(J,"byteOffset"),Z(J,"byteLength"),Z(J,"length")),r({target:"Object",stat:!0,forced:!$},{getOwnPropertyDescriptor:er,defineProperty:nr}),Bl.exports=function(n,i,u){var a=n.match(/\d+/)[0]/8,c=n+(u?"Clamped":"")+"Array",l="get"+n,p="set"+n,d=t[c],y=d,w=y&&y.prototype,b={},E=function(r,t){F(r,t,{get:function(){return function(r,t){var e=_(r);return e.view[l](t*a+e.byteOffset,!0)}(this,t)},set:function(r){return function(r,t,e){var n=_(r);n.view[p](t*a+n.byteOffset,u?m(e):e,!0)}(this,t,r)},enumerable:!0})};$?o&&(y=i((function(r,t,n,i){return f(r,w),j(S(t)?rr(t)?void 0!==i?new d(t,g(n,a),i):void 0!==n?new d(t,g(n,a)):new d(t):K(t)?D(y,t):e(T,y,t):new d(v(t)),r,y)})),x&&x(y,Y),k(I(d),(function(r){r in y||s(y,r,d[r])})),y.prototype=w):(y=i((function(r,t,n,i){f(r,w);var o,u,c,s=0,l=0;if(S(t)){if(!rr(t))return K(t)?D(y,t):e(T,y,t);o=t,l=g(n,a);var p=t.byteLength;if(void 0===i){if(p%a)throw new z(X);if((u=p-l)<0)throw new z(X)}else if((u=h(i)*a)+l>p)throw new z(X);c=u/a}else c=v(t),o=new q(u=c*a);for(B(r,{buffer:o,byteOffset:l,byteLength:u,length:c,view:new W(o)});s=0?u:o+u;return a<0||a>=o?void 0:i[a]}))}();var Ql,Xl={};!function(){if(Ql)return Xl;Ql=1;var r=Nl(),t=jc(),e=$l(),n=He(),i=y(),o=fr(),u=p(),a=r.aTypedArray,f=r.exportTypedArrayMethod,c=o("".slice);f("fill",(function(r){var o=arguments.length;a(this);var u="Big"===c(n(this),0,3)?e(r):+r;return i(t,this,u,o>1?arguments[1]:void 0,o>2?arguments[2]:void 0)}),u((function(){var r=0;return new Int8Array(2).fill({valueOf:function(){return r++}}),1!==r})))}();var Zl,rh,th,eh={};function nh(){if(rh)return Zl;rh=1;var r=fa(),t=sr(),e=et(),n=ve(),i=function(i){var o=1===i;return function(u,a,f){for(var c,s=e(u),l=t(s),h=n(l),v=r(a,f);h-- >0;)if(v(c=l[h],h,s))switch(i){case 0:return c;case 1:return h}return o?-1:void 0}};return Zl={findLast:i(0),findLastIndex:i(1)}}!function(){if(th)return eh;th=1;var r=Nl(),t=nh().findLast,e=r.aTypedArray;(0,r.exportTypedArrayMethod)("findLast",(function(r){return t(e(this),r,arguments.length>1?arguments[1]:void 0)}))}();var ih,oh={};!function(){if(ih)return oh;ih=1;var r=Nl(),t=nh().findLastIndex,e=r.aTypedArray;(0,r.exportTypedArrayMethod)("findLastIndex",(function(r){return t(e(this),r,arguments.length>1?arguments[1]:void 0)}))}();var uh,ah={};!function(){if(uh)return ah;uh=1;var r=i(),t=y(),e=Nl(),n=ve(),o=zl(),u=et(),a=p(),f=r.RangeError,c=r.Int8Array,s=c&&c.prototype,l=s&&s.set,h=e.aTypedArray,v=e.exportTypedArrayMethod,d=!a((function(){var r=new Uint8ClampedArray(2);return t(l,r,{length:1,0:3},1),3!==r[1]})),g=d&&e.NATIVE_ARRAY_BUFFER_VIEWS&&a((function(){var r=new c(2);return r.set(1),r.set("2",1),0!==r[0]||2!==r[1]}));v("set",(function(r){h(this);var e=o(arguments.length>1?arguments[1]:void 0,1),i=u(r);if(d)return t(l,this,i,e);var a=this.length,c=n(i),s=0;if(c+e>a)throw new f("Wrong length");for(;s0&&1/e<0?1:-1:t>e}}(r))}),!y||g)}();var sh,lh,hh,vh={};function ph(){if(lh)return sh;lh=1;var r=ve();return sh=function(t,e){for(var n=r(t),i=new e(n),o=0;o=a||c<0)throw new e("Incorrect index");for(var s=new i(a),l=0;l1&&!l(arguments[1])?g(arguments[1]):void 0,o=i?i.transfer:void 0;void 0!==o&&(e=function(r,t){if(!h(r))throw new D("Transfer option cannot be converted to a sequence");var e=[];d(r,(function(r){W(e,g(r))}));for(var i,o,u,a,f,l=0,v=E(e),p=new H;l1?arguments[1]:void 0,g=void 0!==d;g&&(d=r(d,p>2?arguments[2]:void 0));var y,m,w,b,E,S,R=c(h),A=0;if(!R||this===s&&i(R))for(y=u(h),m=v?new this(y):s(y);y>A;A++)S=g?d(h[A],A):h[A],a(m,A,S);else for(m=v?new this:[],E=(b=f(h,R)).next;!(w=t(E,b)).done;A++)S=g?n(b,d,[w.value,A],!0):w.value,a(m,A,S);return m.length=A,m},Jh}function nv(){if(Xh)return Qh;Xh=1;var r=fr(),t=2147483647,e=/[^\0-\u007E]/,n=/[.\u3002\uFF0E\uFF61]/g,i="Overflow: input needs wider integers to process",o=RangeError,u=r(n.exec),a=Math.floor,f=String.fromCharCode,c=r("".charCodeAt),s=r([].join),l=r([].push),h=r("".replace),v=r("".split),p=r("".toLowerCase),d=function(r){return r+22+75*(r<26)},g=function(r,t,e){var n=0;for(r=e?a(r/700):r>>1,r+=a(r/t);r>455;)r=a(r/35),n+=36;return a(n+36*r/(r+38))},y=function(r){var e=[];r=function(r){for(var t=[],e=0,n=r.length;e=55296&&i<=56319&&e=v&&ua((t-p)/E))throw new o(i);for(p+=(b-v)*E,v=b,n=0;nt)throw new o(i);if(u===v){for(var S=p,R=36;;){var A=R<=y?1:R>=y+26?26:R-y;if(Sf;){if(t=+arguments[f++],e(t,1114111)!==t)throw new n(t+" is not a valid code point");o[f]=t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320)}return u(o,"")}})}();var r=Fe(),t=i(),e=Vf(),n=gr(),o=y(),u=fr(),a=d(),f=tv(),c=Wt(),s=qe(),l=Oa(),h=ai(),v=uf(),p=qt(),g=Fu(),m=pr(),w=nt(),b=fa(),E=He(),S=bt(),R=dr(),A=ze(),O=Di(),x=ar(),I=ha(),T=la(),k=xa(),P=Ef(),L=ot(),C=ac(),U=L("iterator"),D="URLSearchParams",M=D+"Iterator",j=p.set,_=p.getterFor(D),B=p.getterFor(M),N=e("fetch"),F=e("Request"),H=e("Headers"),z=F&&F.prototype,q=H&&H.prototype,V=t.TypeError,W=t.encodeURIComponent,$=String.fromCharCode,G=n("String","fromCodePoint"),Y=parseInt,J=u("".charAt),K=u([].join),Q=u([].push),X=u("".replace),Z=u([].shift),rr=u([].splice),tr=u("".split),er=u("".slice),nr=u(/./.exec),ir=/\+/g,or=/^[0-9a-f]+$/i,ur=function(r,t){var e=er(r,t,t+2);return nr(or,e)?Y(e,16):NaN},cr=function(r){for(var t=0,e=128;e>0&&0!=(r&e);e>>=1)t++;return t},sr=function(r){var t=null;switch(r.length){case 1:t=r[0];break;case 2:t=(31&r[0])<<6|63&r[1];break;case 3:t=(15&r[0])<<12|(63&r[1])<<6|63&r[2];break;case 4:t=(7&r[0])<<18|(63&r[1])<<12|(63&r[2])<<6|63&r[3]}return t>1114111?null:t},lr=function(r){for(var t=(r=X(r,ir," ")).length,e="",n=0;nt){e+="%",n++;continue}var o=ur(r,n+1);if(o!=o){e+=i,n++;continue}n+=2;var u=cr(o);if(0===u)i=$(o);else{if(1===u||u>4){e+="�",n++;continue}for(var a=[o],f=1;ft||"%"!==J(r,n));){var c=ur(r,n+1);if(c!=c){n+=3;break}if(c>191||c<128)break;Q(a,c),n+=2,f++}if(a.length!==u){e+="�";continue}var s=sr(a);null===s?e+="�":i=G(s)}}e+=i,n++}return e},hr=/[!'()~]|%20/g,vr={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},yr=function(r){return vr[r]},mr=function(r){return X(W(r),hr,yr)},wr=v((function(r,t){j(this,{type:M,target:_(r).entries,index:0,kind:t})}),D,(function(){var r=B(this),t=r.target,e=r.index++;if(!t||e>=t.length)return r.target=null,k(void 0,!0);var n=t[e];switch(r.kind){case"keys":return k(n.key,!1);case"values":return k(n.value,!1)}return k([n.key,n.value],!1)}),!0),br=function(r){this.entries=[],this.url=null,void 0!==r&&(R(r)?this.parseObject(r):this.parseQuery("string"==typeof r?"?"===J(r,0)?er(r,1):r:A(r)))};br.prototype={type:D,bindURL:function(r){this.url=r,this.update()},parseObject:function(r){var t,e,n,i,u,a,f,c=this.entries,s=T(r);if(s)for(e=(t=I(r,s)).next;!(n=o(e,t)).done;){if(u=(i=I(S(n.value))).next,(a=o(u,i)).done||(f=o(u,i)).done||!o(u,i).done)throw new V("Expected sequence with length 2");Q(c,{key:A(a.value),value:A(f.value)})}else for(var l in r)w(r,l)&&Q(c,{key:l,value:A(r[l])})},parseQuery:function(r){if(r)for(var t,e,n=this.entries,i=tr(r,"&"),o=0;o0?arguments[0]:void 0));a||(this.size=r.entries.length)},Sr=Er.prototype;if(l(Sr,{append:function(r,t){var e=_(this);P(arguments.length,2),Q(e.entries,{key:A(r),value:A(t)}),a||this.length++,e.updateURL()},delete:function(r){for(var t=_(this),e=P(arguments.length,1),n=t.entries,i=A(r),o=e<2?void 0:arguments[1],u=void 0===o?o:A(o),f=0;ft.key?1:-1})),r.updateURL()},forEach:function(r){for(var t,e=_(this).entries,n=b(r,arguments.length>1?arguments[1]:void 0),i=0;i1?Or(arguments[1]):{})}}),m(F)){var xr=function(r){return g(this,z),new F(r,arguments.length>1?Or(arguments[1]):{})};z.constructor=xr,xr.prototype=z,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:xr})}}return ov={URLSearchParams:Er,getState:_}}function lv(){if(av)return Zh;av=1,function(){if(Vh)return rv;Vh=1;var r=du().charAt,t=ze(),e=qt(),n=af(),i=xa(),o="String Iterator",u=e.set,a=e.getterFor(o);n(String,"String",(function(r){u(this,{type:o,string:t(r),index:0})}),(function(){var t,e=a(this),n=e.string,o=e.index;return o>=n.length?i(void 0,!0):(t=r(n,o),e.index+=t.length,i(t,!1))}))}();var r,t=Fe(),e=d(),n=tv(),o=i(),u=fa(),a=fr(),f=Wt(),c=qe(),s=Fu(),l=nt(),h=function(){if(Yh)return Gh;Yh=1;var r=d(),t=fr(),e=y(),n=p(),i=Ci(),o=je(),u=ur(),a=et(),f=sr(),c=Object.assign,s=Object.defineProperty,l=t([].concat);return Gh=!c||n((function(){if(r&&1!==c({b:1},c(s({},"a",{enumerable:!0,get:function(){s(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(r){e[r]=r})),7!==c({},t)[n]||i(c({},e)).join("")!==o}))?function(t,n){for(var c=a(t),s=arguments.length,h=1,v=o.f,p=u.f;s>h;)for(var d,g=f(arguments[h++]),y=v?l(i(g),v(g)):i(g),m=y.length,w=0;m>w;)d=y[w++],r&&!e(p,g,d)||(c[d]=g[d]);return c}:c,Gh}(),v=ev(),g=ei(),m=du().codeAt,w=nv(),b=ze(),E=ai(),S=Ef(),R=sv(),A=qt(),O=A.set,x=A.getterFor("URL"),I=R.URLSearchParams,T=R.getState,k=o.URL,P=o.TypeError,L=o.parseInt,C=Math.floor,U=Math.pow,D=a("".charAt),M=a(/./.exec),j=a([].join),_=a(1..toString),B=a([].pop),N=a([].push),F=a("".replace),H=a([].shift),z=a("".split),q=a("".slice),V=a("".toLowerCase),W=a([].unshift),$="Invalid scheme",G="Invalid host",Y="Invalid port",J=/[a-z]/i,K=/[\d+-.a-z]/i,Q=/\d/,X=/^0x/i,Z=/^[0-7]+$/,rr=/^\d+$/,tr=/^[\da-f]+$/i,er=/[\0\t\n\r #%/:<>?@[\\\]^|]/,nr=/[\0\t\n\r #/:<>?@[\\\]^|]/,ir=/^[\u0000-\u0020]+/,or=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ar=/[\t\n\r]/g,cr=function(r){var t,e,n,i;if("number"==typeof r){for(t=[],e=0;e<4;e++)W(t,r%256),r=C(r/256);return j(t,".")}if("object"==typeof r){for(t="",n=function(r){for(var t=null,e=1,n=null,i=0,o=0;o<8;o++)0!==r[o]?(i>e&&(t=n,e=i),n=null,i=0):(null===n&&(n=o),++i);return i>e?n:t}(r),e=0;e<8;e++)i&&0===r[e]||(i&&(i=!1),n===e?(t+=e?":":"::",i=!0):(t+=_(r[e],16),e<7&&(t+=":")));return"["+t+"]"}return r},lr={},hr=h({},lr,{" ":1,'"':1,"<":1,">":1,"`":1}),vr=h({},hr,{"#":1,"?":1,"{":1,"}":1}),pr=h({},vr,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),dr=function(r,t){var e=m(r,0);return e>32&&e<127&&!l(t,r)?r:encodeURIComponent(r)},gr={ftp:21,file:null,http:80,https:443,ws:80,wss:443},yr=function(r,t){var e;return 2===r.length&&M(J,D(r,0))&&(":"===(e=D(r,1))||!t&&"|"===e)},mr=function(r){var t;return r.length>1&&yr(q(r,0,2))&&(2===r.length||"/"===(t=D(r,2))||"\\"===t||"?"===t||"#"===t)},wr=function(r){return"."===r||"%2e"===V(r)},br={},Er={},Sr={},Rr={},Ar={},Or={},xr={},Ir={},Tr={},kr={},Pr={},Lr={},Cr={},Ur={},Dr={},Mr={},jr={},_r={},Br={},Nr={},Fr={},Hr=function(r,t,e){var n,i,o,u=b(r);if(t){if(i=this.parse(u))throw new P(i);this.searchParams=null}else{if(void 0!==e&&(n=new Hr(e,!0)),i=this.parse(u,null,n))throw new P(i);(o=T(new I)).bindURL(this),this.searchParams=o}};Hr.prototype={type:"URL",parse:function(t,e,n){var i,o,u,a,f,c=this,s=e||br,h=0,p="",d=!1,y=!1,m=!1;for(t=b(t),e||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,t=F(t,ir,""),t=F(t,or,"$1")),t=F(t,ar,""),i=v(t);h<=i.length;){switch(o=i[h],s){case br:if(!o||!M(J,o)){if(e)return $;s=Sr;continue}p+=V(o),s=Er;break;case Er:if(o&&(M(K,o)||"+"===o||"-"===o||"."===o))p+=V(o);else{if(":"!==o){if(e)return $;p="",s=Sr,h=0;continue}if(e&&(c.isSpecial()!==l(gr,p)||"file"===p&&(c.includesCredentials()||null!==c.port)||"file"===c.scheme&&!c.host))return;if(c.scheme=p,e)return void(c.isSpecial()&&gr[c.scheme]===c.port&&(c.port=null));p="","file"===c.scheme?s=Ur:c.isSpecial()&&n&&n.scheme===c.scheme?s=Rr:c.isSpecial()?s=Ir:"/"===i[h+1]?(s=Ar,h++):(c.cannotBeABaseURL=!0,N(c.path,""),s=Br)}break;case Sr:if(!n||n.cannotBeABaseURL&&"#"!==o)return $;if(n.cannotBeABaseURL&&"#"===o){c.scheme=n.scheme,c.path=g(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,s=Fr;break}s="file"===n.scheme?Ur:Or;continue;case Rr:if("/"!==o||"/"!==i[h+1]){s=Or;continue}s=Tr,h++;break;case Ar:if("/"===o){s=kr;break}s=_r;continue;case Or:if(c.scheme=n.scheme,o===r)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.query=n.query;else if("/"===o||"\\"===o&&c.isSpecial())s=xr;else if("?"===o)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.query="",s=Nr;else{if("#"!==o){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.path.length--,s=_r;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.query=n.query,c.fragment="",s=Fr}break;case xr:if(!c.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,s=_r;continue}s=kr}else s=Tr;break;case Ir:if(s=Tr,"/"!==o||"/"!==D(p,h+1))continue;h++;break;case Tr:if("/"!==o&&"\\"!==o){s=kr;continue}break;case kr:if("@"===o){d&&(p="%40"+p),d=!0,u=v(p);for(var w=0;w65535)return Y;c.port=c.isSpecial()&&R===gr[c.scheme]?null:R,p=""}if(e)return;s=jr;continue}return Y}p+=o;break;case Ur:if(c.scheme="file","/"===o||"\\"===o)s=Dr;else{if(!n||"file"!==n.scheme){s=_r;continue}switch(o){case r:c.host=n.host,c.path=g(n.path),c.query=n.query;break;case"?":c.host=n.host,c.path=g(n.path),c.query="",s=Nr;break;case"#":c.host=n.host,c.path=g(n.path),c.query=n.query,c.fragment="",s=Fr;break;default:mr(j(g(i,h),""))||(c.host=n.host,c.path=g(n.path),c.shortenPath()),s=_r;continue}}break;case Dr:if("/"===o||"\\"===o){s=Mr;break}n&&"file"===n.scheme&&!mr(j(g(i,h),""))&&(yr(n.path[0],!0)?N(c.path,n.path[0]):c.host=n.host),s=_r;continue;case Mr:if(o===r||"/"===o||"\\"===o||"?"===o||"#"===o){if(!e&&yr(p))s=_r;else if(""===p){if(c.host="",e)return;s=jr}else{if(a=c.parseHost(p))return a;if("localhost"===c.host&&(c.host=""),e)return;p="",s=jr}continue}p+=o;break;case jr:if(c.isSpecial()){if(s=_r,"/"!==o&&"\\"!==o)continue}else if(e||"?"!==o)if(e||"#"!==o){if(o!==r&&(s=_r,"/"!==o))continue}else c.fragment="",s=Fr;else c.query="",s=Nr;break;case _r:if(o===r||"/"===o||"\\"===o&&c.isSpecial()||!e&&("?"===o||"#"===o)){if(".."===(f=V(f=p))||"%2e."===f||".%2e"===f||"%2e%2e"===f?(c.shortenPath(),"/"===o||"\\"===o&&c.isSpecial()||N(c.path,"")):wr(p)?"/"===o||"\\"===o&&c.isSpecial()||N(c.path,""):("file"===c.scheme&&!c.path.length&&yr(p)&&(c.host&&(c.host=""),p=D(p,0)+":"),N(c.path,p)),p="","file"===c.scheme&&(o===r||"?"===o||"#"===o))for(;c.path.length>1&&""===c.path[0];)H(c.path);"?"===o?(c.query="",s=Nr):"#"===o&&(c.fragment="",s=Fr)}else p+=dr(o,vr);break;case Br:"?"===o?(c.query="",s=Nr):"#"===o?(c.fragment="",s=Fr):o!==r&&(c.path[0]+=dr(o,lr));break;case Nr:e||"#"!==o?o!==r&&("'"===o&&c.isSpecial()?c.query+="%27":c.query+="#"===o?"%23":dr(o,lr)):(c.fragment="",s=Fr);break;case Fr:o!==r&&(c.fragment+=dr(o,hr))}h++}},parseHost:function(r){var t,e,n;if("["===D(r,0)){if("]"!==D(r,r.length-1))return G;if(t=function(r){var t,e,n,i,o,u,a,f=[0,0,0,0,0,0,0,0],c=0,s=null,l=0,h=function(){return D(r,l)};if(":"===h()){if(":"!==D(r,1))return;l+=2,s=++c}for(;h();){if(8===c)return;if(":"!==h()){for(t=e=0;e<4&&M(tr,h());)t=16*t+L(h(),16),l++,e++;if("."===h()){if(0===e)return;if(l-=e,c>6)return;for(n=0;h();){if(i=null,n>0){if(!("."===h()&&n<4))return;l++}if(!M(Q,h()))return;for(;M(Q,h());){if(o=L(h(),10),null===i)i=o;else{if(0===i)return;i=10*i+o}if(i>255)return;l++}f[c]=256*f[c]+i,2!=++n&&4!==n||c++}if(4!==n)return;break}if(":"===h()){if(l++,!h())return}else if(h())return;f[c++]=t}else{if(null!==s)return;l++,s=++c}}if(null!==s)for(u=c-s,c=7;0!==c&&u>0;)a=f[c],f[c--]=f[s+u-1],f[s+--u]=a;else if(8!==c)return;return f}(q(r,1,-1)),!t)return G;this.host=t}else if(this.isSpecial()){if(r=w(r),M(er,r))return G;if(t=function(r){var t,e,n,i,o,u,a,f=z(r,".");if(f.length&&""===f[f.length-1]&&f.length--,(t=f.length)>4)return r;for(e=[],n=0;n1&&"0"===D(i,0)&&(o=M(X,i)?16:8,i=q(i,8===o?1:2)),""===i)u=0;else{if(!M(10===o?rr:8===o?Z:tr,i))return r;u=L(i,o)}N(e,u)}for(n=0;n=U(256,5-t))return null}else if(u>255)return null;for(a=B(e),n=0;n1?arguments[1]:void 0,i=O(t,new Hr(r,!1,n));e||(t.href=i.serialize(),t.origin=i.getOrigin(),t.protocol=i.getProtocol(),t.username=i.getUsername(),t.password=i.getPassword(),t.host=i.getHost(),t.hostname=i.getHostname(),t.port=i.getPort(),t.pathname=i.getPathname(),t.search=i.getSearch(),t.searchParams=i.getSearchParams(),t.hash=i.getHash())},qr=zr.prototype,Vr=function(r,t){return{get:function(){return x(this)[r]()},set:t&&function(r){return x(this)[t](r)},configurable:!0,enumerable:!0}};if(e&&(c(qr,"href",Vr("serialize","setHref")),c(qr,"origin",Vr("getOrigin")),c(qr,"protocol",Vr("getProtocol","setProtocol")),c(qr,"username",Vr("getUsername","setUsername")),c(qr,"password",Vr("getPassword","setPassword")),c(qr,"host",Vr("getHost","setHost")),c(qr,"hostname",Vr("getHostname","setHostname")),c(qr,"port",Vr("getPort","setPort")),c(qr,"pathname",Vr("getPathname","setPathname")),c(qr,"search",Vr("getSearch","setSearch")),c(qr,"searchParams",Vr("getSearchParams")),c(qr,"hash",Vr("getHash","setHash"))),f(qr,"toJSON",(function(){return x(this).serialize()}),{enumerable:!0}),f(qr,"toString",(function(){return x(this).serialize()}),{enumerable:!0}),k){var Wr=k.createObjectURL,$r=k.revokeObjectURL;Wr&&f(zr,"createObjectURL",u(Wr,k)),$r&&f(zr,"revokeObjectURL",u($r,k))}return E(zr,"URL"),t({global:!0,constructor:!0,forced:!n,sham:!e},{URL:zr}),Zh}fv||(fv=1,lv());var hv,vv={};!function(){if(hv)return vv;hv=1;var r=Fe(),t=y();r({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return t(URL.prototype.toString,this)}})}();var pv;pv||(pv=1,sv());var dv,gv={};!function(){if(dv)return gv;dv=1;var r=Wt(),t=fr(),e=ze(),n=Ef(),i=URLSearchParams,o=i.prototype,u=t(o.append),a=t(o.delete),f=t(o.forEach),c=t([].push),s=new i("a=1&a=2&b=3");s.delete("a",1),s.delete("b",void 0),s+""!="a=2"&&r(o,"delete",(function(r){var t=arguments.length,i=t<2?void 0:arguments[1];if(t&&void 0===i)return a(this,r);var o=[];f(this,(function(r,t){c(o,{key:t,value:r})})),n(t,1);for(var s,l=e(r),h=e(i),v=0,p=0,d=!1,g=o.length;ve.length&&"/"!==n[n.length-1]))return n+r.slice(e.length);f("W2",e,n)}}function f(t,e,n){console.warn(r(t,[n,e].join(", ")))}function c(r,t,e){for(var n=r.scopes,i=e&&u(e,n);i;){var o=a(t,n[i]);if(o)return o;i=u(i.slice(0,i.lastIndexOf("/")),n)}return a(t,r.imports)||-1!==t.indexOf(":")&&t}function s(){this[x]={}}function l(t,e,n,i){var o=t[x][e];if(o)return o;var u=[],a=Object.create(null);O&&Object.defineProperty(a,O,{value:"Module"});var f=Promise.resolve().then((function(){return t.instantiate(e,n,i)})).then((function(n){if(!n)throw Error(r(2,e));var i=n[1]((function(r,t){o.h=!0;var e=!1;if("string"==typeof r)r in a&&a[r]===t||(a[r]=t,e=!0);else{for(var n in r)t=r[n],n in a&&a[n]===t||(a[n]=t,e=!0);r&&r.__esModule&&(a.__esModule=r.__esModule)}if(e)for(var i=0;i-1){var e=document.createEvent("Event");e.initEvent("error",!1,!1),t.dispatchEvent(e)}return Promise.reject(r)}))}else if("systemjs-importmap"===t.type){t.sp=!0;var e=t.src?(System.fetch||fetch)(t.src,{integrity:t.integrity,priority:t.fetchPriority,passThrough:!0}).then((function(r){if(!r.ok)throw Error(r.status);return r.text()})).catch((function(e){return e.message=r("W4",t.src)+"\n"+e.message,console.warn(e),"function"==typeof t.onerror&&t.onerror(),"{}"})):t.innerHTML;L=L.then((function(){return e})).then((function(e){!function(t,e,n){var i={};try{i=JSON.parse(e)}catch(a){console.warn(Error(r("W5")))}o(i,n,t)}(C,e,t.src||g)}))}}))}var g,y="undefined"!=typeof Symbol,m="undefined"!=typeof self,w="undefined"!=typeof document,b=m?self:e;if(w){var E=document.querySelector("base[href]");E&&(g=E.href)}if(!g&&"undefined"!=typeof location){var S=(g=location.href.split("#")[0].split("?")[0]).lastIndexOf("/");-1!==S&&(g=g.slice(0,S+1))}var R,A=/\\/g,O=y&&Symbol.toStringTag,x=y?Symbol():"@",I=s.prototype;I.import=function(r,t,e){var n=this;return t&&"object"==typeof t&&(e=t,t=void 0),Promise.resolve(n.prepareImport()).then((function(){return n.resolve(r,t,e)})).then((function(r){var t=l(n,r,void 0,e);return t.C||v(n,t)}))},I.createContext=function(r){var t=this;return{url:r,resolve:function(e,n){return Promise.resolve(t.resolve(e,n||r))}}},I.register=function(r,t,e){R=[r,t,e]},I.getRegister=function(){var r=R;return R=void 0,r};var T=Object.freeze(Object.create(null));b.System=new s;var k,P,L=Promise.resolve(),C={imports:{},scopes:{},depcache:{},integrity:{}},U=w;if(I.prepareImport=function(r){return(U||r)&&(d(),U=!1),L},I.getImportMap=function(){return JSON.parse(JSON.stringify(C))},w&&(d(),window.addEventListener("DOMContentLoaded",d)),I.addImportMap=function(r,t){o(r,t||g,C)},w){window.addEventListener("error",(function(r){M=r.filename,j=r.error}));var D=location.origin}I.createScript=function(r){var t=document.createElement("script");t.async=!0,r.indexOf(D+"/")&&(t.crossOrigin="anonymous");var e=C.integrity[r];return e&&(t.integrity=e),t.src=r,t};var M,j,_={},B=I.register;I.register=function(r,t){if(w&&"loading"===document.readyState&&"string"!=typeof r){var e=document.querySelectorAll("script[src]"),n=e[e.length-1];if(n){k=r;var i=this;P=setTimeout((function(){_[n.src]=[r,t],i.import(n.src)}))}}else k=void 0;return B.call(this,r,t)},I.instantiate=function(t,e){var n=_[t];if(n)return delete _[t],n;var i=this;return Promise.resolve(I.createScript(t)).then((function(n){return new Promise((function(o,u){n.addEventListener("error",(function(){u(Error(r(3,[t,e].join(", "))))})),n.addEventListener("load",(function(){if(document.head.removeChild(n),M===t)u(j);else{var r=i.getRegister(t);r&&r[0]===k&&clearTimeout(P),o(r)}})),document.head.appendChild(n)}))}))},I.shouldFetch=function(){return!1},"undefined"!=typeof fetch&&(I.fetch=fetch);var N=I.instantiate,F=/^(text|application)\/(x-)?javascript(;|$)/;I.instantiate=function(t,e,n){var i=this;return this.shouldFetch(t,e,n)?this.fetch(t,{credentials:"same-origin",integrity:C.integrity[t],meta:n}).then((function(n){if(!n.ok)throw Error(r(7,[n.status,n.statusText,t,e].join(", ")));var o=n.headers.get("content-type");if(!o||!F.test(o))throw Error(r(4,o));return n.text().then((function(r){return r.indexOf("//# sourceURL=")<0&&(r+="\n//# sourceURL="+t),(0,eval)(r),i.getRegister(t)}))})):N.apply(this,arguments)},I.resolve=function(e,n){return c(C,t(e,n=n||g)||e,n)||function(t,e){throw Error(r(8,[t,e].join(", ")))}(e,n)};var H=I.instantiate;I.instantiate=function(r,t,e){var n=C.depcache[r];if(n)for(var i=0;is in u?hp(u,s,{enumerable:!0,configurable:!0,writable:!0,value:o}):u[s]=o;var eo=(u,s,o)=>mp(u,typeof s!="symbol"?s+"":s,o);function yp(u,s){for(var o=0;oc[d]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}var hm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zc(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var to={exports:{}},le={};/** + * @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 xc;function vp(){if(xc)return le;xc=1;var u=Symbol.for("react.element"),s=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),S=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),N=Symbol.iterator;function M(g){return g===null||typeof g!="object"?null:(g=N&&g[N]||g["@@iterator"],typeof g=="function"?g:null)}var I={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,W={};function x(g,T,re){this.props=g,this.context=T,this.refs=W,this.updater=re||I}x.prototype.isReactComponent={},x.prototype.setState=function(g,T){if(typeof g!="object"&&typeof g!="function"&&g!=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,g,T,"setState")},x.prototype.forceUpdate=function(g){this.updater.enqueueForceUpdate(this,g,"forceUpdate")};function V(){}V.prototype=x.prototype;function F(g,T,re){this.props=g,this.context=T,this.refs=W,this.updater=re||I}var U=F.prototype=new V;U.constructor=F,D(U,x.prototype),U.isPureReactComponent=!0;var Q=Array.isArray,$=Object.prototype.hasOwnProperty,L={current:null},ee={key:!0,ref:!0,__self:!0,__source:!0};function Y(g,T,re){var ue,ce={},fe=null,ve=null;if(T!=null)for(ue in T.ref!==void 0&&(ve=T.ref),T.key!==void 0&&(fe=""+T.key),T)$.call(T,ue)&&!ee.hasOwnProperty(ue)&&(ce[ue]=T[ue]);var he=arguments.length-2;if(he===1)ce.children=re;else if(1>>1,T=j[g];if(0>>1;gd(ce,H))fed(ve,ce)?(j[g]=ve,j[fe]=H,g=fe):(j[g]=ce,j[ue]=H,g=ue);else if(fed(ve,H))j[g]=ve,j[fe]=H,g=fe;else break e}}return q}function d(j,q){var H=j.sortIndex-q.sortIndex;return H!==0?H:j.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var h=performance;u.unstable_now=function(){return h.now()}}else{var S=Date,E=S.now();u.unstable_now=function(){return S.now()-E}}var p=[],v=[],C=1,N=null,M=3,I=!1,D=!1,W=!1,x=typeof setTimeout=="function"?setTimeout:null,V=typeof clearTimeout=="function"?clearTimeout:null,F=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function U(j){for(var q=o(v);q!==null;){if(q.callback===null)c(v);else if(q.startTime<=j)c(v),q.sortIndex=q.expirationTime,s(p,q);else break;q=o(v)}}function Q(j){if(W=!1,U(j),!D)if(o(p)!==null)D=!0,Re($);else{var q=o(v);q!==null&&ne(Q,q.startTime-j)}}function $(j,q){D=!1,W&&(W=!1,V(Y),Y=-1),I=!0;var H=M;try{for(U(q),N=o(p);N!==null&&(!(N.expirationTime>q)||j&&!se());){var g=N.callback;if(typeof g=="function"){N.callback=null,M=N.priorityLevel;var T=g(N.expirationTime<=q);q=u.unstable_now(),typeof T=="function"?N.callback=T:N===o(p)&&c(p),U(q)}else c(p);N=o(p)}if(N!==null)var re=!0;else{var ue=o(v);ue!==null&&ne(Q,ue.startTime-q),re=!1}return re}finally{N=null,M=H,I=!1}}var L=!1,ee=null,Y=-1,oe=5,ye=-1;function se(){return!(u.unstable_now()-yej||125g?(j.sortIndex=H,s(v,j),o(p)===null&&j===o(v)&&(W?(V(Y),Y=-1):W=!0,ne(Q,H-g))):(j.sortIndex=T,s(p,j),D||I||(D=!0,Re($))),j},u.unstable_shouldYield=se,u.unstable_wrapCallback=function(j){var q=M;return function(){var H=M;M=q;try{return j.apply(this,arguments)}finally{M=H}}}}(lo)),lo}var Tc;function Sp(){return Tc||(Tc=1,ro.exports=wp()),ro.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 zc;function kp(){if(zc)return be;zc=1;var u=Co(),s=Sp();function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,v=/^[: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]*$/,C={},N={};function M(e){return p.call(N,e)?!0:p.call(C,e)?!1:v.test(e)?N[e]=!0:(C[e]=!0,!1)}function I(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 D(e,t,n,r){if(t===null||typeof t>"u"||I(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 W(e,t,n,r,l,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){x[e]=new W(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];x[t]=new W(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){x[e]=new W(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){x[e]=new W(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){x[e]=new W(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){x[e]=new W(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){x[e]=new W(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){x[e]=new W(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){x[e]=new W(e,5,!1,e.toLowerCase(),null,!1,!1)});var V=/[\-:]([a-z])/g;function F(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(V,F);x[t]=new W(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(V,F);x[t]=new W(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(V,F);x[t]=new W(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){x[e]=new W(e,1,!1,e.toLowerCase(),null,!1,!1)}),x.xlinkHref=new W("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){x[e]=new W(e,1,!1,e.toLowerCase(),null,!0,!0)});function U(e,t,n,r){var l=x.hasOwnProperty(t)?x[t]:null;(l!==null?l.type!==0:r||!(2f||l[a]!==i[f]){var m="\n"+l[a].replace(" at new "," at ");return e.displayName&&m.includes("")&&(m=m.replace("",e.displayName)),m}while(1<=a&&0<=f);break}}}finally{re=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?T(e):""}function ce(e){switch(e.tag){case 5:return T(e.type);case 16:return T("Lazy");case 13:return T("Suspense");case 19:return T("SuspenseList");case 0:case 2:case 15:return e=ue(e.type,!1),e;case 11:return e=ue(e.type.render,!1),e;case 1:return e=ue(e.type,!0),e;default:return""}}function fe(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 ee:return"Fragment";case L:return"Portal";case oe:return"Profiler";case Y:return"StrictMode";case Te:return"Suspense";case $e:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case se:return(e.displayName||"Context")+".Consumer";case ye:return(e._context.displayName||"Context")+".Provider";case ae:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Qe:return t=e.displayName||null,t!==null?t:fe(e.type)||"Memo";case Re:t=e._payload,e=e._init;try{return fe(e(t))}catch(n){}}return null}function ve(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 fe(t);case 8:return t===Y?"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 he(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ke(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function et(e){var t=ke(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 l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(a){r=""+a,i.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 Ur(e){e._valueTracker||(e._valueTracker=et(e))}function Oo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ke(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function $r(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ou(e,t){var n=t.checked;return H({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function Mo(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=he(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 Lo(e,t){t=t.checked,t!=null&&U(e,"checked",t,!1)}function su(e,t){Lo(e,t);var n=he(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")?au(e,t.type,n):t.hasOwnProperty("defaultValue")&&au(e,t.type,he(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Do(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 au(e,t,n){(t!=="number"||$r(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Yn=Array.isArray;function Sn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Vr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Gn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zn={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},gf=["Webkit","ms","Moz","O"];Object.keys(Zn).forEach(function(e){gf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zn[t]=Zn[e]})});function $o(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Zn.hasOwnProperty(e)&&Zn[e]?(""+t).trim():t+"px"}function Vo(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=$o(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var wf=H({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 du(e,t){if(t){if(wf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(o(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(o(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(t.style!=null&&typeof t.style!="object")throw Error(o(62))}}function pu(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 hu=null;function mu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yu=null,kn=null,_n=null;function Wo(e){if(e=gr(e)){if(typeof yu!="function")throw Error(o(280));var t=e.stateNode;t&&(t=cl(t),yu(e.stateNode,e.type,t))}}function Bo(e){kn?_n?_n.push(e):_n=[e]:kn=e}function Ho(){if(kn){var e=kn,t=_n;if(_n=kn=null,Wo(e),t)for(e=0;e>>=0,e===0?32:31-(Rf(e)/Of|0)|0}var Kr=64,Xr=4194304;function er(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 Yr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var f=a&~l;f!==0?r=er(f):(i&=a,i!==0&&(r=er(i)))}else a=n&~l,a!==0?r=er(a):i!==0&&(r=er(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function tr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ht(t),e[t]=n}function If(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=ar),gs=" ",ws=!1;function Ss(e,t){switch(e){case"keyup":return ad.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ks(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xn=!1;function fd(e,t){switch(e){case"compositionend":return ks(t);case"keypress":return t.which!==32?null:(ws=!0,gs);case"textInput":return e=t.data,e===gs&&ws?null:e;default:return null}}function dd(e,t){if(xn)return e==="compositionend"||!Du&&Ss(e,t)?(e=ds(),br=Tu=Vt=null,xn=!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)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=Ts(n)}}function Rs(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rs(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Os(){for(var e=window,t=$r();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=$r(e.document)}return t}function Fu(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 kd(e){var t=Os(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Rs(n.ownerDocument.documentElement,n)){if(r!==null&&Fu(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 l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=zs(n,i);var a=zs(n,r);l&&a&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>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=document.documentMode,Nn=null,Au=null,pr=null,Uu=!1;function Ms(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Uu||Nn==null||Nn!==$r(r)||(r=Nn,"selectionStart"in r&&Fu(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}),pr&&dr(pr,r)||(pr=r,r=ol(Au,"onSelect"),0On||(e.current=Ju[On],Ju[On]=null,On--)}function ge(e,t){On++,Ju[On]=e.current,e.current=t}var Qt={},Ve=Ht(Qt),Ye=Ht(!1),on=Qt;function Mn(e,t){var n=e.type.contextTypes;if(!n)return Qt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Ge(e){return e=e.childContextTypes,e!=null}function fl(){Se(Ye),Se(Ve)}function Xs(e,t,n){if(Ve.current!==Qt)throw Error(o(168));ge(Ve,t),ge(Ye,n)}function Ys(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(o(108,ve(e)||"Unknown",l));return H({},n,r)}function dl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Qt,on=Ve.current,ge(Ve,e),ge(Ye,Ye.current),!0}function Gs(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Ys(e,t,on),r.__reactInternalMemoizedMergedChildContext=e,Se(Ye),Se(Ve),ge(Ve,e)):Se(Ye),ge(Ye,n)}var Tt=null,pl=!1,qu=!1;function Zs(e){Tt===null?Tt=[e]:Tt.push(e)}function Ld(e){pl=!0,Zs(e)}function Kt(){if(!qu&&Tt!==null){qu=!0;var e=0,t=me;try{var n=Tt;for(me=1;e>=a,l-=a,zt=1<<32-ht(t)+l|n<b?(Ie=J,J=null):Ie=J.sibling;var de=P(w,J,k[b],O);if(de===null){J===null&&(J=Ie);break}e&&J&&de.alternate===null&&t(w,J),y=i(de,y,b),Z===null?G=de:Z.sibling=de,Z=de,J=Ie}if(b===k.length)return n(w,J),_e&&an(w,b),G;if(J===null){for(;bb?(Ie=J,J=null):Ie=J.sibling;var tn=P(w,J,de.value,O);if(tn===null){J===null&&(J=Ie);break}e&&J&&tn.alternate===null&&t(w,J),y=i(tn,y,b),Z===null?G=tn:Z.sibling=tn,Z=tn,J=Ie}if(de.done)return n(w,J),_e&&an(w,b),G;if(J===null){for(;!de.done;b++,de=k.next())de=R(w,de.value,O),de!==null&&(y=i(de,y,b),Z===null?G=de:Z.sibling=de,Z=de);return _e&&an(w,b),G}for(J=r(w,J);!de.done;b++,de=k.next())de=A(J,w,b,de.value,O),de!==null&&(e&&de.alternate!==null&&J.delete(de.key===null?b:de.key),y=i(de,y,b),Z===null?G=de:Z.sibling=de,Z=de);return e&&J.forEach(function(pp){return t(w,pp)}),_e&&an(w,b),G}function Pe(w,y,k,O){if(typeof k=="object"&&k!==null&&k.type===ee&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case $:e:{for(var G=k.key,Z=y;Z!==null;){if(Z.key===G){if(G=k.type,G===ee){if(Z.tag===7){n(w,Z.sibling),y=l(Z,k.props.children),y.return=w,w=y;break e}}else if(Z.elementType===G||typeof G=="object"&&G!==null&&G.$$typeof===Re&&na(G)===Z.type){n(w,Z.sibling),y=l(Z,k.props),y.ref=wr(w,Z,k),y.return=w,w=y;break e}n(w,Z);break}else t(w,Z);Z=Z.sibling}k.type===ee?(y=vn(k.props.children,w.mode,O,k.key),y.return=w,w=y):(O=Vl(k.type,k.key,k.props,null,w.mode,O),O.ref=wr(w,y,k),O.return=w,w=O)}return a(w);case L:e:{for(Z=k.key;y!==null;){if(y.key===Z)if(y.tag===4&&y.stateNode.containerInfo===k.containerInfo&&y.stateNode.implementation===k.implementation){n(w,y.sibling),y=l(y,k.children||[]),y.return=w,w=y;break e}else{n(w,y);break}else t(w,y);y=y.sibling}y=Gi(k,w.mode,O),y.return=w,w=y}return a(w);case Re:return Z=k._init,Pe(w,y,Z(k._payload),O)}if(Yn(k))return K(w,y,k,O);if(q(k))return X(w,y,k,O);vl(w,k)}return typeof k=="string"&&k!==""||typeof k=="number"?(k=""+k,y!==null&&y.tag===6?(n(w,y.sibling),y=l(y,k),y.return=w,w=y):(n(w,y),y=Yi(k,w.mode,O),y.return=w,w=y),a(w)):n(w,y)}return Pe}var jn=ra(!0),la=ra(!1),gl=Ht(null),wl=null,Fn=null,li=null;function ui(){li=Fn=wl=null}function ii(e){var t=gl.current;Se(gl),e._currentValue=t}function oi(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 An(e,t){wl=e,li=Fn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ze=!0),e.firstContext=null)}function at(e){var t=e._currentValue;if(li!==e)if(e={context:e,memoizedValue:t,next:null},Fn===null){if(wl===null)throw Error(o(308));Fn=e,wl.dependencies={lanes:0,firstContext:e}}else Fn=Fn.next=e;return t}var cn=null;function si(e){cn===null?cn=[e]:cn.push(e)}function ua(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,si(t)):(n.next=l.next,l.next=n),t.interleaved=n,Ot(e,r)}function Ot(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 Xt=!1;function ai(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ia(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 Mt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Yt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ie&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Ot(e,n)}return l=r.interleaved,l===null?(t.next=t,si(r)):(t.next=l.next,l.next=t),r.interleaved=t,Ot(e,n)}function Sl(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,Eu(e,n)}}function oa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=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};i===null?l=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,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 kl(e,t,n,r){var l=e.updateQueue;Xt=!1;var i=l.firstBaseUpdate,a=l.lastBaseUpdate,f=l.shared.pending;if(f!==null){l.shared.pending=null;var m=f,_=m.next;m.next=null,a===null?i=_:a.next=_,a=m;var z=e.alternate;z!==null&&(z=z.updateQueue,f=z.lastBaseUpdate,f!==a&&(f===null?z.firstBaseUpdate=_:f.next=_,z.lastBaseUpdate=m))}if(i!==null){var R=l.baseState;a=0,z=_=m=null,f=i;do{var P=f.lane,A=f.eventTime;if((r&P)===P){z!==null&&(z=z.next={eventTime:A,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,next:null});e:{var K=e,X=f;switch(P=t,A=n,X.tag){case 1:if(K=X.payload,typeof K=="function"){R=K.call(A,R,P);break e}R=K;break e;case 3:K.flags=K.flags&-65537|128;case 0:if(K=X.payload,P=typeof K=="function"?K.call(A,R,P):K,P==null)break e;R=H({},R,P);break e;case 2:Xt=!0}}f.callback!==null&&f.lane!==0&&(e.flags|=64,P=l.effects,P===null?l.effects=[f]:P.push(f))}else A={eventTime:A,lane:P,tag:f.tag,payload:f.payload,callback:f.callback,next:null},z===null?(_=z=A,m=R):z=z.next=A,a|=P;if(f=f.next,f===null){if(f=l.shared.pending,f===null)break;P=f,f=P.next,P.next=null,l.lastBaseUpdate=P,l.shared.pending=null}}while(!0);if(z===null&&(m=R),l.baseState=m,l.firstBaseUpdate=_,l.lastBaseUpdate=z,t=l.shared.interleaved,t!==null){l=t;do a|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);pn|=a,e.lanes=a,e.memoizedState=R}}function sa(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=hi.transition;hi.transition={};try{e(!1),t()}finally{me=n,hi.transition=r}}function Pa(){return ct().memoizedState}function Fd(e,t,n){var r=qt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ta(e))za(t,n);else if(n=ua(e,t,n,r),n!==null){var l=Xe();St(n,e,r,l),Ra(n,t,r)}}function Ad(e,t,n){var r=qt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ta(e))za(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,f=i(a,n);if(l.hasEagerState=!0,l.eagerState=f,mt(f,a)){var m=t.interleaved;m===null?(l.next=l,si(t)):(l.next=m.next,m.next=l),t.interleaved=l;return}}catch(_){}finally{}n=ua(e,t,l,r),n!==null&&(l=Xe(),St(n,e,r,l),Ra(n,t,r))}}function Ta(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}function za(e,t){Er=Cl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ra(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Eu(e,n)}}var Pl={readContext:at,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useInsertionEffect:We,useLayoutEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useMutableSource:We,useSyncExternalStore:We,useId:We,unstable_isNewReconciler:!1},Ud={readContext:at,useCallback:function(e,t){return xt().memoizedState=[e,t===void 0?null:t],e},useContext:at,useEffect:wa,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,xl(4194308,4,_a.bind(null,t,e),n)},useLayoutEffect:function(e,t){return xl(4194308,4,e,t)},useInsertionEffect:function(e,t){return xl(4,2,e,t)},useMemo:function(e,t){var n=xt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xt();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=Fd.bind(null,Ce,e),[r.memoizedState,e]},useRef:function(e){var t=xt();return e={current:e},t.memoizedState=e},useState:va,useDebugValue:ki,useDeferredValue:function(e){return xt().memoizedState=e},useTransition:function(){var e=va(!1),t=e[0];return e=jd.bind(null,e[1]),xt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ce,l=xt();if(_e){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),De===null)throw Error(o(349));dn&30||da(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,wa(ha.bind(null,r,i,e),[e]),r.flags|=2048,Nr(9,pa.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=xt(),t=De.identifierPrefix;if(_e){var n=Rt,r=zt;n=(r&~(1<<32-ht(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Cr++,0<\/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[Et]=t,e[vr]=r,Za(e,t,!1,!1),t.stateNode=e;e:{switch(a=pu(n,r),n){case"dialog":we("cancel",e),we("close",e),l=r;break;case"iframe":case"object":case"embed":we("load",e),l=r;break;case"video":case"audio":for(l=0;lBn&&(t.flags|=128,r=!0,Pr(i,!1),t.lanes=4194304)}else{if(!r)if(e=_l(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Pr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!_e)return Be(t),null}else 2*Ne()-i.renderingStartTime>Bn&&n!==1073741824&&(t.flags|=128,r=!0,Pr(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ne(),t.sibling=null,n=Ee.current,ge(Ee,r?n&1|2:n&1),t):(Be(t),null);case 22:case 23:return Qi(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?lt&1073741824&&(Be(t),t.subtreeFlags&6&&(t.flags|=8192)):Be(t),null;case 24:return null;case 25:return null}throw Error(o(156,t.tag))}function Xd(e,t){switch(ei(t),t.tag){case 1:return Ge(t.type)&&fl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Un(),Se(Ye),Se(Ve),pi(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return fi(t),null;case 13:if(Se(Ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));In()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Se(Ee),null;case 4:return Un(),null;case 10:return ii(t.type._context),null;case 22:case 23:return Qi(),null;case 24:return null;default:return null}}var Ol=!1,He=!1,Yd=typeof WeakSet=="function"?WeakSet:Set,B=null;function Vn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xe(e,t,r)}else n.current=null}function Li(e,t,n){try{n()}catch(r){xe(e,t,r)}}var ba=!1;function Gd(e,t){if(Qu=Jr,e=Os(),Fu(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 l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(O){n=null;break e}var a=0,f=-1,m=-1,_=0,z=0,R=e,P=null;t:for(;;){for(var A;R!==n||l!==0&&R.nodeType!==3||(f=a+l),R!==i||r!==0&&R.nodeType!==3||(m=a+r),R.nodeType===3&&(a+=R.nodeValue.length),(A=R.firstChild)!==null;)P=R,R=A;for(;;){if(R===e)break t;if(P===n&&++_===l&&(f=a),P===i&&++z===r&&(m=a),(A=R.nextSibling)!==null)break;R=P,P=R.parentNode}R=A}n=f===-1||m===-1?null:{start:f,end:m}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ku={focusedElem:e,selectionRange:n},Jr=!1,B=t;B!==null;)if(t=B,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;try{var K=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(K!==null){var X=K.memoizedProps,Pe=K.memoizedState,w=t.stateNode,y=w.getSnapshotBeforeUpdate(t.elementType===t.type?X:vt(t.type,X),Pe);w.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var k=t.stateNode.containerInfo;k.nodeType===1?k.textContent="":k.nodeType===9&&k.documentElement&&k.removeChild(k.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(O){xe(t,t.return,O)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return K=ba,ba=!1,K}function Tr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&Li(t,n,i)}l=l.next}while(l!==r)}}function Ml(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 Di(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 ec(e){var t=e.alternate;t!==null&&(e.alternate=null,ec(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Et],delete t[vr],delete t[Zu],delete t[Od],delete t[Md])),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 tc(e){return e.tag===5||e.tag===3||e.tag===4}function nc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||tc(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 Ii(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=al));else if(r!==4&&(e=e.child,e!==null))for(Ii(e,t,n),e=e.sibling;e!==null;)Ii(e,t,n),e=e.sibling}function ji(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(ji(e,t,n),e=e.sibling;e!==null;)ji(e,t,n),e=e.sibling}var Fe=null,gt=!1;function Gt(e,t,n){for(n=n.child;n!==null;)rc(e,t,n),n=n.sibling}function rc(e,t,n){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(Qr,n)}catch(f){}switch(n.tag){case 5:He||Vn(n,t);case 6:var r=Fe,l=gt;Fe=null,Gt(e,t,n),Fe=r,gt=l,Fe!==null&&(gt?(e=Fe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Fe.removeChild(n.stateNode));break;case 18:Fe!==null&&(gt?(e=Fe,n=n.stateNode,e.nodeType===8?Gu(e.parentNode,n):e.nodeType===1&&Gu(e,n),ir(e)):Gu(Fe,n.stateNode));break;case 4:r=Fe,l=gt,Fe=n.stateNode.containerInfo,gt=!0,Gt(e,t,n),Fe=r,gt=l;break;case 0:case 11:case 14:case 15:if(!He&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&Li(n,t,a),l=l.next}while(l!==r)}Gt(e,t,n);break;case 1:if(!He&&(Vn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(f){xe(n,t,f)}Gt(e,t,n);break;case 21:Gt(e,t,n);break;case 22:n.mode&1?(He=(r=He)||n.memoizedState!==null,Gt(e,t,n),He=r):Gt(e,t,n);break;default:Gt(e,t,n)}}function lc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Yd),t.forEach(function(r){var l=lp.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function wt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=a),r&=~i}if(r=l,r=Ne()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Jd(r/1960))-r,10e?16:e,Jt===null)var r=!1;else{if(e=Jt,Jt=null,Fl=0,ie&6)throw Error(o(331));var l=ie;for(ie|=4,B=e.current;B!==null;){var i=B,a=i.child;if(B.flags&16){var f=i.deletions;if(f!==null){for(var m=0;mNe()-Ui?mn(e,0):Ai|=n),qe(e,t)}function vc(e,t){t===0&&(e.mode&1?(t=Xr,Xr<<=1,!(Xr&130023424)&&(Xr=4194304)):t=1);var n=Xe();e=Ot(e,t),e!==null&&(tr(e,t,n),qe(e,n))}function rp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vc(e,n)}function lp(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}r!==null&&r.delete(t),vc(e,n)}var gc;gc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ye.current)Ze=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ze=!1,Qd(e,t,n);Ze=!!(e.flags&131072)}else Ze=!1,_e&&t.flags&1048576&&Js(t,ml,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Rl(e,t),e=t.pendingProps;var l=Mn(t,Ve.current);An(t,n),l=yi(null,t,r,e,l,n);var i=vi();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ge(r)?(i=!0,dl(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,ai(t),l.updater=Tl,t.stateNode=l,l._reactInternals=t,Ei(t,r,e,n),t=Pi(null,t,r,!0,i,n)):(t.tag=0,_e&&i&&bu(t),Ke(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Rl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=ip(r),e=vt(r,e),l){case 0:t=Ni(null,t,r,e,n);break e;case 1:t=Ha(null,t,r,e,n);break e;case 11:t=Ua(null,t,r,e,n);break e;case 14:t=$a(null,t,r,vt(r.type,e),n);break e}throw Error(o(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:vt(r,l),Ni(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:vt(r,l),Ha(e,t,r,l,n);case 3:e:{if(Qa(t),e===null)throw Error(o(387));r=t.pendingProps,i=t.memoizedState,l=i.element,ia(e,t),kl(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=$n(Error(o(423)),t),t=Ka(e,t,r,n,l);break e}else if(r!==l){l=$n(Error(o(424)),t),t=Ka(e,t,r,n,l);break e}else for(rt=Bt(t.stateNode.containerInfo.firstChild),nt=t,_e=!0,yt=null,n=la(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(In(),r===l){t=Lt(e,t,n);break e}Ke(e,t,r,n)}t=t.child}return t;case 5:return aa(t),e===null&&ni(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,a=l.children,Xu(r,l)?a=null:i!==null&&Xu(r,i)&&(t.flags|=32),Ba(e,t),Ke(e,t,a,n),t.child;case 6:return e===null&&ni(t),null;case 13:return Xa(e,t,n);case 4:return ci(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=jn(t,null,r,n):Ke(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:vt(r,l),Ua(e,t,r,l,n);case 7:return Ke(e,t,t.pendingProps,n),t.child;case 8:return Ke(e,t,t.pendingProps.children,n),t.child;case 12:return Ke(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,a=l.value,ge(gl,r._currentValue),r._currentValue=a,i!==null)if(mt(i.value,a)){if(i.children===l.children&&!Ye.current){t=Lt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var f=i.dependencies;if(f!==null){a=i.child;for(var m=f.firstContext;m!==null;){if(m.context===r){if(i.tag===1){m=Mt(-1,n&-n),m.tag=2;var _=i.updateQueue;if(_!==null){_=_.shared;var z=_.pending;z===null?m.next=m:(m.next=z.next,z.next=m),_.pending=m}}i.lanes|=n,m=i.alternate,m!==null&&(m.lanes|=n),oi(i.return,n,t),f.lanes|=n;break}m=m.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(o(341));a.lanes|=n,f=a.alternate,f!==null&&(f.lanes|=n),oi(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Ke(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,An(t,n),l=at(l),r=r(l),t.flags|=1,Ke(e,t,r,n),t.child;case 14:return r=t.type,l=vt(r,t.pendingProps),l=vt(r.type,l),$a(e,t,r,l,n);case 15:return Va(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:vt(r,l),Rl(e,t),t.tag=1,Ge(r)?(e=!0,dl(t)):e=!1,An(t,n),Ma(t,r,l),Ei(t,r,l,n),Pi(null,t,r,!0,e,n);case 19:return Ga(e,t,n);case 22:return Wa(e,t,n)}throw Error(o(156,t.tag))};function wc(e,t){return qo(e,t)}function up(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 dt(e,t,n,r){return new up(e,t,n,r)}function Xi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ip(e){if(typeof e=="function")return Xi(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ae)return 11;if(e===Qe)return 14}return 2}function en(e,t){var n=e.alternate;return n===null?(n=dt(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 Vl(e,t,n,r,l,i){var a=2;if(r=e,typeof e=="function")Xi(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case ee:return vn(n.children,l,i,t);case Y:a=8,l|=8;break;case oe:return e=dt(12,n,t,l|2),e.elementType=oe,e.lanes=i,e;case Te:return e=dt(13,n,t,l),e.elementType=Te,e.lanes=i,e;case $e:return e=dt(19,n,t,l),e.elementType=$e,e.lanes=i,e;case ne:return Wl(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ye:a=10;break e;case se:a=9;break e;case ae:a=11;break e;case Qe:a=14;break e;case Re:a=16,r=null;break e}throw Error(o(130,e==null?e:typeof e,""))}return t=dt(a,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function vn(e,t,n,r){return e=dt(7,e,r,t),e.lanes=n,e}function Wl(e,t,n,r){return e=dt(22,e,r,t),e.elementType=ne,e.lanes=n,e.stateNode={isHidden:!1},e}function Yi(e,t,n){return e=dt(6,e,null,t),e.lanes=n,e}function Gi(e,t,n){return t=dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function op(e,t,n,r,l){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=_u(0),this.expirationTimes=_u(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_u(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Zi(e,t,n,r,l,i,a,f,m){return e=new op(e,t,n,f,m),t===1?(t=1,i===!0&&(t|=8)):t=0,i=dt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ai(i),e}function sp(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(s){console.error(s)}}return u(),no.exports=kp(),no.exports}var uo,Oc;function Ep(){return Oc||(Oc=1,uo={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),uo}var Cp=Ep();const xp=Zc(Cp);var Np=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function Mc(u){var s={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},o=u.match(/<\/?([^\s]+?)[/\s>]/);if(o&&(s.name=o[1],(xp[o[1]]||u.charAt(u.length-2)==="/")&&(s.voidElement=!0),s.name.startsWith("!--"))){var c=u.indexOf("-->");return{type:"comment",comment:c!==-1?u.slice(4,c):""}}for(var d=new RegExp(Np),h=null;(h=d.exec(u))!==null;)if(h[0].trim())if(h[1]){var S=h[1].trim(),E=[S,""];S.indexOf("=")>-1&&(E=S.split("=")),s.attrs[E[0]]=E[1],d.lastIndex--}else h[2]&&(s.attrs[h[2]]=h[3].trim().substring(1,h[3].length-1));return s}var Pp=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Tp=/^\s*$/,zp=Object.create(null);function Jc(u,s){switch(s.type){case"text":return u+s.content;case"tag":return u+="<"+s.name+(s.attrs?function(o){var c=[];for(var d in o)c.push(d+'="'+o[d]+'"');return c.length?" "+c.join(" "):""}(s.attrs):"")+(s.voidElement?"/>":">"),s.voidElement?u:u+s.children.reduce(Jc,"")+"";case"comment":return u+""}}var Rp={parse:function(u,s){s||(s={}),s.components||(s.components=zp);var o,c=[],d=[],h=-1,S=!1;if(u.indexOf("<")!==0){var E=u.indexOf("<");c.push({type:"text",content:E===-1?u:u.substring(0,E)})}return u.replace(Pp,function(p,v){if(S){if(p!=="")return;S=!1}var C,N=p.charAt(1)!=="/",M=p.startsWith("");return{type:"comment",comment:r!==-1?e.slice(4,r):""}}for(var l=new RegExp(ph),u=null;(u=l.exec(e))!==null;)if(u[0].trim())if(u[1]){var i=u[1].trim(),s=[i,""];i.indexOf("=")>-1&&(s=i.split("=")),t.attrs[s[0]]=s[1],l.lastIndex--}else u[2]&&(t.attrs[u[2]]=u[3].trim().substring(1,u[3].length-1));return t}var hh=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,mh=/^\s*$/,yh=Object.create(null);function wf(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(n){var r=[];for(var l in n)r.push(l+'="'+n[l]+'"');return r.length?" "+r.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(wf,"")+"";case"comment":return e+""}}var gh={parse:function(e,t){t||(t={}),t.components||(t.components=yh);var n,r=[],l=[],u=-1,i=!1;if(e.indexOf("<")!==0){var s=e.indexOf("<");r.push({type:"text",content:s===-1?e:e.substring(0,s)})}return e.replace(hh,function(o,a){if(i){if(o!=="")return;i=!1}var f,h=o.charAt(1)!=="/",m=o.startsWith("