From 141b3f374391cd9decf5d4e607bd6f07b779f751 Mon Sep 17 00:00:00 2001 From: Saleh Mir Date: Sun, 8 Sep 2024 17:41:41 +0330 Subject: [PATCH] bump version --- jesse/static/200.html | 20 ++--- jesse/static/404.html | 20 ++--- .../static/_nuxt/{B8yvrODN.js => AyCRve0f.js} | 2 +- jesse/static/_nuxt/B1aKZWRr.js | 1 + jesse/static/_nuxt/B1reJhqX.js | 1 + .../static/_nuxt/{BkeL-IZt.js => B3g55Ev5.js} | 2 +- .../static/_nuxt/{7NBYyiEJ.js => B5106L_X.js} | 2 +- jesse/static/_nuxt/B8RB9kkw.js | 1 - jesse/static/_nuxt/BJ_zMlAw.js | 1 - jesse/static/_nuxt/BTN5Q_u1.js | 1 - .../static/_nuxt/{CYkni-5b.js => BVzqvNoh.js} | 2 +- .../static/_nuxt/{CB0tc-_L.js => B_N8J-8A.js} | 2 +- .../static/_nuxt/{BuZcmfLY.js => BaIvpw_P.js} | 4 +- jesse/static/_nuxt/Bd2bx7A5.js | 1 + jesse/static/_nuxt/BhE9eUkV.js | 1 + .../static/_nuxt/{C8vHj9Ei.js => BiSy5BNH.js} | 2 +- jesse/static/_nuxt/BkF6Vqx3.js | 1 - jesse/static/_nuxt/BnUfHduR.js | 1 + .../static/_nuxt/{BPjMyksS.js => BpX9-e39.js} | 2 +- .../static/_nuxt/{BiWymv33.js => BsGPmCwr.js} | 2 +- .../static/_nuxt/{B0DtmZv3.js => Bsyc-xU1.js} | 2 +- .../static/_nuxt/{CaMo12fb.js => BuJV-6eH.js} | 2 +- .../static/_nuxt/{a7b7rU9w.js => Bx5n1Vm4.js} | 2 +- jesse/static/_nuxt/Bym0NDoT.js | 1 - jesse/static/_nuxt/C-G9LxTU.js | 1 - jesse/static/_nuxt/C1SZgowX.js | 1 - jesse/static/_nuxt/C3V0pIhk.js | 1 - .../static/_nuxt/{DkmBeQYg.js => C4yqxOEs.js} | 2 +- jesse/static/_nuxt/CGl4vwl9.js | 1 + jesse/static/_nuxt/CUxB1w-A.js | 1 - .../static/_nuxt/{CoLc1c7O.js => Ca0ihDfi.js} | 4 +- .../static/_nuxt/{Cf2pTZZR.js => Ca98eS_M.js} | 2 +- jesse/static/_nuxt/CsXNC8nX.js | 1 + jesse/static/_nuxt/CtfKdue9.js | 81 +++++++++++++++++++ jesse/static/_nuxt/CzJqIIYd.js | 1 + .../static/_nuxt/{CjU9KdRe.js => CzsuHhNd.js} | 2 +- jesse/static/_nuxt/CzuY_Eh0.js | 1 + .../static/_nuxt/{_rtdkDwQ.js => D1X8Au15.js} | 2 +- .../static/_nuxt/{TlcqjhkM.js => DCUDc3Ru.js} | 2 +- .../static/_nuxt/{DMeHxD4t.js => DDEQIaWN.js} | 2 +- jesse/static/_nuxt/DDfehepI.js | 1 + jesse/static/_nuxt/DHlTlLwR.js | 1 - jesse/static/_nuxt/Db4jbZ2h.js | 1 + jesse/static/_nuxt/DbTgESvQ.js | 81 ------------------- jesse/static/_nuxt/DcI7kF0e.js | 1 + jesse/static/_nuxt/De8JykNN.js | 1 - .../static/_nuxt/{BcharL2X.js => DfRq3hyz.js} | 2 +- .../static/_nuxt/{Ddw4NJNB.js => Diw-o0Tt.js} | 14 ++-- jesse/static/_nuxt/Dk2ncSqI.js | 1 - .../static/_nuxt/{C2Lhxgb5.js => DmJXRrjT.js} | 2 +- jesse/static/_nuxt/DqDqoIxu.js | 1 - jesse/static/_nuxt/Drpn0v_h.js | 1 - .../static/_nuxt/{Dw7X8RYa.js => DuAXaxTg.js} | 2 +- .../static/_nuxt/{ByIDro8B.js => Dw-KbuF7.js} | 2 +- .../static/_nuxt/{CDrQCLaI.js => _Ia6ZthS.js} | 2 +- jesse/static/_nuxt/cKP3bPg8.js | 1 + jesse/static/_nuxt/entry.C8ZeY5E4.css | 1 + jesse/static/_nuxt/entry.CkAPc-z-.css | 1 - jesse/static/_nuxt/oEVPFgVt.js | 1 + jesse/static/_nuxt/qWAvSgex.js | 1 - .../static/_nuxt/{3X8fdh0Z.js => ssul-OlG.js} | 2 +- .../static/_nuxt/{BlDilU3m.js => uEBk_GLZ.js} | 2 +- jesse/static/_nuxt/uU1M6rQW.js | 1 + jesse/static/_payload.json | 2 +- jesse/static/index.html | 22 ++--- 65 files changed, 164 insertions(+), 164 deletions(-) rename jesse/static/_nuxt/{B8yvrODN.js => AyCRve0f.js} (97%) create mode 100644 jesse/static/_nuxt/B1aKZWRr.js create mode 100644 jesse/static/_nuxt/B1reJhqX.js rename jesse/static/_nuxt/{BkeL-IZt.js => B3g55Ev5.js} (99%) rename jesse/static/_nuxt/{7NBYyiEJ.js => B5106L_X.js} (98%) delete mode 100644 jesse/static/_nuxt/B8RB9kkw.js delete mode 100644 jesse/static/_nuxt/BJ_zMlAw.js delete mode 100644 jesse/static/_nuxt/BTN5Q_u1.js rename jesse/static/_nuxt/{CYkni-5b.js => BVzqvNoh.js} (77%) rename jesse/static/_nuxt/{CB0tc-_L.js => B_N8J-8A.js} (99%) rename jesse/static/_nuxt/{BuZcmfLY.js => BaIvpw_P.js} (94%) create mode 100644 jesse/static/_nuxt/Bd2bx7A5.js create mode 100644 jesse/static/_nuxt/BhE9eUkV.js rename jesse/static/_nuxt/{C8vHj9Ei.js => BiSy5BNH.js} (76%) delete mode 100644 jesse/static/_nuxt/BkF6Vqx3.js create mode 100644 jesse/static/_nuxt/BnUfHduR.js rename jesse/static/_nuxt/{BPjMyksS.js => BpX9-e39.js} (56%) rename jesse/static/_nuxt/{BiWymv33.js => BsGPmCwr.js} (99%) rename jesse/static/_nuxt/{B0DtmZv3.js => Bsyc-xU1.js} (98%) rename jesse/static/_nuxt/{CaMo12fb.js => BuJV-6eH.js} (81%) rename jesse/static/_nuxt/{a7b7rU9w.js => Bx5n1Vm4.js} (86%) delete mode 100644 jesse/static/_nuxt/Bym0NDoT.js delete mode 100644 jesse/static/_nuxt/C-G9LxTU.js delete mode 100644 jesse/static/_nuxt/C1SZgowX.js delete mode 100644 jesse/static/_nuxt/C3V0pIhk.js rename jesse/static/_nuxt/{DkmBeQYg.js => C4yqxOEs.js} (98%) create mode 100644 jesse/static/_nuxt/CGl4vwl9.js delete mode 100644 jesse/static/_nuxt/CUxB1w-A.js rename jesse/static/_nuxt/{CoLc1c7O.js => Ca0ihDfi.js} (94%) rename jesse/static/_nuxt/{Cf2pTZZR.js => Ca98eS_M.js} (98%) create mode 100644 jesse/static/_nuxt/CsXNC8nX.js create mode 100644 jesse/static/_nuxt/CtfKdue9.js create mode 100644 jesse/static/_nuxt/CzJqIIYd.js rename jesse/static/_nuxt/{CjU9KdRe.js => CzsuHhNd.js} (99%) create mode 100644 jesse/static/_nuxt/CzuY_Eh0.js rename jesse/static/_nuxt/{_rtdkDwQ.js => D1X8Au15.js} (99%) rename jesse/static/_nuxt/{TlcqjhkM.js => DCUDc3Ru.js} (89%) rename jesse/static/_nuxt/{DMeHxD4t.js => DDEQIaWN.js} (76%) create mode 100644 jesse/static/_nuxt/DDfehepI.js delete mode 100644 jesse/static/_nuxt/DHlTlLwR.js create mode 100644 jesse/static/_nuxt/Db4jbZ2h.js delete mode 100644 jesse/static/_nuxt/DbTgESvQ.js create mode 100644 jesse/static/_nuxt/DcI7kF0e.js delete mode 100644 jesse/static/_nuxt/De8JykNN.js rename jesse/static/_nuxt/{BcharL2X.js => DfRq3hyz.js} (97%) rename jesse/static/_nuxt/{Ddw4NJNB.js => Diw-o0Tt.js} (99%) delete mode 100644 jesse/static/_nuxt/Dk2ncSqI.js rename jesse/static/_nuxt/{C2Lhxgb5.js => DmJXRrjT.js} (98%) delete mode 100644 jesse/static/_nuxt/DqDqoIxu.js delete mode 100644 jesse/static/_nuxt/Drpn0v_h.js rename jesse/static/_nuxt/{Dw7X8RYa.js => DuAXaxTg.js} (77%) rename jesse/static/_nuxt/{ByIDro8B.js => Dw-KbuF7.js} (97%) rename jesse/static/_nuxt/{CDrQCLaI.js => _Ia6ZthS.js} (98%) create mode 100644 jesse/static/_nuxt/cKP3bPg8.js create mode 100644 jesse/static/_nuxt/entry.C8ZeY5E4.css delete mode 100644 jesse/static/_nuxt/entry.CkAPc-z-.css create mode 100644 jesse/static/_nuxt/oEVPFgVt.js delete mode 100644 jesse/static/_nuxt/qWAvSgex.js rename jesse/static/_nuxt/{3X8fdh0Z.js => ssul-OlG.js} (99%) rename jesse/static/_nuxt/{BlDilU3m.js => uEBk_GLZ.js} (99%) create mode 100644 jesse/static/_nuxt/uU1M6rQW.js diff --git a/jesse/static/200.html b/jesse/static/200.html index 821de39aa..9f6733635 100644 --- a/jesse/static/200.html +++ b/jesse/static/200.html @@ -1,20 +1,20 @@ - + - - - + + + - + - - - -
- \ No newline at end of file + \ No newline at end of file diff --git a/jesse/static/404.html b/jesse/static/404.html index 821de39aa..9f6733635 100644 --- a/jesse/static/404.html +++ b/jesse/static/404.html @@ -1,20 +1,20 @@ - + - - - + + + - + - - - -
- \ No newline at end of file + \ No newline at end of file diff --git a/jesse/static/_nuxt/B8yvrODN.js b/jesse/static/_nuxt/AyCRve0f.js similarity index 97% rename from jesse/static/_nuxt/B8yvrODN.js rename to jesse/static/_nuxt/AyCRve0f.js index 56136a5dd..6740c8cb3 100644 --- a/jesse/static/_nuxt/B8yvrODN.js +++ b/jesse/static/_nuxt/AyCRve0f.js @@ -1,4 +1,4 @@ -import{m}from"./Ddw4NJNB.js";import"./DbTgESvQ.js";/*!----------------------------------------------------------------------------- +import{m}from"./Diw-o0Tt.js";import"./CtfKdue9.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) * Released under the MIT license diff --git a/jesse/static/_nuxt/B1aKZWRr.js b/jesse/static/_nuxt/B1aKZWRr.js new file mode 100644 index 000000000..f54891406 --- /dev/null +++ b/jesse/static/_nuxt/B1aKZWRr.js @@ -0,0 +1 @@ +import{h as C,r as U,N,o as r,E as c,w as i,b as o,t as k,d as n,l as t,a0 as T,c as x,M as u,S as q,a1 as S,a2 as D,T as A,H as $,a3 as F,a4 as M,a5 as R,y as P,e as _,j as W,F as H,a6 as G,f as z,a7 as J,W as O,a8 as Q}from"./CtfKdue9.js";import{_ as X}from"./Ca0ihDfi.js";import{_ as Y}from"./BhE9eUkV.js";import{u as Z}from"./BnUfHduR.js";import{S as ee}from"./Bd2bx7A5.js";const te={class:"flex justify-between items-center mb-2"},oe={class:"text-xl font-bold"},ae={class:"text-sm text-gray-500 dark:text-gray-400"},ne={class:"mt-4"},le={key:0,class:"flex justify-between"},se=o("span",{class:"font-medium"},"Bot Token:",-1),ie={key:1,class:"flex justify-between"},re=o("span",{class:"font-medium"},"Chat ID:",-1),de={key:2,class:"flex justify-between"},ue=o("span",{class:"font-medium"},"Webhook URL:",-1),ce=C({__name:"NotificationApiKey",props:{apiKey:{}},setup(I){const b=I,m=U(!1),h=U(!1),e=N();async function p(){h.value=!0;const{data:l,error:d}=await S("/notification-api-keys/delete",{id:b.apiKey.id},!0);if(h.value=!1,d.value&&d.value.statusCode!==200){D(d);return}m.value=!1,A("success","API Key deleted successfully"),e.notificationApiKeys=e.notificationApiKeys.filter(v=>v.id!==b.apiKey.id)}return(l,d)=>{const v=$,f=F,a=M;return r(),c(a,{class:"mb-4 p-4 bg-white"},{default:i(()=>[o("div",te,[o("h2",oe,k(l.apiKey.name)+" • "+k(l.apiKey.driver),1),n(v,{icon:"i-heroicons-trash",color:"red",label:"Delete",variant:"link",onClick:d[0]||(d[0]=y=>m.value=!0)})]),o("p",ae,k(t(T)(l.apiKey.created_at).value),1),o("div",ne,[l.apiKey.bot_token?(r(),x("div",le,[se,o("span",null,k(l.apiKey.bot_token),1)])):u("",!0),l.apiKey.chat_id?(r(),x("div",ie,[re,o("span",null,k(l.apiKey.chat_id),1)])):u("",!0),l.apiKey.webhook?(r(),x("div",de,[ue,o("span",null,k(l.apiKey.webhook),1)])):u("",!0),n(f,{modelValue:t(m),"onUpdate:modelValue":d[1]||(d[1]=y=>q(m)?m.value=y:null),title:"Delete API Key",description:`Are you sure you want to delete '${l.apiKey.name}' API key?`,type:"info"},{default:i(()=>[n(v,{variant:"solid",color:"red",class:"flex justify-center",label:"Delete",loading:t(h),onClick:p},null,8,["loading"])]),_:1},8,["modelValue","description"])])]),_:1})}}}),_e=o("p",null,[_(" Here you can add your API keys for various notification drivers. API keys are used to connect your account to the notification driver and allow the bot to send notifications on your behalf. "),o("br"),o("br"),_("Please note that for security reasons, once created, API keys cannot be modified or seen again. ")],-1),me=o("br",null,null,-1),pe=o("br",null,null,-1),fe={class:"flex justify-end"},ye={class:"mt-8"},ke={key:0},Ve=C({__name:"notification-api-keys",setup(I){Z({title:"Notification API Keys"});const b=U(!1),m=N(),h=[{label:"Telegram",value:"telegram"},{label:"Discord",value:"discord"},{label:"Slack",value:"slack"}],e=R({name:"",driver:h[0].value,bot_token:"",chat_id:"",webhook:""}),p=P(()=>m.notificationApiKeys),l=P(()=>e.driver==="telegram"?e.bot_token&&e.chat_id:e.webhook);async function d(){if(!l.value){A("error","Please fill in all required fields");return}const f={};e.driver==="telegram"?(f.bot_token=e.bot_token,f.chat_id=e.chat_id):(e.driver==="discord"||e.driver==="slack")&&(f.webhook=e.webhook);const a={driver:e.driver,name:e.name,fields:f};b.value=!0;const{data:y,error:V}=await S("/notification-api-keys/store",a,!0);b.value=!1,V.value&&V.value.statusCode!==200&&D(V);const g=y.value;g.status==="success"?(A("success","Successfully added API key"),p.value.push(g.data),v()):g.status==="error"&&A("error",g.message)}function v(){e.chat_id="",e.bot_token="",e.webhook="",e.name=""}return(f,a)=>{const y=G,V=z,g=X,w=J,K=O,j=$,B=Q,L=Y,E=ce;return r(),c(ee,null,{default:i(()=>[n(y,null,{default:i(()=>[_(" Notification API Keys ")]),_:1}),_e,me,o("p",null,[_(" If you need help setting up your API keys, please refer to the documentation for "),n(V,{class:"underline",href:"https://docs.jesse.trade/docs/notifications",target:"_blank"},{default:i(()=>[_("notification drivers")]),_:1}),_(". ")]),pe,n(B,{state:t(e),class:"space-y-4",onSubmit:d},{default:i(()=>[n(w,{label:"Driver:",required:""},{default:i(()=>[n(g,{modelValue:t(e).driver,"onUpdate:modelValue":a[0]||(a[0]=s=>t(e).driver=s),"value-attribute":"value",options:h},null,8,["modelValue"])]),_:1}),n(w,{label:"Name:",required:""},{default:i(()=>[n(K,{modelValue:t(e).name,"onUpdate:modelValue":a[1]||(a[1]=s=>t(e).name=s),type:"text",placeholder:"Give a name to this API key to identify it later"},null,8,["modelValue"])]),_:1}),t(e).driver==="telegram"?(r(),c(w,{key:0,label:"Bot Token:",required:""},{default:i(()=>[n(K,{modelValue:t(e).bot_token,"onUpdate:modelValue":a[2]||(a[2]=s=>t(e).bot_token=s),type:"text",placeholder:"Enter your Telegram bot token"},null,8,["modelValue"])]),_:1})):u("",!0),t(e).driver==="telegram"?(r(),c(w,{key:1,label:"Chat ID:",required:""},{default:i(()=>[n(K,{modelValue:t(e).chat_id,"onUpdate:modelValue":a[3]||(a[3]=s=>t(e).chat_id=s),type:"text",placeholder:"Enter your Telegram chat ID"},null,8,["modelValue"])]),_:1})):u("",!0),t(e).driver==="discord"?(r(),c(w,{key:2,label:"Webhook URL:",required:""},{default:i(()=>[n(K,{modelValue:t(e).webhook,"onUpdate:modelValue":a[4]||(a[4]=s=>t(e).webhook=s),type:"text",placeholder:"Enter your Discord webhook URL"},null,8,["modelValue"])]),_:1})):u("",!0),t(e).driver==="slack"?(r(),c(w,{key:3,label:"Webhook URL:",required:""},{default:i(()=>[n(K,{modelValue:t(e).webhook,"onUpdate:modelValue":a[5]||(a[5]=s=>t(e).webhook=s),type:"text",placeholder:"Enter your Slack webhook URL"},null,8,["modelValue"])]),_:1})):u("",!0),o("div",fe,[n(j,{type:"submit",icon:"i-heroicons-plus",class:"w-48 flex justify-center",label:"Create",loading:t(b),disabled:!t(l)},null,8,["loading","disabled"])])]),_:1},8,["state"]),o("div",ye,[n(y,null,{default:i(()=>[_(" Previously Added "),t(p).length?(r(),x("span",ke,"("+k(t(p).length)+")",1)):u("",!0)]),_:1}),t(p).length?u("",!0):(r(),c(L,{key:0},{default:i(()=>[_(" No API keys added yet ")]),_:1})),(r(!0),x(H,null,W(t(p),s=>(r(),c(E,{key:s.id,"api-key":s},null,8,["api-key"]))),128))])]),_:1})}}});export{Ve as default}; diff --git a/jesse/static/_nuxt/B1reJhqX.js b/jesse/static/_nuxt/B1reJhqX.js new file mode 100644 index 000000000..97688d6ab --- /dev/null +++ b/jesse/static/_nuxt/B1reJhqX.js @@ -0,0 +1 @@ +import{h as f,bq as m,br as I,y as r,bs as d,o as x,c as v,C as S,a as _}from"./CtfKdue9.js";const y=f({__name:"IconCSS",props:{name:{type:String,required:!0},size:{type:String,default:""}},setup(u){m(e=>({efdb04fa:p.value}));const s=I(),t=u,l=r(()=>{var e,n;return(n=(e=s.nuxtIcon)==null?void 0:e.aliases)!=null&&n[t.name]?s.nuxtIcon.aliases[t.name]:t.name}),c=r(()=>d(l.value)),p=r(()=>{var o,a;const e=(a=(o=s.nuxtIcon)==null?void 0:o.iconifyApiOptions)==null?void 0:a.url;if(e)try{new URL(e)}catch{console.warn("Nuxt IconCSS: Invalid custom Iconify API URL");return}return`url('${e||"https://api.iconify.design"}/${c.value.prefix}/${c.value.name}.svg')`}),i=r(()=>{var n,o,a;if(!t.size&&typeof((n=s.nuxtIcon)==null?void 0:n.size)=="boolean"&&!((o=s.nuxtIcon)!=null&&o.size))return;const e=t.size||((a=s.nuxtIcon)==null?void 0:a.size)||"1em";return String(Number(e))===e?`${e}px`:e});return(e,n)=>(x(),v("span",{style:S({width:i.value,height:i.value})},null,4))}}),g=_(y,[["__scopeId","data-v-41e8d397"]]);export{g as default}; diff --git a/jesse/static/_nuxt/BkeL-IZt.js b/jesse/static/_nuxt/B3g55Ev5.js similarity index 99% rename from jesse/static/_nuxt/BkeL-IZt.js rename to jesse/static/_nuxt/B3g55Ev5.js index cdfd50192..723f8ddb1 100644 --- a/jesse/static/_nuxt/BkeL-IZt.js +++ b/jesse/static/_nuxt/B3g55Ev5.js @@ -1,4 +1,4 @@ -import{m as F}from"./Ddw4NJNB.js";import"./DbTgESvQ.js";/*!----------------------------------------------------------------------------- +import{m as F}from"./Diw-o0Tt.js";import"./CtfKdue9.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) * Released under the MIT license diff --git a/jesse/static/_nuxt/7NBYyiEJ.js b/jesse/static/_nuxt/B5106L_X.js similarity index 98% rename from jesse/static/_nuxt/7NBYyiEJ.js rename to jesse/static/_nuxt/B5106L_X.js index 7cc0dfe11..63b653b6b 100644 --- a/jesse/static/_nuxt/7NBYyiEJ.js +++ b/jesse/static/_nuxt/B5106L_X.js @@ -1,4 +1,4 @@ -import{m as a}from"./Ddw4NJNB.js";import"./DbTgESvQ.js";/*!----------------------------------------------------------------------------- +import{m as a}from"./Diw-o0Tt.js";import"./CtfKdue9.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) * Released under the MIT license diff --git a/jesse/static/_nuxt/B8RB9kkw.js b/jesse/static/_nuxt/B8RB9kkw.js deleted file mode 100644 index 313a4e991..000000000 --- a/jesse/static/_nuxt/B8RB9kkw.js +++ /dev/null @@ -1 +0,0 @@ -import{h as C,r as U,D,o as r,H as c,w as i,b as o,t as k,d as n,l as t,W as E,c as x,J as u,K as T,X as N,Y as $,L as A,N as S,Z as F,$ as R,a0 as M,y as P,e as _,j as W,F as H,a1 as G,f as J,a2 as Q,Q as X,a3 as Y}from"./DbTgESvQ.js";import{_ as Z}from"./CoLc1c7O.js";import{_ as z}from"./C3V0pIhk.js";import{u as O}from"./C-G9LxTU.js";import{S as ee}from"./DqDqoIxu.js";const te={class:"flex justify-between items-center mb-2"},oe={class:"text-xl font-bold"},ae={class:"text-sm text-gray-500 dark:text-gray-400"},ne={class:"mt-4"},le={key:0,class:"flex justify-between"},se=o("span",{class:"font-medium"},"Bot Token:",-1),ie={key:1,class:"flex justify-between"},re=o("span",{class:"font-medium"},"Chat ID:",-1),de={key:2,class:"flex justify-between"},ue=o("span",{class:"font-medium"},"Webhook URL:",-1),ce=C({__name:"NotificationApiKey",props:{apiKey:{}},setup(I){const b=I,m=U(!1),h=U(!1),e=D();async function p(){h.value=!0;const{data:l,error:d}=await N("/notification-api-keys/delete",{id:b.apiKey.id},!0);if(h.value=!1,d.value&&d.value.statusCode!==200){$(d);return}m.value=!1,A("success","API Key deleted successfully"),e.notificationApiKeys=e.notificationApiKeys.filter(v=>v.id!==b.apiKey.id)}return(l,d)=>{const v=S,f=F,a=R;return r(),c(a,{class:"mb-4 p-4 bg-white"},{default:i(()=>[o("div",te,[o("h2",oe,k(l.apiKey.name)+" • "+k(l.apiKey.driver),1),n(v,{icon:"i-heroicons-trash",color:"red",label:"Delete",variant:"link",onClick:d[0]||(d[0]=y=>m.value=!0)})]),o("p",ae,k(t(E)(l.apiKey.created_at).value),1),o("div",ne,[l.apiKey.bot_token?(r(),x("div",le,[se,o("span",null,k(l.apiKey.bot_token),1)])):u("",!0),l.apiKey.chat_id?(r(),x("div",ie,[re,o("span",null,k(l.apiKey.chat_id),1)])):u("",!0),l.apiKey.webhook?(r(),x("div",de,[ue,o("span",null,k(l.apiKey.webhook),1)])):u("",!0),n(f,{modelValue:t(m),"onUpdate:modelValue":d[1]||(d[1]=y=>T(m)?m.value=y:null),title:"Delete API Key",description:`Are you sure you want to delete '${l.apiKey.name}' API key?`,type:"info"},{default:i(()=>[n(v,{variant:"solid",color:"red",class:"flex justify-center",label:"Delete",loading:t(h),onClick:p},null,8,["loading"])]),_:1},8,["modelValue","description"])])]),_:1})}}}),_e=o("p",null,[_(" Here you can add your API keys for various notification drivers. API keys are used to connect your account to the notification driver and allow the bot to send notifications on your behalf. "),o("br"),o("br"),_("Please note that for security reasons, once created, API keys cannot be modified or seen again. ")],-1),me=o("br",null,null,-1),pe=o("br",null,null,-1),fe={class:"flex justify-end"},ye={class:"mt-8"},ke={key:0},Ve=C({__name:"notification-api-keys",setup(I){O({title:"Notification API Keys"});const b=U(!1),m=D(),h=[{label:"Telegram",value:"telegram"},{label:"Discord",value:"discord"},{label:"Slack",value:"slack"}],e=M({name:"",driver:h[0].value,bot_token:"",chat_id:"",webhook:""}),p=P(()=>m.notificationApiKeys),l=P(()=>e.driver==="telegram"?e.bot_token&&e.chat_id:e.webhook);async function d(){if(!l.value){A("error","Please fill in all required fields");return}const f={};e.driver==="telegram"?(f.bot_token=e.bot_token,f.chat_id=e.chat_id):(e.driver==="discord"||e.driver==="slack")&&(f.webhook=e.webhook);const a={driver:e.driver,name:e.name,fields:f};b.value=!0;const{data:y,error:V}=await N("/notification-api-keys/store",a,!0);b.value=!1,V.value&&V.value.statusCode!==200&&$(V);const g=y.value;g.status==="success"?(A("success","Successfully added API key"),p.value.push(g.data),v()):g.status==="error"&&A("error",g.message)}function v(){e.chat_id="",e.bot_token="",e.webhook="",e.name=""}return(f,a)=>{const y=G,V=J,g=Z,w=Q,K=X,L=S,j=Y,B=z,q=ce;return r(),c(ee,null,{default:i(()=>[n(y,null,{default:i(()=>[_(" Notification API Keys ")]),_:1}),_e,me,o("p",null,[_(" If you need help setting up your API keys, please refer to the documentation for "),n(V,{class:"underline",href:"https://docs.jesse.trade/docs/notifications",target:"_blank"},{default:i(()=>[_("notification drivers")]),_:1}),_(". ")]),pe,n(j,{state:t(e),class:"space-y-4",onSubmit:d},{default:i(()=>[n(w,{label:"Driver:",required:""},{default:i(()=>[n(g,{modelValue:t(e).driver,"onUpdate:modelValue":a[0]||(a[0]=s=>t(e).driver=s),"value-attribute":"value",options:h},null,8,["modelValue"])]),_:1}),n(w,{label:"Name:",required:""},{default:i(()=>[n(K,{modelValue:t(e).name,"onUpdate:modelValue":a[1]||(a[1]=s=>t(e).name=s),type:"text",placeholder:"Give a name to this API key to identify it later"},null,8,["modelValue"])]),_:1}),t(e).driver==="telegram"?(r(),c(w,{key:0,label:"Bot Token:",required:""},{default:i(()=>[n(K,{modelValue:t(e).bot_token,"onUpdate:modelValue":a[2]||(a[2]=s=>t(e).bot_token=s),type:"text",placeholder:"Enter your Telegram bot token"},null,8,["modelValue"])]),_:1})):u("",!0),t(e).driver==="telegram"?(r(),c(w,{key:1,label:"Chat ID:",required:""},{default:i(()=>[n(K,{modelValue:t(e).chat_id,"onUpdate:modelValue":a[3]||(a[3]=s=>t(e).chat_id=s),type:"text",placeholder:"Enter your Telegram chat ID"},null,8,["modelValue"])]),_:1})):u("",!0),t(e).driver==="discord"?(r(),c(w,{key:2,label:"Webhook URL:",required:""},{default:i(()=>[n(K,{modelValue:t(e).webhook,"onUpdate:modelValue":a[4]||(a[4]=s=>t(e).webhook=s),type:"text",placeholder:"Enter your Discord webhook URL"},null,8,["modelValue"])]),_:1})):u("",!0),t(e).driver==="slack"?(r(),c(w,{key:3,label:"Webhook URL:",required:""},{default:i(()=>[n(K,{modelValue:t(e).webhook,"onUpdate:modelValue":a[5]||(a[5]=s=>t(e).webhook=s),type:"text",placeholder:"Enter your Slack webhook URL"},null,8,["modelValue"])]),_:1})):u("",!0),o("div",fe,[n(L,{type:"submit",icon:"i-heroicons-plus",class:"w-48 flex justify-center",label:"Create",loading:t(b),disabled:!t(l)},null,8,["loading","disabled"])])]),_:1},8,["state"]),o("div",ye,[n(y,null,{default:i(()=>[_(" Previously Added "),t(p).length?(r(),x("span",ke,"("+k(t(p).length)+")",1)):u("",!0)]),_:1}),t(p).length?u("",!0):(r(),c(B,{key:0},{default:i(()=>[_(" No API keys added yet ")]),_:1})),(r(!0),x(H,null,W(t(p),s=>(r(),c(q,{key:s.id,"api-key":s},null,8,["api-key"]))),128))])]),_:1})}}});export{Ve as default}; diff --git a/jesse/static/_nuxt/BJ_zMlAw.js b/jesse/static/_nuxt/BJ_zMlAw.js deleted file mode 100644 index 16a99437d..000000000 --- a/jesse/static/_nuxt/BJ_zMlAw.js +++ /dev/null @@ -1 +0,0 @@ -import{o as n,c as f,b as l,h as N,i as ye,r as w,F,j as ne,k as Pe,d as o,w as $,t as B,n as le,l as r,m as Ie,v as Ue,q as je,a9 as q,D as Q,L as O,f as Ae,y as _,G as M,H as V,e as he,X as Me,Q as Re,a2 as _e,aa as Be,N as ae,a3 as Oe,a as Ne,ab as ze,ac as me,ad as De,ae as Fe,af as qe,ag as He,ah as We,x as Ye,V as Qe,z as X,A as Ze,B as Je,a4 as fe,J as x,K as D,I as pe,P as ee,M as Ge,Z as Ke,O as Xe,R as et,T as tt}from"./DbTgESvQ.js";import{r as st}from"./CaMo12fb.js";import{b as ke,_ as ot,a as rt}from"./Dk2ncSqI.js";import{_ as lt}from"./C3V0pIhk.js";import{r as ge,_ as nt,a as at,d as it,c as ut}from"./BkF6Vqx3.js";import{_ as dt}from"./CoLc1c7O.js";import{a as ct,T as mt,_ as ft}from"./BuZcmfLY.js";import{u as pt}from"./C-G9LxTU.js";function ve(C,t){return n(),f("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25ZM6.75 12h.008v.008H6.75V12Zm0 3h.008v.008H6.75V15Zm0 3h.008v.008H6.75V18Z"})])}function gt(C,t){return n(),f("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 6.878V6a2.25 2.25 0 0 1 2.25-2.25h7.5A2.25 2.25 0 0 1 18 6v.878m-12 0c.235-.083.487-.128.75-.128h10.5c.263 0 .515.045.75.128m-12 0A2.25 2.25 0 0 0 4.5 9v.878m13.5-3A2.25 2.25 0 0 1 19.5 9v.878m0 0a2.246 2.246 0 0 0-.75-.128H5.25c-.263 0-.515.045-.75.128m15 0A2.25 2.25 0 0 1 21 12v6a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 18v-6c0-.98.626-1.813 1.5-2.122"})])}const vt={base:"animate-pulse",background:"bg-gray-100 dark:bg-gray-800",rounded:"rounded-md"},bt={class:"mb-4"},yt={class:"hidden sm:block"},ht={class:"relative rounded-lg shadow flex divide-x divide-gray-200 dark:divide-gray-700","aria-label":"Tabs"},_t=["onMouseup"],kt=["onClick"],xt={class:"absolute right-[1em] focus:outline-none"},$t=l("span",{"aria-hidden":"true",class:"absolute inset-x-0 bottom-0 h-0.5 bg-transparent dark:bg-gray-600"},null,-1),wt=N({__name:"LiveTabs",props:{tabs:{}},emits:["close"],setup(C,{emit:t}){const b=ye(),p=w(b.params.id),a=t;function m(){if(Object.keys(q().tabs).length>=Q().planLimits.live_trading_tabs){O("error",`You have reached the limit of "${Q().planLimits.live_trading_tabs}" tabs for your "${Q().plan}" plan. Please upgrade your plan to add more tabs.`);return}q().addTab()}function v(i){if(!i.form.routes.length)return"New Tab";if(i.results.exception.error&&i.results.monitoring)return"Error";const d=i.form.routes[0];let c="";const y=i.form.exchange;return y&&(c+=`${y} • `),d.strategy&&(c+=`${d.strategy} • `),d.symbol&&(c+=`${d.symbol} • `),d.timeframe&&(c+=`${d.timeframe}`),c=c.endsWith(" • ")?c.slice(0,-3):c,i.results.monitoring&&!i.results.finished?`🟢 ${c}`:i.results.exception.error&&i.results.monitoring?`🔴 ${c}`:i.results.showResults?`${c} | Results`:c}return(i,d)=>{const c=Ae;return n(),f("div",bt,[l("div",yt,[l("nav",ht,[(n(!0),f(F,null,ne(i.tabs,y=>(n(),f("div",{key:y.id,class:"relative group min-w-0 flex-1 overflow-hidden text-center flex items-center",onMouseup:Pe(U=>a("close",y.id),["middle"])},[o(c,{to:`/live/${y.id}`,class:le([y.id===r(p)?"text-gray-900 dark:text-gray-100 font-bold ":"text-gray-500 dark:text-gray-300 hover:text-gray-700 font-medium ","py-3 px-4 inline-block select-none cursor-pointer focus:outline-none w-full text-xs bg-gray-50 dark:bg-backdrop-dark"])},{default:$(()=>[l("span",null,B(v(y)),1),l("span",{"aria-hidden":"true",class:le([y.id===r(p)&&Object.keys(i.tabs).length>1?"bg-indigo-400":"bg-transparent dark:bg-gray-600","absolute inset-x-0 bottom-0 h-0.5"])},null,2)]),_:2},1032,["to","class"]),Ie(l("button",{class:"absolute right-[1em] focus:outline-none",onClick:U=>a("close",y.id)},[o(r(je),{class:"h-5 w-5 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 hover:bg-gray-200 bg-gray-100 dark:bg-gray-700 rounded-full","aria-hidden":"true"})],8,kt),[[Ue,Object.keys(i.tabs).length>1&&(!y.results.monitoring||y.results.finished)]])],40,_t))),128)),l("div",{class:"select-none cursor-pointer text-gray-400 dark:text-gray-100 hover:text-gray-600 focus:outline-none group relative w-14 overflow-hidden bg-gray-50 dark:bg-backdrop-dark py-3 px-4 font-medium hover:bg-gray-50 dark:hover:bg-gray-800 flex items-center justify-center",onClick:m},[l("button",xt,[o(r(st),{class:"h-6 w-6 rounded-full","aria-hidden":"true"})]),$t])])])])}}}),Ct=N({__name:"LiveOrders",props:{orders:{}},setup(C){const t=C,b=_(()=>{if(!t.orders.length)return[];const p=[];for(let a=t.orders.length-1;a>=0;a--){const m=t.orders[a];p.push([{value:m.id.slice(-12),style:"text-xs",tooltip:m.id,tag:"code"},{value:M.timestampToTimeOnly(m.created_at),style:"text-xs",tooltip:M.timestampToTime(m.created_at)},{value:m.symbol,style:"text-xs"},{value:m.type,style:"text-xs"},{value:m.side,style:M.colorBasedOnSide(m.side)},{value:m.price,style:"text-xs"},{value:m.qty,style:M.colorBasedOnSide(m.side)},{value:m.status,style:"text-xs"}])}return p});return(p,a)=>{const m=ke,v=lt;return r(b).length?(n(),V(m,{key:0,data:r(b),"header-items":["ID","Created","Symbol","Type","Side","Price","QTY","Status"],header:""},null,8,["data"])):(n(),V(v,{key:1}))}}}),Tt=l("p",null," If you think something is wrong with your running live session, you can submit a report. By submitting this form, the logs of this session will be sent to Jesse's developers so we can see what's going on. ",-1),Vt=l("br",null,null,-1),Lt=l("p",null,[he("Your exchange API keys and strategies are safe and "),l("b",null,"are never sent to us.")],-1),St=l("br",null,null,-1),Et=l("br",null,null,-1),Pt=l("br",null,null,-1),It={class:"flex justify-end item-center"},Ut={class:"flex justify-end"},jt=N({__name:"ReportLiveSession",emits:["close"],setup(C,{emit:t}){const b=t,p=w(!1),a=w({description:"",email:""}),m=()=>{b("close")},v=async()=>{p.value=!0;const{data:i,error:d}=await Me("/report-exception",{description:a.value.description,email:a.value.email,traceback:"manual report",mode:"live",attach_logs:!0,session_id:props.sessionId},!0);if(p.value=!1,d.value&&d.value.statusCode!==200){O("error",`[${d.value.statusCode}]: ${d.value.statusText}`);return}const c=i.value;c.status==="success"?(a.value.description="",a.value.email="",O("success",c.message),m()):c.status==="error"&&O("error",c.message)};return(i,d)=>{const c=Re,y=_e,U=Be,j=ae,k=Oe;return n(),f(F,null,[Tt,Vt,Lt,St,o(k,{state:r(a),class:"space-y-4",onSubmit:v},{default:$(()=>[o(y,{label:"Email (optional)",help:"Enter your email address for us to know who sent the email and possibly reply back to you."},{default:$(()=>[o(c,{modelValue:r(a).email,"onUpdate:modelValue":d[0]||(d[0]=L=>r(a).email=L),placeholder:"Email address...",type:"email"},null,8,["modelValue"])]),_:1}),Et,o(y,{label:"Description (optional):",name:"Description"},{default:$(()=>[o(U,{modelValue:r(a).description,"onUpdate:modelValue":d[1]||(d[1]=L=>r(a).description=L),rows:10,placeholder:"Describe what you think is wrong in this session..."},null,8,["modelValue"])]),_:1}),Pt,l("div",It,[l("div",Ut,[o(j,{color:"gray",variant:"link",class:"mr-8",label:"Cancel",onClick:d[2]||(d[2]=L=>m())}),o(j,{type:"submit",class:"w-48 flex justify-center",label:"Submit",loading:r(p),disabled:r(p)},null,8,["loading","disabled"])])])]),_:1},8,["state"])],64)}}}),At=ze(me.ui.strategy,me.ui.skeleton,vt),Mt=N({inheritAttrs:!1,props:{class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},setup(C){const{ui:t,attrs:b}=De("skeleton",Fe(C,"ui"),At),p=_(()=>qe(He(t.value.base,t.value.background,t.value.rounded),C.class));return{ui:t,attrs:b,skeletonClass:p}}});function Rt(C,t,b,p,a,m){return n(),f("div",We({class:C.skeletonClass},C.attrs),null,16)}const Bt=Ne(Mt,[["render",Rt]]),be={width:800,height:380,crosshair:{mode:ct.Normal}},Ot={chart:{layout:{background:{color:"#ffffff"},textColor:"rgba(33, 56, 77, 1)"},grid:{vertLines:{color:"#f1f1f1",visible:!1},horzLines:{color:"#f1f1f1",visible:!1}},priceScale:{borderColor:"rgba(197, 203, 206, 0.6)"},timeScale:{borderColor:"rgba(197, 203, 206, 0.6)",timeVisible:!0,secondsVisible:!1}},series:{color:"#4f46e5"}},Nt={chart:{layout:{background:{color:"#333333"},textColor:"#D1D5DB"},grid:{vertLines:{color:"#525252",visible:!1},horzLines:{color:"#525252",visible:!1}},priceScale:{borderColor:"#525252"},timeScale:{borderColor:"#525252",timeVisible:!0,secondsVisible:!1}},series:{color:"#818CF8"}},zt={class:"mb-16"},Dt={key:0,class:"rounded overflow-hidden border-2 border-gray-100 dark:border-gray-600 p-4"},Ft={key:1},qt=N({__name:"CandlesChart",props:{form:{},results:{}},setup(C){const t=Ye(),b=_(()=>Qe().params.id),p=w(!0),a=C,m=w();let v=null,i=null;const d={orderEntries:{},positionEntry:null},c=_(()=>t.value),y=a.form.exchange,U=_(()=>`${y}-${a.results.selectedRoute.symbol}-${a.results.selectedRoute.timeframe}`),j=_(()=>a.results.currentCandles),k=_(()=>{const g=a.results.positions.find(h=>h[0].value===a.results.selectedRoute.symbol);return g===void 0?[]:g}),L=_(()=>k.value[2].value),R=_(()=>Number(k.value[1].value)>0?"long":Number(k.value[1].value)<0?"short":"close");X(j,(g,h)=>{i!==null&&te(g[U.value])}),X(c,g=>{K(g)}),X(L,(g,h)=>{i!==null&&g!==h&&J()}),X(()=>a.results.orders,()=>{i!==null&&G()},{deep:!0}),Ze(async()=>{setTimeout(async()=>{await z()},200)});async function z(){p.value=!0,await q().fetchCandles(b.value),p.value=!1,be.width=m.value.clientWidth,v=mt(m.value,be),v.applyOptions({watermark:{visible:!0,fontSize:16,horzAlign:"left",vertAlign:"bottom",color:"#888",text:`${a.results.selectedRoute.symbol} • ${a.results.selectedRoute.timeframe}`}}),i=v.addCandlestickSeries(),i.setData(a.results.candles),v.timeScale().fitContent(),J(),G(),K(c.value)}Je(()=>{Z()});function Z(){v!==null&&(v.remove(),v=null),i&&(i=null)}function J(){const g=R.value==="long"?"#00AB5C":"#FF497D";if(d.positionEntry&&i.removePriceLine(d.positionEntry),Number(L.value)>0){const h={price:Number(L.value),color:g,lineWidth:1,lineStyle:0,axisLabelVisible:!0,title:"Entry Price"};d.positionEntry=i.createPriceLine(h)}}function G(){const g=k.value[0].value;for(const h in d.orderEntries)i.removePriceLine(d.orderEntries[h]),delete d.orderEntries[h];a.results.orders.forEach(h=>{const S=h.side==="buy"?"#00AB5C":"#FF497D",H=fe.startCase(fe.lowerCase(`${h.side} ${h.type}`));if((h.status==="ACTIVE"||h.status==="QUEUED")&&h.symbol===g){const A={price:Number(h.price),color:S,lineWidth:1,lineStyle:0,axisLabelVisible:!0,title:H};d.orderEntries[h.id]=i.createPriceLine(A)}})}function te(g){if(g===void 0)throw new TypeError("candle is undefined!");a.results.candles.length===0||a.results.candles[a.results.candles.length-1].time>g.time||i.update(g)}function K(g){v!==null&&v.applyOptions(g==="light"?Ot.chart:Nt.chart)}function se(g){a.results.selectedRoute=g,Z(),z()}return(g,h)=>{const S=Bt,H=ae;return n(),f("div",zt,[r(p)?(n(),f("div",Dt,[o(S,{class:"h-4 w-full mb-4"}),o(S,{class:"h-4 w-2/3 mb-4"}),o(S,{class:"h-4 w-1/2 mb-4"}),o(S,{class:"h-4 w-full mb-4"}),o(S,{class:"h-4 w-full mb-4"}),o(S,{class:"h-4 w-2/3 mb-4"}),o(S,{class:"h-4 w-full mb-4"}),o(S,{class:"h-4 w-full"})])):x("",!0),l("div",{ref_key:"chartContainer",ref:m,class:le({"rounded overflow-hidden border-2 border-gray-100 dark:border-gray-600":!r(p)})},null,2),a.form.routes.length>1?(n(),f("div",Ft,[(n(!0),f(F,null,ne(a.form.routes,A=>(n(),V(H,{key:A.symbol,variant:"soft",color:"gray",disabled:g.results.selectedRoute.symbol===A.symbol&&g.results.selectedRoute.timeframe===A.timeframe,class:"mt-2 mr-2",onClick:ie=>se(A)},{default:$(()=>[he(B(A.symbol)+" • "+B(A.timeframe),1)]),_:2},1032,["disabled","onClick"]))),128))])):x("",!0)])}}}),Ht={key:0,class:"flex flex-col items-center justify-center select-none mt-[10%]"},Wt=["textContent"],Yt={class:"mt-8"},Qt={key:1,class:"mx-auto container mt-8"},Zt={key:0,"data-cy":"live-page-content"},Jt={class:"flex justify-between items-center"},Gt=l("span",null," No exchange API keys found. Please add at least one: ",-1),Kt={class:"grid grid-cols-1 gap-6"},Xt={class:"flex justify-between items-center"},es=l("span",null," No notification API keys found. Please add at least one: ",-1),ts={key:1},ss={key:0,class:"mb-8"},os=l("span",null,"More",-1),rs={key:0},ls={key:0,class:"mt-8 lg:mt-0"},ns={key:1,"data-cy":"live-action-button"},as={key:1,class:"my-8 border-2 dark:border-gray-600 rounded-full"},is={key:2,class:"bg-white dark:bg-gray-700 grid grid-cols-1 gap-6 border dark:border-gray-600 rounded py-4 px-6 select-none"},us={class:"text-sm font-medium text-gray-500 dark:text-gray-400 truncate"},ds={class:"text-sm font-semibold text-gray-900 dark:text-gray-100"},cs={class:"flex justify-between items-center"},ms={class:"flex justify-start items-center"},fs=l("span",null,"Info Logs:",-1),ps={class:"focus:outline-none flex justify-start items-center"},gs={class:"text-sm font-semibold text-gray-900 dark:text-gray-100"},vs={class:"flex justify-between items-center"},bs={class:"flex justify-start items-center"},ys=l("span",null,"Error Logs:",-1),hs={class:"focus:outline-none flex justify-start items-center"},_s={class:"text-sm font-semibold text-gray-900 dark:text-gray-100"},ks={key:3},xs=N({__name:"LiveTab",props:{form:{},results:{}},setup(C){const t=C,b=w([]),p=w(!1),a=w(!1),m=w(!1),v=w(!1),i=w(!1),d=w(!1),c=w(!1),y=w(!1),U=w(!1),j=w(!1),k=Q(),L=q(),R=w([]);async function z(){if(!t.form.paper_mode){const e=k.exchangeApiKeys.find(s=>s.id===t.form.exchange_api_key_id);e&&(t.form.exchange=e.exchange)}R.value=await Q().getExchangeSupportedSymbols(t.form.exchange);for(let e=0;e0)for(let e=0;e{const e=[{label:"Exchange",value:t.results.generalInfo.exchange},{label:"Current Time",value:M.timestampToTime(t.results.generalInfo.current_time)},{label:"Debug Mode",value:t.results.generalInfo.debug_mode},{label:"Paper Trade",value:t.results.generalInfo.paper_mode},{label:"PNL",value:`${t.results.generalInfo.pnl} (${t.results.generalInfo.pnl_perc}%)`},{label:"Started",value:M.timestampToTime(t.results.generalInfo.started_at)},{label:"Started/Current Balance",value:`${t.results.generalInfo.started_balance} / ${t.results.generalInfo.current_balance}`},{label:"Trades",value:`${t.results.generalInfo.count_trades}`}];return t.results.generalInfo.leverage_type!=="spot"&&(e.push({label:"Available Margin",value:`${t.results.generalInfo.available_margin}`}),e.push({label:"Leverage",value:`${t.results.generalInfo.leverage}x (${t.results.generalInfo.leverage_type})`})),e}),J=_(()=>k.notificationApiKeys.map(e=>({label:`${e.name} - ${e.driver}`,value:e.id}))),G=_(()=>Math.round(t.results.progressbar.estimated_remaining_seconds)===0?"Please wait...":`${Math.round(t.results.progressbar.estimated_remaining_seconds)} seconds remaining...`),te=_(()=>{if(!t.results.orders)return[];const e=[],s=5,E=t.results.orders.length,P=E-s>=0?E-s:0;for(let W=E-1;W>=P;W--){const T=t.results.orders[W],I=T.status==="PARTIALLY FILLED"?`${T.filled_qty}/${T.qty}`:T.qty;e.push([{value:M.timestampToTimeOnly(T.created_at),style:"text-xs",tooltip:M.timestampToTime(T.created_at)},{value:T.symbol,style:"text-xs"},{value:T.type,style:"text-xs"},{value:T.side,style:M.colorBasedOnSide(T.side)},{value:T.price,style:"text-xs"},{value:I,style:M.colorBasedOnSide(T.side)},{value:T.status,style:"text-xs"}])}return e}),K=_(()=>{let e=[];const s=k.jesseSupportedTimeframes;return k.settings.live.generate_candles_from_1m||!t.form.exchange?e=s.map(E=>k.planLimits.timeframes.includes(E)?{label:E,value:E,disabled:!1}:{label:`${E} (Upgrade required)`,value:E,disabled:!0}):e=k.exchangeInfo[t.form.exchange].supported_timeframes.map(P=>k.planLimits.timeframes.includes(P)?{label:P,value:P,disabled:!1}:{label:`${P} (Upgrade required)`,value:P,disabled:!0}),e}),se=_(()=>k.liveTradingExchangeNames.map(e=>k.planLimits.exchanges.includes(e)?{label:e,value:e,disabled:!1}:{label:`${e} (Upgrade required)`,value:e,disabled:!0})),g=_(()=>k.exchangeApiKeys.map(e=>k.planLimits.exchanges.includes(e.exchange)?{label:`${e.exchange} - ${e.name}`,value:e.id,disabled:!1}:{label:`${e.exchange} - ${e.name} (Upgrade required)`,value:e.id,disabled:!0})),h=L.cancel,S=L.newLive;function H(e){if(b.value.length){for(let s=0;s{v.value=!1},3e3)}function xe(){m.value=!0,navigator.clipboard.writeText(t.results.errorLogs),O("success","Logs copied successfully"),i.value=!0,setTimeout(()=>{i.value=!1},3e3)}const ue=_(()=>["basic","pro","enterprise","lifetime"].includes(k.plan));return(e,s)=>{const E=Ct,P=Ge,W=jt,T=ot,I=ae,$e=Ke,we=nt,de=at,Y=Xe,oe=dt,Ce=rt,ce=et,Te=_e,Ve=qt,re=ke,Le=it,Se=ft,Ee=ut;return n(),f(F,null,[o(P,{modelValue:r(d),"onUpdate:modelValue":s[0]||(s[0]=u=>D(d)?d.value=u:null),size:"ultra",title:"Orders"},{default:$(()=>[o(E,{orders:e.results.orders},null,8,["orders"])]),_:1},8,["modelValue"]),o(P,{modelValue:r(c),"onUpdate:modelValue":s[2]||(s[2]=u=>D(c)?c.value=u:null),size:"small",title:"Report"},{default:$(()=>[o(W,{onClose:s[1]||(s[1]=u=>c.value=!1)})]),_:1},8,["modelValue"]),o(P,{modelValue:r(y),"onUpdate:modelValue":s[3]||(s[3]=u=>D(y)?y.value=u:null),title:"Info Logs"},{default:$(()=>[o(T,{logs:e.results.infoLogs},null,8,["logs"])]),buttons:$(()=>[l("button",{class:"ml-2 p-2 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full text-gray-400 hover:text-gray-500 dark:hover:text-gray-300 focus:outline-none",onClick:ie},[r(v)?(n(),V(r(pe),{key:0,class:"h-6 w-6","aria-hidden":"true"})):x("",!0),!r(v)&&e.results.infoLogs.length!=0?(n(),V(r(ge),{key:1,class:"h-6 w-6","aria-hidden":"true"})):x("",!0)])]),_:1},8,["modelValue"]),o(P,{modelValue:r(U),"onUpdate:modelValue":s[4]||(s[4]=u=>D(U)?U.value=u:null),title:"Error Logs"},{default:$(()=>[o(T,{logs:e.results.errorLogs},null,8,["logs"])]),buttons:$(()=>[l("button",{class:"ml-2 p-2 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full text-gray-400 hover:text-gray-500 dark:hover:text-gray-300 focus:outline-none",onClick:xe},[r(i)?(n(),V(r(pe),{key:0,class:"h-6 w-6","aria-hidden":"true"})):x("",!0),!r(i)&&e.results.errorLogs.length!=0?(n(),V(r(ge),{key:1,class:"h-6 w-6","aria-hidden":"true"})):x("",!0)])]),_:1},8,["modelValue"]),o($e,{modelValue:r(j),"onUpdate:modelValue":s[6]||(s[6]=u=>D(j)?j.value=u:null),title:"Termination Confirm",description:"Are you sure you want to terminate this session?",type:"info"},{default:$(()=>[o(I,{variant:"solid",color:"red",class:"flex justify-center",label:"Terminate",onClick:s[5]||(s[5]=u=>A((e._.provides[ee]||e.$route).params.id))})]),_:1},8,["modelValue"]),e.results.booting?(n(),f("div",Ht,[l("div",null,[o(we,{progress:e.results.progressbar.current},null,8,["progress"])]),e.results.exception.error?x("",!0):(n(),f("h3",{key:0,class:"mt-8 animate-pulse",textContent:B(r(G))},null,8,Wt)),l("div",Yt,[e.form.debug_mode?(n(),V(I,{key:0,icon:"i-heroicons-clipboard-document-list",variant:"solid",label:"View Logs",size:"xl",class:"flex justify-center w-64",onClick:s[7]||(s[7]=u=>y.value=!0)})):x("",!0),o(I,{color:"gray",class:"w-64 flex justify-center mt-4",size:"xl",ui:{color:{gray:{solid:"text-rose-500 dark:text-rose-400"}}},icon:"i-heroicons-no-symbol",variant:"solid",label:"Cancel",trailing:!1,onClick:s[8]||(s[8]=u=>r(h)((e._.provides[ee]||e.$route).params.id))})]),e.results.exception.error?(n(),f("div",Qt,[o(de,{modelValue:r(p),"onUpdate:modelValue":s[9]||(s[9]=u=>D(p)?p.value=u:null),title:e.results.exception.error,content:e.results.exception.traceback,mode:"live","debug-mode":e.form.debug_mode},null,8,["modelValue","title","content","debug-mode"])])):x("",!0)])):(n(),V(Ee,{key:1},{left:$(()=>[!e.results.booting&&!e.results.monitoring&&!e.results.showResults?(n(),f("div",Zt,[o(Y,{class:"mb-4",title:"Exchange"}),e.form.paper_mode?(n(),V(oe,{key:0,modelValue:e.form.exchange,"onUpdate:modelValue":s[10]||(s[10]=u=>e.form.exchange=u),placeholder:"Select an exchange...",searchable:"",options:r(se),"value-attribute":"value",size:"lg",class:"mt-2 mb-16",onChange:z},null,8,["modelValue","options"])):(n(),V(oe,{key:1,modelValue:e.form.exchange_api_key_id,"onUpdate:modelValue":s[11]||(s[11]=u=>e.form.exchange_api_key_id=u),placeholder:"Select an exchange...",searchable:"",options:r(g),"value-attribute":"value",size:"lg",class:"mt-2 mb-16",onChange:z},{empty:$(()=>[l("div",Jt,[Gt,o(I,{to:"/exchange-api-keys",icon:"i-heroicons-plus",type:"link",variant:"solid",size:"sm",label:"Add Exchange API Key"})])]),_:1},8,["modelValue","options"])),o(Ce,{"total-routes-error":r(b),form:e.form,results:e.results,mode:"live",symbols:r(R),timeframes:r(K)},null,8,["total-routes-error","form","results","symbols","timeframes"]),o(Y,{class:"mt-16 mb-4",title:"Options"}),l("div",Kt,[o(ce,{modelValue:e.form.debug_mode,"onUpdate:modelValue":s[12]||(s[12]=u=>e.form.debug_mode=u),title:"Debug Mode",description:"Logs more details, helpful for debugging."},null,8,["modelValue"]),o(ce,{modelValue:e.form.paper_mode,"onUpdate:modelValue":s[13]||(s[13]=u=>e.form.paper_mode=u),title:"Paper Trade",disabled:!r(ue),"disabled-guide":r(ue)?"":"Premium plan required",description:"Trade in real-time using actual exchange data with PAPER money."},null,8,["modelValue","disabled","disabled-guide"]),o(Te,{label:"Notifications:",help:"Select a notification driver to receive notifications"},{default:$(()=>[o(oe,{modelValue:e.form.notification_api_key_id,"onUpdate:modelValue":s[14]||(s[14]=u=>e.form.notification_api_key_id=u),placeholder:"Select a notification driver",size:"lg",options:r(J),"value-attribute":"value"},{empty:$(()=>[l("div",Xt,[es,o(I,{to:"/notification-api-keys",icon:"i-heroicons-plus",type:"link",variant:"solid",size:"sm",label:"Add Notification API Key"})])]),_:1},8,["modelValue","options"])]),_:1})])])):x("",!0),e.results.monitoring?(n(),f("div",ts,[e.results.exception.error?(n(),f("div",ss,[o(de,{title:e.results.exception.error,content:e.results.exception.traceback,mode:"live","debug-mode":e.form.debug_mode},null,8,["title","content","debug-mode"])])):x("",!0),e.results.monitoring&&!e.results.finished&&!e.results.exception.error?(n(),V(Ve,{key:1,results:e.results,form:e.form,exchange:e.form.exchange},null,8,["results","form","exchange"])):x("",!0),o(Y,{class:"mb-4",title:"Routes"}),o(re,{data:e.results.routes,"header-items":["Symbol","Timeframe","Strategy"],header:""},null,8,["data"]),o(Y,{class:"mt-12 mb-4",title:"Positions"}),o(re,{data:e.results.positions,"header-items":["Symbol","QTY","Entry","Price","Liq Price","PNL"],header:""},null,8,["data"]),o(Le,{class:"mt-12 mb-4",title:"Orders"},{default:$(()=>[l("button",{type:"button",class:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 dark:border-gray-900 text-sm leading-5 font-medium rounded-full text-gray-700 dark:text-gray-100 bg-white dark:bg-backdrop-dark hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none",onClick:s[15]||(s[15]=u=>d.value=!0)},[o(r(gt),{class:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"}),os])]),_:1}),o(re,{data:r(te),"header-items":["Created","Symbol","Type","Side","Price","QTY","Status"],header:""},null,8,["data"])])):x("",!0)]),right:$(()=>[e.results.booting?x("",!0):(n(),f("div",rs,[e.results.monitoring?(n(),f("div",ls,[e.results.finished?(n(),V(I,{key:0,class:"w-full flex justify-center",variant:"solid",icon:"i-heroicons-plus",size:"xl",label:"New session",onClick:s[16]||(s[16]=u=>r(S)((e._.provides[ee]||e.$route).params.id))})):(n(),V(I,{key:1,class:"w-full flex justify-center",variant:"solid",color:"gray",icon:"i-heroicons-no-symbol",size:"xl",label:e.results.terminating?"Terminating...":"Terminate",ui:{color:{gray:{solid:"text-rose-500 dark:text-rose-400"}}},onClick:s[17]||(s[17]=u=>j.value=!0)},null,8,["label"])),e.results.monitoring||e.results.finished?(n(),V(I,{key:2,class:"w-full flex justify-center mt-4",variant:"solid",color:"gray",icon:"i-heroicons-flag",size:"xl",label:"Report",onClick:s[18]||(s[18]=u=>c.value=!0)})):x("",!0)])):(n(),f("div",ns,[o(I,{class:"w-full flex justify-center",icon:"i-heroicons-bolt",size:"xl",variant:"solid",label:"Start",trailing:!1,onClick:s[19]||(s[19]=u=>H((e._.provides[ee]||e.$route).params.id))})]))])),e.results.monitoring?(n(),f("hr",as)):x("",!0),e.results.monitoring?(n(),f("dl",is,[(n(!0),f(F,null,ne(r(Z),u=>(n(),f("div",{key:u.label,class:"flex justify-between items-center"},[l("div",us,B(u.label)+":",1),l("div",ds,B(u.value),1)]))),128)),l("div",cs,[l("div",ms,[l("button",{class:"text-sm font-medium text-gray-500 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300 truncate flex items-center hover:underline cursor-pointer focus:outline-none",onClick:s[20]||(s[20]=u=>y.value=!0)},[fs,l("span",ps,[o(r(ve),{class:"w-6 h-6 ml-2"})])])]),l("div",gs,B(e.results.generalInfo.count_info_logs),1)]),l("div",vs,[l("div",bs,[l("button",{class:"text-sm font-medium text-gray-500 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300 truncate flex items-center hover:underline cursor-pointer focus:outline-none",onClick:s[21]||(s[21]=u=>U.value=!0)},[ys,l("span",hs,[o(r(ve),{class:"w-6 h-6 ml-2 cursor-pointer"})])])]),l("div",_s,B(e.results.generalInfo.count_error_logs),1)])])):x("",!0),e.results.monitoring&&e.results.watchlist.length?(n(),f("div",ks,[o(Y,{class:"mt-8 mb-4",title:"Watch List"}),o(Se,{data:e.results.watchlist},null,8,["data"])])):x("",!0)]),_:1}))],64)}}}),$s={class:"w-full"},Is=N({__name:"[id]",setup(C){pt({title:"Live/Paper trading - Jesse"});const t=q(),b=_(()=>t.tabs),p=ye(),a=_(()=>p.params.id),m=_(()=>{if(!b.value[a.value]){const v=Object.keys(b.value);if(v.length>0){const i=b.value[v[0]];return tt().push(`/live/${i.id}`),i}}return b.value[a.value]});return Object.keys(b.value).length===0&&q().addTab(),(v,i)=>{const d=wt,c=xs;return n(),f(F,null,[l("div",$s,[o(d,{tabs:b.value,onClose:r(t).closeTab},null,8,["tabs","onClose"])]),m.value?(n(),V(c,{key:0,form:m.value.form,results:m.value.results},null,8,["form","results"])):x("",!0)],64)}}});export{Is as default}; diff --git a/jesse/static/_nuxt/BTN5Q_u1.js b/jesse/static/_nuxt/BTN5Q_u1.js deleted file mode 100644 index d4a58153b..000000000 --- a/jesse/static/_nuxt/BTN5Q_u1.js +++ /dev/null @@ -1 +0,0 @@ -import{h as f,bn as m,bo as I,y as r,bp as d,o as x,c as v,C as S,a as _}from"./DbTgESvQ.js";const y=f({__name:"IconCSS",props:{name:{type:String,required:!0},size:{type:String,default:""}},setup(u){m(e=>({efdb04fa:p.value}));const t=I(),s=u,l=r(()=>{var e,n;return(n=(e=t.nuxtIcon)==null?void 0:e.aliases)!=null&&n[s.name]?t.nuxtIcon.aliases[s.name]:s.name}),c=r(()=>d(l.value)),p=r(()=>{var o,a;const e=(a=(o=t.nuxtIcon)==null?void 0:o.iconifyApiOptions)==null?void 0:a.url;if(e)try{new URL(e)}catch{console.warn("Nuxt IconCSS: Invalid custom Iconify API URL");return}return`url('${e||"https://api.iconify.design"}/${c.value.prefix}/${c.value.name}.svg')`}),i=r(()=>{var n,o,a;if(!s.size&&typeof((n=t.nuxtIcon)==null?void 0:n.size)=="boolean"&&!((o=t.nuxtIcon)!=null&&o.size))return;const e=s.size||((a=t.nuxtIcon)==null?void 0:a.size)||"1em";return String(Number(e))===e?`${e}px`:e});return(e,n)=>(x(),v("span",{style:S({width:i.value,height:i.value})},null,4))}}),g=_(y,[["__scopeId","data-v-41e8d397"]]);export{g as default}; diff --git a/jesse/static/_nuxt/CYkni-5b.js b/jesse/static/_nuxt/BVzqvNoh.js similarity index 77% rename from jesse/static/_nuxt/CYkni-5b.js rename to jesse/static/_nuxt/BVzqvNoh.js index efac3da8f..a0885c93f 100644 --- a/jesse/static/_nuxt/CYkni-5b.js +++ b/jesse/static/_nuxt/BVzqvNoh.js @@ -1 +1 @@ -import{h as c,T as n,s as r,o as i,c as p}from"./DbTgESvQ.js";const _=c({__name:"index",setup(u){const o=n(),t=r(),e=Object.keys(t.tabs);if(e.length>0){const s=e[0],a=t.tabs[s];o.push({path:`/backtest/${a.id}`})}else t.addTab();return(s,a)=>(i(),p("div"))}});export{_ as default}; +import{h as c,Z as n,s as r,o as i,c as p}from"./CtfKdue9.js";const _=c({__name:"index",setup(u){const o=n(),t=r(),e=Object.keys(t.tabs);if(e.length>0){const s=e[0],a=t.tabs[s];o.push({path:`/backtest/${a.id}`})}else t.addTab();return(s,a)=>(i(),p("div"))}});export{_ as default}; diff --git a/jesse/static/_nuxt/CB0tc-_L.js b/jesse/static/_nuxt/B_N8J-8A.js similarity index 99% rename from jesse/static/_nuxt/CB0tc-_L.js rename to jesse/static/_nuxt/B_N8J-8A.js index 3ebbcefad..b50f1f7b3 100644 --- a/jesse/static/_nuxt/CB0tc-_L.js +++ b/jesse/static/_nuxt/B_N8J-8A.js @@ -1,4 +1,4 @@ -import{m as Lt}from"./Ddw4NJNB.js";import"./DbTgESvQ.js";/*!----------------------------------------------------------------------------- +import{m as Lt}from"./Diw-o0Tt.js";import"./CtfKdue9.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) * Released under the MIT license diff --git a/jesse/static/_nuxt/BuZcmfLY.js b/jesse/static/_nuxt/BaIvpw_P.js similarity index 94% rename from jesse/static/_nuxt/BuZcmfLY.js rename to jesse/static/_nuxt/BaIvpw_P.js index 1190ff943..407d896bc 100644 --- a/jesse/static/_nuxt/BuZcmfLY.js +++ b/jesse/static/_nuxt/BaIvpw_P.js @@ -1,6 +1,6 @@ -import{h as Qs,o as It,c as Dt,F as Xs,j as qs,b as Ei,t as Oi}from"./DbTgESvQ.js";function S(h){var t=h.width,i=h.height;if(t<0)throw new Error("Negative width is not allowed for Size");if(i<0)throw new Error("Negative height is not allowed for Size");return{width:t,height:i}}function F(h,t){return h.width===t.width&&h.height===t.height}var Js=function(){function h(t){var i=this;this._resolutionListener=function(){return i._onResolutionChanged()},this._resolutionMediaQueryList=null,this._observers=[],this._window=t,this._installResolutionListener()}return h.prototype.dispose=function(){this._uninstallResolutionListener(),this._window=null},Object.defineProperty(h.prototype,"value",{get:function(){return this._window.devicePixelRatio},enumerable:!1,configurable:!0}),h.prototype.subscribe=function(t){var i=this,s={next:t};return this._observers.push(s),{unsubscribe:function(){i._observers=i._observers.filter(function(e){return e!==s})}}},h.prototype._installResolutionListener=function(){if(this._resolutionMediaQueryList!==null)throw new Error("Resolution listener is already installed");var t=this._window.devicePixelRatio;this._resolutionMediaQueryList=this._window.matchMedia("all and (resolution: ".concat(t,"dppx)")),this._resolutionMediaQueryList.addListener(this._resolutionListener)},h.prototype._uninstallResolutionListener=function(){this._resolutionMediaQueryList!==null&&(this._resolutionMediaQueryList.removeListener(this._resolutionListener),this._resolutionMediaQueryList=null)},h.prototype._reinstallResolutionListener=function(){this._uninstallResolutionListener(),this._installResolutionListener()},h.prototype._onResolutionChanged=function(){var t=this;this._observers.forEach(function(i){return i.next(t._window.devicePixelRatio)}),this._reinstallResolutionListener()},h}();function Ks(h){return new Js(h)}var Gs=function(){function h(t,i,s){var e;this._canvasElement=null,this._bitmapSizeChangedListeners=[],this._suggestedBitmapSize=null,this._suggestedBitmapSizeChangedListeners=[],this._devicePixelRatioObservable=null,this._canvasElementResizeObserver=null,this._canvasElement=t,this._canvasElementClientSize=S({width:this._canvasElement.clientWidth,height:this._canvasElement.clientHeight}),this._transformBitmapSize=i??function(n){return n},this._allowResizeObserver=(e=s==null?void 0:s.allowResizeObserver)!==null&&e!==void 0?e:!0,this._chooseAndInitObserver()}return h.prototype.dispose=function(){var t,i;if(this._canvasElement===null)throw new Error("Object is disposed");(t=this._canvasElementResizeObserver)===null||t===void 0||t.disconnect(),this._canvasElementResizeObserver=null,(i=this._devicePixelRatioObservable)===null||i===void 0||i.dispose(),this._devicePixelRatioObservable=null,this._suggestedBitmapSizeChangedListeners.length=0,this._bitmapSizeChangedListeners.length=0,this._canvasElement=null},Object.defineProperty(h.prototype,"canvasElement",{get:function(){if(this._canvasElement===null)throw new Error("Object is disposed");return this._canvasElement},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"canvasElementClientSize",{get:function(){return this._canvasElementClientSize},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"bitmapSize",{get:function(){return S({width:this.canvasElement.width,height:this.canvasElement.height})},enumerable:!1,configurable:!0}),h.prototype.resizeCanvasElement=function(t){this._canvasElementClientSize=S(t),this.canvasElement.style.width="".concat(this._canvasElementClientSize.width,"px"),this.canvasElement.style.height="".concat(this._canvasElementClientSize.height,"px"),this._invalidateBitmapSize()},h.prototype.subscribeBitmapSizeChanged=function(t){this._bitmapSizeChangedListeners.push(t)},h.prototype.unsubscribeBitmapSizeChanged=function(t){this._bitmapSizeChangedListeners=this._bitmapSizeChangedListeners.filter(function(i){return i!==t})},Object.defineProperty(h.prototype,"suggestedBitmapSize",{get:function(){return this._suggestedBitmapSize},enumerable:!1,configurable:!0}),h.prototype.subscribeSuggestedBitmapSizeChanged=function(t){this._suggestedBitmapSizeChangedListeners.push(t)},h.prototype.unsubscribeSuggestedBitmapSizeChanged=function(t){this._suggestedBitmapSizeChangedListeners=this._suggestedBitmapSizeChangedListeners.filter(function(i){return i!==t})},h.prototype.applySuggestedBitmapSize=function(){if(this._suggestedBitmapSize!==null){var t=this._suggestedBitmapSize;this._suggestedBitmapSize=null,this._resizeBitmap(t),this._emitSuggestedBitmapSizeChanged(t,this._suggestedBitmapSize)}},h.prototype._resizeBitmap=function(t){var i=this.bitmapSize;F(i,t)||(this.canvasElement.width=t.width,this.canvasElement.height=t.height,this._emitBitmapSizeChanged(i,t))},h.prototype._emitBitmapSizeChanged=function(t,i){var s=this;this._bitmapSizeChangedListeners.forEach(function(e){return e.call(s,t,i)})},h.prototype._suggestNewBitmapSize=function(t){var i=this._suggestedBitmapSize,s=S(this._transformBitmapSize(t,this._canvasElementClientSize)),e=F(this.bitmapSize,s)?null:s;i===null&&e===null||i!==null&&e!==null&&F(i,e)||(this._suggestedBitmapSize=e,this._emitSuggestedBitmapSizeChanged(i,e))},h.prototype._emitSuggestedBitmapSizeChanged=function(t,i){var s=this;this._suggestedBitmapSizeChangedListeners.forEach(function(e){return e.call(s,t,i)})},h.prototype._chooseAndInitObserver=function(){var t=this;if(!this._allowResizeObserver){this._initDevicePixelRatioObservable();return}ie().then(function(i){return i?t._initResizeObserver():t._initDevicePixelRatioObservable()})},h.prototype._initDevicePixelRatioObservable=function(){var t=this;if(this._canvasElement!==null){var i=ki(this._canvasElement);if(i===null)throw new Error("No window is associated with the canvas");this._devicePixelRatioObservable=Ks(i),this._devicePixelRatioObservable.subscribe(function(){return t._invalidateBitmapSize()}),this._invalidateBitmapSize()}},h.prototype._invalidateBitmapSize=function(){var t,i;if(this._canvasElement!==null){var s=ki(this._canvasElement);if(s!==null){var e=(i=(t=this._devicePixelRatioObservable)===null||t===void 0?void 0:t.value)!==null&&i!==void 0?i:s.devicePixelRatio,n=this._canvasElement.getClientRects(),r=n[0]!==void 0?se(n[0],e):S({width:this._canvasElementClientSize.width*e,height:this._canvasElementClientSize.height*e});this._suggestNewBitmapSize(r)}}},h.prototype._initResizeObserver=function(){var t=this;this._canvasElement!==null&&(this._canvasElementResizeObserver=new ResizeObserver(function(i){var s=i.find(function(r){return r.target===t._canvasElement});if(!(!s||!s.devicePixelContentBoxSize||!s.devicePixelContentBoxSize[0])){var e=s.devicePixelContentBoxSize[0],n=S({width:e.inlineSize,height:e.blockSize});t._suggestNewBitmapSize(n)}}),this._canvasElementResizeObserver.observe(this._canvasElement,{box:"device-pixel-content-box"}))},h}();function te(h,t){if(t.type==="device-pixel-content-box")return new Gs(h,t.transform,t.options);throw new Error("Unsupported binding target")}function ki(h){return h.ownerDocument.defaultView}function ie(){return new Promise(function(h){var t=new ResizeObserver(function(i){h(i.every(function(s){return"devicePixelContentBoxSize"in s})),t.disconnect()});t.observe(document.body,{box:"device-pixel-content-box"})}).catch(function(){return!1})}function se(h,t){return S({width:Math.round(h.left*t+h.width*t)-Math.round(h.left*t),height:Math.round(h.top*t+h.height*t)-Math.round(h.top*t)})}var ee=function(){function h(t,i,s){if(i.width===0||i.height===0)throw new TypeError("Rendering target could only be created on a media with positive width and height");if(this._mediaSize=i,s.width===0||s.height===0)throw new TypeError("Rendering target could only be created using a bitmap with positive integer width and height");this._bitmapSize=s,this._context=t}return h.prototype.useMediaCoordinateSpace=function(t){try{return this._context.save(),this._context.setTransform(1,0,0,1,0,0),this._context.scale(this._horizontalPixelRatio,this._verticalPixelRatio),t({context:this._context,mediaSize:this._mediaSize})}finally{this._context.restore()}},h.prototype.useBitmapCoordinateSpace=function(t){try{return this._context.save(),this._context.setTransform(1,0,0,1,0,0),t({context:this._context,mediaSize:this._mediaSize,bitmapSize:this._bitmapSize,horizontalPixelRatio:this._horizontalPixelRatio,verticalPixelRatio:this._verticalPixelRatio})}finally{this._context.restore()}},Object.defineProperty(h.prototype,"_horizontalPixelRatio",{get:function(){return this._bitmapSize.width/this._mediaSize.width},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"_verticalPixelRatio",{get:function(){return this._bitmapSize.height/this._mediaSize.height},enumerable:!1,configurable:!0}),h}();function H(h,t){var i=h.canvasElementClientSize;if(i.width===0||i.height===0)return null;var s=h.bitmapSize;if(s.width===0||s.height===0)return null;var e=h.canvasElement.getContext("2d",t);return e===null?null:new ee(e,i,s)}/*! +import{h as Qs,o as Dt,c as It,F as Xs,j as qs,b as Oi,t as ki}from"./CtfKdue9.js";function S(h){var t=h.width,i=h.height;if(t<0)throw new Error("Negative width is not allowed for Size");if(i<0)throw new Error("Negative height is not allowed for Size");return{width:t,height:i}}function F(h,t){return h.width===t.width&&h.height===t.height}var Js=function(){function h(t){var i=this;this._resolutionListener=function(){return i._onResolutionChanged()},this._resolutionMediaQueryList=null,this._observers=[],this._window=t,this._installResolutionListener()}return h.prototype.dispose=function(){this._uninstallResolutionListener(),this._window=null},Object.defineProperty(h.prototype,"value",{get:function(){return this._window.devicePixelRatio},enumerable:!1,configurable:!0}),h.prototype.subscribe=function(t){var i=this,s={next:t};return this._observers.push(s),{unsubscribe:function(){i._observers=i._observers.filter(function(e){return e!==s})}}},h.prototype._installResolutionListener=function(){if(this._resolutionMediaQueryList!==null)throw new Error("Resolution listener is already installed");var t=this._window.devicePixelRatio;this._resolutionMediaQueryList=this._window.matchMedia("all and (resolution: ".concat(t,"dppx)")),this._resolutionMediaQueryList.addListener(this._resolutionListener)},h.prototype._uninstallResolutionListener=function(){this._resolutionMediaQueryList!==null&&(this._resolutionMediaQueryList.removeListener(this._resolutionListener),this._resolutionMediaQueryList=null)},h.prototype._reinstallResolutionListener=function(){this._uninstallResolutionListener(),this._installResolutionListener()},h.prototype._onResolutionChanged=function(){var t=this;this._observers.forEach(function(i){return i.next(t._window.devicePixelRatio)}),this._reinstallResolutionListener()},h}();function Ks(h){return new Js(h)}var Gs=function(){function h(t,i,s){var e;this._canvasElement=null,this._bitmapSizeChangedListeners=[],this._suggestedBitmapSize=null,this._suggestedBitmapSizeChangedListeners=[],this._devicePixelRatioObservable=null,this._canvasElementResizeObserver=null,this._canvasElement=t,this._canvasElementClientSize=S({width:this._canvasElement.clientWidth,height:this._canvasElement.clientHeight}),this._transformBitmapSize=i??function(n){return n},this._allowResizeObserver=(e=s==null?void 0:s.allowResizeObserver)!==null&&e!==void 0?e:!0,this._chooseAndInitObserver()}return h.prototype.dispose=function(){var t,i;if(this._canvasElement===null)throw new Error("Object is disposed");(t=this._canvasElementResizeObserver)===null||t===void 0||t.disconnect(),this._canvasElementResizeObserver=null,(i=this._devicePixelRatioObservable)===null||i===void 0||i.dispose(),this._devicePixelRatioObservable=null,this._suggestedBitmapSizeChangedListeners.length=0,this._bitmapSizeChangedListeners.length=0,this._canvasElement=null},Object.defineProperty(h.prototype,"canvasElement",{get:function(){if(this._canvasElement===null)throw new Error("Object is disposed");return this._canvasElement},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"canvasElementClientSize",{get:function(){return this._canvasElementClientSize},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"bitmapSize",{get:function(){return S({width:this.canvasElement.width,height:this.canvasElement.height})},enumerable:!1,configurable:!0}),h.prototype.resizeCanvasElement=function(t){this._canvasElementClientSize=S(t),this.canvasElement.style.width="".concat(this._canvasElementClientSize.width,"px"),this.canvasElement.style.height="".concat(this._canvasElementClientSize.height,"px"),this._invalidateBitmapSize()},h.prototype.subscribeBitmapSizeChanged=function(t){this._bitmapSizeChangedListeners.push(t)},h.prototype.unsubscribeBitmapSizeChanged=function(t){this._bitmapSizeChangedListeners=this._bitmapSizeChangedListeners.filter(function(i){return i!==t})},Object.defineProperty(h.prototype,"suggestedBitmapSize",{get:function(){return this._suggestedBitmapSize},enumerable:!1,configurable:!0}),h.prototype.subscribeSuggestedBitmapSizeChanged=function(t){this._suggestedBitmapSizeChangedListeners.push(t)},h.prototype.unsubscribeSuggestedBitmapSizeChanged=function(t){this._suggestedBitmapSizeChangedListeners=this._suggestedBitmapSizeChangedListeners.filter(function(i){return i!==t})},h.prototype.applySuggestedBitmapSize=function(){if(this._suggestedBitmapSize!==null){var t=this._suggestedBitmapSize;this._suggestedBitmapSize=null,this._resizeBitmap(t),this._emitSuggestedBitmapSizeChanged(t,this._suggestedBitmapSize)}},h.prototype._resizeBitmap=function(t){var i=this.bitmapSize;F(i,t)||(this.canvasElement.width=t.width,this.canvasElement.height=t.height,this._emitBitmapSizeChanged(i,t))},h.prototype._emitBitmapSizeChanged=function(t,i){var s=this;this._bitmapSizeChangedListeners.forEach(function(e){return e.call(s,t,i)})},h.prototype._suggestNewBitmapSize=function(t){var i=this._suggestedBitmapSize,s=S(this._transformBitmapSize(t,this._canvasElementClientSize)),e=F(this.bitmapSize,s)?null:s;i===null&&e===null||i!==null&&e!==null&&F(i,e)||(this._suggestedBitmapSize=e,this._emitSuggestedBitmapSizeChanged(i,e))},h.prototype._emitSuggestedBitmapSizeChanged=function(t,i){var s=this;this._suggestedBitmapSizeChangedListeners.forEach(function(e){return e.call(s,t,i)})},h.prototype._chooseAndInitObserver=function(){var t=this;if(!this._allowResizeObserver){this._initDevicePixelRatioObservable();return}ie().then(function(i){return i?t._initResizeObserver():t._initDevicePixelRatioObservable()})},h.prototype._initDevicePixelRatioObservable=function(){var t=this;if(this._canvasElement!==null){var i=Ti(this._canvasElement);if(i===null)throw new Error("No window is associated with the canvas");this._devicePixelRatioObservable=Ks(i),this._devicePixelRatioObservable.subscribe(function(){return t._invalidateBitmapSize()}),this._invalidateBitmapSize()}},h.prototype._invalidateBitmapSize=function(){var t,i;if(this._canvasElement!==null){var s=Ti(this._canvasElement);if(s!==null){var e=(i=(t=this._devicePixelRatioObservable)===null||t===void 0?void 0:t.value)!==null&&i!==void 0?i:s.devicePixelRatio,n=this._canvasElement.getClientRects(),r=n[0]!==void 0?se(n[0],e):S({width:this._canvasElementClientSize.width*e,height:this._canvasElementClientSize.height*e});this._suggestNewBitmapSize(r)}}},h.prototype._initResizeObserver=function(){var t=this;this._canvasElement!==null&&(this._canvasElementResizeObserver=new ResizeObserver(function(i){var s=i.find(function(r){return r.target===t._canvasElement});if(!(!s||!s.devicePixelContentBoxSize||!s.devicePixelContentBoxSize[0])){var e=s.devicePixelContentBoxSize[0],n=S({width:e.inlineSize,height:e.blockSize});t._suggestNewBitmapSize(n)}}),this._canvasElementResizeObserver.observe(this._canvasElement,{box:"device-pixel-content-box"}))},h}();function te(h,t){if(t.type==="device-pixel-content-box")return new Gs(h,t.transform,t.options);throw new Error("Unsupported binding target")}function Ti(h){return h.ownerDocument.defaultView}function ie(){return new Promise(function(h){var t=new ResizeObserver(function(i){h(i.every(function(s){return"devicePixelContentBoxSize"in s})),t.disconnect()});t.observe(document.body,{box:"device-pixel-content-box"})}).catch(function(){return!1})}function se(h,t){return S({width:Math.round(h.left*t+h.width*t)-Math.round(h.left*t),height:Math.round(h.top*t+h.height*t)-Math.round(h.top*t)})}var ee=function(){function h(t,i,s){if(i.width===0||i.height===0)throw new TypeError("Rendering target could only be created on a media with positive width and height");if(this._mediaSize=i,s.width===0||s.height===0)throw new TypeError("Rendering target could only be created using a bitmap with positive integer width and height");this._bitmapSize=s,this._context=t}return h.prototype.useMediaCoordinateSpace=function(t){try{return this._context.save(),this._context.setTransform(1,0,0,1,0,0),this._context.scale(this._horizontalPixelRatio,this._verticalPixelRatio),t({context:this._context,mediaSize:this._mediaSize})}finally{this._context.restore()}},h.prototype.useBitmapCoordinateSpace=function(t){try{return this._context.save(),this._context.setTransform(1,0,0,1,0,0),t({context:this._context,mediaSize:this._mediaSize,bitmapSize:this._bitmapSize,horizontalPixelRatio:this._horizontalPixelRatio,verticalPixelRatio:this._verticalPixelRatio})}finally{this._context.restore()}},Object.defineProperty(h.prototype,"_horizontalPixelRatio",{get:function(){return this._bitmapSize.width/this._mediaSize.width},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"_verticalPixelRatio",{get:function(){return this._bitmapSize.height/this._mediaSize.height},enumerable:!1,configurable:!0}),h}();function H(h,t){var i=h.canvasElementClientSize;if(i.width===0||i.height===0)return null;var s=h.bitmapSize;if(s.width===0||s.height===0)return null;var e=h.canvasElement.getContext("2d",t);return e===null?null:new ee(e,i,s)}/*! * @license * TradingView Lightweight Charts™ v4.1.3 * Copyright (c) 2024 TradingView, Inc. * Licensed under Apache License 2.0 https://www.apache.org/licenses/LICENSE-2.0 - */const he={upColor:"#26a69a",downColor:"#ef5350",wickVisible:!0,borderVisible:!0,borderColor:"#378658",borderUpColor:"#26a69a",borderDownColor:"#ef5350",wickColor:"#737375",wickUpColor:"#26a69a",wickDownColor:"#ef5350"},ne={upColor:"#26a69a",downColor:"#ef5350",openVisible:!0,thinBars:!0},re={color:"#2196f3",lineStyle:0,lineWidth:3,lineType:0,lineVisible:!0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBorderWidth:2,crosshairMarkerBackgroundColor:"",lastPriceAnimation:0,pointMarkersVisible:!1},oe={topColor:"rgba( 46, 220, 135, 0.4)",bottomColor:"rgba( 40, 221, 100, 0)",invertFilledArea:!1,lineColor:"#33D778",lineStyle:0,lineWidth:3,lineType:0,lineVisible:!0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBorderWidth:2,crosshairMarkerBackgroundColor:"",lastPriceAnimation:0,pointMarkersVisible:!1},le={baseValue:{type:"price",price:0},topFillColor1:"rgba(38, 166, 154, 0.28)",topFillColor2:"rgba(38, 166, 154, 0.05)",topLineColor:"rgba(38, 166, 154, 1)",bottomFillColor1:"rgba(239, 83, 80, 0.05)",bottomFillColor2:"rgba(239, 83, 80, 0.28)",bottomLineColor:"rgba(239, 83, 80, 1)",lineWidth:3,lineStyle:0,lineType:0,lineVisible:!0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBorderWidth:2,crosshairMarkerBackgroundColor:"",lastPriceAnimation:0,pointMarkersVisible:!1},ae={color:"#26a69a",base:0},ys={color:"#2196f3"},Ms={title:"",visible:!0,lastValueVisible:!0,priceLineVisible:!0,priceLineSource:0,priceLineWidth:1,priceLineColor:"",priceLineStyle:2,baseLineVisible:!0,baseLineWidth:1,baseLineColor:"#B2B5BE",baseLineStyle:0,priceFormat:{type:"price",precision:2,minMove:.01}};var Ti,Ni;function j(h,t){const i={0:[],1:[h.lineWidth,h.lineWidth],2:[2*h.lineWidth,2*h.lineWidth],3:[6*h.lineWidth,6*h.lineWidth],4:[h.lineWidth,4*h.lineWidth]}[t];h.setLineDash(i)}function zs(h,t,i,s){h.beginPath();const e=h.lineWidth%2?.5:0;h.moveTo(i,t+e),h.lineTo(s,t+e),h.stroke()}function A(h,t){if(!h)throw new Error("Assertion failed"+(t?": "+t:""))}function O(h){if(h===void 0)throw new Error("Value is undefined");return h}function p(h){if(h===null)throw new Error("Value is null");return h}function X(h){return p(O(h))}(function(h){h[h.Simple=0]="Simple",h[h.WithSteps=1]="WithSteps",h[h.Curved=2]="Curved"})(Ti||(Ti={})),function(h){h[h.Solid=0]="Solid",h[h.Dotted=1]="Dotted",h[h.Dashed=2]="Dashed",h[h.LargeDashed=3]="LargeDashed",h[h.SparseDotted=4]="SparseDotted"}(Ni||(Ni={}));const Ri={khaki:"#f0e68c",azure:"#f0ffff",aliceblue:"#f0f8ff",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",gray:"#808080",green:"#008000",honeydew:"#f0fff0",floralwhite:"#fffaf0",lightblue:"#add8e6",lightcoral:"#f08080",lemonchiffon:"#fffacd",hotpink:"#ff69b4",lightyellow:"#ffffe0",greenyellow:"#adff2f",lightgoldenrodyellow:"#fafad2",limegreen:"#32cd32",linen:"#faf0e6",lightcyan:"#e0ffff",magenta:"#f0f",maroon:"#800000",olive:"#808000",orange:"#ffa500",oldlace:"#fdf5e6",mediumblue:"#0000cd",transparent:"#0000",lime:"#0f0",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",midnightblue:"#191970",orchid:"#da70d6",mediumorchid:"#ba55d3",mediumturquoise:"#48d1cc",orangered:"#ff4500",royalblue:"#4169e1",powderblue:"#b0e0e6",red:"#f00",coral:"#ff7f50",turquoise:"#40e0d0",white:"#fff",whitesmoke:"#f5f5f5",wheat:"#f5deb3",teal:"#008080",steelblue:"#4682b4",bisque:"#ffe4c4",aquamarine:"#7fffd4",aqua:"#0ff",sienna:"#a0522d",silver:"#c0c0c0",springgreen:"#00ff7f",antiquewhite:"#faebd7",burlywood:"#deb887",brown:"#a52a2a",beige:"#f5f5dc",chocolate:"#d2691e",chartreuse:"#7fff00",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cadetblue:"#5f9ea0",tomato:"#ff6347",fuchsia:"#f0f",blue:"#00f",salmon:"#fa8072",blanchedalmond:"#ffebcd",slateblue:"#6a5acd",slategray:"#708090",thistle:"#d8bfd8",tan:"#d2b48c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",blueviolet:"#8a2be2",black:"#000",darkmagenta:"#8b008b",darkslateblue:"#483d8b",darkkhaki:"#bdb76b",darkorchid:"#9932cc",darkorange:"#ff8c00",darkgreen:"#006400",darkred:"#8b0000",dodgerblue:"#1e90ff",darkslategray:"#2f4f4f",dimgray:"#696969",deepskyblue:"#00bfff",firebrick:"#b22222",forestgreen:"#228b22",indigo:"#4b0082",ivory:"#fffff0",lavenderblush:"#fff0f5",feldspar:"#d19275",indianred:"#cd5c5c",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightskyblue:"#87cefa",lightslategray:"#789",lightslateblue:"#8470ff",snow:"#fffafa",lightseagreen:"#20b2aa",lightsalmon:"#ffa07a",darksalmon:"#e9967a",darkviolet:"#9400d3",mediumpurple:"#9370d8",mediumaquamarine:"#66cdaa",skyblue:"#87ceeb",lavender:"#e6e6fa",lightsteelblue:"#b0c4de",mediumvioletred:"#c71585",mintcream:"#f5fffa",navajowhite:"#ffdead",navy:"#000080",olivedrab:"#6b8e23",palevioletred:"#d87093",violetred:"#d02090",yellow:"#ff0",yellowgreen:"#9acd32",lawngreen:"#7cfc00",pink:"#ffc0cb",paleturquoise:"#afeeee",palegoldenrod:"#eee8aa",darkolivegreen:"#556b2f",darkseagreen:"#8fbc8f",darkturquoise:"#00ced1",peachpuff:"#ffdab9",deeppink:"#ff1493",violet:"#ee82ee",palegreen:"#98fb98",mediumseagreen:"#3cb371",peru:"#cd853f",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",purple:"#800080",seagreen:"#2e8b57",seashell:"#fff5ee",papayawhip:"#ffefd5",mediumslateblue:"#7b68ee",plum:"#dda0dd",mediumspringgreen:"#00fa9a"};function N(h){return h<0?0:h>255?255:Math.round(h)||0}function xs(h){return h<=0||h>0?h<0?0:h>1?1:Math.round(1e4*h)/1e4:0}const ue=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,ce=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,de=/^rgb\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*\)$/,fe=/^rgba\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?[\d]{0,10}(?:\.\d+)?)\s*\)$/;function zt(h){(h=h.toLowerCase())in Ri&&(h=Ri[h]);{const t=fe.exec(h)||de.exec(h);if(t)return[N(parseInt(t[1],10)),N(parseInt(t[2],10)),N(parseInt(t[3],10)),xs(t.length<5?1:parseFloat(t[4]))]}{const t=ce.exec(h);if(t)return[N(parseInt(t[1],16)),N(parseInt(t[2],16)),N(parseInt(t[3],16)),1]}{const t=ue.exec(h);if(t)return[N(17*parseInt(t[1],16)),N(17*parseInt(t[2],16)),N(17*parseInt(t[3],16)),1]}throw new Error(`Cannot parse color: ${h}`)}function Et(h){const t=zt(h);return{t:`rgb(${t[0]}, ${t[1]}, ${t[2]})`,i:(i=t,.199*i[0]+.687*i[1]+.114*i[2]>160?"black":"white")};var i}class M{constructor(){this.h=[]}l(t,i,s){const e={o:t,_:i,u:s===!0};this.h.push(e)}v(t){const i=this.h.findIndex(s=>t===s.o);i>-1&&this.h.splice(i,1)}p(t){this.h=this.h.filter(i=>i._!==t)}m(t,i,s){const e=[...this.h];this.h=this.h.filter(n=>!n.u),e.forEach(n=>n.o(t,i,s))}M(){return this.h.length>0}S(){this.h=[]}}function R(h,...t){for(const i of t)for(const s in i)i[s]!==void 0&&(typeof i[s]!="object"||h[s]===void 0||Array.isArray(i[s])?h[s]=i[s]:R(h[s],i[s]));return h}function P(h){return typeof h=="number"&&isFinite(h)}function rt(h){return typeof h=="number"&&h%1==0}function ut(h){return typeof h=="string"}function ft(h){return typeof h=="boolean"}function W(h){const t=h;if(!t||typeof t!="object")return t;let i,s,e;for(s in i=Array.isArray(t)?[]:{},t)t.hasOwnProperty(s)&&(e=t[s],i[s]=e&&typeof e=="object"?W(e):e);return i}function me(h){return h!==null}function ot(h){return h===null?void 0:h}const ci="-apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif";function K(h,t,i){return t===void 0&&(t=ci),`${i=i!==void 0?`${i} `:""}${h}px ${t}`}class ve{constructor(t){this.k={C:1,T:5,P:NaN,R:"",D:"",O:"",A:"",V:0,B:0,I:0,L:0,N:0},this.F=t}W(){const t=this.k,i=this.j(),s=this.H();return t.P===i&&t.D===s||(t.P=i,t.D=s,t.R=K(i,s),t.L=2.5/12*i,t.V=t.L,t.B=i/12*t.T,t.I=i/12*t.T,t.N=0),t.O=this.$(),t.A=this.U(),this.k}$(){return this.F.W().layout.textColor}U(){return this.F.q()}j(){return this.F.W().layout.fontSize}H(){return this.F.W().layout.fontFamily}}class di{constructor(){this.Y=[]}X(t){this.Y=t}K(t,i,s){this.Y.forEach(e=>{e.K(t,i,s)})}}class B{K(t,i,s){t.useBitmapCoordinateSpace(e=>this.Z(e,i,s))}}class pe extends B{constructor(){super(...arguments),this.G=null}J(t){this.G=t}Z({context:t,horizontalPixelRatio:i,verticalPixelRatio:s}){if(this.G===null||this.G.tt===null)return;const e=this.G.tt,n=this.G,r=Math.max(1,Math.floor(i))%2/2,o=l=>{t.beginPath();for(let a=e.to-1;a>=e.from;--a){const u=n.it[a],c=Math.round(u.nt*i)+r,d=u.st*s,f=l*s+r;t.moveTo(c,d),t.arc(c,d,f,0,2*Math.PI)}t.fill()};n.et>0&&(t.fillStyle=n.rt,o(n.ht+n.et)),t.fillStyle=n.lt,o(n.ht)}}function be(){return{it:[{nt:0,st:0,ot:0,_t:0}],lt:"",rt:"",ht:0,et:0,tt:null}}const ge={from:0,to:1};class we{constructor(t,i){this.ut=new di,this.ct=[],this.dt=[],this.ft=!0,this.F=t,this.vt=i,this.ut.X(this.ct)}bt(t){const i=this.F.wt();i.length!==this.ct.length&&(this.dt=i.map(be),this.ct=this.dt.map(s=>{const e=new pe;return e.J(s),e}),this.ut.X(this.ct)),this.ft=!0}gt(){return this.ft&&(this.Mt(),this.ft=!1),this.ut}Mt(){const t=this.vt.W().mode===2,i=this.F.wt(),s=this.vt.xt(),e=this.F.St();i.forEach((n,r)=>{var o;const l=this.dt[r],a=n.kt(s);if(t||a===null||!n.yt())return void(l.tt=null);const u=p(n.Ct());l.lt=a.Tt,l.ht=a.ht,l.et=a.Pt,l.it[0]._t=a._t,l.it[0].st=n.Dt().Rt(a._t,u.Ot),l.rt=(o=a.At)!==null&&o!==void 0?o:this.F.Vt(l.it[0].st/n.Dt().Bt()),l.it[0].ot=s,l.it[0].nt=e.It(s),l.tt=ge})}}class _e extends B{constructor(t){super(),this.zt=t}Z({context:t,bitmapSize:i,horizontalPixelRatio:s,verticalPixelRatio:e}){if(this.zt===null)return;const n=this.zt.Lt.yt,r=this.zt.Et.yt;if(!n&&!r)return;const o=Math.round(this.zt.nt*s),l=Math.round(this.zt.st*e);t.lineCap="butt",n&&o>=0&&(t.lineWidth=Math.floor(this.zt.Lt.et*s),t.strokeStyle=this.zt.Lt.O,t.fillStyle=this.zt.Lt.O,j(t,this.zt.Lt.Nt),function(a,u,c,d){a.beginPath();const f=a.lineWidth%2?.5:0;a.moveTo(u+f,c),a.lineTo(u+f,d),a.stroke()}(t,o,0,i.height)),r&&l>=0&&(t.lineWidth=Math.floor(this.zt.Et.et*e),t.strokeStyle=this.zt.Et.O,t.fillStyle=this.zt.Et.O,j(t,this.zt.Et.Nt),zs(t,l,0,i.width))}}class Se{constructor(t){this.ft=!0,this.Ft={Lt:{et:1,Nt:0,O:"",yt:!1},Et:{et:1,Nt:0,O:"",yt:!1},nt:0,st:0},this.Wt=new _e(this.Ft),this.jt=t}bt(){this.ft=!0}gt(){return this.ft&&(this.Mt(),this.ft=!1),this.Wt}Mt(){const t=this.jt.yt(),i=p(this.jt.Ht()),s=i.$t().W().crosshair,e=this.Ft;if(s.mode===2)return e.Et.yt=!1,void(e.Lt.yt=!1);e.Et.yt=t&&this.jt.Ut(i),e.Lt.yt=t&&this.jt.qt(),e.Et.et=s.horzLine.width,e.Et.Nt=s.horzLine.style,e.Et.O=s.horzLine.color,e.Lt.et=s.vertLine.width,e.Lt.Nt=s.vertLine.style,e.Lt.O=s.vertLine.color,e.nt=this.jt.Yt(),e.st=this.jt.Xt()}}function ye(h,t,i,s,e,n){h.fillRect(t+n,i,s-2*n,n),h.fillRect(t+n,i+e-n,s-2*n,n),h.fillRect(t,i,n,e),h.fillRect(t+s-n,i,n,e)}function Ot(h,t,i,s,e,n){h.save(),h.globalCompositeOperation="copy",h.fillStyle=n,h.fillRect(t,i,s,e),h.restore()}function Bi(h,t){return h.map(i=>i===0?i:i+t)}function Vt(h,t,i,s,e,n){h.beginPath(),h.lineTo(t+s-n[1],i),n[1]!==0&&h.arcTo(t+s,i,t+s,i+n[1],n[1]),h.lineTo(t+s,i+e-n[2]),n[2]!==0&&h.arcTo(t+s,i+e,t+s-n[2],i+e,n[2]),h.lineTo(t+n[3],i+e),n[3]!==0&&h.arcTo(t,i+e,t,i+e-n[3],n[3]),h.lineTo(t,i+n[0]),n[0]!==0&&h.arcTo(t,i,t+n[0],i,n[0])}function Li(h,t,i,s,e,n,r=0,o=[0,0,0,0],l=""){if(h.save(),!r||!l||l===n)return Vt(h,t,i,s,e,o),h.fillStyle=n,h.fill(),void h.restore();const a=r/2;n!=="transparent"&&(Vt(h,t+r,i+r,s-2*r,e-2*r,Bi(o,-r)),h.fillStyle=n,h.fill()),l!=="transparent"&&(Vt(h,t+a,i+a,s-r,e-r,Bi(o,-a)),h.lineWidth=r,h.strokeStyle=l,h.closePath(),h.stroke()),h.restore()}function Cs(h,t,i,s,e,n,r){h.save(),h.globalCompositeOperation="copy";const o=h.createLinearGradient(0,0,0,e);o.addColorStop(0,n),o.addColorStop(1,r),h.fillStyle=o,h.fillRect(t,i,s,e),h.restore()}class Pi{constructor(t,i){this.J(t,i)}J(t,i){this.zt=t,this.Kt=i}Bt(t,i){return this.zt.yt?t.P+t.L+t.V:0}K(t,i,s,e){if(!this.zt.yt||this.zt.Zt.length===0)return;const n=this.zt.O,r=this.Kt.t,o=t.useBitmapCoordinateSpace(l=>{const a=l.context;a.font=i.R;const u=this.Gt(l,i,s,e),c=u.Jt,d=(f,m)=>{u.Qt?Li(a,c.ti,c.ii,c.ni,c.si,f,c.ei,[c.ht,0,0,c.ht],m):Li(a,c.ri,c.ii,c.ni,c.si,f,c.ei,[0,c.ht,c.ht,0],m)};return d(r,"transparent"),this.zt.hi&&(a.fillStyle=n,a.fillRect(c.ri,c.li,c.ai-c.ri,c.oi)),d("transparent",r),this.zt._i&&(a.fillStyle=i.A,a.fillRect(u.Qt?c.ui-c.ei:0,c.ii,c.ei,c.ci-c.ii)),u});t.useMediaCoordinateSpace(({context:l})=>{const a=o.di;l.font=i.R,l.textAlign=o.Qt?"right":"left",l.textBaseline="middle",l.fillStyle=n,l.fillText(this.zt.Zt,a.fi,(a.ii+a.ci)/2+a.vi)})}Gt(t,i,s,e){var n;const{context:r,bitmapSize:o,mediaSize:l,horizontalPixelRatio:a,verticalPixelRatio:u}=t,c=this.zt.hi||!this.zt.pi?i.T:0,d=this.zt.mi?i.C:0,f=i.L+this.Kt.bi,m=i.V+this.Kt.wi,v=i.B,b=i.I,g=this.zt.Zt,w=i.P,y=s.gi(r,g),_=Math.ceil(s.Mi(r,g)),z=w+f+m,T=i.C+v+b+_+c,E=Math.max(1,Math.floor(u));let C=Math.round(z*u);C%2!=E%2&&(C+=1);const D=d>0?Math.max(1,Math.floor(d*a)):0,Y=Math.round(T*a),Mi=Math.round(c*a),Ys=(n=this.Kt.xi)!==null&&n!==void 0?n:this.Kt.Si,zi=Math.round(Ys*u)-Math.floor(.5*u),Bt=Math.floor(zi+E/2-C/2),xi=Bt+C,dt=e==="right",Ci=dt?l.width-d:d,tt=dt?o.width-D:D;let Lt,Pt,Wt;return dt?(Lt=tt-Y,Pt=tt-Mi,Wt=Ci-c-v-d):(Lt=tt+Y,Pt=tt+Mi,Wt=Ci+c+v),{Qt:dt,Jt:{ii:Bt,li:zi,ci:xi,ni:Y,si:C,ht:2*a,ei:D,ti:Lt,ri:tt,ai:Pt,oi:E,ui:o.width},di:{ii:Bt/u,ci:xi/u,fi:Wt,vi:y}}}}class kt{constructor(t){this.ki={Si:0,t:"#000",wi:0,bi:0},this.yi={Zt:"",yt:!1,hi:!0,pi:!1,At:"",O:"#FFF",_i:!1,mi:!1},this.Ci={Zt:"",yt:!1,hi:!1,pi:!0,At:"",O:"#FFF",_i:!0,mi:!0},this.ft=!0,this.Ti=new(t||Pi)(this.yi,this.ki),this.Pi=new(t||Pi)(this.Ci,this.ki)}Zt(){return this.Ri(),this.yi.Zt}Si(){return this.Ri(),this.ki.Si}bt(){this.ft=!0}Bt(t,i=!1){return Math.max(this.Ti.Bt(t,i),this.Pi.Bt(t,i))}Di(){return this.ki.xi||0}Oi(t){this.ki.xi=t}Ai(){return this.Ri(),this.yi.yt||this.Ci.yt}Vi(){return this.Ri(),this.yi.yt}gt(t){return this.Ri(),this.yi.hi=this.yi.hi&&t.W().ticksVisible,this.Ci.hi=this.Ci.hi&&t.W().ticksVisible,this.Ti.J(this.yi,this.ki),this.Pi.J(this.Ci,this.ki),this.Ti}Bi(){return this.Ri(),this.Ti.J(this.yi,this.ki),this.Pi.J(this.Ci,this.ki),this.Pi}Ri(){this.ft&&(this.yi.hi=!0,this.Ci.hi=!1,this.Ii(this.yi,this.Ci,this.ki))}}class Me extends kt{constructor(t,i,s){super(),this.jt=t,this.zi=i,this.Li=s}Ii(t,i,s){if(t.yt=!1,this.jt.W().mode===2)return;const e=this.jt.W().horzLine;if(!e.labelVisible)return;const n=this.zi.Ct();if(!this.jt.yt()||this.zi.Ei()||n===null)return;const r=Et(e.labelBackgroundColor);s.t=r.t,t.O=r.i;const o=2/12*this.zi.P();s.bi=o,s.wi=o;const l=this.Li(this.zi);s.Si=l.Si,t.Zt=this.zi.Ni(l._t,n),t.yt=!0}}const ze=/[1-9]/g;class Es{constructor(){this.zt=null}J(t){this.zt=t}K(t,i){if(this.zt===null||this.zt.yt===!1||this.zt.Zt.length===0)return;const s=t.useMediaCoordinateSpace(({context:d})=>(d.font=i.R,Math.round(i.Fi.Mi(d,p(this.zt).Zt,ze))));if(s<=0)return;const e=i.Wi,n=s+2*e,r=n/2,o=this.zt.ji;let l=this.zt.Si,a=Math.floor(l-r)+.5;a<0?(l+=Math.abs(0-a),a=Math.floor(l-r)+.5):a+n>o&&(l-=Math.abs(o-(a+n)),a=Math.floor(l-r)+.5);const u=a+n,c=Math.ceil(0+i.C+i.T+i.L+i.P+i.V);t.useBitmapCoordinateSpace(({context:d,horizontalPixelRatio:f,verticalPixelRatio:m})=>{const v=p(this.zt);d.fillStyle=v.t;const b=Math.round(a*f),g=Math.round(0*m),w=Math.round(u*f),y=Math.round(c*m),_=Math.round(2*f);if(d.beginPath(),d.moveTo(b,g),d.lineTo(b,y-_),d.arcTo(b,y,b+_,y,_),d.lineTo(w-_,y),d.arcTo(w,y,w,y-_,_),d.lineTo(w,g),d.fill(),v.hi){const z=Math.round(v.Si*f),T=g,E=Math.round((T+i.T)*m);d.fillStyle=v.O;const C=Math.max(1,Math.floor(f)),D=Math.floor(.5*f);d.fillRect(z-D,T,C,E-T)}}),t.useMediaCoordinateSpace(({context:d})=>{const f=p(this.zt),m=0+i.C+i.T+i.L+i.P/2;d.font=i.R,d.textAlign="left",d.textBaseline="middle",d.fillStyle=f.O;const v=i.Fi.gi(d,"Apr0");d.translate(a+e,m+v),d.fillText(f.Zt,0,0)})}}class xe{constructor(t,i,s){this.ft=!0,this.Wt=new Es,this.Ft={yt:!1,t:"#4c525e",O:"white",Zt:"",ji:0,Si:NaN,hi:!0},this.vt=t,this.Hi=i,this.Li=s}bt(){this.ft=!0}gt(){return this.ft&&(this.Mt(),this.ft=!1),this.Wt.J(this.Ft),this.Wt}Mt(){const t=this.Ft;if(t.yt=!1,this.vt.W().mode===2)return;const i=this.vt.W().vertLine;if(!i.labelVisible)return;const s=this.Hi.St();if(s.Ei())return;t.ji=s.ji();const e=this.Li();if(e===null)return;t.Si=e.Si;const n=s.$i(this.vt.xt());t.Zt=s.Ui(p(n)),t.yt=!0;const r=Et(i.labelBackgroundColor);t.t=r.t,t.O=r.i,t.hi=s.W().ticksVisible}}class fi{constructor(){this.qi=null,this.Yi=0}Xi(){return this.Yi}Ki(t){this.Yi=t}Dt(){return this.qi}Zi(t){this.qi=t}Gi(t){return[]}Ji(){return[]}yt(){return!0}}var Wi;(function(h){h[h.Normal=0]="Normal",h[h.Magnet=1]="Magnet",h[h.Hidden=2]="Hidden"})(Wi||(Wi={}));class Ce extends fi{constructor(t,i){super(),this.Qi=null,this.tn=NaN,this.nn=0,this.sn=!0,this.en=new Map,this.rn=!1,this.hn=NaN,this.ln=NaN,this.an=NaN,this.on=NaN,this.Hi=t,this._n=i,this.un=new we(t,this),this.cn=((e,n)=>r=>{const o=n(),l=e();if(r===p(this.Qi).dn())return{_t:l,Si:o};{const a=p(r.Ct());return{_t:r.fn(o,a),Si:o}}})(()=>this.tn,()=>this.ln);const s=((e,n)=>()=>{const r=this.Hi.St().vn(e()),o=n();return r&&Number.isFinite(o)?{ot:r,Si:o}:null})(()=>this.nn,()=>this.Yt());this.pn=new xe(this,t,s),this.mn=new Se(this)}W(){return this._n}bn(t,i){this.an=t,this.on=i}wn(){this.an=NaN,this.on=NaN}gn(){return this.an}Mn(){return this.on}xn(t,i,s){this.rn||(this.rn=!0),this.sn=!0,this.Sn(t,i,s)}xt(){return this.nn}Yt(){return this.hn}Xt(){return this.ln}yt(){return this.sn}kn(){this.sn=!1,this.yn(),this.tn=NaN,this.hn=NaN,this.ln=NaN,this.Qi=null,this.wn()}Cn(t){return this.Qi!==null?[this.mn,this.un]:[]}Ut(t){return t===this.Qi&&this._n.horzLine.visible}qt(){return this._n.vertLine.visible}Tn(t,i){this.sn&&this.Qi===t||this.en.clear();const s=[];return this.Qi===t&&s.push(this.Pn(this.en,i,this.cn)),s}Ji(){return this.sn?[this.pn]:[]}Ht(){return this.Qi}Rn(){this.mn.bt(),this.en.forEach(t=>t.bt()),this.pn.bt(),this.un.bt()}Dn(t){return t&&!t.dn().Ei()?t.dn():null}Sn(t,i,s){this.On(t,i,s)&&this.Rn()}On(t,i,s){const e=this.hn,n=this.ln,r=this.tn,o=this.nn,l=this.Qi,a=this.Dn(s);this.nn=t,this.hn=isNaN(t)?NaN:this.Hi.St().It(t),this.Qi=s;const u=a!==null?a.Ct():null;return a!==null&&u!==null?(this.tn=i,this.ln=a.Rt(i,u)):(this.tn=NaN,this.ln=NaN),e!==this.hn||n!==this.ln||o!==this.nn||r!==this.tn||l!==this.Qi}yn(){const t=this.Hi.wt().map(s=>s.Vn().An()).filter(me),i=t.length===0?null:Math.max(...t);this.nn=i!==null?i:NaN}Pn(t,i,s){let e=t.get(i);return e===void 0&&(e=new Me(this,i,s),t.set(i,e)),e}}function Tt(h){return h==="left"||h==="right"}class x{constructor(t){this.Bn=new Map,this.In=[],this.zn=t}Ln(t,i){const s=function(e,n){return e===void 0?n:{En:Math.max(e.En,n.En),Nn:e.Nn||n.Nn}}(this.Bn.get(t),i);this.Bn.set(t,s)}Fn(){return this.zn}Wn(t){const i=this.Bn.get(t);return i===void 0?{En:this.zn}:{En:Math.max(this.zn,i.En),Nn:i.Nn}}jn(){this.Hn(),this.In=[{$n:0}]}Un(t){this.Hn(),this.In=[{$n:1,Ot:t}]}qn(t){this.Yn(),this.In.push({$n:5,Ot:t})}Hn(){this.Yn(),this.In.push({$n:6})}Xn(){this.Hn(),this.In=[{$n:4}]}Kn(t){this.Hn(),this.In.push({$n:2,Ot:t})}Zn(t){this.Hn(),this.In.push({$n:3,Ot:t})}Gn(){return this.In}Jn(t){for(const i of t.In)this.Qn(i);this.zn=Math.max(this.zn,t.zn),t.Bn.forEach((i,s)=>{this.Ln(s,i)})}static ts(){return new x(2)}static ns(){return new x(3)}Qn(t){switch(t.$n){case 0:this.jn();break;case 1:this.Un(t.Ot);break;case 2:this.Kn(t.Ot);break;case 3:this.Zn(t.Ot);break;case 4:this.Xn();break;case 5:this.qn(t.Ot);break;case 6:this.Yn()}}Yn(){const t=this.In.findIndex(i=>i.$n===5);t!==-1&&this.In.splice(t,1)}}const Ii=".";function I(h,t){if(!P(h))return"n/a";if(!rt(t))throw new TypeError("invalid length");if(t<0||t>16)throw new TypeError("invalid length");return t===0?h.toString():("0000000000000000"+h.toString()).slice(-t)}class Nt{constructor(t,i){if(i||(i=1),P(t)&&rt(t)||(t=100),t<0)throw new TypeError("invalid base");this.zi=t,this.ss=i,this.es()}format(t){const i=t<0?"−":"";return t=Math.abs(t),i+this.rs(t)}es(){if(this.hs=0,this.zi>0&&this.ss>0){let t=this.zi;for(;t>1;)t/=10,this.hs++}}rs(t){const i=this.zi/this.ss;let s=Math.floor(t),e="";const n=this.hs!==void 0?this.hs:NaN;if(i>1){let r=+(Math.round(t*i)-s*i).toFixed(this.hs);r>=i&&(r-=i,s+=1),e=Ii+I(+r.toFixed(this.hs)*this.ss,n)}else s=Math.round(s*i)/i,n>0&&(e=Ii+I(0,n));return s.toFixed(0)+e}}class Os extends Nt{constructor(t=100){super(t)}format(t){return`${super.format(t)}%`}}class Ee{constructor(t){this.ls=t}format(t){let i="";return t<0&&(i="-",t=-t),t<995?i+this.os(t):t<999995?i+this.os(t/1e3)+"K":t<999999995?(t=1e3*Math.round(t/1e3),i+this.os(t/1e6)+"M"):(t=1e6*Math.round(t/1e6),i+this.os(t/1e9)+"B")}os(t){let i;const s=Math.pow(10,this.ls);return i=(t=Math.round(t*s)/s)>=1e-15&&t<1?t.toFixed(this.ls).replace(/\.?0+$/,""):String(t),i.replace(/(\.[1-9]*)0+$/,(e,n)=>n)}}function ks(h,t,i,s,e,n,r){if(t.length===0||s.from>=t.length||s.to<=0)return;const{context:o,horizontalPixelRatio:l,verticalPixelRatio:a}=h,u=t[s.from];let c=n(h,u),d=u;if(s.to-s.from<2){const f=e/2;o.beginPath();const m={nt:u.nt-f,st:u.st},v={nt:u.nt+f,st:u.st};o.moveTo(m.nt*l,m.st*a),o.lineTo(v.nt*l,v.st*a),r(h,c,m,v)}else{const f=(v,b)=>{r(h,c,d,b),o.beginPath(),c=v,d=b};let m=d;o.beginPath(),o.moveTo(u.nt*l,u.st*a);for(let v=s.from+1;v=m.from;--T){const E=d[T];if(E){const C=v(c,E);C!==y&&(w.beginPath(),y!==null&&w.fill(),w.fillStyle=C,y=C);const D=Math.round(E.nt*b)+_,Y=E.st*g;w.moveTo(D,Y),w.arc(D,Y,z,0,2*Math.PI)}}w.fill()}(t,i,l,s,u)}}class Bs extends Rs{Ps(t,i){return i.lt}}function Ls(h,t,i,s,e=0,n=t.length){let r=n-e;for(;0>1,l=e+o;s(t[l],i)===h?(e=l+1,r-=o+1):r=o}return e}const ct=Ls.bind(null,!0),Ps=Ls.bind(null,!1);function Re(h,t){return h.ot0&&n=s&&(o=n-1),r>0&&rObject.assign(Object.assign({},t),this.Is.js().Ws(t.ot)))}Hs(){this.Bs=null}Es(){this.Os&&(this.$s(),this.Os=!1),this.As&&(this.Fs(),this.As=!1),this.Ds&&(this.Us(),this.Ds=!1)}Us(){const t=this.Is.Dt(),i=this.zs.St();if(this.Hs(),i.Ei()||t.Ei())return;const s=i.qs();if(s===null||this.Is.Vn().Ys()===0)return;const e=this.Is.Ct();e!==null&&(this.Bs=Ws(this.Vs,s,this.Ls),this.Xs(t,i,e.Ot),this.Ks())}}class Rt extends vi{constructor(t,i){super(t,i,!0)}Xs(t,i,s){i.Zs(this.Vs,ot(this.Bs)),t.Gs(this.Vs,s,ot(this.Bs))}Js(t,i){return{ot:t,_t:i,nt:NaN,st:NaN}}$s(){const t=this.Is.js();this.Vs=this.Is.Vn().Qs().map(i=>{const s=i.Ot[3];return this.te(i.ie,s,t)})}}class Le extends Rt{constructor(t,i){super(t,i),this.Ns=new di,this.ne=new Te,this.se=new Bs,this.Ns.X([this.ne,this.se])}te(t,i,s){return Object.assign(Object.assign({},this.Js(t,i)),s.Ws(t))}Ks(){const t=this.Is.W();this.ne.J({us:t.lineType,it:this.Vs,Nt:t.lineStyle,et:t.lineWidth,cs:null,ds:t.invertFilledArea,tt:this.Bs,_s:this.zs.St().ee()}),this.se.J({us:t.lineVisible?t.lineType:void 0,it:this.Vs,Nt:t.lineStyle,et:t.lineWidth,tt:this.Bs,_s:this.zs.St().ee(),Ts:t.pointMarkersVisible?t.pointMarkersRadius||t.lineWidth/2+2:void 0})}}class Pe extends B{constructor(){super(...arguments),this.zt=null,this.re=0,this.he=0}J(t){this.zt=t}Z({context:t,horizontalPixelRatio:i,verticalPixelRatio:s}){if(this.zt===null||this.zt.Vn.length===0||this.zt.tt===null)return;this.re=this.le(i),this.re>=2&&Math.max(1,Math.floor(i))%2!=this.re%2&&this.re--,this.he=this.zt.ae?Math.min(this.re,Math.floor(i)):this.re;let e=null;const n=this.he<=this.re&&this.zt.ee>=Math.floor(1.5*i);for(let r=this.zt.tt.from;rv+g-1&&(C=v+g-1,E=C-c+1),t.fillRect(T,E,u-T,C-E+1)}const y=a+w;let _=Math.max(v,Math.round(o.fe*s)-l),z=_+c-1;z>v+g-1&&(z=v+g-1,_=z-c+1),t.fillRect(d+1,_,y-d,z-_+1)}}}le(t){const i=Math.floor(t);return Math.max(i,Math.floor(function(s,e){return Math.floor(.3*s*e)}(p(this.zt).ee,t)))}}class Is extends vi{constructor(t,i){super(t,i,!1)}Xs(t,i,s){i.Zs(this.Vs,ot(this.Bs)),t.ve(this.Vs,s,ot(this.Bs))}pe(t,i,s){return{ot:t,me:i.Ot[0],be:i.Ot[1],we:i.Ot[2],ge:i.Ot[3],nt:NaN,de:NaN,_e:NaN,ue:NaN,fe:NaN}}$s(){const t=this.Is.js();this.Vs=this.Is.Vn().Qs().map(i=>this.te(i.ie,i,t))}}class We extends Is{constructor(){super(...arguments),this.Ns=new Pe}te(t,i,s){return Object.assign(Object.assign({},this.pe(t,i,s)),s.Ws(t))}Ks(){const t=this.Is.W();this.Ns.J({Vn:this.Vs,ee:this.zs.St().ee(),ce:t.openVisible,ae:t.thinBars,tt:this.Bs})}}class Ie extends Ts{constructor(){super(...arguments),this.ks=new mi}fs(t,i){const s=this.G;return this.ks.vs(t,{bs:i.Me,ws:i.xe,gs:i.Se,Ms:i.ke,xs:t.bitmapSize.height,cs:s.cs})}}class De extends Rs{constructor(){super(...arguments),this.ye=new mi}Ps(t,i){const s=this.G;return this.ye.vs(t,{bs:i.Ce,ws:i.Ce,gs:i.Te,Ms:i.Te,xs:t.bitmapSize.height,cs:s.cs})}}class Ve extends Rt{constructor(t,i){super(t,i),this.Ns=new di,this.Pe=new Ie,this.Re=new De,this.Ns.X([this.Pe,this.Re])}te(t,i,s){return Object.assign(Object.assign({},this.Js(t,i)),s.Ws(t))}Ks(){const t=this.Is.Ct();if(t===null)return;const i=this.Is.W(),s=this.Is.Dt().Rt(i.baseValue.price,t.Ot),e=this.zs.St().ee();this.Pe.J({it:this.Vs,et:i.lineWidth,Nt:i.lineStyle,us:i.lineType,cs:s,ds:!1,tt:this.Bs,_s:e}),this.Re.J({it:this.Vs,et:i.lineWidth,Nt:i.lineStyle,us:i.lineVisible?i.lineType:void 0,Ts:i.pointMarkersVisible?i.pointMarkersRadius||i.lineWidth/2+2:void 0,cs:s,tt:this.Bs,_s:e})}}class Ae extends B{constructor(){super(...arguments),this.zt=null,this.re=0}J(t){this.zt=t}Z(t){if(this.zt===null||this.zt.Vn.length===0||this.zt.tt===null)return;const{horizontalPixelRatio:i}=t;this.re=function(n,r){if(n>=2.5&&n<=4)return Math.floor(3*r);const o=1-.2*Math.atan(Math.max(4,n)-4)/(.5*Math.PI),l=Math.floor(n*o*r),a=Math.floor(n*r),u=Math.min(l,a);return Math.max(Math.floor(r),u)}(this.zt.ee,i),this.re>=2&&Math.floor(i)%2!=this.re%2&&this.re--;const s=this.zt.Vn;this.zt.De&&this.Oe(t,s,this.zt.tt),this.zt._i&&this.Ae(t,s,this.zt.tt);const e=this.Ve(i);(!this.zt._i||this.re>2*e)&&this.Be(t,s,this.zt.tt)}Oe(t,i,s){if(this.zt===null)return;const{context:e,horizontalPixelRatio:n,verticalPixelRatio:r}=t;let o="",l=Math.min(Math.floor(n),Math.floor(this.zt.ee*n));l=Math.max(Math.floor(n),Math.min(l,this.re));const a=Math.floor(.5*l);let u=null;for(let c=s.from;c2*l)ye(e,d,m,f-d+1,v-m+1,l);else{const b=f-d+1;e.fillRect(d,m,b,v-m+1)}a=f}}Be(t,i,s){if(this.zt===null)return;const{context:e,horizontalPixelRatio:n,verticalPixelRatio:r}=t;let o="";const l=this.Ve(n);for(let a=s.from;ad||e.fillRect(f,c,m-f+1,d-c+1)}}}class $e extends Is{constructor(){super(...arguments),this.Ns=new Ae}te(t,i,s){return Object.assign(Object.assign({},this.pe(t,i,s)),s.Ws(t))}Ks(){const t=this.Is.W();this.Ns.J({Vn:this.Vs,ee:this.zs.St().ee(),De:t.wickVisible,_i:t.borderVisible,tt:this.Bs})}}class Fe{constructor(t,i){this.Le=t,this.zi=i}K(t,i,s){this.Le.draw(t,this.zi,i,s)}}class $t extends vi{constructor(t,i,s){super(t,i,!1),this.mn=s,this.Ns=new Fe(this.mn.renderer(),e=>{const n=t.Ct();return n===null?null:t.Dt().Rt(e,n.Ot)})}Ee(t){return this.mn.priceValueBuilder(t)}Ne(t){return this.mn.isWhitespace(t)}$s(){const t=this.Is.js();this.Vs=this.Is.Vn().Qs().map(i=>Object.assign(Object.assign({ot:i.ie,nt:NaN},t.Ws(i.ie)),{Fe:i.We}))}Xs(t,i){i.Zs(this.Vs,ot(this.Bs))}Ks(){this.mn.update({bars:this.Vs.map(He),barSpacing:this.zs.St().ee(),visibleRange:this.Bs},this.Is.W())}}function He(h){return{x:h.nt,time:h.ot,originalData:h.Fe,barColor:h.oe}}class je extends B{constructor(){super(...arguments),this.zt=null,this.je=[]}J(t){this.zt=t,this.je=[]}Z({context:t,horizontalPixelRatio:i,verticalPixelRatio:s}){if(this.zt===null||this.zt.it.length===0||this.zt.tt===null)return;this.je.length||this.He(i);const e=Math.max(1,Math.floor(s)),n=Math.round(this.zt.$e*s)-Math.floor(e/2),r=n+e;for(let o=this.zt.tt.from;oo.qe?o.ui=r.Rs-i-1:r.Rs=o.ui+i+1)}let e=Math.ceil(this.zt.ee*t);for(let n=this.zt.tt.from;n0&&e<4)for(let n=this.zt.tt.from;ne&&(r.Ue>r.qe?r.ui-=1:r.Rs+=1)}}}class Ue extends Rt{constructor(){super(...arguments),this.Ns=new je}te(t,i,s){return Object.assign(Object.assign({},this.Js(t,i)),s.Ws(t))}Ks(){const t={it:this.Vs,ee:this.zs.St().ee(),tt:this.Bs,$e:this.Is.Dt().Rt(this.Is.W().base,p(this.Is.Ct()).Ot)};this.Ns.J(t)}}class Ze extends Rt{constructor(){super(...arguments),this.Ns=new Bs}te(t,i,s){return Object.assign(Object.assign({},this.Js(t,i)),s.Ws(t))}Ks(){const t=this.Is.W(),i={it:this.Vs,Nt:t.lineStyle,us:t.lineVisible?t.lineType:void 0,et:t.lineWidth,Ts:t.pointMarkersVisible?t.pointMarkersRadius||t.lineWidth/2+2:void 0,tt:this.Bs,_s:this.zs.St().ee()};this.Ns.J(i)}}const Ye=/[2-9]/g;class lt{constructor(t=50){this.Ye=0,this.Xe=1,this.Ke=1,this.Ze={},this.Ge=new Map,this.Je=t}Qe(){this.Ye=0,this.Ge.clear(),this.Xe=1,this.Ke=1,this.Ze={}}Mi(t,i,s){return this.tr(t,i,s).width}gi(t,i,s){const e=this.tr(t,i,s);return((e.actualBoundingBoxAscent||0)-(e.actualBoundingBoxDescent||0))/2}tr(t,i,s){const e=s||Ye,n=String(i).replace(e,"0");if(this.Ge.has(n))return O(this.Ge.get(n)).ir;if(this.Ye===this.Je){const o=this.Ze[this.Ke];delete this.Ze[this.Ke],this.Ge.delete(o),this.Ke++,this.Ye--}t.save(),t.textBaseline="middle";const r=t.measureText(n);return t.restore(),r.width===0&&i.length||(this.Ge.set(n,{ir:r,nr:this.Xe}),this.Ze[this.Xe]=n,this.Ye++,this.Xe++),r}}class Qe{constructor(t){this.sr=null,this.k=null,this.er="right",this.rr=t}hr(t,i,s){this.sr=t,this.k=i,this.er=s}K(t){this.k!==null&&this.sr!==null&&this.sr.K(t,this.k,this.rr,this.er)}}class Ds{constructor(t,i,s){this.lr=t,this.rr=new lt(50),this.ar=i,this.F=s,this.j=-1,this.Wt=new Qe(this.rr)}gt(){const t=this.F._r(this.ar);if(t===null)return null;const i=t.ur(this.ar)?t.cr():this.ar.Dt();if(i===null)return null;const s=t.dr(i);if(s==="overlay")return null;const e=this.F.vr();return e.P!==this.j&&(this.j=e.P,this.rr.Qe()),this.Wt.hr(this.lr.Bi(),e,s),this.Wt}}class Xe extends B{constructor(){super(...arguments),this.zt=null}J(t){this.zt=t}pr(t,i){var s;if(!(!((s=this.zt)===null||s===void 0)&&s.yt))return null;const{st:e,et:n,mr:r}=this.zt;return i>=e-n-7&&i<=e+n+7?{br:this.zt,mr:r}:null}Z({context:t,bitmapSize:i,horizontalPixelRatio:s,verticalPixelRatio:e}){if(this.zt===null||this.zt.yt===!1)return;const n=Math.round(this.zt.st*e);n<0||n>i.height||(t.lineCap="butt",t.strokeStyle=this.zt.O,t.lineWidth=Math.floor(this.zt.et*s),j(t,this.zt.Nt),zs(t,n,0,i.width))}}class pi{constructor(t){this.wr={st:0,O:"rgba(0, 0, 0, 0)",et:1,Nt:0,yt:!1},this.gr=new Xe,this.ft=!0,this.Is=t,this.zs=t.$t(),this.gr.J(this.wr)}bt(){this.ft=!0}gt(){return this.Is.yt()?(this.ft&&(this.Mr(),this.ft=!1),this.gr):null}}class qe extends pi{constructor(t){super(t)}Mr(){this.wr.yt=!1;const t=this.Is.Dt(),i=t.Sr().Sr;if(i!==2&&i!==3)return;const s=this.Is.W();if(!s.baseLineVisible||!this.Is.yt())return;const e=this.Is.Ct();e!==null&&(this.wr.yt=!0,this.wr.st=t.Rt(e.Ot,e.Ot),this.wr.O=s.baseLineColor,this.wr.et=s.baseLineWidth,this.wr.Nt=s.baseLineStyle)}}class Je extends B{constructor(){super(...arguments),this.zt=null}J(t){this.zt=t}We(){return this.zt}Z({context:t,horizontalPixelRatio:i,verticalPixelRatio:s}){const e=this.zt;if(e===null)return;const n=Math.max(1,Math.floor(i)),r=n%2/2,o=Math.round(e.qe.x*i)+r,l=e.qe.y*s;t.fillStyle=e.kr,t.beginPath();const a=Math.max(2,1.5*e.yr)*i;t.arc(o,l,a,0,2*Math.PI,!1),t.fill(),t.fillStyle=e.Cr,t.beginPath(),t.arc(o,l,e.ht*i,0,2*Math.PI,!1),t.fill(),t.lineWidth=n,t.strokeStyle=e.Tr,t.beginPath(),t.arc(o,l,e.ht*i+n/2,0,2*Math.PI,!1),t.stroke()}}const Ke=[{Pr:0,Rr:.25,Dr:4,Or:10,Ar:.25,Vr:0,Br:.4,Ir:.8},{Pr:.25,Rr:.525,Dr:10,Or:14,Ar:0,Vr:0,Br:.8,Ir:0},{Pr:.525,Rr:1,Dr:14,Or:14,Ar:0,Vr:0,Br:0,Ir:0}];function Ai(h,t,i,s){return function(e,n){if(e==="transparent")return e;const r=zt(e),o=r[3];return`rgba(${r[0]}, ${r[1]}, ${r[2]}, ${n*o})`}(h,i+(s-i)*t)}function $i(h,t){const i=h%2600/2600;let s;for(const l of Ke)if(i>=l.Pr&&i<=l.Rr){s=l;break}A(s!==void 0,"Last price animation internal logic error");const e=(i-s.Pr)/(s.Rr-s.Pr);return{Cr:Ai(t,e,s.Ar,s.Vr),Tr:Ai(t,e,s.Br,s.Ir),ht:(n=e,r=s.Dr,o=s.Or,r+(o-r)*n)};var n,r,o}class Ge{constructor(t){this.Wt=new Je,this.ft=!0,this.zr=!0,this.Lr=performance.now(),this.Er=this.Lr-1,this.Nr=t}Fr(){this.Er=this.Lr-1,this.bt()}Wr(){if(this.bt(),this.Nr.W().lastPriceAnimation===2){const t=performance.now(),i=this.Er-t;if(i>0)return void(i<650&&(this.Er+=2600));this.Lr=t,this.Er=t+2600}}bt(){this.ft=!0}jr(){this.zr=!0}yt(){return this.Nr.W().lastPriceAnimation!==0}Hr(){switch(this.Nr.W().lastPriceAnimation){case 0:return!1;case 1:return!0;case 2:return performance.now()<=this.Er}}gt(){return this.ft?(this.Mt(),this.ft=!1,this.zr=!1):this.zr&&(this.$r(),this.zr=!1),this.Wt}Mt(){this.Wt.J(null);const t=this.Nr.$t().St(),i=t.qs(),s=this.Nr.Ct();if(i===null||s===null)return;const e=this.Nr.Ur(!0);if(e.qr||!i.Yr(e.ie))return;const n={x:t.It(e.ie),y:this.Nr.Dt().Rt(e._t,s.Ot)},r=e.O,o=this.Nr.W().lineWidth,l=$i(this.Xr(),r);this.Wt.J({kr:r,yr:o,Cr:l.Cr,Tr:l.Tr,ht:l.ht,qe:n})}$r(){const t=this.Wt.We();if(t!==null){const i=$i(this.Xr(),t.kr);t.Cr=i.Cr,t.Tr=i.Tr,t.ht=i.ht}}Xr(){return this.Hr()?performance.now()-this.Lr:2599}}function st(h,t){return Ns(Math.min(Math.max(h,12),30)*t)}function at(h,t){switch(h){case"arrowDown":case"arrowUp":return st(t,1);case"circle":return st(t,.8);case"square":return st(t,.7)}}function Vs(h){return function(t){const i=Math.ceil(t);return i%2!=0?i-1:i}(st(h,1))}function Fi(h){return Math.max(st(h,.1),3)}function As(h,t,i,s,e){const n=at("square",i),r=(n-1)/2,o=h-r,l=t-r;return s>=o&&s<=o+n&&e>=l&&e<=l+n}function Hi(h,t,i,s){const e=(at("arrowUp",s)-1)/2*i.Kr,n=(Ns(s/2)-1)/2*i.Kr;t.beginPath(),h?(t.moveTo(i.nt-e,i.st),t.lineTo(i.nt,i.st-e),t.lineTo(i.nt+e,i.st),t.lineTo(i.nt+n,i.st),t.lineTo(i.nt+n,i.st+e),t.lineTo(i.nt-n,i.st+e),t.lineTo(i.nt-n,i.st)):(t.moveTo(i.nt-e,i.st),t.lineTo(i.nt,i.st+e),t.lineTo(i.nt+e,i.st),t.lineTo(i.nt+n,i.st),t.lineTo(i.nt+n,i.st-e),t.lineTo(i.nt-n,i.st-e),t.lineTo(i.nt-n,i.st)),t.fill()}function th(h,t,i,s,e,n){return As(t,i,s,e,n)}class ih extends B{constructor(){super(...arguments),this.zt=null,this.rr=new lt,this.j=-1,this.H="",this.Zr=""}J(t){this.zt=t}hr(t,i){this.j===t&&this.H===i||(this.j=t,this.H=i,this.Zr=K(t,i),this.rr.Qe())}pr(t,i){if(this.zt===null||this.zt.tt===null)return null;for(let s=this.zt.tt.from;s=s&&o<=s+n&&l>=e-a&&l<=e+a}(h.Zt.nt,h.Zt.st,h.Zt.ji,h.Zt.Bt,t,i))||function(s,e,n){if(s.Ys===0)return!1;switch(s.Qr){case"arrowDown":case"arrowUp":return th(0,s.nt,s.st,s.Ys,e,n);case"circle":return function(r,o,l,a,u){const c=2+at("circle",l)/2,d=r-a,f=o-u;return Math.sqrt(d*d+f*f)<=c}(s.nt,s.st,s.Ys,e,n);case"square":return As(s.nt,s.st,s.Ys,e,n)}}(h,t,i)}function hh(h,t,i,s,e,n,r,o,l){const a=P(i)?i:i.ge,u=P(i)?i:i.be,c=P(i)?i:i.we,d=P(t.size)?Math.max(t.size,0):1,f=Vs(o.ee())*d,m=f/2;switch(h.Ys=f,t.position){case"inBar":return h.st=r.Rt(a,l),void(h.Zt!==void 0&&(h.Zt.st=h.st+m+n+.6*e));case"aboveBar":return h.st=r.Rt(u,l)-m-s.th,h.Zt!==void 0&&(h.Zt.st=h.st-m-.6*e,s.th+=1.2*e),void(s.th+=f+n);case"belowBar":return h.st=r.Rt(c,l)+m+s.ih,h.Zt!==void 0&&(h.Zt.st=h.st+m+n+.6*e,s.ih+=1.2*e),void(s.ih+=f+n)}t.position}class nh{constructor(t,i){this.ft=!0,this.nh=!0,this.sh=!0,this.eh=null,this.Wt=new ih,this.Nr=t,this.Hi=i,this.zt={it:[],tt:null}}bt(t){this.ft=!0,this.sh=!0,t==="data"&&(this.nh=!0)}gt(t){if(!this.Nr.yt())return null;this.ft&&this.rh();const i=this.Hi.W().layout;return this.Wt.hr(i.fontSize,i.fontFamily),this.Wt.J(this.zt),this.Wt}hh(){if(this.sh){if(this.Nr.lh().length>0){const t=this.Hi.St().ee(),i=Fi(t),s=1.5*Vs(t)+2*i;this.eh={above:s,below:s}}else this.eh=null;this.sh=!1}return this.eh}rh(){const t=this.Nr.Dt(),i=this.Hi.St(),s=this.Nr.lh();this.nh&&(this.zt.it=s.map(u=>({ot:u.time,nt:0,st:0,Ys:0,Qr:u.shape,O:u.color,Gr:u.Gr,mr:u.id,Zt:void 0})),this.nh=!1);const e=this.Hi.W().layout;this.zt.tt=null;const n=i.qs();if(n===null)return;const r=this.Nr.Ct();if(r===null||this.zt.it.length===0)return;let o=NaN;const l=Fi(i.ee()),a={th:l,ih:l};this.zt.tt=Ws(this.zt.it,n,!0);for(let u=this.zt.tt.from;u0&&(d.Zt={Jr:c.text,nt:0,st:0,ji:0,Bt:0});const f=this.Nr.ah(c.time);f!==null&&hh(d,c,f,a,e.fontSize,l,t,i,r.Ot)}this.ft=!1}}class rh extends pi{constructor(t){super(t)}Mr(){const t=this.wr;t.yt=!1;const i=this.Is.W();if(!i.priceLineVisible||!this.Is.yt())return;const s=this.Is.Ur(i.priceLineSource===0);s.qr||(t.yt=!0,t.st=s.Si,t.O=this.Is.oh(s.O),t.et=i.priceLineWidth,t.Nt=i.priceLineStyle)}}class oh extends kt{constructor(t){super(),this.jt=t}Ii(t,i,s){t.yt=!1,i.yt=!1;const e=this.jt;if(!e.yt())return;const n=e.W(),r=n.lastValueVisible,o=e._h()!=="",l=n.seriesLastValueMode===0,a=e.Ur(!1);if(a.qr)return;r&&(t.Zt=this.uh(a,r,l),t.yt=t.Zt.length!==0),(o||l)&&(i.Zt=this.dh(a,r,o,l),i.yt=i.Zt.length>0);const u=e.oh(a.O),c=Et(u);s.t=c.t,s.Si=a.Si,i.At=e.$t().Vt(a.Si/e.Dt().Bt()),t.At=u,t.O=c.i,i.O=c.i}dh(t,i,s,e){let n="";const r=this.jt._h();return s&&r.length!==0&&(n+=`${r} `),i&&e&&(n+=this.jt.Dt().fh()?t.ph:t.mh),n.trim()}uh(t,i,s){return i?s?this.jt.Dt().fh()?t.mh:t.ph:t.Zt:""}}function ji(h,t,i,s){const e=Number.isFinite(t),n=Number.isFinite(i);return e&&n?h(t,i):e||n?e?t:i:s}class k{constructor(t,i){this.bh=t,this.wh=i}gh(t){return t!==null&&this.bh===t.bh&&this.wh===t.wh}Mh(){return new k(this.bh,this.wh)}xh(){return this.bh}Sh(){return this.wh}kh(){return this.wh-this.bh}Ei(){return this.wh===this.bh||Number.isNaN(this.wh)||Number.isNaN(this.bh)}Jn(t){return t===null?this:new k(ji(Math.min,this.xh(),t.xh(),-1/0),ji(Math.max,this.Sh(),t.Sh(),1/0))}yh(t){if(!P(t)||this.wh-this.bh===0)return;const i=.5*(this.wh+this.bh);let s=this.wh-i,e=this.bh-i;s*=t,e*=t,this.wh=i+s,this.bh=i+e}Ch(t){P(t)&&(this.wh+=t,this.bh+=t)}Th(){return{minValue:this.bh,maxValue:this.wh}}static Ph(t){return t===null?null:new k(t.minValue,t.maxValue)}}class xt{constructor(t,i){this.Rh=t,this.Dh=i||null}Oh(){return this.Rh}Ah(){return this.Dh}Th(){return this.Rh===null?null:{priceRange:this.Rh.Th(),margins:this.Dh||void 0}}static Ph(t){return t===null?null:new xt(k.Ph(t.priceRange),t.margins)}}class lh extends pi{constructor(t,i){super(t),this.Vh=i}Mr(){const t=this.wr;t.yt=!1;const i=this.Vh.W();if(!this.Is.yt()||!i.lineVisible)return;const s=this.Vh.Bh();s!==null&&(t.yt=!0,t.st=s,t.O=i.color,t.et=i.lineWidth,t.Nt=i.lineStyle,t.mr=this.Vh.W().id)}}class ah extends kt{constructor(t,i){super(),this.Nr=t,this.Vh=i}Ii(t,i,s){t.yt=!1,i.yt=!1;const e=this.Vh.W(),n=e.axisLabelVisible,r=e.title!=="",o=this.Nr;if(!n||!o.yt())return;const l=this.Vh.Bh();if(l===null)return;r&&(i.Zt=e.title,i.yt=!0),i.At=o.$t().Vt(l/o.Dt().Bt()),t.Zt=this.Ih(e.price),t.yt=!0;const a=Et(e.axisLabelColor||e.color);s.t=a.t;const u=e.axisLabelTextColor||a.i;t.O=u,i.O=u,s.Si=l}Ih(t){const i=this.Nr.Ct();return i===null?"":this.Nr.Dt().Ni(t,i.Ot)}}class uh{constructor(t,i){this.Nr=t,this._n=i,this.zh=new lh(t,this),this.lr=new ah(t,this),this.Lh=new Ds(this.lr,t,t.$t())}Eh(t){R(this._n,t),this.bt(),this.Nr.$t().Nh()}W(){return this._n}Fh(){return this.zh}Wh(){return this.Lh}jh(){return this.lr}bt(){this.zh.bt(),this.lr.bt()}Bh(){const t=this.Nr,i=t.Dt();if(t.$t().St().Ei()||i.Ei())return null;const s=t.Ct();return s===null?null:i.Rt(this._n.price,s.Ot)}}class ch extends fi{constructor(t){super(),this.Hi=t}$t(){return this.Hi}}const dh={Bar:(h,t,i,s)=>{var e;const n=t.upColor,r=t.downColor,o=p(h(i,s)),l=X(o.Ot[0])<=X(o.Ot[3]);return{oe:(e=o.O)!==null&&e!==void 0?e:l?n:r}},Candlestick:(h,t,i,s)=>{var e,n,r;const o=t.upColor,l=t.downColor,a=t.borderUpColor,u=t.borderDownColor,c=t.wickUpColor,d=t.wickDownColor,f=p(h(i,s)),m=X(f.Ot[0])<=X(f.Ot[3]);return{oe:(e=f.O)!==null&&e!==void 0?e:m?o:l,ze:(n=f.At)!==null&&n!==void 0?n:m?a:u,Ie:(r=f.Hh)!==null&&r!==void 0?r:m?c:d}},Custom:(h,t,i,s)=>{var e;return{oe:(e=p(h(i,s)).O)!==null&&e!==void 0?e:t.color}},Area:(h,t,i,s)=>{var e,n,r,o;const l=p(h(i,s));return{oe:(e=l.lt)!==null&&e!==void 0?e:t.lineColor,lt:(n=l.lt)!==null&&n!==void 0?n:t.lineColor,ys:(r=l.ys)!==null&&r!==void 0?r:t.topColor,Cs:(o=l.Cs)!==null&&o!==void 0?o:t.bottomColor}},Baseline:(h,t,i,s)=>{var e,n,r,o,l,a;const u=p(h(i,s));return{oe:u.Ot[3]>=t.baseValue.price?t.topLineColor:t.bottomLineColor,Ce:(e=u.Ce)!==null&&e!==void 0?e:t.topLineColor,Te:(n=u.Te)!==null&&n!==void 0?n:t.bottomLineColor,Me:(r=u.Me)!==null&&r!==void 0?r:t.topFillColor1,xe:(o=u.xe)!==null&&o!==void 0?o:t.topFillColor2,Se:(l=u.Se)!==null&&l!==void 0?l:t.bottomFillColor1,ke:(a=u.ke)!==null&&a!==void 0?a:t.bottomFillColor2}},Line:(h,t,i,s)=>{var e,n;const r=p(h(i,s));return{oe:(e=r.O)!==null&&e!==void 0?e:t.color,lt:(n=r.O)!==null&&n!==void 0?n:t.color}},Histogram:(h,t,i,s)=>{var e;return{oe:(e=p(h(i,s)).O)!==null&&e!==void 0?e:t.color}}};class fh{constructor(t){this.$h=(i,s)=>s!==void 0?s.Ot:this.Nr.Vn().Uh(i),this.Nr=t,this.qh=dh[t.Yh()]}Ws(t,i){return this.qh(this.$h,this.Nr.W(),t,i)}}var Ui;(function(h){h[h.NearestLeft=-1]="NearestLeft",h[h.None=0]="None",h[h.NearestRight=1]="NearestRight"})(Ui||(Ui={}));const V=30;class mh{constructor(){this.Xh=[],this.Kh=new Map,this.Zh=new Map}Gh(){return this.Ys()>0?this.Xh[this.Xh.length-1]:null}Jh(){return this.Ys()>0?this.Qh(0):null}An(){return this.Ys()>0?this.Qh(this.Xh.length-1):null}Ys(){return this.Xh.length}Ei(){return this.Ys()===0}Yr(t){return this.tl(t,0)!==null}Uh(t){return this.il(t)}il(t,i=0){const s=this.tl(t,i);return s===null?null:Object.assign(Object.assign({},this.nl(s)),{ie:this.Qh(s)})}Qs(){return this.Xh}sl(t,i,s){if(this.Ei())return null;let e=null;for(const n of s)e=vt(e,this.el(t,i,n));return e}J(t){this.Zh.clear(),this.Kh.clear(),this.Xh=t}Qh(t){return this.Xh[t].ie}nl(t){return this.Xh[t]}tl(t,i){const s=this.rl(t);if(s===null&&i!==0)switch(i){case-1:return this.hl(t);case 1:return this.ll(t);default:throw new TypeError("Unknown search mode")}return s}hl(t){let i=this.al(t);return i>0&&(i-=1),i!==this.Xh.length&&this.Qh(i)i.iei.ie>s)}_l(t,i,s){let e=null;for(let n=t;ne.cl&&(e.cl=r)))}return e}el(t,i,s){if(this.Ei())return null;let e=null;const n=p(this.Jh()),r=p(this.An()),o=Math.max(t,n),l=Math.min(i,r),a=Math.ceil(o/V)*V,u=Math.max(a,Math.floor(l/V)*V);{const d=this.al(o),f=this.ol(Math.min(l,a,i));e=vt(e,this._l(d,f,s))}let c=this.Kh.get(s);c===void 0&&(c=new Map,this.Kh.set(s,c));for(let d=Math.max(a+1,o);dnew Ft(o));return this.gl={vl:n,pl:r},r}Ji(){var t,i,s,e;const n=(s=(i=(t=this.yl).timeAxisViews)===null||i===void 0?void 0:i.call(t))!==null&&s!==void 0?s:[];if(((e=this.Ml)===null||e===void 0?void 0:e.vl)===n)return this.Ml.pl;const r=this.Nr.$t().St(),o=n.map(l=>new ph(l,r));return this.Ml={vl:n,pl:o},o}Tn(){var t,i,s,e;const n=(s=(i=(t=this.yl).priceAxisViews)===null||i===void 0?void 0:i.call(t))!==null&&s!==void 0?s:[];if(((e=this.xl)===null||e===void 0?void 0:e.vl)===n)return this.xl.pl;const r=this.Nr.Dt(),o=n.map(l=>new bh(l,r));return this.xl={vl:n,pl:o},o}Tl(){var t,i,s,e;const n=(s=(i=(t=this.yl).priceAxisPaneViews)===null||i===void 0?void 0:i.call(t))!==null&&s!==void 0?s:[];if(((e=this.Sl)===null||e===void 0?void 0:e.vl)===n)return this.Sl.pl;const r=n.map(o=>new Ft(o));return this.Sl={vl:n,pl:r},r}Pl(){var t,i,s,e;const n=(s=(i=(t=this.yl).timeAxisPaneViews)===null||i===void 0?void 0:i.call(t))!==null&&s!==void 0?s:[];if(((e=this.kl)===null||e===void 0?void 0:e.vl)===n)return this.kl.pl;const r=n.map(o=>new Ft(o));return this.kl={vl:n,pl:r},r}Rl(t,i){var s,e,n;return(n=(e=(s=this.yl).autoscaleInfo)===null||e===void 0?void 0:e.call(s,t,i))!==null&&n!==void 0?n:null}pr(t,i){var s,e,n;return(n=(e=(s=this.yl).hitTest)===null||e===void 0?void 0:e.call(s,t,i))!==null&&n!==void 0?n:null}}function Ht(h,t,i,s){h.forEach(e=>{t(e).forEach(n=>{n.ml()===i&&s.push(n)})})}function jt(h){return h.Cn()}function wh(h){return h.Tl()}function _h(h){return h.Pl()}class bi extends ch{constructor(t,i,s,e,n){super(t),this.zt=new mh,this.zh=new rh(this),this.Dl=[],this.Ol=new qe(this),this.Al=null,this.Vl=null,this.Bl=[],this.Il=[],this.zl=null,this.Ll=[],this._n=i,this.El=s;const r=new oh(this);this.en=[r],this.Lh=new Ds(r,this,t),s!=="Area"&&s!=="Line"&&s!=="Baseline"||(this.Al=new Ge(this)),this.Nl(),this.Fl(n)}S(){this.zl!==null&&clearTimeout(this.zl)}oh(t){return this._n.priceLineColor||t}Ur(t){const i={qr:!0},s=this.Dt();if(this.$t().St().Ei()||s.Ei()||this.zt.Ei())return i;const e=this.$t().St().qs(),n=this.Ct();if(e===null||n===null)return i;let r,o;if(t){const c=this.zt.Gh();if(c===null)return i;r=c,o=c.ie}else{const c=this.zt.il(e.ui(),-1);if(c===null||(r=this.zt.Uh(c.ie),r===null))return i;o=c.ie}const l=r.Ot[3],a=this.js().Ws(o,{Ot:r}),u=s.Rt(l,n.Ot);return{qr:!1,_t:l,Zt:s.Ni(l,n.Ot),ph:s.Wl(l),mh:s.jl(l,n.Ot),O:a.oe,Si:u,ie:o}}js(){return this.Vl!==null||(this.Vl=new fh(this)),this.Vl}W(){return this._n}Eh(t){const i=t.priceScaleId;i!==void 0&&i!==this._n.priceScaleId&&this.$t().Hl(this,i),R(this._n,t),t.priceFormat!==void 0&&(this.Nl(),this.$t().$l()),this.$t().Ul(this),this.$t().ql(),this.mn.bt("options")}J(t,i){this.zt.J(t),this.Yl(),this.mn.bt("data"),this.un.bt("data"),this.Al!==null&&(i&&i.Xl?this.Al.Wr():t.length===0&&this.Al.Fr());const s=this.$t()._r(this);this.$t().Kl(s),this.$t().Ul(this),this.$t().ql(),this.$t().Nh()}Zl(t){this.Bl=t,this.Yl();const i=this.$t()._r(this);this.un.bt("data"),this.$t().Kl(i),this.$t().Ul(this),this.$t().ql(),this.$t().Nh()}Gl(){return this.Bl}lh(){return this.Il}Jl(t){const i=new uh(this,t);return this.Dl.push(i),this.$t().Ul(this),i}Ql(t){const i=this.Dl.indexOf(t);i!==-1&&this.Dl.splice(i,1),this.$t().Ul(this)}Yh(){return this.El}Ct(){const t=this.ta();return t===null?null:{Ot:t.Ot[3],ia:t.ot}}ta(){const t=this.$t().St().qs();if(t===null)return null;const i=t.Rs();return this.zt.il(i,1)}Vn(){return this.zt}ah(t){const i=this.zt.Uh(t);return i===null?null:this.El==="Bar"||this.El==="Candlestick"||this.El==="Custom"?{me:i.Ot[0],be:i.Ot[1],we:i.Ot[2],ge:i.Ot[3]}:i.Ot[3]}na(t){const i=[];Ht(this.Ll,jt,"top",i);const s=this.Al;return s!==null&&s.yt()&&(this.zl===null&&s.Hr()&&(this.zl=setTimeout(()=>{this.zl=null,this.$t().sa()},0)),s.jr(),i.push(s)),i}Cn(){const t=[];this.ea()||t.push(this.Ol),t.push(this.mn,this.zh,this.un);const i=this.Dl.map(s=>s.Fh());return t.push(...i),Ht(this.Ll,jt,"normal",t),t}ra(){return this.ha(jt,"bottom")}la(t){return this.ha(wh,t)}aa(t){return this.ha(_h,t)}oa(t,i){return this.Ll.map(s=>s.pr(t,i)).filter(s=>s!==null)}Gi(t){return[this.Lh,...this.Dl.map(i=>i.Wh())]}Tn(t,i){if(i!==this.qi&&!this.ea())return[];const s=[...this.en];for(const e of this.Dl)s.push(e.jh());return this.Ll.forEach(e=>{s.push(...e.Tn())}),s}Ji(){const t=[];return this.Ll.forEach(i=>{t.push(...i.Ji())}),t}Rl(t,i){if(this._n.autoscaleInfoProvider!==void 0){const s=this._n.autoscaleInfoProvider(()=>{const e=this._a(t,i);return e===null?null:e.Th()});return xt.Ph(s)}return this._a(t,i)}ua(){return this._n.priceFormat.minMove}ca(){return this.da}Rn(){var t;this.mn.bt(),this.un.bt();for(const i of this.en)i.bt();for(const i of this.Dl)i.bt();this.zh.bt(),this.Ol.bt(),(t=this.Al)===null||t===void 0||t.bt(),this.Ll.forEach(i=>i.Rn())}Dt(){return p(super.Dt())}kt(t){if(!((this.El==="Line"||this.El==="Area"||this.El==="Baseline")&&this._n.crosshairMarkerVisible))return null;const i=this.zt.Uh(t);return i===null?null:{_t:i.Ot[3],ht:this.fa(),At:this.va(),Pt:this.pa(),Tt:this.ma(t)}}_h(){return this._n.title}yt(){return this._n.visible}ba(t){this.Ll.push(new gh(t,this))}wa(t){this.Ll=this.Ll.filter(i=>i.Cl()!==t)}ga(){if(this.mn instanceof $t)return t=>this.mn.Ee(t)}Ma(){if(this.mn instanceof $t)return t=>this.mn.Ne(t)}ea(){return!Tt(this.Dt().xa())}_a(t,i){if(!rt(t)||!rt(i)||this.zt.Ei())return null;const s=this.El==="Line"||this.El==="Area"||this.El==="Baseline"||this.El==="Histogram"?[3]:[2,1],e=this.zt.sl(t,i,s);let n=e!==null?new k(e.ul,e.cl):null;if(this.Yh()==="Histogram"){const o=this._n.base,l=new k(o,o);n=n!==null?n.Jn(l):l}let r=this.un.hh();return this.Ll.forEach(o=>{const l=o.Rl(t,i);if(l!=null&&l.priceRange){const f=new k(l.priceRange.minValue,l.priceRange.maxValue);n=n!==null?n.Jn(f):f}var a,u,c,d;l!=null&&l.margins&&(a=r,u=l.margins,r={above:Math.max((c=a==null?void 0:a.above)!==null&&c!==void 0?c:0,u.above),below:Math.max((d=a==null?void 0:a.below)!==null&&d!==void 0?d:0,u.below)})}),new xt(n,r)}fa(){switch(this.El){case"Line":case"Area":case"Baseline":return this._n.crosshairMarkerRadius}return 0}va(){switch(this.El){case"Line":case"Area":case"Baseline":{const t=this._n.crosshairMarkerBorderColor;if(t.length!==0)return t}}return null}pa(){switch(this.El){case"Line":case"Area":case"Baseline":return this._n.crosshairMarkerBorderWidth}return 0}ma(t){switch(this.El){case"Line":case"Area":case"Baseline":{const i=this._n.crosshairMarkerBackgroundColor;if(i.length!==0)return i}}return this.js().Ws(t).oe}Nl(){switch(this._n.priceFormat.type){case"custom":this.da={format:this._n.priceFormat.formatter};break;case"volume":this.da=new Ee(this._n.priceFormat.precision);break;case"percent":this.da=new Os(this._n.priceFormat.precision);break;default:{const t=Math.pow(10,this._n.priceFormat.precision);this.da=new Nt(t,this._n.priceFormat.minMove*t)}}this.qi!==null&&this.qi.Sa()}Yl(){const t=this.$t().St();if(!t.ka()||this.zt.Ei())return void(this.Il=[]);const i=p(this.zt.Jh());this.Il=this.Bl.map((s,e)=>{const n=p(t.ya(s.time,!0)),r=nu instanceof bi).reduce((u,c)=>{if(s.ur(c)||!c.yt())return u;const d=c.Dt(),f=c.Vn();if(d.Ei()||!f.Yr(i))return u;const m=f.Uh(i);if(m===null)return u;const v=X(c.Ct());return u.concat([d.Rt(m.Ot[3],v.Ot)])},[]);if(l.length===0)return e;l.sort((u,c)=>Math.abs(u-o)-Math.abs(c-o));const a=l[0];return e=n.fn(a,r),e}}class yh extends B{constructor(){super(...arguments),this.zt=null}J(t){this.zt=t}Z({context:t,bitmapSize:i,horizontalPixelRatio:s,verticalPixelRatio:e}){if(this.zt===null)return;const n=Math.max(1,Math.floor(s));t.lineWidth=n,function(r,o){r.save(),r.lineWidth%2&&r.translate(.5,.5),o(),r.restore()}(t,()=>{const r=p(this.zt);if(r.Pa){t.strokeStyle=r.Ra,j(t,r.Da),t.beginPath();for(const o of r.Oa){const l=Math.round(o.Aa*s);t.moveTo(l,-n),t.lineTo(l,i.height+n)}t.stroke()}if(r.Va){t.strokeStyle=r.Ba,j(t,r.Ia),t.beginPath();for(const o of r.za){const l=Math.round(o.Aa*e);t.moveTo(-n,l),t.lineTo(i.width+n,l)}t.stroke()}})}}class Mh{constructor(t){this.Wt=new yh,this.ft=!0,this.Qi=t}bt(){this.ft=!0}gt(){if(this.ft){const t=this.Qi.$t().W().grid,i={Va:t.horzLines.visible,Pa:t.vertLines.visible,Ba:t.horzLines.color,Ra:t.vertLines.color,Ia:t.horzLines.style,Da:t.vertLines.style,za:this.Qi.dn().La(),Oa:(this.Qi.$t().St().La()||[]).map(s=>({Aa:s.coord}))};this.Wt.J(i),this.ft=!1}return this.Wt}}class zh{constructor(t){this.mn=new Mh(t)}Fh(){return this.mn}}const Ut={Ea:4,Na:1e-4};function q(h,t){const i=100*(h-t)/t;return t<0?-i:i}function xh(h,t){const i=q(h.xh(),t),s=q(h.Sh(),t);return new k(i,s)}function et(h,t){const i=100*(h-t)/t+100;return t<0?-i:i}function Ch(h,t){const i=et(h.xh(),t),s=et(h.Sh(),t);return new k(i,s)}function Ct(h,t){const i=Math.abs(h);if(i<1e-15)return 0;const s=Math.log10(i+t.Na)+t.Ea;return h<0?-s:s}function ht(h,t){const i=Math.abs(h);if(i<1e-15)return 0;const s=Math.pow(10,i-t.Ea)-t.Na;return h<0?-s:s}function it(h,t){if(h===null)return null;const i=Ct(h.xh(),t),s=Ct(h.Sh(),t);return new k(i,s)}function pt(h,t){if(h===null)return null;const i=ht(h.xh(),t),s=ht(h.Sh(),t);return new k(i,s)}function Zt(h){if(h===null)return Ut;const t=Math.abs(h.Sh()-h.xh());if(t>=1||t<1e-15)return Ut;const i=Math.ceil(Math.abs(Math.log10(t))),s=Ut.Ea+i;return{Ea:s,Na:1/Math.pow(10,s)}}class Yt{constructor(t,i){if(this.Fa=t,this.Wa=i,function(s){if(s<0)return!1;for(let e=s;e>1;e/=10)if(e%10!=0)return!1;return!0}(this.Fa))this.ja=[2,2.5,2];else{this.ja=[];for(let s=this.Fa;s!==1;){if(s%2==0)this.ja.push(2),s/=2;else{if(s%5!=0)throw new Error("unexpected base");this.ja.push(2,2.5),s/=5}if(this.ja.length>100)throw new Error("something wrong with base")}}}Ha(t,i,s){const e=this.Fa===0?0:1/this.Fa;let n=Math.pow(10,Math.max(0,Math.ceil(Math.log10(t-i)))),r=0,o=this.Wa[0];for(;;){const c=mt(n,e,1e-14)&&n>e+1e-14,d=mt(n,s*o,1e-14),f=mt(n,1,1e-14);if(!(c&&d&&f))break;n/=o,o=this.Wa[++r%this.Wa.length]}if(n<=e+1e-14&&(n=e),n=Math.max(1,n),this.ja.length>0&&(l=n,a=1,u=1e-14,Math.abs(l-a)e+1e-14;)n/=o,o=this.ja[++r%this.ja.length];var l,a,u;return n}}class Zi{constructor(t,i,s,e){this.$a=[],this.zi=t,this.Fa=i,this.Ua=s,this.qa=e}Ha(t,i){if(t=u?1:-1;let m=null,v=0;for(let b=a-d;b>u;b-=c){const g=this.qa(b,i,!0);m!==null&&Math.abs(g-m)l||(vp(t.Xi())-p(i.Xi()))}var Yi;(function(h){h[h.Normal=0]="Normal",h[h.Logarithmic=1]="Logarithmic",h[h.Percentage=2]="Percentage",h[h.IndexedTo100=3]="IndexedTo100"})(Yi||(Yi={}));const Qi=new Os,Xi=new Nt(100,1);class Eh{constructor(t,i,s,e){this.Qa=0,this.io=null,this.Rh=null,this.no=null,this.so={eo:!1,ro:null},this.ho=0,this.lo=0,this.ao=new M,this.oo=new M,this._o=[],this.uo=null,this.co=null,this.do=null,this.fo=null,this.da=Xi,this.vo=Zt(null),this.po=t,this._n=i,this.mo=s,this.bo=e,this.wo=new Zi(this,100,this.Mo.bind(this),this.xo.bind(this))}xa(){return this.po}W(){return this._n}Eh(t){if(R(this._n,t),this.Sa(),t.mode!==void 0&&this.So({Sr:t.mode}),t.scaleMargins!==void 0){const i=O(t.scaleMargins.top),s=O(t.scaleMargins.bottom);if(i<0||i>1)throw new Error(`Invalid top margin - expect value between 0 and 1, given=${i}`);if(s<0||s>1)throw new Error(`Invalid bottom margin - expect value between 0 and 1, given=${s}`);if(i+s>1)throw new Error(`Invalid margins - sum of margins must be less than 1, given=${i+s}`);this.ko(),this.co=null}}yo(){return this._n.autoScale}Ja(){return this._n.mode===1}fh(){return this._n.mode===2}Co(){return this._n.mode===3}Sr(){return{Nn:this._n.autoScale,To:this._n.invertScale,Sr:this._n.mode}}So(t){const i=this.Sr();let s=null;t.Nn!==void 0&&(this._n.autoScale=t.Nn),t.Sr!==void 0&&(this._n.mode=t.Sr,t.Sr!==2&&t.Sr!==3||(this._n.autoScale=!0),this.so.eo=!1),i.Sr===1&&t.Sr!==i.Sr&&(function(n,r){if(n===null)return!1;const o=ht(n.xh(),r),l=ht(n.Sh(),r);return isFinite(o)&&isFinite(l)}(this.Rh,this.vo)?(s=pt(this.Rh,this.vo),s!==null&&this.Po(s)):this._n.autoScale=!0),t.Sr===1&&t.Sr!==i.Sr&&(s=it(this.Rh,this.vo),s!==null&&this.Po(s));const e=i.Sr!==this._n.mode;e&&(i.Sr===2||this.fh())&&this.Sa(),e&&(i.Sr===3||this.Co())&&this.Sa(),t.To!==void 0&&i.To!==t.To&&(this._n.invertScale=t.To,this.Ro()),this.oo.m(i,this.Sr())}Do(){return this.oo}P(){return this.mo.fontSize}Bt(){return this.Qa}Oo(t){this.Qa!==t&&(this.Qa=t,this.ko(),this.co=null)}Ao(){if(this.io)return this.io;const t=this.Bt()-this.Vo()-this.Bo();return this.io=t,t}Oh(){return this.Io(),this.Rh}Po(t,i){const s=this.Rh;(i||s===null&&t!==null||s!==null&&!s.gh(t))&&(this.co=null,this.Rh=t)}Ei(){return this.Io(),this.Qa===0||!this.Rh||this.Rh.Ei()}zo(t){return this.To()?t:this.Bt()-1-t}Rt(t,i){return this.fh()?t=q(t,i):this.Co()&&(t=et(t,i)),this.xo(t,i)}Gs(t,i,s){this.Io();const e=this.Bo(),n=p(this.Oh()),r=n.xh(),o=n.Sh(),l=this.Ao()-1,a=this.To(),u=l/(o-r),c=s===void 0?0:s.from,d=s===void 0?t.length:s.to,f=this.Lo();for(let m=c;mt.Rn())}Sa(){this.co=null;const t=this.Jo();let i=100;t!==null&&(i=Math.round(1/t.ua())),this.da=Xi,this.fh()?(this.da=Qi,i=100):this.Co()?(this.da=new Nt(100,1),i=100):t!==null&&(this.da=t.ca()),this.wo=new Zi(this,i,this.Mo.bind(this),this.xo.bind(this)),this.wo.Xa()}Wo(){this.uo=null}Jo(){return this._o[0]||null}Vo(){return this.To()?this._n.scaleMargins.bottom*this.Bt()+this.lo:this._n.scaleMargins.top*this.Bt()+this.ho}Bo(){return this.To()?this._n.scaleMargins.top*this.Bt()+this.ho:this._n.scaleMargins.bottom*this.Bt()+this.lo}Io(){this.so.eo||(this.so.eo=!0,this.i_())}ko(){this.io=null}xo(t,i){if(this.Io(),this.Ei())return 0;t=this.Ja()&&t?Ct(t,this.vo):t;const s=p(this.Oh()),e=this.Bo()+(this.Ao()-1)*(t-s.xh())/s.kh();return this.zo(e)}Mo(t,i){if(this.Io(),this.Ei())return 0;const s=this.zo(t),e=p(this.Oh()),n=e.xh()+e.kh()*((s-this.Bo())/(this.Ao()-1));return this.Ja()?ht(n,this.vo):n}Ro(){this.co=null,this.wo.Xa()}i_(){const t=this.so.ro;if(t===null)return;let i=null;const s=this.Qo();let e=0,n=0;for(const l of s){if(!l.yt())continue;const a=l.Ct();if(a===null)continue;const u=l.Rl(t.Rs(),t.ui());let c=u&&u.Oh();if(c!==null){switch(this._n.mode){case 1:c=it(c,this.vo);break;case 2:c=xh(c,a.Ot);break;case 3:c=Ch(c,a.Ot)}if(i=i===null?c:i.Jn(p(c)),u!==null){const d=u.Ah();d!==null&&(e=Math.max(e,d.above),n=Math.max(e,d.below))}}}if(e===this.ho&&n===this.lo||(this.ho=e,this.lo=n,this.co=null,this.ko()),i!==null){if(i.xh()===i.Sh()){const l=this.Jo(),a=5*(l===null||this.fh()||this.Co()?1:l.ua());this.Ja()&&(i=pt(i,this.vo)),i=new k(i.xh()-a,i.Sh()+a),this.Ja()&&(i=it(i,this.vo))}if(this.Ja()){const l=pt(i,this.vo),a=Zt(l);if(r=a,o=this.vo,r.Ea!==o.Ea||r.Na!==o.Na){const u=this.no!==null?pt(this.no,this.vo):null;this.vo=a,i=it(l,a),u!==null&&(this.no=it(u,a))}}this.Po(i)}else this.Rh===null&&(this.Po(new k(-.5,.5)),this.vo=Zt(null));var r,o;this.so.eo=!0}Lo(){return this.fh()?q:this.Co()?et:this.Ja()?t=>Ct(t,this.vo):null}n_(t,i,s){return i===void 0?(s===void 0&&(s=this.ca()),s.format(t)):i(t)}Ih(t,i){return this.n_(t,this.bo.priceFormatter,i)}Go(t,i){return this.n_(t,this.bo.percentageFormatter,i)}}class Oh{constructor(t,i){this._o=[],this.s_=new Map,this.Qa=0,this.e_=0,this.r_=1e3,this.uo=null,this.h_=new M,this.wl=t,this.Hi=i,this.l_=new zh(this);const s=i.W();this.a_=this.o_("left",s.leftPriceScale),this.__=this.o_("right",s.rightPriceScale),this.a_.Do().l(this.u_.bind(this,this.a_),this),this.__.Do().l(this.u_.bind(this,this.__),this),this.c_(s)}c_(t){if(t.leftPriceScale&&this.a_.Eh(t.leftPriceScale),t.rightPriceScale&&this.__.Eh(t.rightPriceScale),t.localization&&(this.a_.Sa(),this.__.Sa()),t.overlayPriceScales){const i=Array.from(this.s_.values());for(const s of i){const e=p(s[0].Dt());e.Eh(t.overlayPriceScales),t.localization&&e.Sa()}}}d_(t){switch(t){case"left":return this.a_;case"right":return this.__}return this.s_.has(t)?O(this.s_.get(t))[0].Dt():null}S(){this.$t().f_().p(this),this.a_.Do().p(this),this.__.Do().p(this),this._o.forEach(t=>{t.S&&t.S()}),this.h_.m()}v_(){return this.r_}p_(t){this.r_=t}$t(){return this.Hi}ji(){return this.e_}Bt(){return this.Qa}m_(t){this.e_=t,this.b_()}Oo(t){this.Qa=t,this.a_.Oo(t),this.__.Oo(t),this._o.forEach(i=>{if(this.ur(i)){const s=i.Dt();s!==null&&s.Oo(t)}}),this.b_()}Ta(){return this._o}ur(t){const i=t.Dt();return i===null||this.a_!==i&&this.__!==i}Fo(t,i,s){const e=s!==void 0?s:this.g_().w_+1;this.M_(t,i,e)}jo(t){const i=this._o.indexOf(t);A(i!==-1,"removeDataSource: invalid data source"),this._o.splice(i,1);const s=p(t.Dt()).xa();if(this.s_.has(s)){const n=O(this.s_.get(s)),r=n.indexOf(t);r!==-1&&(n.splice(r,1),n.length===0&&this.s_.delete(s))}const e=t.Dt();e&&e.Ta().indexOf(t)>=0&&e.jo(t),e!==null&&(e.Wo(),this.x_(e)),this.uo=null}dr(t){return t===this.a_?"left":t===this.__?"right":"overlay"}S_(){return this.a_}k_(){return this.__}y_(t,i){t.Uo(i)}C_(t,i){t.qo(i),this.b_()}T_(t){t.Yo()}P_(t,i){t.Xo(i)}R_(t,i){t.Ko(i),this.b_()}D_(t){t.Zo()}b_(){this._o.forEach(t=>{t.Rn()})}dn(){let t=null;return this.Hi.W().rightPriceScale.visible&&this.__.Ta().length!==0?t=this.__:this.Hi.W().leftPriceScale.visible&&this.a_.Ta().length!==0?t=this.a_:this._o.length!==0&&(t=this._o[0].Dt()),t===null&&(t=this.__),t}cr(){let t=null;return this.Hi.W().rightPriceScale.visible?t=this.__:this.Hi.W().leftPriceScale.visible&&(t=this.a_),t}x_(t){t!==null&&t.yo()&&this.O_(t)}A_(t){const i=this.wl.qs();t.So({Nn:!0}),i!==null&&t.t_(i),this.b_()}V_(){this.O_(this.a_),this.O_(this.__)}B_(){this.x_(this.a_),this.x_(this.__),this._o.forEach(t=>{this.ur(t)&&this.x_(t.Dt())}),this.b_(),this.Hi.Nh()}No(){return this.uo===null&&(this.uo=Fs(this._o)),this.uo}I_(){return this.h_}z_(){return this.l_}O_(t){const i=t.Qo();if(i&&i.length>0&&!this.wl.Ei()){const s=this.wl.qs();s!==null&&t.t_(s)}t.Rn()}g_(){const t=this.No();if(t.length===0)return{L_:0,w_:0};let i=0,s=0;for(let e=0;es&&(s=n))}return{L_:i,w_:s}}M_(t,i,s){let e=this.d_(i);if(e===null&&(e=this.o_(i,this.Hi.W().overlayPriceScales)),this._o.push(t),!Tt(i)){const n=this.s_.get(i)||[];n.push(t),this.s_.set(i,n)}e.Fo(t),t.Zi(e),t.Ki(s),this.x_(e),this.uo=null}u_(t,i,s){i.Sr!==s.Sr&&this.O_(t)}o_(t,i){const s=Object.assign({visible:!0,autoScale:!0},W(i)),e=new Eh(t,s,this.Hi.W().layout,this.Hi.W().localization);return e.Oo(this.Bt()),e}}class kh{constructor(t,i,s=50){this.Ye=0,this.Xe=1,this.Ke=1,this.Ge=new Map,this.Ze=new Map,this.E_=t,this.N_=i,this.Je=s}F_(t){const i=t.time,s=this.N_.cacheKey(i),e=this.Ge.get(s);if(e!==void 0)return e.W_;if(this.Ye===this.Je){const r=this.Ze.get(this.Ke);this.Ze.delete(this.Ke),this.Ge.delete(O(r)),this.Ke++,this.Ye--}const n=this.E_(t);return this.Ge.set(s,{W_:n,nr:this.Xe}),this.Ze.set(this.Xe,s),this.Ye++,this.Xe++,n}}class nt{constructor(t,i){A(t<=i,"right should be >= left"),this.j_=t,this.H_=i}Rs(){return this.j_}ui(){return this.H_}U_(){return this.H_-this.j_+1}Yr(t){return this.j_<=t&&t<=this.H_}gh(t){return this.j_===t.Rs()&&this.H_===t.ui()}}function qi(h,t){return h===null||t===null?h===t:h.gh(t)}class Th{constructor(){this.q_=new Map,this.Ge=null,this.Y_=!1}X_(t){this.Y_=t,this.Ge=null}K_(t,i){this.Z_(i),this.Ge=null;for(let s=i;s{t<=s[0].index?i.push(e):s.splice(ct(s,t,n=>n.indexn-e)){if(!this.q_.get(s))continue;const e=i;i=[];const n=e.length;let r=0;const o=O(this.q_.get(s)),l=o.length;let a=1/0,u=-1/0;for(let c=0;c=t&&f-u>=t)i.push(d),u=f;else if(this.Y_)return e}for(;rt.weight?h:t}class Rh{constructor(t,i,s,e){this.e_=0,this.eu=null,this.ru=[],this.fo=null,this.do=null,this.hu=new Th,this.lu=new Map,this.au=J.su(),this.ou=!0,this._u=new M,this.uu=new M,this.cu=new M,this.du=null,this.fu=null,this.vu=[],this._n=i,this.bo=s,this.pu=i.rightOffset,this.mu=i.barSpacing,this.Hi=t,this.N_=e,this.bu(),this.hu.X_(i.uniformDistribution)}W(){return this._n}wu(t){R(this.bo,t),this.gu(),this.bu()}Eh(t,i){var s;R(this._n,t),this._n.fixLeftEdge&&this.Mu(),this._n.fixRightEdge&&this.xu(),t.barSpacing!==void 0&&this.Hi.Kn(t.barSpacing),t.rightOffset!==void 0&&this.Hi.Zn(t.rightOffset),t.minBarSpacing!==void 0&&this.Hi.Kn((s=t.barSpacing)!==null&&s!==void 0?s:this.mu),this.gu(),this.bu(),this.cu.m()}vn(t){var i,s;return(s=(i=this.ru[t])===null||i===void 0?void 0:i.time)!==null&&s!==void 0?s:null}$i(t){var i;return(i=this.ru[t])!==null&&i!==void 0?i:null}ya(t,i){if(this.ru.length<1)return null;if(this.N_.key(t)>this.N_.key(this.ru[this.ru.length-1].time))return i?this.ru.length-1:null;const s=ct(this.ru,this.N_.key(t),(e,n)=>this.N_.key(e.time)0}qs(){return this.Su(),this.au.iu()}ku(){return this.Su(),this.au.nu()}yu(){const t=this.qs();if(t===null)return null;const i={from:t.Rs(),to:t.ui()};return this.Cu(i)}Cu(t){const i=Math.round(t.from),s=Math.round(t.to),e=p(this.Tu()),n=p(this.Pu());return{from:p(this.$i(Math.max(e,i))),to:p(this.$i(Math.min(n,s)))}}Ru(t){return{from:p(this.ya(t.from,!0)),to:p(this.ya(t.to,!0))}}ji(){return this.e_}m_(t){if(!isFinite(t)||t<=0||this.e_===t)return;const i=this.ku(),s=this.e_;if(this.e_=t,this.ou=!0,this._n.lockVisibleTimeRangeOnResize&&s!==0){const e=this.mu*t/s;this.mu=e}if(this._n.fixLeftEdge&&i!==null&&i.Rs()<=0){const e=s-t;this.pu-=Math.round(e/this.mu)+1,this.ou=!0}this.Du(),this.Ou()}It(t){if(this.Ei()||!rt(t))return 0;const i=this.Au()+this.pu-t;return this.e_-(i+.5)*this.mu-1}Zs(t,i){const s=this.Au(),e=i===void 0?0:i.from,n=i===void 0?t.length:i.to;for(let r=e;ri/2&&!u?v.needAlignCoordinate=!1:v.needAlignCoordinate=c&&m.index<=l||d&&m.index>=a,f++}return this.vu.length=f,this.fu=this.vu,this.vu}Fu(){this.ou=!0,this.Kn(this._n.barSpacing),this.Zn(this._n.rightOffset)}Wu(t){this.ou=!0,this.eu=t,this.Ou(),this.Mu()}ju(t,i){const s=this.Bu(t),e=this.ee(),n=e+i*(e/10);this.Kn(n),this._n.rightBarStaysOnScroll||this.Zn(this.Lu()+(s-this.Bu(t)))}Uo(t){this.fo&&this.Zo(),this.do===null&&this.du===null&&(this.Ei()||(this.do=t,this.Hu()))}qo(t){if(this.du===null)return;const i=ni(this.e_-t,0,this.e_),s=ni(this.e_-p(this.do),0,this.e_);i!==0&&s!==0&&this.Kn(this.du.ee*i/s)}Yo(){this.do!==null&&(this.do=null,this.$u())}Xo(t){this.fo===null&&this.du===null&&(this.Ei()||(this.fo=t,this.Hu()))}Ko(t){if(this.fo===null)return;const i=(this.fo-t)/this.ee();this.pu=p(this.du).Lu+i,this.ou=!0,this.Ou()}Zo(){this.fo!==null&&(this.fo=null,this.$u())}Uu(){this.qu(this._n.rightOffset)}qu(t,i=400){if(!isFinite(t))throw new RangeError("offset is required and must be finite number");if(!isFinite(i)||i<=0)throw new RangeError("animationDuration (optional) must be finite positive number");const s=this.pu,e=performance.now();this.Hi.qn({Yu:n=>(n-e)/i>=1,Xu:n=>{const r=(n-e)/i;return r>=1?t:s+(t-s)*r}})}bt(t,i){this.ou=!0,this.ru=t,this.hu.K_(t,i),this.Ou()}Ku(){return this._u}Zu(){return this.uu}Gu(){return this.cu}Au(){return this.eu||0}Ju(t){const i=t.U_();this.zu(this.e_/i),this.pu=t.ui()-this.Au(),this.Ou(),this.ou=!0,this.Hi.Iu(),this.Hi.Nh()}Qu(){const t=this.Tu(),i=this.Pu();t!==null&&i!==null&&this.Ju(new nt(t,i+this._n.rightOffset))}tc(t){const i=new nt(t.from,t.to);this.Ju(i)}Ui(t){return this.bo.timeFormatter!==void 0?this.bo.timeFormatter(t.originalTime):this.N_.formatHorzItem(t.time)}Eu(){const{handleScroll:t,handleScale:i}=this.Hi.W();return!(t.horzTouchDrag||t.mouseWheel||t.pressedMouseMove||t.vertTouchDrag||i.axisDoubleClickReset.time||i.axisPressedMouseMove.time||i.mouseWheel||i.pinch)}Tu(){return this.ru.length===0?null:0}Pu(){return this.ru.length===0?null:this.ru.length-1}ic(t){return(this.e_-1-t)/this.mu}Bu(t){const i=this.ic(t),s=this.Au()+this.pu-i;return Math.round(1e6*s)/1e6}zu(t){const i=this.mu;this.mu=t,this.Du(),i!==this.mu&&(this.ou=!0,this.nc())}Su(){if(!this.ou)return;if(this.ou=!1,this.Ei())return void this.sc(J.su());const t=this.Au(),i=this.e_/this.mu,s=this.pu+t,e=new nt(s-i+1,s);this.sc(new J(e))}Du(){const t=this.ec();if(this.mui&&(this.mu=i,this.ou=!0)}}ec(){return this._n.fixLeftEdge&&this._n.fixRightEdge&&this.ru.length!==0?this.e_/this.ru.length:this._n.minBarSpacing}Ou(){const t=this.rc();this.pu>t&&(this.pu=t,this.ou=!0);const i=this.hc();i!==null&&this.puthis.lc(s),this.N_),this.lu.set(t.weight,i)),i.F_(t)}lc(t){return this.N_.formatTickmark(t,this.bo)}sc(t){const i=this.au;this.au=t,qi(i.iu(),this.au.iu())||this._u.m(),qi(i.nu(),this.au.nu())||this.uu.m(),this.nc()}nc(){this.fu=null}gu(){this.nc(),this.lu.clear()}bu(){this.N_.updateFormatter(this.bo)}Mu(){if(!this._n.fixLeftEdge)return;const t=this.Tu();if(t===null)return;const i=this.qs();if(i===null)return;const s=i.Rs()-t;if(s<0){const e=this.pu-s-1;this.Zn(e)}this.Du()}xu(){this.Ou(),this.Du()}}class Bh{K(t,i,s){t.useMediaCoordinateSpace(e=>this.Z(e,i,s))}fl(t,i,s){t.useMediaCoordinateSpace(e=>this.ac(e,i,s))}ac(t,i,s){}}class Lh extends Bh{constructor(t){super(),this.oc=new Map,this.zt=t}Z(t){}ac(t){if(!this.zt.yt)return;const{context:i,mediaSize:s}=t;let e=0;for(const r of this.zt._c){if(r.Zt.length===0)continue;i.font=r.R;const o=this.uc(i,r.Zt);o>s.width?r.ju=s.width/o:r.ju=1,e+=r.cc*r.ju}let n=0;switch(this.zt.dc){case"top":n=0;break;case"center":n=Math.max((s.height-e)/2,0);break;case"bottom":n=Math.max(s.height-e,0)}i.fillStyle=this.zt.O;for(const r of this.zt._c){i.save();let o=0;switch(this.zt.fc){case"left":i.textAlign="left",o=r.cc/2;break;case"center":i.textAlign="center",o=s.width/2;break;case"right":i.textAlign="right",o=s.width-1-r.cc/2}i.translate(o,n),i.textBaseline="top",i.font=r.R,i.scale(r.ju,r.ju),i.fillText(r.Zt,0,r.vc),i.restore(),n+=r.cc*r.ju}}uc(t,i){const s=this.mc(t.font);let e=s.get(i);return e===void 0&&(e=t.measureText(i).width,s.set(i,e)),e}mc(t){let i=this.oc.get(t);return i===void 0&&(i=new Map,this.oc.set(t,i)),i}}class Ph{constructor(t){this.ft=!0,this.Ft={yt:!1,O:"",_c:[],dc:"center",fc:"center"},this.Wt=new Lh(this.Ft),this.jt=t}bt(){this.ft=!0}gt(){return this.ft&&(this.Mt(),this.ft=!1),this.Wt}Mt(){const t=this.jt.W(),i=this.Ft;i.yt=t.visible,i.yt&&(i.O=t.color,i.fc=t.horzAlign,i.dc=t.vertAlign,i._c=[{Zt:t.text,R:K(t.fontSize,t.fontFamily,t.fontStyle),cc:1.2*t.fontSize,vc:0,ju:0}])}}class Wh extends fi{constructor(t,i){super(),this._n=i,this.mn=new Ph(this)}Tn(){return[]}Cn(){return[this.mn]}W(){return this._n}Rn(){this.mn.bt()}}var Ji,Ki,Gi,ts,is;(function(h){h[h.OnTouchEnd=0]="OnTouchEnd",h[h.OnNextTap=1]="OnNextTap"})(Ji||(Ji={}));class Ih{constructor(t,i,s){this.bc=[],this.wc=[],this.e_=0,this.gc=null,this.Mc=new M,this.xc=new M,this.Sc=null,this.kc=t,this._n=i,this.N_=s,this.yc=new ve(this),this.wl=new Rh(this,i.timeScale,this._n.localization,s),this.vt=new Ce(this,i.crosshair),this.Cc=new Sh(i.crosshair),this.Tc=new Wh(this,i.watermark),this.Pc(),this.bc[0].p_(2e3),this.Rc=this.Dc(0),this.Oc=this.Dc(1)}$l(){this.Ac(x.ns())}Nh(){this.Ac(x.ts())}sa(){this.Ac(new x(1))}Ul(t){const i=this.Vc(t);this.Ac(i)}Bc(){return this.gc}Ic(t){const i=this.gc;this.gc=t,i!==null&&this.Ul(i.zc),t!==null&&this.Ul(t.zc)}W(){return this._n}Eh(t){R(this._n,t),this.bc.forEach(i=>i.c_(t)),t.timeScale!==void 0&&this.wl.Eh(t.timeScale),t.localization!==void 0&&this.wl.wu(t.localization),(t.leftPriceScale||t.rightPriceScale)&&this.Mc.m(),this.Rc=this.Dc(0),this.Oc=this.Dc(1),this.$l()}Lc(t,i){if(t==="left")return void this.Eh({leftPriceScale:i});if(t==="right")return void this.Eh({rightPriceScale:i});const s=this.Ec(t);s!==null&&(s.Dt.Eh(i),this.Mc.m())}Ec(t){for(const i of this.bc){const s=i.d_(t);if(s!==null)return{Ht:i,Dt:s}}return null}St(){return this.wl}Nc(){return this.bc}Fc(){return this.Tc}Wc(){return this.vt}jc(){return this.xc}Hc(t,i){t.Oo(i),this.Iu()}m_(t){this.e_=t,this.wl.m_(this.e_),this.bc.forEach(i=>i.m_(t)),this.Iu()}Pc(t){const i=new Oh(this.wl,this);t!==void 0?this.bc.splice(t,0,i):this.bc.push(i);const s=t===void 0?this.bc.length-1:t,e=x.ns();return e.Ln(s,{En:0,Nn:!0}),this.Ac(e),i}y_(t,i,s){t.y_(i,s)}C_(t,i,s){t.C_(i,s),this.ql(),this.Ac(this.$c(t,2))}T_(t,i){t.T_(i),this.Ac(this.$c(t,2))}P_(t,i,s){i.yo()||t.P_(i,s)}R_(t,i,s){i.yo()||(t.R_(i,s),this.ql(),this.Ac(this.$c(t,2)))}D_(t,i){i.yo()||(t.D_(i),this.Ac(this.$c(t,2)))}A_(t,i){t.A_(i),this.Ac(this.$c(t,2))}Uc(t){this.wl.Uo(t)}qc(t,i){const s=this.St();if(s.Ei()||i===0)return;const e=s.ji();t=Math.max(1,Math.min(t,e)),s.ju(t,i),this.Iu()}Yc(t){this.Xc(0),this.Kc(t),this.Zc()}Gc(t){this.wl.qo(t),this.Iu()}Jc(){this.wl.Yo(),this.Nh()}Xc(t){this.wl.Xo(t)}Kc(t){this.wl.Ko(t),this.Iu()}Zc(){this.wl.Zo(),this.Nh()}wt(){return this.wc}Qc(t,i,s,e,n){this.vt.bn(t,i);let r=NaN,o=this.wl.Vu(t);const l=this.wl.qs();l!==null&&(o=Math.min(Math.max(l.Rs(),o),l.ui()));const a=e.dn(),u=a.Ct();u!==null&&(r=a.fn(i,u)),r=this.Cc.Ca(r,o,e),this.vt.xn(o,r,e),this.sa(),n||this.xc.m(this.vt.xt(),{x:t,y:i},s)}td(t,i,s){const e=s.dn(),n=e.Ct(),r=e.Rt(t,p(n)),o=this.wl.ya(i,!0),l=this.wl.It(p(o));this.Qc(l,r,null,s,!0)}nd(t){this.Wc().kn(),this.sa(),t||this.xc.m(null,null,null)}ql(){const t=this.vt.Ht();if(t!==null){const i=this.vt.gn(),s=this.vt.Mn();this.Qc(i,s,null,t)}this.vt.Rn()}sd(t,i,s){const e=this.wl.vn(0);i!==void 0&&s!==void 0&&this.wl.bt(i,s);const n=this.wl.vn(0),r=this.wl.Au(),o=this.wl.qs();if(o!==null&&e!==null&&n!==null){const l=o.Yr(r),a=this.N_.key(e)>this.N_.key(n),u=t!==null&&t>r&&!a,c=this.wl.W().allowShiftVisibleRangeOnWhitespaceReplacement,d=l&&(s!==void 0||c)&&this.wl.W().shiftVisibleRangeOnNewBar;if(u&&!d){const f=t-r;this.wl.Zn(this.wl.Lu()-f)}}this.wl.Wu(t)}Kl(t){t!==null&&t.B_()}_r(t){const i=this.bc.find(s=>s.No().includes(t));return i===void 0?null:i}Iu(){this.Tc.Rn(),this.bc.forEach(t=>t.B_()),this.ql()}S(){this.bc.forEach(t=>t.S()),this.bc.length=0,this._n.localization.priceFormatter=void 0,this._n.localization.percentageFormatter=void 0,this._n.localization.timeFormatter=void 0}ed(){return this.yc}vr(){return this.yc.W()}f_(){return this.Mc}rd(t,i,s){const e=this.bc[0],n=this.hd(i,t,e,s);return this.wc.push(n),this.wc.length===1?this.$l():this.Nh(),n}ld(t){const i=this._r(t),s=this.wc.indexOf(t);A(s!==-1,"Series not found"),this.wc.splice(s,1),p(i).jo(t),t.S&&t.S()}Hl(t,i){const s=p(this._r(t));s.jo(t);const e=this.Ec(i);if(e===null){const n=t.Xi();s.Fo(t,i,n)}else{const n=e.Ht===s?t.Xi():void 0;e.Ht.Fo(t,i,n)}}Qu(){const t=x.ts();t.jn(),this.Ac(t)}ad(t){const i=x.ts();i.Un(t),this.Ac(i)}Xn(){const t=x.ts();t.Xn(),this.Ac(t)}Kn(t){const i=x.ts();i.Kn(t),this.Ac(i)}Zn(t){const i=x.ts();i.Zn(t),this.Ac(i)}qn(t){const i=x.ts();i.qn(t),this.Ac(i)}Hn(){const t=x.ts();t.Hn(),this.Ac(t)}od(){return this._n.rightPriceScale.visible?"right":"left"}_d(){return this.Oc}q(){return this.Rc}Vt(t){const i=this.Oc,s=this.Rc;if(i===s)return i;if(t=Math.max(0,Math.min(100,Math.round(100*t))),this.Sc===null||this.Sc.ys!==s||this.Sc.Cs!==i)this.Sc={ys:s,Cs:i,ud:new Map};else{const n=this.Sc.ud.get(t);if(n!==void 0)return n}const e=function(n,r,o){const[l,a,u,c]=zt(n),[d,f,m,v]=zt(r),b=[N(l+o*(d-l)),N(a+o*(f-a)),N(u+o*(m-u)),xs(c+o*(v-c))];return`rgba(${b[0]}, ${b[1]}, ${b[2]}, ${b[3]})`}(s,i,t/100);return this.Sc.ud.set(t,e),e}$c(t,i){const s=new x(i);if(t!==null){const e=this.bc.indexOf(t);s.Ln(e,{En:i})}return s}Vc(t,i){return i===void 0&&(i=2),this.$c(this._r(t),i)}Ac(t){this.kc&&this.kc(t),this.bc.forEach(i=>i.z_().Fh().bt())}hd(t,i,s,e){const n=new bi(this,t,i,s,e),r=t.priceScaleId!==void 0?t.priceScaleId:this.od();return s.Fo(n,r),Tt(r)||n.Eh(t),n}Dc(t){const i=this._n.layout;return i.background.type==="gradient"?t===0?i.background.topColor:i.background.bottomColor:i.background.color}}function ri(h){return!P(h)&&!ut(h)}function Hs(h){return P(h)}(function(h){h[h.Disabled=0]="Disabled",h[h.Continuous=1]="Continuous",h[h.OnDataUpdate=2]="OnDataUpdate"})(Ki||(Ki={})),function(h){h[h.LastBar=0]="LastBar",h[h.LastVisible=1]="LastVisible"}(Gi||(Gi={})),function(h){h.Solid="solid",h.VerticalGradient="gradient"}(ts||(ts={})),function(h){h[h.Year=0]="Year",h[h.Month=1]="Month",h[h.DayOfMonth=2]="DayOfMonth",h[h.Time=3]="Time",h[h.TimeWithSeconds=4]="TimeWithSeconds"}(is||(is={}));const ss=h=>h.getUTCFullYear();function Dh(h,t,i){return t.replace(/yyyy/g,(s=>I(ss(s),4))(h)).replace(/yy/g,(s=>I(ss(s)%100,2))(h)).replace(/MMMM/g,((s,e)=>new Date(s.getUTCFullYear(),s.getUTCMonth(),1).toLocaleString(e,{month:"long"}))(h,i)).replace(/MMM/g,((s,e)=>new Date(s.getUTCFullYear(),s.getUTCMonth(),1).toLocaleString(e,{month:"short"}))(h,i)).replace(/MM/g,(s=>I((e=>e.getUTCMonth()+1)(s),2))(h)).replace(/dd/g,(s=>I((e=>e.getUTCDate())(s),2))(h))}class js{constructor(t="yyyy-MM-dd",i="default"){this.dd=t,this.fd=i}F_(t){return Dh(t,this.dd,this.fd)}}class Vh{constructor(t){this.vd=t||"%h:%m:%s"}F_(t){return this.vd.replace("%h",I(t.getUTCHours(),2)).replace("%m",I(t.getUTCMinutes(),2)).replace("%s",I(t.getUTCSeconds(),2))}}const Ah={pd:"yyyy-MM-dd",md:"%h:%m:%s",bd:" ",wd:"default"};class $h{constructor(t={}){const i=Object.assign(Object.assign({},Ah),t);this.gd=new js(i.pd,i.wd),this.Md=new Vh(i.md),this.xd=i.bd}F_(t){return`${this.gd.F_(t)}${this.xd}${this.Md.F_(t)}`}}function bt(h){return 60*h*60*1e3}function Qt(h){return 60*h*1e3}const gt=[{Sd:(es=1,1e3*es),kd:10},{Sd:Qt(1),kd:20},{Sd:Qt(5),kd:21},{Sd:Qt(30),kd:22},{Sd:bt(1),kd:30},{Sd:bt(3),kd:31},{Sd:bt(6),kd:32},{Sd:bt(12),kd:33}];var es;function hs(h,t){if(h.getUTCFullYear()!==t.getUTCFullYear())return 70;if(h.getUTCMonth()!==t.getUTCMonth())return 60;if(h.getUTCDate()!==t.getUTCDate())return 50;for(let i=gt.length-1;i>=0;--i)if(Math.floor(t.getTime()/gt[i].Sd)!==Math.floor(h.getTime()/gt[i].Sd))return gt[i].kd;return 0}function Xt(h){let t=h;if(ut(h)&&(t=gi(h)),!ri(t))throw new Error("time must be of type BusinessDay");const i=new Date(Date.UTC(t.year,t.month-1,t.day,0,0,0,0));return{yd:Math.round(i.getTime()/1e3),Cd:t}}function ns(h){if(!Hs(h))throw new Error("time must be of type isUTCTimestamp");return{yd:h}}function gi(h){const t=new Date(h);if(isNaN(t.getTime()))throw new Error(`Invalid date string=${h}, expected format=yyyy-mm-dd`);return{day:t.getUTCDate(),month:t.getUTCMonth()+1,year:t.getUTCFullYear()}}function rs(h){ut(h.time)&&(h.time=gi(h.time))}class os{options(){return this._n}setOptions(t){this._n=t,this.updateFormatter(t.localization)}preprocessData(t){Array.isArray(t)?function(i){i.forEach(rs)}(t):rs(t)}createConverterToInternalObj(t){return p(function(i){return i.length===0?null:ri(i[0].time)||ut(i[0].time)?Xt:ns}(t))}key(t){return typeof t=="object"&&"yd"in t?t.yd:this.key(this.convertHorzItemToInternal(t))}cacheKey(t){const i=t;return i.Cd===void 0?new Date(1e3*i.yd).getTime():new Date(Date.UTC(i.Cd.year,i.Cd.month-1,i.Cd.day)).getTime()}convertHorzItemToInternal(t){return Hs(i=t)?ns(i):ri(i)?Xt(i):Xt(gi(i));var i}updateFormatter(t){if(!this._n)return;const i=t.dateFormat;this._n.timeScale.timeVisible?this.Td=new $h({pd:i,md:this._n.timeScale.secondsVisible?"%h:%m:%s":"%h:%m",bd:" ",wd:t.locale}):this.Td=new js(i,t.locale)}formatHorzItem(t){const i=t;return this.Td.F_(new Date(1e3*i.yd))}formatTickmark(t,i){const s=function(n,r,o){switch(n){case 0:case 10:return r?o?4:3:2;case 20:case 21:case 22:case 30:case 31:case 32:case 33:return r?3:2;case 50:return 2;case 60:return 1;case 70:return 0}}(t.weight,this._n.timeScale.timeVisible,this._n.timeScale.secondsVisible),e=this._n.timeScale;if(e.tickMarkFormatter!==void 0){const n=e.tickMarkFormatter(t.originalTime,s,i.locale);if(n!==null)return n}return function(n,r,o){const l={};switch(r){case 0:l.year="numeric";break;case 1:l.month="short";break;case 2:l.day="numeric";break;case 3:l.hour12=!1,l.hour="2-digit",l.minute="2-digit";break;case 4:l.hour12=!1,l.hour="2-digit",l.minute="2-digit",l.second="2-digit"}const a=n.Cd===void 0?new Date(1e3*n.yd):new Date(Date.UTC(n.Cd.year,n.Cd.month-1,n.Cd.day));return new Date(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()).toLocaleString(o,l)}(t.time,s,i.locale)}maxTickMarkWeight(t){let i=t.reduce(Nh,t[0]).weight;return i>30&&i<50&&(i=30),i}fillWeightsForPoints(t,i){(function(s,e=0){if(s.length===0)return;let n=e===0?null:s[e-1].time.yd,r=n!==null?new Date(1e3*n):null,o=0;for(let l=e;l1){const l=Math.ceil(o/(s.length-1)),a=new Date(1e3*(s[0].time.yd-l));s[0].timeWeight=hs(new Date(1e3*s[0].time.yd),a)}})(t,i)}static Pd(t){return R({localization:{dateFormat:"dd MMM 'yy"}},t??{})}}const G=typeof window<"u";function ls(){return!!G&&window.navigator.userAgent.toLowerCase().indexOf("firefox")>-1}function qt(){return!!G&&/iPhone|iPad|iPod/.test(window.navigator.platform)}function oi(h){return h+h%2}function Jt(h,t){return h.Rd-t.Rd}function Kt(h,t,i){const s=(h.Rd-t.Rd)/(h.ot-t.ot);return Math.sign(s)*Math.min(Math.abs(s),i)}class Fh{constructor(t,i,s,e){this.Dd=null,this.Od=null,this.Ad=null,this.Vd=null,this.Bd=null,this.Id=0,this.zd=0,this.Ld=t,this.Ed=i,this.Nd=s,this.ss=e}Fd(t,i){if(this.Dd!==null){if(this.Dd.ot===i)return void(this.Dd.Rd=t);if(Math.abs(this.Dd.Rd-t)50)return;let s=0;const e=Kt(this.Dd,this.Od,this.Ed),n=Jt(this.Dd,this.Od),r=[e],o=[n];if(s+=n,this.Ad!==null){const a=Kt(this.Od,this.Ad,this.Ed);if(Math.sign(a)===Math.sign(e)){const u=Jt(this.Od,this.Ad);if(r.push(a),o.push(u),s+=u,this.Vd!==null){const c=Kt(this.Ad,this.Vd,this.Ed);if(Math.sign(c)===Math.sign(e)){const d=Jt(this.Ad,this.Vd);r.push(c),o.push(d),s+=d}}}}let l=0;for(let a=0;a({width:Math.max(e.width,n.width),height:Math.max(e.height,n.height)})});return s.resizeCanvasElement(t),s}function Z(h){var t;h.width=1,h.height=1,(t=h.getContext("2d"))===null||t===void 0||t.clearRect(0,0,1,1)}function li(h,t,i,s){h.fl&&h.fl(t,i,s)}function Mt(h,t,i,s){h.K(t,i,s)}function ai(h,t,i,s){const e=h(i,s);for(const n of e){const r=n.gt();r!==null&&t(r)}}function Hh(h){G&&window.chrome!==void 0&&h.addEventListener("mousedown",t=>{if(t.button===1)return t.preventDefault(),!1})}class wi{constructor(t,i,s){this.jd=0,this.Hd=null,this.$d={nt:Number.NEGATIVE_INFINITY,st:Number.POSITIVE_INFINITY},this.Ud=0,this.qd=null,this.Yd={nt:Number.NEGATIVE_INFINITY,st:Number.POSITIVE_INFINITY},this.Xd=null,this.Kd=!1,this.Zd=null,this.Gd=null,this.Jd=!1,this.Qd=!1,this.tf=!1,this.if=null,this.nf=null,this.sf=null,this.ef=null,this.rf=null,this.hf=null,this.lf=null,this.af=0,this._f=!1,this.uf=!1,this.cf=!1,this.df=0,this.ff=null,this.vf=!qt(),this.pf=e=>{this.mf(e)},this.bf=e=>{if(this.wf(e)){const n=this.gf(e);if(++this.Ud,this.qd&&this.Ud>1){const{Mf:r}=this.xf(L(e),this.Yd);r<30&&!this.tf&&this.Sf(n,this.yf.kf),this.Cf()}}else{const n=this.gf(e);if(++this.jd,this.Hd&&this.jd>1){const{Mf:r}=this.xf(L(e),this.$d);r<5&&!this.Qd&&this.Tf(n,this.yf.Pf),this.Rf()}}},this.Df=t,this.yf=i,this._n=s,this.Of()}S(){this.if!==null&&(this.if(),this.if=null),this.nf!==null&&(this.nf(),this.nf=null),this.ef!==null&&(this.ef(),this.ef=null),this.rf!==null&&(this.rf(),this.rf=null),this.hf!==null&&(this.hf(),this.hf=null),this.sf!==null&&(this.sf(),this.sf=null),this.Af(),this.Rf()}Vf(t){this.ef&&this.ef();const i=this.Bf.bind(this);if(this.ef=()=>{this.Df.removeEventListener("mousemove",i)},this.Df.addEventListener("mousemove",i),this.wf(t))return;const s=this.gf(t);this.Tf(s,this.yf.If),this.vf=!0}Rf(){this.Hd!==null&&clearTimeout(this.Hd),this.jd=0,this.Hd=null,this.$d={nt:Number.NEGATIVE_INFINITY,st:Number.POSITIVE_INFINITY}}Cf(){this.qd!==null&&clearTimeout(this.qd),this.Ud=0,this.qd=null,this.Yd={nt:Number.NEGATIVE_INFINITY,st:Number.POSITIVE_INFINITY}}Bf(t){if(this.cf||this.Gd!==null||this.wf(t))return;const i=this.gf(t);this.Tf(i,this.yf.zf),this.vf=!0}Lf(t){const i=Gt(t.changedTouches,p(this.ff));if(i===null||(this.df=wt(t),this.lf!==null)||this.uf)return;this._f=!0;const s=this.xf(L(i),p(this.Gd)),{Ef:e,Nf:n,Mf:r}=s;if(this.Jd||!(r<5)){if(!this.Jd){const o=.5*e,l=n>=o&&!this._n.Ff(),a=o>n&&!this._n.Wf();l||a||(this.uf=!0),this.Jd=!0,this.tf=!0,this.Af(),this.Cf()}if(!this.uf){const o=this.gf(t,i);this.Sf(o,this.yf.jf),Q(t)}}}Hf(t){if(t.button!==0)return;const i=this.xf(L(t),p(this.Zd)),{Mf:s}=i;if(s>=5&&(this.Qd=!0,this.Rf()),this.Qd){const e=this.gf(t);this.Tf(e,this.yf.$f)}}xf(t,i){const s=Math.abs(i.nt-t.nt),e=Math.abs(i.st-t.st);return{Ef:s,Nf:e,Mf:s+e}}Uf(t){let i=Gt(t.changedTouches,p(this.ff));if(i===null&&t.touches.length===0&&(i=t.changedTouches[0]),i===null)return;this.ff=null,this.df=wt(t),this.Af(),this.Gd=null,this.hf&&(this.hf(),this.hf=null);const s=this.gf(t,i);if(this.Sf(s,this.yf.qf),++this.Ud,this.qd&&this.Ud>1){const{Mf:e}=this.xf(L(i),this.Yd);e<30&&!this.tf&&this.Sf(s,this.yf.kf),this.Cf()}else this.tf||(this.Sf(s,this.yf.Yf),this.yf.Yf&&Q(t));this.Ud===0&&Q(t),t.touches.length===0&&this.Kd&&(this.Kd=!1,Q(t))}mf(t){if(t.button!==0)return;const i=this.gf(t);if(this.Zd=null,this.cf=!1,this.rf&&(this.rf(),this.rf=null),ls()&&this.Df.ownerDocument.documentElement.removeEventListener("mouseleave",this.pf),!this.wf(t))if(this.Tf(i,this.yf.Xf),++this.jd,this.Hd&&this.jd>1){const{Mf:s}=this.xf(L(t),this.$d);s<5&&!this.Qd&&this.Tf(i,this.yf.Pf),this.Rf()}else this.Qd||this.Tf(i,this.yf.Kf)}Af(){this.Xd!==null&&(clearTimeout(this.Xd),this.Xd=null)}Zf(t){if(this.ff!==null)return;const i=t.changedTouches[0];this.ff=i.identifier,this.df=wt(t);const s=this.Df.ownerDocument.documentElement;this.tf=!1,this.Jd=!1,this.uf=!1,this.Gd=L(i),this.hf&&(this.hf(),this.hf=null);{const n=this.Lf.bind(this),r=this.Uf.bind(this);this.hf=()=>{s.removeEventListener("touchmove",n),s.removeEventListener("touchend",r)},s.addEventListener("touchmove",n,{passive:!1}),s.addEventListener("touchend",r,{passive:!1}),this.Af(),this.Xd=setTimeout(this.Gf.bind(this,t),240)}const e=this.gf(t,i);this.Sf(e,this.yf.Jf),this.qd||(this.Ud=0,this.qd=setTimeout(this.Cf.bind(this),500),this.Yd=L(i))}Qf(t){if(t.button!==0)return;const i=this.Df.ownerDocument.documentElement;ls()&&i.addEventListener("mouseleave",this.pf),this.Qd=!1,this.Zd=L(t),this.rf&&(this.rf(),this.rf=null);{const e=this.Hf.bind(this),n=this.mf.bind(this);this.rf=()=>{i.removeEventListener("mousemove",e),i.removeEventListener("mouseup",n)},i.addEventListener("mousemove",e),i.addEventListener("mouseup",n)}if(this.cf=!0,this.wf(t))return;const s=this.gf(t);this.Tf(s,this.yf.tv),this.Hd||(this.jd=0,this.Hd=setTimeout(this.Rf.bind(this),500),this.$d=L(t))}Of(){this.Df.addEventListener("mouseenter",this.Vf.bind(this)),this.Df.addEventListener("touchcancel",this.Af.bind(this));{const t=this.Df.ownerDocument,i=s=>{this.yf.iv&&(s.composed&&this.Df.contains(s.composedPath()[0])||s.target&&this.Df.contains(s.target)||this.yf.iv())};this.nf=()=>{t.removeEventListener("touchstart",i)},this.if=()=>{t.removeEventListener("mousedown",i)},t.addEventListener("mousedown",i),t.addEventListener("touchstart",i,{passive:!0})}qt()&&(this.sf=()=>{this.Df.removeEventListener("dblclick",this.bf)},this.Df.addEventListener("dblclick",this.bf)),this.Df.addEventListener("mouseleave",this.nv.bind(this)),this.Df.addEventListener("touchstart",this.Zf.bind(this),{passive:!0}),Hh(this.Df),this.Df.addEventListener("mousedown",this.Qf.bind(this)),this.sv(),this.Df.addEventListener("touchmove",()=>{},{passive:!1})}sv(){this.yf.ev===void 0&&this.yf.rv===void 0&&this.yf.hv===void 0||(this.Df.addEventListener("touchstart",t=>this.lv(t.touches),{passive:!0}),this.Df.addEventListener("touchmove",t=>{if(t.touches.length===2&&this.lf!==null&&this.yf.rv!==void 0){const i=as(t.touches[0],t.touches[1])/this.af;this.yf.rv(this.lf,i),Q(t)}},{passive:!1}),this.Df.addEventListener("touchend",t=>{this.lv(t.touches)}))}lv(t){t.length===1&&(this._f=!1),t.length!==2||this._f||this.Kd?this.av():this.ov(t)}ov(t){const i=this.Df.getBoundingClientRect()||{left:0,top:0};this.lf={nt:(t[0].clientX-i.left+(t[1].clientX-i.left))/2,st:(t[0].clientY-i.top+(t[1].clientY-i.top))/2},this.af=as(t[0],t[1]),this.yf.ev!==void 0&&this.yf.ev(),this.Af()}av(){this.lf!==null&&(this.lf=null,this.yf.hv!==void 0&&this.yf.hv())}nv(t){if(this.ef&&this.ef(),this.wf(t)||!this.vf)return;const i=this.gf(t);this.Tf(i,this.yf._v),this.vf=!qt()}Gf(t){const i=Gt(t.touches,p(this.ff));if(i===null)return;const s=this.gf(t,i);this.Sf(s,this.yf.uv),this.tf=!0,this.Kd=!0}wf(t){return t.sourceCapabilities&&t.sourceCapabilities.firesTouchEvents!==void 0?t.sourceCapabilities.firesTouchEvents:wt(t){t.type!=="touchstart"&&Q(t)}}}}function as(h,t){const i=h.clientX-t.clientX,s=h.clientY-t.clientY;return Math.sqrt(i*i+s*s)}function Q(h){h.cancelable&&h.preventDefault()}function L(h){return{nt:h.pageX,st:h.pageY}}function wt(h){return h.timeStamp||performance.now()}function Gt(h,t){for(let i=0;i{var s,e,n,r;return((e=(s=i.Dt())===null||s===void 0?void 0:s.xa())!==null&&e!==void 0?e:"")!==t?[]:(r=(n=i.la)===null||n===void 0?void 0:n.call(i,h))!==null&&r!==void 0?r:[]}}class us{constructor(t,i,s,e){this.zi=null,this.gv=null,this.Mv=!1,this.xv=new lt(200),this.Zr=null,this.Sv=0,this.kv=!1,this.yv=()=>{this.kv||this.Qi.Cv().$t().Nh()},this.Tv=()=>{this.kv||this.Qi.Cv().$t().Nh()},this.Qi=t,this._n=i,this.mo=i.layout,this.yc=s,this.Pv=e==="left",this.Rv=ti("normal",e),this.Dv=ti("top",e),this.Ov=ti("bottom",e),this.Av=document.createElement("div"),this.Av.style.height="100%",this.Av.style.overflow="hidden",this.Av.style.width="25px",this.Av.style.left="0",this.Av.style.position="relative",this.Vv=U(this.Av,S({width:16,height:16})),this.Vv.subscribeSuggestedBitmapSizeChanged(this.yv);const n=this.Vv.canvasElement;n.style.position="absolute",n.style.zIndex="1",n.style.left="0",n.style.top="0",this.Bv=U(this.Av,S({width:16,height:16})),this.Bv.subscribeSuggestedBitmapSizeChanged(this.Tv);const r=this.Bv.canvasElement;r.style.position="absolute",r.style.zIndex="2",r.style.left="0",r.style.top="0";const o={tv:this.Iv.bind(this),Jf:this.Iv.bind(this),$f:this.zv.bind(this),jf:this.zv.bind(this),iv:this.Lv.bind(this),Xf:this.Ev.bind(this),qf:this.Ev.bind(this),Pf:this.Nv.bind(this),kf:this.Nv.bind(this),If:this.Fv.bind(this),_v:this.Wv.bind(this)};this.jv=new wi(this.Bv.canvasElement,o,{Ff:()=>!this._n.handleScroll.vertTouchDrag,Wf:()=>!0})}S(){this.jv.S(),this.Bv.unsubscribeSuggestedBitmapSizeChanged(this.Tv),Z(this.Bv.canvasElement),this.Bv.dispose(),this.Vv.unsubscribeSuggestedBitmapSizeChanged(this.yv),Z(this.Vv.canvasElement),this.Vv.dispose(),this.zi!==null&&this.zi.$o().p(this),this.zi=null}Hv(){return this.Av}P(){return this.mo.fontSize}$v(){const t=this.yc.W();return this.Zr!==t.R&&(this.xv.Qe(),this.Zr=t.R),t}Uv(){if(this.zi===null)return 0;let t=0;const i=this.$v(),s=p(this.Vv.canvasElement.getContext("2d"));s.save();const e=this.zi.La();s.font=this.qv(),e.length>0&&(t=Math.max(this.xv.Mi(s,e[0].Za),this.xv.Mi(s,e[e.length-1].Za)));const n=this.Yv();for(let l=n.length;l--;){const a=this.xv.Mi(s,n[l].Zt());a>t&&(t=a)}const r=this.zi.Ct();if(r!==null&&this.gv!==null){const l=this.zi.fn(1,r),a=this.zi.fn(this.gv.height-2,r);t=Math.max(t,this.xv.Mi(s,this.zi.Ni(Math.floor(Math.min(l,a))+.11111111111111,r)),this.xv.Mi(s,this.zi.Ni(Math.ceil(Math.max(l,a))-.11111111111111,r)))}s.restore();const o=t||34;return oi(Math.ceil(i.C+i.T+i.B+i.I+5+o))}Xv(t){this.gv!==null&&F(this.gv,t)||(this.gv=t,this.kv=!0,this.Vv.resizeCanvasElement(t),this.Bv.resizeCanvasElement(t),this.kv=!1,this.Av.style.width=`${t.width}px`,this.Av.style.height=`${t.height}px`)}Kv(){return p(this.gv).width}Zi(t){this.zi!==t&&(this.zi!==null&&this.zi.$o().p(this),this.zi=t,t.$o().l(this.ao.bind(this),this))}Dt(){return this.zi}Qe(){const t=this.Qi.Zv();this.Qi.Cv().$t().A_(t,p(this.Dt()))}Gv(t){if(this.gv===null)return;if(t!==1){this.Jv(),this.Vv.applySuggestedBitmapSize();const s=H(this.Vv);s!==null&&(s.useBitmapCoordinateSpace(e=>{this.Qv(e),this.Ae(e)}),this.Qi.tp(s,this.Ov),this.ip(s),this.Qi.tp(s,this.Rv),this.np(s))}this.Bv.applySuggestedBitmapSize();const i=H(this.Bv);i!==null&&(i.useBitmapCoordinateSpace(({context:s,bitmapSize:e})=>{s.clearRect(0,0,e.width,e.height)}),this.sp(i),this.Qi.tp(i,this.Dv))}ep(){return this.Vv.bitmapSize}rp(t,i,s){const e=this.ep();e.width>0&&e.height>0&&t.drawImage(this.Vv.canvasElement,i,s)}bt(){var t;(t=this.zi)===null||t===void 0||t.La()}Iv(t){if(this.zi===null||this.zi.Ei()||!this._n.handleScale.axisPressedMouseMove.price)return;const i=this.Qi.Cv().$t(),s=this.Qi.Zv();this.Mv=!0,i.y_(s,this.zi,t.localY)}zv(t){if(this.zi===null||!this._n.handleScale.axisPressedMouseMove.price)return;const i=this.Qi.Cv().$t(),s=this.Qi.Zv(),e=this.zi;i.C_(s,e,t.localY)}Lv(){if(this.zi===null||!this._n.handleScale.axisPressedMouseMove.price)return;const t=this.Qi.Cv().$t(),i=this.Qi.Zv(),s=this.zi;this.Mv&&(this.Mv=!1,t.T_(i,s))}Ev(t){if(this.zi===null||!this._n.handleScale.axisPressedMouseMove.price)return;const i=this.Qi.Cv().$t(),s=this.Qi.Zv();this.Mv=!1,i.T_(s,this.zi)}Nv(t){this._n.handleScale.axisDoubleClickReset.price&&this.Qe()}Fv(t){this.zi!==null&&(!this.Qi.Cv().$t().W().handleScale.axisPressedMouseMove.price||this.zi.fh()||this.zi.Co()||this.hp(1))}Wv(t){this.hp(0)}Yv(){const t=[],i=this.zi===null?void 0:this.zi;return(s=>{for(let e=0;e{r.fillStyle=s.borderColor;const a=Math.max(1,Math.floor(l)),u=Math.floor(.5*l),c=Math.round(e.T*o);r.beginPath();for(const d of i)r.rect(Math.floor(n*o),Math.round(d.Aa*l)-u,c,a);r.fill()}),t.useMediaCoordinateSpace(({context:r})=>{var o;r.font=this.qv(),r.fillStyle=(o=s.textColor)!==null&&o!==void 0?o:this.mo.textColor,r.textAlign=this.Pv?"right":"left",r.textBaseline="middle";const l=this.Pv?Math.round(n-e.B):Math.round(n+e.T+e.B),a=i.map(u=>this.xv.gi(r,u.Za));for(let u=i.length;u--;){const c=i[u];r.fillText(c.Za,l,c.Aa+a[u])}})}Jv(){if(this.gv===null||this.zi===null)return;let t=this.gv.height/2;const i=[],s=this.zi.No().slice(),e=this.Qi.Zv(),n=this.$v();this.zi===e.cr()&&this.Qi.Zv().No().forEach(l=>{e.ur(l)&&s.push(l)});const r=this.zi.Ta()[0],o=this.zi;s.forEach(l=>{const a=l.Tn(e,o);a.forEach(u=>{u.Oi(null),u.Ai()&&i.push(u)}),r===l&&a.length>0&&(t=a[0].Si())}),i.forEach(l=>l.Oi(l.Si())),this.zi.W().alignLabels&&this.lp(i,n,t)}lp(t,i,s){if(this.gv===null)return;const e=t.filter(r=>r.Si()<=s),n=t.filter(r=>r.Si()>s);e.sort((r,o)=>o.Si()-r.Si()),e.length&&n.length&&n.push(e[0]),n.sort((r,o)=>r.Si()-o.Si());for(const r of t){const o=Math.floor(r.Bt(i)/2),l=r.Si();l>-o&&lthis.gv.height-o&&lc-a&&o.Oi(c-a)}for(let r=1;r{n.Vi()&&n.gt(p(this.zi)).K(t,s,this.xv,e)})}sp(t){if(this.gv===null||this.zi===null)return;const i=this.Qi.Cv().$t(),s=[],e=this.Qi.Zv(),n=i.Wc().Tn(e,this.zi);n.length&&s.push(n);const r=this.$v(),o=this.Pv?"right":"left";s.forEach(l=>{l.forEach(a=>{a.gt(p(this.zi)).K(t,r,this.xv,o)})})}hp(t){this.Av.style.cursor=t===1?"ns-resize":"default"}ao(){const t=this.Uv();this.Sv{this.kv||this.gp===null||this.Hi().Nh()},this.Tv=()=>{this.kv||this.gp===null||this.Hi().Nh()},this.Mp=t,this.gp=i,this.gp.I_().l(this.xp.bind(this),this,!0),this.Sp=document.createElement("td"),this.Sp.style.padding="0",this.Sp.style.position="relative";const s=document.createElement("div");s.style.width="100%",s.style.height="100%",s.style.position="relative",s.style.overflow="hidden",this.kp=document.createElement("td"),this.kp.style.padding="0",this.yp=document.createElement("td"),this.yp.style.padding="0",this.Sp.appendChild(s),this.Vv=U(s,S({width:16,height:16})),this.Vv.subscribeSuggestedBitmapSizeChanged(this.yv);const e=this.Vv.canvasElement;e.style.position="absolute",e.style.zIndex="1",e.style.left="0",e.style.top="0",this.Bv=U(s,S({width:16,height:16})),this.Bv.subscribeSuggestedBitmapSizeChanged(this.Tv);const n=this.Bv.canvasElement;n.style.position="absolute",n.style.zIndex="2",n.style.left="0",n.style.top="0",this.Cp=document.createElement("tr"),this.Cp.appendChild(this.kp),this.Cp.appendChild(this.Sp),this.Cp.appendChild(this.yp),this.Tp(),this.jv=new wi(this.Bv.canvasElement,this,{Ff:()=>this.pp===null&&!this.Mp.W().handleScroll.vertTouchDrag,Wf:()=>this.pp===null&&!this.Mp.W().handleScroll.horzTouchDrag})}S(){this.ap!==null&&this.ap.S(),this.op!==null&&this.op.S(),this.Bv.unsubscribeSuggestedBitmapSizeChanged(this.Tv),Z(this.Bv.canvasElement),this.Bv.dispose(),this.Vv.unsubscribeSuggestedBitmapSizeChanged(this.yv),Z(this.Vv.canvasElement),this.Vv.dispose(),this.gp!==null&&this.gp.I_().p(this),this.jv.S()}Zv(){return p(this.gp)}Pp(t){this.gp!==null&&this.gp.I_().p(this),this.gp=t,this.gp!==null&&this.gp.I_().l(_i.prototype.xp.bind(this),this,!0),this.Tp()}Cv(){return this.Mp}Hv(){return this.Cp}Tp(){if(this.gp!==null&&(this.Rp(),this.Hi().wt().length!==0)){if(this.ap!==null){const t=this.gp.S_();this.ap.Zi(p(t))}if(this.op!==null){const t=this.gp.k_();this.op.Zi(p(t))}}}Dp(){this.ap!==null&&this.ap.bt(),this.op!==null&&this.op.bt()}v_(){return this.gp!==null?this.gp.v_():0}p_(t){this.gp&&this.gp.p_(t)}If(t){if(!this.gp)return;this.Op();const i=t.localX,s=t.localY;this.Ap(i,s,t)}tv(t){this.Op(),this.Vp(),this.Ap(t.localX,t.localY,t)}zf(t){var i;if(!this.gp)return;this.Op();const s=t.localX,e=t.localY;this.Ap(s,e,t);const n=this.pr(s,e);this.Mp.Bp((i=n==null?void 0:n.wv)!==null&&i!==void 0?i:null),this.Hi().Ic(n&&{zc:n.zc,mv:n.mv})}Kf(t){this.gp!==null&&(this.Op(),this.Ip(t))}Pf(t){this.gp!==null&&this.zp(this.dp,t)}kf(t){this.Pf(t)}$f(t){this.Op(),this.Lp(t),this.Ap(t.localX,t.localY,t)}Xf(t){this.gp!==null&&(this.Op(),this.vp=!1,this.Ep(t))}Yf(t){this.gp!==null&&this.Ip(t)}uv(t){if(this.vp=!0,this.pp===null){const i={x:t.localX,y:t.localY};this.Np(i,i,t)}}_v(t){this.gp!==null&&(this.Op(),this.gp.$t().Ic(null),this.Fp())}Wp(){return this.cp}jp(){return this.dp}ev(){this.fp=1,this.Hi().Hn()}rv(t,i){if(!this.Mp.W().handleScale.pinch)return;const s=5*(i-this.fp);this.fp=i,this.Hi().qc(t.nt,s)}Jf(t){this.vp=!1,this.mp=this.pp!==null,this.Vp();const i=this.Hi().Wc();this.pp!==null&&i.yt()&&(this.bp={x:i.Yt(),y:i.Xt()},this.pp={x:t.localX,y:t.localY})}jf(t){if(this.gp===null)return;const i=t.localX,s=t.localY;if(this.pp===null)this.Lp(t);else{this.mp=!1;const e=p(this.bp),n=e.x+(i-this.pp.x),r=e.y+(s-this.pp.y);this.Ap(n,r,t)}}qf(t){this.Cv().W().trackingMode.exitMode===0&&(this.mp=!0),this.Hp(),this.Ep(t)}pr(t,i){const s=this.gp;return s===null?null:function(e,n,r){const o=e.No(),l=function(a,u,c){var d,f;let m,v;for(const w of a){const y=(f=(d=w.oa)===null||d===void 0?void 0:d.call(w,u,c))!==null&&f!==void 0?f:[];for(const _ of y)b=_.zOrder,(!(g=m==null?void 0:m.zOrder)||b==="top"&&g!=="top"||b==="normal"&&g==="bottom")&&(m=_,v=w)}var b,g;return m&&v?{bv:m,zc:v}:null}(o,n,r);if((l==null?void 0:l.bv.zOrder)==="top")return _t(l);for(const a of o){if(l&&l.zc===a&&l.bv.zOrder!=="bottom"&&!l.bv.isBackground)return _t(l);const u=jh(a.Cn(e),n,r);if(u!==null)return{zc:a,vv:u.vv,mv:u.mv};if(l&&l.zc===a&&l.bv.zOrder!=="bottom"&&l.bv.isBackground)return _t(l)}return l!=null&&l.bv?_t(l):null}(s,t,i)}$p(t,i){p(i==="left"?this.ap:this.op).Xv(S({width:t,height:this.gv.height}))}Up(){return this.gv}Xv(t){F(this.gv,t)||(this.gv=t,this.kv=!0,this.Vv.resizeCanvasElement(t),this.Bv.resizeCanvasElement(t),this.kv=!1,this.Sp.style.width=t.width+"px",this.Sp.style.height=t.height+"px")}qp(){const t=p(this.gp);t.x_(t.S_()),t.x_(t.k_());for(const i of t.Ta())if(t.ur(i)){const s=i.Dt();s!==null&&t.x_(s),i.Rn()}}ep(){return this.Vv.bitmapSize}rp(t,i,s){const e=this.ep();e.width>0&&e.height>0&&t.drawImage(this.Vv.canvasElement,i,s)}Gv(t){if(t===0||this.gp===null)return;if(t>1&&this.qp(),this.ap!==null&&this.ap.Gv(t),this.op!==null&&this.op.Gv(t),t!==1){this.Vv.applySuggestedBitmapSize();const s=H(this.Vv);s!==null&&(s.useBitmapCoordinateSpace(e=>{this.Qv(e)}),this.gp&&(this.Yp(s,Uh),this.Xp(s),this.Kp(s),this.Yp(s,St),this.Yp(s,Zh)))}this.Bv.applySuggestedBitmapSize();const i=H(this.Bv);i!==null&&(i.useBitmapCoordinateSpace(({context:s,bitmapSize:e})=>{s.clearRect(0,0,e.width,e.height)}),this.Zp(i),this.Yp(i,Yh))}Gp(){return this.ap}Jp(){return this.op}tp(t,i){this.Yp(t,i)}xp(){this.gp!==null&&this.gp.I_().p(this),this.gp=null}Ip(t){this.zp(this.cp,t)}zp(t,i){const s=i.localX,e=i.localY;t.M()&&t.m(this.Hi().St().Vu(s),{x:s,y:e},i)}Qv({context:t,bitmapSize:i}){const{width:s,height:e}=i,n=this.Hi(),r=n.q(),o=n._d();r===o?Ot(t,0,0,s,e,o):Cs(t,0,0,s,e,r,o)}Xp(t){const i=p(this.gp).z_().Fh().gt();i!==null&&i.K(t,!1)}Kp(t){const i=this.Hi().Fc();this.Qp(t,St,li,i),this.Qp(t,St,Mt,i)}Zp(t){this.Qp(t,St,Mt,this.Hi().Wc())}Yp(t,i){const s=p(this.gp).No();for(const e of s)this.Qp(t,i,li,e);for(const e of s)this.Qp(t,i,Mt,e)}Qp(t,i,s,e){const n=p(this.gp),r=n.$t().Bc(),o=r!==null&&r.zc===e,l=r!==null&&o&&r.mv!==void 0?r.mv.br:void 0;ai(i,a=>s(a,t,o,l),e,n)}Rp(){if(this.gp===null)return;const t=this.Mp,i=this.gp.S_().W().visible,s=this.gp.k_().W().visible;i||this.ap===null||(this.kp.removeChild(this.ap.Hv()),this.ap.S(),this.ap=null),s||this.op===null||(this.yp.removeChild(this.op.Hv()),this.op.S(),this.op=null);const e=t.$t().ed();i&&this.ap===null&&(this.ap=new us(this,t.W(),e,"left"),this.kp.appendChild(this.ap.Hv())),s&&this.op===null&&(this.op=new us(this,t.W(),e,"right"),this.yp.appendChild(this.op.Hv()))}tm(t){return t.cv&&this.vp||this.pp!==null}im(t){return Math.max(0,Math.min(t,this.gv.width-1))}nm(t){return Math.max(0,Math.min(t,this.gv.height-1))}Ap(t,i,s){this.Hi().Qc(this.im(t),this.nm(i),s,p(this.gp))}Fp(){this.Hi().nd()}Hp(){this.mp&&(this.pp=null,this.Fp())}Np(t,i,s){this.pp=t,this.mp=!1,this.Ap(i.x,i.y,s);const e=this.Hi().Wc();this.bp={x:e.Yt(),y:e.Xt()}}Hi(){return this.Mp.$t()}Ep(t){if(!this.up)return;const i=this.Hi(),s=this.Zv();if(i.D_(s,s.dn()),this._p=null,this.up=!1,i.Zc(),this.wp!==null){const e=performance.now(),n=i.St();this.wp.Pr(n.Lu(),e),this.wp.Yu(e)||i.qn(this.wp)}}Op(){this.pp=null}Vp(){if(this.gp){if(this.Hi().Hn(),document.activeElement!==document.body&&document.activeElement!==document.documentElement)p(document.activeElement).blur();else{const t=document.getSelection();t!==null&&t.removeAllRanges()}!this.gp.dn().Ei()&&this.Hi().St().Ei()}}Lp(t){if(this.gp===null)return;const i=this.Hi(),s=i.St();if(s.Ei())return;const e=this.Mp.W(),n=e.handleScroll,r=e.kineticScroll;if((!n.pressedMouseMove||t.cv)&&(!n.horzTouchDrag&&!n.vertTouchDrag||!t.cv))return;const o=this.gp.dn(),l=performance.now();if(this._p!==null||this.tm(t)||(this._p={x:t.clientX,y:t.clientY,yd:l,sm:t.localX,rm:t.localY}),this._p!==null&&!this.up&&(this._p.x!==t.clientX||this._p.y!==t.clientY)){if(t.cv&&r.touch||!t.cv&&r.mouse){const a=s.ee();this.wp=new Fh(.2/a,7/a,.997,15/a),this.wp.Fd(s.Lu(),this._p.yd)}else this.wp=null;o.Ei()||i.P_(this.gp,o,t.localY),i.Xc(t.localX),this.up=!0}this.up&&(o.Ei()||i.R_(this.gp,o,t.localY),i.Kc(t.localX),this.wp!==null&&this.wp.Fd(s.Lu(),l))}}class cs{constructor(t,i,s,e,n){this.ft=!0,this.gv=S({width:0,height:0}),this.yv=()=>this.Gv(3),this.Pv=t==="left",this.yc=s.ed,this._n=i,this.hm=e,this.lm=n,this.Av=document.createElement("div"),this.Av.style.width="25px",this.Av.style.height="100%",this.Av.style.overflow="hidden",this.Vv=U(this.Av,S({width:16,height:16})),this.Vv.subscribeSuggestedBitmapSizeChanged(this.yv)}S(){this.Vv.unsubscribeSuggestedBitmapSizeChanged(this.yv),Z(this.Vv.canvasElement),this.Vv.dispose()}Hv(){return this.Av}Up(){return this.gv}Xv(t){F(this.gv,t)||(this.gv=t,this.Vv.resizeCanvasElement(t),this.Av.style.width=`${t.width}px`,this.Av.style.height=`${t.height}px`,this.ft=!0)}Gv(t){if(t<3&&!this.ft||this.gv.width===0||this.gv.height===0)return;this.ft=!1,this.Vv.applySuggestedBitmapSize();const i=H(this.Vv);i!==null&&i.useBitmapCoordinateSpace(s=>{this.Qv(s),this.Ae(s)})}ep(){return this.Vv.bitmapSize}rp(t,i,s){const e=this.ep();e.width>0&&e.height>0&&t.drawImage(this.Vv.canvasElement,i,s)}Ae({context:t,bitmapSize:i,horizontalPixelRatio:s,verticalPixelRatio:e}){if(!this.hm())return;t.fillStyle=this._n.timeScale.borderColor;const n=Math.floor(this.yc.W().C*s),r=Math.floor(this.yc.W().C*e),o=this.Pv?i.width-n:0;t.fillRect(o,0,n,r)}Qv({context:t,bitmapSize:i}){Ot(t,0,0,i.width,i.height,this.lm())}}function Si(h){return t=>{var i,s;return(s=(i=t.aa)===null||i===void 0?void 0:i.call(t,h))!==null&&s!==void 0?s:[]}}const Qh=Si("normal"),Xh=Si("top"),qh=Si("bottom");class Jh{constructor(t,i){this.am=null,this.om=null,this.k=null,this._m=!1,this.gv=S({width:0,height:0}),this.um=new M,this.xv=new lt(5),this.kv=!1,this.yv=()=>{this.kv||this.Mp.$t().Nh()},this.Tv=()=>{this.kv||this.Mp.$t().Nh()},this.Mp=t,this.N_=i,this._n=t.W().layout,this.dm=document.createElement("tr"),this.fm=document.createElement("td"),this.fm.style.padding="0",this.vm=document.createElement("td"),this.vm.style.padding="0",this.Av=document.createElement("td"),this.Av.style.height="25px",this.Av.style.padding="0",this.pm=document.createElement("div"),this.pm.style.width="100%",this.pm.style.height="100%",this.pm.style.position="relative",this.pm.style.overflow="hidden",this.Av.appendChild(this.pm),this.Vv=U(this.pm,S({width:16,height:16})),this.Vv.subscribeSuggestedBitmapSizeChanged(this.yv);const s=this.Vv.canvasElement;s.style.position="absolute",s.style.zIndex="1",s.style.left="0",s.style.top="0",this.Bv=U(this.pm,S({width:16,height:16})),this.Bv.subscribeSuggestedBitmapSizeChanged(this.Tv);const e=this.Bv.canvasElement;e.style.position="absolute",e.style.zIndex="2",e.style.left="0",e.style.top="0",this.dm.appendChild(this.fm),this.dm.appendChild(this.Av),this.dm.appendChild(this.vm),this.bm(),this.Mp.$t().f_().l(this.bm.bind(this),this),this.jv=new wi(this.Bv.canvasElement,this,{Ff:()=>!0,Wf:()=>!this.Mp.W().handleScroll.horzTouchDrag})}S(){this.jv.S(),this.am!==null&&this.am.S(),this.om!==null&&this.om.S(),this.Bv.unsubscribeSuggestedBitmapSizeChanged(this.Tv),Z(this.Bv.canvasElement),this.Bv.dispose(),this.Vv.unsubscribeSuggestedBitmapSizeChanged(this.yv),Z(this.Vv.canvasElement),this.Vv.dispose()}Hv(){return this.dm}wm(){return this.am}gm(){return this.om}tv(t){if(this._m)return;this._m=!0;const i=this.Mp.$t();!i.St().Ei()&&this.Mp.W().handleScale.axisPressedMouseMove.time&&i.Uc(t.localX)}Jf(t){this.tv(t)}iv(){const t=this.Mp.$t();!t.St().Ei()&&this._m&&(this._m=!1,this.Mp.W().handleScale.axisPressedMouseMove.time&&t.Jc())}$f(t){const i=this.Mp.$t();!i.St().Ei()&&this.Mp.W().handleScale.axisPressedMouseMove.time&&i.Gc(t.localX)}jf(t){this.$f(t)}Xf(){this._m=!1;const t=this.Mp.$t();t.St().Ei()&&!this.Mp.W().handleScale.axisPressedMouseMove.time||t.Jc()}qf(){this.Xf()}Pf(){this.Mp.W().handleScale.axisDoubleClickReset.time&&this.Mp.$t().Xn()}kf(){this.Pf()}If(){this.Mp.$t().W().handleScale.axisPressedMouseMove.time&&this.hp(1)}_v(){this.hp(0)}Up(){return this.gv}Mm(){return this.um}xm(t,i,s){F(this.gv,t)||(this.gv=t,this.kv=!0,this.Vv.resizeCanvasElement(t),this.Bv.resizeCanvasElement(t),this.kv=!1,this.Av.style.width=`${t.width}px`,this.Av.style.height=`${t.height}px`,this.um.m(t)),this.am!==null&&this.am.Xv(S({width:i,height:t.height})),this.om!==null&&this.om.Xv(S({width:s,height:t.height}))}Sm(){const t=this.km();return Math.ceil(t.C+t.T+t.P+t.L+t.V+t.ym)}bt(){this.Mp.$t().St().La()}ep(){return this.Vv.bitmapSize}rp(t,i,s){const e=this.ep();e.width>0&&e.height>0&&t.drawImage(this.Vv.canvasElement,i,s)}Gv(t){if(t===0)return;if(t!==1){this.Vv.applySuggestedBitmapSize();const s=H(this.Vv);s!==null&&(s.useBitmapCoordinateSpace(e=>{this.Qv(e),this.Ae(e),this.Cm(s,qh)}),this.ip(s),this.Cm(s,Qh)),this.am!==null&&this.am.Gv(t),this.om!==null&&this.om.Gv(t)}this.Bv.applySuggestedBitmapSize();const i=H(this.Bv);i!==null&&(i.useBitmapCoordinateSpace(({context:s,bitmapSize:e})=>{s.clearRect(0,0,e.width,e.height)}),this.Tm([...this.Mp.$t().wt(),this.Mp.$t().Wc()],i),this.Cm(i,Xh))}Cm(t,i){const s=this.Mp.$t().wt();for(const e of s)ai(i,n=>li(n,t,!1,void 0),e,void 0);for(const e of s)ai(i,n=>Mt(n,t,!1,void 0),e,void 0)}Qv({context:t,bitmapSize:i}){Ot(t,0,0,i.width,i.height,this.Mp.$t()._d())}Ae({context:t,bitmapSize:i,verticalPixelRatio:s}){if(this.Mp.W().timeScale.borderVisible){t.fillStyle=this.Pm();const e=Math.max(1,Math.floor(this.km().C*s));t.fillRect(0,0,i.width,e)}}ip(t){const i=this.Mp.$t().St(),s=i.La();if(!s||s.length===0)return;const e=this.N_.maxTickMarkWeight(s),n=this.km(),r=i.W();r.borderVisible&&r.ticksVisible&&t.useBitmapCoordinateSpace(({context:o,horizontalPixelRatio:l,verticalPixelRatio:a})=>{o.strokeStyle=this.Pm(),o.fillStyle=this.Pm();const u=Math.max(1,Math.floor(l)),c=Math.floor(.5*l);o.beginPath();const d=Math.round(n.T*a);for(let f=s.length;f--;){const m=Math.round(s[f].coord*l);o.rect(m-c,0,u,d)}o.fill()}),t.useMediaCoordinateSpace(({context:o})=>{const l=n.C+n.T+n.L+n.P/2;o.textAlign="center",o.textBaseline="middle",o.fillStyle=this.$(),o.font=this.qv();for(const a of s)if(a.weight=e){const u=a.needAlignCoordinate?this.Rm(o,a.coord,a.label):a.coord;o.fillText(a.label,u,l)}})}Rm(t,i,s){const e=this.xv.Mi(t,s),n=e/2,r=Math.floor(i-n)+.5;return r<0?i+=Math.abs(0-r):r+e>this.gv.width&&(i-=Math.abs(this.gv.width-(r+e))),i}Tm(t,i){const s=this.km();for(const e of t)for(const n of e.Ji())n.gt().K(i,s)}Pm(){return this.Mp.W().timeScale.borderColor}$(){return this._n.textColor}j(){return this._n.fontSize}qv(){return K(this.j(),this._n.fontFamily)}Dm(){return K(this.j(),this._n.fontFamily,"bold")}km(){this.k===null&&(this.k={C:1,N:NaN,L:NaN,V:NaN,Wi:NaN,T:5,P:NaN,R:"",Fi:new lt,ym:0});const t=this.k,i=this.qv();if(t.R!==i){const s=this.j();t.P=s,t.R=i,t.L=3*s/12,t.V=3*s/12,t.Wi=9*s/12,t.N=0,t.ym=4*s/12,t.Fi.Qe()}return this.k}hp(t){this.Av.style.cursor=t===1?"ew-resize":"default"}bm(){const t=this.Mp.$t(),i=t.W();i.leftPriceScale.visible||this.am===null||(this.fm.removeChild(this.am.Hv()),this.am.S(),this.am=null),i.rightPriceScale.visible||this.om===null||(this.vm.removeChild(this.om.Hv()),this.om.S(),this.om=null);const s={ed:this.Mp.$t().ed()},e=()=>i.leftPriceScale.borderVisible&&t.St().W().borderVisible,n=()=>t._d();i.leftPriceScale.visible&&this.am===null&&(this.am=new cs("left",i,s,e,n),this.fm.appendChild(this.am.Hv())),i.rightPriceScale.visible&&this.om===null&&(this.om=new cs("right",i,s,e,n),this.vm.appendChild(this.om.Hv()))}}const Kh=!!G&&!!navigator.userAgentData&&navigator.userAgentData.brands.some(h=>h.brand.includes("Chromium"))&&!!G&&(!((ii=navigator==null?void 0:navigator.userAgentData)===null||ii===void 0)&&ii.platform?navigator.userAgentData.platform==="Windows":navigator.userAgent.toLowerCase().indexOf("win")>=0);var ii;class Gh{constructor(t,i,s){var e;this.Om=[],this.Am=0,this.Qa=0,this.e_=0,this.Vm=0,this.Bm=0,this.Im=null,this.zm=!1,this.cp=new M,this.dp=new M,this.xc=new M,this.Lm=null,this.Em=null,this.Nm=t,this._n=i,this.N_=s,this.dm=document.createElement("div"),this.dm.classList.add("tv-lightweight-charts"),this.dm.style.overflow="hidden",this.dm.style.direction="ltr",this.dm.style.width="100%",this.dm.style.height="100%",(e=this.dm).style.userSelect="none",e.style.webkitUserSelect="none",e.style.msUserSelect="none",e.style.MozUserSelect="none",e.style.webkitTapHighlightColor="transparent",this.Fm=document.createElement("table"),this.Fm.setAttribute("cellspacing","0"),this.dm.appendChild(this.Fm),this.Wm=this.jm.bind(this),si(this._n)&&this.Hm(!0),this.Hi=new Ih(this.kc.bind(this),this._n,s),this.$t().jc().l(this.$m.bind(this),this),this.Um=new Jh(this,this.N_),this.Fm.appendChild(this.Um.Hv());const n=i.autoSize&&this.qm();let r=this._n.width,o=this._n.height;if(n||r===0||o===0){const l=t.getBoundingClientRect();r=r||l.width,o=o||l.height}this.Ym(r,o),this.Xm(),t.appendChild(this.dm),this.Km(),this.Hi.St().Gu().l(this.Hi.$l.bind(this.Hi),this),this.Hi.f_().l(this.Hi.$l.bind(this.Hi),this)}$t(){return this.Hi}W(){return this._n}Zm(){return this.Om}Gm(){return this.Um}S(){this.Hm(!1),this.Am!==0&&window.cancelAnimationFrame(this.Am),this.Hi.jc().p(this),this.Hi.St().Gu().p(this),this.Hi.f_().p(this),this.Hi.S();for(const t of this.Om)this.Fm.removeChild(t.Hv()),t.Wp().p(this),t.jp().p(this),t.S();this.Om=[],p(this.Um).S(),this.dm.parentElement!==null&&this.dm.parentElement.removeChild(this.dm),this.xc.S(),this.cp.S(),this.dp.S(),this.Jm()}Ym(t,i,s=!1){if(this.Qa===i&&this.e_===t)return;const e=function(o){const l=Math.floor(o.width),a=Math.floor(o.height);return S({width:l-l%2,height:a-a%2})}(S({width:t,height:i}));this.Qa=e.height,this.e_=e.width;const n=this.Qa+"px",r=this.e_+"px";p(this.dm).style.height=n,p(this.dm).style.width=r,this.Fm.style.height=n,this.Fm.style.width=r,s?this.Qm(x.ns(),performance.now()):this.Hi.$l()}Gv(t){t===void 0&&(t=x.ns());for(let i=0;i{let a=0;for(let u=0;u{p(o==="left"?this.Um.wm():this.Um.gm()).rp(p(t),l,a)};if(this._n.timeScale.visible){const o=this.Um.ep();if(t!==null){let l=0;this.eb()&&(r("left",l,s),l=p(e.Gp()).ep().width),this.Um.rp(t,l,s),l+=o.width,this.rb()&&r("right",l,s)}s+=o.height}return S({width:i,height:s})}_b(){let t=0,i=0,s=0;for(const m of this.Om)this.eb()&&(i=Math.max(i,p(m.Gp()).Uv(),this._n.leftPriceScale.minimumWidth)),this.rb()&&(s=Math.max(s,p(m.Jp()).Uv(),this._n.rightPriceScale.minimumWidth)),t+=m.v_();i=oi(i),s=oi(s);const e=this.e_,n=this.Qa,r=Math.max(e-i-s,0),o=this._n.timeScale.visible;let l=o?Math.max(this.Um.Sm(),this._n.timeScale.minimumHeight):0;var a;l=(a=l)+a%2;const u=0+l,c=n{n.Dp()}),((s=this.Im)===null||s===void 0?void 0:s.Fn())===3&&(this.Im.Jn(t),this.cb(),this.fb(this.Im),this.vb(this.Im,i),t=this.Im,this.Im=null)),this.Gv(t)}vb(t,i){for(const s of t.Gn())this.Qn(s,i)}fb(t){const i=this.Hi.Nc();for(let s=0;s{if(this.zm=!1,this.Am=0,this.Im!==null){const s=this.Im;this.Im=null,this.Qm(s,i);for(const e of s.Gn())if(e.$n===5&&!e.Ot.Yu(i)){this.$t().qn(e.Ot);break}}}))}cb(){this.Xm()}Xm(){const t=this.Hi.Nc(),i=t.length,s=this.Om.length;for(let e=i;e{const c=u.Vn().il(t);c!==null&&n.set(u,c)});let r;if(t!==null){const u=(e=this.Hi.St().$i(t))===null||e===void 0?void 0:e.originalTime;u!==void 0&&(r=u)}const o=this.$t().Bc(),l=o!==null&&o.zc instanceof bi?o.zc:void 0,a=o!==null&&o.mv!==void 0?o.mv.mr:void 0;return{wb:r,ie:t??void 0,gb:i??void 0,Mb:l,xb:n,Sb:a,kb:s??void 0}}pb(t,i,s){this.cp.m(()=>this.bb(t,i,s))}mb(t,i,s){this.dp.m(()=>this.bb(t,i,s))}$m(t,i,s){this.xc.m(()=>this.bb(t,i,s))}Km(){const t=this._n.timeScale.visible?"":"none";this.Um.Hv().style.display=t}eb(){return this.Om[0].Zv().S_().W().visible}rb(){return this.Om[0].Zv().k_().W().visible}qm(){return"ResizeObserver"in window&&(this.Lm=new ResizeObserver(t=>{const i=t.find(s=>s.target===this.Nm);i&&this.Ym(i.contentRect.width,i.contentRect.height)}),this.Lm.observe(this.Nm,{box:"border-box"}),!0)}Jm(){this.Lm!==null&&this.Lm.disconnect(),this.Lm=null}}function si(h){return!!(h.handleScroll.mouseWheel||h.handleScale.mouseWheel)}function Us(h,t){var i={};for(var s in h)Object.prototype.hasOwnProperty.call(h,s)&&t.indexOf(s)<0&&(i[s]=h[s]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function"){var e=0;for(s=Object.getOwnPropertySymbols(h);efunction(o,l){return l?l(o):(a=o).open===void 0&&a.value===void 0;var a}(s,r)?fs({ot:t,ie:i,wb:e},s):fs(h(t,i,s,e,n),s)}function ms(h){return{Candlestick:$(hn),Bar:$(en),Area:$(tn),Baseline:$(sn),Histogram:$(ds),Line:$(ds),Custom:$(nn)}[h]}function vs(h){return{ie:0,Cb:new Map,ia:h}}function ps(h,t){if(h!==void 0&&h.length!==0)return{Tb:t.key(h[0].ot),Pb:t.key(h[h.length-1].ot)}}function bs(h){let t;return h.forEach(i=>{t===void 0&&(t=i.wb)}),O(t)}class rn{constructor(t){this.Rb=new Map,this.Db=new Map,this.Ob=new Map,this.Ab=[],this.N_=t}S(){this.Rb.clear(),this.Db.clear(),this.Ob.clear(),this.Ab=[]}Vb(t,i){let s=this.Rb.size!==0,e=!1;const n=this.Db.get(t);if(n!==void 0)if(this.Db.size===1)s=!1,e=!0,this.Rb.clear();else for(const l of this.Ab)l.pointData.Cb.delete(t)&&(e=!0);let r=[];if(i.length!==0){const l=i.map(f=>f.time),a=this.N_.createConverterToInternalObj(i),u=ms(t.Yh()),c=t.ga(),d=t.Ma();r=i.map((f,m)=>{const v=a(f.time),b=this.N_.key(v);let g=this.Rb.get(b);g===void 0&&(g=vs(v),this.Rb.set(b,g),e=!0);const w=u(v,g.ie,f,l[m],c,d);return g.Cb.set(t,w),w})}s&&this.Bb(),this.Ib(t,r);let o=-1;if(e){const l=[];this.Rb.forEach(a=>{l.push({timeWeight:0,time:a.ia,pointData:a,originalTime:bs(a.Cb)})}),l.sort((a,u)=>this.N_.key(a.time)-this.N_.key(u.time)),o=this.zb(l)}return this.Lb(t,o,function(l,a,u){const c=ps(l,u),d=ps(a,u);if(c!==void 0&&d!==void 0)return{Xl:c.Pb>=d.Pb&&c.Tb>=d.Tb}}(this.Db.get(t),n,this.N_))}ld(t){return this.Vb(t,[])}Eb(t,i){const s=i;(function(v){v.wb===void 0&&(v.wb=v.time)})(s),this.N_.preprocessData(i);const e=this.N_.createConverterToInternalObj([i])(i.time),n=this.Ob.get(t);if(n!==void 0&&this.N_.key(e)this.N_.key(v.time)this.N_.key(e.ot)?yt(i)&&s.push(i):yt(i)?s[s.length-1]=i:s.splice(-1,1),this.Ob.set(t,i.ot)}Ib(t,i){i.length!==0?(this.Db.set(t,i.filter(yt)),this.Ob.set(t,i[i.length-1].ot)):(this.Db.delete(t),this.Ob.delete(t))}Bb(){for(const t of this.Ab)t.pointData.Cb.size===0&&this.Rb.delete(this.N_.key(t.time))}zb(t){let i=-1;for(let s=0;s{i.length!==0&&(t=Math.max(t,i[i.length-1].ie))}),t}Lb(t,i,s){const e={Wb:new Map,St:{Au:this.Fb()}};if(i!==-1)this.Db.forEach((n,r)=>{e.Wb.set(r,{We:n,jb:r===t?s:void 0})}),this.Db.has(t)||e.Wb.set(t,{We:[],jb:s}),e.St.Hb=this.Ab,e.St.$b=i;else{const n=this.Db.get(t);e.Wb.set(t,{We:n||[],jb:s})}return e}}function ei(h,t){h.ie=t,h.Cb.forEach(i=>{i.ie=t})}function yi(h){const t={value:h.Ot[3],time:h.wb};return h.yb!==void 0&&(t.customValues=h.yb),t}function gs(h){const t=yi(h);return h.O!==void 0&&(t.color=h.O),t}function on(h){const t=yi(h);return h.lt!==void 0&&(t.lineColor=h.lt),h.ys!==void 0&&(t.topColor=h.ys),h.Cs!==void 0&&(t.bottomColor=h.Cs),t}function ln(h){const t=yi(h);return h.Ce!==void 0&&(t.topLineColor=h.Ce),h.Te!==void 0&&(t.bottomLineColor=h.Te),h.Me!==void 0&&(t.topFillColor1=h.Me),h.xe!==void 0&&(t.topFillColor2=h.xe),h.Se!==void 0&&(t.bottomFillColor1=h.Se),h.ke!==void 0&&(t.bottomFillColor2=h.ke),t}function Zs(h){const t={open:h.Ot[0],high:h.Ot[1],low:h.Ot[2],close:h.Ot[3],time:h.wb};return h.yb!==void 0&&(t.customValues=h.yb),t}function an(h){const t=Zs(h);return h.O!==void 0&&(t.color=h.O),t}function un(h){const t=Zs(h),{O:i,At:s,Hh:e}=h;return i!==void 0&&(t.color=i),s!==void 0&&(t.borderColor=s),e!==void 0&&(t.wickColor=e),t}function ui(h){return{Area:on,Line:gs,Baseline:ln,Histogram:gs,Bar:an,Candlestick:un,Custom:cn}[h]}function cn(h){const t=h.wb;return Object.assign(Object.assign({},h.We),{time:t})}const dn={vertLine:{color:"#9598A1",width:1,style:3,visible:!0,labelVisible:!0,labelBackgroundColor:"#131722"},horzLine:{color:"#9598A1",width:1,style:3,visible:!0,labelVisible:!0,labelBackgroundColor:"#131722"},mode:1},fn={vertLines:{color:"#D6DCDE",style:0,visible:!0},horzLines:{color:"#D6DCDE",style:0,visible:!0}},mn={background:{type:"solid",color:"#FFFFFF"},textColor:"#191919",fontSize:12,fontFamily:ci},hi={autoScale:!0,mode:0,invertScale:!1,alignLabels:!0,borderVisible:!0,borderColor:"#2B2B43",entireTextOnly:!1,visible:!1,ticksVisible:!1,scaleMargins:{bottom:.1,top:.2},minimumWidth:0},vn={rightOffset:0,barSpacing:6,minBarSpacing:.5,fixLeftEdge:!1,fixRightEdge:!1,lockVisibleTimeRangeOnResize:!1,rightBarStaysOnScroll:!1,borderVisible:!0,borderColor:"#2B2B43",visible:!0,timeVisible:!1,secondsVisible:!0,shiftVisibleRangeOnNewBar:!0,allowShiftVisibleRangeOnWhitespaceReplacement:!1,ticksVisible:!1,uniformDistribution:!1,minimumHeight:0,allowBoldLabels:!0},pn={color:"rgba(0, 0, 0, 0)",visible:!1,fontSize:48,fontFamily:ci,fontStyle:"",text:"",horzAlign:"center",vertAlign:"center"};function ws(){return{width:0,height:0,autoSize:!1,layout:mn,crosshair:dn,grid:fn,overlayPriceScales:Object.assign({},hi),leftPriceScale:Object.assign(Object.assign({},hi),{visible:!1}),rightPriceScale:Object.assign(Object.assign({},hi),{visible:!0}),timeScale:vn,watermark:pn,localization:{locale:G?navigator.language:"",dateFormat:"dd MMM 'yy"},handleScroll:{mouseWheel:!0,pressedMouseMove:!0,horzTouchDrag:!0,vertTouchDrag:!0},handleScale:{axisPressedMouseMove:{time:!0,price:!0},axisDoubleClickReset:{time:!0,price:!0},mouseWheel:!0,pinch:!0},kineticScroll:{mouse:!1,touch:!0},trackingMode:{exitMode:1}}}class bn{constructor(t,i){this.Ub=t,this.qb=i}applyOptions(t){this.Ub.$t().Lc(this.qb,t)}options(){return this.zi().W()}width(){return Tt(this.qb)?this.Ub.sb(this.qb):0}zi(){return p(this.Ub.$t().Ec(this.qb)).Dt}}function _s(h,t,i){const s=Us(h,["time","originalTime"]),e=Object.assign({time:t},s);return i!==void 0&&(e.originalTime=i),e}const gn={color:"#FF0000",price:0,lineStyle:2,lineWidth:1,lineVisible:!0,axisLabelVisible:!0,title:"",axisLabelColor:"",axisLabelTextColor:""};class wn{constructor(t){this.Vh=t}applyOptions(t){this.Vh.Eh(t)}options(){return this.Vh.W()}Yb(){return this.Vh}}class _n{constructor(t,i,s,e,n){this.Xb=new M,this.Is=t,this.Kb=i,this.Zb=s,this.N_=n,this.Gb=e}S(){this.Xb.S()}priceFormatter(){return this.Is.ca()}priceToCoordinate(t){const i=this.Is.Ct();return i===null?null:this.Is.Dt().Rt(t,i.Ot)}coordinateToPrice(t){const i=this.Is.Ct();return i===null?null:this.Is.Dt().fn(t,i.Ot)}barsInLogicalRange(t){if(t===null)return null;const i=new J(new nt(t.from,t.to)).iu(),s=this.Is.Vn();if(s.Ei())return null;const e=s.il(i.Rs(),1),n=s.il(i.ui(),-1),r=p(s.Jh()),o=p(s.An());if(e!==null&&n!==null&&e.ie>n.ie)return{barsBefore:t.from-r,barsAfter:o-t.to};const l={barsBefore:e===null||e.ie===r?t.from-r:e.ie-r,barsAfter:n===null||n.ie===o?o-t.to:o-n.ie};return e!==null&&n!==null&&(l.from=e.wb,l.to=n.wb),l}setData(t){this.N_,this.Is.Yh(),this.Kb.Jb(this.Is,t),this.Qb("full")}update(t){this.Is.Yh(),this.Kb.tw(this.Is,t),this.Qb("update")}dataByIndex(t,i){const s=this.Is.Vn().il(t,i);return s===null?null:ui(this.seriesType())(s)}data(){const t=ui(this.seriesType());return this.Is.Vn().Qs().map(i=>t(i))}subscribeDataChanged(t){this.Xb.l(t)}unsubscribeDataChanged(t){this.Xb.v(t)}setMarkers(t){this.N_;const i=t.map(s=>_s(s,this.N_.convertHorzItemToInternal(s.time),s.time));this.Is.Zl(i)}markers(){return this.Is.Gl().map(t=>_s(t,t.originalTime,void 0))}applyOptions(t){this.Is.Eh(t)}options(){return W(this.Is.W())}priceScale(){return this.Zb.priceScale(this.Is.Dt().xa())}createPriceLine(t){const i=R(W(gn),t),s=this.Is.Jl(i);return new wn(s)}removePriceLine(t){this.Is.Ql(t.Yb())}seriesType(){return this.Is.Yh()}attachPrimitive(t){this.Is.ba(t),t.attached&&t.attached({chart:this.Gb,series:this,requestUpdate:()=>this.Is.$t().$l()})}detachPrimitive(t){this.Is.wa(t),t.detached&&t.detached()}Qb(t){this.Xb.M()&&this.Xb.m(t)}}class Sn{constructor(t,i,s){this.iw=new M,this.uu=new M,this.um=new M,this.Hi=t,this.wl=t.St(),this.Um=i,this.wl.Ku().l(this.nw.bind(this)),this.wl.Zu().l(this.sw.bind(this)),this.Um.Mm().l(this.ew.bind(this)),this.N_=s}S(){this.wl.Ku().p(this),this.wl.Zu().p(this),this.Um.Mm().p(this),this.iw.S(),this.uu.S(),this.um.S()}scrollPosition(){return this.wl.Lu()}scrollToPosition(t,i){i?this.wl.qu(t,1e3):this.Hi.Zn(t)}scrollToRealTime(){this.wl.Uu()}getVisibleRange(){const t=this.wl.yu();return t===null?null:{from:t.from.originalTime,to:t.to.originalTime}}setVisibleRange(t){const i={from:this.N_.convertHorzItemToInternal(t.from),to:this.N_.convertHorzItemToInternal(t.to)},s=this.wl.Ru(i);this.Hi.ad(s)}getVisibleLogicalRange(){const t=this.wl.ku();return t===null?null:{from:t.Rs(),to:t.ui()}}setVisibleLogicalRange(t){A(t.from<=t.to,"The from index cannot be after the to index."),this.Hi.ad(t)}resetTimeScale(){this.Hi.Xn()}fitContent(){this.Hi.Qu()}logicalToCoordinate(t){const i=this.Hi.St();return i.Ei()?null:i.It(t)}coordinateToLogical(t){return this.wl.Ei()?null:this.wl.Vu(t)}timeToCoordinate(t){const i=this.N_.convertHorzItemToInternal(t),s=this.wl.ya(i,!1);return s===null?null:this.wl.It(s)}coordinateToTime(t){const i=this.Hi.St(),s=i.Vu(t),e=i.$i(s);return e===null?null:e.originalTime}width(){return this.Um.Up().width}height(){return this.Um.Up().height}subscribeVisibleTimeRangeChange(t){this.iw.l(t)}unsubscribeVisibleTimeRangeChange(t){this.iw.v(t)}subscribeVisibleLogicalRangeChange(t){this.uu.l(t)}unsubscribeVisibleLogicalRangeChange(t){this.uu.v(t)}subscribeSizeChange(t){this.um.l(t)}unsubscribeSizeChange(t){this.um.v(t)}applyOptions(t){this.wl.Eh(t)}options(){return Object.assign(Object.assign({},W(this.wl.W())),{barSpacing:this.wl.ee()})}nw(){this.iw.M()&&this.iw.m(this.getVisibleRange())}sw(){this.uu.M()&&this.uu.m(this.getVisibleLogicalRange())}ew(t){this.um.m(t.width,t.height)}}function yn(h){if(h===void 0||h.type==="custom")return;const t=h;t.minMove!==void 0&&t.precision===void 0&&(t.precision=function(i){if(i>=1)return 0;let s=0;for(;s<8;s++){const e=Math.round(i);if(Math.abs(e-i)<1e-8)return s;i*=10}return s}(t.minMove))}function Ss(h){return function(t){if(ft(t.handleScale)){const s=t.handleScale;t.handleScale={axisDoubleClickReset:{time:s,price:s},axisPressedMouseMove:{time:s,price:s},mouseWheel:s,pinch:s}}else if(t.handleScale!==void 0){const{axisPressedMouseMove:s,axisDoubleClickReset:e}=t.handleScale;ft(s)&&(t.handleScale.axisPressedMouseMove={time:s,price:s}),ft(e)&&(t.handleScale.axisDoubleClickReset={time:e,price:e})}const i=t.handleScroll;ft(i)&&(t.handleScroll={horzTouchDrag:i,vertTouchDrag:i,mouseWheel:i,pressedMouseMove:i})}(h),h}class Mn{constructor(t,i,s){this.rw=new Map,this.hw=new Map,this.lw=new M,this.aw=new M,this.ow=new M,this._w=new rn(i);const e=s===void 0?W(ws()):R(W(ws()),Ss(s));this.N_=i,this.Ub=new Gh(t,e,i),this.Ub.Wp().l(r=>{this.lw.M()&&this.lw.m(this.uw(r()))},this),this.Ub.jp().l(r=>{this.aw.M()&&this.aw.m(this.uw(r()))},this),this.Ub.jc().l(r=>{this.ow.M()&&this.ow.m(this.uw(r()))},this);const n=this.Ub.$t();this.cw=new Sn(n,this.Ub.Gm(),this.N_)}remove(){this.Ub.Wp().p(this),this.Ub.jp().p(this),this.Ub.jc().p(this),this.cw.S(),this.Ub.S(),this.rw.clear(),this.hw.clear(),this.lw.S(),this.aw.S(),this.ow.S(),this._w.S()}resize(t,i,s){this.autoSizeActive()||this.Ub.Ym(t,i,s)}addCustomSeries(t,i){const s=X(t),e=Object.assign(Object.assign({},ys),s.defaultOptions());return this.dw("Custom",e,i,s)}addAreaSeries(t){return this.dw("Area",oe,t)}addBaselineSeries(t){return this.dw("Baseline",le,t)}addBarSeries(t){return this.dw("Bar",ne,t)}addCandlestickSeries(t={}){return function(i){i.borderColor!==void 0&&(i.borderUpColor=i.borderColor,i.borderDownColor=i.borderColor),i.wickColor!==void 0&&(i.wickUpColor=i.wickColor,i.wickDownColor=i.wickColor)}(t),this.dw("Candlestick",he,t)}addHistogramSeries(t){return this.dw("Histogram",ae,t)}addLineSeries(t){return this.dw("Line",re,t)}removeSeries(t){const i=O(this.rw.get(t)),s=this._w.ld(i);this.Ub.$t().ld(i),this.fw(s),this.rw.delete(t),this.hw.delete(i)}Jb(t,i){this.fw(this._w.Vb(t,i))}tw(t,i){this.fw(this._w.Eb(t,i))}subscribeClick(t){this.lw.l(t)}unsubscribeClick(t){this.lw.v(t)}subscribeCrosshairMove(t){this.ow.l(t)}unsubscribeCrosshairMove(t){this.ow.v(t)}subscribeDblClick(t){this.aw.l(t)}unsubscribeDblClick(t){this.aw.v(t)}priceScale(t){return new bn(this.Ub,t)}timeScale(){return this.cw}applyOptions(t){this.Ub.Eh(Ss(t))}options(){return this.Ub.W()}takeScreenshot(){return this.Ub.ib()}autoSizeActive(){return this.Ub.hb()}chartElement(){return this.Ub.lb()}paneSize(){const t=this.Ub.ob();return{height:t.height,width:t.width}}setCrosshairPosition(t,i,s){const e=this.rw.get(s);if(e===void 0)return;const n=this.Ub.$t()._r(e);n!==null&&this.Ub.$t().td(t,i,n)}clearCrosshairPosition(){this.Ub.$t().nd(!0)}dw(t,i,s={},e){yn(s.priceFormat);const n=R(W(Ms),W(i),s),r=this.Ub.$t().rd(t,n,e),o=new _n(r,this,this,this,this.N_);return this.rw.set(o,r),this.hw.set(r,o),o}fw(t){const i=this.Ub.$t();i.sd(t.St.Au,t.St.Hb,t.St.$b),t.Wb.forEach((s,e)=>e.J(s.We,s.jb)),i.Iu()}pw(t){return O(this.hw.get(t))}uw(t){const i=new Map;t.xb.forEach((e,n)=>{const r=n.Yh(),o=ui(r)(e);if(r!=="Custom")A(function(l){return l.open!==void 0||l.value!==void 0}(o));else{const l=n.Ma();A(!l||l(o)===!1)}i.set(this.pw(n),o)});const s=t.Mb===void 0?void 0:this.pw(t.Mb);return{time:t.wb,logical:t.ie,point:t.gb,hoveredSeries:s,hoveredObjectId:t.Sb,seriesData:i,sourceEvent:t.kb}}}function zn(h,t,i){let s;if(ut(h)){const n=document.getElementById(h);A(n!==null,`Cannot find element in DOM with id=${h}`),s=n}else s=h;const e=new Mn(s,t,i);return t.setOptions(e.options()),e}function kn(h,t){return zn(h,new os,os.Pd(t))}Object.assign(Object.assign({},Ms),ys);const xn={class:"dark:bg-gray-700 bg-white grid grid-cols-1 gap-6 border dark:border-gray-600 rounded py-4 px-6"},Cn={class:"text-sm font-medium text-gray-500 dark:text-gray-400 truncate"},En={class:"text-sm font-semibold text-gray-900 dark:text-gray-100"},Tn=Qs({__name:"KeyValueTableSimple",props:{data:{}},setup(h){return(t,i)=>(It(),Dt("dl",xn,[(It(!0),Dt(Xs,null,qs(t.data,(s,e)=>(It(),Dt("div",{key:e,class:"flex justify-between items-center"},[Ei("div",Cn,Oi(s[0]),1),Ei("div",En,Oi(s[1]),1)]))),128))]))}});export{kn as T,Tn as _,Wi as a}; + */const he={upColor:"#26a69a",downColor:"#ef5350",wickVisible:!0,borderVisible:!0,borderColor:"#378658",borderUpColor:"#26a69a",borderDownColor:"#ef5350",wickColor:"#737375",wickUpColor:"#26a69a",wickDownColor:"#ef5350"},ne={upColor:"#26a69a",downColor:"#ef5350",openVisible:!0,thinBars:!0},re={color:"#2196f3",lineStyle:0,lineWidth:3,lineType:0,lineVisible:!0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBorderWidth:2,crosshairMarkerBackgroundColor:"",lastPriceAnimation:0,pointMarkersVisible:!1},oe={topColor:"rgba( 46, 220, 135, 0.4)",bottomColor:"rgba( 40, 221, 100, 0)",invertFilledArea:!1,lineColor:"#33D778",lineStyle:0,lineWidth:3,lineType:0,lineVisible:!0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBorderWidth:2,crosshairMarkerBackgroundColor:"",lastPriceAnimation:0,pointMarkersVisible:!1},le={baseValue:{type:"price",price:0},topFillColor1:"rgba(38, 166, 154, 0.28)",topFillColor2:"rgba(38, 166, 154, 0.05)",topLineColor:"rgba(38, 166, 154, 1)",bottomFillColor1:"rgba(239, 83, 80, 0.05)",bottomFillColor2:"rgba(239, 83, 80, 0.28)",bottomLineColor:"rgba(239, 83, 80, 1)",lineWidth:3,lineStyle:0,lineType:0,lineVisible:!0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBorderWidth:2,crosshairMarkerBackgroundColor:"",lastPriceAnimation:0,pointMarkersVisible:!1},ae={color:"#26a69a",base:0},ys={color:"#2196f3"},Ms={title:"",visible:!0,lastValueVisible:!0,priceLineVisible:!0,priceLineSource:0,priceLineWidth:1,priceLineColor:"",priceLineStyle:2,baseLineVisible:!0,baseLineWidth:1,baseLineColor:"#B2B5BE",baseLineStyle:0,priceFormat:{type:"price",precision:2,minMove:.01}};var Ni,Ri;function j(h,t){const i={0:[],1:[h.lineWidth,h.lineWidth],2:[2*h.lineWidth,2*h.lineWidth],3:[6*h.lineWidth,6*h.lineWidth],4:[h.lineWidth,4*h.lineWidth]}[t];h.setLineDash(i)}function zs(h,t,i,s){h.beginPath();const e=h.lineWidth%2?.5:0;h.moveTo(i,t+e),h.lineTo(s,t+e),h.stroke()}function A(h,t){if(!h)throw new Error("Assertion failed"+(t?": "+t:""))}function O(h){if(h===void 0)throw new Error("Value is undefined");return h}function p(h){if(h===null)throw new Error("Value is null");return h}function X(h){return p(O(h))}(function(h){h[h.Simple=0]="Simple",h[h.WithSteps=1]="WithSteps",h[h.Curved=2]="Curved"})(Ni||(Ni={})),function(h){h[h.Solid=0]="Solid",h[h.Dotted=1]="Dotted",h[h.Dashed=2]="Dashed",h[h.LargeDashed=3]="LargeDashed",h[h.SparseDotted=4]="SparseDotted"}(Ri||(Ri={}));const Bi={khaki:"#f0e68c",azure:"#f0ffff",aliceblue:"#f0f8ff",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",gray:"#808080",green:"#008000",honeydew:"#f0fff0",floralwhite:"#fffaf0",lightblue:"#add8e6",lightcoral:"#f08080",lemonchiffon:"#fffacd",hotpink:"#ff69b4",lightyellow:"#ffffe0",greenyellow:"#adff2f",lightgoldenrodyellow:"#fafad2",limegreen:"#32cd32",linen:"#faf0e6",lightcyan:"#e0ffff",magenta:"#f0f",maroon:"#800000",olive:"#808000",orange:"#ffa500",oldlace:"#fdf5e6",mediumblue:"#0000cd",transparent:"#0000",lime:"#0f0",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",midnightblue:"#191970",orchid:"#da70d6",mediumorchid:"#ba55d3",mediumturquoise:"#48d1cc",orangered:"#ff4500",royalblue:"#4169e1",powderblue:"#b0e0e6",red:"#f00",coral:"#ff7f50",turquoise:"#40e0d0",white:"#fff",whitesmoke:"#f5f5f5",wheat:"#f5deb3",teal:"#008080",steelblue:"#4682b4",bisque:"#ffe4c4",aquamarine:"#7fffd4",aqua:"#0ff",sienna:"#a0522d",silver:"#c0c0c0",springgreen:"#00ff7f",antiquewhite:"#faebd7",burlywood:"#deb887",brown:"#a52a2a",beige:"#f5f5dc",chocolate:"#d2691e",chartreuse:"#7fff00",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cadetblue:"#5f9ea0",tomato:"#ff6347",fuchsia:"#f0f",blue:"#00f",salmon:"#fa8072",blanchedalmond:"#ffebcd",slateblue:"#6a5acd",slategray:"#708090",thistle:"#d8bfd8",tan:"#d2b48c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",blueviolet:"#8a2be2",black:"#000",darkmagenta:"#8b008b",darkslateblue:"#483d8b",darkkhaki:"#bdb76b",darkorchid:"#9932cc",darkorange:"#ff8c00",darkgreen:"#006400",darkred:"#8b0000",dodgerblue:"#1e90ff",darkslategray:"#2f4f4f",dimgray:"#696969",deepskyblue:"#00bfff",firebrick:"#b22222",forestgreen:"#228b22",indigo:"#4b0082",ivory:"#fffff0",lavenderblush:"#fff0f5",feldspar:"#d19275",indianred:"#cd5c5c",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightskyblue:"#87cefa",lightslategray:"#789",lightslateblue:"#8470ff",snow:"#fffafa",lightseagreen:"#20b2aa",lightsalmon:"#ffa07a",darksalmon:"#e9967a",darkviolet:"#9400d3",mediumpurple:"#9370d8",mediumaquamarine:"#66cdaa",skyblue:"#87ceeb",lavender:"#e6e6fa",lightsteelblue:"#b0c4de",mediumvioletred:"#c71585",mintcream:"#f5fffa",navajowhite:"#ffdead",navy:"#000080",olivedrab:"#6b8e23",palevioletred:"#d87093",violetred:"#d02090",yellow:"#ff0",yellowgreen:"#9acd32",lawngreen:"#7cfc00",pink:"#ffc0cb",paleturquoise:"#afeeee",palegoldenrod:"#eee8aa",darkolivegreen:"#556b2f",darkseagreen:"#8fbc8f",darkturquoise:"#00ced1",peachpuff:"#ffdab9",deeppink:"#ff1493",violet:"#ee82ee",palegreen:"#98fb98",mediumseagreen:"#3cb371",peru:"#cd853f",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",purple:"#800080",seagreen:"#2e8b57",seashell:"#fff5ee",papayawhip:"#ffefd5",mediumslateblue:"#7b68ee",plum:"#dda0dd",mediumspringgreen:"#00fa9a"};function N(h){return h<0?0:h>255?255:Math.round(h)||0}function xs(h){return h<=0||h>0?h<0?0:h>1?1:Math.round(1e4*h)/1e4:0}const ue=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,ce=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,de=/^rgb\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*\)$/,fe=/^rgba\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?[\d]{0,10}(?:\.\d+)?)\s*\)$/;function zt(h){(h=h.toLowerCase())in Bi&&(h=Bi[h]);{const t=fe.exec(h)||de.exec(h);if(t)return[N(parseInt(t[1],10)),N(parseInt(t[2],10)),N(parseInt(t[3],10)),xs(t.length<5?1:parseFloat(t[4]))]}{const t=ce.exec(h);if(t)return[N(parseInt(t[1],16)),N(parseInt(t[2],16)),N(parseInt(t[3],16)),1]}{const t=ue.exec(h);if(t)return[N(17*parseInt(t[1],16)),N(17*parseInt(t[2],16)),N(17*parseInt(t[3],16)),1]}throw new Error(`Cannot parse color: ${h}`)}function Et(h){const t=zt(h);return{t:`rgb(${t[0]}, ${t[1]}, ${t[2]})`,i:(i=t,.199*i[0]+.687*i[1]+.114*i[2]>160?"black":"white")};var i}class M{constructor(){this.h=[]}l(t,i,s){const e={o:t,_:i,u:s===!0};this.h.push(e)}v(t){const i=this.h.findIndex(s=>t===s.o);i>-1&&this.h.splice(i,1)}p(t){this.h=this.h.filter(i=>i._!==t)}m(t,i,s){const e=[...this.h];this.h=this.h.filter(n=>!n.u),e.forEach(n=>n.o(t,i,s))}M(){return this.h.length>0}S(){this.h=[]}}function R(h,...t){for(const i of t)for(const s in i)i[s]!==void 0&&(typeof i[s]!="object"||h[s]===void 0||Array.isArray(i[s])?h[s]=i[s]:R(h[s],i[s]));return h}function P(h){return typeof h=="number"&&isFinite(h)}function rt(h){return typeof h=="number"&&h%1==0}function ut(h){return typeof h=="string"}function ft(h){return typeof h=="boolean"}function W(h){const t=h;if(!t||typeof t!="object")return t;let i,s,e;for(s in i=Array.isArray(t)?[]:{},t)t.hasOwnProperty(s)&&(e=t[s],i[s]=e&&typeof e=="object"?W(e):e);return i}function me(h){return h!==null}function ot(h){return h===null?void 0:h}const di="-apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif";function K(h,t,i){return t===void 0&&(t=di),`${i=i!==void 0?`${i} `:""}${h}px ${t}`}class ve{constructor(t){this.k={C:1,T:5,P:NaN,R:"",D:"",O:"",A:"",V:0,B:0,I:0,L:0,N:0},this.F=t}W(){const t=this.k,i=this.j(),s=this.H();return t.P===i&&t.D===s||(t.P=i,t.D=s,t.R=K(i,s),t.L=2.5/12*i,t.V=t.L,t.B=i/12*t.T,t.I=i/12*t.T,t.N=0),t.O=this.$(),t.A=this.U(),this.k}$(){return this.F.W().layout.textColor}U(){return this.F.q()}j(){return this.F.W().layout.fontSize}H(){return this.F.W().layout.fontFamily}}class fi{constructor(){this.Y=[]}X(t){this.Y=t}K(t,i,s){this.Y.forEach(e=>{e.K(t,i,s)})}}class B{K(t,i,s){t.useBitmapCoordinateSpace(e=>this.Z(e,i,s))}}class pe extends B{constructor(){super(...arguments),this.G=null}J(t){this.G=t}Z({context:t,horizontalPixelRatio:i,verticalPixelRatio:s}){if(this.G===null||this.G.tt===null)return;const e=this.G.tt,n=this.G,r=Math.max(1,Math.floor(i))%2/2,o=l=>{t.beginPath();for(let a=e.to-1;a>=e.from;--a){const u=n.it[a],c=Math.round(u.nt*i)+r,d=u.st*s,f=l*s+r;t.moveTo(c,d),t.arc(c,d,f,0,2*Math.PI)}t.fill()};n.et>0&&(t.fillStyle=n.rt,o(n.ht+n.et)),t.fillStyle=n.lt,o(n.ht)}}function be(){return{it:[{nt:0,st:0,ot:0,_t:0}],lt:"",rt:"",ht:0,et:0,tt:null}}const ge={from:0,to:1};class we{constructor(t,i){this.ut=new fi,this.ct=[],this.dt=[],this.ft=!0,this.F=t,this.vt=i,this.ut.X(this.ct)}bt(t){const i=this.F.wt();i.length!==this.ct.length&&(this.dt=i.map(be),this.ct=this.dt.map(s=>{const e=new pe;return e.J(s),e}),this.ut.X(this.ct)),this.ft=!0}gt(){return this.ft&&(this.Mt(),this.ft=!1),this.ut}Mt(){const t=this.vt.W().mode===2,i=this.F.wt(),s=this.vt.xt(),e=this.F.St();i.forEach((n,r)=>{var o;const l=this.dt[r],a=n.kt(s);if(t||a===null||!n.yt())return void(l.tt=null);const u=p(n.Ct());l.lt=a.Tt,l.ht=a.ht,l.et=a.Pt,l.it[0]._t=a._t,l.it[0].st=n.Dt().Rt(a._t,u.Ot),l.rt=(o=a.At)!==null&&o!==void 0?o:this.F.Vt(l.it[0].st/n.Dt().Bt()),l.it[0].ot=s,l.it[0].nt=e.It(s),l.tt=ge})}}class _e extends B{constructor(t){super(),this.zt=t}Z({context:t,bitmapSize:i,horizontalPixelRatio:s,verticalPixelRatio:e}){if(this.zt===null)return;const n=this.zt.Lt.yt,r=this.zt.Et.yt;if(!n&&!r)return;const o=Math.round(this.zt.nt*s),l=Math.round(this.zt.st*e);t.lineCap="butt",n&&o>=0&&(t.lineWidth=Math.floor(this.zt.Lt.et*s),t.strokeStyle=this.zt.Lt.O,t.fillStyle=this.zt.Lt.O,j(t,this.zt.Lt.Nt),function(a,u,c,d){a.beginPath();const f=a.lineWidth%2?.5:0;a.moveTo(u+f,c),a.lineTo(u+f,d),a.stroke()}(t,o,0,i.height)),r&&l>=0&&(t.lineWidth=Math.floor(this.zt.Et.et*e),t.strokeStyle=this.zt.Et.O,t.fillStyle=this.zt.Et.O,j(t,this.zt.Et.Nt),zs(t,l,0,i.width))}}class Se{constructor(t){this.ft=!0,this.Ft={Lt:{et:1,Nt:0,O:"",yt:!1},Et:{et:1,Nt:0,O:"",yt:!1},nt:0,st:0},this.Wt=new _e(this.Ft),this.jt=t}bt(){this.ft=!0}gt(){return this.ft&&(this.Mt(),this.ft=!1),this.Wt}Mt(){const t=this.jt.yt(),i=p(this.jt.Ht()),s=i.$t().W().crosshair,e=this.Ft;if(s.mode===2)return e.Et.yt=!1,void(e.Lt.yt=!1);e.Et.yt=t&&this.jt.Ut(i),e.Lt.yt=t&&this.jt.qt(),e.Et.et=s.horzLine.width,e.Et.Nt=s.horzLine.style,e.Et.O=s.horzLine.color,e.Lt.et=s.vertLine.width,e.Lt.Nt=s.vertLine.style,e.Lt.O=s.vertLine.color,e.nt=this.jt.Yt(),e.st=this.jt.Xt()}}function ye(h,t,i,s,e,n){h.fillRect(t+n,i,s-2*n,n),h.fillRect(t+n,i+e-n,s-2*n,n),h.fillRect(t,i,n,e),h.fillRect(t+s-n,i,n,e)}function Ot(h,t,i,s,e,n){h.save(),h.globalCompositeOperation="copy",h.fillStyle=n,h.fillRect(t,i,s,e),h.restore()}function Li(h,t){return h.map(i=>i===0?i:i+t)}function Vt(h,t,i,s,e,n){h.beginPath(),h.lineTo(t+s-n[1],i),n[1]!==0&&h.arcTo(t+s,i,t+s,i+n[1],n[1]),h.lineTo(t+s,i+e-n[2]),n[2]!==0&&h.arcTo(t+s,i+e,t+s-n[2],i+e,n[2]),h.lineTo(t+n[3],i+e),n[3]!==0&&h.arcTo(t,i+e,t,i+e-n[3],n[3]),h.lineTo(t,i+n[0]),n[0]!==0&&h.arcTo(t,i,t+n[0],i,n[0])}function Pi(h,t,i,s,e,n,r=0,o=[0,0,0,0],l=""){if(h.save(),!r||!l||l===n)return Vt(h,t,i,s,e,o),h.fillStyle=n,h.fill(),void h.restore();const a=r/2;n!=="transparent"&&(Vt(h,t+r,i+r,s-2*r,e-2*r,Li(o,-r)),h.fillStyle=n,h.fill()),l!=="transparent"&&(Vt(h,t+a,i+a,s-r,e-r,Li(o,-a)),h.lineWidth=r,h.strokeStyle=l,h.closePath(),h.stroke()),h.restore()}function Cs(h,t,i,s,e,n,r){h.save(),h.globalCompositeOperation="copy";const o=h.createLinearGradient(0,0,0,e);o.addColorStop(0,n),o.addColorStop(1,r),h.fillStyle=o,h.fillRect(t,i,s,e),h.restore()}class Wi{constructor(t,i){this.J(t,i)}J(t,i){this.zt=t,this.Kt=i}Bt(t,i){return this.zt.yt?t.P+t.L+t.V:0}K(t,i,s,e){if(!this.zt.yt||this.zt.Zt.length===0)return;const n=this.zt.O,r=this.Kt.t,o=t.useBitmapCoordinateSpace(l=>{const a=l.context;a.font=i.R;const u=this.Gt(l,i,s,e),c=u.Jt,d=(f,m)=>{u.Qt?Pi(a,c.ti,c.ii,c.ni,c.si,f,c.ei,[c.ht,0,0,c.ht],m):Pi(a,c.ri,c.ii,c.ni,c.si,f,c.ei,[0,c.ht,c.ht,0],m)};return d(r,"transparent"),this.zt.hi&&(a.fillStyle=n,a.fillRect(c.ri,c.li,c.ai-c.ri,c.oi)),d("transparent",r),this.zt._i&&(a.fillStyle=i.A,a.fillRect(u.Qt?c.ui-c.ei:0,c.ii,c.ei,c.ci-c.ii)),u});t.useMediaCoordinateSpace(({context:l})=>{const a=o.di;l.font=i.R,l.textAlign=o.Qt?"right":"left",l.textBaseline="middle",l.fillStyle=n,l.fillText(this.zt.Zt,a.fi,(a.ii+a.ci)/2+a.vi)})}Gt(t,i,s,e){var n;const{context:r,bitmapSize:o,mediaSize:l,horizontalPixelRatio:a,verticalPixelRatio:u}=t,c=this.zt.hi||!this.zt.pi?i.T:0,d=this.zt.mi?i.C:0,f=i.L+this.Kt.bi,m=i.V+this.Kt.wi,v=i.B,b=i.I,g=this.zt.Zt,w=i.P,y=s.gi(r,g),_=Math.ceil(s.Mi(r,g)),z=w+f+m,T=i.C+v+b+_+c,E=Math.max(1,Math.floor(u));let C=Math.round(z*u);C%2!=E%2&&(C+=1);const I=d>0?Math.max(1,Math.floor(d*a)):0,Y=Math.round(T*a),zi=Math.round(c*a),Ys=(n=this.Kt.xi)!==null&&n!==void 0?n:this.Kt.Si,xi=Math.round(Ys*u)-Math.floor(.5*u),Bt=Math.floor(xi+E/2-C/2),Ci=Bt+C,dt=e==="right",Ei=dt?l.width-d:d,tt=dt?o.width-I:I;let Lt,Pt,Wt;return dt?(Lt=tt-Y,Pt=tt-zi,Wt=Ei-c-v-d):(Lt=tt+Y,Pt=tt+zi,Wt=Ei+c+v),{Qt:dt,Jt:{ii:Bt,li:xi,ci:Ci,ni:Y,si:C,ht:2*a,ei:I,ti:Lt,ri:tt,ai:Pt,oi:E,ui:o.width},di:{ii:Bt/u,ci:Ci/u,fi:Wt,vi:y}}}}class kt{constructor(t){this.ki={Si:0,t:"#000",wi:0,bi:0},this.yi={Zt:"",yt:!1,hi:!0,pi:!1,At:"",O:"#FFF",_i:!1,mi:!1},this.Ci={Zt:"",yt:!1,hi:!1,pi:!0,At:"",O:"#FFF",_i:!0,mi:!0},this.ft=!0,this.Ti=new(t||Wi)(this.yi,this.ki),this.Pi=new(t||Wi)(this.Ci,this.ki)}Zt(){return this.Ri(),this.yi.Zt}Si(){return this.Ri(),this.ki.Si}bt(){this.ft=!0}Bt(t,i=!1){return Math.max(this.Ti.Bt(t,i),this.Pi.Bt(t,i))}Di(){return this.ki.xi||0}Oi(t){this.ki.xi=t}Ai(){return this.Ri(),this.yi.yt||this.Ci.yt}Vi(){return this.Ri(),this.yi.yt}gt(t){return this.Ri(),this.yi.hi=this.yi.hi&&t.W().ticksVisible,this.Ci.hi=this.Ci.hi&&t.W().ticksVisible,this.Ti.J(this.yi,this.ki),this.Pi.J(this.Ci,this.ki),this.Ti}Bi(){return this.Ri(),this.Ti.J(this.yi,this.ki),this.Pi.J(this.Ci,this.ki),this.Pi}Ri(){this.ft&&(this.yi.hi=!0,this.Ci.hi=!1,this.Ii(this.yi,this.Ci,this.ki))}}class Me extends kt{constructor(t,i,s){super(),this.jt=t,this.zi=i,this.Li=s}Ii(t,i,s){if(t.yt=!1,this.jt.W().mode===2)return;const e=this.jt.W().horzLine;if(!e.labelVisible)return;const n=this.zi.Ct();if(!this.jt.yt()||this.zi.Ei()||n===null)return;const r=Et(e.labelBackgroundColor);s.t=r.t,t.O=r.i;const o=2/12*this.zi.P();s.bi=o,s.wi=o;const l=this.Li(this.zi);s.Si=l.Si,t.Zt=this.zi.Ni(l._t,n),t.yt=!0}}const ze=/[1-9]/g;class Es{constructor(){this.zt=null}J(t){this.zt=t}K(t,i){if(this.zt===null||this.zt.yt===!1||this.zt.Zt.length===0)return;const s=t.useMediaCoordinateSpace(({context:d})=>(d.font=i.R,Math.round(i.Fi.Mi(d,p(this.zt).Zt,ze))));if(s<=0)return;const e=i.Wi,n=s+2*e,r=n/2,o=this.zt.ji;let l=this.zt.Si,a=Math.floor(l-r)+.5;a<0?(l+=Math.abs(0-a),a=Math.floor(l-r)+.5):a+n>o&&(l-=Math.abs(o-(a+n)),a=Math.floor(l-r)+.5);const u=a+n,c=Math.ceil(0+i.C+i.T+i.L+i.P+i.V);t.useBitmapCoordinateSpace(({context:d,horizontalPixelRatio:f,verticalPixelRatio:m})=>{const v=p(this.zt);d.fillStyle=v.t;const b=Math.round(a*f),g=Math.round(0*m),w=Math.round(u*f),y=Math.round(c*m),_=Math.round(2*f);if(d.beginPath(),d.moveTo(b,g),d.lineTo(b,y-_),d.arcTo(b,y,b+_,y,_),d.lineTo(w-_,y),d.arcTo(w,y,w,y-_,_),d.lineTo(w,g),d.fill(),v.hi){const z=Math.round(v.Si*f),T=g,E=Math.round((T+i.T)*m);d.fillStyle=v.O;const C=Math.max(1,Math.floor(f)),I=Math.floor(.5*f);d.fillRect(z-I,T,C,E-T)}}),t.useMediaCoordinateSpace(({context:d})=>{const f=p(this.zt),m=0+i.C+i.T+i.L+i.P/2;d.font=i.R,d.textAlign="left",d.textBaseline="middle",d.fillStyle=f.O;const v=i.Fi.gi(d,"Apr0");d.translate(a+e,m+v),d.fillText(f.Zt,0,0)})}}class xe{constructor(t,i,s){this.ft=!0,this.Wt=new Es,this.Ft={yt:!1,t:"#4c525e",O:"white",Zt:"",ji:0,Si:NaN,hi:!0},this.vt=t,this.Hi=i,this.Li=s}bt(){this.ft=!0}gt(){return this.ft&&(this.Mt(),this.ft=!1),this.Wt.J(this.Ft),this.Wt}Mt(){const t=this.Ft;if(t.yt=!1,this.vt.W().mode===2)return;const i=this.vt.W().vertLine;if(!i.labelVisible)return;const s=this.Hi.St();if(s.Ei())return;t.ji=s.ji();const e=this.Li();if(e===null)return;t.Si=e.Si;const n=s.$i(this.vt.xt());t.Zt=s.Ui(p(n)),t.yt=!0;const r=Et(i.labelBackgroundColor);t.t=r.t,t.O=r.i,t.hi=s.W().ticksVisible}}class mi{constructor(){this.qi=null,this.Yi=0}Xi(){return this.Yi}Ki(t){this.Yi=t}Dt(){return this.qi}Zi(t){this.qi=t}Gi(t){return[]}Ji(){return[]}yt(){return!0}}var ni;(function(h){h[h.Normal=0]="Normal",h[h.Magnet=1]="Magnet",h[h.Hidden=2]="Hidden"})(ni||(ni={}));class Ce extends mi{constructor(t,i){super(),this.Qi=null,this.tn=NaN,this.nn=0,this.sn=!0,this.en=new Map,this.rn=!1,this.hn=NaN,this.ln=NaN,this.an=NaN,this.on=NaN,this.Hi=t,this._n=i,this.un=new we(t,this),this.cn=((e,n)=>r=>{const o=n(),l=e();if(r===p(this.Qi).dn())return{_t:l,Si:o};{const a=p(r.Ct());return{_t:r.fn(o,a),Si:o}}})(()=>this.tn,()=>this.ln);const s=((e,n)=>()=>{const r=this.Hi.St().vn(e()),o=n();return r&&Number.isFinite(o)?{ot:r,Si:o}:null})(()=>this.nn,()=>this.Yt());this.pn=new xe(this,t,s),this.mn=new Se(this)}W(){return this._n}bn(t,i){this.an=t,this.on=i}wn(){this.an=NaN,this.on=NaN}gn(){return this.an}Mn(){return this.on}xn(t,i,s){this.rn||(this.rn=!0),this.sn=!0,this.Sn(t,i,s)}xt(){return this.nn}Yt(){return this.hn}Xt(){return this.ln}yt(){return this.sn}kn(){this.sn=!1,this.yn(),this.tn=NaN,this.hn=NaN,this.ln=NaN,this.Qi=null,this.wn()}Cn(t){return this.Qi!==null?[this.mn,this.un]:[]}Ut(t){return t===this.Qi&&this._n.horzLine.visible}qt(){return this._n.vertLine.visible}Tn(t,i){this.sn&&this.Qi===t||this.en.clear();const s=[];return this.Qi===t&&s.push(this.Pn(this.en,i,this.cn)),s}Ji(){return this.sn?[this.pn]:[]}Ht(){return this.Qi}Rn(){this.mn.bt(),this.en.forEach(t=>t.bt()),this.pn.bt(),this.un.bt()}Dn(t){return t&&!t.dn().Ei()?t.dn():null}Sn(t,i,s){this.On(t,i,s)&&this.Rn()}On(t,i,s){const e=this.hn,n=this.ln,r=this.tn,o=this.nn,l=this.Qi,a=this.Dn(s);this.nn=t,this.hn=isNaN(t)?NaN:this.Hi.St().It(t),this.Qi=s;const u=a!==null?a.Ct():null;return a!==null&&u!==null?(this.tn=i,this.ln=a.Rt(i,u)):(this.tn=NaN,this.ln=NaN),e!==this.hn||n!==this.ln||o!==this.nn||r!==this.tn||l!==this.Qi}yn(){const t=this.Hi.wt().map(s=>s.Vn().An()).filter(me),i=t.length===0?null:Math.max(...t);this.nn=i!==null?i:NaN}Pn(t,i,s){let e=t.get(i);return e===void 0&&(e=new Me(this,i,s),t.set(i,e)),e}}function Tt(h){return h==="left"||h==="right"}class x{constructor(t){this.Bn=new Map,this.In=[],this.zn=t}Ln(t,i){const s=function(e,n){return e===void 0?n:{En:Math.max(e.En,n.En),Nn:e.Nn||n.Nn}}(this.Bn.get(t),i);this.Bn.set(t,s)}Fn(){return this.zn}Wn(t){const i=this.Bn.get(t);return i===void 0?{En:this.zn}:{En:Math.max(this.zn,i.En),Nn:i.Nn}}jn(){this.Hn(),this.In=[{$n:0}]}Un(t){this.Hn(),this.In=[{$n:1,Ot:t}]}qn(t){this.Yn(),this.In.push({$n:5,Ot:t})}Hn(){this.Yn(),this.In.push({$n:6})}Xn(){this.Hn(),this.In=[{$n:4}]}Kn(t){this.Hn(),this.In.push({$n:2,Ot:t})}Zn(t){this.Hn(),this.In.push({$n:3,Ot:t})}Gn(){return this.In}Jn(t){for(const i of t.In)this.Qn(i);this.zn=Math.max(this.zn,t.zn),t.Bn.forEach((i,s)=>{this.Ln(s,i)})}static ts(){return new x(2)}static ns(){return new x(3)}Qn(t){switch(t.$n){case 0:this.jn();break;case 1:this.Un(t.Ot);break;case 2:this.Kn(t.Ot);break;case 3:this.Zn(t.Ot);break;case 4:this.Xn();break;case 5:this.qn(t.Ot);break;case 6:this.Yn()}}Yn(){const t=this.In.findIndex(i=>i.$n===5);t!==-1&&this.In.splice(t,1)}}const Di=".";function D(h,t){if(!P(h))return"n/a";if(!rt(t))throw new TypeError("invalid length");if(t<0||t>16)throw new TypeError("invalid length");return t===0?h.toString():("0000000000000000"+h.toString()).slice(-t)}class Nt{constructor(t,i){if(i||(i=1),P(t)&&rt(t)||(t=100),t<0)throw new TypeError("invalid base");this.zi=t,this.ss=i,this.es()}format(t){const i=t<0?"−":"";return t=Math.abs(t),i+this.rs(t)}es(){if(this.hs=0,this.zi>0&&this.ss>0){let t=this.zi;for(;t>1;)t/=10,this.hs++}}rs(t){const i=this.zi/this.ss;let s=Math.floor(t),e="";const n=this.hs!==void 0?this.hs:NaN;if(i>1){let r=+(Math.round(t*i)-s*i).toFixed(this.hs);r>=i&&(r-=i,s+=1),e=Di+D(+r.toFixed(this.hs)*this.ss,n)}else s=Math.round(s*i)/i,n>0&&(e=Di+D(0,n));return s.toFixed(0)+e}}class Os extends Nt{constructor(t=100){super(t)}format(t){return`${super.format(t)}%`}}class Ee{constructor(t){this.ls=t}format(t){let i="";return t<0&&(i="-",t=-t),t<995?i+this.os(t):t<999995?i+this.os(t/1e3)+"K":t<999999995?(t=1e3*Math.round(t/1e3),i+this.os(t/1e6)+"M"):(t=1e6*Math.round(t/1e6),i+this.os(t/1e9)+"B")}os(t){let i;const s=Math.pow(10,this.ls);return i=(t=Math.round(t*s)/s)>=1e-15&&t<1?t.toFixed(this.ls).replace(/\.?0+$/,""):String(t),i.replace(/(\.[1-9]*)0+$/,(e,n)=>n)}}function ks(h,t,i,s,e,n,r){if(t.length===0||s.from>=t.length||s.to<=0)return;const{context:o,horizontalPixelRatio:l,verticalPixelRatio:a}=h,u=t[s.from];let c=n(h,u),d=u;if(s.to-s.from<2){const f=e/2;o.beginPath();const m={nt:u.nt-f,st:u.st},v={nt:u.nt+f,st:u.st};o.moveTo(m.nt*l,m.st*a),o.lineTo(v.nt*l,v.st*a),r(h,c,m,v)}else{const f=(v,b)=>{r(h,c,d,b),o.beginPath(),c=v,d=b};let m=d;o.beginPath(),o.moveTo(u.nt*l,u.st*a);for(let v=s.from+1;v=m.from;--T){const E=d[T];if(E){const C=v(c,E);C!==y&&(w.beginPath(),y!==null&&w.fill(),w.fillStyle=C,y=C);const I=Math.round(E.nt*b)+_,Y=E.st*g;w.moveTo(I,Y),w.arc(I,Y,z,0,2*Math.PI)}}w.fill()}(t,i,l,s,u)}}class Bs extends Rs{Ps(t,i){return i.lt}}function Ls(h,t,i,s,e=0,n=t.length){let r=n-e;for(;0>1,l=e+o;s(t[l],i)===h?(e=l+1,r-=o+1):r=o}return e}const ct=Ls.bind(null,!0),Ps=Ls.bind(null,!1);function Re(h,t){return h.ot0&&n=s&&(o=n-1),r>0&&rObject.assign(Object.assign({},t),this.Is.js().Ws(t.ot)))}Hs(){this.Bs=null}Es(){this.Os&&(this.$s(),this.Os=!1),this.As&&(this.Fs(),this.As=!1),this.Ds&&(this.Us(),this.Ds=!1)}Us(){const t=this.Is.Dt(),i=this.zs.St();if(this.Hs(),i.Ei()||t.Ei())return;const s=i.qs();if(s===null||this.Is.Vn().Ys()===0)return;const e=this.Is.Ct();e!==null&&(this.Bs=Ws(this.Vs,s,this.Ls),this.Xs(t,i,e.Ot),this.Ks())}}class Rt extends pi{constructor(t,i){super(t,i,!0)}Xs(t,i,s){i.Zs(this.Vs,ot(this.Bs)),t.Gs(this.Vs,s,ot(this.Bs))}Js(t,i){return{ot:t,_t:i,nt:NaN,st:NaN}}$s(){const t=this.Is.js();this.Vs=this.Is.Vn().Qs().map(i=>{const s=i.Ot[3];return this.te(i.ie,s,t)})}}class Le extends Rt{constructor(t,i){super(t,i),this.Ns=new fi,this.ne=new Te,this.se=new Bs,this.Ns.X([this.ne,this.se])}te(t,i,s){return Object.assign(Object.assign({},this.Js(t,i)),s.Ws(t))}Ks(){const t=this.Is.W();this.ne.J({us:t.lineType,it:this.Vs,Nt:t.lineStyle,et:t.lineWidth,cs:null,ds:t.invertFilledArea,tt:this.Bs,_s:this.zs.St().ee()}),this.se.J({us:t.lineVisible?t.lineType:void 0,it:this.Vs,Nt:t.lineStyle,et:t.lineWidth,tt:this.Bs,_s:this.zs.St().ee(),Ts:t.pointMarkersVisible?t.pointMarkersRadius||t.lineWidth/2+2:void 0})}}class Pe extends B{constructor(){super(...arguments),this.zt=null,this.re=0,this.he=0}J(t){this.zt=t}Z({context:t,horizontalPixelRatio:i,verticalPixelRatio:s}){if(this.zt===null||this.zt.Vn.length===0||this.zt.tt===null)return;this.re=this.le(i),this.re>=2&&Math.max(1,Math.floor(i))%2!=this.re%2&&this.re--,this.he=this.zt.ae?Math.min(this.re,Math.floor(i)):this.re;let e=null;const n=this.he<=this.re&&this.zt.ee>=Math.floor(1.5*i);for(let r=this.zt.tt.from;rv+g-1&&(C=v+g-1,E=C-c+1),t.fillRect(T,E,u-T,C-E+1)}const y=a+w;let _=Math.max(v,Math.round(o.fe*s)-l),z=_+c-1;z>v+g-1&&(z=v+g-1,_=z-c+1),t.fillRect(d+1,_,y-d,z-_+1)}}}le(t){const i=Math.floor(t);return Math.max(i,Math.floor(function(s,e){return Math.floor(.3*s*e)}(p(this.zt).ee,t)))}}class Ds extends pi{constructor(t,i){super(t,i,!1)}Xs(t,i,s){i.Zs(this.Vs,ot(this.Bs)),t.ve(this.Vs,s,ot(this.Bs))}pe(t,i,s){return{ot:t,me:i.Ot[0],be:i.Ot[1],we:i.Ot[2],ge:i.Ot[3],nt:NaN,de:NaN,_e:NaN,ue:NaN,fe:NaN}}$s(){const t=this.Is.js();this.Vs=this.Is.Vn().Qs().map(i=>this.te(i.ie,i,t))}}class We extends Ds{constructor(){super(...arguments),this.Ns=new Pe}te(t,i,s){return Object.assign(Object.assign({},this.pe(t,i,s)),s.Ws(t))}Ks(){const t=this.Is.W();this.Ns.J({Vn:this.Vs,ee:this.zs.St().ee(),ce:t.openVisible,ae:t.thinBars,tt:this.Bs})}}class De extends Ts{constructor(){super(...arguments),this.ks=new vi}fs(t,i){const s=this.G;return this.ks.vs(t,{bs:i.Me,ws:i.xe,gs:i.Se,Ms:i.ke,xs:t.bitmapSize.height,cs:s.cs})}}class Ie extends Rs{constructor(){super(...arguments),this.ye=new vi}Ps(t,i){const s=this.G;return this.ye.vs(t,{bs:i.Ce,ws:i.Ce,gs:i.Te,Ms:i.Te,xs:t.bitmapSize.height,cs:s.cs})}}class Ve extends Rt{constructor(t,i){super(t,i),this.Ns=new fi,this.Pe=new De,this.Re=new Ie,this.Ns.X([this.Pe,this.Re])}te(t,i,s){return Object.assign(Object.assign({},this.Js(t,i)),s.Ws(t))}Ks(){const t=this.Is.Ct();if(t===null)return;const i=this.Is.W(),s=this.Is.Dt().Rt(i.baseValue.price,t.Ot),e=this.zs.St().ee();this.Pe.J({it:this.Vs,et:i.lineWidth,Nt:i.lineStyle,us:i.lineType,cs:s,ds:!1,tt:this.Bs,_s:e}),this.Re.J({it:this.Vs,et:i.lineWidth,Nt:i.lineStyle,us:i.lineVisible?i.lineType:void 0,Ts:i.pointMarkersVisible?i.pointMarkersRadius||i.lineWidth/2+2:void 0,cs:s,tt:this.Bs,_s:e})}}class Ae extends B{constructor(){super(...arguments),this.zt=null,this.re=0}J(t){this.zt=t}Z(t){if(this.zt===null||this.zt.Vn.length===0||this.zt.tt===null)return;const{horizontalPixelRatio:i}=t;this.re=function(n,r){if(n>=2.5&&n<=4)return Math.floor(3*r);const o=1-.2*Math.atan(Math.max(4,n)-4)/(.5*Math.PI),l=Math.floor(n*o*r),a=Math.floor(n*r),u=Math.min(l,a);return Math.max(Math.floor(r),u)}(this.zt.ee,i),this.re>=2&&Math.floor(i)%2!=this.re%2&&this.re--;const s=this.zt.Vn;this.zt.De&&this.Oe(t,s,this.zt.tt),this.zt._i&&this.Ae(t,s,this.zt.tt);const e=this.Ve(i);(!this.zt._i||this.re>2*e)&&this.Be(t,s,this.zt.tt)}Oe(t,i,s){if(this.zt===null)return;const{context:e,horizontalPixelRatio:n,verticalPixelRatio:r}=t;let o="",l=Math.min(Math.floor(n),Math.floor(this.zt.ee*n));l=Math.max(Math.floor(n),Math.min(l,this.re));const a=Math.floor(.5*l);let u=null;for(let c=s.from;c2*l)ye(e,d,m,f-d+1,v-m+1,l);else{const b=f-d+1;e.fillRect(d,m,b,v-m+1)}a=f}}Be(t,i,s){if(this.zt===null)return;const{context:e,horizontalPixelRatio:n,verticalPixelRatio:r}=t;let o="";const l=this.Ve(n);for(let a=s.from;ad||e.fillRect(f,c,m-f+1,d-c+1)}}}class $e extends Ds{constructor(){super(...arguments),this.Ns=new Ae}te(t,i,s){return Object.assign(Object.assign({},this.pe(t,i,s)),s.Ws(t))}Ks(){const t=this.Is.W();this.Ns.J({Vn:this.Vs,ee:this.zs.St().ee(),De:t.wickVisible,_i:t.borderVisible,tt:this.Bs})}}class Fe{constructor(t,i){this.Le=t,this.zi=i}K(t,i,s){this.Le.draw(t,this.zi,i,s)}}class $t extends pi{constructor(t,i,s){super(t,i,!1),this.mn=s,this.Ns=new Fe(this.mn.renderer(),e=>{const n=t.Ct();return n===null?null:t.Dt().Rt(e,n.Ot)})}Ee(t){return this.mn.priceValueBuilder(t)}Ne(t){return this.mn.isWhitespace(t)}$s(){const t=this.Is.js();this.Vs=this.Is.Vn().Qs().map(i=>Object.assign(Object.assign({ot:i.ie,nt:NaN},t.Ws(i.ie)),{Fe:i.We}))}Xs(t,i){i.Zs(this.Vs,ot(this.Bs))}Ks(){this.mn.update({bars:this.Vs.map(He),barSpacing:this.zs.St().ee(),visibleRange:this.Bs},this.Is.W())}}function He(h){return{x:h.nt,time:h.ot,originalData:h.Fe,barColor:h.oe}}class je extends B{constructor(){super(...arguments),this.zt=null,this.je=[]}J(t){this.zt=t,this.je=[]}Z({context:t,horizontalPixelRatio:i,verticalPixelRatio:s}){if(this.zt===null||this.zt.it.length===0||this.zt.tt===null)return;this.je.length||this.He(i);const e=Math.max(1,Math.floor(s)),n=Math.round(this.zt.$e*s)-Math.floor(e/2),r=n+e;for(let o=this.zt.tt.from;oo.qe?o.ui=r.Rs-i-1:r.Rs=o.ui+i+1)}let e=Math.ceil(this.zt.ee*t);for(let n=this.zt.tt.from;n0&&e<4)for(let n=this.zt.tt.from;ne&&(r.Ue>r.qe?r.ui-=1:r.Rs+=1)}}}class Ue extends Rt{constructor(){super(...arguments),this.Ns=new je}te(t,i,s){return Object.assign(Object.assign({},this.Js(t,i)),s.Ws(t))}Ks(){const t={it:this.Vs,ee:this.zs.St().ee(),tt:this.Bs,$e:this.Is.Dt().Rt(this.Is.W().base,p(this.Is.Ct()).Ot)};this.Ns.J(t)}}class Ze extends Rt{constructor(){super(...arguments),this.Ns=new Bs}te(t,i,s){return Object.assign(Object.assign({},this.Js(t,i)),s.Ws(t))}Ks(){const t=this.Is.W(),i={it:this.Vs,Nt:t.lineStyle,us:t.lineVisible?t.lineType:void 0,et:t.lineWidth,Ts:t.pointMarkersVisible?t.pointMarkersRadius||t.lineWidth/2+2:void 0,tt:this.Bs,_s:this.zs.St().ee()};this.Ns.J(i)}}const Ye=/[2-9]/g;class lt{constructor(t=50){this.Ye=0,this.Xe=1,this.Ke=1,this.Ze={},this.Ge=new Map,this.Je=t}Qe(){this.Ye=0,this.Ge.clear(),this.Xe=1,this.Ke=1,this.Ze={}}Mi(t,i,s){return this.tr(t,i,s).width}gi(t,i,s){const e=this.tr(t,i,s);return((e.actualBoundingBoxAscent||0)-(e.actualBoundingBoxDescent||0))/2}tr(t,i,s){const e=s||Ye,n=String(i).replace(e,"0");if(this.Ge.has(n))return O(this.Ge.get(n)).ir;if(this.Ye===this.Je){const o=this.Ze[this.Ke];delete this.Ze[this.Ke],this.Ge.delete(o),this.Ke++,this.Ye--}t.save(),t.textBaseline="middle";const r=t.measureText(n);return t.restore(),r.width===0&&i.length||(this.Ge.set(n,{ir:r,nr:this.Xe}),this.Ze[this.Xe]=n,this.Ye++,this.Xe++),r}}class Qe{constructor(t){this.sr=null,this.k=null,this.er="right",this.rr=t}hr(t,i,s){this.sr=t,this.k=i,this.er=s}K(t){this.k!==null&&this.sr!==null&&this.sr.K(t,this.k,this.rr,this.er)}}class Is{constructor(t,i,s){this.lr=t,this.rr=new lt(50),this.ar=i,this.F=s,this.j=-1,this.Wt=new Qe(this.rr)}gt(){const t=this.F._r(this.ar);if(t===null)return null;const i=t.ur(this.ar)?t.cr():this.ar.Dt();if(i===null)return null;const s=t.dr(i);if(s==="overlay")return null;const e=this.F.vr();return e.P!==this.j&&(this.j=e.P,this.rr.Qe()),this.Wt.hr(this.lr.Bi(),e,s),this.Wt}}class Xe extends B{constructor(){super(...arguments),this.zt=null}J(t){this.zt=t}pr(t,i){var s;if(!(!((s=this.zt)===null||s===void 0)&&s.yt))return null;const{st:e,et:n,mr:r}=this.zt;return i>=e-n-7&&i<=e+n+7?{br:this.zt,mr:r}:null}Z({context:t,bitmapSize:i,horizontalPixelRatio:s,verticalPixelRatio:e}){if(this.zt===null||this.zt.yt===!1)return;const n=Math.round(this.zt.st*e);n<0||n>i.height||(t.lineCap="butt",t.strokeStyle=this.zt.O,t.lineWidth=Math.floor(this.zt.et*s),j(t,this.zt.Nt),zs(t,n,0,i.width))}}class bi{constructor(t){this.wr={st:0,O:"rgba(0, 0, 0, 0)",et:1,Nt:0,yt:!1},this.gr=new Xe,this.ft=!0,this.Is=t,this.zs=t.$t(),this.gr.J(this.wr)}bt(){this.ft=!0}gt(){return this.Is.yt()?(this.ft&&(this.Mr(),this.ft=!1),this.gr):null}}class qe extends bi{constructor(t){super(t)}Mr(){this.wr.yt=!1;const t=this.Is.Dt(),i=t.Sr().Sr;if(i!==2&&i!==3)return;const s=this.Is.W();if(!s.baseLineVisible||!this.Is.yt())return;const e=this.Is.Ct();e!==null&&(this.wr.yt=!0,this.wr.st=t.Rt(e.Ot,e.Ot),this.wr.O=s.baseLineColor,this.wr.et=s.baseLineWidth,this.wr.Nt=s.baseLineStyle)}}class Je extends B{constructor(){super(...arguments),this.zt=null}J(t){this.zt=t}We(){return this.zt}Z({context:t,horizontalPixelRatio:i,verticalPixelRatio:s}){const e=this.zt;if(e===null)return;const n=Math.max(1,Math.floor(i)),r=n%2/2,o=Math.round(e.qe.x*i)+r,l=e.qe.y*s;t.fillStyle=e.kr,t.beginPath();const a=Math.max(2,1.5*e.yr)*i;t.arc(o,l,a,0,2*Math.PI,!1),t.fill(),t.fillStyle=e.Cr,t.beginPath(),t.arc(o,l,e.ht*i,0,2*Math.PI,!1),t.fill(),t.lineWidth=n,t.strokeStyle=e.Tr,t.beginPath(),t.arc(o,l,e.ht*i+n/2,0,2*Math.PI,!1),t.stroke()}}const Ke=[{Pr:0,Rr:.25,Dr:4,Or:10,Ar:.25,Vr:0,Br:.4,Ir:.8},{Pr:.25,Rr:.525,Dr:10,Or:14,Ar:0,Vr:0,Br:.8,Ir:0},{Pr:.525,Rr:1,Dr:14,Or:14,Ar:0,Vr:0,Br:0,Ir:0}];function Ai(h,t,i,s){return function(e,n){if(e==="transparent")return e;const r=zt(e),o=r[3];return`rgba(${r[0]}, ${r[1]}, ${r[2]}, ${n*o})`}(h,i+(s-i)*t)}function $i(h,t){const i=h%2600/2600;let s;for(const l of Ke)if(i>=l.Pr&&i<=l.Rr){s=l;break}A(s!==void 0,"Last price animation internal logic error");const e=(i-s.Pr)/(s.Rr-s.Pr);return{Cr:Ai(t,e,s.Ar,s.Vr),Tr:Ai(t,e,s.Br,s.Ir),ht:(n=e,r=s.Dr,o=s.Or,r+(o-r)*n)};var n,r,o}class Ge{constructor(t){this.Wt=new Je,this.ft=!0,this.zr=!0,this.Lr=performance.now(),this.Er=this.Lr-1,this.Nr=t}Fr(){this.Er=this.Lr-1,this.bt()}Wr(){if(this.bt(),this.Nr.W().lastPriceAnimation===2){const t=performance.now(),i=this.Er-t;if(i>0)return void(i<650&&(this.Er+=2600));this.Lr=t,this.Er=t+2600}}bt(){this.ft=!0}jr(){this.zr=!0}yt(){return this.Nr.W().lastPriceAnimation!==0}Hr(){switch(this.Nr.W().lastPriceAnimation){case 0:return!1;case 1:return!0;case 2:return performance.now()<=this.Er}}gt(){return this.ft?(this.Mt(),this.ft=!1,this.zr=!1):this.zr&&(this.$r(),this.zr=!1),this.Wt}Mt(){this.Wt.J(null);const t=this.Nr.$t().St(),i=t.qs(),s=this.Nr.Ct();if(i===null||s===null)return;const e=this.Nr.Ur(!0);if(e.qr||!i.Yr(e.ie))return;const n={x:t.It(e.ie),y:this.Nr.Dt().Rt(e._t,s.Ot)},r=e.O,o=this.Nr.W().lineWidth,l=$i(this.Xr(),r);this.Wt.J({kr:r,yr:o,Cr:l.Cr,Tr:l.Tr,ht:l.ht,qe:n})}$r(){const t=this.Wt.We();if(t!==null){const i=$i(this.Xr(),t.kr);t.Cr=i.Cr,t.Tr=i.Tr,t.ht=i.ht}}Xr(){return this.Hr()?performance.now()-this.Lr:2599}}function st(h,t){return Ns(Math.min(Math.max(h,12),30)*t)}function at(h,t){switch(h){case"arrowDown":case"arrowUp":return st(t,1);case"circle":return st(t,.8);case"square":return st(t,.7)}}function Vs(h){return function(t){const i=Math.ceil(t);return i%2!=0?i-1:i}(st(h,1))}function Fi(h){return Math.max(st(h,.1),3)}function As(h,t,i,s,e){const n=at("square",i),r=(n-1)/2,o=h-r,l=t-r;return s>=o&&s<=o+n&&e>=l&&e<=l+n}function Hi(h,t,i,s){const e=(at("arrowUp",s)-1)/2*i.Kr,n=(Ns(s/2)-1)/2*i.Kr;t.beginPath(),h?(t.moveTo(i.nt-e,i.st),t.lineTo(i.nt,i.st-e),t.lineTo(i.nt+e,i.st),t.lineTo(i.nt+n,i.st),t.lineTo(i.nt+n,i.st+e),t.lineTo(i.nt-n,i.st+e),t.lineTo(i.nt-n,i.st)):(t.moveTo(i.nt-e,i.st),t.lineTo(i.nt,i.st+e),t.lineTo(i.nt+e,i.st),t.lineTo(i.nt+n,i.st),t.lineTo(i.nt+n,i.st-e),t.lineTo(i.nt-n,i.st-e),t.lineTo(i.nt-n,i.st)),t.fill()}function th(h,t,i,s,e,n){return As(t,i,s,e,n)}class ih extends B{constructor(){super(...arguments),this.zt=null,this.rr=new lt,this.j=-1,this.H="",this.Zr=""}J(t){this.zt=t}hr(t,i){this.j===t&&this.H===i||(this.j=t,this.H=i,this.Zr=K(t,i),this.rr.Qe())}pr(t,i){if(this.zt===null||this.zt.tt===null)return null;for(let s=this.zt.tt.from;s=s&&o<=s+n&&l>=e-a&&l<=e+a}(h.Zt.nt,h.Zt.st,h.Zt.ji,h.Zt.Bt,t,i))||function(s,e,n){if(s.Ys===0)return!1;switch(s.Qr){case"arrowDown":case"arrowUp":return th(0,s.nt,s.st,s.Ys,e,n);case"circle":return function(r,o,l,a,u){const c=2+at("circle",l)/2,d=r-a,f=o-u;return Math.sqrt(d*d+f*f)<=c}(s.nt,s.st,s.Ys,e,n);case"square":return As(s.nt,s.st,s.Ys,e,n)}}(h,t,i)}function hh(h,t,i,s,e,n,r,o,l){const a=P(i)?i:i.ge,u=P(i)?i:i.be,c=P(i)?i:i.we,d=P(t.size)?Math.max(t.size,0):1,f=Vs(o.ee())*d,m=f/2;switch(h.Ys=f,t.position){case"inBar":return h.st=r.Rt(a,l),void(h.Zt!==void 0&&(h.Zt.st=h.st+m+n+.6*e));case"aboveBar":return h.st=r.Rt(u,l)-m-s.th,h.Zt!==void 0&&(h.Zt.st=h.st-m-.6*e,s.th+=1.2*e),void(s.th+=f+n);case"belowBar":return h.st=r.Rt(c,l)+m+s.ih,h.Zt!==void 0&&(h.Zt.st=h.st+m+n+.6*e,s.ih+=1.2*e),void(s.ih+=f+n)}t.position}class nh{constructor(t,i){this.ft=!0,this.nh=!0,this.sh=!0,this.eh=null,this.Wt=new ih,this.Nr=t,this.Hi=i,this.zt={it:[],tt:null}}bt(t){this.ft=!0,this.sh=!0,t==="data"&&(this.nh=!0)}gt(t){if(!this.Nr.yt())return null;this.ft&&this.rh();const i=this.Hi.W().layout;return this.Wt.hr(i.fontSize,i.fontFamily),this.Wt.J(this.zt),this.Wt}hh(){if(this.sh){if(this.Nr.lh().length>0){const t=this.Hi.St().ee(),i=Fi(t),s=1.5*Vs(t)+2*i;this.eh={above:s,below:s}}else this.eh=null;this.sh=!1}return this.eh}rh(){const t=this.Nr.Dt(),i=this.Hi.St(),s=this.Nr.lh();this.nh&&(this.zt.it=s.map(u=>({ot:u.time,nt:0,st:0,Ys:0,Qr:u.shape,O:u.color,Gr:u.Gr,mr:u.id,Zt:void 0})),this.nh=!1);const e=this.Hi.W().layout;this.zt.tt=null;const n=i.qs();if(n===null)return;const r=this.Nr.Ct();if(r===null||this.zt.it.length===0)return;let o=NaN;const l=Fi(i.ee()),a={th:l,ih:l};this.zt.tt=Ws(this.zt.it,n,!0);for(let u=this.zt.tt.from;u0&&(d.Zt={Jr:c.text,nt:0,st:0,ji:0,Bt:0});const f=this.Nr.ah(c.time);f!==null&&hh(d,c,f,a,e.fontSize,l,t,i,r.Ot)}this.ft=!1}}class rh extends bi{constructor(t){super(t)}Mr(){const t=this.wr;t.yt=!1;const i=this.Is.W();if(!i.priceLineVisible||!this.Is.yt())return;const s=this.Is.Ur(i.priceLineSource===0);s.qr||(t.yt=!0,t.st=s.Si,t.O=this.Is.oh(s.O),t.et=i.priceLineWidth,t.Nt=i.priceLineStyle)}}class oh extends kt{constructor(t){super(),this.jt=t}Ii(t,i,s){t.yt=!1,i.yt=!1;const e=this.jt;if(!e.yt())return;const n=e.W(),r=n.lastValueVisible,o=e._h()!=="",l=n.seriesLastValueMode===0,a=e.Ur(!1);if(a.qr)return;r&&(t.Zt=this.uh(a,r,l),t.yt=t.Zt.length!==0),(o||l)&&(i.Zt=this.dh(a,r,o,l),i.yt=i.Zt.length>0);const u=e.oh(a.O),c=Et(u);s.t=c.t,s.Si=a.Si,i.At=e.$t().Vt(a.Si/e.Dt().Bt()),t.At=u,t.O=c.i,i.O=c.i}dh(t,i,s,e){let n="";const r=this.jt._h();return s&&r.length!==0&&(n+=`${r} `),i&&e&&(n+=this.jt.Dt().fh()?t.ph:t.mh),n.trim()}uh(t,i,s){return i?s?this.jt.Dt().fh()?t.mh:t.ph:t.Zt:""}}function ji(h,t,i,s){const e=Number.isFinite(t),n=Number.isFinite(i);return e&&n?h(t,i):e||n?e?t:i:s}class k{constructor(t,i){this.bh=t,this.wh=i}gh(t){return t!==null&&this.bh===t.bh&&this.wh===t.wh}Mh(){return new k(this.bh,this.wh)}xh(){return this.bh}Sh(){return this.wh}kh(){return this.wh-this.bh}Ei(){return this.wh===this.bh||Number.isNaN(this.wh)||Number.isNaN(this.bh)}Jn(t){return t===null?this:new k(ji(Math.min,this.xh(),t.xh(),-1/0),ji(Math.max,this.Sh(),t.Sh(),1/0))}yh(t){if(!P(t)||this.wh-this.bh===0)return;const i=.5*(this.wh+this.bh);let s=this.wh-i,e=this.bh-i;s*=t,e*=t,this.wh=i+s,this.bh=i+e}Ch(t){P(t)&&(this.wh+=t,this.bh+=t)}Th(){return{minValue:this.bh,maxValue:this.wh}}static Ph(t){return t===null?null:new k(t.minValue,t.maxValue)}}class xt{constructor(t,i){this.Rh=t,this.Dh=i||null}Oh(){return this.Rh}Ah(){return this.Dh}Th(){return this.Rh===null?null:{priceRange:this.Rh.Th(),margins:this.Dh||void 0}}static Ph(t){return t===null?null:new xt(k.Ph(t.priceRange),t.margins)}}class lh extends bi{constructor(t,i){super(t),this.Vh=i}Mr(){const t=this.wr;t.yt=!1;const i=this.Vh.W();if(!this.Is.yt()||!i.lineVisible)return;const s=this.Vh.Bh();s!==null&&(t.yt=!0,t.st=s,t.O=i.color,t.et=i.lineWidth,t.Nt=i.lineStyle,t.mr=this.Vh.W().id)}}class ah extends kt{constructor(t,i){super(),this.Nr=t,this.Vh=i}Ii(t,i,s){t.yt=!1,i.yt=!1;const e=this.Vh.W(),n=e.axisLabelVisible,r=e.title!=="",o=this.Nr;if(!n||!o.yt())return;const l=this.Vh.Bh();if(l===null)return;r&&(i.Zt=e.title,i.yt=!0),i.At=o.$t().Vt(l/o.Dt().Bt()),t.Zt=this.Ih(e.price),t.yt=!0;const a=Et(e.axisLabelColor||e.color);s.t=a.t;const u=e.axisLabelTextColor||a.i;t.O=u,i.O=u,s.Si=l}Ih(t){const i=this.Nr.Ct();return i===null?"":this.Nr.Dt().Ni(t,i.Ot)}}class uh{constructor(t,i){this.Nr=t,this._n=i,this.zh=new lh(t,this),this.lr=new ah(t,this),this.Lh=new Is(this.lr,t,t.$t())}Eh(t){R(this._n,t),this.bt(),this.Nr.$t().Nh()}W(){return this._n}Fh(){return this.zh}Wh(){return this.Lh}jh(){return this.lr}bt(){this.zh.bt(),this.lr.bt()}Bh(){const t=this.Nr,i=t.Dt();if(t.$t().St().Ei()||i.Ei())return null;const s=t.Ct();return s===null?null:i.Rt(this._n.price,s.Ot)}}class ch extends mi{constructor(t){super(),this.Hi=t}$t(){return this.Hi}}const dh={Bar:(h,t,i,s)=>{var e;const n=t.upColor,r=t.downColor,o=p(h(i,s)),l=X(o.Ot[0])<=X(o.Ot[3]);return{oe:(e=o.O)!==null&&e!==void 0?e:l?n:r}},Candlestick:(h,t,i,s)=>{var e,n,r;const o=t.upColor,l=t.downColor,a=t.borderUpColor,u=t.borderDownColor,c=t.wickUpColor,d=t.wickDownColor,f=p(h(i,s)),m=X(f.Ot[0])<=X(f.Ot[3]);return{oe:(e=f.O)!==null&&e!==void 0?e:m?o:l,ze:(n=f.At)!==null&&n!==void 0?n:m?a:u,Ie:(r=f.Hh)!==null&&r!==void 0?r:m?c:d}},Custom:(h,t,i,s)=>{var e;return{oe:(e=p(h(i,s)).O)!==null&&e!==void 0?e:t.color}},Area:(h,t,i,s)=>{var e,n,r,o;const l=p(h(i,s));return{oe:(e=l.lt)!==null&&e!==void 0?e:t.lineColor,lt:(n=l.lt)!==null&&n!==void 0?n:t.lineColor,ys:(r=l.ys)!==null&&r!==void 0?r:t.topColor,Cs:(o=l.Cs)!==null&&o!==void 0?o:t.bottomColor}},Baseline:(h,t,i,s)=>{var e,n,r,o,l,a;const u=p(h(i,s));return{oe:u.Ot[3]>=t.baseValue.price?t.topLineColor:t.bottomLineColor,Ce:(e=u.Ce)!==null&&e!==void 0?e:t.topLineColor,Te:(n=u.Te)!==null&&n!==void 0?n:t.bottomLineColor,Me:(r=u.Me)!==null&&r!==void 0?r:t.topFillColor1,xe:(o=u.xe)!==null&&o!==void 0?o:t.topFillColor2,Se:(l=u.Se)!==null&&l!==void 0?l:t.bottomFillColor1,ke:(a=u.ke)!==null&&a!==void 0?a:t.bottomFillColor2}},Line:(h,t,i,s)=>{var e,n;const r=p(h(i,s));return{oe:(e=r.O)!==null&&e!==void 0?e:t.color,lt:(n=r.O)!==null&&n!==void 0?n:t.color}},Histogram:(h,t,i,s)=>{var e;return{oe:(e=p(h(i,s)).O)!==null&&e!==void 0?e:t.color}}};class fh{constructor(t){this.$h=(i,s)=>s!==void 0?s.Ot:this.Nr.Vn().Uh(i),this.Nr=t,this.qh=dh[t.Yh()]}Ws(t,i){return this.qh(this.$h,this.Nr.W(),t,i)}}var Ui;(function(h){h[h.NearestLeft=-1]="NearestLeft",h[h.None=0]="None",h[h.NearestRight=1]="NearestRight"})(Ui||(Ui={}));const V=30;class mh{constructor(){this.Xh=[],this.Kh=new Map,this.Zh=new Map}Gh(){return this.Ys()>0?this.Xh[this.Xh.length-1]:null}Jh(){return this.Ys()>0?this.Qh(0):null}An(){return this.Ys()>0?this.Qh(this.Xh.length-1):null}Ys(){return this.Xh.length}Ei(){return this.Ys()===0}Yr(t){return this.tl(t,0)!==null}Uh(t){return this.il(t)}il(t,i=0){const s=this.tl(t,i);return s===null?null:Object.assign(Object.assign({},this.nl(s)),{ie:this.Qh(s)})}Qs(){return this.Xh}sl(t,i,s){if(this.Ei())return null;let e=null;for(const n of s)e=vt(e,this.el(t,i,n));return e}J(t){this.Zh.clear(),this.Kh.clear(),this.Xh=t}Qh(t){return this.Xh[t].ie}nl(t){return this.Xh[t]}tl(t,i){const s=this.rl(t);if(s===null&&i!==0)switch(i){case-1:return this.hl(t);case 1:return this.ll(t);default:throw new TypeError("Unknown search mode")}return s}hl(t){let i=this.al(t);return i>0&&(i-=1),i!==this.Xh.length&&this.Qh(i)i.iei.ie>s)}_l(t,i,s){let e=null;for(let n=t;ne.cl&&(e.cl=r)))}return e}el(t,i,s){if(this.Ei())return null;let e=null;const n=p(this.Jh()),r=p(this.An()),o=Math.max(t,n),l=Math.min(i,r),a=Math.ceil(o/V)*V,u=Math.max(a,Math.floor(l/V)*V);{const d=this.al(o),f=this.ol(Math.min(l,a,i));e=vt(e,this._l(d,f,s))}let c=this.Kh.get(s);c===void 0&&(c=new Map,this.Kh.set(s,c));for(let d=Math.max(a+1,o);dnew Ft(o));return this.gl={vl:n,pl:r},r}Ji(){var t,i,s,e;const n=(s=(i=(t=this.yl).timeAxisViews)===null||i===void 0?void 0:i.call(t))!==null&&s!==void 0?s:[];if(((e=this.Ml)===null||e===void 0?void 0:e.vl)===n)return this.Ml.pl;const r=this.Nr.$t().St(),o=n.map(l=>new ph(l,r));return this.Ml={vl:n,pl:o},o}Tn(){var t,i,s,e;const n=(s=(i=(t=this.yl).priceAxisViews)===null||i===void 0?void 0:i.call(t))!==null&&s!==void 0?s:[];if(((e=this.xl)===null||e===void 0?void 0:e.vl)===n)return this.xl.pl;const r=this.Nr.Dt(),o=n.map(l=>new bh(l,r));return this.xl={vl:n,pl:o},o}Tl(){var t,i,s,e;const n=(s=(i=(t=this.yl).priceAxisPaneViews)===null||i===void 0?void 0:i.call(t))!==null&&s!==void 0?s:[];if(((e=this.Sl)===null||e===void 0?void 0:e.vl)===n)return this.Sl.pl;const r=n.map(o=>new Ft(o));return this.Sl={vl:n,pl:r},r}Pl(){var t,i,s,e;const n=(s=(i=(t=this.yl).timeAxisPaneViews)===null||i===void 0?void 0:i.call(t))!==null&&s!==void 0?s:[];if(((e=this.kl)===null||e===void 0?void 0:e.vl)===n)return this.kl.pl;const r=n.map(o=>new Ft(o));return this.kl={vl:n,pl:r},r}Rl(t,i){var s,e,n;return(n=(e=(s=this.yl).autoscaleInfo)===null||e===void 0?void 0:e.call(s,t,i))!==null&&n!==void 0?n:null}pr(t,i){var s,e,n;return(n=(e=(s=this.yl).hitTest)===null||e===void 0?void 0:e.call(s,t,i))!==null&&n!==void 0?n:null}}function Ht(h,t,i,s){h.forEach(e=>{t(e).forEach(n=>{n.ml()===i&&s.push(n)})})}function jt(h){return h.Cn()}function wh(h){return h.Tl()}function _h(h){return h.Pl()}class gi extends ch{constructor(t,i,s,e,n){super(t),this.zt=new mh,this.zh=new rh(this),this.Dl=[],this.Ol=new qe(this),this.Al=null,this.Vl=null,this.Bl=[],this.Il=[],this.zl=null,this.Ll=[],this._n=i,this.El=s;const r=new oh(this);this.en=[r],this.Lh=new Is(r,this,t),s!=="Area"&&s!=="Line"&&s!=="Baseline"||(this.Al=new Ge(this)),this.Nl(),this.Fl(n)}S(){this.zl!==null&&clearTimeout(this.zl)}oh(t){return this._n.priceLineColor||t}Ur(t){const i={qr:!0},s=this.Dt();if(this.$t().St().Ei()||s.Ei()||this.zt.Ei())return i;const e=this.$t().St().qs(),n=this.Ct();if(e===null||n===null)return i;let r,o;if(t){const c=this.zt.Gh();if(c===null)return i;r=c,o=c.ie}else{const c=this.zt.il(e.ui(),-1);if(c===null||(r=this.zt.Uh(c.ie),r===null))return i;o=c.ie}const l=r.Ot[3],a=this.js().Ws(o,{Ot:r}),u=s.Rt(l,n.Ot);return{qr:!1,_t:l,Zt:s.Ni(l,n.Ot),ph:s.Wl(l),mh:s.jl(l,n.Ot),O:a.oe,Si:u,ie:o}}js(){return this.Vl!==null||(this.Vl=new fh(this)),this.Vl}W(){return this._n}Eh(t){const i=t.priceScaleId;i!==void 0&&i!==this._n.priceScaleId&&this.$t().Hl(this,i),R(this._n,t),t.priceFormat!==void 0&&(this.Nl(),this.$t().$l()),this.$t().Ul(this),this.$t().ql(),this.mn.bt("options")}J(t,i){this.zt.J(t),this.Yl(),this.mn.bt("data"),this.un.bt("data"),this.Al!==null&&(i&&i.Xl?this.Al.Wr():t.length===0&&this.Al.Fr());const s=this.$t()._r(this);this.$t().Kl(s),this.$t().Ul(this),this.$t().ql(),this.$t().Nh()}Zl(t){this.Bl=t,this.Yl();const i=this.$t()._r(this);this.un.bt("data"),this.$t().Kl(i),this.$t().Ul(this),this.$t().ql(),this.$t().Nh()}Gl(){return this.Bl}lh(){return this.Il}Jl(t){const i=new uh(this,t);return this.Dl.push(i),this.$t().Ul(this),i}Ql(t){const i=this.Dl.indexOf(t);i!==-1&&this.Dl.splice(i,1),this.$t().Ul(this)}Yh(){return this.El}Ct(){const t=this.ta();return t===null?null:{Ot:t.Ot[3],ia:t.ot}}ta(){const t=this.$t().St().qs();if(t===null)return null;const i=t.Rs();return this.zt.il(i,1)}Vn(){return this.zt}ah(t){const i=this.zt.Uh(t);return i===null?null:this.El==="Bar"||this.El==="Candlestick"||this.El==="Custom"?{me:i.Ot[0],be:i.Ot[1],we:i.Ot[2],ge:i.Ot[3]}:i.Ot[3]}na(t){const i=[];Ht(this.Ll,jt,"top",i);const s=this.Al;return s!==null&&s.yt()&&(this.zl===null&&s.Hr()&&(this.zl=setTimeout(()=>{this.zl=null,this.$t().sa()},0)),s.jr(),i.push(s)),i}Cn(){const t=[];this.ea()||t.push(this.Ol),t.push(this.mn,this.zh,this.un);const i=this.Dl.map(s=>s.Fh());return t.push(...i),Ht(this.Ll,jt,"normal",t),t}ra(){return this.ha(jt,"bottom")}la(t){return this.ha(wh,t)}aa(t){return this.ha(_h,t)}oa(t,i){return this.Ll.map(s=>s.pr(t,i)).filter(s=>s!==null)}Gi(t){return[this.Lh,...this.Dl.map(i=>i.Wh())]}Tn(t,i){if(i!==this.qi&&!this.ea())return[];const s=[...this.en];for(const e of this.Dl)s.push(e.jh());return this.Ll.forEach(e=>{s.push(...e.Tn())}),s}Ji(){const t=[];return this.Ll.forEach(i=>{t.push(...i.Ji())}),t}Rl(t,i){if(this._n.autoscaleInfoProvider!==void 0){const s=this._n.autoscaleInfoProvider(()=>{const e=this._a(t,i);return e===null?null:e.Th()});return xt.Ph(s)}return this._a(t,i)}ua(){return this._n.priceFormat.minMove}ca(){return this.da}Rn(){var t;this.mn.bt(),this.un.bt();for(const i of this.en)i.bt();for(const i of this.Dl)i.bt();this.zh.bt(),this.Ol.bt(),(t=this.Al)===null||t===void 0||t.bt(),this.Ll.forEach(i=>i.Rn())}Dt(){return p(super.Dt())}kt(t){if(!((this.El==="Line"||this.El==="Area"||this.El==="Baseline")&&this._n.crosshairMarkerVisible))return null;const i=this.zt.Uh(t);return i===null?null:{_t:i.Ot[3],ht:this.fa(),At:this.va(),Pt:this.pa(),Tt:this.ma(t)}}_h(){return this._n.title}yt(){return this._n.visible}ba(t){this.Ll.push(new gh(t,this))}wa(t){this.Ll=this.Ll.filter(i=>i.Cl()!==t)}ga(){if(this.mn instanceof $t)return t=>this.mn.Ee(t)}Ma(){if(this.mn instanceof $t)return t=>this.mn.Ne(t)}ea(){return!Tt(this.Dt().xa())}_a(t,i){if(!rt(t)||!rt(i)||this.zt.Ei())return null;const s=this.El==="Line"||this.El==="Area"||this.El==="Baseline"||this.El==="Histogram"?[3]:[2,1],e=this.zt.sl(t,i,s);let n=e!==null?new k(e.ul,e.cl):null;if(this.Yh()==="Histogram"){const o=this._n.base,l=new k(o,o);n=n!==null?n.Jn(l):l}let r=this.un.hh();return this.Ll.forEach(o=>{const l=o.Rl(t,i);if(l!=null&&l.priceRange){const f=new k(l.priceRange.minValue,l.priceRange.maxValue);n=n!==null?n.Jn(f):f}var a,u,c,d;l!=null&&l.margins&&(a=r,u=l.margins,r={above:Math.max((c=a==null?void 0:a.above)!==null&&c!==void 0?c:0,u.above),below:Math.max((d=a==null?void 0:a.below)!==null&&d!==void 0?d:0,u.below)})}),new xt(n,r)}fa(){switch(this.El){case"Line":case"Area":case"Baseline":return this._n.crosshairMarkerRadius}return 0}va(){switch(this.El){case"Line":case"Area":case"Baseline":{const t=this._n.crosshairMarkerBorderColor;if(t.length!==0)return t}}return null}pa(){switch(this.El){case"Line":case"Area":case"Baseline":return this._n.crosshairMarkerBorderWidth}return 0}ma(t){switch(this.El){case"Line":case"Area":case"Baseline":{const i=this._n.crosshairMarkerBackgroundColor;if(i.length!==0)return i}}return this.js().Ws(t).oe}Nl(){switch(this._n.priceFormat.type){case"custom":this.da={format:this._n.priceFormat.formatter};break;case"volume":this.da=new Ee(this._n.priceFormat.precision);break;case"percent":this.da=new Os(this._n.priceFormat.precision);break;default:{const t=Math.pow(10,this._n.priceFormat.precision);this.da=new Nt(t,this._n.priceFormat.minMove*t)}}this.qi!==null&&this.qi.Sa()}Yl(){const t=this.$t().St();if(!t.ka()||this.zt.Ei())return void(this.Il=[]);const i=p(this.zt.Jh());this.Il=this.Bl.map((s,e)=>{const n=p(t.ya(s.time,!0)),r=nu instanceof gi).reduce((u,c)=>{if(s.ur(c)||!c.yt())return u;const d=c.Dt(),f=c.Vn();if(d.Ei()||!f.Yr(i))return u;const m=f.Uh(i);if(m===null)return u;const v=X(c.Ct());return u.concat([d.Rt(m.Ot[3],v.Ot)])},[]);if(l.length===0)return e;l.sort((u,c)=>Math.abs(u-o)-Math.abs(c-o));const a=l[0];return e=n.fn(a,r),e}}class yh extends B{constructor(){super(...arguments),this.zt=null}J(t){this.zt=t}Z({context:t,bitmapSize:i,horizontalPixelRatio:s,verticalPixelRatio:e}){if(this.zt===null)return;const n=Math.max(1,Math.floor(s));t.lineWidth=n,function(r,o){r.save(),r.lineWidth%2&&r.translate(.5,.5),o(),r.restore()}(t,()=>{const r=p(this.zt);if(r.Pa){t.strokeStyle=r.Ra,j(t,r.Da),t.beginPath();for(const o of r.Oa){const l=Math.round(o.Aa*s);t.moveTo(l,-n),t.lineTo(l,i.height+n)}t.stroke()}if(r.Va){t.strokeStyle=r.Ba,j(t,r.Ia),t.beginPath();for(const o of r.za){const l=Math.round(o.Aa*e);t.moveTo(-n,l),t.lineTo(i.width+n,l)}t.stroke()}})}}class Mh{constructor(t){this.Wt=new yh,this.ft=!0,this.Qi=t}bt(){this.ft=!0}gt(){if(this.ft){const t=this.Qi.$t().W().grid,i={Va:t.horzLines.visible,Pa:t.vertLines.visible,Ba:t.horzLines.color,Ra:t.vertLines.color,Ia:t.horzLines.style,Da:t.vertLines.style,za:this.Qi.dn().La(),Oa:(this.Qi.$t().St().La()||[]).map(s=>({Aa:s.coord}))};this.Wt.J(i),this.ft=!1}return this.Wt}}class zh{constructor(t){this.mn=new Mh(t)}Fh(){return this.mn}}const Ut={Ea:4,Na:1e-4};function q(h,t){const i=100*(h-t)/t;return t<0?-i:i}function xh(h,t){const i=q(h.xh(),t),s=q(h.Sh(),t);return new k(i,s)}function et(h,t){const i=100*(h-t)/t+100;return t<0?-i:i}function Ch(h,t){const i=et(h.xh(),t),s=et(h.Sh(),t);return new k(i,s)}function Ct(h,t){const i=Math.abs(h);if(i<1e-15)return 0;const s=Math.log10(i+t.Na)+t.Ea;return h<0?-s:s}function ht(h,t){const i=Math.abs(h);if(i<1e-15)return 0;const s=Math.pow(10,i-t.Ea)-t.Na;return h<0?-s:s}function it(h,t){if(h===null)return null;const i=Ct(h.xh(),t),s=Ct(h.Sh(),t);return new k(i,s)}function pt(h,t){if(h===null)return null;const i=ht(h.xh(),t),s=ht(h.Sh(),t);return new k(i,s)}function Zt(h){if(h===null)return Ut;const t=Math.abs(h.Sh()-h.xh());if(t>=1||t<1e-15)return Ut;const i=Math.ceil(Math.abs(Math.log10(t))),s=Ut.Ea+i;return{Ea:s,Na:1/Math.pow(10,s)}}class Yt{constructor(t,i){if(this.Fa=t,this.Wa=i,function(s){if(s<0)return!1;for(let e=s;e>1;e/=10)if(e%10!=0)return!1;return!0}(this.Fa))this.ja=[2,2.5,2];else{this.ja=[];for(let s=this.Fa;s!==1;){if(s%2==0)this.ja.push(2),s/=2;else{if(s%5!=0)throw new Error("unexpected base");this.ja.push(2,2.5),s/=5}if(this.ja.length>100)throw new Error("something wrong with base")}}}Ha(t,i,s){const e=this.Fa===0?0:1/this.Fa;let n=Math.pow(10,Math.max(0,Math.ceil(Math.log10(t-i)))),r=0,o=this.Wa[0];for(;;){const c=mt(n,e,1e-14)&&n>e+1e-14,d=mt(n,s*o,1e-14),f=mt(n,1,1e-14);if(!(c&&d&&f))break;n/=o,o=this.Wa[++r%this.Wa.length]}if(n<=e+1e-14&&(n=e),n=Math.max(1,n),this.ja.length>0&&(l=n,a=1,u=1e-14,Math.abs(l-a)e+1e-14;)n/=o,o=this.ja[++r%this.ja.length];var l,a,u;return n}}class Zi{constructor(t,i,s,e){this.$a=[],this.zi=t,this.Fa=i,this.Ua=s,this.qa=e}Ha(t,i){if(t=u?1:-1;let m=null,v=0;for(let b=a-d;b>u;b-=c){const g=this.qa(b,i,!0);m!==null&&Math.abs(g-m)l||(vp(t.Xi())-p(i.Xi()))}var Yi;(function(h){h[h.Normal=0]="Normal",h[h.Logarithmic=1]="Logarithmic",h[h.Percentage=2]="Percentage",h[h.IndexedTo100=3]="IndexedTo100"})(Yi||(Yi={}));const Qi=new Os,Xi=new Nt(100,1);class Eh{constructor(t,i,s,e){this.Qa=0,this.io=null,this.Rh=null,this.no=null,this.so={eo:!1,ro:null},this.ho=0,this.lo=0,this.ao=new M,this.oo=new M,this._o=[],this.uo=null,this.co=null,this.do=null,this.fo=null,this.da=Xi,this.vo=Zt(null),this.po=t,this._n=i,this.mo=s,this.bo=e,this.wo=new Zi(this,100,this.Mo.bind(this),this.xo.bind(this))}xa(){return this.po}W(){return this._n}Eh(t){if(R(this._n,t),this.Sa(),t.mode!==void 0&&this.So({Sr:t.mode}),t.scaleMargins!==void 0){const i=O(t.scaleMargins.top),s=O(t.scaleMargins.bottom);if(i<0||i>1)throw new Error(`Invalid top margin - expect value between 0 and 1, given=${i}`);if(s<0||s>1)throw new Error(`Invalid bottom margin - expect value between 0 and 1, given=${s}`);if(i+s>1)throw new Error(`Invalid margins - sum of margins must be less than 1, given=${i+s}`);this.ko(),this.co=null}}yo(){return this._n.autoScale}Ja(){return this._n.mode===1}fh(){return this._n.mode===2}Co(){return this._n.mode===3}Sr(){return{Nn:this._n.autoScale,To:this._n.invertScale,Sr:this._n.mode}}So(t){const i=this.Sr();let s=null;t.Nn!==void 0&&(this._n.autoScale=t.Nn),t.Sr!==void 0&&(this._n.mode=t.Sr,t.Sr!==2&&t.Sr!==3||(this._n.autoScale=!0),this.so.eo=!1),i.Sr===1&&t.Sr!==i.Sr&&(function(n,r){if(n===null)return!1;const o=ht(n.xh(),r),l=ht(n.Sh(),r);return isFinite(o)&&isFinite(l)}(this.Rh,this.vo)?(s=pt(this.Rh,this.vo),s!==null&&this.Po(s)):this._n.autoScale=!0),t.Sr===1&&t.Sr!==i.Sr&&(s=it(this.Rh,this.vo),s!==null&&this.Po(s));const e=i.Sr!==this._n.mode;e&&(i.Sr===2||this.fh())&&this.Sa(),e&&(i.Sr===3||this.Co())&&this.Sa(),t.To!==void 0&&i.To!==t.To&&(this._n.invertScale=t.To,this.Ro()),this.oo.m(i,this.Sr())}Do(){return this.oo}P(){return this.mo.fontSize}Bt(){return this.Qa}Oo(t){this.Qa!==t&&(this.Qa=t,this.ko(),this.co=null)}Ao(){if(this.io)return this.io;const t=this.Bt()-this.Vo()-this.Bo();return this.io=t,t}Oh(){return this.Io(),this.Rh}Po(t,i){const s=this.Rh;(i||s===null&&t!==null||s!==null&&!s.gh(t))&&(this.co=null,this.Rh=t)}Ei(){return this.Io(),this.Qa===0||!this.Rh||this.Rh.Ei()}zo(t){return this.To()?t:this.Bt()-1-t}Rt(t,i){return this.fh()?t=q(t,i):this.Co()&&(t=et(t,i)),this.xo(t,i)}Gs(t,i,s){this.Io();const e=this.Bo(),n=p(this.Oh()),r=n.xh(),o=n.Sh(),l=this.Ao()-1,a=this.To(),u=l/(o-r),c=s===void 0?0:s.from,d=s===void 0?t.length:s.to,f=this.Lo();for(let m=c;mt.Rn())}Sa(){this.co=null;const t=this.Jo();let i=100;t!==null&&(i=Math.round(1/t.ua())),this.da=Xi,this.fh()?(this.da=Qi,i=100):this.Co()?(this.da=new Nt(100,1),i=100):t!==null&&(this.da=t.ca()),this.wo=new Zi(this,i,this.Mo.bind(this),this.xo.bind(this)),this.wo.Xa()}Wo(){this.uo=null}Jo(){return this._o[0]||null}Vo(){return this.To()?this._n.scaleMargins.bottom*this.Bt()+this.lo:this._n.scaleMargins.top*this.Bt()+this.ho}Bo(){return this.To()?this._n.scaleMargins.top*this.Bt()+this.ho:this._n.scaleMargins.bottom*this.Bt()+this.lo}Io(){this.so.eo||(this.so.eo=!0,this.i_())}ko(){this.io=null}xo(t,i){if(this.Io(),this.Ei())return 0;t=this.Ja()&&t?Ct(t,this.vo):t;const s=p(this.Oh()),e=this.Bo()+(this.Ao()-1)*(t-s.xh())/s.kh();return this.zo(e)}Mo(t,i){if(this.Io(),this.Ei())return 0;const s=this.zo(t),e=p(this.Oh()),n=e.xh()+e.kh()*((s-this.Bo())/(this.Ao()-1));return this.Ja()?ht(n,this.vo):n}Ro(){this.co=null,this.wo.Xa()}i_(){const t=this.so.ro;if(t===null)return;let i=null;const s=this.Qo();let e=0,n=0;for(const l of s){if(!l.yt())continue;const a=l.Ct();if(a===null)continue;const u=l.Rl(t.Rs(),t.ui());let c=u&&u.Oh();if(c!==null){switch(this._n.mode){case 1:c=it(c,this.vo);break;case 2:c=xh(c,a.Ot);break;case 3:c=Ch(c,a.Ot)}if(i=i===null?c:i.Jn(p(c)),u!==null){const d=u.Ah();d!==null&&(e=Math.max(e,d.above),n=Math.max(e,d.below))}}}if(e===this.ho&&n===this.lo||(this.ho=e,this.lo=n,this.co=null,this.ko()),i!==null){if(i.xh()===i.Sh()){const l=this.Jo(),a=5*(l===null||this.fh()||this.Co()?1:l.ua());this.Ja()&&(i=pt(i,this.vo)),i=new k(i.xh()-a,i.Sh()+a),this.Ja()&&(i=it(i,this.vo))}if(this.Ja()){const l=pt(i,this.vo),a=Zt(l);if(r=a,o=this.vo,r.Ea!==o.Ea||r.Na!==o.Na){const u=this.no!==null?pt(this.no,this.vo):null;this.vo=a,i=it(l,a),u!==null&&(this.no=it(u,a))}}this.Po(i)}else this.Rh===null&&(this.Po(new k(-.5,.5)),this.vo=Zt(null));var r,o;this.so.eo=!0}Lo(){return this.fh()?q:this.Co()?et:this.Ja()?t=>Ct(t,this.vo):null}n_(t,i,s){return i===void 0?(s===void 0&&(s=this.ca()),s.format(t)):i(t)}Ih(t,i){return this.n_(t,this.bo.priceFormatter,i)}Go(t,i){return this.n_(t,this.bo.percentageFormatter,i)}}class Oh{constructor(t,i){this._o=[],this.s_=new Map,this.Qa=0,this.e_=0,this.r_=1e3,this.uo=null,this.h_=new M,this.wl=t,this.Hi=i,this.l_=new zh(this);const s=i.W();this.a_=this.o_("left",s.leftPriceScale),this.__=this.o_("right",s.rightPriceScale),this.a_.Do().l(this.u_.bind(this,this.a_),this),this.__.Do().l(this.u_.bind(this,this.__),this),this.c_(s)}c_(t){if(t.leftPriceScale&&this.a_.Eh(t.leftPriceScale),t.rightPriceScale&&this.__.Eh(t.rightPriceScale),t.localization&&(this.a_.Sa(),this.__.Sa()),t.overlayPriceScales){const i=Array.from(this.s_.values());for(const s of i){const e=p(s[0].Dt());e.Eh(t.overlayPriceScales),t.localization&&e.Sa()}}}d_(t){switch(t){case"left":return this.a_;case"right":return this.__}return this.s_.has(t)?O(this.s_.get(t))[0].Dt():null}S(){this.$t().f_().p(this),this.a_.Do().p(this),this.__.Do().p(this),this._o.forEach(t=>{t.S&&t.S()}),this.h_.m()}v_(){return this.r_}p_(t){this.r_=t}$t(){return this.Hi}ji(){return this.e_}Bt(){return this.Qa}m_(t){this.e_=t,this.b_()}Oo(t){this.Qa=t,this.a_.Oo(t),this.__.Oo(t),this._o.forEach(i=>{if(this.ur(i)){const s=i.Dt();s!==null&&s.Oo(t)}}),this.b_()}Ta(){return this._o}ur(t){const i=t.Dt();return i===null||this.a_!==i&&this.__!==i}Fo(t,i,s){const e=s!==void 0?s:this.g_().w_+1;this.M_(t,i,e)}jo(t){const i=this._o.indexOf(t);A(i!==-1,"removeDataSource: invalid data source"),this._o.splice(i,1);const s=p(t.Dt()).xa();if(this.s_.has(s)){const n=O(this.s_.get(s)),r=n.indexOf(t);r!==-1&&(n.splice(r,1),n.length===0&&this.s_.delete(s))}const e=t.Dt();e&&e.Ta().indexOf(t)>=0&&e.jo(t),e!==null&&(e.Wo(),this.x_(e)),this.uo=null}dr(t){return t===this.a_?"left":t===this.__?"right":"overlay"}S_(){return this.a_}k_(){return this.__}y_(t,i){t.Uo(i)}C_(t,i){t.qo(i),this.b_()}T_(t){t.Yo()}P_(t,i){t.Xo(i)}R_(t,i){t.Ko(i),this.b_()}D_(t){t.Zo()}b_(){this._o.forEach(t=>{t.Rn()})}dn(){let t=null;return this.Hi.W().rightPriceScale.visible&&this.__.Ta().length!==0?t=this.__:this.Hi.W().leftPriceScale.visible&&this.a_.Ta().length!==0?t=this.a_:this._o.length!==0&&(t=this._o[0].Dt()),t===null&&(t=this.__),t}cr(){let t=null;return this.Hi.W().rightPriceScale.visible?t=this.__:this.Hi.W().leftPriceScale.visible&&(t=this.a_),t}x_(t){t!==null&&t.yo()&&this.O_(t)}A_(t){const i=this.wl.qs();t.So({Nn:!0}),i!==null&&t.t_(i),this.b_()}V_(){this.O_(this.a_),this.O_(this.__)}B_(){this.x_(this.a_),this.x_(this.__),this._o.forEach(t=>{this.ur(t)&&this.x_(t.Dt())}),this.b_(),this.Hi.Nh()}No(){return this.uo===null&&(this.uo=Fs(this._o)),this.uo}I_(){return this.h_}z_(){return this.l_}O_(t){const i=t.Qo();if(i&&i.length>0&&!this.wl.Ei()){const s=this.wl.qs();s!==null&&t.t_(s)}t.Rn()}g_(){const t=this.No();if(t.length===0)return{L_:0,w_:0};let i=0,s=0;for(let e=0;es&&(s=n))}return{L_:i,w_:s}}M_(t,i,s){let e=this.d_(i);if(e===null&&(e=this.o_(i,this.Hi.W().overlayPriceScales)),this._o.push(t),!Tt(i)){const n=this.s_.get(i)||[];n.push(t),this.s_.set(i,n)}e.Fo(t),t.Zi(e),t.Ki(s),this.x_(e),this.uo=null}u_(t,i,s){i.Sr!==s.Sr&&this.O_(t)}o_(t,i){const s=Object.assign({visible:!0,autoScale:!0},W(i)),e=new Eh(t,s,this.Hi.W().layout,this.Hi.W().localization);return e.Oo(this.Bt()),e}}class kh{constructor(t,i,s=50){this.Ye=0,this.Xe=1,this.Ke=1,this.Ge=new Map,this.Ze=new Map,this.E_=t,this.N_=i,this.Je=s}F_(t){const i=t.time,s=this.N_.cacheKey(i),e=this.Ge.get(s);if(e!==void 0)return e.W_;if(this.Ye===this.Je){const r=this.Ze.get(this.Ke);this.Ze.delete(this.Ke),this.Ge.delete(O(r)),this.Ke++,this.Ye--}const n=this.E_(t);return this.Ge.set(s,{W_:n,nr:this.Xe}),this.Ze.set(this.Xe,s),this.Ye++,this.Xe++,n}}class nt{constructor(t,i){A(t<=i,"right should be >= left"),this.j_=t,this.H_=i}Rs(){return this.j_}ui(){return this.H_}U_(){return this.H_-this.j_+1}Yr(t){return this.j_<=t&&t<=this.H_}gh(t){return this.j_===t.Rs()&&this.H_===t.ui()}}function qi(h,t){return h===null||t===null?h===t:h.gh(t)}class Th{constructor(){this.q_=new Map,this.Ge=null,this.Y_=!1}X_(t){this.Y_=t,this.Ge=null}K_(t,i){this.Z_(i),this.Ge=null;for(let s=i;s{t<=s[0].index?i.push(e):s.splice(ct(s,t,n=>n.indexn-e)){if(!this.q_.get(s))continue;const e=i;i=[];const n=e.length;let r=0;const o=O(this.q_.get(s)),l=o.length;let a=1/0,u=-1/0;for(let c=0;c=t&&f-u>=t)i.push(d),u=f;else if(this.Y_)return e}for(;rt.weight?h:t}class Rh{constructor(t,i,s,e){this.e_=0,this.eu=null,this.ru=[],this.fo=null,this.do=null,this.hu=new Th,this.lu=new Map,this.au=J.su(),this.ou=!0,this._u=new M,this.uu=new M,this.cu=new M,this.du=null,this.fu=null,this.vu=[],this._n=i,this.bo=s,this.pu=i.rightOffset,this.mu=i.barSpacing,this.Hi=t,this.N_=e,this.bu(),this.hu.X_(i.uniformDistribution)}W(){return this._n}wu(t){R(this.bo,t),this.gu(),this.bu()}Eh(t,i){var s;R(this._n,t),this._n.fixLeftEdge&&this.Mu(),this._n.fixRightEdge&&this.xu(),t.barSpacing!==void 0&&this.Hi.Kn(t.barSpacing),t.rightOffset!==void 0&&this.Hi.Zn(t.rightOffset),t.minBarSpacing!==void 0&&this.Hi.Kn((s=t.barSpacing)!==null&&s!==void 0?s:this.mu),this.gu(),this.bu(),this.cu.m()}vn(t){var i,s;return(s=(i=this.ru[t])===null||i===void 0?void 0:i.time)!==null&&s!==void 0?s:null}$i(t){var i;return(i=this.ru[t])!==null&&i!==void 0?i:null}ya(t,i){if(this.ru.length<1)return null;if(this.N_.key(t)>this.N_.key(this.ru[this.ru.length-1].time))return i?this.ru.length-1:null;const s=ct(this.ru,this.N_.key(t),(e,n)=>this.N_.key(e.time)0}qs(){return this.Su(),this.au.iu()}ku(){return this.Su(),this.au.nu()}yu(){const t=this.qs();if(t===null)return null;const i={from:t.Rs(),to:t.ui()};return this.Cu(i)}Cu(t){const i=Math.round(t.from),s=Math.round(t.to),e=p(this.Tu()),n=p(this.Pu());return{from:p(this.$i(Math.max(e,i))),to:p(this.$i(Math.min(n,s)))}}Ru(t){return{from:p(this.ya(t.from,!0)),to:p(this.ya(t.to,!0))}}ji(){return this.e_}m_(t){if(!isFinite(t)||t<=0||this.e_===t)return;const i=this.ku(),s=this.e_;if(this.e_=t,this.ou=!0,this._n.lockVisibleTimeRangeOnResize&&s!==0){const e=this.mu*t/s;this.mu=e}if(this._n.fixLeftEdge&&i!==null&&i.Rs()<=0){const e=s-t;this.pu-=Math.round(e/this.mu)+1,this.ou=!0}this.Du(),this.Ou()}It(t){if(this.Ei()||!rt(t))return 0;const i=this.Au()+this.pu-t;return this.e_-(i+.5)*this.mu-1}Zs(t,i){const s=this.Au(),e=i===void 0?0:i.from,n=i===void 0?t.length:i.to;for(let r=e;ri/2&&!u?v.needAlignCoordinate=!1:v.needAlignCoordinate=c&&m.index<=l||d&&m.index>=a,f++}return this.vu.length=f,this.fu=this.vu,this.vu}Fu(){this.ou=!0,this.Kn(this._n.barSpacing),this.Zn(this._n.rightOffset)}Wu(t){this.ou=!0,this.eu=t,this.Ou(),this.Mu()}ju(t,i){const s=this.Bu(t),e=this.ee(),n=e+i*(e/10);this.Kn(n),this._n.rightBarStaysOnScroll||this.Zn(this.Lu()+(s-this.Bu(t)))}Uo(t){this.fo&&this.Zo(),this.do===null&&this.du===null&&(this.Ei()||(this.do=t,this.Hu()))}qo(t){if(this.du===null)return;const i=ri(this.e_-t,0,this.e_),s=ri(this.e_-p(this.do),0,this.e_);i!==0&&s!==0&&this.Kn(this.du.ee*i/s)}Yo(){this.do!==null&&(this.do=null,this.$u())}Xo(t){this.fo===null&&this.du===null&&(this.Ei()||(this.fo=t,this.Hu()))}Ko(t){if(this.fo===null)return;const i=(this.fo-t)/this.ee();this.pu=p(this.du).Lu+i,this.ou=!0,this.Ou()}Zo(){this.fo!==null&&(this.fo=null,this.$u())}Uu(){this.qu(this._n.rightOffset)}qu(t,i=400){if(!isFinite(t))throw new RangeError("offset is required and must be finite number");if(!isFinite(i)||i<=0)throw new RangeError("animationDuration (optional) must be finite positive number");const s=this.pu,e=performance.now();this.Hi.qn({Yu:n=>(n-e)/i>=1,Xu:n=>{const r=(n-e)/i;return r>=1?t:s+(t-s)*r}})}bt(t,i){this.ou=!0,this.ru=t,this.hu.K_(t,i),this.Ou()}Ku(){return this._u}Zu(){return this.uu}Gu(){return this.cu}Au(){return this.eu||0}Ju(t){const i=t.U_();this.zu(this.e_/i),this.pu=t.ui()-this.Au(),this.Ou(),this.ou=!0,this.Hi.Iu(),this.Hi.Nh()}Qu(){const t=this.Tu(),i=this.Pu();t!==null&&i!==null&&this.Ju(new nt(t,i+this._n.rightOffset))}tc(t){const i=new nt(t.from,t.to);this.Ju(i)}Ui(t){return this.bo.timeFormatter!==void 0?this.bo.timeFormatter(t.originalTime):this.N_.formatHorzItem(t.time)}Eu(){const{handleScroll:t,handleScale:i}=this.Hi.W();return!(t.horzTouchDrag||t.mouseWheel||t.pressedMouseMove||t.vertTouchDrag||i.axisDoubleClickReset.time||i.axisPressedMouseMove.time||i.mouseWheel||i.pinch)}Tu(){return this.ru.length===0?null:0}Pu(){return this.ru.length===0?null:this.ru.length-1}ic(t){return(this.e_-1-t)/this.mu}Bu(t){const i=this.ic(t),s=this.Au()+this.pu-i;return Math.round(1e6*s)/1e6}zu(t){const i=this.mu;this.mu=t,this.Du(),i!==this.mu&&(this.ou=!0,this.nc())}Su(){if(!this.ou)return;if(this.ou=!1,this.Ei())return void this.sc(J.su());const t=this.Au(),i=this.e_/this.mu,s=this.pu+t,e=new nt(s-i+1,s);this.sc(new J(e))}Du(){const t=this.ec();if(this.mui&&(this.mu=i,this.ou=!0)}}ec(){return this._n.fixLeftEdge&&this._n.fixRightEdge&&this.ru.length!==0?this.e_/this.ru.length:this._n.minBarSpacing}Ou(){const t=this.rc();this.pu>t&&(this.pu=t,this.ou=!0);const i=this.hc();i!==null&&this.puthis.lc(s),this.N_),this.lu.set(t.weight,i)),i.F_(t)}lc(t){return this.N_.formatTickmark(t,this.bo)}sc(t){const i=this.au;this.au=t,qi(i.iu(),this.au.iu())||this._u.m(),qi(i.nu(),this.au.nu())||this.uu.m(),this.nc()}nc(){this.fu=null}gu(){this.nc(),this.lu.clear()}bu(){this.N_.updateFormatter(this.bo)}Mu(){if(!this._n.fixLeftEdge)return;const t=this.Tu();if(t===null)return;const i=this.qs();if(i===null)return;const s=i.Rs()-t;if(s<0){const e=this.pu-s-1;this.Zn(e)}this.Du()}xu(){this.Ou(),this.Du()}}class Bh{K(t,i,s){t.useMediaCoordinateSpace(e=>this.Z(e,i,s))}fl(t,i,s){t.useMediaCoordinateSpace(e=>this.ac(e,i,s))}ac(t,i,s){}}class Lh extends Bh{constructor(t){super(),this.oc=new Map,this.zt=t}Z(t){}ac(t){if(!this.zt.yt)return;const{context:i,mediaSize:s}=t;let e=0;for(const r of this.zt._c){if(r.Zt.length===0)continue;i.font=r.R;const o=this.uc(i,r.Zt);o>s.width?r.ju=s.width/o:r.ju=1,e+=r.cc*r.ju}let n=0;switch(this.zt.dc){case"top":n=0;break;case"center":n=Math.max((s.height-e)/2,0);break;case"bottom":n=Math.max(s.height-e,0)}i.fillStyle=this.zt.O;for(const r of this.zt._c){i.save();let o=0;switch(this.zt.fc){case"left":i.textAlign="left",o=r.cc/2;break;case"center":i.textAlign="center",o=s.width/2;break;case"right":i.textAlign="right",o=s.width-1-r.cc/2}i.translate(o,n),i.textBaseline="top",i.font=r.R,i.scale(r.ju,r.ju),i.fillText(r.Zt,0,r.vc),i.restore(),n+=r.cc*r.ju}}uc(t,i){const s=this.mc(t.font);let e=s.get(i);return e===void 0&&(e=t.measureText(i).width,s.set(i,e)),e}mc(t){let i=this.oc.get(t);return i===void 0&&(i=new Map,this.oc.set(t,i)),i}}class Ph{constructor(t){this.ft=!0,this.Ft={yt:!1,O:"",_c:[],dc:"center",fc:"center"},this.Wt=new Lh(this.Ft),this.jt=t}bt(){this.ft=!0}gt(){return this.ft&&(this.Mt(),this.ft=!1),this.Wt}Mt(){const t=this.jt.W(),i=this.Ft;i.yt=t.visible,i.yt&&(i.O=t.color,i.fc=t.horzAlign,i.dc=t.vertAlign,i._c=[{Zt:t.text,R:K(t.fontSize,t.fontFamily,t.fontStyle),cc:1.2*t.fontSize,vc:0,ju:0}])}}class Wh extends mi{constructor(t,i){super(),this._n=i,this.mn=new Ph(this)}Tn(){return[]}Cn(){return[this.mn]}W(){return this._n}Rn(){this.mn.bt()}}var Ji,Ki,Gi,ts,is;(function(h){h[h.OnTouchEnd=0]="OnTouchEnd",h[h.OnNextTap=1]="OnNextTap"})(Ji||(Ji={}));class Dh{constructor(t,i,s){this.bc=[],this.wc=[],this.e_=0,this.gc=null,this.Mc=new M,this.xc=new M,this.Sc=null,this.kc=t,this._n=i,this.N_=s,this.yc=new ve(this),this.wl=new Rh(this,i.timeScale,this._n.localization,s),this.vt=new Ce(this,i.crosshair),this.Cc=new Sh(i.crosshair),this.Tc=new Wh(this,i.watermark),this.Pc(),this.bc[0].p_(2e3),this.Rc=this.Dc(0),this.Oc=this.Dc(1)}$l(){this.Ac(x.ns())}Nh(){this.Ac(x.ts())}sa(){this.Ac(new x(1))}Ul(t){const i=this.Vc(t);this.Ac(i)}Bc(){return this.gc}Ic(t){const i=this.gc;this.gc=t,i!==null&&this.Ul(i.zc),t!==null&&this.Ul(t.zc)}W(){return this._n}Eh(t){R(this._n,t),this.bc.forEach(i=>i.c_(t)),t.timeScale!==void 0&&this.wl.Eh(t.timeScale),t.localization!==void 0&&this.wl.wu(t.localization),(t.leftPriceScale||t.rightPriceScale)&&this.Mc.m(),this.Rc=this.Dc(0),this.Oc=this.Dc(1),this.$l()}Lc(t,i){if(t==="left")return void this.Eh({leftPriceScale:i});if(t==="right")return void this.Eh({rightPriceScale:i});const s=this.Ec(t);s!==null&&(s.Dt.Eh(i),this.Mc.m())}Ec(t){for(const i of this.bc){const s=i.d_(t);if(s!==null)return{Ht:i,Dt:s}}return null}St(){return this.wl}Nc(){return this.bc}Fc(){return this.Tc}Wc(){return this.vt}jc(){return this.xc}Hc(t,i){t.Oo(i),this.Iu()}m_(t){this.e_=t,this.wl.m_(this.e_),this.bc.forEach(i=>i.m_(t)),this.Iu()}Pc(t){const i=new Oh(this.wl,this);t!==void 0?this.bc.splice(t,0,i):this.bc.push(i);const s=t===void 0?this.bc.length-1:t,e=x.ns();return e.Ln(s,{En:0,Nn:!0}),this.Ac(e),i}y_(t,i,s){t.y_(i,s)}C_(t,i,s){t.C_(i,s),this.ql(),this.Ac(this.$c(t,2))}T_(t,i){t.T_(i),this.Ac(this.$c(t,2))}P_(t,i,s){i.yo()||t.P_(i,s)}R_(t,i,s){i.yo()||(t.R_(i,s),this.ql(),this.Ac(this.$c(t,2)))}D_(t,i){i.yo()||(t.D_(i),this.Ac(this.$c(t,2)))}A_(t,i){t.A_(i),this.Ac(this.$c(t,2))}Uc(t){this.wl.Uo(t)}qc(t,i){const s=this.St();if(s.Ei()||i===0)return;const e=s.ji();t=Math.max(1,Math.min(t,e)),s.ju(t,i),this.Iu()}Yc(t){this.Xc(0),this.Kc(t),this.Zc()}Gc(t){this.wl.qo(t),this.Iu()}Jc(){this.wl.Yo(),this.Nh()}Xc(t){this.wl.Xo(t)}Kc(t){this.wl.Ko(t),this.Iu()}Zc(){this.wl.Zo(),this.Nh()}wt(){return this.wc}Qc(t,i,s,e,n){this.vt.bn(t,i);let r=NaN,o=this.wl.Vu(t);const l=this.wl.qs();l!==null&&(o=Math.min(Math.max(l.Rs(),o),l.ui()));const a=e.dn(),u=a.Ct();u!==null&&(r=a.fn(i,u)),r=this.Cc.Ca(r,o,e),this.vt.xn(o,r,e),this.sa(),n||this.xc.m(this.vt.xt(),{x:t,y:i},s)}td(t,i,s){const e=s.dn(),n=e.Ct(),r=e.Rt(t,p(n)),o=this.wl.ya(i,!0),l=this.wl.It(p(o));this.Qc(l,r,null,s,!0)}nd(t){this.Wc().kn(),this.sa(),t||this.xc.m(null,null,null)}ql(){const t=this.vt.Ht();if(t!==null){const i=this.vt.gn(),s=this.vt.Mn();this.Qc(i,s,null,t)}this.vt.Rn()}sd(t,i,s){const e=this.wl.vn(0);i!==void 0&&s!==void 0&&this.wl.bt(i,s);const n=this.wl.vn(0),r=this.wl.Au(),o=this.wl.qs();if(o!==null&&e!==null&&n!==null){const l=o.Yr(r),a=this.N_.key(e)>this.N_.key(n),u=t!==null&&t>r&&!a,c=this.wl.W().allowShiftVisibleRangeOnWhitespaceReplacement,d=l&&(s!==void 0||c)&&this.wl.W().shiftVisibleRangeOnNewBar;if(u&&!d){const f=t-r;this.wl.Zn(this.wl.Lu()-f)}}this.wl.Wu(t)}Kl(t){t!==null&&t.B_()}_r(t){const i=this.bc.find(s=>s.No().includes(t));return i===void 0?null:i}Iu(){this.Tc.Rn(),this.bc.forEach(t=>t.B_()),this.ql()}S(){this.bc.forEach(t=>t.S()),this.bc.length=0,this._n.localization.priceFormatter=void 0,this._n.localization.percentageFormatter=void 0,this._n.localization.timeFormatter=void 0}ed(){return this.yc}vr(){return this.yc.W()}f_(){return this.Mc}rd(t,i,s){const e=this.bc[0],n=this.hd(i,t,e,s);return this.wc.push(n),this.wc.length===1?this.$l():this.Nh(),n}ld(t){const i=this._r(t),s=this.wc.indexOf(t);A(s!==-1,"Series not found"),this.wc.splice(s,1),p(i).jo(t),t.S&&t.S()}Hl(t,i){const s=p(this._r(t));s.jo(t);const e=this.Ec(i);if(e===null){const n=t.Xi();s.Fo(t,i,n)}else{const n=e.Ht===s?t.Xi():void 0;e.Ht.Fo(t,i,n)}}Qu(){const t=x.ts();t.jn(),this.Ac(t)}ad(t){const i=x.ts();i.Un(t),this.Ac(i)}Xn(){const t=x.ts();t.Xn(),this.Ac(t)}Kn(t){const i=x.ts();i.Kn(t),this.Ac(i)}Zn(t){const i=x.ts();i.Zn(t),this.Ac(i)}qn(t){const i=x.ts();i.qn(t),this.Ac(i)}Hn(){const t=x.ts();t.Hn(),this.Ac(t)}od(){return this._n.rightPriceScale.visible?"right":"left"}_d(){return this.Oc}q(){return this.Rc}Vt(t){const i=this.Oc,s=this.Rc;if(i===s)return i;if(t=Math.max(0,Math.min(100,Math.round(100*t))),this.Sc===null||this.Sc.ys!==s||this.Sc.Cs!==i)this.Sc={ys:s,Cs:i,ud:new Map};else{const n=this.Sc.ud.get(t);if(n!==void 0)return n}const e=function(n,r,o){const[l,a,u,c]=zt(n),[d,f,m,v]=zt(r),b=[N(l+o*(d-l)),N(a+o*(f-a)),N(u+o*(m-u)),xs(c+o*(v-c))];return`rgba(${b[0]}, ${b[1]}, ${b[2]}, ${b[3]})`}(s,i,t/100);return this.Sc.ud.set(t,e),e}$c(t,i){const s=new x(i);if(t!==null){const e=this.bc.indexOf(t);s.Ln(e,{En:i})}return s}Vc(t,i){return i===void 0&&(i=2),this.$c(this._r(t),i)}Ac(t){this.kc&&this.kc(t),this.bc.forEach(i=>i.z_().Fh().bt())}hd(t,i,s,e){const n=new gi(this,t,i,s,e),r=t.priceScaleId!==void 0?t.priceScaleId:this.od();return s.Fo(n,r),Tt(r)||n.Eh(t),n}Dc(t){const i=this._n.layout;return i.background.type==="gradient"?t===0?i.background.topColor:i.background.bottomColor:i.background.color}}function oi(h){return!P(h)&&!ut(h)}function Hs(h){return P(h)}(function(h){h[h.Disabled=0]="Disabled",h[h.Continuous=1]="Continuous",h[h.OnDataUpdate=2]="OnDataUpdate"})(Ki||(Ki={})),function(h){h[h.LastBar=0]="LastBar",h[h.LastVisible=1]="LastVisible"}(Gi||(Gi={})),function(h){h.Solid="solid",h.VerticalGradient="gradient"}(ts||(ts={})),function(h){h[h.Year=0]="Year",h[h.Month=1]="Month",h[h.DayOfMonth=2]="DayOfMonth",h[h.Time=3]="Time",h[h.TimeWithSeconds=4]="TimeWithSeconds"}(is||(is={}));const ss=h=>h.getUTCFullYear();function Ih(h,t,i){return t.replace(/yyyy/g,(s=>D(ss(s),4))(h)).replace(/yy/g,(s=>D(ss(s)%100,2))(h)).replace(/MMMM/g,((s,e)=>new Date(s.getUTCFullYear(),s.getUTCMonth(),1).toLocaleString(e,{month:"long"}))(h,i)).replace(/MMM/g,((s,e)=>new Date(s.getUTCFullYear(),s.getUTCMonth(),1).toLocaleString(e,{month:"short"}))(h,i)).replace(/MM/g,(s=>D((e=>e.getUTCMonth()+1)(s),2))(h)).replace(/dd/g,(s=>D((e=>e.getUTCDate())(s),2))(h))}class js{constructor(t="yyyy-MM-dd",i="default"){this.dd=t,this.fd=i}F_(t){return Ih(t,this.dd,this.fd)}}class Vh{constructor(t){this.vd=t||"%h:%m:%s"}F_(t){return this.vd.replace("%h",D(t.getUTCHours(),2)).replace("%m",D(t.getUTCMinutes(),2)).replace("%s",D(t.getUTCSeconds(),2))}}const Ah={pd:"yyyy-MM-dd",md:"%h:%m:%s",bd:" ",wd:"default"};class $h{constructor(t={}){const i=Object.assign(Object.assign({},Ah),t);this.gd=new js(i.pd,i.wd),this.Md=new Vh(i.md),this.xd=i.bd}F_(t){return`${this.gd.F_(t)}${this.xd}${this.Md.F_(t)}`}}function bt(h){return 60*h*60*1e3}function Qt(h){return 60*h*1e3}const gt=[{Sd:(es=1,1e3*es),kd:10},{Sd:Qt(1),kd:20},{Sd:Qt(5),kd:21},{Sd:Qt(30),kd:22},{Sd:bt(1),kd:30},{Sd:bt(3),kd:31},{Sd:bt(6),kd:32},{Sd:bt(12),kd:33}];var es;function hs(h,t){if(h.getUTCFullYear()!==t.getUTCFullYear())return 70;if(h.getUTCMonth()!==t.getUTCMonth())return 60;if(h.getUTCDate()!==t.getUTCDate())return 50;for(let i=gt.length-1;i>=0;--i)if(Math.floor(t.getTime()/gt[i].Sd)!==Math.floor(h.getTime()/gt[i].Sd))return gt[i].kd;return 0}function Xt(h){let t=h;if(ut(h)&&(t=wi(h)),!oi(t))throw new Error("time must be of type BusinessDay");const i=new Date(Date.UTC(t.year,t.month-1,t.day,0,0,0,0));return{yd:Math.round(i.getTime()/1e3),Cd:t}}function ns(h){if(!Hs(h))throw new Error("time must be of type isUTCTimestamp");return{yd:h}}function wi(h){const t=new Date(h);if(isNaN(t.getTime()))throw new Error(`Invalid date string=${h}, expected format=yyyy-mm-dd`);return{day:t.getUTCDate(),month:t.getUTCMonth()+1,year:t.getUTCFullYear()}}function rs(h){ut(h.time)&&(h.time=wi(h.time))}class os{options(){return this._n}setOptions(t){this._n=t,this.updateFormatter(t.localization)}preprocessData(t){Array.isArray(t)?function(i){i.forEach(rs)}(t):rs(t)}createConverterToInternalObj(t){return p(function(i){return i.length===0?null:oi(i[0].time)||ut(i[0].time)?Xt:ns}(t))}key(t){return typeof t=="object"&&"yd"in t?t.yd:this.key(this.convertHorzItemToInternal(t))}cacheKey(t){const i=t;return i.Cd===void 0?new Date(1e3*i.yd).getTime():new Date(Date.UTC(i.Cd.year,i.Cd.month-1,i.Cd.day)).getTime()}convertHorzItemToInternal(t){return Hs(i=t)?ns(i):oi(i)?Xt(i):Xt(wi(i));var i}updateFormatter(t){if(!this._n)return;const i=t.dateFormat;this._n.timeScale.timeVisible?this.Td=new $h({pd:i,md:this._n.timeScale.secondsVisible?"%h:%m:%s":"%h:%m",bd:" ",wd:t.locale}):this.Td=new js(i,t.locale)}formatHorzItem(t){const i=t;return this.Td.F_(new Date(1e3*i.yd))}formatTickmark(t,i){const s=function(n,r,o){switch(n){case 0:case 10:return r?o?4:3:2;case 20:case 21:case 22:case 30:case 31:case 32:case 33:return r?3:2;case 50:return 2;case 60:return 1;case 70:return 0}}(t.weight,this._n.timeScale.timeVisible,this._n.timeScale.secondsVisible),e=this._n.timeScale;if(e.tickMarkFormatter!==void 0){const n=e.tickMarkFormatter(t.originalTime,s,i.locale);if(n!==null)return n}return function(n,r,o){const l={};switch(r){case 0:l.year="numeric";break;case 1:l.month="short";break;case 2:l.day="numeric";break;case 3:l.hour12=!1,l.hour="2-digit",l.minute="2-digit";break;case 4:l.hour12=!1,l.hour="2-digit",l.minute="2-digit",l.second="2-digit"}const a=n.Cd===void 0?new Date(1e3*n.yd):new Date(Date.UTC(n.Cd.year,n.Cd.month-1,n.Cd.day));return new Date(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()).toLocaleString(o,l)}(t.time,s,i.locale)}maxTickMarkWeight(t){let i=t.reduce(Nh,t[0]).weight;return i>30&&i<50&&(i=30),i}fillWeightsForPoints(t,i){(function(s,e=0){if(s.length===0)return;let n=e===0?null:s[e-1].time.yd,r=n!==null?new Date(1e3*n):null,o=0;for(let l=e;l1){const l=Math.ceil(o/(s.length-1)),a=new Date(1e3*(s[0].time.yd-l));s[0].timeWeight=hs(new Date(1e3*s[0].time.yd),a)}})(t,i)}static Pd(t){return R({localization:{dateFormat:"dd MMM 'yy"}},t??{})}}const G=typeof window<"u";function ls(){return!!G&&window.navigator.userAgent.toLowerCase().indexOf("firefox")>-1}function qt(){return!!G&&/iPhone|iPad|iPod/.test(window.navigator.platform)}function li(h){return h+h%2}function Jt(h,t){return h.Rd-t.Rd}function Kt(h,t,i){const s=(h.Rd-t.Rd)/(h.ot-t.ot);return Math.sign(s)*Math.min(Math.abs(s),i)}class Fh{constructor(t,i,s,e){this.Dd=null,this.Od=null,this.Ad=null,this.Vd=null,this.Bd=null,this.Id=0,this.zd=0,this.Ld=t,this.Ed=i,this.Nd=s,this.ss=e}Fd(t,i){if(this.Dd!==null){if(this.Dd.ot===i)return void(this.Dd.Rd=t);if(Math.abs(this.Dd.Rd-t)50)return;let s=0;const e=Kt(this.Dd,this.Od,this.Ed),n=Jt(this.Dd,this.Od),r=[e],o=[n];if(s+=n,this.Ad!==null){const a=Kt(this.Od,this.Ad,this.Ed);if(Math.sign(a)===Math.sign(e)){const u=Jt(this.Od,this.Ad);if(r.push(a),o.push(u),s+=u,this.Vd!==null){const c=Kt(this.Ad,this.Vd,this.Ed);if(Math.sign(c)===Math.sign(e)){const d=Jt(this.Ad,this.Vd);r.push(c),o.push(d),s+=d}}}}let l=0;for(let a=0;a({width:Math.max(e.width,n.width),height:Math.max(e.height,n.height)})});return s.resizeCanvasElement(t),s}function Z(h){var t;h.width=1,h.height=1,(t=h.getContext("2d"))===null||t===void 0||t.clearRect(0,0,1,1)}function ai(h,t,i,s){h.fl&&h.fl(t,i,s)}function Mt(h,t,i,s){h.K(t,i,s)}function ui(h,t,i,s){const e=h(i,s);for(const n of e){const r=n.gt();r!==null&&t(r)}}function Hh(h){G&&window.chrome!==void 0&&h.addEventListener("mousedown",t=>{if(t.button===1)return t.preventDefault(),!1})}class _i{constructor(t,i,s){this.jd=0,this.Hd=null,this.$d={nt:Number.NEGATIVE_INFINITY,st:Number.POSITIVE_INFINITY},this.Ud=0,this.qd=null,this.Yd={nt:Number.NEGATIVE_INFINITY,st:Number.POSITIVE_INFINITY},this.Xd=null,this.Kd=!1,this.Zd=null,this.Gd=null,this.Jd=!1,this.Qd=!1,this.tf=!1,this.if=null,this.nf=null,this.sf=null,this.ef=null,this.rf=null,this.hf=null,this.lf=null,this.af=0,this._f=!1,this.uf=!1,this.cf=!1,this.df=0,this.ff=null,this.vf=!qt(),this.pf=e=>{this.mf(e)},this.bf=e=>{if(this.wf(e)){const n=this.gf(e);if(++this.Ud,this.qd&&this.Ud>1){const{Mf:r}=this.xf(L(e),this.Yd);r<30&&!this.tf&&this.Sf(n,this.yf.kf),this.Cf()}}else{const n=this.gf(e);if(++this.jd,this.Hd&&this.jd>1){const{Mf:r}=this.xf(L(e),this.$d);r<5&&!this.Qd&&this.Tf(n,this.yf.Pf),this.Rf()}}},this.Df=t,this.yf=i,this._n=s,this.Of()}S(){this.if!==null&&(this.if(),this.if=null),this.nf!==null&&(this.nf(),this.nf=null),this.ef!==null&&(this.ef(),this.ef=null),this.rf!==null&&(this.rf(),this.rf=null),this.hf!==null&&(this.hf(),this.hf=null),this.sf!==null&&(this.sf(),this.sf=null),this.Af(),this.Rf()}Vf(t){this.ef&&this.ef();const i=this.Bf.bind(this);if(this.ef=()=>{this.Df.removeEventListener("mousemove",i)},this.Df.addEventListener("mousemove",i),this.wf(t))return;const s=this.gf(t);this.Tf(s,this.yf.If),this.vf=!0}Rf(){this.Hd!==null&&clearTimeout(this.Hd),this.jd=0,this.Hd=null,this.$d={nt:Number.NEGATIVE_INFINITY,st:Number.POSITIVE_INFINITY}}Cf(){this.qd!==null&&clearTimeout(this.qd),this.Ud=0,this.qd=null,this.Yd={nt:Number.NEGATIVE_INFINITY,st:Number.POSITIVE_INFINITY}}Bf(t){if(this.cf||this.Gd!==null||this.wf(t))return;const i=this.gf(t);this.Tf(i,this.yf.zf),this.vf=!0}Lf(t){const i=Gt(t.changedTouches,p(this.ff));if(i===null||(this.df=wt(t),this.lf!==null)||this.uf)return;this._f=!0;const s=this.xf(L(i),p(this.Gd)),{Ef:e,Nf:n,Mf:r}=s;if(this.Jd||!(r<5)){if(!this.Jd){const o=.5*e,l=n>=o&&!this._n.Ff(),a=o>n&&!this._n.Wf();l||a||(this.uf=!0),this.Jd=!0,this.tf=!0,this.Af(),this.Cf()}if(!this.uf){const o=this.gf(t,i);this.Sf(o,this.yf.jf),Q(t)}}}Hf(t){if(t.button!==0)return;const i=this.xf(L(t),p(this.Zd)),{Mf:s}=i;if(s>=5&&(this.Qd=!0,this.Rf()),this.Qd){const e=this.gf(t);this.Tf(e,this.yf.$f)}}xf(t,i){const s=Math.abs(i.nt-t.nt),e=Math.abs(i.st-t.st);return{Ef:s,Nf:e,Mf:s+e}}Uf(t){let i=Gt(t.changedTouches,p(this.ff));if(i===null&&t.touches.length===0&&(i=t.changedTouches[0]),i===null)return;this.ff=null,this.df=wt(t),this.Af(),this.Gd=null,this.hf&&(this.hf(),this.hf=null);const s=this.gf(t,i);if(this.Sf(s,this.yf.qf),++this.Ud,this.qd&&this.Ud>1){const{Mf:e}=this.xf(L(i),this.Yd);e<30&&!this.tf&&this.Sf(s,this.yf.kf),this.Cf()}else this.tf||(this.Sf(s,this.yf.Yf),this.yf.Yf&&Q(t));this.Ud===0&&Q(t),t.touches.length===0&&this.Kd&&(this.Kd=!1,Q(t))}mf(t){if(t.button!==0)return;const i=this.gf(t);if(this.Zd=null,this.cf=!1,this.rf&&(this.rf(),this.rf=null),ls()&&this.Df.ownerDocument.documentElement.removeEventListener("mouseleave",this.pf),!this.wf(t))if(this.Tf(i,this.yf.Xf),++this.jd,this.Hd&&this.jd>1){const{Mf:s}=this.xf(L(t),this.$d);s<5&&!this.Qd&&this.Tf(i,this.yf.Pf),this.Rf()}else this.Qd||this.Tf(i,this.yf.Kf)}Af(){this.Xd!==null&&(clearTimeout(this.Xd),this.Xd=null)}Zf(t){if(this.ff!==null)return;const i=t.changedTouches[0];this.ff=i.identifier,this.df=wt(t);const s=this.Df.ownerDocument.documentElement;this.tf=!1,this.Jd=!1,this.uf=!1,this.Gd=L(i),this.hf&&(this.hf(),this.hf=null);{const n=this.Lf.bind(this),r=this.Uf.bind(this);this.hf=()=>{s.removeEventListener("touchmove",n),s.removeEventListener("touchend",r)},s.addEventListener("touchmove",n,{passive:!1}),s.addEventListener("touchend",r,{passive:!1}),this.Af(),this.Xd=setTimeout(this.Gf.bind(this,t),240)}const e=this.gf(t,i);this.Sf(e,this.yf.Jf),this.qd||(this.Ud=0,this.qd=setTimeout(this.Cf.bind(this),500),this.Yd=L(i))}Qf(t){if(t.button!==0)return;const i=this.Df.ownerDocument.documentElement;ls()&&i.addEventListener("mouseleave",this.pf),this.Qd=!1,this.Zd=L(t),this.rf&&(this.rf(),this.rf=null);{const e=this.Hf.bind(this),n=this.mf.bind(this);this.rf=()=>{i.removeEventListener("mousemove",e),i.removeEventListener("mouseup",n)},i.addEventListener("mousemove",e),i.addEventListener("mouseup",n)}if(this.cf=!0,this.wf(t))return;const s=this.gf(t);this.Tf(s,this.yf.tv),this.Hd||(this.jd=0,this.Hd=setTimeout(this.Rf.bind(this),500),this.$d=L(t))}Of(){this.Df.addEventListener("mouseenter",this.Vf.bind(this)),this.Df.addEventListener("touchcancel",this.Af.bind(this));{const t=this.Df.ownerDocument,i=s=>{this.yf.iv&&(s.composed&&this.Df.contains(s.composedPath()[0])||s.target&&this.Df.contains(s.target)||this.yf.iv())};this.nf=()=>{t.removeEventListener("touchstart",i)},this.if=()=>{t.removeEventListener("mousedown",i)},t.addEventListener("mousedown",i),t.addEventListener("touchstart",i,{passive:!0})}qt()&&(this.sf=()=>{this.Df.removeEventListener("dblclick",this.bf)},this.Df.addEventListener("dblclick",this.bf)),this.Df.addEventListener("mouseleave",this.nv.bind(this)),this.Df.addEventListener("touchstart",this.Zf.bind(this),{passive:!0}),Hh(this.Df),this.Df.addEventListener("mousedown",this.Qf.bind(this)),this.sv(),this.Df.addEventListener("touchmove",()=>{},{passive:!1})}sv(){this.yf.ev===void 0&&this.yf.rv===void 0&&this.yf.hv===void 0||(this.Df.addEventListener("touchstart",t=>this.lv(t.touches),{passive:!0}),this.Df.addEventListener("touchmove",t=>{if(t.touches.length===2&&this.lf!==null&&this.yf.rv!==void 0){const i=as(t.touches[0],t.touches[1])/this.af;this.yf.rv(this.lf,i),Q(t)}},{passive:!1}),this.Df.addEventListener("touchend",t=>{this.lv(t.touches)}))}lv(t){t.length===1&&(this._f=!1),t.length!==2||this._f||this.Kd?this.av():this.ov(t)}ov(t){const i=this.Df.getBoundingClientRect()||{left:0,top:0};this.lf={nt:(t[0].clientX-i.left+(t[1].clientX-i.left))/2,st:(t[0].clientY-i.top+(t[1].clientY-i.top))/2},this.af=as(t[0],t[1]),this.yf.ev!==void 0&&this.yf.ev(),this.Af()}av(){this.lf!==null&&(this.lf=null,this.yf.hv!==void 0&&this.yf.hv())}nv(t){if(this.ef&&this.ef(),this.wf(t)||!this.vf)return;const i=this.gf(t);this.Tf(i,this.yf._v),this.vf=!qt()}Gf(t){const i=Gt(t.touches,p(this.ff));if(i===null)return;const s=this.gf(t,i);this.Sf(s,this.yf.uv),this.tf=!0,this.Kd=!0}wf(t){return t.sourceCapabilities&&t.sourceCapabilities.firesTouchEvents!==void 0?t.sourceCapabilities.firesTouchEvents:wt(t){t.type!=="touchstart"&&Q(t)}}}}function as(h,t){const i=h.clientX-t.clientX,s=h.clientY-t.clientY;return Math.sqrt(i*i+s*s)}function Q(h){h.cancelable&&h.preventDefault()}function L(h){return{nt:h.pageX,st:h.pageY}}function wt(h){return h.timeStamp||performance.now()}function Gt(h,t){for(let i=0;i{var s,e,n,r;return((e=(s=i.Dt())===null||s===void 0?void 0:s.xa())!==null&&e!==void 0?e:"")!==t?[]:(r=(n=i.la)===null||n===void 0?void 0:n.call(i,h))!==null&&r!==void 0?r:[]}}class us{constructor(t,i,s,e){this.zi=null,this.gv=null,this.Mv=!1,this.xv=new lt(200),this.Zr=null,this.Sv=0,this.kv=!1,this.yv=()=>{this.kv||this.Qi.Cv().$t().Nh()},this.Tv=()=>{this.kv||this.Qi.Cv().$t().Nh()},this.Qi=t,this._n=i,this.mo=i.layout,this.yc=s,this.Pv=e==="left",this.Rv=ti("normal",e),this.Dv=ti("top",e),this.Ov=ti("bottom",e),this.Av=document.createElement("div"),this.Av.style.height="100%",this.Av.style.overflow="hidden",this.Av.style.width="25px",this.Av.style.left="0",this.Av.style.position="relative",this.Vv=U(this.Av,S({width:16,height:16})),this.Vv.subscribeSuggestedBitmapSizeChanged(this.yv);const n=this.Vv.canvasElement;n.style.position="absolute",n.style.zIndex="1",n.style.left="0",n.style.top="0",this.Bv=U(this.Av,S({width:16,height:16})),this.Bv.subscribeSuggestedBitmapSizeChanged(this.Tv);const r=this.Bv.canvasElement;r.style.position="absolute",r.style.zIndex="2",r.style.left="0",r.style.top="0";const o={tv:this.Iv.bind(this),Jf:this.Iv.bind(this),$f:this.zv.bind(this),jf:this.zv.bind(this),iv:this.Lv.bind(this),Xf:this.Ev.bind(this),qf:this.Ev.bind(this),Pf:this.Nv.bind(this),kf:this.Nv.bind(this),If:this.Fv.bind(this),_v:this.Wv.bind(this)};this.jv=new _i(this.Bv.canvasElement,o,{Ff:()=>!this._n.handleScroll.vertTouchDrag,Wf:()=>!0})}S(){this.jv.S(),this.Bv.unsubscribeSuggestedBitmapSizeChanged(this.Tv),Z(this.Bv.canvasElement),this.Bv.dispose(),this.Vv.unsubscribeSuggestedBitmapSizeChanged(this.yv),Z(this.Vv.canvasElement),this.Vv.dispose(),this.zi!==null&&this.zi.$o().p(this),this.zi=null}Hv(){return this.Av}P(){return this.mo.fontSize}$v(){const t=this.yc.W();return this.Zr!==t.R&&(this.xv.Qe(),this.Zr=t.R),t}Uv(){if(this.zi===null)return 0;let t=0;const i=this.$v(),s=p(this.Vv.canvasElement.getContext("2d"));s.save();const e=this.zi.La();s.font=this.qv(),e.length>0&&(t=Math.max(this.xv.Mi(s,e[0].Za),this.xv.Mi(s,e[e.length-1].Za)));const n=this.Yv();for(let l=n.length;l--;){const a=this.xv.Mi(s,n[l].Zt());a>t&&(t=a)}const r=this.zi.Ct();if(r!==null&&this.gv!==null){const l=this.zi.fn(1,r),a=this.zi.fn(this.gv.height-2,r);t=Math.max(t,this.xv.Mi(s,this.zi.Ni(Math.floor(Math.min(l,a))+.11111111111111,r)),this.xv.Mi(s,this.zi.Ni(Math.ceil(Math.max(l,a))-.11111111111111,r)))}s.restore();const o=t||34;return li(Math.ceil(i.C+i.T+i.B+i.I+5+o))}Xv(t){this.gv!==null&&F(this.gv,t)||(this.gv=t,this.kv=!0,this.Vv.resizeCanvasElement(t),this.Bv.resizeCanvasElement(t),this.kv=!1,this.Av.style.width=`${t.width}px`,this.Av.style.height=`${t.height}px`)}Kv(){return p(this.gv).width}Zi(t){this.zi!==t&&(this.zi!==null&&this.zi.$o().p(this),this.zi=t,t.$o().l(this.ao.bind(this),this))}Dt(){return this.zi}Qe(){const t=this.Qi.Zv();this.Qi.Cv().$t().A_(t,p(this.Dt()))}Gv(t){if(this.gv===null)return;if(t!==1){this.Jv(),this.Vv.applySuggestedBitmapSize();const s=H(this.Vv);s!==null&&(s.useBitmapCoordinateSpace(e=>{this.Qv(e),this.Ae(e)}),this.Qi.tp(s,this.Ov),this.ip(s),this.Qi.tp(s,this.Rv),this.np(s))}this.Bv.applySuggestedBitmapSize();const i=H(this.Bv);i!==null&&(i.useBitmapCoordinateSpace(({context:s,bitmapSize:e})=>{s.clearRect(0,0,e.width,e.height)}),this.sp(i),this.Qi.tp(i,this.Dv))}ep(){return this.Vv.bitmapSize}rp(t,i,s){const e=this.ep();e.width>0&&e.height>0&&t.drawImage(this.Vv.canvasElement,i,s)}bt(){var t;(t=this.zi)===null||t===void 0||t.La()}Iv(t){if(this.zi===null||this.zi.Ei()||!this._n.handleScale.axisPressedMouseMove.price)return;const i=this.Qi.Cv().$t(),s=this.Qi.Zv();this.Mv=!0,i.y_(s,this.zi,t.localY)}zv(t){if(this.zi===null||!this._n.handleScale.axisPressedMouseMove.price)return;const i=this.Qi.Cv().$t(),s=this.Qi.Zv(),e=this.zi;i.C_(s,e,t.localY)}Lv(){if(this.zi===null||!this._n.handleScale.axisPressedMouseMove.price)return;const t=this.Qi.Cv().$t(),i=this.Qi.Zv(),s=this.zi;this.Mv&&(this.Mv=!1,t.T_(i,s))}Ev(t){if(this.zi===null||!this._n.handleScale.axisPressedMouseMove.price)return;const i=this.Qi.Cv().$t(),s=this.Qi.Zv();this.Mv=!1,i.T_(s,this.zi)}Nv(t){this._n.handleScale.axisDoubleClickReset.price&&this.Qe()}Fv(t){this.zi!==null&&(!this.Qi.Cv().$t().W().handleScale.axisPressedMouseMove.price||this.zi.fh()||this.zi.Co()||this.hp(1))}Wv(t){this.hp(0)}Yv(){const t=[],i=this.zi===null?void 0:this.zi;return(s=>{for(let e=0;e{r.fillStyle=s.borderColor;const a=Math.max(1,Math.floor(l)),u=Math.floor(.5*l),c=Math.round(e.T*o);r.beginPath();for(const d of i)r.rect(Math.floor(n*o),Math.round(d.Aa*l)-u,c,a);r.fill()}),t.useMediaCoordinateSpace(({context:r})=>{var o;r.font=this.qv(),r.fillStyle=(o=s.textColor)!==null&&o!==void 0?o:this.mo.textColor,r.textAlign=this.Pv?"right":"left",r.textBaseline="middle";const l=this.Pv?Math.round(n-e.B):Math.round(n+e.T+e.B),a=i.map(u=>this.xv.gi(r,u.Za));for(let u=i.length;u--;){const c=i[u];r.fillText(c.Za,l,c.Aa+a[u])}})}Jv(){if(this.gv===null||this.zi===null)return;let t=this.gv.height/2;const i=[],s=this.zi.No().slice(),e=this.Qi.Zv(),n=this.$v();this.zi===e.cr()&&this.Qi.Zv().No().forEach(l=>{e.ur(l)&&s.push(l)});const r=this.zi.Ta()[0],o=this.zi;s.forEach(l=>{const a=l.Tn(e,o);a.forEach(u=>{u.Oi(null),u.Ai()&&i.push(u)}),r===l&&a.length>0&&(t=a[0].Si())}),i.forEach(l=>l.Oi(l.Si())),this.zi.W().alignLabels&&this.lp(i,n,t)}lp(t,i,s){if(this.gv===null)return;const e=t.filter(r=>r.Si()<=s),n=t.filter(r=>r.Si()>s);e.sort((r,o)=>o.Si()-r.Si()),e.length&&n.length&&n.push(e[0]),n.sort((r,o)=>r.Si()-o.Si());for(const r of t){const o=Math.floor(r.Bt(i)/2),l=r.Si();l>-o&&lthis.gv.height-o&&lc-a&&o.Oi(c-a)}for(let r=1;r{n.Vi()&&n.gt(p(this.zi)).K(t,s,this.xv,e)})}sp(t){if(this.gv===null||this.zi===null)return;const i=this.Qi.Cv().$t(),s=[],e=this.Qi.Zv(),n=i.Wc().Tn(e,this.zi);n.length&&s.push(n);const r=this.$v(),o=this.Pv?"right":"left";s.forEach(l=>{l.forEach(a=>{a.gt(p(this.zi)).K(t,r,this.xv,o)})})}hp(t){this.Av.style.cursor=t===1?"ns-resize":"default"}ao(){const t=this.Uv();this.Sv{this.kv||this.gp===null||this.Hi().Nh()},this.Tv=()=>{this.kv||this.gp===null||this.Hi().Nh()},this.Mp=t,this.gp=i,this.gp.I_().l(this.xp.bind(this),this,!0),this.Sp=document.createElement("td"),this.Sp.style.padding="0",this.Sp.style.position="relative";const s=document.createElement("div");s.style.width="100%",s.style.height="100%",s.style.position="relative",s.style.overflow="hidden",this.kp=document.createElement("td"),this.kp.style.padding="0",this.yp=document.createElement("td"),this.yp.style.padding="0",this.Sp.appendChild(s),this.Vv=U(s,S({width:16,height:16})),this.Vv.subscribeSuggestedBitmapSizeChanged(this.yv);const e=this.Vv.canvasElement;e.style.position="absolute",e.style.zIndex="1",e.style.left="0",e.style.top="0",this.Bv=U(s,S({width:16,height:16})),this.Bv.subscribeSuggestedBitmapSizeChanged(this.Tv);const n=this.Bv.canvasElement;n.style.position="absolute",n.style.zIndex="2",n.style.left="0",n.style.top="0",this.Cp=document.createElement("tr"),this.Cp.appendChild(this.kp),this.Cp.appendChild(this.Sp),this.Cp.appendChild(this.yp),this.Tp(),this.jv=new _i(this.Bv.canvasElement,this,{Ff:()=>this.pp===null&&!this.Mp.W().handleScroll.vertTouchDrag,Wf:()=>this.pp===null&&!this.Mp.W().handleScroll.horzTouchDrag})}S(){this.ap!==null&&this.ap.S(),this.op!==null&&this.op.S(),this.Bv.unsubscribeSuggestedBitmapSizeChanged(this.Tv),Z(this.Bv.canvasElement),this.Bv.dispose(),this.Vv.unsubscribeSuggestedBitmapSizeChanged(this.yv),Z(this.Vv.canvasElement),this.Vv.dispose(),this.gp!==null&&this.gp.I_().p(this),this.jv.S()}Zv(){return p(this.gp)}Pp(t){this.gp!==null&&this.gp.I_().p(this),this.gp=t,this.gp!==null&&this.gp.I_().l(Si.prototype.xp.bind(this),this,!0),this.Tp()}Cv(){return this.Mp}Hv(){return this.Cp}Tp(){if(this.gp!==null&&(this.Rp(),this.Hi().wt().length!==0)){if(this.ap!==null){const t=this.gp.S_();this.ap.Zi(p(t))}if(this.op!==null){const t=this.gp.k_();this.op.Zi(p(t))}}}Dp(){this.ap!==null&&this.ap.bt(),this.op!==null&&this.op.bt()}v_(){return this.gp!==null?this.gp.v_():0}p_(t){this.gp&&this.gp.p_(t)}If(t){if(!this.gp)return;this.Op();const i=t.localX,s=t.localY;this.Ap(i,s,t)}tv(t){this.Op(),this.Vp(),this.Ap(t.localX,t.localY,t)}zf(t){var i;if(!this.gp)return;this.Op();const s=t.localX,e=t.localY;this.Ap(s,e,t);const n=this.pr(s,e);this.Mp.Bp((i=n==null?void 0:n.wv)!==null&&i!==void 0?i:null),this.Hi().Ic(n&&{zc:n.zc,mv:n.mv})}Kf(t){this.gp!==null&&(this.Op(),this.Ip(t))}Pf(t){this.gp!==null&&this.zp(this.dp,t)}kf(t){this.Pf(t)}$f(t){this.Op(),this.Lp(t),this.Ap(t.localX,t.localY,t)}Xf(t){this.gp!==null&&(this.Op(),this.vp=!1,this.Ep(t))}Yf(t){this.gp!==null&&this.Ip(t)}uv(t){if(this.vp=!0,this.pp===null){const i={x:t.localX,y:t.localY};this.Np(i,i,t)}}_v(t){this.gp!==null&&(this.Op(),this.gp.$t().Ic(null),this.Fp())}Wp(){return this.cp}jp(){return this.dp}ev(){this.fp=1,this.Hi().Hn()}rv(t,i){if(!this.Mp.W().handleScale.pinch)return;const s=5*(i-this.fp);this.fp=i,this.Hi().qc(t.nt,s)}Jf(t){this.vp=!1,this.mp=this.pp!==null,this.Vp();const i=this.Hi().Wc();this.pp!==null&&i.yt()&&(this.bp={x:i.Yt(),y:i.Xt()},this.pp={x:t.localX,y:t.localY})}jf(t){if(this.gp===null)return;const i=t.localX,s=t.localY;if(this.pp===null)this.Lp(t);else{this.mp=!1;const e=p(this.bp),n=e.x+(i-this.pp.x),r=e.y+(s-this.pp.y);this.Ap(n,r,t)}}qf(t){this.Cv().W().trackingMode.exitMode===0&&(this.mp=!0),this.Hp(),this.Ep(t)}pr(t,i){const s=this.gp;return s===null?null:function(e,n,r){const o=e.No(),l=function(a,u,c){var d,f;let m,v;for(const w of a){const y=(f=(d=w.oa)===null||d===void 0?void 0:d.call(w,u,c))!==null&&f!==void 0?f:[];for(const _ of y)b=_.zOrder,(!(g=m==null?void 0:m.zOrder)||b==="top"&&g!=="top"||b==="normal"&&g==="bottom")&&(m=_,v=w)}var b,g;return m&&v?{bv:m,zc:v}:null}(o,n,r);if((l==null?void 0:l.bv.zOrder)==="top")return _t(l);for(const a of o){if(l&&l.zc===a&&l.bv.zOrder!=="bottom"&&!l.bv.isBackground)return _t(l);const u=jh(a.Cn(e),n,r);if(u!==null)return{zc:a,vv:u.vv,mv:u.mv};if(l&&l.zc===a&&l.bv.zOrder!=="bottom"&&l.bv.isBackground)return _t(l)}return l!=null&&l.bv?_t(l):null}(s,t,i)}$p(t,i){p(i==="left"?this.ap:this.op).Xv(S({width:t,height:this.gv.height}))}Up(){return this.gv}Xv(t){F(this.gv,t)||(this.gv=t,this.kv=!0,this.Vv.resizeCanvasElement(t),this.Bv.resizeCanvasElement(t),this.kv=!1,this.Sp.style.width=t.width+"px",this.Sp.style.height=t.height+"px")}qp(){const t=p(this.gp);t.x_(t.S_()),t.x_(t.k_());for(const i of t.Ta())if(t.ur(i)){const s=i.Dt();s!==null&&t.x_(s),i.Rn()}}ep(){return this.Vv.bitmapSize}rp(t,i,s){const e=this.ep();e.width>0&&e.height>0&&t.drawImage(this.Vv.canvasElement,i,s)}Gv(t){if(t===0||this.gp===null)return;if(t>1&&this.qp(),this.ap!==null&&this.ap.Gv(t),this.op!==null&&this.op.Gv(t),t!==1){this.Vv.applySuggestedBitmapSize();const s=H(this.Vv);s!==null&&(s.useBitmapCoordinateSpace(e=>{this.Qv(e)}),this.gp&&(this.Yp(s,Uh),this.Xp(s),this.Kp(s),this.Yp(s,St),this.Yp(s,Zh)))}this.Bv.applySuggestedBitmapSize();const i=H(this.Bv);i!==null&&(i.useBitmapCoordinateSpace(({context:s,bitmapSize:e})=>{s.clearRect(0,0,e.width,e.height)}),this.Zp(i),this.Yp(i,Yh))}Gp(){return this.ap}Jp(){return this.op}tp(t,i){this.Yp(t,i)}xp(){this.gp!==null&&this.gp.I_().p(this),this.gp=null}Ip(t){this.zp(this.cp,t)}zp(t,i){const s=i.localX,e=i.localY;t.M()&&t.m(this.Hi().St().Vu(s),{x:s,y:e},i)}Qv({context:t,bitmapSize:i}){const{width:s,height:e}=i,n=this.Hi(),r=n.q(),o=n._d();r===o?Ot(t,0,0,s,e,o):Cs(t,0,0,s,e,r,o)}Xp(t){const i=p(this.gp).z_().Fh().gt();i!==null&&i.K(t,!1)}Kp(t){const i=this.Hi().Fc();this.Qp(t,St,ai,i),this.Qp(t,St,Mt,i)}Zp(t){this.Qp(t,St,Mt,this.Hi().Wc())}Yp(t,i){const s=p(this.gp).No();for(const e of s)this.Qp(t,i,ai,e);for(const e of s)this.Qp(t,i,Mt,e)}Qp(t,i,s,e){const n=p(this.gp),r=n.$t().Bc(),o=r!==null&&r.zc===e,l=r!==null&&o&&r.mv!==void 0?r.mv.br:void 0;ui(i,a=>s(a,t,o,l),e,n)}Rp(){if(this.gp===null)return;const t=this.Mp,i=this.gp.S_().W().visible,s=this.gp.k_().W().visible;i||this.ap===null||(this.kp.removeChild(this.ap.Hv()),this.ap.S(),this.ap=null),s||this.op===null||(this.yp.removeChild(this.op.Hv()),this.op.S(),this.op=null);const e=t.$t().ed();i&&this.ap===null&&(this.ap=new us(this,t.W(),e,"left"),this.kp.appendChild(this.ap.Hv())),s&&this.op===null&&(this.op=new us(this,t.W(),e,"right"),this.yp.appendChild(this.op.Hv()))}tm(t){return t.cv&&this.vp||this.pp!==null}im(t){return Math.max(0,Math.min(t,this.gv.width-1))}nm(t){return Math.max(0,Math.min(t,this.gv.height-1))}Ap(t,i,s){this.Hi().Qc(this.im(t),this.nm(i),s,p(this.gp))}Fp(){this.Hi().nd()}Hp(){this.mp&&(this.pp=null,this.Fp())}Np(t,i,s){this.pp=t,this.mp=!1,this.Ap(i.x,i.y,s);const e=this.Hi().Wc();this.bp={x:e.Yt(),y:e.Xt()}}Hi(){return this.Mp.$t()}Ep(t){if(!this.up)return;const i=this.Hi(),s=this.Zv();if(i.D_(s,s.dn()),this._p=null,this.up=!1,i.Zc(),this.wp!==null){const e=performance.now(),n=i.St();this.wp.Pr(n.Lu(),e),this.wp.Yu(e)||i.qn(this.wp)}}Op(){this.pp=null}Vp(){if(this.gp){if(this.Hi().Hn(),document.activeElement!==document.body&&document.activeElement!==document.documentElement)p(document.activeElement).blur();else{const t=document.getSelection();t!==null&&t.removeAllRanges()}!this.gp.dn().Ei()&&this.Hi().St().Ei()}}Lp(t){if(this.gp===null)return;const i=this.Hi(),s=i.St();if(s.Ei())return;const e=this.Mp.W(),n=e.handleScroll,r=e.kineticScroll;if((!n.pressedMouseMove||t.cv)&&(!n.horzTouchDrag&&!n.vertTouchDrag||!t.cv))return;const o=this.gp.dn(),l=performance.now();if(this._p!==null||this.tm(t)||(this._p={x:t.clientX,y:t.clientY,yd:l,sm:t.localX,rm:t.localY}),this._p!==null&&!this.up&&(this._p.x!==t.clientX||this._p.y!==t.clientY)){if(t.cv&&r.touch||!t.cv&&r.mouse){const a=s.ee();this.wp=new Fh(.2/a,7/a,.997,15/a),this.wp.Fd(s.Lu(),this._p.yd)}else this.wp=null;o.Ei()||i.P_(this.gp,o,t.localY),i.Xc(t.localX),this.up=!0}this.up&&(o.Ei()||i.R_(this.gp,o,t.localY),i.Kc(t.localX),this.wp!==null&&this.wp.Fd(s.Lu(),l))}}class cs{constructor(t,i,s,e,n){this.ft=!0,this.gv=S({width:0,height:0}),this.yv=()=>this.Gv(3),this.Pv=t==="left",this.yc=s.ed,this._n=i,this.hm=e,this.lm=n,this.Av=document.createElement("div"),this.Av.style.width="25px",this.Av.style.height="100%",this.Av.style.overflow="hidden",this.Vv=U(this.Av,S({width:16,height:16})),this.Vv.subscribeSuggestedBitmapSizeChanged(this.yv)}S(){this.Vv.unsubscribeSuggestedBitmapSizeChanged(this.yv),Z(this.Vv.canvasElement),this.Vv.dispose()}Hv(){return this.Av}Up(){return this.gv}Xv(t){F(this.gv,t)||(this.gv=t,this.Vv.resizeCanvasElement(t),this.Av.style.width=`${t.width}px`,this.Av.style.height=`${t.height}px`,this.ft=!0)}Gv(t){if(t<3&&!this.ft||this.gv.width===0||this.gv.height===0)return;this.ft=!1,this.Vv.applySuggestedBitmapSize();const i=H(this.Vv);i!==null&&i.useBitmapCoordinateSpace(s=>{this.Qv(s),this.Ae(s)})}ep(){return this.Vv.bitmapSize}rp(t,i,s){const e=this.ep();e.width>0&&e.height>0&&t.drawImage(this.Vv.canvasElement,i,s)}Ae({context:t,bitmapSize:i,horizontalPixelRatio:s,verticalPixelRatio:e}){if(!this.hm())return;t.fillStyle=this._n.timeScale.borderColor;const n=Math.floor(this.yc.W().C*s),r=Math.floor(this.yc.W().C*e),o=this.Pv?i.width-n:0;t.fillRect(o,0,n,r)}Qv({context:t,bitmapSize:i}){Ot(t,0,0,i.width,i.height,this.lm())}}function yi(h){return t=>{var i,s;return(s=(i=t.aa)===null||i===void 0?void 0:i.call(t,h))!==null&&s!==void 0?s:[]}}const Qh=yi("normal"),Xh=yi("top"),qh=yi("bottom");class Jh{constructor(t,i){this.am=null,this.om=null,this.k=null,this._m=!1,this.gv=S({width:0,height:0}),this.um=new M,this.xv=new lt(5),this.kv=!1,this.yv=()=>{this.kv||this.Mp.$t().Nh()},this.Tv=()=>{this.kv||this.Mp.$t().Nh()},this.Mp=t,this.N_=i,this._n=t.W().layout,this.dm=document.createElement("tr"),this.fm=document.createElement("td"),this.fm.style.padding="0",this.vm=document.createElement("td"),this.vm.style.padding="0",this.Av=document.createElement("td"),this.Av.style.height="25px",this.Av.style.padding="0",this.pm=document.createElement("div"),this.pm.style.width="100%",this.pm.style.height="100%",this.pm.style.position="relative",this.pm.style.overflow="hidden",this.Av.appendChild(this.pm),this.Vv=U(this.pm,S({width:16,height:16})),this.Vv.subscribeSuggestedBitmapSizeChanged(this.yv);const s=this.Vv.canvasElement;s.style.position="absolute",s.style.zIndex="1",s.style.left="0",s.style.top="0",this.Bv=U(this.pm,S({width:16,height:16})),this.Bv.subscribeSuggestedBitmapSizeChanged(this.Tv);const e=this.Bv.canvasElement;e.style.position="absolute",e.style.zIndex="2",e.style.left="0",e.style.top="0",this.dm.appendChild(this.fm),this.dm.appendChild(this.Av),this.dm.appendChild(this.vm),this.bm(),this.Mp.$t().f_().l(this.bm.bind(this),this),this.jv=new _i(this.Bv.canvasElement,this,{Ff:()=>!0,Wf:()=>!this.Mp.W().handleScroll.horzTouchDrag})}S(){this.jv.S(),this.am!==null&&this.am.S(),this.om!==null&&this.om.S(),this.Bv.unsubscribeSuggestedBitmapSizeChanged(this.Tv),Z(this.Bv.canvasElement),this.Bv.dispose(),this.Vv.unsubscribeSuggestedBitmapSizeChanged(this.yv),Z(this.Vv.canvasElement),this.Vv.dispose()}Hv(){return this.dm}wm(){return this.am}gm(){return this.om}tv(t){if(this._m)return;this._m=!0;const i=this.Mp.$t();!i.St().Ei()&&this.Mp.W().handleScale.axisPressedMouseMove.time&&i.Uc(t.localX)}Jf(t){this.tv(t)}iv(){const t=this.Mp.$t();!t.St().Ei()&&this._m&&(this._m=!1,this.Mp.W().handleScale.axisPressedMouseMove.time&&t.Jc())}$f(t){const i=this.Mp.$t();!i.St().Ei()&&this.Mp.W().handleScale.axisPressedMouseMove.time&&i.Gc(t.localX)}jf(t){this.$f(t)}Xf(){this._m=!1;const t=this.Mp.$t();t.St().Ei()&&!this.Mp.W().handleScale.axisPressedMouseMove.time||t.Jc()}qf(){this.Xf()}Pf(){this.Mp.W().handleScale.axisDoubleClickReset.time&&this.Mp.$t().Xn()}kf(){this.Pf()}If(){this.Mp.$t().W().handleScale.axisPressedMouseMove.time&&this.hp(1)}_v(){this.hp(0)}Up(){return this.gv}Mm(){return this.um}xm(t,i,s){F(this.gv,t)||(this.gv=t,this.kv=!0,this.Vv.resizeCanvasElement(t),this.Bv.resizeCanvasElement(t),this.kv=!1,this.Av.style.width=`${t.width}px`,this.Av.style.height=`${t.height}px`,this.um.m(t)),this.am!==null&&this.am.Xv(S({width:i,height:t.height})),this.om!==null&&this.om.Xv(S({width:s,height:t.height}))}Sm(){const t=this.km();return Math.ceil(t.C+t.T+t.P+t.L+t.V+t.ym)}bt(){this.Mp.$t().St().La()}ep(){return this.Vv.bitmapSize}rp(t,i,s){const e=this.ep();e.width>0&&e.height>0&&t.drawImage(this.Vv.canvasElement,i,s)}Gv(t){if(t===0)return;if(t!==1){this.Vv.applySuggestedBitmapSize();const s=H(this.Vv);s!==null&&(s.useBitmapCoordinateSpace(e=>{this.Qv(e),this.Ae(e),this.Cm(s,qh)}),this.ip(s),this.Cm(s,Qh)),this.am!==null&&this.am.Gv(t),this.om!==null&&this.om.Gv(t)}this.Bv.applySuggestedBitmapSize();const i=H(this.Bv);i!==null&&(i.useBitmapCoordinateSpace(({context:s,bitmapSize:e})=>{s.clearRect(0,0,e.width,e.height)}),this.Tm([...this.Mp.$t().wt(),this.Mp.$t().Wc()],i),this.Cm(i,Xh))}Cm(t,i){const s=this.Mp.$t().wt();for(const e of s)ui(i,n=>ai(n,t,!1,void 0),e,void 0);for(const e of s)ui(i,n=>Mt(n,t,!1,void 0),e,void 0)}Qv({context:t,bitmapSize:i}){Ot(t,0,0,i.width,i.height,this.Mp.$t()._d())}Ae({context:t,bitmapSize:i,verticalPixelRatio:s}){if(this.Mp.W().timeScale.borderVisible){t.fillStyle=this.Pm();const e=Math.max(1,Math.floor(this.km().C*s));t.fillRect(0,0,i.width,e)}}ip(t){const i=this.Mp.$t().St(),s=i.La();if(!s||s.length===0)return;const e=this.N_.maxTickMarkWeight(s),n=this.km(),r=i.W();r.borderVisible&&r.ticksVisible&&t.useBitmapCoordinateSpace(({context:o,horizontalPixelRatio:l,verticalPixelRatio:a})=>{o.strokeStyle=this.Pm(),o.fillStyle=this.Pm();const u=Math.max(1,Math.floor(l)),c=Math.floor(.5*l);o.beginPath();const d=Math.round(n.T*a);for(let f=s.length;f--;){const m=Math.round(s[f].coord*l);o.rect(m-c,0,u,d)}o.fill()}),t.useMediaCoordinateSpace(({context:o})=>{const l=n.C+n.T+n.L+n.P/2;o.textAlign="center",o.textBaseline="middle",o.fillStyle=this.$(),o.font=this.qv();for(const a of s)if(a.weight=e){const u=a.needAlignCoordinate?this.Rm(o,a.coord,a.label):a.coord;o.fillText(a.label,u,l)}})}Rm(t,i,s){const e=this.xv.Mi(t,s),n=e/2,r=Math.floor(i-n)+.5;return r<0?i+=Math.abs(0-r):r+e>this.gv.width&&(i-=Math.abs(this.gv.width-(r+e))),i}Tm(t,i){const s=this.km();for(const e of t)for(const n of e.Ji())n.gt().K(i,s)}Pm(){return this.Mp.W().timeScale.borderColor}$(){return this._n.textColor}j(){return this._n.fontSize}qv(){return K(this.j(),this._n.fontFamily)}Dm(){return K(this.j(),this._n.fontFamily,"bold")}km(){this.k===null&&(this.k={C:1,N:NaN,L:NaN,V:NaN,Wi:NaN,T:5,P:NaN,R:"",Fi:new lt,ym:0});const t=this.k,i=this.qv();if(t.R!==i){const s=this.j();t.P=s,t.R=i,t.L=3*s/12,t.V=3*s/12,t.Wi=9*s/12,t.N=0,t.ym=4*s/12,t.Fi.Qe()}return this.k}hp(t){this.Av.style.cursor=t===1?"ew-resize":"default"}bm(){const t=this.Mp.$t(),i=t.W();i.leftPriceScale.visible||this.am===null||(this.fm.removeChild(this.am.Hv()),this.am.S(),this.am=null),i.rightPriceScale.visible||this.om===null||(this.vm.removeChild(this.om.Hv()),this.om.S(),this.om=null);const s={ed:this.Mp.$t().ed()},e=()=>i.leftPriceScale.borderVisible&&t.St().W().borderVisible,n=()=>t._d();i.leftPriceScale.visible&&this.am===null&&(this.am=new cs("left",i,s,e,n),this.fm.appendChild(this.am.Hv())),i.rightPriceScale.visible&&this.om===null&&(this.om=new cs("right",i,s,e,n),this.vm.appendChild(this.om.Hv()))}}const Kh=!!G&&!!navigator.userAgentData&&navigator.userAgentData.brands.some(h=>h.brand.includes("Chromium"))&&!!G&&(!((ii=navigator==null?void 0:navigator.userAgentData)===null||ii===void 0)&&ii.platform?navigator.userAgentData.platform==="Windows":navigator.userAgent.toLowerCase().indexOf("win")>=0);var ii;class Gh{constructor(t,i,s){var e;this.Om=[],this.Am=0,this.Qa=0,this.e_=0,this.Vm=0,this.Bm=0,this.Im=null,this.zm=!1,this.cp=new M,this.dp=new M,this.xc=new M,this.Lm=null,this.Em=null,this.Nm=t,this._n=i,this.N_=s,this.dm=document.createElement("div"),this.dm.classList.add("tv-lightweight-charts"),this.dm.style.overflow="hidden",this.dm.style.direction="ltr",this.dm.style.width="100%",this.dm.style.height="100%",(e=this.dm).style.userSelect="none",e.style.webkitUserSelect="none",e.style.msUserSelect="none",e.style.MozUserSelect="none",e.style.webkitTapHighlightColor="transparent",this.Fm=document.createElement("table"),this.Fm.setAttribute("cellspacing","0"),this.dm.appendChild(this.Fm),this.Wm=this.jm.bind(this),si(this._n)&&this.Hm(!0),this.Hi=new Dh(this.kc.bind(this),this._n,s),this.$t().jc().l(this.$m.bind(this),this),this.Um=new Jh(this,this.N_),this.Fm.appendChild(this.Um.Hv());const n=i.autoSize&&this.qm();let r=this._n.width,o=this._n.height;if(n||r===0||o===0){const l=t.getBoundingClientRect();r=r||l.width,o=o||l.height}this.Ym(r,o),this.Xm(),t.appendChild(this.dm),this.Km(),this.Hi.St().Gu().l(this.Hi.$l.bind(this.Hi),this),this.Hi.f_().l(this.Hi.$l.bind(this.Hi),this)}$t(){return this.Hi}W(){return this._n}Zm(){return this.Om}Gm(){return this.Um}S(){this.Hm(!1),this.Am!==0&&window.cancelAnimationFrame(this.Am),this.Hi.jc().p(this),this.Hi.St().Gu().p(this),this.Hi.f_().p(this),this.Hi.S();for(const t of this.Om)this.Fm.removeChild(t.Hv()),t.Wp().p(this),t.jp().p(this),t.S();this.Om=[],p(this.Um).S(),this.dm.parentElement!==null&&this.dm.parentElement.removeChild(this.dm),this.xc.S(),this.cp.S(),this.dp.S(),this.Jm()}Ym(t,i,s=!1){if(this.Qa===i&&this.e_===t)return;const e=function(o){const l=Math.floor(o.width),a=Math.floor(o.height);return S({width:l-l%2,height:a-a%2})}(S({width:t,height:i}));this.Qa=e.height,this.e_=e.width;const n=this.Qa+"px",r=this.e_+"px";p(this.dm).style.height=n,p(this.dm).style.width=r,this.Fm.style.height=n,this.Fm.style.width=r,s?this.Qm(x.ns(),performance.now()):this.Hi.$l()}Gv(t){t===void 0&&(t=x.ns());for(let i=0;i{let a=0;for(let u=0;u{p(o==="left"?this.Um.wm():this.Um.gm()).rp(p(t),l,a)};if(this._n.timeScale.visible){const o=this.Um.ep();if(t!==null){let l=0;this.eb()&&(r("left",l,s),l=p(e.Gp()).ep().width),this.Um.rp(t,l,s),l+=o.width,this.rb()&&r("right",l,s)}s+=o.height}return S({width:i,height:s})}_b(){let t=0,i=0,s=0;for(const m of this.Om)this.eb()&&(i=Math.max(i,p(m.Gp()).Uv(),this._n.leftPriceScale.minimumWidth)),this.rb()&&(s=Math.max(s,p(m.Jp()).Uv(),this._n.rightPriceScale.minimumWidth)),t+=m.v_();i=li(i),s=li(s);const e=this.e_,n=this.Qa,r=Math.max(e-i-s,0),o=this._n.timeScale.visible;let l=o?Math.max(this.Um.Sm(),this._n.timeScale.minimumHeight):0;var a;l=(a=l)+a%2;const u=0+l,c=n{n.Dp()}),((s=this.Im)===null||s===void 0?void 0:s.Fn())===3&&(this.Im.Jn(t),this.cb(),this.fb(this.Im),this.vb(this.Im,i),t=this.Im,this.Im=null)),this.Gv(t)}vb(t,i){for(const s of t.Gn())this.Qn(s,i)}fb(t){const i=this.Hi.Nc();for(let s=0;s{if(this.zm=!1,this.Am=0,this.Im!==null){const s=this.Im;this.Im=null,this.Qm(s,i);for(const e of s.Gn())if(e.$n===5&&!e.Ot.Yu(i)){this.$t().qn(e.Ot);break}}}))}cb(){this.Xm()}Xm(){const t=this.Hi.Nc(),i=t.length,s=this.Om.length;for(let e=i;e{const c=u.Vn().il(t);c!==null&&n.set(u,c)});let r;if(t!==null){const u=(e=this.Hi.St().$i(t))===null||e===void 0?void 0:e.originalTime;u!==void 0&&(r=u)}const o=this.$t().Bc(),l=o!==null&&o.zc instanceof gi?o.zc:void 0,a=o!==null&&o.mv!==void 0?o.mv.mr:void 0;return{wb:r,ie:t??void 0,gb:i??void 0,Mb:l,xb:n,Sb:a,kb:s??void 0}}pb(t,i,s){this.cp.m(()=>this.bb(t,i,s))}mb(t,i,s){this.dp.m(()=>this.bb(t,i,s))}$m(t,i,s){this.xc.m(()=>this.bb(t,i,s))}Km(){const t=this._n.timeScale.visible?"":"none";this.Um.Hv().style.display=t}eb(){return this.Om[0].Zv().S_().W().visible}rb(){return this.Om[0].Zv().k_().W().visible}qm(){return"ResizeObserver"in window&&(this.Lm=new ResizeObserver(t=>{const i=t.find(s=>s.target===this.Nm);i&&this.Ym(i.contentRect.width,i.contentRect.height)}),this.Lm.observe(this.Nm,{box:"border-box"}),!0)}Jm(){this.Lm!==null&&this.Lm.disconnect(),this.Lm=null}}function si(h){return!!(h.handleScroll.mouseWheel||h.handleScale.mouseWheel)}function Us(h,t){var i={};for(var s in h)Object.prototype.hasOwnProperty.call(h,s)&&t.indexOf(s)<0&&(i[s]=h[s]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function"){var e=0;for(s=Object.getOwnPropertySymbols(h);efunction(o,l){return l?l(o):(a=o).open===void 0&&a.value===void 0;var a}(s,r)?fs({ot:t,ie:i,wb:e},s):fs(h(t,i,s,e,n),s)}function ms(h){return{Candlestick:$(hn),Bar:$(en),Area:$(tn),Baseline:$(sn),Histogram:$(ds),Line:$(ds),Custom:$(nn)}[h]}function vs(h){return{ie:0,Cb:new Map,ia:h}}function ps(h,t){if(h!==void 0&&h.length!==0)return{Tb:t.key(h[0].ot),Pb:t.key(h[h.length-1].ot)}}function bs(h){let t;return h.forEach(i=>{t===void 0&&(t=i.wb)}),O(t)}class rn{constructor(t){this.Rb=new Map,this.Db=new Map,this.Ob=new Map,this.Ab=[],this.N_=t}S(){this.Rb.clear(),this.Db.clear(),this.Ob.clear(),this.Ab=[]}Vb(t,i){let s=this.Rb.size!==0,e=!1;const n=this.Db.get(t);if(n!==void 0)if(this.Db.size===1)s=!1,e=!0,this.Rb.clear();else for(const l of this.Ab)l.pointData.Cb.delete(t)&&(e=!0);let r=[];if(i.length!==0){const l=i.map(f=>f.time),a=this.N_.createConverterToInternalObj(i),u=ms(t.Yh()),c=t.ga(),d=t.Ma();r=i.map((f,m)=>{const v=a(f.time),b=this.N_.key(v);let g=this.Rb.get(b);g===void 0&&(g=vs(v),this.Rb.set(b,g),e=!0);const w=u(v,g.ie,f,l[m],c,d);return g.Cb.set(t,w),w})}s&&this.Bb(),this.Ib(t,r);let o=-1;if(e){const l=[];this.Rb.forEach(a=>{l.push({timeWeight:0,time:a.ia,pointData:a,originalTime:bs(a.Cb)})}),l.sort((a,u)=>this.N_.key(a.time)-this.N_.key(u.time)),o=this.zb(l)}return this.Lb(t,o,function(l,a,u){const c=ps(l,u),d=ps(a,u);if(c!==void 0&&d!==void 0)return{Xl:c.Pb>=d.Pb&&c.Tb>=d.Tb}}(this.Db.get(t),n,this.N_))}ld(t){return this.Vb(t,[])}Eb(t,i){const s=i;(function(v){v.wb===void 0&&(v.wb=v.time)})(s),this.N_.preprocessData(i);const e=this.N_.createConverterToInternalObj([i])(i.time),n=this.Ob.get(t);if(n!==void 0&&this.N_.key(e)this.N_.key(v.time)this.N_.key(e.ot)?yt(i)&&s.push(i):yt(i)?s[s.length-1]=i:s.splice(-1,1),this.Ob.set(t,i.ot)}Ib(t,i){i.length!==0?(this.Db.set(t,i.filter(yt)),this.Ob.set(t,i[i.length-1].ot)):(this.Db.delete(t),this.Ob.delete(t))}Bb(){for(const t of this.Ab)t.pointData.Cb.size===0&&this.Rb.delete(this.N_.key(t.time))}zb(t){let i=-1;for(let s=0;s{i.length!==0&&(t=Math.max(t,i[i.length-1].ie))}),t}Lb(t,i,s){const e={Wb:new Map,St:{Au:this.Fb()}};if(i!==-1)this.Db.forEach((n,r)=>{e.Wb.set(r,{We:n,jb:r===t?s:void 0})}),this.Db.has(t)||e.Wb.set(t,{We:[],jb:s}),e.St.Hb=this.Ab,e.St.$b=i;else{const n=this.Db.get(t);e.Wb.set(t,{We:n||[],jb:s})}return e}}function ei(h,t){h.ie=t,h.Cb.forEach(i=>{i.ie=t})}function Mi(h){const t={value:h.Ot[3],time:h.wb};return h.yb!==void 0&&(t.customValues=h.yb),t}function gs(h){const t=Mi(h);return h.O!==void 0&&(t.color=h.O),t}function on(h){const t=Mi(h);return h.lt!==void 0&&(t.lineColor=h.lt),h.ys!==void 0&&(t.topColor=h.ys),h.Cs!==void 0&&(t.bottomColor=h.Cs),t}function ln(h){const t=Mi(h);return h.Ce!==void 0&&(t.topLineColor=h.Ce),h.Te!==void 0&&(t.bottomLineColor=h.Te),h.Me!==void 0&&(t.topFillColor1=h.Me),h.xe!==void 0&&(t.topFillColor2=h.xe),h.Se!==void 0&&(t.bottomFillColor1=h.Se),h.ke!==void 0&&(t.bottomFillColor2=h.ke),t}function Zs(h){const t={open:h.Ot[0],high:h.Ot[1],low:h.Ot[2],close:h.Ot[3],time:h.wb};return h.yb!==void 0&&(t.customValues=h.yb),t}function an(h){const t=Zs(h);return h.O!==void 0&&(t.color=h.O),t}function un(h){const t=Zs(h),{O:i,At:s,Hh:e}=h;return i!==void 0&&(t.color=i),s!==void 0&&(t.borderColor=s),e!==void 0&&(t.wickColor=e),t}function ci(h){return{Area:on,Line:gs,Baseline:ln,Histogram:gs,Bar:an,Candlestick:un,Custom:cn}[h]}function cn(h){const t=h.wb;return Object.assign(Object.assign({},h.We),{time:t})}const dn={vertLine:{color:"#9598A1",width:1,style:3,visible:!0,labelVisible:!0,labelBackgroundColor:"#131722"},horzLine:{color:"#9598A1",width:1,style:3,visible:!0,labelVisible:!0,labelBackgroundColor:"#131722"},mode:1},fn={vertLines:{color:"#D6DCDE",style:0,visible:!0},horzLines:{color:"#D6DCDE",style:0,visible:!0}},mn={background:{type:"solid",color:"#FFFFFF"},textColor:"#191919",fontSize:12,fontFamily:di},hi={autoScale:!0,mode:0,invertScale:!1,alignLabels:!0,borderVisible:!0,borderColor:"#2B2B43",entireTextOnly:!1,visible:!1,ticksVisible:!1,scaleMargins:{bottom:.1,top:.2},minimumWidth:0},vn={rightOffset:0,barSpacing:6,minBarSpacing:.5,fixLeftEdge:!1,fixRightEdge:!1,lockVisibleTimeRangeOnResize:!1,rightBarStaysOnScroll:!1,borderVisible:!0,borderColor:"#2B2B43",visible:!0,timeVisible:!1,secondsVisible:!0,shiftVisibleRangeOnNewBar:!0,allowShiftVisibleRangeOnWhitespaceReplacement:!1,ticksVisible:!1,uniformDistribution:!1,minimumHeight:0,allowBoldLabels:!0},pn={color:"rgba(0, 0, 0, 0)",visible:!1,fontSize:48,fontFamily:di,fontStyle:"",text:"",horzAlign:"center",vertAlign:"center"};function ws(){return{width:0,height:0,autoSize:!1,layout:mn,crosshair:dn,grid:fn,overlayPriceScales:Object.assign({},hi),leftPriceScale:Object.assign(Object.assign({},hi),{visible:!1}),rightPriceScale:Object.assign(Object.assign({},hi),{visible:!0}),timeScale:vn,watermark:pn,localization:{locale:G?navigator.language:"",dateFormat:"dd MMM 'yy"},handleScroll:{mouseWheel:!0,pressedMouseMove:!0,horzTouchDrag:!0,vertTouchDrag:!0},handleScale:{axisPressedMouseMove:{time:!0,price:!0},axisDoubleClickReset:{time:!0,price:!0},mouseWheel:!0,pinch:!0},kineticScroll:{mouse:!1,touch:!0},trackingMode:{exitMode:1}}}class bn{constructor(t,i){this.Ub=t,this.qb=i}applyOptions(t){this.Ub.$t().Lc(this.qb,t)}options(){return this.zi().W()}width(){return Tt(this.qb)?this.Ub.sb(this.qb):0}zi(){return p(this.Ub.$t().Ec(this.qb)).Dt}}function _s(h,t,i){const s=Us(h,["time","originalTime"]),e=Object.assign({time:t},s);return i!==void 0&&(e.originalTime=i),e}const gn={color:"#FF0000",price:0,lineStyle:2,lineWidth:1,lineVisible:!0,axisLabelVisible:!0,title:"",axisLabelColor:"",axisLabelTextColor:""};class wn{constructor(t){this.Vh=t}applyOptions(t){this.Vh.Eh(t)}options(){return this.Vh.W()}Yb(){return this.Vh}}class _n{constructor(t,i,s,e,n){this.Xb=new M,this.Is=t,this.Kb=i,this.Zb=s,this.N_=n,this.Gb=e}S(){this.Xb.S()}priceFormatter(){return this.Is.ca()}priceToCoordinate(t){const i=this.Is.Ct();return i===null?null:this.Is.Dt().Rt(t,i.Ot)}coordinateToPrice(t){const i=this.Is.Ct();return i===null?null:this.Is.Dt().fn(t,i.Ot)}barsInLogicalRange(t){if(t===null)return null;const i=new J(new nt(t.from,t.to)).iu(),s=this.Is.Vn();if(s.Ei())return null;const e=s.il(i.Rs(),1),n=s.il(i.ui(),-1),r=p(s.Jh()),o=p(s.An());if(e!==null&&n!==null&&e.ie>n.ie)return{barsBefore:t.from-r,barsAfter:o-t.to};const l={barsBefore:e===null||e.ie===r?t.from-r:e.ie-r,barsAfter:n===null||n.ie===o?o-t.to:o-n.ie};return e!==null&&n!==null&&(l.from=e.wb,l.to=n.wb),l}setData(t){this.N_,this.Is.Yh(),this.Kb.Jb(this.Is,t),this.Qb("full")}update(t){this.Is.Yh(),this.Kb.tw(this.Is,t),this.Qb("update")}dataByIndex(t,i){const s=this.Is.Vn().il(t,i);return s===null?null:ci(this.seriesType())(s)}data(){const t=ci(this.seriesType());return this.Is.Vn().Qs().map(i=>t(i))}subscribeDataChanged(t){this.Xb.l(t)}unsubscribeDataChanged(t){this.Xb.v(t)}setMarkers(t){this.N_;const i=t.map(s=>_s(s,this.N_.convertHorzItemToInternal(s.time),s.time));this.Is.Zl(i)}markers(){return this.Is.Gl().map(t=>_s(t,t.originalTime,void 0))}applyOptions(t){this.Is.Eh(t)}options(){return W(this.Is.W())}priceScale(){return this.Zb.priceScale(this.Is.Dt().xa())}createPriceLine(t){const i=R(W(gn),t),s=this.Is.Jl(i);return new wn(s)}removePriceLine(t){this.Is.Ql(t.Yb())}seriesType(){return this.Is.Yh()}attachPrimitive(t){this.Is.ba(t),t.attached&&t.attached({chart:this.Gb,series:this,requestUpdate:()=>this.Is.$t().$l()})}detachPrimitive(t){this.Is.wa(t),t.detached&&t.detached()}Qb(t){this.Xb.M()&&this.Xb.m(t)}}class Sn{constructor(t,i,s){this.iw=new M,this.uu=new M,this.um=new M,this.Hi=t,this.wl=t.St(),this.Um=i,this.wl.Ku().l(this.nw.bind(this)),this.wl.Zu().l(this.sw.bind(this)),this.Um.Mm().l(this.ew.bind(this)),this.N_=s}S(){this.wl.Ku().p(this),this.wl.Zu().p(this),this.Um.Mm().p(this),this.iw.S(),this.uu.S(),this.um.S()}scrollPosition(){return this.wl.Lu()}scrollToPosition(t,i){i?this.wl.qu(t,1e3):this.Hi.Zn(t)}scrollToRealTime(){this.wl.Uu()}getVisibleRange(){const t=this.wl.yu();return t===null?null:{from:t.from.originalTime,to:t.to.originalTime}}setVisibleRange(t){const i={from:this.N_.convertHorzItemToInternal(t.from),to:this.N_.convertHorzItemToInternal(t.to)},s=this.wl.Ru(i);this.Hi.ad(s)}getVisibleLogicalRange(){const t=this.wl.ku();return t===null?null:{from:t.Rs(),to:t.ui()}}setVisibleLogicalRange(t){A(t.from<=t.to,"The from index cannot be after the to index."),this.Hi.ad(t)}resetTimeScale(){this.Hi.Xn()}fitContent(){this.Hi.Qu()}logicalToCoordinate(t){const i=this.Hi.St();return i.Ei()?null:i.It(t)}coordinateToLogical(t){return this.wl.Ei()?null:this.wl.Vu(t)}timeToCoordinate(t){const i=this.N_.convertHorzItemToInternal(t),s=this.wl.ya(i,!1);return s===null?null:this.wl.It(s)}coordinateToTime(t){const i=this.Hi.St(),s=i.Vu(t),e=i.$i(s);return e===null?null:e.originalTime}width(){return this.Um.Up().width}height(){return this.Um.Up().height}subscribeVisibleTimeRangeChange(t){this.iw.l(t)}unsubscribeVisibleTimeRangeChange(t){this.iw.v(t)}subscribeVisibleLogicalRangeChange(t){this.uu.l(t)}unsubscribeVisibleLogicalRangeChange(t){this.uu.v(t)}subscribeSizeChange(t){this.um.l(t)}unsubscribeSizeChange(t){this.um.v(t)}applyOptions(t){this.wl.Eh(t)}options(){return Object.assign(Object.assign({},W(this.wl.W())),{barSpacing:this.wl.ee()})}nw(){this.iw.M()&&this.iw.m(this.getVisibleRange())}sw(){this.uu.M()&&this.uu.m(this.getVisibleLogicalRange())}ew(t){this.um.m(t.width,t.height)}}function yn(h){if(h===void 0||h.type==="custom")return;const t=h;t.minMove!==void 0&&t.precision===void 0&&(t.precision=function(i){if(i>=1)return 0;let s=0;for(;s<8;s++){const e=Math.round(i);if(Math.abs(e-i)<1e-8)return s;i*=10}return s}(t.minMove))}function Ss(h){return function(t){if(ft(t.handleScale)){const s=t.handleScale;t.handleScale={axisDoubleClickReset:{time:s,price:s},axisPressedMouseMove:{time:s,price:s},mouseWheel:s,pinch:s}}else if(t.handleScale!==void 0){const{axisPressedMouseMove:s,axisDoubleClickReset:e}=t.handleScale;ft(s)&&(t.handleScale.axisPressedMouseMove={time:s,price:s}),ft(e)&&(t.handleScale.axisDoubleClickReset={time:e,price:e})}const i=t.handleScroll;ft(i)&&(t.handleScroll={horzTouchDrag:i,vertTouchDrag:i,mouseWheel:i,pressedMouseMove:i})}(h),h}class Mn{constructor(t,i,s){this.rw=new Map,this.hw=new Map,this.lw=new M,this.aw=new M,this.ow=new M,this._w=new rn(i);const e=s===void 0?W(ws()):R(W(ws()),Ss(s));this.N_=i,this.Ub=new Gh(t,e,i),this.Ub.Wp().l(r=>{this.lw.M()&&this.lw.m(this.uw(r()))},this),this.Ub.jp().l(r=>{this.aw.M()&&this.aw.m(this.uw(r()))},this),this.Ub.jc().l(r=>{this.ow.M()&&this.ow.m(this.uw(r()))},this);const n=this.Ub.$t();this.cw=new Sn(n,this.Ub.Gm(),this.N_)}remove(){this.Ub.Wp().p(this),this.Ub.jp().p(this),this.Ub.jc().p(this),this.cw.S(),this.Ub.S(),this.rw.clear(),this.hw.clear(),this.lw.S(),this.aw.S(),this.ow.S(),this._w.S()}resize(t,i,s){this.autoSizeActive()||this.Ub.Ym(t,i,s)}addCustomSeries(t,i){const s=X(t),e=Object.assign(Object.assign({},ys),s.defaultOptions());return this.dw("Custom",e,i,s)}addAreaSeries(t){return this.dw("Area",oe,t)}addBaselineSeries(t){return this.dw("Baseline",le,t)}addBarSeries(t){return this.dw("Bar",ne,t)}addCandlestickSeries(t={}){return function(i){i.borderColor!==void 0&&(i.borderUpColor=i.borderColor,i.borderDownColor=i.borderColor),i.wickColor!==void 0&&(i.wickUpColor=i.wickColor,i.wickDownColor=i.wickColor)}(t),this.dw("Candlestick",he,t)}addHistogramSeries(t){return this.dw("Histogram",ae,t)}addLineSeries(t){return this.dw("Line",re,t)}removeSeries(t){const i=O(this.rw.get(t)),s=this._w.ld(i);this.Ub.$t().ld(i),this.fw(s),this.rw.delete(t),this.hw.delete(i)}Jb(t,i){this.fw(this._w.Vb(t,i))}tw(t,i){this.fw(this._w.Eb(t,i))}subscribeClick(t){this.lw.l(t)}unsubscribeClick(t){this.lw.v(t)}subscribeCrosshairMove(t){this.ow.l(t)}unsubscribeCrosshairMove(t){this.ow.v(t)}subscribeDblClick(t){this.aw.l(t)}unsubscribeDblClick(t){this.aw.v(t)}priceScale(t){return new bn(this.Ub,t)}timeScale(){return this.cw}applyOptions(t){this.Ub.Eh(Ss(t))}options(){return this.Ub.W()}takeScreenshot(){return this.Ub.ib()}autoSizeActive(){return this.Ub.hb()}chartElement(){return this.Ub.lb()}paneSize(){const t=this.Ub.ob();return{height:t.height,width:t.width}}setCrosshairPosition(t,i,s){const e=this.rw.get(s);if(e===void 0)return;const n=this.Ub.$t()._r(e);n!==null&&this.Ub.$t().td(t,i,n)}clearCrosshairPosition(){this.Ub.$t().nd(!0)}dw(t,i,s={},e){yn(s.priceFormat);const n=R(W(Ms),W(i),s),r=this.Ub.$t().rd(t,n,e),o=new _n(r,this,this,this,this.N_);return this.rw.set(o,r),this.hw.set(r,o),o}fw(t){const i=this.Ub.$t();i.sd(t.St.Au,t.St.Hb,t.St.$b),t.Wb.forEach((s,e)=>e.J(s.We,s.jb)),i.Iu()}pw(t){return O(this.hw.get(t))}uw(t){const i=new Map;t.xb.forEach((e,n)=>{const r=n.Yh(),o=ci(r)(e);if(r!=="Custom")A(function(l){return l.open!==void 0||l.value!==void 0}(o));else{const l=n.Ma();A(!l||l(o)===!1)}i.set(this.pw(n),o)});const s=t.Mb===void 0?void 0:this.pw(t.Mb);return{time:t.wb,logical:t.ie,point:t.gb,hoveredSeries:s,hoveredObjectId:t.Sb,seriesData:i,sourceEvent:t.kb}}}function zn(h,t,i){let s;if(ut(h)){const n=document.getElementById(h);A(n!==null,`Cannot find element in DOM with id=${h}`),s=n}else s=h;const e=new Mn(s,t,i);return t.setOptions(e.options()),e}function kn(h,t){return zn(h,new os,os.Pd(t))}Object.assign(Object.assign({},Ms),ys);const xn={class:"dark:bg-gray-700 bg-white grid grid-cols-1 gap-6 border dark:border-gray-600 rounded py-4 px-6"},Cn={class:"text-sm font-medium text-gray-500 dark:text-gray-400 truncate"},En={class:"text-sm font-semibold text-gray-900 dark:text-gray-100"},Tn=Qs({__name:"KeyValueTableSimple",props:{data:{}},setup(h){return(t,i)=>(Dt(),It("dl",xn,[(Dt(!0),It(Xs,null,qs(t.data,(s,e)=>(Dt(),It("div",{key:e,class:"flex justify-between items-center"},[Oi("div",Cn,ki(s[0]),1),Oi("div",En,ki(s[1]),1)]))),128))]))}}),Nn={width:800,height:380,crosshair:{mode:ni.Normal}},Rn={chart:{layout:{background:{color:"#ffffff"},textColor:"rgba(33, 56, 77, 1)"},grid:{vertLines:{color:"#f1f1f1",visible:!1},horzLines:{color:"#f1f1f1",visible:!1}},priceScale:{borderColor:"rgba(197, 203, 206, 0.6)"},timeScale:{borderColor:"rgba(197, 203, 206, 0.6)",timeVisible:!0,secondsVisible:!1}},series:{color:"#4f46e5"}},Bn={chart:{layout:{background:{color:"#333333"},textColor:"#D1D5DB"},grid:{vertLines:{color:"#525252",visible:!1},horzLines:{color:"#525252",visible:!1}},priceScale:{borderColor:"#525252"},timeScale:{borderColor:"#525252",timeVisible:!0,secondsVisible:!1}},series:{color:"#818CF8"}};export{kn as T,Tn as _,Bn as d,Rn as l,Nn as s}; diff --git a/jesse/static/_nuxt/Bd2bx7A5.js b/jesse/static/_nuxt/Bd2bx7A5.js new file mode 100644 index 000000000..62b0d70a5 --- /dev/null +++ b/jesse/static/_nuxt/Bd2bx7A5.js @@ -0,0 +1 @@ +import{a as e,o,c as t,b as s,G as c}from"./CtfKdue9.js";const n={},r={class:"py-10 mx-auto"},l={class:"mx-auto max-w-7xl px-2 md:px-8"},_={class:"max-w-[600px] mx-auto"};function d(a,m){return o(),t("div",r,[s("main",null,[s("div",l,[s("div",_,[c(a.$slots,"default")])])])])}const x=e(n,[["render",d]]);export{x as S}; diff --git a/jesse/static/_nuxt/BhE9eUkV.js b/jesse/static/_nuxt/BhE9eUkV.js new file mode 100644 index 000000000..77b97503e --- /dev/null +++ b/jesse/static/_nuxt/BhE9eUkV.js @@ -0,0 +1 @@ +import{a as r,o as t,c as o,G as s,b as a}from"./CtfKdue9.js";const c={},n={class:"text-center rounded border-2 border-dashed border-gray-300 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 py-4 text-sm"},d=a("span",{class:"text-gray-400"}," Empty ",-1);function _(e,l){return t(),o("div",n,[s(e.$slots,"default",{},()=>[d])])}const b=r(c,[["render",_]]);export{b as _}; diff --git a/jesse/static/_nuxt/C8vHj9Ei.js b/jesse/static/_nuxt/BiSy5BNH.js similarity index 76% rename from jesse/static/_nuxt/C8vHj9Ei.js rename to jesse/static/_nuxt/BiSy5BNH.js index 39681a3c3..4262ada16 100644 --- a/jesse/static/_nuxt/C8vHj9Ei.js +++ b/jesse/static/_nuxt/BiSy5BNH.js @@ -1 +1 @@ -import{h as n,T as r,a9 as c,o as i,c as p}from"./DbTgESvQ.js";const _=n({__name:"index",setup(u){const a=r(),e=c(),t=Object.keys(e.tabs);if(t.length>0){const s=t[0],o=e.tabs[s];a.push({path:`/live/${o.id}`})}else e.addTab();return(s,o)=>(i(),p("div"))}});export{_ as default}; +import{h as n,Z as r,ae as c,o as i,c as p}from"./CtfKdue9.js";const _=n({__name:"index",setup(u){const a=r(),e=c(),t=Object.keys(e.tabs);if(t.length>0){const s=t[0],o=e.tabs[s];a.push({path:`/live/${o.id}`})}else e.addTab();return(s,o)=>(i(),p("div"))}});export{_ as default}; diff --git a/jesse/static/_nuxt/BkF6Vqx3.js b/jesse/static/_nuxt/BkF6Vqx3.js deleted file mode 100644 index f98dc04b5..000000000 --- a/jesse/static/_nuxt/BkF6Vqx3.js +++ /dev/null @@ -1 +0,0 @@ -import{o as s,c as l,b as t,h as U,y as w,t as $,n as v,l as a,p as ee,g as te,a as T,ab as oe,ac as I,an as J,ao as P,N as D,ad as se,ae,af as R,ag as ne,ai as y,H as f,J as i,ah as B,e as N,F as L,j as z,k as j,ap as re,aq as le,V as ie,D as de,a0 as ce,r as A,d as c,w as M,I as ue,m as pe,v as ge,X as me,L as S,aa as fe,a2 as he,Q as be,R as ve,a3 as ye,M as ke}from"./DbTgESvQ.js";function _e(e,o){return s(),l("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184"})])}function we(e,o){return s(),l("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 3v1.5M3 21v-6m0 0 2.77-.693a9 9 0 0 1 6.208.682l.108.054a9 9 0 0 0 6.086.71l3.114-.732a48.524 48.524 0 0 1-.005-10.499l-3.11.732a9 9 0 0 1-6.085-.711l-.108-.054a9 9 0 0 0-6.208-.682L3 4.5M3 15V4.5"})])}function $e(e,o){return s(),l("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}const xe={wrapper:"w-full relative overflow-hidden",inner:"w-0 flex-1",title:"text-sm font-medium",description:"mt-1 text-sm leading-4 opacity-90",actions:"flex items-center gap-2 mt-3 flex-shrink-0",shadow:"",rounded:"rounded-lg",padding:"p-4",gap:"gap-3",icon:{base:"flex-shrink-0 w-5 h-5"},avatar:{base:"flex-shrink-0 self-center",size:"md"},color:{white:{solid:"text-gray-900 dark:text-white bg-white dark:bg-gray-900 ring-1 ring-gray-200 dark:ring-gray-800"}},variant:{solid:"bg-{color}-500 dark:bg-{color}-400 text-white dark:text-gray-900",outline:"text-{color}-500 dark:text-{color}-400 ring-1 ring-inset ring-{color}-500 dark:ring-{color}-400",soft:"bg-{color}-50 dark:bg-{color}-400 dark:bg-opacity-10 text-{color}-500 dark:text-{color}-400",subtle:"bg-{color}-50 dark:bg-{color}-400 dark:bg-opacity-10 text-{color}-500 dark:text-{color}-400 ring-1 ring-inset ring-{color}-500 dark:ring-{color}-400 ring-opacity-25 dark:ring-opacity-25"},default:{color:"white",variant:"solid",icon:null,closeButton:null,actionButton:{size:"xs",color:"primary",variant:"link"}}},Ce=e=>(ee("data-v-88f4951a"),e=e(),te(),e),Be=Ce(()=>t("div",{class:"left-half-clipper"},[t("div",{class:"first50-bar"}),t("div",{class:"value-bar"})],-1)),Me=U({__name:"CircleProgressbar",props:{progress:{}},setup(e){const o=e,d=w(()=>{let u="progress-circle";return o.progress>50&&(u+=" over50"),u+=` p${Math.round(o.progress)}`,u});return(u,x)=>(s(),l("div",{class:v(a(d))},[t("span",null,$(u.progress)+"%",1),Be],2))}}),nt=T(Me,[["__scopeId","data-v-88f4951a"]]),h=oe(I.ui.strategy,I.ui.alert,xe),Ve=U({components:{UIcon:J,UAvatar:P,UButton:D},inheritAttrs:!1,props:{title:{type:String,default:null},description:{type:String,default:null},icon:{type:String,default:()=>h.default.icon},avatar:{type:Object,default:null},closeButton:{type:Object,default:()=>h.default.closeButton},actions:{type:Array,default:()=>[]},color:{type:String,default:()=>h.default.color,validator(e){return[...I.ui.colors,...Object.keys(h.color)].includes(e)}},variant:{type:String,default:()=>h.default.variant,validator(e){return[...Object.keys(h.variant),...Object.values(h.color).flatMap(o=>Object.keys(o))].includes(e)}},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},emits:["close"],setup(e){const{ui:o,attrs:d}=se("alert",ae(e,"ui"),h),u=w(()=>{var k,g;const n=((g=(k=o.value.color)==null?void 0:k[e.color])==null?void 0:g[e.variant])||o.value.variant[e.variant];return R(ne(o.value.wrapper,o.value.rounded,o.value.shadow,o.value.padding,n==null?void 0:n.replaceAll("{color}",e.color)),e.class)});function x(n){n.click&&n.click()}return{ui:o,attrs:d,alertClass:u,onAction:x,twMerge:R}}});function Se(e,o,d,u,x,n){const k=J,g=P,b=D;return s(),l("div",B({class:e.alertClass},e.attrs),[t("div",{class:v(["flex",[e.ui.gap,{"items-start":e.description||e.$slots.description,"items-center":!e.description&&!e.$slots.description}]])},[y(e.$slots,"icon",{icon:e.icon},()=>[e.icon?(s(),f(k,{key:0,name:e.icon,ui:e.ui.icon.base},null,8,["name","ui"])):i("",!0)]),y(e.$slots,"avatar",{avatar:e.avatar},()=>[e.avatar?(s(),f(g,B({key:0},{size:e.ui.avatar.size,...e.avatar},{class:e.ui.avatar.base}),null,16,["class"])):i("",!0)]),t("div",{class:v(e.ui.inner)},[e.title||e.$slots.title?(s(),l("p",{key:0,class:v(e.ui.title)},[y(e.$slots,"title",{title:e.title},()=>[N($(e.title),1)])],2)):i("",!0),e.description||e.$slots.description?(s(),l("p",{key:1,class:v(e.twMerge(e.ui.description,!(e.title&&e.$slots.title)&&"mt-0 leading-5"))},[y(e.$slots,"description",{description:e.description},()=>[N($(e.description),1)])],2)):i("",!0),(e.description||e.$slots.description)&&e.actions.length?(s(),l("div",{key:2,class:v(e.ui.actions)},[(s(!0),l(L,null,z(e.actions,(p,C)=>(s(),f(b,B({key:C},{...e.ui.default.actionButton||{},...p},{onClick:j(V=>e.onAction(p),["stop"])}),null,16,["onClick"]))),128))],2)):i("",!0)],2),e.closeButton||!e.description&&!e.$slots.description&&e.actions.length?(s(),l("div",{key:0,class:v(e.twMerge(e.ui.actions,"mt-0"))},[!e.description&&!e.$slots.description&&e.actions.length?(s(!0),l(L,{key:0},z(e.actions,(p,C)=>(s(),f(b,B({key:C},{...e.ui.default.actionButton||{},...p},{onClick:j(V=>e.onAction(p),["stop"])}),null,16,["onClick"]))),128)):i("",!0),e.closeButton?(s(),f(b,B({key:1,"aria-label":"Close"},{...e.ui.default.closeButton||{},...e.closeButton},{onClick:o[0]||(o[0]=j(p=>e.$emit("close"),["stop"]))}),null,16)):i("",!0)],2)):i("",!0)],2)],16)}const Ue=T(Ve,[["render",Se]]),je={class:"w-full flex justify-between items-center"},Ae=["textContent"],Ie=t("div",{class:"w-full flex items-center","aria-hidden":"true"},[t("div",{class:"w-full border-t-2 border-dashed border-gray-300 dark:border-gray-600"})],-1),Le={class:"whitespace-nowrap ml-2"},Te=U({__name:"DividerWithButtons",props:{title:{}},setup(e){return(o,d)=>(s(),l("div",je,[t("span",{class:"pr-3 bg-gray-50 dark:bg-backdrop-dark text-lg font-semibold text-gray-900 dark:text-gray-200",textContent:$(o.title)},null,8,Ae),Ie,t("span",Le,[y(o.$slots,"default")])]))}}),De={key:0,class:"mb-4"},Oe=t("p",null," If the exception you're seeing is not clear and you think it might be a bug, please send us a report to help us debugging and fixing it in a future release. ",-1),Ee=t("br",null,null,-1),He=t("label",{class:"font-semibold"},"Exception:",-1),Re=["innerHTML"],Ne={class:"flex justify-end"},ze=t("span",null,"Report",-1),Je={class:"rounded-md bg-red-50 p-4 my-4 select-text"},Pe={class:"flex"},Fe={class:"flex-shrink-0"},qe={class:"ml-3 overflow-hidden w-full"},We=["textContent"],Ge=["innerHTML"],Qe=["value"],rt=U({__name:"Exception",props:re({title:String,content:{type:String,default:""},mode:String,debugMode:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=e,d=le(e,"modelValue"),u=w(()=>ie().params.id),x=de(),n=ce({description:"",attachLogs:!0,email:""}),k=A(!1),g=A(!1),b=A(!1),p=w(()=>o.mode==="backtest"&&!o.debugMode?{message:'It is highly recommended to attach log files with reports. To do that, press cancel, enable "Debug Mode", and run again. ',type:"warning"}:{message:"",type:""}),C=w(()=>o.mode==="backtest"&&o.debugMode||o.mode==="live"),V=w(()=>x.hasLivePluginInstalled),F=async()=>{b.value=!0;const{data:O,error:r}=await me("/report-exception",{description:n.description,email:n.email,traceback:o.content,mode:o.mode,attach_logs:n.attachLogs,session_id:u},!0);if(b.value=!1,r.value&&r.value.statusCode!==200){S("error",`[${r.value.statusCode}]: ${r.value.message}`);return}const _=O.value;_.data.status==="success"?(n.description="",n.email="",S("success",_.data.message),d.value=!1):_.data.status==="error"&&S("error",_.data.message)},q=()=>{navigator.clipboard.writeText(o.content),S("success","Copied successfully"),g.value=!0,setTimeout(()=>{g.value=!1},2e3)},W=()=>{d.value=!0};return(O,r)=>{const _=Ue,G=fe,E=he,Q=be,X=ve,H=D,Z=ye,K=ke,Y=Te;return s(),l(L,null,[c(K,{modelValue:d.value,"onUpdate:modelValue":r[5]||(r[5]=m=>d.value=m),title:"Report"},{default:M(()=>[a(p).message?(s(),l("div",De,[c(_,{color:"teal",icon:"i-heroicons-check-circle",title:a(p).message,"close-button":{icon:"i-heroicons-x-mark-20-solid",color:"white",variant:"link"},onClose:r[0]||(r[0]=m=>a(p).message="")},null,8,["title"])])):i("",!0),Oe,Ee,He,t("pre",{class:"break-all lg:break-normal mt-2 text-sm whitespace-pre-line px-6 py-6 rounded-md bg-gray-50 dark:bg-gray-700 text-gray-700 dark:text-gray-300 dark:border-gray-800 border border-gray-200",innerHTML:e.content},null,8,Re),c(Z,{state:a(n),class:"space-y-4 mt-4",onSubmit:F},{default:M(()=>[c(E,{label:"Description (optional):",name:"Description (optional):"},{default:M(()=>[c(G,{modelValue:a(n).description,"onUpdate:modelValue":r[1]||(r[1]=m=>a(n).description=m),rows:10,placeholder:"Describe how the exception occurred..."},null,8,["modelValue"])]),_:1}),a(V)?i("",!0):(s(),f(E,{key:0,label:"Email (must be registered with on Jesse.Trade)",help:"Enter your email address for us to know who sent the feedback and possibly reply back to you. It must be the email address of your account on Jesse.Trade",required:""},{default:M(()=>[c(Q,{modelValue:a(n).email,"onUpdate:modelValue":r[2]||(r[2]=m=>a(n).email=m),placeholder:"Email address...",type:"email"},null,8,["modelValue"])]),_:1})),a(C)?(s(),f(X,{key:1,modelValue:a(n).attachLogs,"onUpdate:modelValue":r[3]||(r[3]=m=>a(n).attachLogs=m),title:"Attach Debugging Logs",help:"Attach the log file of this session along with this report which helps Jesse's team"},null,8,["modelValue"])):i("",!0),t("div",Ne,[c(H,{id:"feedback-cancel-button",color:"gray",variant:"link",class:"mr-8",label:"Cancel",onClick:r[4]||(r[4]=m=>d.value=!1)}),c(H,{id:"feedback-submit-button",type:"submit",class:"w-48 flex justify-center",label:"Submit",loading:a(b),disabled:!a(n).description.length||!a(n).email.length&&!a(V)},null,8,["loading","disabled"])])]),_:1},8,["state"])]),_:1},8,["modelValue"]),c(Y,{title:"Exception"},{default:M(()=>[t("button",{type:"button",class:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 dark:border-gray-600 text-sm leading-5 font-medium rounded-l-full text-gray-700 dark:text-gray-100 bg-white dark:bg-backdrop-dark hover:bg-gray-50 dark:hover:bg-gray-800 focus:outline-none",onClick:W},[c(a(we),{class:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"}),ze]),t("button",{type:"button",class:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 dark:border-gray-600 text-sm leading-5 font-medium rounded-r-full text-gray-700 dark:text-gray-100 bg-white dark:bg-backdrop-dark hover:bg-gray-50 dark:hover:bg-gray-800 focus:outline-none",onClick:q},[a(g)?(s(),f(a(ue),{key:0,class:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"})):(s(),f(a(_e),{key:1,class:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"})),t("span",null,$(a(g)?"Copied":"Copy"),1)])]),_:1}),t("div",Je,[t("div",Pe,[t("div",Fe,[c(a($e),{class:"h-5 w-5 text-red-400","aria-hidden":"true"})]),t("div",qe,[t("h3",{class:"text-base font-medium text-red-800 mb-6",textContent:$(e.title)},null,8,We),e.content?(s(),l("pre",{key:0,class:"mt-2 text-sm text-red-700 whitespace-pre-line px-6 py-6 rounded-md border-2 border-dashed border-red-200",innerHTML:e.content},null,8,Ge)):i("",!0)])]),pe(t("textarea",{id:"exception-info",value:e.content,class:"fixed left-0 bottom-0 opacity-0"},null,8,Qe),[[ge,a(k)]])])],64)}}}),Xe={},Ze={class:"grid grid-cols-1 gap-4 items-start lg:grid-cols-3 p-6"},Ke={class:"grid grid-cols-1 gap-4 lg:col-span-2 px-1"},Ye={"aria-labelledby":"section-1-title"},et={class:"rounded-lg"},tt={class:"grid grid-cols-1 gap-4"},ot={"aria-labelledby":"section-2-title"};function st(e,o){return s(),l("div",Ze,[t("div",Ke,[t("section",Ye,[t("div",et,[y(e.$slots,"left")])])]),t("div",tt,[t("section",ot,[y(e.$slots,"right")])])])}const lt=T(Xe,[["render",st]]);export{nt as _,rt as a,Ue as b,lt as c,Te as d,_e as r}; diff --git a/jesse/static/_nuxt/BnUfHduR.js b/jesse/static/_nuxt/BnUfHduR.js new file mode 100644 index 000000000..24e8bc3b3 --- /dev/null +++ b/jesse/static/_nuxt/BnUfHduR.js @@ -0,0 +1 @@ +import{u,bp as l}from"./CtfKdue9.js";function f(e,a){const{title:r,titleTemplate:n,...o}=e;return u({title:r,titleTemplate:n,_flatMeta:o},{...a,transform(t){const s=l({...t._flatMeta});return delete t._flatMeta,{...t,meta:s}}})}export{f as u}; diff --git a/jesse/static/_nuxt/BPjMyksS.js b/jesse/static/_nuxt/BpX9-e39.js similarity index 56% rename from jesse/static/_nuxt/BPjMyksS.js rename to jesse/static/_nuxt/BpX9-e39.js index a08293feb..740e1e1c7 100644 --- a/jesse/static/_nuxt/BPjMyksS.js +++ b/jesse/static/_nuxt/BpX9-e39.js @@ -1 +1 @@ -import{h as c,o as l,c as _,d as t,b as e,C as d,w as s,l as m,N as p,e as o,bj as u}from"./DbTgESvQ.js";import{_ as g}from"./De8JykNN.js";import{u as f}from"./C-G9LxTU.js";import{_ as h}from"./Bym0NDoT.js";const x={class:"grid items-start lg:grid-cols-5"},b={class:"grid grid-cols-1 lg:col-span-4 bg-backdrop dark:bg-backdrop-dark"},k={class:"text-center"},S=e("h1",{class:"font-semibold mb-16 text-5xl"}," Strategies ",-1),v={class:"mb-4"},j=c({__name:"index",setup(y){return f({title:"Strategies - Jesse"}),(a,r)=>{const n=p,i=g;return l(),_("section",x,[t(h),e("div",b,[e("div",{class:"flex items-center justify-center select-none",style:d({height:"calc(100vh - 4rem - 4px)"})},[e("div",k,[S,e("div",v,[t(n,{icon:"i-heroicons-plus",onClick:r[0]||(r[0]=B=>("useTempStore"in a?a.useTempStore:m(u))().makeStrategy=!0)},{default:s(()=>[o(" Create a new strategy ")]),_:1}),t(i,{class:"my-6 text-xs"},{default:s(()=>[o(" OR ")]),_:1}),t(n,{icon:"i-heroicons-link",color:"gray",to:"https://jesse.trade/strategies",target:"_blank"},{default:s(()=>[o(" Browse free and premium strategies ")]),_:1})])])],4)])])}}});export{j as default}; +import{h as c,o as l,c as _,d as t,b as e,C as m,w as s,l as d,H as p,e as o,bm as u}from"./CtfKdue9.js";import{_ as g}from"./CsXNC8nX.js";import{u as f}from"./BnUfHduR.js";import{_ as h}from"./oEVPFgVt.js";const x={class:"grid items-start lg:grid-cols-5"},b={class:"grid grid-cols-1 lg:col-span-4 bg-backdrop dark:bg-backdrop-dark"},k={class:"text-center"},S=e("h1",{class:"font-semibold mb-16 text-5xl"}," Strategies ",-1),v={class:"mb-4"},V=c({__name:"index",setup(y){return f({title:"Strategies - Jesse"}),(a,r)=>{const n=p,i=g;return l(),_("section",x,[t(h),e("div",b,[e("div",{class:"flex items-center justify-center select-none",style:m({height:"calc(100vh - 4rem - 4px)"})},[e("div",k,[S,e("div",v,[t(n,{icon:"i-heroicons-plus",onClick:r[0]||(r[0]=B=>("useTempStore"in a?a.useTempStore:d(u))().makeStrategy=!0)},{default:s(()=>[o(" Create a new strategy ")]),_:1}),t(i,{class:"my-6 text-xs"},{default:s(()=>[o(" OR ")]),_:1}),t(n,{icon:"i-heroicons-link",color:"gray",to:"https://jesse.trade/strategies",target:"_blank"},{default:s(()=>[o(" Browse free and premium strategies ")]),_:1})])])],4)])])}}});export{V as default}; diff --git a/jesse/static/_nuxt/BiWymv33.js b/jesse/static/_nuxt/BsGPmCwr.js similarity index 99% rename from jesse/static/_nuxt/BiWymv33.js rename to jesse/static/_nuxt/BsGPmCwr.js index 09aec9644..8b428a2a6 100644 --- a/jesse/static/_nuxt/BiWymv33.js +++ b/jesse/static/_nuxt/BsGPmCwr.js @@ -1,4 +1,4 @@ -import{t as I,m as N}from"./Ddw4NJNB.js";import"./DbTgESvQ.js";/*!----------------------------------------------------------------------------- +import{t as I,m as N}from"./Diw-o0Tt.js";import"./CtfKdue9.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) * Released under the MIT license diff --git a/jesse/static/_nuxt/B0DtmZv3.js b/jesse/static/_nuxt/Bsyc-xU1.js similarity index 98% rename from jesse/static/_nuxt/B0DtmZv3.js rename to jesse/static/_nuxt/Bsyc-xU1.js index 0e6c3ab6f..5d6f3ff12 100644 --- a/jesse/static/_nuxt/B0DtmZv3.js +++ b/jesse/static/_nuxt/Bsyc-xU1.js @@ -1,4 +1,4 @@ -import{m as i}from"./Ddw4NJNB.js";import"./DbTgESvQ.js";/*!----------------------------------------------------------------------------- +import{m as i}from"./Diw-o0Tt.js";import"./CtfKdue9.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) * Released under the MIT license diff --git a/jesse/static/_nuxt/CaMo12fb.js b/jesse/static/_nuxt/BuJV-6eH.js similarity index 81% rename from jesse/static/_nuxt/CaMo12fb.js rename to jesse/static/_nuxt/BuJV-6eH.js index 58c3430c0..487dfa341 100644 --- a/jesse/static/_nuxt/CaMo12fb.js +++ b/jesse/static/_nuxt/BuJV-6eH.js @@ -1 +1 @@ -import{o as e,c as o,b as r}from"./DbTgESvQ.js";function s(t,n){return e(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}export{s as r}; +import{o as e,c as o,b as r}from"./CtfKdue9.js";function s(t,n){return e(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}export{s as r}; diff --git a/jesse/static/_nuxt/a7b7rU9w.js b/jesse/static/_nuxt/Bx5n1Vm4.js similarity index 86% rename from jesse/static/_nuxt/a7b7rU9w.js rename to jesse/static/_nuxt/Bx5n1Vm4.js index bad1f75fa..7607fe313 100644 --- a/jesse/static/_nuxt/a7b7rU9w.js +++ b/jesse/static/_nuxt/Bx5n1Vm4.js @@ -1 +1 @@ -import{o as t,c as s,b as e,h as f,r as u,z as w,a4 as M,a5 as C,L as j,m as A,a6 as $,l as r,K as B,F as x,j as b,t as g,J as _,e as m,a0 as V,a7 as z,d as D,n as L,H as N,a8 as S}from"./DbTgESvQ.js";import{u as H}from"./C-G9LxTU.js";function q(c,o){return t(),s("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.26 10.147a60.438 60.438 0 0 0-.491 6.347A48.62 48.62 0 0 1 12 20.904a48.62 48.62 0 0 1 8.232-4.41 60.46 60.46 0 0 0-.491-6.347m-15.482 0a50.636 50.636 0 0 0-2.658-.813A59.906 59.906 0 0 1 12 3.493a59.903 59.903 0 0 1 10.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0 1 12 13.489a50.702 50.702 0 0 1 7.74-3.342M6.75 15a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm0 0v-3.675A55.378 55.378 0 0 1 12 8.443m-7.007 11.55A5.981 5.981 0 0 0 6.75 15.75v-1.5"})])}function J(c,o){return t(),s("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5"})])}function Z(c,o){return t(),s("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 0 1-1.125-1.125M3.375 19.5h1.5C5.496 19.5 6 18.996 6 18.375m-3.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-1.5A1.125 1.125 0 0 1 18 18.375M20.625 4.5H3.375m17.25 0c.621 0 1.125.504 1.125 1.125M20.625 4.5h-1.5C18.504 4.5 18 5.004 18 5.625m3.75 0v1.5c0 .621-.504 1.125-1.125 1.125M3.375 4.5c-.621 0-1.125.504-1.125 1.125M3.375 4.5h1.5C5.496 4.5 6 5.004 6 5.625m-3.75 0v1.5c0 .621.504 1.125 1.125 1.125m0 0h1.5m-1.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m1.5-3.75C5.496 8.25 6 7.746 6 7.125v-1.5M4.875 8.25C5.496 8.25 6 8.754 6 9.375v1.5m0-5.25v5.25m0-5.25C6 5.004 6.504 4.5 7.125 4.5h9.75c.621 0 1.125.504 1.125 1.125m1.125 2.625h1.5m-1.5 0A1.125 1.125 0 0 1 18 7.125v-1.5m1.125 2.625c-.621 0-1.125.504-1.125 1.125v1.5m2.625-2.625c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125M18 5.625v5.25M7.125 12h9.75m-9.75 0A1.125 1.125 0 0 1 6 10.875M7.125 12C6.504 12 6 12.504 6 13.125m0-2.25C6 11.496 5.496 12 4.875 12M18 10.875c0 .621-.504 1.125-1.125 1.125M18 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m-12 5.25v-5.25m0 5.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125m-12 0v-1.5c0-.621-.504-1.125-1.125-1.125M18 18.375v-5.25m0 5.25v-1.5c0-.621.504-1.125 1.125-1.125M18 13.125v1.5c0 .621.504 1.125 1.125 1.125M18 13.125c0-.621.504-1.125 1.125-1.125M6 13.125v1.5c0 .621-.504 1.125-1.125 1.125M6 13.125C6 12.504 5.496 12 4.875 12m-1.5 0h1.5m-1.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M19.125 12h1.5m0 0c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h1.5m14.25 0h1.5"})])}function R(c,o){return t(),s("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 0 1-2.25 2.25M16.5 7.5V18a2.25 2.25 0 0 0 2.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 0 0 2.25 2.25h13.5M6 7.5h3v3H6v-3Z"})])}function F(c,o){return t(),s("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z"})])}const T=""+new URL("search-by-algolia-light-background.B_nenvU-.svg",import.meta.url).href,U={class:"w-full flex justify-center"},E={class:"mb-4 mt-8 px-2 w-full md:w-2/3"},K={class:"relative"},G=e("div",{class:"absolute left-2 inset-y-0 pl-3 flex items-center"},[e("svg",{class:"fill-current h-6 w-6 text-gray-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[e("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})])],-1),I={key:0,class:"relative"},O={key:0,class:"w-full absolute bg-white p-2 mt-2 border border-gray-300 rounded shadow-md z-50"},P=e("div",{class:"py-4 px-4 text-gray-600"}," Searching ... ",-1),W=[P],Q={key:1,class:"w-full absolute bg-white p-2 mt-2 border border-gray-300 rounded shadow-md z-50"},X=e("div",{class:"py-4 px-4 text-gray-600 flex items-center text-sm md:text-base"},[e("span",{class:"mr-4 text-red-500"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})])]),m(" Something went wrong ")],-1),Y=[X],e1={key:2,class:"w-full absolute bg-white px-2 py-2 mt-2 rounded shadow-lg border border-gray-300 max-h-64 overflow-y-auto z-50"},t1=["href"],s1={class:"px-2 py-4 rounded text-gray-600 hover:bg-indigo-500 hover:text-white"},o1=e("div",{class:"flex justify-end p-2"},[e("img",{src:T,alt:"search by Algolia"})],-1),r1={key:3,class:"w-full absolute bg-white p-2 mt-2 border border-gray-300 rounded shadow-md z-50"},a1=e("div",{class:"py-4 px-4 text-gray-600 flex items-center text-sm md:text-base"},[e("span",{class:"mr-4 text-yellow-300"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})])]),m(" No items were found for the entered phrase. ")],-1),n1=[a1],i1=f({__name:"HelpSearch",setup(c){const o=u(!1),h=u(!1),v=u(!1),l=u([]),i=u(!1),a=u("");w(a,M.debounce(()=>{i.value=!1},1e3)),w(i,p=>{!p&&a.value?k(a.value):l.value&&a.value.length===0&&(l.value=[],o.value=!1)});const k=async p=>{v.value=!1,h.value=!0;const{data:d,error:n}=await C(`https://jesse.trade/api/help/search?item=${p}`);if(n.value&&n.value.statusCode!==200){j("error",n.value.message),o.value=!0,h.value=!1,v.value=!0;return}const y=d.value;o.value=!0,l.value=y,h.value=!1};return(p,d)=>(t(),s("div",U,[e("div",E,[e("div",K,[G,A(e("input",{"onUpdate:modelValue":d[0]||(d[0]=n=>B(a)?a.value=n:null),class:"w-full pl-14 pr-4 py-4 rounded-full outline-none border-2 border-gray-200 focus:border-indigo-600 focus:ring-0 dark:bg-gray-800 dark:border-gray-900",type:"search",placeholder:"Search...",onInput:d[1]||(d[1]=n=>i.value=!0)},null,544),[[$,r(a)]])]),r(a)?(t(),s("div",I,[r(h)?(t(),s("div",O,W)):r(v)&&r(o)?(t(),s("div",Q,Y)):r(l).length!=0&&r(o)?(t(),s("div",e1,[(t(!0),s(x,null,b(r(l),n=>(t(),s("div",{key:n.id},[e("a",{href:"https://jesse.trade/help/faq/"+n.slug,target:"_blank"},[e("div",s1,g(n.title),1)],8,t1)]))),128)),o1])):r(l).length===0&&r(o)?(t(),s("div",r1,n1)):_("",!0)])):_("",!0)])]))}}),l1={class:"container select-none"},c1=e("div",{class:"text-center mt-16"},[e("h3",null,[m(" Need help? Check out the "),e("a",{href:"http://docs.jesse.trade",class:"text-indigo-600 dark:text-indigo-400 hover:underline",target:"_blank"}," docs "),m(" or search the help center: ")])],-1),d1={role:"list",class:"border-gray-200 py-6 grid grid-cols-1 gap-6 sm:grid-cols-2"},u1={class:"relative -m-2 p-2 flex items-center space-x-4 rounded-xl hover:bg-gray-50 dark:hover:bg-gray-800 focus-within:ring-2 focus-within:ring-indigo-500"},h1={class:"text-sm font-medium text-gray-900 dark:text-gray-100"},m1=["href"],v1=e("span",{class:"absolute inset-0","aria-hidden":"true"},null,-1),p1=e("span",{"aria-hidden":"true"}," →",-1),g1={class:"mt-1 text-sm text-gray-600 dark:text-gray-400"},f1=f({__name:"index",setup(c){H({title:"Dashboard - Jesse"});const o=V([{title:"Documentation",description:"Our friendly documentation is the best place to find information about Jesse",icon:q,background:"bg-pink-500",url:"https://docs.jesse.trade/"},{title:"Tutorials",description:"Learn by watching the creator of Jesse writing strategies step-by-step",icon:Z,background:"bg-yellow-500",url:"https://jesse.trade/youtube"},{title:"Discord",description:"Join our friendly Discord community filled with awesome quants",icon:F,background:"bg-green-500",url:"https://jesse.trade/discord"},{title:"Github",description:"Curios to see the source code?",icon:z,background:"bg-blue-500",url:"https://github.com/jesse-ai/jesse"},{title:"News",description:"Keep up with our latest developments",icon:R,background:"bg-indigo-500",url:"https://jesse.trade/blog"},{title:"Roadmap",description:"Wanna know what’s coming next and when?",icon:J,background:"bg-purple-500",url:"https://docs.jesse.trade/docs/roadmap.html"}]);return(h,v)=>{const l=i1;return t(),s("div",l1,[c1,D(l),e("div",null,[e("ul",d1,[(t(!0),s(x,null,b(r(o),(i,a)=>(t(),s("li",{key:a,class:"flow-root"},[e("div",u1,[e("div",{class:L([i.background,"flex-shrink-0 flex items-center justify-center h-16 w-16 rounded-lg"])},[(t(),N(S(i.icon),{class:"h-6 w-6 text-white","aria-hidden":"true"}))],2),e("div",null,[e("h3",h1,[e("a",{href:i.url,target:"_blank",class:"focus:outline-none"},[v1,m(" "+g(i.title),1),p1],8,m1)]),e("p",g1,g(i.description),1)])])]))),128))])])])}}});export{f1 as default}; +import{o as t,c as s,b as e,h as f,r as u,z as w,a9 as M,aa as C,T as j,m as A,ab as $,l as r,S as B,F as x,j as b,t as g,M as _,e as m,a5 as V,ac as z,d as D,n as N,E as S,ad as L}from"./CtfKdue9.js";import{u as q}from"./BnUfHduR.js";function H(c,o){return t(),s("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.26 10.147a60.438 60.438 0 0 0-.491 6.347A48.62 48.62 0 0 1 12 20.904a48.62 48.62 0 0 1 8.232-4.41 60.46 60.46 0 0 0-.491-6.347m-15.482 0a50.636 50.636 0 0 0-2.658-.813A59.906 59.906 0 0 1 12 3.493a59.903 59.903 0 0 1 10.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0 1 12 13.489a50.702 50.702 0 0 1 7.74-3.342M6.75 15a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm0 0v-3.675A55.378 55.378 0 0 1 12 8.443m-7.007 11.55A5.981 5.981 0 0 0 6.75 15.75v-1.5"})])}function Z(c,o){return t(),s("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5"})])}function J(c,o){return t(),s("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 0 1-1.125-1.125M3.375 19.5h1.5C5.496 19.5 6 18.996 6 18.375m-3.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-1.5A1.125 1.125 0 0 1 18 18.375M20.625 4.5H3.375m17.25 0c.621 0 1.125.504 1.125 1.125M20.625 4.5h-1.5C18.504 4.5 18 5.004 18 5.625m3.75 0v1.5c0 .621-.504 1.125-1.125 1.125M3.375 4.5c-.621 0-1.125.504-1.125 1.125M3.375 4.5h1.5C5.496 4.5 6 5.004 6 5.625m-3.75 0v1.5c0 .621.504 1.125 1.125 1.125m0 0h1.5m-1.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m1.5-3.75C5.496 8.25 6 7.746 6 7.125v-1.5M4.875 8.25C5.496 8.25 6 8.754 6 9.375v1.5m0-5.25v5.25m0-5.25C6 5.004 6.504 4.5 7.125 4.5h9.75c.621 0 1.125.504 1.125 1.125m1.125 2.625h1.5m-1.5 0A1.125 1.125 0 0 1 18 7.125v-1.5m1.125 2.625c-.621 0-1.125.504-1.125 1.125v1.5m2.625-2.625c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125M18 5.625v5.25M7.125 12h9.75m-9.75 0A1.125 1.125 0 0 1 6 10.875M7.125 12C6.504 12 6 12.504 6 13.125m0-2.25C6 11.496 5.496 12 4.875 12M18 10.875c0 .621-.504 1.125-1.125 1.125M18 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m-12 5.25v-5.25m0 5.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125m-12 0v-1.5c0-.621-.504-1.125-1.125-1.125M18 18.375v-5.25m0 5.25v-1.5c0-.621.504-1.125 1.125-1.125M18 13.125v1.5c0 .621.504 1.125 1.125 1.125M18 13.125c0-.621.504-1.125 1.125-1.125M6 13.125v1.5c0 .621-.504 1.125-1.125 1.125M6 13.125C6 12.504 5.496 12 4.875 12m-1.5 0h1.5m-1.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M19.125 12h1.5m0 0c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h1.5m14.25 0h1.5"})])}function R(c,o){return t(),s("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 0 1-2.25 2.25M16.5 7.5V18a2.25 2.25 0 0 0 2.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 0 0 2.25 2.25h13.5M6 7.5h3v3H6v-3Z"})])}function T(c,o){return t(),s("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z"})])}const E=""+new URL("search-by-algolia-light-background.B_nenvU-.svg",import.meta.url).href,F={class:"w-full flex justify-center"},U={class:"mb-4 mt-8 px-2 w-full md:w-2/3"},G={class:"relative"},I=e("div",{class:"absolute left-2 inset-y-0 pl-3 flex items-center"},[e("svg",{class:"fill-current h-6 w-6 text-gray-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},[e("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})])],-1),K={key:0,class:"relative"},O={key:0,class:"w-full absolute bg-white p-2 mt-2 border border-gray-300 rounded shadow-md z-50"},P=e("div",{class:"py-4 px-4 text-gray-600"}," Searching ... ",-1),W=[P],Q={key:1,class:"w-full absolute bg-white p-2 mt-2 border border-gray-300 rounded shadow-md z-50"},X=e("div",{class:"py-4 px-4 text-gray-600 flex items-center text-sm md:text-base"},[e("span",{class:"mr-4 text-red-500"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})])]),m(" Something went wrong ")],-1),Y=[X],e1={key:2,class:"w-full absolute bg-white px-2 py-2 mt-2 rounded shadow-lg border border-gray-300 max-h-64 overflow-y-auto z-50"},t1=["href"],s1={class:"px-2 py-4 rounded text-gray-600 hover:bg-indigo-500 hover:text-white"},o1=e("div",{class:"flex justify-end p-2"},[e("img",{src:E,alt:"search by Algolia"})],-1),r1={key:3,class:"w-full absolute bg-white p-2 mt-2 border border-gray-300 rounded shadow-md z-50"},a1=e("div",{class:"py-4 px-4 text-gray-600 flex items-center text-sm md:text-base"},[e("span",{class:"mr-4 text-yellow-300"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})])]),m(" No items were found for the entered phrase. ")],-1),n1=[a1],i1=f({__name:"HelpSearch",setup(c){const o=u(!1),h=u(!1),v=u(!1),l=u([]),i=u(!1),a=u("");w(a,M.debounce(()=>{i.value=!1},1e3)),w(i,p=>{!p&&a.value?k(a.value):l.value&&a.value.length===0&&(l.value=[],o.value=!1)});const k=async p=>{v.value=!1,h.value=!0;const{data:d,error:n}=await C(`https://jesse.trade/api/help/search?item=${p}`);if(n.value&&n.value.statusCode!==200){j("error",n.value.message),o.value=!0,h.value=!1,v.value=!0;return}const y=d.value;o.value=!0,l.value=y,h.value=!1};return(p,d)=>(t(),s("div",F,[e("div",U,[e("div",G,[I,A(e("input",{"onUpdate:modelValue":d[0]||(d[0]=n=>B(a)?a.value=n:null),class:"w-full pl-14 pr-4 py-4 rounded-full outline-none border-2 border-gray-200 focus:border-indigo-600 focus:ring-0 dark:bg-gray-800 dark:border-gray-900",type:"search",placeholder:"Search...",onInput:d[1]||(d[1]=n=>i.value=!0)},null,544),[[$,r(a)]])]),r(a)?(t(),s("div",K,[r(h)?(t(),s("div",O,W)):r(v)&&r(o)?(t(),s("div",Q,Y)):r(l).length!=0&&r(o)?(t(),s("div",e1,[(t(!0),s(x,null,b(r(l),n=>(t(),s("div",{key:n.id},[e("a",{href:"https://jesse.trade/help/faq/"+n.slug,target:"_blank"},[e("div",s1,g(n.title),1)],8,t1)]))),128)),o1])):r(l).length===0&&r(o)?(t(),s("div",r1,n1)):_("",!0)])):_("",!0)])]))}}),l1={class:"container select-none"},c1=e("div",{class:"text-center mt-16"},[e("h3",null,[m(" Need help? Check out the "),e("a",{href:"http://docs.jesse.trade",class:"text-indigo-600 dark:text-indigo-400 hover:underline",target:"_blank"}," docs "),m(" or search the help center: ")])],-1),d1={role:"list",class:"border-gray-200 py-6 grid grid-cols-1 gap-6 sm:grid-cols-2"},u1={class:"relative -m-2 p-2 flex items-center space-x-4 rounded-xl hover:bg-gray-50 dark:hover:bg-gray-800 focus-within:ring-2 focus-within:ring-indigo-500"},h1={class:"text-sm font-medium text-gray-900 dark:text-gray-100"},m1=["href"],v1=e("span",{class:"absolute inset-0","aria-hidden":"true"},null,-1),p1=e("span",{"aria-hidden":"true"}," →",-1),g1={class:"mt-1 text-sm text-gray-600 dark:text-gray-400"},f1=f({__name:"index",setup(c){q({title:"Dashboard - Jesse"});const o=V([{title:"Documentation",description:"Our friendly documentation is the best place to find information about Jesse",icon:H,background:"bg-pink-500",url:"https://docs.jesse.trade/"},{title:"Tutorials",description:"Learn by watching the creator of Jesse writing strategies step-by-step",icon:J,background:"bg-yellow-500",url:"https://jesse.trade/youtube"},{title:"Discord",description:"Join our friendly Discord community filled with awesome quants",icon:T,background:"bg-green-500",url:"https://jesse.trade/discord"},{title:"Github",description:"Curios to see the source code?",icon:z,background:"bg-blue-500",url:"https://github.com/jesse-ai/jesse"},{title:"News",description:"Keep up with our latest developments",icon:R,background:"bg-indigo-500",url:"https://jesse.trade/blog"},{title:"Roadmap",description:"Wanna know what’s coming next and when?",icon:Z,background:"bg-purple-500",url:"https://docs.jesse.trade/docs/roadmap.html"}]);return(h,v)=>{const l=i1;return t(),s("div",l1,[c1,D(l),e("div",null,[e("ul",d1,[(t(!0),s(x,null,b(r(o),(i,a)=>(t(),s("li",{key:a,class:"flow-root"},[e("div",u1,[e("div",{class:N([i.background,"flex-shrink-0 flex items-center justify-center h-16 w-16 rounded-lg"])},[(t(),S(L(i.icon),{class:"h-6 w-6 text-white","aria-hidden":"true"}))],2),e("div",null,[e("h3",h1,[e("a",{href:i.url,target:"_blank",class:"focus:outline-none"},[v1,m(" "+g(i.title),1),p1],8,m1)]),e("p",g1,g(i.description),1)])])]))),128))])])])}}});export{f1 as default}; diff --git a/jesse/static/_nuxt/Bym0NDoT.js b/jesse/static/_nuxt/Bym0NDoT.js deleted file mode 100644 index 5ffab1f79..000000000 --- a/jesse/static/_nuxt/Bym0NDoT.js +++ /dev/null @@ -1 +0,0 @@ -import{o as i,c as d,b as r,bk as h,bl as m,a5 as w,Y as c,X as l,L as p,h as b,y as v,r as _,A as S,m as k,a6 as x,l as u,K as C,F as A,j as B,C as L,H as V,w as M,d as N,t as F,f as H}from"./DbTgESvQ.js";function j(a,t){return i(),d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[r("path",{d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625Z"}),r("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"})])}const y=h("strategies",{state:()=>({strategies:[]}),persist:{storage:m.localStorage},actions:{async getStrategies(){const{data:a,error:t}=await w("/get-strategies",!0);if(t.value&&t.value.statusCode!==200){c(t);return}const e=a.value;this.strategies=e.strategies},async getStrategy(a){const{data:t,error:e}=await l("/get-strategy",{name:a},!0);return e.value&&e.value.statusCode!==200?(c(e),""):t.value.content},async saveStrategy(a,t){const{data:e,error:s}=await l("/save-strategy",{name:a,content:t},!0);if(s.value&&s.value.statusCode!==200){c(s);return}const n=e.value;p("success",n.message)},async deleteStrategy(a){const{data:t,error:e}=await l("/delete-strategy",{name:a},!0);if(e.value&&e.value.statusCode!==200){c(e);return}const s=t.value;p("success",s.message)}}}),D={class:"flex justify-between items-center border-b dark:border-gray-600"},T=b({__name:"StrategiesSidebar",setup(a){const t=v(()=>y().strategies),e=_(""),s=v(()=>t.value.filter(n=>n.toLowerCase().includes(e.value.toLowerCase())));return S(async()=>{setTimeout(async()=>{await y().getStrategies()},200)}),(n,g)=>{const f=H;return i(),d("div",{class:"grid grid-cols-1 overflow-auto border-r dark:border-gray-600",style:L({height:"calc(100vh - 4rem - 4px)"})},[r("section",null,[r("section",null,[r("div",D,[k(r("input",{"onUpdate:modelValue":g[0]||(g[0]=o=>C(e)?e.value=o:null),class:"w-full px-4 py-2 bg-gray-50 focus:outline-none dark:bg-backdrop-dark",placeholder:"Search strategies..."},null,512),[[x,u(e)]])]),(i(!0),d(A,null,B(u(s),o=>(i(),V(f,{key:o,to:`/strategies/${o}`,class:"px-4 py-2 bg-gray-50 dark:bg-backdrop-dark hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer select-none flex items-center"},{default:M(()=>[N(u(j),{class:"w-4 h-4 mr-2"}),r("span",null,F(o),1)]),_:2},1032,["to"]))),128))])])],4)}}});export{T as _,y as u}; diff --git a/jesse/static/_nuxt/C-G9LxTU.js b/jesse/static/_nuxt/C-G9LxTU.js deleted file mode 100644 index 12abf6f4f..000000000 --- a/jesse/static/_nuxt/C-G9LxTU.js +++ /dev/null @@ -1 +0,0 @@ -import{u as s,bm as u}from"./DbTgESvQ.js";function f(e,a){const{title:r,titleTemplate:m,...n}=e;return s({title:r,titleTemplate:m,_flatMeta:n},{...a,transform(t){const o=u({...t._flatMeta});return delete t._flatMeta,{...t,meta:o}}})}export{f as u}; diff --git a/jesse/static/_nuxt/C1SZgowX.js b/jesse/static/_nuxt/C1SZgowX.js deleted file mode 100644 index 77c19e578..000000000 --- a/jesse/static/_nuxt/C1SZgowX.js +++ /dev/null @@ -1 +0,0 @@ -import{a as r,ai as t}from"./DbTgESvQ.js";const a={};function s(e,n){return t(e.$slots,"default")}const c=r(a,[["render",s]]);export{c as default}; diff --git a/jesse/static/_nuxt/C3V0pIhk.js b/jesse/static/_nuxt/C3V0pIhk.js deleted file mode 100644 index a29464d40..000000000 --- a/jesse/static/_nuxt/C3V0pIhk.js +++ /dev/null @@ -1 +0,0 @@ -import{a as r,o as t,c as a,ai as o,b as s}from"./DbTgESvQ.js";const c={},n={class:"text-center rounded border-2 border-dashed border-gray-300 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 py-4 text-sm"},d=s("span",{class:"text-gray-400"}," Empty ",-1);function _(e,l){return t(),a("div",n,[o(e.$slots,"default",{},()=>[d])])}const b=r(c,[["render",_]]);export{b as _}; diff --git a/jesse/static/_nuxt/DkmBeQYg.js b/jesse/static/_nuxt/C4yqxOEs.js similarity index 98% rename from jesse/static/_nuxt/DkmBeQYg.js rename to jesse/static/_nuxt/C4yqxOEs.js index a2cb6908a..717f67ddf 100644 --- a/jesse/static/_nuxt/DkmBeQYg.js +++ b/jesse/static/_nuxt/C4yqxOEs.js @@ -1,4 +1,4 @@ -import{m as p}from"./Ddw4NJNB.js";import"./DbTgESvQ.js";/*!----------------------------------------------------------------------------- +import{m as p}from"./Diw-o0Tt.js";import"./CtfKdue9.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) * Released under the MIT license diff --git a/jesse/static/_nuxt/CGl4vwl9.js b/jesse/static/_nuxt/CGl4vwl9.js new file mode 100644 index 000000000..593e6d74c --- /dev/null +++ b/jesse/static/_nuxt/CGl4vwl9.js @@ -0,0 +1 @@ +import{_ as Z}from"./BhE9eUkV.js";import{h as E,o as a,c as i,E as h,b as c,r as x,N as A,a5 as J,y as K,aq as Q,z as X,d as y,w as R,l as V,F as w,j as C,e as D,M as f,H as I,V as ee,m as te,v as oe,t as b,G as re,n as z}from"./CtfKdue9.js";import{d as ae}from"./uU1M6rQW.js";import{_ as se}from"./Ca0ihDfi.js";const le=["innerHTML"],ze=E({__name:"Logs",props:{logs:{}},setup(_){return(e,k)=>{const d=Z;return e.logs.length?(a(),i("pre",{key:0,class:"whitespace-pre-line rounded border dark:border-gray-600 bg-gray-50 dark:bg-gray-700 select-text text-base dark:text-gray-300 w-full px-4 sm:px-6 py-2",innerHTML:e.logs},null,8,le)):(a(),h(d,{key:1}))}}});function T(_,e){return a(),i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[c("path",{"fill-rule":"evenodd",d:"M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z","clip-rule":"evenodd"})])}const ne={id:"routes-section",class:"select-none"},ie={class:"w-full flex justify-center"},ue=c("span",null,"Trading Route",-1),de=c("span",null,"Data Route",-1),Te=E({__name:"Routes",props:{mode:{},timeframes:{},symbols:{},form:{},results:{},totalRoutesError:{}},setup(_){const e=_,k=x([]),d=x(""),r=A(),v=x({data_routes:e.form.data_routes}),M=x({routes:e.form.routes}),s=J({uniqueRoutesErrorMessage:"each exchange-symbol pair can be traded only once! More info: https://docs.jesse.trade/docs/routes.html#trading-multiple-routes",maxSymbolLengthErrorMessage:"Maximum symbol length is exceeded!",mustContainDashErrorMessage:'Symbol parameter must contain "-" character!',timeframeMustBeDifferentErrorMessage:"Data routes' timeframe and trading routes' timeframe must be different",emptyParameter:"You must fill all the parameters",invalidSymbol:"Symbol is invalid"}),U=K(()=>r.strategies);Q(()=>{v.value={data_routes:e.form.data_routes},M.value={routes:e.form.routes},O(),B()});function O(){e.form.routes.length||e.form.routes.push({symbol:"",timeframe:r.jesseSupportedTimeframes.includes("4h")?"4h":r.jesseSupportedTimeframes[r.jesseSupportedTimeframes.length-1],strategy:r.strategies[0]})}function B(){e.totalRoutesError.splice(0,e.totalRoutesError.length);for(const n of e.form.routes)$(n);if(e.form.data_routes.length>0)for(const n of e.form.data_routes)$(n);let t=!1;const o=e.form.routes;for(const n of o.slice(0,-1)){if(e.totalRoutesError.includes(s.uniqueRoutesErrorMessage)||t)break;for(const g of o.slice(o.indexOf(n)+1))if(n.strategy===g.strategy&&n.symbol===g.symbol&&n.symbol.length!==0){e.totalRoutesError.push(s.uniqueRoutesErrorMessage),t=!1;break}}let m=!1;const p=e.form.data_routes;for(const n of p.slice(0,-1)){if(e.totalRoutesError.includes(s.uniqueRoutesErrorMessage)||m)break;for(const g of p.slice(p.indexOf(n)+1))if(n.timeframe===g.timeframe&&n.symbol===g.symbol){e.totalRoutesError.push(s.uniqueRoutesErrorMessage),m=!0;break}}if(e.form.data_routes.length>0)for(const n of p){if(e.totalRoutesError.includes(s.timeframeMustBeDifferentErrorMessage)||t)break;for(const g of e.form.routes)if(n.symbol===g.symbol&&n.timeframe===g.timeframe){e.totalRoutesError.push(s.timeframeMustBeDifferentErrorMessage),m=!0;break}}}function $(t){!e.totalRoutesError.includes(s.emptyParameter)&&(t.symbol.length==0||t.timeframe.length==0)&&e.totalRoutesError.push(s.emptyParameter)}function j(){e.form.routes.push({symbol:"",timeframe:r.jesseSupportedTimeframes.includes("4h")?"4h":r.jesseSupportedTimeframes[r.jesseSupportedTimeframes.length-1],strategy:r.strategies[0]})}function q(){e.form.data_routes.push({symbol:"",timeframe:r.jesseSupportedTimeframes.includes("4h")?"4h":r.jesseSupportedTimeframes[r.jesseSupportedTimeframes.length-1]})}function L(t){const o=e.form.routes.indexOf(t);e.form.routes.length!==1&&o>-1&&e.form.routes.splice(o,1)}function N(t){const o=e.form.data_routes.indexOf(t);e.form.data_routes.length!==0&&o>-1&&e.form.data_routes.splice(o,1)}function H(t){const o=e.form.routes.indexOf(t),m={strategy:t.strategy,symbol:"",timeframe:t.timeframe};e.form.routes.splice(o+1,0,m)}function P(t){const o=e.form.data_routes.indexOf(t),m={symbol:"",timeframe:t.timeframe};e.form.data_routes.splice(o+1,0,m)}function F(t){const o=e.form.routes.indexOf(t);o!==0&&(e.form.routes[o]=e.form.routes[o-1],e.form.routes[o-1]=t)}function W(t){const o=e.form.data_routes.indexOf(t);o!==0&&(e.form.data_routes[o]=e.form.data_routes[o-1],e.form.data_routes[o-1]=t)}function G(t){const o=e.form.routes.indexOf(t);o!==e.form.routes.length-1&&(e.form.routes[o]=e.form.routes[o+1],e.form.routes[o+1]=t)}function Y(t){const o=e.form.data_routes.indexOf(t);o!==e.form.data_routes.length-1&&(e.form.data_routes[o]=e.form.data_routes[o+1],e.form.data_routes[o+1]=t)}return X(()=>d.value,t=>{if(t.length==0){k.value=[];return}const o=[];for(const m of e.symbols){if(o.length>50)break;m.toLowerCase().startsWith(t.toLowerCase())&&o.push(m)}k.value=o}),(t,o)=>{const m=ae,p=se,n=I,g=ee;return a(),i("div",ne,[y(m,{title:"Routes"},{default:R(()=>[c("div",ie,[c("button",{type:"button",class:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 dark:border-gray-900 text-sm leading-5 font-medium rounded-l-full text-gray-700 dark:text-gray-100 bg-white dark:bg-backdrop-dark hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none",onClick:j},[y(V(T),{class:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"}),ue]),c("button",{type:"button",class:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 dark:border-gray-900 text-sm leading-5 font-medium rounded-r-full text-gray-700 dark:text-gray-100 bg-white dark:bg-backdrop-dark hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none",onClick:q},[y(V(T),{class:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"}),de])])]),_:1}),(a(!0),i(w,null,C(t.form.routes,(l,S)=>(a(),i("div",{key:l.symbol+S,class:"flex mt-4"},[y(p,{modelValue:l.symbol,"onUpdate:modelValue":u=>l.symbol=u,query:d.value,"onUpdate:query":o[0]||(o[0]=u=>d.value=u),"clear-search-on-close":"",class:"w-full",ui:{rounded:"rounded-none rounded-l"},searchable:"","searchable-placeholder":"Search symbols...",size:"lg",options:k.value,placeholder:"Select a symbol...",onChange:o[1]||(o[1]=u=>d.value="")},{empty:R(()=>[D("Start typing...")]),_:2},1032,["modelValue","onUpdate:modelValue","query","options"]),y(p,{modelValue:l.timeframe,"onUpdate:modelValue":u=>l.timeframe=u,class:"w-full",ui:{rounded:"rounded-none"},size:"lg","value-attribute":"value",options:t.timeframes},null,8,["modelValue","onUpdate:modelValue","options"]),y(p,{modelValue:l.strategy,"onUpdate:modelValue":u=>l.strategy=u,class:"w-full",ui:{rounded:"rounded-none rounded-r"},size:"lg",options:U.value,searchable:""},null,8,["modelValue","onUpdate:modelValue","options"]),t.form.routes.length>1?(a(),h(n,{key:0,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-trash",disabled:t.form.routes.length===1,onClick:u=>L(l)},null,8,["disabled","onClick"])):f("",!0),t.form.routes.length>1?(a(),h(n,{key:1,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-document-duplicate",disabled:t.form.routes.length===1,onClick:u=>H(l)},null,8,["disabled","onClick"])):f("",!0),t.form.routes.length>1?(a(),h(n,{key:2,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-arrow-down",disabled:t.form.routes.indexOf(l)===t.form.routes.length-1,onClick:u=>G(l)},null,8,["disabled","onClick"])):f("",!0),t.form.routes.length>1?(a(),h(n,{key:3,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-arrow-up",disabled:t.form.routes.indexOf(l)===0,onClick:u=>F(l)},null,8,["disabled","onClick"])):f("",!0),y(n,{class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-code-bracket",to:`/strategies/${l.strategy}`},null,8,["to"])]))),128)),t.form.data_routes.length?(a(),h(g,{key:0,class:"mt-8 mb-4",title:"Data Routes"})):f("",!0),(a(!0),i(w,null,C(t.form.data_routes,(l,S)=>(a(),i("div",{key:l.symbol+S+l.timeframe,class:"flex mt-4"},[y(p,{modelValue:l.symbol,"onUpdate:modelValue":u=>l.symbol=u,query:d.value,"onUpdate:query":o[2]||(o[2]=u=>d.value=u),"clear-search-on-close":"",class:"w-full",ui:{rounded:"rounded-none rounded-l"},searchable:"",size:"lg",options:k.value,placeholder:"Select a symbol...",onChange:o[3]||(o[3]=u=>d.value="")},{empty:R(()=>[D("Start typing...")]),_:2},1032,["modelValue","onUpdate:modelValue","query","options"]),y(p,{modelValue:l.timeframe,"onUpdate:modelValue":u=>l.timeframe=u,class:"w-full",ui:{rounded:"rounded-none rounded-r"},size:"lg","value-attribute":"value",options:t.timeframes},null,8,["modelValue","onUpdate:modelValue","options"]),y(n,{size:"lg",variant:"link",color:"gray",icon:"i-heroicons-trash",onClick:u=>N(l)},null,8,["onClick"]),t.form.routes.length>1?(a(),h(n,{key:0,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-document-duplicate",onClick:u=>P(l)},null,8,["onClick"])):f("",!0),t.form.data_routes.length>1?(a(),h(n,{key:1,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-arrow-down",disabled:t.form.data_routes.indexOf(l)===t.form.data_routes.length-1,onClick:u=>Y(l)},null,8,["disabled","onClick"])):f("",!0),t.form.data_routes.length>1?(a(),h(n,{key:2,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-arrow-up",disabled:t.form.data_routes.indexOf(l)===0,onClick:u=>W(l)},null,8,["disabled","onClick"])):f("",!0)]))),128))])}}}),me=["textContent"],ce=E({__name:"Tooltip",props:{title:{}},setup(_){const e=x(!1),k=()=>{e.value=!0},d=()=>{e.value=!1};return(r,v)=>(a(),i("span",{class:"relative underline",onMouseenter:k,onMouseleave:d},[te(c("span",{class:"absolute -top-10 z-90 bg-gray-900 rounded px-2 py-1 text-sm text-white",textContent:b(r.title)},null,8,me),[[oe,V(e)]]),re(r.$slots,"default")],32))}}),fe={class:"flex flex-col select-none"},pe={class:"-my-2 overflow-x-auto"},ge={class:"py-2 align-middle inline-block min-w-full"},ye={class:"border dark:border-gray-600 overflow-hidden sm:rounded"},he={class:"min-w-full divide-y divide-gray-200 dark:divide-gray-600 hide-scroll overflow-x-scroll"},ke={key:0,class:"bg-gray-100 dark:bg-gray-800 select-none"},be={key:1},_e=["textContent"],ve=["textContent"],xe=["textContent"],we={key:1},Ce=["textContent"],Re=["textContent"],Ee=["textContent"],Se={key:0,class:"text-center text-xs dark:bg-gray-700 py-4 opacity-30 dark:opacity-75 select-none"},Ue=E({__name:"MultipleValuesTable",props:{header:{type:Boolean},data:{},headerItems:{}},setup(_){return(e,k)=>{const d=ce;return a(),i("div",fe,[c("div",pe,[c("div",ge,[c("div",ye,[c("table",he,[e.header?(a(),i("thead",ke,[c("tr",null,[(a(!0),i(w,null,C(e.headerItems,r=>(a(),i("th",{key:r,scope:"col",class:"px-6 py-3 text-left text-xs font-bold text-gray-500 dark:text-gray-400"},b(r),1))),128))])])):f("",!0),e.data.length?(a(),i("tbody",be,[(a(!0),i(w,null,C(e.data,(r,v)=>(a(),i("tr",{key:v,class:z(["text-gray-900 dark:text-gray-200",v%2===0?"bg-white dark:bg-backdrop-dark":"bg-gray-50 dark:bg-gray-700"])},[(a(!0),i(w,null,C(r,(M,s)=>(a(),i("td",{key:s,class:z(["px-6 py-4 whitespace-nowrap text-sm font-medium",r[s].style])},[r[s].tooltip?(a(),h(d,{key:0,title:r[s].tooltip},{default:R(()=>[r[s].tag==="code"?(a(),i("code",{key:0,class:"rounded border dark:border-gray-600 bg-gray-50 dark:bg-gray-700 select-text text-sm dark:text-gray-300 w-full px-4 sm:px-6 py-2",textContent:b(r[s].value===0?"":r[s].value)},null,8,_e)):r[s].tag==="pre"?(a(),i("pre",{key:1,class:"whitespace-pre-line rounded border dark:border-gray-600 bg-gray-50 dark:bg-gray-700 select-text text-sm dark:text-gray-300 w-full px-4 sm:px-6 py-2",textContent:b(r[s].value===0?"":r[s].value)},null,8,ve)):(a(),i("span",{key:2,textContent:b(r[s].value===0?"":r[s].value)},null,8,xe))]),_:2},1032,["title"])):(a(),i("span",we,[r[s].tag==="code"?(a(),i("code",{key:0,class:"rounded border dark:border-gray-600 bg-gray-50 dark:bg-gray-700 select-text text-sm dark:text-gray-300 w-full px-4 sm:px-6 py-2",textContent:b(r[s].value===0?"":r[s].value)},null,8,Ce)):r[s].tag==="pre"?(a(),i("pre",{key:1,class:"whitespace-pre-line rounded border dark:border-gray-600 bg-gray-50 dark:bg-gray-700 select-text text-sm dark:text-gray-300 w-full px-4 sm:px-6 py-2",textContent:b(r[s].value===0?"":r[s].value)},null,8,Re)):(a(),i("span",{key:2,textContent:b(r[s].value===0?"":r[s].value)},null,8,Ee))]))],2))),128))],2))),128))])):f("",!0)]),e.data.length?f("",!0):(a(),i("div",Se," Empty List "))])])])])}}});export{ze as _,Te as a,Ue as b}; diff --git a/jesse/static/_nuxt/CUxB1w-A.js b/jesse/static/_nuxt/CUxB1w-A.js deleted file mode 100644 index 4070fb54f..000000000 --- a/jesse/static/_nuxt/CUxB1w-A.js +++ /dev/null @@ -1 +0,0 @@ -import{u as V,_ as T}from"./Bym0NDoT.js";import{h as B,r as g,y as S,ar as W,be as F,z as f,b4 as $,bf as j,o as D,c as E,ai as A,J,x as Z,A as q,B as G,bg as I,b as p,d as s,w as d,l as y,K as L,F as P,V as Q,D as X,L as z,bh as Y,Z as ee,t as te,e as b,C as oe,T as ae,N as ne,bi as se}from"./DbTgESvQ.js";import{u as le}from"./C-G9LxTU.js";const ie=B({__name:"MonacoEditor.client",props:{lang:{default:()=>"plaintext"},options:{default:()=>({})},modelValue:{default:()=>""}},emits:["update:modelValue","load"],setup(w,{expose:c,emit:l}){const t=w,u=l,k=g(!0),v=S(()=>t.lang||t.options.language),i=W(),r=g(),a=F(),x={automaticLayout:!0};let e,n;return f(()=>t.modelValue,()=>{(e==null?void 0:e.getValue())!==t.modelValue&&(e==null||e.setValue(t.modelValue))}),f(()=>t.lang,()=>{n&&n.dispose(),n=a.editor.createModel(t.modelValue,v.value),e==null||e.setModel(n)}),f(()=>t.options,()=>{e==null||e.updateOptions($(t.options,x))}),f(r,(C,_)=>{!r.value||_||(e=a.editor.create(r.value,$(t.options,x)),n=a.editor.createModel(t.modelValue,v.value),i.value=e,e.layout(),e.setModel(n),e.onDidChangeModelContent(()=>{u("update:modelValue",e.getValue())}),k.value=!1,u("load",e))}),c({$editor:i}),j(()=>{e==null||e.dispose(),n==null||n.dispose()}),(C,_)=>(D(),E("div",{ref_key:"editorElement",ref:r},[k.value?A(C.$slots,"default",{key:0}):J("",!0)],512))}}),re=se(ie),de={class:"grid items-start lg:grid-cols-5"},ce={class:"grid grid-cols-1 lg:col-span-4 bg-backdrop dark:bg-backdrop-dark"},ue={class:"h-10 flex items-center justify-between px-4"},me={class:"font-semibold"},pe={class:"flex items-center select-none"},ge={class:"overflow-hidden border-l border-t dark:border-gray-600"},he=B({__name:"[name]",setup(w){const c=g(!1),l=S(()=>Q().params.name),t=g(""),u=g(""),k=Z(),v=S(()=>k.value==="light"?"vs-light":"vs-dark"),i=g();le({title:`${l.value} - Jesse`}),f(v,o=>{i.value.$editor.updateOptions({theme:o})}),q(async()=>{setTimeout(async()=>{t.value=await V().getStrategy(l.value),u.value=t.value,i.value.$editor.updateOptions({theme:v.value})},200),window.addEventListener("keydown",_)}),G(()=>{window.removeEventListener("keydown",_)});const r=S(()=>t.value!==u.value),a=S(()=>X().settings.editor),x={automaticLayout:!0,minimap:{enabled:a.value.minimap},fontSize:a.value.fontSize,padding:{top:16,bottom:16},cursorStyle:a.value.cursorStyle,cursorWidth:a.value.cursorWidth,lineHeight:a.value.lineHeight,cursorBlinking:a.value.cursorBlinking,renderLineHighlight:a.value.renderLineHighlight};f(a,o=>{console.log("2",o),i.value.$editor.updateOptions({minimap:{enabled:o.minimap},fontSize:o.fontSize,cursorStyle:o.cursorStyle,cursorWidth:o.cursorWidth,lineHeight:o.lineHeight,cursorBlinking:o.cursorBlinking,renderLineHighlight:o.renderLineHighlight})},{deep:!0});function e(){navigator.clipboard.writeText(t.value),z("success","Code copied to clipboard")}async function n(){if(r.value){if(t.value===""){z("error","Code cannot be empty");return}await V().saveStrategy(l.value,t.value),u.value=t.value}}const C=I.debounce(async()=>{await n()},300);function _(o){o.key==="s"&&(navigator.platform.match("Mac")?o.metaKey:o.ctrlKey)&&(o.preventDefault(),C())}function H(){i.value.$editor.trigger("source","actions.find",{})}function O(){V().deleteStrategy(l.value),ae().push("/strategies")}return(o,m)=>{const R=T,h=ne,N=re,U=Y,K=ee;return D(),E(P,null,[p("section",de,[s(R),p("div",ce,[s(U,null,{default:d(()=>[p("div",ue,[p("h2",me,te(y(l)),1),p("div",pe,[s(h,{size:"xs",icon:"i-heroicons-trash",color:"gray",variant:"ghost",class:"ml-2",onClick:m[0]||(m[0]=M=>c.value=!0)},{default:d(()=>[b(" Delete ")]),_:1}),s(h,{size:"xs",icon:"i-heroicons-clipboard",color:"gray",variant:"ghost",class:"ml-2",onClick:e},{default:d(()=>[b(" Copy ")]),_:1}),s(h,{size:"xs",icon:"i-heroicons-magnifying-glass",class:"ml-2",color:"gray",variant:"ghost",onClick:H},{default:d(()=>[b(" Find ")]),_:1}),s(h,{size:"xs",icon:"i-heroicons-check",class:"ml-2",color:"teal",variant:"ghost",disabled:!y(r),onClick:n},{default:d(()=>[b(" Save ")]),_:1},8,["disabled"])])]),p("div",ge,[s(N,{ref_key:"editorRef",ref:i,modelValue:y(t),"onUpdate:modelValue":m[1]||(m[1]=M=>L(t)?t.value=M:null),lang:"python",options:x,style:oe({height:"calc(100vh - 4rem - 4px - 2.5rem)"})},{default:d(()=>[b(" Loading editor... ")]),_:1},8,["modelValue","style"])])]),_:1})])]),s(K,{modelValue:y(c),"onUpdate:modelValue":m[2]||(m[2]=M=>L(c)?c.value=M:null),title:"Delete strategy",description:`Are you sure you want to delete the strategy '${y(l)}'?`,type:"info"},{default:d(()=>[s(h,{variant:"solid",color:"red",class:"flex justify-center",label:"Delete",onClick:O})]),_:1},8,["modelValue","description"])],64)}}});export{he as default}; diff --git a/jesse/static/_nuxt/CoLc1c7O.js b/jesse/static/_nuxt/Ca0ihDfi.js similarity index 94% rename from jesse/static/_nuxt/CoLc1c7O.js rename to jesse/static/_nuxt/Ca0ihDfi.js index 041438ed8..02c8913c6 100644 --- a/jesse/static/_nuxt/CoLc1c7O.js +++ b/jesse/static/_nuxt/Ca0ihDfi.js @@ -1,4 +1,4 @@ -import{y as R,l as Qe,ar as Ra,z as ie,as as Pt,at as Ea,h as te,r as z,au as Ut,av as U,aw as B,ax as st,a0 as Ta,ay as P,az as N,aA as Kt,aB as ct,aC as Yt,aD as me,A as xe,aE as Me,aF as Xt,aG as Gt,aH as Qt,aI as Jt,aJ as ue,aK as _e,F as vt,aL as Se,aM as Zt,aN as Aa,aO as Re,am as Ee,aP as _t,aQ as Pa,aR as ft,B as ea,aS as q,aT as ta,aU as ka,aV as aa,aW as V,aX as kt,aY as Dt,aZ as Da,a_ as Ba,a$ as Va,b0 as La,b1 as Bt,a as za,ab as na,b2 as $a,ac as ye,b3 as ja,an as oa,ao as ia,ad as Vt,ae as it,b4 as Fa,b5 as Na,b6 as Ha,af as Wa,ag as Ve,b7 as qa,b8 as Ua,b9 as Ka,ba as Ya,o as F,H as ve,w as Ce,c as Q,n as j,J as re,a8 as Le,ai as fe,b as pe,ah as lt,d as Ye,t as ze,bb as Xa,j as Ga,C as Qa,e as Lt,bc as Ja,bd as Za}from"./DbTgESvQ.js";function $e(e,a,t){let o=t.initialDeps??[],n;return()=>{var r,i,l,s;let v;t.key&&((r=t.debug)!=null&&r.call(t))&&(v=Date.now());const u=e();if(!(u.length!==o.length||u.some((O,x)=>o[x]!==O)))return n;o=u;let f;if(t.key&&((i=t.debug)!=null&&i.call(t))&&(f=Date.now()),n=a(...u),t.key&&((l=t.debug)!=null&&l.call(t))){const O=Math.round((Date.now()-v)*100)/100,x=Math.round((Date.now()-f)*100)/100,S=x/16,C=(g,I)=>{for(g=String(g);g.length{var r,i,l,s;let v;t.key&&((r=t.debug)!=null&&r.call(t))&&(v=Date.now());const u=e();if(!(u.length!==o.length||u.some((O,x)=>o[x]!==O)))return n;o=u;let f;if(t.key&&((i=t.debug)!=null&&i.call(t))&&(f=Date.now()),n=a(...u),t.key&&((l=t.debug)!=null&&l.call(t))){const O=Math.round((Date.now()-v)*100)/100,x=Math.round((Date.now()-f)*100)/100,S=x/16,C=(g,I)=>{for(g=String(g);g.lengthMath.abs(e-a)<1,en=(e,a)=>{let t;return function(...o){clearTimeout(t),t=setTimeout(()=>e.apply(this,o),a)}},tn=e=>e,an=e=>{const a=Math.max(e.startIndex-e.overscan,0),t=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let n=a;n<=t;n++)o.push(n);return o},nn=(e,a)=>{const t=e.scrollElement;if(!t)return;const o=r=>{const{width:i,height:l}=r;a({width:Math.round(i),height:Math.round(l)})};if(o(t.getBoundingClientRect()),typeof ResizeObserver>"u")return()=>{};const n=new ResizeObserver(r=>{const i=r[0];if(i!=null&&i.borderBoxSize){const l=i.borderBoxSize[0];if(l){o({width:l.inlineSize,height:l.blockSize});return}}o(t.getBoundingClientRect())});return n.observe(t,{box:"border-box"}),()=>{n.unobserve(t)}},zt={passive:!0},on=typeof window>"u"?!0:"onscrollend"in window,ln=(e,a)=>{const t=e.scrollElement;if(!t)return;let o=0;const n=on?()=>{}:en(()=>{a(o,!1)},150),r=s=>()=>{o=t[e.options.horizontal?"scrollLeft":"scrollTop"],n(),a(o,s)},i=r(!0),l=r(!1);return l(),t.addEventListener("scroll",i,zt),t.addEventListener("scrollend",l,zt),()=>{t.removeEventListener("scroll",i),t.removeEventListener("scrollend",l)}},rn=(e,a,t)=>{if(a!=null&&a.borderBoxSize){const o=a.borderBoxSize[0];if(o)return Math.round(o[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[t.options.horizontal?"width":"height"])},sn=(e,{adjustments:a=0,behavior:t},o)=>{var n,r;const i=e+a;(r=(n=o.scrollElement)==null?void 0:n.scrollTo)==null||r.call(n,{[o.options.horizontal?"left":"top"]:i,behavior:t})};class un{constructor(a){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let t=null;const o=()=>t||(typeof ResizeObserver<"u"?t=new ResizeObserver(n=>{n.forEach(r=>{this._measureElement(r.target,r)})}):null);return{disconnect:()=>{var n;return(n=o())==null?void 0:n.disconnect()},observe:n=>{var r;return(r=o())==null?void 0:r.observe(n,{box:"border-box"})},unobserve:n=>{var r;return(r=o())==null?void 0:r.unobserve(n)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([o,n])=>{typeof n>"u"&&delete t[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:tn,rangeExtractor:an,onChange:()=>{},measureElement:rn,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,...t}},this.notify=(t,o)=>{var n,r;const{startIndex:i,endIndex:l}=this.range??{startIndex:void 0,endIndex:void 0},s=this.calculateRange();(t||i!==(s==null?void 0:s.startIndex)||l!==(s==null?void 0:s.endIndex))&&((r=(n=this.options).onChange)==null||r.call(n,this,o))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{const t=this.options.getScrollElement();this.scrollElement!==t&&(this.cleanup(),this.scrollElement=t,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,n)=>{this.scrollAdjustments=0,this.scrollDirection=n?this.scrollOffsetthis.scrollRect[this.options.horizontal?"width":"height"],this.getMeasurementOptions=$e(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey],(t,o,n,r)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:o,scrollMargin:n,getItemKey:r}),{key:!1}),this.getFurthestMeasurement=(t,o)=>{const n=new Map,r=new Map;for(let i=o-1;i>=0;i--){const l=t[i];if(n.has(l.lane))continue;const s=r.get(l.lane);if(s==null||l.end>s.end?r.set(l.lane,l):l.endi.end===l.end?i.index-l.index:i.end-l.end)[0]:void 0},this.getMeasurements=$e(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:o,scrollMargin:n,getItemKey:r},i)=>{const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const s=this.measurementsCache.slice(0,l);for(let v=l;vthis.options.debug}),this.calculateRange=$e(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(t,o,n)=>this.range=t.length>0&&o>0?dn({measurements:t,outerSize:o,scrollOffset:n}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=$e(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(t,o,n,r)=>o===null?[]:t({startIndex:o.startIndex,endIndex:o.endIndex,overscan:n,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const o=this.options.indexAttribute,n=t.getAttribute(o);return n?parseInt(n,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(t,o)=>{const n=this.measurementsCache[this.indexFromElement(t)];if(!n||!t.isConnected){this.measureElementCache.forEach((l,s)=>{l===t&&(this.observer.unobserve(t),this.measureElementCache.delete(s))});return}const r=this.measureElementCache.get(n.key);r!==t&&(r&&this.observer.unobserve(r),this.observer.observe(t),this.measureElementCache.set(n.key,t));const i=this.options.measureElement(t,o,this);this.resizeItem(n,i)},this.resizeItem=(t,o)=>{const n=this.itemSizeCache.get(t.key)??t.size,r=o-n;r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(t,r,this):t.start{t&&this._measureElement(t,void 0)},this.getVirtualItems=$e(()=>[this.getIndexes(),this.getMeasurements()],(t,o)=>{const n=[];for(let r=0,i=t.length;rthis.options.debug}),this.getVirtualItemForOffset=t=>{const o=this.getMeasurements();return rt(o[la(0,o.length-1,n=>rt(o[n]).start,t)])},this.getOffsetForAlignment=(t,o)=>{const n=this.getSize();o==="auto"&&(t<=this.scrollOffset?o="start":t>=this.scrollOffset+n?o="end":o="start"),o==="start"?t=t:o==="end"?t=t-n:o==="center"&&(t=t-n/2);const r=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[r]:this.scrollElement[r]:0)-this.getSize();return Math.max(Math.min(l,t),0)},this.getOffsetForIndex=(t,o="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const n=rt(this.getMeasurements()[t]);if(o==="auto")if(n.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)o="end";else if(n.start<=this.scrollOffset+this.options.scrollPaddingStart)o="start";else return[this.scrollOffset,o];const r=o==="end"?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(r,o),o]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&(clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:o="start",behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,o),{adjustments:void 0,behavior:n})},this.scrollToIndex=(t,{align:o="auto",behavior:n}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const[r,i]=this.getOffsetForIndex(t,o);this._scrollToOffset(r,{adjustments:void 0,behavior:n}),n!=="smooth"&&this.isDynamicMode()&&(this.scrollToIndexTimeoutId=setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.measureElementCache.has(this.options.getItemKey(t))){const[s]=this.getOffsetForIndex(t,i);_a(s,this.scrollOffset)||this.scrollToIndex(t,{align:i,behavior:n})}else this.scrollToIndex(t,{align:i,behavior:n})}))},this.scrollBy=(t,{behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+t,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var t;const o=this.getMeasurements();let n;return o.length===0?n=this.options.paddingStart:n=this.options.lanes===1?((t=o[o.length-1])==null?void 0:t.end)??0:Math.max(...o.slice(-this.options.lanes).map(r=>r.end)),n-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:o,behavior:n})=>{this.options.scrollToFn(t,{behavior:n,adjustments:o},this)},this.measure=()=>{var t,o;this.itemSizeCache=new Map,(o=(t=this.options).onChange)==null||o.call(t,this,!1)},this.setOptions(a),this.scrollRect=this.options.initialRect,this.scrollOffset=typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(t=>{this.itemSizeCache.set(t.key,t.size)}),this.notify(!1,!1)}}const la=(e,a,t,o)=>{for(;e<=a;){const n=(e+a)/2|0,r=t(n);if(ro)a=n-1;else return n}return e>0?e-1:0};function dn({measurements:e,outerSize:a,scrollOffset:t}){const o=e.length-1,r=la(0,o,l=>e[l].start,t);let i=r;for(;iQe(e).getScrollElement(),n=>{n&&a._willUpdate()},{immediate:!0}),ie(()=>Qe(e),n=>{a.setOptions({...n,onChange:(r,i)=>{var l;Pt(t),(l=n.onChange)==null||l.call(n,r,i)}}),a._willUpdate(),Pt(t)},{immediate:!0}),Ea(o),t}function vn(e){return cn(R(()=>({observeElementRect:nn,observeElementOffset:ln,scrollToFn:sn,...Qe(e)})))}var fn={};function pn(e,a){return e===a}var mn=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(mn||{}),hn=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(hn||{}),bn=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(bn||{});let ra=Symbol("ComboboxContext");function De(e){let a=ft(ra,null);if(a===null){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,De),t}return a}let sa=Symbol("VirtualContext"),gn=te({name:"VirtualProvider",setup(e,{slots:a}){let t=De("VirtualProvider"),o=R(()=>{let l=P(t.optionsRef);if(!l)return{start:0,end:0};let s=window.getComputedStyle(l);return{start:parseFloat(s.paddingBlockStart||s.paddingTop),end:parseFloat(s.paddingBlockEnd||s.paddingBottom)}}),n=vn(R(()=>({scrollPaddingStart:o.value.start,scrollPaddingEnd:o.value.end,count:t.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return P(t.optionsRef)},overscan:12}))),r=R(()=>{var l;return(l=t.virtual.value)==null?void 0:l.options}),i=z(0);return ie([r],()=>{i.value+=1}),ct(sa,t.virtual.value?n:null),()=>[Me("div",{style:{position:"relative",width:"100%",height:`${n.value.getTotalSize()}px`},ref:l=>{if(l){if(typeof process<"u"&&fn.JEST_WORKER_ID!==void 0||t.activationTrigger.value===0)return;t.activeOptionIndex.value!==null&&t.virtual.value.options.length>t.activeOptionIndex.value&&n.value.scrollToIndex(t.activeOptionIndex.value)}}},n.value.getVirtualItems().map(l=>ka(a.default({option:t.virtual.value.options[l.index],open:t.comboboxState.value===0})[0],{key:`${i.value}-${l.index}`,"data-index":l.index,"aria-setsize":t.virtual.value.options.length,"aria-posinset":l.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${l.start}px)`,overflowAnchor:"none"}})))]}}),yn=te({name:"Combobox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:a,attrs:t,emit:o}){let n=z(1),r=z(null),i=z(null),l=z(null),s=z(null),v=z({static:!1,hold:!1}),u=z([]),c=z(null),f=z(2),O=z(!1);function x(h=w=>w){let w=c.value!==null?u.value[c.value]:null,T=h(u.value.slice()),E=T.length>0&&T[0].dataRef.order.value!==null?T.sort((D,L)=>D.dataRef.order.value-L.dataRef.order.value):aa(T,D=>P(D.dataRef.domRef)),k=w?E.indexOf(w):null;return k===-1&&(k=null),{options:E,activeOptionIndex:k}}let S=R(()=>e.multiple?1:0),C=R(()=>e.nullable),[g,I]=Ut(R(()=>e.modelValue),h=>o("update:modelValue",h),R(()=>e.defaultValue)),p=R(()=>g.value===void 0?U(S.value,{1:[],0:void 0}):g.value),d=null,b=null;function y(h){return U(S.value,{0(){return I==null?void 0:I(h)},1:()=>{let w=N(m.value.value).slice(),T=N(h),E=w.findIndex(k=>m.compare(T,N(k)));return E===-1?w.push(T):w.splice(E,1),I==null?void 0:I(w)}})}let M=R(()=>{});ie([M],([h],[w])=>{if(m.virtual.value&&h&&w&&c.value!==null){let T=h.indexOf(w[c.value]);T!==-1?c.value=T:c.value=null}});let m={comboboxState:n,value:p,mode:S,compare(h,w){if(typeof e.by=="string"){let T=e.by;return(h==null?void 0:h[T])===(w==null?void 0:w[T])}return e.by===null?pn(h,w):e.by(h,w)},calculateIndex(h){return m.virtual.value?e.by===null?m.virtual.value.options.indexOf(h):m.virtual.value.options.findIndex(w=>m.compare(w,h)):u.value.findIndex(w=>m.compare(w.dataRef.value,h))},defaultValue:R(()=>e.defaultValue),nullable:C,immediate:R(()=>!1),virtual:R(()=>null),inputRef:i,labelRef:r,buttonRef:l,optionsRef:s,disabled:R(()=>e.disabled),options:u,change(h){I(h)},activeOptionIndex:R(()=>{if(O.value&&c.value===null&&(m.virtual.value?m.virtual.value.options.length>0:u.value.length>0)){if(m.virtual.value){let w=m.virtual.value.options.findIndex(T=>{var E;return!((E=m.virtual.value)!=null&&E.disabled(T))});if(w!==-1)return w}let h=u.value.findIndex(w=>!w.dataRef.disabled);if(h!==-1)return h}return c.value}),activationTrigger:f,optionsPropsRef:v,closeCombobox(){O.value=!1,!e.disabled&&n.value!==1&&(n.value=1,c.value=null)},openCombobox(){if(O.value=!0,!e.disabled&&n.value!==0){if(m.value.value){let h=m.calculateIndex(m.value.value);h!==-1&&(c.value=h)}n.value=0}},setActivationTrigger(h){f.value=h},goToOption(h,w,T){O.value=!1,d!==null&&cancelAnimationFrame(d),d=requestAnimationFrame(()=>{if(e.disabled||s.value&&!v.value.static&&n.value===1)return;if(m.virtual.value){c.value=h===B.Specific?w:st({focus:h},{resolveItems:()=>m.virtual.value.options,resolveActiveIndex:()=>{var D,L;return(L=(D=m.activeOptionIndex.value)!=null?D:m.virtual.value.options.findIndex(H=>{var G;return!((G=m.virtual.value)!=null&&G.disabled(H))}))!=null?L:null},resolveDisabled:D=>m.virtual.value.disabled(D),resolveId(){throw new Error("Function not implemented.")}}),f.value=T??2;return}let E=x();if(E.activeOptionIndex===null){let D=E.options.findIndex(L=>!L.dataRef.disabled);D!==-1&&(E.activeOptionIndex=D)}let k=h===B.Specific?w:st({focus:h},{resolveItems:()=>E.options,resolveActiveIndex:()=>E.activeOptionIndex,resolveId:D=>D.id,resolveDisabled:D=>D.dataRef.disabled});c.value=k,f.value=T??2,u.value=E.options})},selectOption(h){let w=u.value.find(E=>E.id===h);if(!w)return;let{dataRef:T}=w;y(T.value)},selectActiveOption(){if(m.activeOptionIndex.value!==null){if(m.virtual.value)y(m.virtual.value.options[m.activeOptionIndex.value]);else{let{dataRef:h}=u.value[m.activeOptionIndex.value];y(h.value)}m.goToOption(B.Specific,m.activeOptionIndex.value)}},registerOption(h,w){let T=Ta({id:h,dataRef:w});if(m.virtual.value){u.value.push(T);return}b&&cancelAnimationFrame(b);let E=x(k=>(k.push(T),k));c.value===null&&m.isSelected(w.value.value)&&(E.activeOptionIndex=E.options.indexOf(T)),u.value=E.options,c.value=E.activeOptionIndex,f.value=2,E.options.some(k=>!P(k.dataRef.domRef))&&(b=requestAnimationFrame(()=>{let k=x();u.value=k.options,c.value=k.activeOptionIndex}))},unregisterOption(h,w){if(d!==null&&cancelAnimationFrame(d),w&&(O.value=!0),m.virtual.value){u.value=u.value.filter(E=>E.id!==h);return}let T=x(E=>{let k=E.findIndex(D=>D.id===h);return k!==-1&&E.splice(k,1),E});u.value=T.options,c.value=T.activeOptionIndex,f.value=2},isSelected(h){return U(S.value,{0:()=>m.compare(N(m.value.value),N(h)),1:()=>N(m.value.value).some(w=>m.compare(N(w),N(h)))})},isActive(h){return c.value===m.calculateIndex(h)}};Kt([i,l,s],()=>m.closeCombobox(),R(()=>n.value===0)),ct(ra,m),Yt(R(()=>U(n.value,{0:me.Open,1:me.Closed})));let A=R(()=>{var h;return(h=P(i))==null?void 0:h.closest("form")});return xe(()=>{ie([A],()=>{if(!A.value||e.defaultValue===void 0)return;function h(){m.change(e.defaultValue)}return A.value.addEventListener("reset",h),()=>{var w;(w=A.value)==null||w.removeEventListener("reset",h)}},{immediate:!0})}),()=>{var h,w,T;let{name:E,disabled:k,form:D,...L}=e,H={open:n.value===0,disabled:k,activeIndex:m.activeOptionIndex.value,activeOption:m.activeOptionIndex.value===null?null:m.virtual.value?m.virtual.value.options[(h=m.activeOptionIndex.value)!=null?h:0]:(T=(w=m.options.value[m.activeOptionIndex.value])==null?void 0:w.dataRef.value)!=null?T:null,value:p.value};return Me(vt,[...E!=null&&p.value!=null?Xt({[E]:p.value}).map(([G,Z])=>Me(Gt,Qt({features:Jt.Hidden,key:G,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:D,disabled:k,name:G,value:Z}))):[],ue({theirProps:{...t,..._e(L,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:H,slots:a,attrs:t,name:"Combobox"})])}}}),On=te({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:a,slots:t,expose:o}){var n;let r=(n=e.id)!=null?n:`headlessui-combobox-button-${Se()}`,i=De("ComboboxButton");o({el:i.buttonRef,$el:i.buttonRef});function l(u){i.disabled.value||(i.comboboxState.value===0?i.closeCombobox():(u.preventDefault(),i.openCombobox()),q(()=>{var c;return(c=P(i.inputRef))==null?void 0:c.focus({preventScroll:!0})}))}function s(u){switch(u.key){case V.ArrowDown:u.preventDefault(),u.stopPropagation(),i.comboboxState.value===1&&i.openCombobox(),q(()=>{var c;return(c=i.inputRef.value)==null?void 0:c.focus({preventScroll:!0})});return;case V.ArrowUp:u.preventDefault(),u.stopPropagation(),i.comboboxState.value===1&&(i.openCombobox(),q(()=>{i.value.value||i.goToOption(B.Last)})),q(()=>{var c;return(c=i.inputRef.value)==null?void 0:c.focus({preventScroll:!0})});return;case V.Escape:if(i.comboboxState.value!==0)return;u.preventDefault(),i.optionsRef.value&&!i.optionsPropsRef.value.static&&u.stopPropagation(),i.closeCombobox(),q(()=>{var c;return(c=i.inputRef.value)==null?void 0:c.focus({preventScroll:!0})});return}}let v=Zt(R(()=>({as:e.as,type:a.type})),i.buttonRef);return()=>{var u,c;let f={open:i.comboboxState.value===0,disabled:i.disabled.value,value:i.value.value},{...O}=e,x={ref:i.buttonRef,id:r,type:v.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(u=P(i.optionsRef))==null?void 0:u.id,"aria-expanded":i.comboboxState.value===0,"aria-labelledby":i.labelRef.value?[(c=P(i.labelRef))==null?void 0:c.id,r].join(" "):void 0,disabled:i.disabled.value===!0?!0:void 0,onKeydown:s,onClick:l};return ue({ourProps:x,theirProps:O,slot:f,attrs:a,slots:t,name:"ComboboxButton"})}}}),xn=te({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:a,attrs:t,slots:o,expose:n}){var r;let i=(r=e.id)!=null?r:`headlessui-combobox-input-${Se()}`,l=De("ComboboxInput"),s=R(()=>Aa(P(l.inputRef))),v={value:!1};n({el:l.inputRef,$el:l.inputRef});function u(){l.change(null);let d=P(l.optionsRef);d&&(d.scrollTop=0),l.goToOption(B.Nothing)}let c=R(()=>{var d;let b=l.value.value;return P(l.inputRef)?typeof e.displayValue<"u"&&b!==void 0?(d=e.displayValue(b))!=null?d:"":typeof b=="string"?b:"":""});xe(()=>{ie([c,l.comboboxState,s],([d,b],[y,M])=>{if(v.value)return;let m=P(l.inputRef);m&&((M===0&&b===1||d!==y)&&(m.value=d),requestAnimationFrame(()=>{var A;if(v.value||!m||((A=s.value)==null?void 0:A.activeElement)!==m)return;let{selectionStart:h,selectionEnd:w}=m;Math.abs((w??0)-(h??0))===0&&h===0&&m.setSelectionRange(m.value.length,m.value.length)}))},{immediate:!0}),ie([l.comboboxState],([d],[b])=>{if(d===0&&b===1){if(v.value)return;let y=P(l.inputRef);if(!y)return;let M=y.value,{selectionStart:m,selectionEnd:A,selectionDirection:h}=y;y.value="",y.value=M,h!==null?y.setSelectionRange(m,A,h):y.setSelectionRange(m,A)}})});let f=z(!1);function O(){f.value=!0}function x(){kt().nextFrame(()=>{f.value=!1})}function S(d){switch(v.value=!0,d.key){case V.Enter:if(v.value=!1,l.comboboxState.value!==0||f.value)return;if(d.preventDefault(),d.stopPropagation(),l.activeOptionIndex.value===null){l.closeCombobox();return}l.selectActiveOption(),l.mode.value===0&&l.closeCombobox();break;case V.ArrowDown:return v.value=!1,d.preventDefault(),d.stopPropagation(),U(l.comboboxState.value,{0:()=>l.goToOption(B.Next),1:()=>l.openCombobox()});case V.ArrowUp:return v.value=!1,d.preventDefault(),d.stopPropagation(),U(l.comboboxState.value,{0:()=>l.goToOption(B.Previous),1:()=>{l.openCombobox(),q(()=>{l.value.value||l.goToOption(B.Last)})}});case V.Home:if(d.shiftKey)break;return v.value=!1,d.preventDefault(),d.stopPropagation(),l.goToOption(B.First);case V.PageUp:return v.value=!1,d.preventDefault(),d.stopPropagation(),l.goToOption(B.First);case V.End:if(d.shiftKey)break;return v.value=!1,d.preventDefault(),d.stopPropagation(),l.goToOption(B.Last);case V.PageDown:return v.value=!1,d.preventDefault(),d.stopPropagation(),l.goToOption(B.Last);case V.Escape:if(v.value=!1,l.comboboxState.value!==0)return;d.preventDefault(),l.optionsRef.value&&!l.optionsPropsRef.value.static&&d.stopPropagation(),l.nullable.value&&l.mode.value===0&&l.value.value===null&&u(),l.closeCombobox();break;case V.Tab:if(v.value=!1,l.comboboxState.value!==0)return;l.mode.value===0&&l.activationTrigger.value!==1&&l.selectActiveOption(),l.closeCombobox();break}}function C(d){a("change",d),l.nullable.value&&l.mode.value===0&&d.target.value===""&&u(),l.openCombobox()}function g(d){var b,y,M;let m=(b=d.relatedTarget)!=null?b:Dt.find(A=>A!==d.currentTarget);if(v.value=!1,!((y=P(l.optionsRef))!=null&&y.contains(m))&&!((M=P(l.buttonRef))!=null&&M.contains(m))&&l.comboboxState.value===0)return d.preventDefault(),l.mode.value===0&&(l.nullable.value&&l.value.value===null?u():l.activationTrigger.value!==1&&l.selectActiveOption()),l.closeCombobox()}function I(d){var b,y,M;let m=(b=d.relatedTarget)!=null?b:Dt.find(A=>A!==d.currentTarget);(y=P(l.buttonRef))!=null&&y.contains(m)||(M=P(l.optionsRef))!=null&&M.contains(m)||l.disabled.value||l.immediate.value&&l.comboboxState.value!==0&&(l.openCombobox(),kt().nextFrame(()=>{l.setActivationTrigger(1)}))}let p=R(()=>{var d,b,y,M;return(M=(y=(b=e.defaultValue)!=null?b:l.defaultValue.value!==void 0?(d=e.displayValue)==null?void 0:d.call(e,l.defaultValue.value):null)!=null?y:l.defaultValue.value)!=null?M:""});return()=>{var d,b,y,M,m,A,h;let w={open:l.comboboxState.value===0},{displayValue:T,onChange:E,...k}=e,D={"aria-controls":(d=l.optionsRef.value)==null?void 0:d.id,"aria-expanded":l.comboboxState.value===0,"aria-activedescendant":l.activeOptionIndex.value===null?void 0:l.virtual.value?(b=l.options.value.find(L=>!l.virtual.value.disabled(L.dataRef.value)&&l.compare(L.dataRef.value,l.virtual.value.options[l.activeOptionIndex.value])))==null?void 0:b.id:(y=l.options.value[l.activeOptionIndex.value])==null?void 0:y.id,"aria-labelledby":(A=(M=P(l.labelRef))==null?void 0:M.id)!=null?A:(m=P(l.buttonRef))==null?void 0:m.id,"aria-autocomplete":"list",id:i,onCompositionstart:O,onCompositionend:x,onKeydown:S,onInput:C,onFocus:I,onBlur:g,role:"combobox",type:(h=t.type)!=null?h:"text",tabIndex:0,ref:l.inputRef,defaultValue:p.value,disabled:l.disabled.value===!0?!0:void 0};return ue({ourProps:D,theirProps:k,slot:w,attrs:t,slots:o,features:Re.RenderStrategy|Re.Static,name:"ComboboxInput"})}}}),wn=te({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:a,slots:t,expose:o}){let n=De("ComboboxOptions"),r=`headlessui-combobox-options-${Se()}`;o({el:n.optionsRef,$el:n.optionsRef}),Ee(()=>{n.optionsPropsRef.value.static=e.static}),Ee(()=>{n.optionsPropsRef.value.hold=e.hold});let i=_t(),l=R(()=>i!==null?(i.value&me.Open)===me.Open:n.comboboxState.value===0);return Pa({container:R(()=>P(n.optionsRef)),enabled:R(()=>n.comboboxState.value===0),accept(s){return s.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:s.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(s){s.setAttribute("role","none")}}),()=>{var s,v,u;let c={open:n.comboboxState.value===0},f={"aria-labelledby":(u=(s=P(n.labelRef))==null?void 0:s.id)!=null?u:(v=P(n.buttonRef))==null?void 0:v.id,id:r,ref:n.optionsRef,role:"listbox","aria-multiselectable":n.mode.value===1?!0:void 0},O=_e(e,["hold"]);return ue({ourProps:f,theirProps:O,slot:c,attrs:a,slots:n.virtual.value&&n.comboboxState.value===0?{...t,default:()=>[Me(gn,{},t.default)]}:t,features:Re.RenderStrategy|Re.Static,visible:l.value,name:"ComboboxOptions"})}}}),Sn=te({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:a,attrs:t,expose:o}){let n=De("ComboboxOption"),r=`headlessui-combobox-option-${Se()}`,i=z(null);o({el:i,$el:i});let l=R(()=>{var g;return n.virtual.value?n.activeOptionIndex.value===n.calculateIndex(e.value):n.activeOptionIndex.value===null?!1:((g=n.options.value[n.activeOptionIndex.value])==null?void 0:g.id)===r}),s=R(()=>n.isSelected(e.value)),v=ft(sa,null),u=R(()=>({disabled:e.disabled,value:e.value,domRef:i,order:R(()=>e.order)}));xe(()=>n.registerOption(r,u)),ea(()=>n.unregisterOption(r,l.value)),Ee(()=>{let g=P(i);g&&(v==null||v.value.measureElement(g))}),Ee(()=>{n.comboboxState.value===0&&l.value&&(n.virtual.value||n.activationTrigger.value!==0&&q(()=>{var g,I;return(I=(g=P(i))==null?void 0:g.scrollIntoView)==null?void 0:I.call(g,{block:"nearest"})}))});function c(g){var I;if(e.disabled||(I=n.virtual.value)!=null&&I.disabled(e.value))return g.preventDefault();n.selectOption(r),Da()||requestAnimationFrame(()=>{var p;return(p=P(n.inputRef))==null?void 0:p.focus({preventScroll:!0})}),n.mode.value===0&&requestAnimationFrame(()=>n.closeCombobox())}function f(){var g;if(e.disabled||(g=n.virtual.value)!=null&&g.disabled(e.value))return n.goToOption(B.Nothing);let I=n.calculateIndex(e.value);n.goToOption(B.Specific,I)}let O=ta();function x(g){O.update(g)}function S(g){var I;if(!O.wasMoved(g)||e.disabled||(I=n.virtual.value)!=null&&I.disabled(e.value)||l.value)return;let p=n.calculateIndex(e.value);n.goToOption(B.Specific,p,0)}function C(g){var I;O.wasMoved(g)&&(e.disabled||(I=n.virtual.value)!=null&&I.disabled(e.value)||l.value&&(n.optionsPropsRef.value.hold||n.goToOption(B.Nothing)))}return()=>{let{disabled:g}=e,I={active:l.value,selected:s.value,disabled:g},p={id:r,ref:i,role:"option",tabIndex:g===!0?void 0:-1,"aria-disabled":g===!0?!0:void 0,"aria-selected":s.value,disabled:void 0,onClick:c,onFocus:f,onPointerenter:x,onMouseenter:x,onPointermove:S,onMousemove:S,onPointerleave:C,onMouseleave:C},d=_e(e,["order","value"]);return ue({ourProps:p,theirProps:d,slot:I,attrs:t,slots:a,name:"ComboboxOption"})}}});function In(e,a){return e===a}var Cn=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Cn||{}),Mn=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Mn||{}),Rn=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Rn||{});function En(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let ua=Symbol("ListboxContext");function et(e){let a=ft(ua,null);if(a===null){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,et),t}return a}let Tn=te({name:"Listbox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],default:()=>In},horizontal:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},multiple:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(e,{slots:a,attrs:t,emit:o}){let n=z(1),r=z(null),i=z(null),l=z(null),s=z([]),v=z(""),u=z(null),c=z(1);function f(p=d=>d){let d=u.value!==null?s.value[u.value]:null,b=aa(p(s.value.slice()),M=>P(M.dataRef.domRef)),y=d?b.indexOf(d):null;return y===-1&&(y=null),{options:b,activeOptionIndex:y}}let O=R(()=>e.multiple?1:0),[x,S]=Ut(R(()=>e.modelValue),p=>o("update:modelValue",p),R(()=>e.defaultValue)),C=R(()=>x.value===void 0?U(O.value,{1:[],0:void 0}):x.value),g={listboxState:n,value:C,mode:O,compare(p,d){if(typeof e.by=="string"){let b=e.by;return(p==null?void 0:p[b])===(d==null?void 0:d[b])}return e.by(p,d)},orientation:R(()=>e.horizontal?"horizontal":"vertical"),labelRef:r,buttonRef:i,optionsRef:l,disabled:R(()=>e.disabled),options:s,searchQuery:v,activeOptionIndex:u,activationTrigger:c,closeListbox(){e.disabled||n.value!==1&&(n.value=1,u.value=null)},openListbox(){e.disabled||n.value!==0&&(n.value=0)},goToOption(p,d,b){if(e.disabled||n.value===1)return;let y=f(),M=st(p===B.Specific?{focus:B.Specific,id:d}:{focus:p},{resolveItems:()=>y.options,resolveActiveIndex:()=>y.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.disabled});v.value="",u.value=M,c.value=b??1,s.value=y.options},search(p){if(e.disabled||n.value===1)return;let d=v.value!==""?0:1;v.value+=p.toLowerCase();let b=(u.value!==null?s.value.slice(u.value+d).concat(s.value.slice(0,u.value+d)):s.value).find(M=>M.dataRef.textValue.startsWith(v.value)&&!M.dataRef.disabled),y=b?s.value.indexOf(b):-1;y===-1||y===u.value||(u.value=y,c.value=1)},clearSearch(){e.disabled||n.value!==1&&v.value!==""&&(v.value="")},registerOption(p,d){let b=f(y=>[...y,{id:p,dataRef:d}]);s.value=b.options,u.value=b.activeOptionIndex},unregisterOption(p){let d=f(b=>{let y=b.findIndex(M=>M.id===p);return y!==-1&&b.splice(y,1),b});s.value=d.options,u.value=d.activeOptionIndex,c.value=1},theirOnChange(p){e.disabled||S(p)},select(p){e.disabled||S(U(O.value,{0:()=>p,1:()=>{let d=N(g.value.value).slice(),b=N(p),y=d.findIndex(M=>g.compare(b,N(M)));return y===-1?d.push(b):d.splice(y,1),d}}))}};Kt([i,l],(p,d)=>{var b;g.closeListbox(),Ba(d,Va.Loose)||(p.preventDefault(),(b=P(i))==null||b.focus())},R(()=>n.value===0)),ct(ua,g),Yt(R(()=>U(n.value,{0:me.Open,1:me.Closed})));let I=R(()=>{var p;return(p=P(i))==null?void 0:p.closest("form")});return xe(()=>{ie([I],()=>{if(!I.value||e.defaultValue===void 0)return;function p(){g.theirOnChange(e.defaultValue)}return I.value.addEventListener("reset",p),()=>{var d;(d=I.value)==null||d.removeEventListener("reset",p)}},{immediate:!0})}),()=>{let{name:p,modelValue:d,disabled:b,form:y,...M}=e,m={open:n.value===0,disabled:b,value:C.value};return Me(vt,[...p!=null&&C.value!=null?Xt({[p]:C.value}).map(([A,h])=>Me(Gt,Qt({features:Jt.Hidden,key:A,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:y,disabled:b,name:A,value:h}))):[],ue({ourProps:{},theirProps:{...t,..._e(M,["defaultValue","onUpdate:modelValue","horizontal","multiple","by"])},slot:m,slots:a,attrs:t,name:"Listbox"})])}}}),An=te({name:"ListboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:a,slots:t,expose:o}){var n;let r=(n=e.id)!=null?n:`headlessui-listbox-button-${Se()}`,i=et("ListboxButton");o({el:i.buttonRef,$el:i.buttonRef});function l(c){switch(c.key){case V.Space:case V.Enter:case V.ArrowDown:c.preventDefault(),i.openListbox(),q(()=>{var f;(f=P(i.optionsRef))==null||f.focus({preventScroll:!0}),i.value.value||i.goToOption(B.First)});break;case V.ArrowUp:c.preventDefault(),i.openListbox(),q(()=>{var f;(f=P(i.optionsRef))==null||f.focus({preventScroll:!0}),i.value.value||i.goToOption(B.Last)});break}}function s(c){switch(c.key){case V.Space:c.preventDefault();break}}function v(c){i.disabled.value||(i.listboxState.value===0?(i.closeListbox(),q(()=>{var f;return(f=P(i.buttonRef))==null?void 0:f.focus({preventScroll:!0})})):(c.preventDefault(),i.openListbox(),En(()=>{var f;return(f=P(i.optionsRef))==null?void 0:f.focus({preventScroll:!0})})))}let u=Zt(R(()=>({as:e.as,type:a.type})),i.buttonRef);return()=>{var c,f;let O={open:i.listboxState.value===0,disabled:i.disabled.value,value:i.value.value},{...x}=e,S={ref:i.buttonRef,id:r,type:u.value,"aria-haspopup":"listbox","aria-controls":(c=P(i.optionsRef))==null?void 0:c.id,"aria-expanded":i.listboxState.value===0,"aria-labelledby":i.labelRef.value?[(f=P(i.labelRef))==null?void 0:f.id,r].join(" "):void 0,disabled:i.disabled.value===!0?!0:void 0,onKeydown:l,onKeyup:s,onClick:v};return ue({ourProps:S,theirProps:x,slot:O,attrs:a,slots:t,name:"ListboxButton"})}}}),Pn=te({name:"ListboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:a,slots:t,expose:o}){var n;let r=(n=e.id)!=null?n:`headlessui-listbox-options-${Se()}`,i=et("ListboxOptions"),l=z(null);o({el:i.optionsRef,$el:i.optionsRef});function s(c){switch(l.value&&clearTimeout(l.value),c.key){case V.Space:if(i.searchQuery.value!=="")return c.preventDefault(),c.stopPropagation(),i.search(c.key);case V.Enter:if(c.preventDefault(),c.stopPropagation(),i.activeOptionIndex.value!==null){let f=i.options.value[i.activeOptionIndex.value];i.select(f.dataRef.value)}i.mode.value===0&&(i.closeListbox(),q(()=>{var f;return(f=P(i.buttonRef))==null?void 0:f.focus({preventScroll:!0})}));break;case U(i.orientation.value,{vertical:V.ArrowDown,horizontal:V.ArrowRight}):return c.preventDefault(),c.stopPropagation(),i.goToOption(B.Next);case U(i.orientation.value,{vertical:V.ArrowUp,horizontal:V.ArrowLeft}):return c.preventDefault(),c.stopPropagation(),i.goToOption(B.Previous);case V.Home:case V.PageUp:return c.preventDefault(),c.stopPropagation(),i.goToOption(B.First);case V.End:case V.PageDown:return c.preventDefault(),c.stopPropagation(),i.goToOption(B.Last);case V.Escape:c.preventDefault(),c.stopPropagation(),i.closeListbox(),q(()=>{var f;return(f=P(i.buttonRef))==null?void 0:f.focus({preventScroll:!0})});break;case V.Tab:c.preventDefault(),c.stopPropagation();break;default:c.key.length===1&&(i.search(c.key),l.value=setTimeout(()=>i.clearSearch(),350));break}}let v=_t(),u=R(()=>v!==null?(v.value&me.Open)===me.Open:i.listboxState.value===0);return()=>{var c,f;let O={open:i.listboxState.value===0},{...x}=e,S={"aria-activedescendant":i.activeOptionIndex.value===null||(c=i.options.value[i.activeOptionIndex.value])==null?void 0:c.id,"aria-multiselectable":i.mode.value===1?!0:void 0,"aria-labelledby":(f=P(i.buttonRef))==null?void 0:f.id,"aria-orientation":i.orientation.value,id:r,onKeydown:s,role:"listbox",tabIndex:0,ref:i.optionsRef};return ue({ourProps:S,theirProps:x,slot:O,attrs:a,slots:t,features:Re.RenderStrategy|Re.Static,visible:u.value,name:"ListboxOptions"})}}}),kn=te({name:"ListboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(e,{slots:a,attrs:t,expose:o}){var n;let r=(n=e.id)!=null?n:`headlessui-listbox-option-${Se()}`,i=et("ListboxOption"),l=z(null);o({el:l,$el:l});let s=R(()=>i.activeOptionIndex.value!==null?i.options.value[i.activeOptionIndex.value].id===r:!1),v=R(()=>U(i.mode.value,{0:()=>i.compare(N(i.value.value),N(e.value)),1:()=>N(i.value.value).some(p=>i.compare(N(p),N(e.value)))})),u=R(()=>U(i.mode.value,{1:()=>{var p;let d=N(i.value.value);return((p=i.options.value.find(b=>d.some(y=>i.compare(N(y),N(b.dataRef.value)))))==null?void 0:p.id)===r},0:()=>v.value})),c=La(l),f=R(()=>({disabled:e.disabled,value:e.value,get textValue(){return c()},domRef:l}));xe(()=>i.registerOption(r,f)),ea(()=>i.unregisterOption(r)),xe(()=>{ie([i.listboxState,v],()=>{i.listboxState.value===0&&v.value&&U(i.mode.value,{1:()=>{u.value&&i.goToOption(B.Specific,r)},0:()=>{i.goToOption(B.Specific,r)}})},{immediate:!0})}),Ee(()=>{i.listboxState.value===0&&s.value&&i.activationTrigger.value!==0&&q(()=>{var p,d;return(d=(p=P(l))==null?void 0:p.scrollIntoView)==null?void 0:d.call(p,{block:"nearest"})})});function O(p){if(e.disabled)return p.preventDefault();i.select(e.value),i.mode.value===0&&(i.closeListbox(),q(()=>{var d;return(d=P(i.buttonRef))==null?void 0:d.focus({preventScroll:!0})}))}function x(){if(e.disabled)return i.goToOption(B.Nothing);i.goToOption(B.Specific,r)}let S=ta();function C(p){S.update(p)}function g(p){S.wasMoved(p)&&(e.disabled||s.value||i.goToOption(B.Specific,r,0))}function I(p){S.wasMoved(p)&&(e.disabled||s.value&&i.goToOption(B.Nothing))}return()=>{let{disabled:p}=e,d={active:s.value,selected:v.value,disabled:p},{value:b,disabled:y,...M}=e,m={id:r,ref:l,role:"option",tabIndex:p===!0?void 0:-1,"aria-disabled":p===!0?!0:void 0,"aria-selected":v.value,disabled:void 0,onClick:O,onFocus:x,onPointerenter:C,onMouseenter:C,onPointermove:g,onMousemove:g,onPointerleave:I,onMouseleave:I};return ue({ourProps:m,theirProps:M,slot:d,attrs:t,slots:a,name:"ListboxOption"})}}});function X(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var a=e.ownerDocument;return a&&a.defaultView||window}return e}function we(e){var a=X(e).Element;return e instanceof a||e instanceof Element}function J(e){var a=X(e).HTMLElement;return e instanceof a||e instanceof HTMLElement}function pt(e){if(typeof ShadowRoot>"u")return!1;var a=X(e).ShadowRoot;return e instanceof a||e instanceof ShadowRoot}var Oe=Math.max,Ze=Math.min,Te=Math.round;function ut(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(a){return a.brand+"/"+a.version}).join(" "):navigator.userAgent}function da(){return!/^((?!chrome|android).)*safari/i.test(ut())}function Ae(e,a,t){a===void 0&&(a=!1),t===void 0&&(t=!1);var o=e.getBoundingClientRect(),n=1,r=1;a&&J(e)&&(n=e.offsetWidth>0&&Te(o.width)/e.offsetWidth||1,r=e.offsetHeight>0&&Te(o.height)/e.offsetHeight||1);var i=we(e)?X(e):window,l=i.visualViewport,s=!da()&&t,v=(o.left+(s&&l?l.offsetLeft:0))/n,u=(o.top+(s&&l?l.offsetTop:0))/r,c=o.width/n,f=o.height/r;return{width:c,height:f,top:u,right:v+c,bottom:u+f,left:v,x:v,y:u}}function mt(e){var a=X(e),t=a.pageXOffset,o=a.pageYOffset;return{scrollLeft:t,scrollTop:o}}function Dn(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Bn(e){return e===X(e)||!J(e)?mt(e):Dn(e)}function le(e){return e?(e.nodeName||"").toLowerCase():null}function he(e){return((we(e)?e.ownerDocument:e.document)||window.document).documentElement}function ht(e){return Ae(he(e)).left+mt(e).scrollLeft}function se(e){return X(e).getComputedStyle(e)}function bt(e){var a=se(e),t=a.overflow,o=a.overflowX,n=a.overflowY;return/auto|scroll|overlay|hidden/.test(t+n+o)}function Vn(e){var a=e.getBoundingClientRect(),t=Te(a.width)/e.offsetWidth||1,o=Te(a.height)/e.offsetHeight||1;return t!==1||o!==1}function Ln(e,a,t){t===void 0&&(t=!1);var o=J(a),n=J(a)&&Vn(a),r=he(a),i=Ae(e,n,t),l={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(o||!o&&!t)&&((le(a)!=="body"||bt(r))&&(l=Bn(a)),J(a)?(s=Ae(a,!0),s.x+=a.clientLeft,s.y+=a.clientTop):r&&(s.x=ht(r))),{x:i.left+l.scrollLeft-s.x,y:i.top+l.scrollTop-s.y,width:i.width,height:i.height}}function gt(e){var a=Ae(e),t=e.offsetWidth,o=e.offsetHeight;return Math.abs(a.width-t)<=1&&(t=a.width),Math.abs(a.height-o)<=1&&(o=a.height),{x:e.offsetLeft,y:e.offsetTop,width:t,height:o}}function tt(e){return le(e)==="html"?e:e.assignedSlot||e.parentNode||(pt(e)?e.host:null)||he(e)}function ca(e){return["html","body","#document"].indexOf(le(e))>=0?e.ownerDocument.body:J(e)&&bt(e)?e:ca(tt(e))}function Fe(e,a){var t;a===void 0&&(a=[]);var o=ca(e),n=o===((t=e.ownerDocument)==null?void 0:t.body),r=X(o),i=n?[r].concat(r.visualViewport||[],bt(o)?o:[]):o,l=a.concat(i);return n?l:l.concat(Fe(tt(i)))}function zn(e){return["table","td","th"].indexOf(le(e))>=0}function $t(e){return!J(e)||se(e).position==="fixed"?null:e.offsetParent}function $n(e){var a=/firefox/i.test(ut()),t=/Trident/i.test(ut());if(t&&J(e)){var o=se(e);if(o.position==="fixed")return null}var n=tt(e);for(pt(n)&&(n=n.host);J(n)&&["html","body"].indexOf(le(n))<0;){var r=se(n);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||a&&r.willChange==="filter"||a&&r.filter&&r.filter!=="none")return n;n=n.parentNode}return null}function We(e){for(var a=X(e),t=$t(e);t&&zn(t)&&se(t).position==="static";)t=$t(t);return t&&(le(t)==="html"||le(t)==="body"&&se(t).position==="static")?a:t||$n(e)||a}var K="top",_="bottom",ee="right",Y="left",yt="auto",qe=[K,_,ee,Y],Pe="start",He="end",jn="clippingParents",va="viewport",je="popper",Fn="reference",jt=qe.reduce(function(e,a){return e.concat([a+"-"+Pe,a+"-"+He])},[]),fa=[].concat(qe,[yt]).reduce(function(e,a){return e.concat([a,a+"-"+Pe,a+"-"+He])},[]),Nn="beforeRead",Hn="read",Wn="afterRead",qn="beforeMain",Un="main",Kn="afterMain",Yn="beforeWrite",Xn="write",Gn="afterWrite",Qn=[Nn,Hn,Wn,qn,Un,Kn,Yn,Xn,Gn];function Jn(e){var a=new Map,t=new Set,o=[];e.forEach(function(r){a.set(r.name,r)});function n(r){t.add(r.name);var i=[].concat(r.requires||[],r.requiresIfExists||[]);i.forEach(function(l){if(!t.has(l)){var s=a.get(l);s&&n(s)}}),o.push(r)}return e.forEach(function(r){t.has(r.name)||n(r)}),o}function Zn(e){var a=Jn(e);return Qn.reduce(function(t,o){return t.concat(a.filter(function(n){return n.phase===o}))},[])}function _n(e){var a;return function(){return a||(a=new Promise(function(t){Promise.resolve().then(function(){a=void 0,t(e())})})),a}}function eo(e){var a=e.reduce(function(t,o){var n=t[o.name];return t[o.name]=n?Object.assign({},n,o,{options:Object.assign({},n.options,o.options),data:Object.assign({},n.data,o.data)}):o,t},{});return Object.keys(a).map(function(t){return a[t]})}function to(e,a){var t=X(e),o=he(e),n=t.visualViewport,r=o.clientWidth,i=o.clientHeight,l=0,s=0;if(n){r=n.width,i=n.height;var v=da();(v||!v&&a==="fixed")&&(l=n.offsetLeft,s=n.offsetTop)}return{width:r,height:i,x:l+ht(e),y:s}}function ao(e){var a,t=he(e),o=mt(e),n=(a=e.ownerDocument)==null?void 0:a.body,r=Oe(t.scrollWidth,t.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),i=Oe(t.scrollHeight,t.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),l=-o.scrollLeft+ht(e),s=-o.scrollTop;return se(n||t).direction==="rtl"&&(l+=Oe(t.clientWidth,n?n.clientWidth:0)-r),{width:r,height:i,x:l,y:s}}function pa(e,a){var t=a.getRootNode&&a.getRootNode();if(e.contains(a))return!0;if(t&&pt(t)){var o=a;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function dt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function no(e,a){var t=Ae(e,!1,a==="fixed");return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function Ft(e,a,t){return a===va?dt(to(e,t)):we(a)?no(a,t):dt(ao(he(e)))}function oo(e){var a=Fe(tt(e)),t=["absolute","fixed"].indexOf(se(e).position)>=0,o=t&&J(e)?We(e):e;return we(o)?a.filter(function(n){return we(n)&&pa(n,o)&&le(n)!=="body"}):[]}function io(e,a,t,o){var n=a==="clippingParents"?oo(e):[].concat(a),r=[].concat(n,[t]),i=r[0],l=r.reduce(function(s,v){var u=Ft(e,v,o);return s.top=Oe(u.top,s.top),s.right=Ze(u.right,s.right),s.bottom=Ze(u.bottom,s.bottom),s.left=Oe(u.left,s.left),s},Ft(e,i,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function oe(e){return e.split("-")[0]}function ke(e){return e.split("-")[1]}function Ot(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ma(e){var a=e.reference,t=e.element,o=e.placement,n=o?oe(o):null,r=o?ke(o):null,i=a.x+a.width/2-t.width/2,l=a.y+a.height/2-t.height/2,s;switch(n){case K:s={x:i,y:a.y-t.height};break;case _:s={x:i,y:a.y+a.height};break;case ee:s={x:a.x+a.width,y:l};break;case Y:s={x:a.x-t.width,y:l};break;default:s={x:a.x,y:a.y}}var v=n?Ot(n):null;if(v!=null){var u=v==="y"?"height":"width";switch(r){case Pe:s[v]=s[v]-(a[u]/2-t[u]/2);break;case He:s[v]=s[v]+(a[u]/2-t[u]/2);break}}return s}function ha(){return{top:0,right:0,bottom:0,left:0}}function ba(e){return Object.assign({},ha(),e)}function ga(e,a){return a.reduce(function(t,o){return t[o]=e,t},{})}function xt(e,a){a===void 0&&(a={});var t=a,o=t.placement,n=o===void 0?e.placement:o,r=t.strategy,i=r===void 0?e.strategy:r,l=t.boundary,s=l===void 0?jn:l,v=t.rootBoundary,u=v===void 0?va:v,c=t.elementContext,f=c===void 0?je:c,O=t.altBoundary,x=O===void 0?!1:O,S=t.padding,C=S===void 0?0:S,g=ba(typeof C!="number"?C:ga(C,qe)),I=f===je?Fn:je,p=e.rects.popper,d=e.elements[x?I:f],b=io(we(d)?d:d.contextElement||he(e.elements.popper),s,u,i),y=Ae(e.elements.reference),M=ma({reference:y,element:p,strategy:"absolute",placement:n}),m=dt(Object.assign({},p,M)),A=f===je?m:y,h={top:b.top-A.top+g.top,bottom:A.bottom-b.bottom+g.bottom,left:b.left-A.left+g.left,right:A.right-b.right+g.right},w=e.modifiersData.offset;if(f===je&&w){var T=w[n];Object.keys(h).forEach(function(E){var k=[ee,_].indexOf(E)>=0?1:-1,D=[K,_].indexOf(E)>=0?"y":"x";h[E]+=T[D]*k})}return h}var Nt={placement:"bottom",modifiers:[],strategy:"absolute"};function Ht(){for(var e=arguments.length,a=new Array(e),t=0;t=0});f.length===0&&(f=c);var O=f.reduce(function(x,S){return x[S]=xt(e,{placement:S,boundary:n,rootBoundary:r,padding:i})[oe(S)],x},{});return Object.keys(O).sort(function(x,S){return O[x]-O[S]})}function xo(e){if(oe(e)===yt)return[];var a=Je(e);return[qt(e),a,qt(a)]}function wo(e){var a=e.state,t=e.options,o=e.name;if(!a.modifiersData[o]._skip){for(var n=t.mainAxis,r=n===void 0?!0:n,i=t.altAxis,l=i===void 0?!0:i,s=t.fallbackPlacements,v=t.padding,u=t.boundary,c=t.rootBoundary,f=t.altBoundary,O=t.flipVariations,x=O===void 0?!0:O,S=t.allowedAutoPlacements,C=a.options.placement,g=oe(C),I=g===C,p=s||(I||!x?[Je(C)]:xo(C)),d=[C].concat(p).reduce(function(Ie,ce){return Ie.concat(oe(ce)===yt?Oo(a,{placement:ce,boundary:u,rootBoundary:c,padding:v,flipVariations:x,allowedAutoPlacements:S}):ce)},[]),b=a.rects.reference,y=a.rects.popper,M=new Map,m=!0,A=d[0],h=0;h=0,D=k?"width":"height",L=xt(a,{placement:w,boundary:u,rootBoundary:c,altBoundary:f,padding:v}),H=k?E?ee:Y:E?_:K;b[D]>y[D]&&(H=Je(H));var G=Je(H),Z=[];if(r&&Z.push(L[T]<=0),l&&Z.push(L[H]<=0,L[G]<=0),Z.every(function(Ie){return Ie})){A=w,m=!1;break}M.set(w,Z)}if(m)for(var $=x?3:1,W=function(ce){var Be=d.find(function(Ue){var be=M.get(Ue);if(be)return be.slice(0,ce).every(function(at){return at})});if(Be)return A=Be,"break"},ae=$;ae>0;ae--){var de=W(ae);if(de==="break")break}a.placement!==A&&(a.modifiersData[o]._skip=!0,a.placement=A,a.reset=!0)}}const So={name:"flip",enabled:!0,phase:"main",fn:wo,requiresIfExists:["offset"],data:{_skip:!1}};function Io(e,a,t){var o=oe(e),n=[Y,K].indexOf(o)>=0?-1:1,r=typeof t=="function"?t(Object.assign({},a,{placement:e})):t,i=r[0],l=r[1];return i=i||0,l=(l||0)*n,[Y,ee].indexOf(o)>=0?{x:l,y:i}:{x:i,y:l}}function Co(e){var a=e.state,t=e.options,o=e.name,n=t.offset,r=n===void 0?[0,0]:n,i=fa.reduce(function(u,c){return u[c]=Io(c,a.rects,r),u},{}),l=i[a.placement],s=l.x,v=l.y;a.modifiersData.popperOffsets!=null&&(a.modifiersData.popperOffsets.x+=s,a.modifiersData.popperOffsets.y+=v),a.modifiersData[o]=i}const Mo={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Co};function Ro(e){return e==="x"?"y":"x"}function Ne(e,a,t){return Oe(e,Ze(a,t))}function Eo(e,a,t){var o=Ne(e,a,t);return o>t?t:o}function To(e){var a=e.state,t=e.options,o=e.name,n=t.mainAxis,r=n===void 0?!0:n,i=t.altAxis,l=i===void 0?!1:i,s=t.boundary,v=t.rootBoundary,u=t.altBoundary,c=t.padding,f=t.tether,O=f===void 0?!0:f,x=t.tetherOffset,S=x===void 0?0:x,C=xt(a,{boundary:s,rootBoundary:v,padding:c,altBoundary:u}),g=oe(a.placement),I=ke(a.placement),p=!I,d=Ot(g),b=Ro(d),y=a.modifiersData.popperOffsets,M=a.rects.reference,m=a.rects.popper,A=typeof S=="function"?S(Object.assign({},a.rects,{placement:a.placement})):S,h=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),w=a.modifiersData.offset?a.modifiersData.offset[a.placement]:null,T={x:0,y:0};if(y){if(r){var E,k=d==="y"?K:Y,D=d==="y"?_:ee,L=d==="y"?"height":"width",H=y[d],G=H+C[k],Z=H-C[D],$=O?-m[L]/2:0,W=I===Pe?M[L]:m[L],ae=I===Pe?-m[L]:-M[L],de=a.elements.arrow,Ie=O&&de?gt(de):{width:0,height:0},ce=a.modifiersData["arrow#persistent"]?a.modifiersData["arrow#persistent"].padding:ha(),Be=ce[k],Ue=ce[D],be=Ne(0,M[L],Ie[L]),at=p?M[L]/2-$-be-Be-h.mainAxis:W-be-Be-h.mainAxis,xa=p?-M[L]/2+$+be+Ue+h.mainAxis:ae+be+Ue+h.mainAxis,nt=a.elements.arrow&&We(a.elements.arrow),wa=nt?d==="y"?nt.clientTop||0:nt.clientLeft||0:0,wt=(E=w==null?void 0:w[d])!=null?E:0,Sa=H+at-wt-wa,Ia=H+xa-wt,St=Ne(O?Ze(G,Sa):G,H,O?Oe(Z,Ia):Z);y[d]=St,T[d]=St-H}if(l){var It,Ca=d==="x"?K:Y,Ma=d==="x"?_:ee,ge=y[b],Ke=b==="y"?"height":"width",Ct=ge+C[Ca],Mt=ge-C[Ma],ot=[K,Y].indexOf(g)!==-1,Rt=(It=w==null?void 0:w[b])!=null?It:0,Et=ot?Ct:ge-M[Ke]-m[Ke]-Rt+h.altAxis,Tt=ot?ge+M[Ke]+m[Ke]-Rt-h.altAxis:Mt,At=O&&ot?Eo(Et,ge,Tt):Ne(O?Et:Ct,ge,O?Tt:Mt);y[b]=At,T[b]=At-ge}a.modifiersData[o]=T}}const Ao={name:"preventOverflow",enabled:!0,phase:"main",fn:To,requiresIfExists:["offset"]};var Po=function(a,t){return a=typeof a=="function"?a(Object.assign({},t.rects,{placement:t.placement})):a,ba(typeof a!="number"?a:ga(a,qe))};function ko(e){var a,t=e.state,o=e.name,n=e.options,r=t.elements.arrow,i=t.modifiersData.popperOffsets,l=oe(t.placement),s=Ot(l),v=[Y,ee].indexOf(l)>=0,u=v?"height":"width";if(!(!r||!i)){var c=Po(n.padding,t),f=gt(r),O=s==="y"?K:Y,x=s==="y"?_:ee,S=t.rects.reference[u]+t.rects.reference[s]-i[s]-t.rects.popper[u],C=i[s]-t.rects.reference[s],g=We(r),I=g?s==="y"?g.clientHeight||0:g.clientWidth||0:0,p=S/2-C/2,d=c[O],b=I-f[u]-c[x],y=I/2-f[u]/2+p,M=Ne(d,y,b),m=s;t.modifiersData[o]=(a={},a[m]=M,a.centerOffset=M-y,a)}}function Do(e){var a=e.state,t=e.options,o=t.element,n=o===void 0?"[data-popper-arrow]":o;n!=null&&(typeof n=="string"&&(n=a.elements.popper.querySelector(n),!n)||pa(a.elements.popper,n)&&(a.elements.arrow=n))}const Bo={name:"arrow",enabled:!0,phase:"main",fn:ko,effect:Do,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},Vo=lo({defaultModifiers:[...bo,Mo,So,Ao,Oa,ya,Bo]});function Lo({locked:e=!1,overflowPadding:a=8,offsetDistance:t=8,offsetSkid:o=0,gpuAcceleration:n=!0,adaptive:r=!0,scroll:i=!0,resize:l=!0,arrow:s=!1,placement:v,strategy:u},c){const f=z(null),O=z(null),x=z(null);return xe(()=>{Ee(S=>{if(!O.value||!f.value&&!(c!=null&&c.value))return;const C=Bt(O),g=(c==null?void 0:c.value)||Bt(f);if(!(C instanceof HTMLElement)||!g)return;const I={modifiers:[{name:"flip",enabled:!e},{name:"preventOverflow",options:{padding:a}},{name:"offset",options:{offset:[o,t]}},{name:"computeStyles",options:{adaptive:r,gpuAcceleration:n}},{name:"eventListeners",options:{scroll:i,resize:l}},{name:"arrow",enabled:s}]};v&&(I.placement=v),u&&(I.strategy=u),x.value=Vo(g,C,I),S(x.value.destroy)})}),[f,O,x]}const ne=na(ye.ui.strategy,ye.ui.select,$a),Ge=na(ye.ui.strategy,ye.ui.selectMenu,ja),zo=te({components:{HCombobox:yn,HComboboxButton:On,HComboboxOptions:wn,HComboboxOption:Sn,HComboboxInput:xn,HListbox:Tn,HListboxButton:An,HListboxOptions:Pn,HListboxOption:kn,UIcon:oa,UAvatar:ia},inheritAttrs:!1,props:{modelValue:{type:[String,Number,Object,Array,Boolean],default:""},query:{type:String,default:null},by:{type:String,default:void 0},options:{type:Array,default:()=>[]},id:{type:String,default:null},name:{type:String,default:null},required:{type:Boolean,default:!1},icon:{type:String,default:null},loadingIcon:{type:String,default:()=>ne.default.loadingIcon},leadingIcon:{type:String,default:null},trailingIcon:{type:String,default:()=>ne.default.trailingIcon},trailing:{type:Boolean,default:!1},leading:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},selectedIcon:{type:String,default:()=>Ge.default.selectedIcon},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},searchable:{type:[Boolean,Function],default:!1},searchablePlaceholder:{type:String,default:"Search..."},clearSearchOnClose:{type:Boolean,default:()=>Ge.default.clearSearchOnClose},debounce:{type:Number,default:200},creatable:{type:Boolean,default:!1},showCreateOptionWhen:{type:String,default:()=>Ge.default.showCreateOptionWhen},placeholder:{type:String,default:null},padded:{type:Boolean,default:!0},size:{type:String,default:null,validator(e){return Object.keys(ne.size).includes(e)}},color:{type:String,default:()=>ne.default.color,validator(e){return[...ye.ui.colors,...Object.keys(ne.color)].includes(e)}},variant:{type:String,default:()=>ne.default.variant,validator(e){return[...Object.keys(ne.variant),...Object.values(ne.color).flatMap(a=>Object.keys(a))].includes(e)}},optionAttribute:{type:String,default:"label"},valueAttribute:{type:String,default:null},searchAttributes:{type:Array,default:null},popper:{type:Object,default:()=>({})},selectClass:{type:String,default:null},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})},uiMenu:{type:Object,default:()=>({})}},emits:["update:modelValue","update:query","open","close","change"],setup(e,{emit:a,slots:t}){const{ui:o,attrs:n}=Vt("select",it(e,"ui"),ne,it(e,"class")),{ui:r}=Vt("selectMenu",it(e,"uiMenu"),Ge),i=R(()=>Fa({},e.popper,r.value.popper)),[l,s]=Lo(i.value),{size:v,rounded:u}=Na({ui:o,props:e}),{emitFormBlur:c,emitFormChange:f,inputId:O,color:x,size:S,name:C}=Ha(e,ne),g=R(()=>v.value||S.value),I=z(""),p=R({get(){return e.query??I.value},set($){I.value=$,a("update:query",$)}}),d=R(()=>{if(e.multiple)return Array.isArray(e.modelValue)&&e.modelValue.length?`${e.modelValue.length} selected`:null;if(e.modelValue!==void 0&&e.modelValue!==null)if(e.valueAttribute){const $=e.options.find(W=>W[e.valueAttribute]===e.modelValue);return $?$[e.optionAttribute]:null}else return["string","number"].includes(typeof e.modelValue)?e.modelValue:e.modelValue[e.optionAttribute];return null}),b=R(()=>{var W,ae;const $=((ae=(W=o.value.color)==null?void 0:W[x.value])==null?void 0:ae[e.variant])||o.value.variant[e.variant];return Wa(Ve(o.value.base,r.value.select,u.value,o.value.size[g.value],o.value.gap[g.value],e.padded?o.value.padding[g.value]:"p-0",$==null?void 0:$.replaceAll("{color}",x.value),(y.value||t.leading)&&o.value.leading.padding[g.value],(M.value||t.trailing)&&o.value.trailing.padding[g.value]),e.placeholder&&e.modelValue===void 0&&e.modelValue===null&&o.value.placeholder,e.selectClass)}),y=R(()=>e.icon&&e.leading||e.icon&&!e.trailing||e.loading&&!e.trailing||e.leadingIcon),M=R(()=>e.icon&&e.trailing||e.loading&&e.trailing||e.trailingIcon),m=R(()=>e.loading?e.loadingIcon:e.leadingIcon||e.icon),A=R(()=>e.loading&&!y.value?e.loadingIcon:e.trailingIcon||e.icon),h=R(()=>Ve(o.value.icon.leading.wrapper,o.value.icon.leading.pointer,o.value.icon.leading.padding[g.value])),w=R(()=>Ve(o.value.icon.base,x.value&&ye.ui.colors.includes(x.value)&&o.value.icon.color.replaceAll("{color}",x.value),o.value.icon.size[g.value],e.loading&&o.value.icon.loading)),T=R(()=>Ve(o.value.icon.trailing.wrapper,o.value.icon.trailing.pointer,o.value.icon.trailing.padding[g.value])),E=R(()=>Ve(o.value.icon.base,x.value&&ye.ui.colors.includes(x.value)&&o.value.icon.color.replaceAll("{color}",x.value),o.value.icon.size[g.value],e.loading&&!y.value&&o.value.icon.loading)),k=typeof e.searchable=="function"?qa(e.searchable,e.debounce):void 0,D=Ua(async()=>e.searchable&&k?await k(p.value):p.value===""?e.options:e.options.filter($=>{var W;return((W=e.searchAttributes)!=null&&W.length?e.searchAttributes:[e.optionAttribute]).some(ae=>{if(["string","number"].includes(typeof $))return String($).search(new RegExp(p.value,"i"))!==-1;const de=Ja($,ae);return de!=null&&String(de).search(new RegExp(p.value,"i"))!==-1})})),L=R(()=>p.value===""||e.showCreateOptionWhen==="empty"&&D.value.length||e.showCreateOptionWhen==="always"&&D.value.find(W=>["string","number"].includes(typeof W)?W===p.value:W[e.optionAttribute]===p.value)?null:["string","number"].includes(typeof e.modelValue)?p.value:{[e.optionAttribute]:p.value});function H(){e.clearSearchOnClose&&(p.value="")}ie(s,$=>{$?a("open"):(H(),a("close"),c())});function G($){a("update:modelValue",$),a("change",$),f()}function Z($){p.value=$.target.value}return Ka(()=>Za("$YMH7mn4R4k")),{ui:o,uiMenu:r,attrs:n,name:C,inputId:O,popper:i,trigger:l,container:s,label:d,isLeading:y,isTrailing:M,selectClass:b,leadingIconName:m,leadingIconClass:w,leadingWrapperIconClass:h,trailingIconName:A,trailingIconClass:E,trailingWrapperIconClass:T,filteredOptions:D,createOption:L,query:p,onUpdate:G,onQueryChange:Z}}}),$o=["value","required"],jo=["id","disabled"],Fo={class:"truncate"};function No(e,a,t,o,n,r){const i=oa,l=Ya("HComboboxInput"),s=ia;return F(),ve(Le(e.searchable?"HCombobox":"HListbox"),{by:e.by,name:e.name,"model-value":e.modelValue,multiple:e.multiple,disabled:e.disabled,as:"div",class:j(e.ui.wrapper),"onUpdate:modelValue":e.onUpdate},{default:Ce(({open:v})=>[e.required?(F(),Q("input",{key:0,value:e.modelValue,required:e.required,class:j(e.uiMenu.required),tabindex:"-1","aria-hidden":"true"},null,10,$o)):re("",!0),(F(),ve(Le(e.searchable?"HComboboxButton":"HListboxButton"),{ref:"trigger",as:"div",role:"button",class:j(e.uiMenu.trigger)},{default:Ce(()=>[fe(e.$slots,"default",{open:v,disabled:e.disabled,loading:e.loading},()=>[pe("button",lt({id:e.inputId,class:e.selectClass,disabled:e.disabled,type:"button"},e.attrs),[e.isLeading&&e.leadingIconName||e.$slots.leading?(F(),Q("span",{key:0,class:j(e.leadingWrapperIconClass)},[fe(e.$slots,"leading",{disabled:e.disabled,loading:e.loading},()=>[Ye(i,{name:e.leadingIconName,class:j(e.leadingIconClass)},null,8,["name","class"])])],2)):re("",!0),fe(e.$slots,"label",{},()=>[e.label?(F(),Q("span",{key:0,class:j(e.uiMenu.label)},ze(e.label),3)):(F(),Q("span",{key:1,class:j(e.uiMenu.label)},ze(e.placeholder||" "),3))]),e.isTrailing&&e.trailingIconName||e.$slots.trailing?(F(),Q("span",{key:1,class:j(e.trailingWrapperIconClass)},[fe(e.$slots,"trailing",{disabled:e.disabled,loading:e.loading},()=>[Ye(i,{name:e.trailingIconName,class:j(e.trailingIconClass),"aria-hidden":"true"},null,8,["name","class"])])],2)):re("",!0)],16,jo)])]),_:2},1032,["class"])),v?(F(),Q("div",{key:1,ref:"container",class:j([e.uiMenu.container,e.uiMenu.width])},[Ye(Xa,lt({appear:""},e.uiMenu.transition),{default:Ce(()=>[pe("div",null,[e.popper.arrow?(F(),Q("div",{key:0,"data-popper-arrow":"",class:j(Object.values(e.uiMenu.arrow))},null,2)):re("",!0),(F(),ve(Le(e.searchable?"HComboboxOptions":"HListboxOptions"),{static:"",class:j([e.uiMenu.base,e.uiMenu.ring,e.uiMenu.rounded,e.uiMenu.shadow,e.uiMenu.background,e.uiMenu.padding,e.uiMenu.height])},{default:Ce(()=>{var u,c;return[e.searchable?(F(),ve(l,{key:0,"display-value":()=>e.query,name:"q",placeholder:e.searchablePlaceholder,autofocus:"",autocomplete:"off",class:j(e.uiMenu.input),onChange:e.onQueryChange},null,8,["display-value","placeholder","class","onChange"])):re("",!0),(F(!0),Q(vt,null,Ga(e.filteredOptions,(f,O)=>(F(),ve(Le(e.searchable?"HComboboxOption":"HListboxOption"),{key:O,as:"template",value:e.valueAttribute?f[e.valueAttribute]:f,disabled:f.disabled},{default:Ce(({active:x,selected:S,disabled:C})=>[pe("li",{class:j([e.uiMenu.option.base,e.uiMenu.option.rounded,e.uiMenu.option.padding,e.uiMenu.option.size,e.uiMenu.option.color,x?e.uiMenu.option.active:e.uiMenu.option.inactive,S&&e.uiMenu.option.selected,C&&e.uiMenu.option.disabled])},[pe("div",{class:j(e.uiMenu.option.container)},[fe(e.$slots,"option",{option:f,active:x,selected:S},()=>[f.icon?(F(),ve(i,{key:0,name:f.icon,class:j([e.uiMenu.option.icon.base,x?e.uiMenu.option.icon.active:e.uiMenu.option.icon.inactive,f.iconClass]),"aria-hidden":"true"},null,8,["name","class"])):f.avatar?(F(),ve(s,lt({key:1},{size:e.uiMenu.option.avatar.size,...f.avatar},{class:e.uiMenu.option.avatar.base,"aria-hidden":"true"}),null,16,["class"])):f.chip?(F(),Q("span",{key:2,class:j(e.uiMenu.option.chip.base),style:Qa({background:`#${f.chip}`})},null,6)):re("",!0),pe("span",Fo,ze(["string","number"].includes(typeof f)?f:f[e.optionAttribute]),1)])],2),S?(F(),Q("span",{key:0,class:j([e.uiMenu.option.selectedIcon.wrapper,e.uiMenu.option.selectedIcon.padding])},[Ye(i,{name:e.selectedIcon,class:j(e.uiMenu.option.selectedIcon.base),"aria-hidden":"true"},null,8,["name","class"])],2)):re("",!0)],2)]),_:2},1032,["value","disabled"]))),128)),e.creatable&&e.createOption?(F(),ve(Le(e.searchable?"HComboboxOption":"HListboxOption"),{key:1,value:e.createOption,as:"template"},{default:Ce(({active:f,selected:O})=>[pe("li",{class:j([e.uiMenu.option.base,e.uiMenu.option.rounded,e.uiMenu.option.padding,e.uiMenu.option.size,e.uiMenu.option.color,f?e.uiMenu.option.active:e.uiMenu.option.inactive])},[pe("div",{class:j(e.uiMenu.option.container)},[fe(e.$slots,"option-create",{option:e.createOption,active:f,selected:O},()=>[pe("span",{class:j(e.uiMenu.option.create)},'Create "'+ze(e.createOption[e.optionAttribute])+'"',3)])],2)],2)]),_:3},8,["value"])):e.searchable&&e.query&&!((u=e.filteredOptions)!=null&&u.length)?(F(),Q("p",{key:2,class:j(e.uiMenu.option.empty)},[fe(e.$slots,"option-empty",{query:e.query},()=>[Lt(' No results for "'+ze(e.query)+'". ',1)])],2)):(c=e.filteredOptions)!=null&&c.length?re("",!0):(F(),Q("p",{key:3,class:j(e.uiMenu.empty)},[fe(e.$slots,"empty",{query:e.query},()=>[Lt(" No options. ")])],2))]}),_:3},8,["class"]))])]),_:3},16)],2)):re("",!0)]),_:3},8,["by","name","model-value","multiple","disabled","class","onUpdate:modelValue"])}const Wo=za(zo,[["render",No]]);export{Wo as _}; + color: hsl(${Math.max(0,Math.min(120-120*S,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(s=t==null?void 0:t.onChange)==null||s.call(t,n),n}}function rt(e,a){if(e===void 0)throw new Error(`Unexpected undefined${a?`: ${a}`:""}`);return e}const _a=(e,a)=>Math.abs(e-a)<1,en=(e,a)=>{let t;return function(...o){clearTimeout(t),t=setTimeout(()=>e.apply(this,o),a)}},tn=e=>e,an=e=>{const a=Math.max(e.startIndex-e.overscan,0),t=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let n=a;n<=t;n++)o.push(n);return o},nn=(e,a)=>{const t=e.scrollElement;if(!t)return;const o=r=>{const{width:i,height:l}=r;a({width:Math.round(i),height:Math.round(l)})};if(o(t.getBoundingClientRect()),typeof ResizeObserver>"u")return()=>{};const n=new ResizeObserver(r=>{const i=r[0];if(i!=null&&i.borderBoxSize){const l=i.borderBoxSize[0];if(l){o({width:l.inlineSize,height:l.blockSize});return}}o(t.getBoundingClientRect())});return n.observe(t,{box:"border-box"}),()=>{n.unobserve(t)}},zt={passive:!0},on=typeof window>"u"?!0:"onscrollend"in window,ln=(e,a)=>{const t=e.scrollElement;if(!t)return;let o=0;const n=on?()=>{}:en(()=>{a(o,!1)},150),r=s=>()=>{o=t[e.options.horizontal?"scrollLeft":"scrollTop"],n(),a(o,s)},i=r(!0),l=r(!1);return l(),t.addEventListener("scroll",i,zt),t.addEventListener("scrollend",l,zt),()=>{t.removeEventListener("scroll",i),t.removeEventListener("scrollend",l)}},rn=(e,a,t)=>{if(a!=null&&a.borderBoxSize){const o=a.borderBoxSize[0];if(o)return Math.round(o[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[t.options.horizontal?"width":"height"])},sn=(e,{adjustments:a=0,behavior:t},o)=>{var n,r;const i=e+a;(r=(n=o.scrollElement)==null?void 0:n.scrollTo)==null||r.call(n,{[o.options.horizontal?"left":"top"]:i,behavior:t})};class un{constructor(a){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let t=null;const o=()=>t||(typeof ResizeObserver<"u"?t=new ResizeObserver(n=>{n.forEach(r=>{this._measureElement(r.target,r)})}):null);return{disconnect:()=>{var n;return(n=o())==null?void 0:n.disconnect()},observe:n=>{var r;return(r=o())==null?void 0:r.observe(n,{box:"border-box"})},unobserve:n=>{var r;return(r=o())==null?void 0:r.unobserve(n)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([o,n])=>{typeof n>"u"&&delete t[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:tn,rangeExtractor:an,onChange:()=>{},measureElement:rn,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,...t}},this.notify=(t,o)=>{var n,r;const{startIndex:i,endIndex:l}=this.range??{startIndex:void 0,endIndex:void 0},s=this.calculateRange();(t||i!==(s==null?void 0:s.startIndex)||l!==(s==null?void 0:s.endIndex))&&((r=(n=this.options).onChange)==null||r.call(n,this,o))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{const t=this.options.getScrollElement();this.scrollElement!==t&&(this.cleanup(),this.scrollElement=t,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,n)=>{this.scrollAdjustments=0,this.scrollDirection=n?this.scrollOffsetthis.scrollRect[this.options.horizontal?"width":"height"],this.getMeasurementOptions=$e(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey],(t,o,n,r)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:o,scrollMargin:n,getItemKey:r}),{key:!1}),this.getFurthestMeasurement=(t,o)=>{const n=new Map,r=new Map;for(let i=o-1;i>=0;i--){const l=t[i];if(n.has(l.lane))continue;const s=r.get(l.lane);if(s==null||l.end>s.end?r.set(l.lane,l):l.endi.end===l.end?i.index-l.index:i.end-l.end)[0]:void 0},this.getMeasurements=$e(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:o,scrollMargin:n,getItemKey:r},i)=>{const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const s=this.measurementsCache.slice(0,l);for(let v=l;vthis.options.debug}),this.calculateRange=$e(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(t,o,n)=>this.range=t.length>0&&o>0?dn({measurements:t,outerSize:o,scrollOffset:n}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=$e(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(t,o,n,r)=>o===null?[]:t({startIndex:o.startIndex,endIndex:o.endIndex,overscan:n,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const o=this.options.indexAttribute,n=t.getAttribute(o);return n?parseInt(n,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(t,o)=>{const n=this.measurementsCache[this.indexFromElement(t)];if(!n||!t.isConnected){this.measureElementCache.forEach((l,s)=>{l===t&&(this.observer.unobserve(t),this.measureElementCache.delete(s))});return}const r=this.measureElementCache.get(n.key);r!==t&&(r&&this.observer.unobserve(r),this.observer.observe(t),this.measureElementCache.set(n.key,t));const i=this.options.measureElement(t,o,this);this.resizeItem(n,i)},this.resizeItem=(t,o)=>{const n=this.itemSizeCache.get(t.key)??t.size,r=o-n;r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(t,r,this):t.start{t&&this._measureElement(t,void 0)},this.getVirtualItems=$e(()=>[this.getIndexes(),this.getMeasurements()],(t,o)=>{const n=[];for(let r=0,i=t.length;rthis.options.debug}),this.getVirtualItemForOffset=t=>{const o=this.getMeasurements();return rt(o[la(0,o.length-1,n=>rt(o[n]).start,t)])},this.getOffsetForAlignment=(t,o)=>{const n=this.getSize();o==="auto"&&(t<=this.scrollOffset?o="start":t>=this.scrollOffset+n?o="end":o="start"),o==="start"?t=t:o==="end"?t=t-n:o==="center"&&(t=t-n/2);const r=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[r]:this.scrollElement[r]:0)-this.getSize();return Math.max(Math.min(l,t),0)},this.getOffsetForIndex=(t,o="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const n=rt(this.getMeasurements()[t]);if(o==="auto")if(n.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)o="end";else if(n.start<=this.scrollOffset+this.options.scrollPaddingStart)o="start";else return[this.scrollOffset,o];const r=o==="end"?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(r,o),o]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&(clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:o="start",behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,o),{adjustments:void 0,behavior:n})},this.scrollToIndex=(t,{align:o="auto",behavior:n}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const[r,i]=this.getOffsetForIndex(t,o);this._scrollToOffset(r,{adjustments:void 0,behavior:n}),n!=="smooth"&&this.isDynamicMode()&&(this.scrollToIndexTimeoutId=setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.measureElementCache.has(this.options.getItemKey(t))){const[s]=this.getOffsetForIndex(t,i);_a(s,this.scrollOffset)||this.scrollToIndex(t,{align:i,behavior:n})}else this.scrollToIndex(t,{align:i,behavior:n})}))},this.scrollBy=(t,{behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+t,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var t;const o=this.getMeasurements();let n;return o.length===0?n=this.options.paddingStart:n=this.options.lanes===1?((t=o[o.length-1])==null?void 0:t.end)??0:Math.max(...o.slice(-this.options.lanes).map(r=>r.end)),n-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:o,behavior:n})=>{this.options.scrollToFn(t,{behavior:n,adjustments:o},this)},this.measure=()=>{var t,o;this.itemSizeCache=new Map,(o=(t=this.options).onChange)==null||o.call(t,this,!1)},this.setOptions(a),this.scrollRect=this.options.initialRect,this.scrollOffset=typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(t=>{this.itemSizeCache.set(t.key,t.size)}),this.notify(!1,!1)}}const la=(e,a,t,o)=>{for(;e<=a;){const n=(e+a)/2|0,r=t(n);if(ro)a=n-1;else return n}return e>0?e-1:0};function dn({measurements:e,outerSize:a,scrollOffset:t}){const o=e.length-1,r=la(0,o,l=>e[l].start,t);let i=r;for(;iQe(e).getScrollElement(),n=>{n&&a._willUpdate()},{immediate:!0}),ie(()=>Qe(e),n=>{a.setOptions({...n,onChange:(r,i)=>{var l;Pt(t),(l=n.onChange)==null||l.call(n,r,i)}}),a._willUpdate(),Pt(t)},{immediate:!0}),Ea(o),t}function vn(e){return cn(R(()=>({observeElementRect:nn,observeElementOffset:ln,scrollToFn:sn,...Qe(e)})))}var fn={};function pn(e,a){return e===a}var mn=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(mn||{}),hn=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(hn||{}),bn=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(bn||{});let ra=Symbol("ComboboxContext");function De(e){let a=ft(ra,null);if(a===null){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,De),t}return a}let sa=Symbol("VirtualContext"),gn=te({name:"VirtualProvider",setup(e,{slots:a}){let t=De("VirtualProvider"),o=R(()=>{let l=P(t.optionsRef);if(!l)return{start:0,end:0};let s=window.getComputedStyle(l);return{start:parseFloat(s.paddingBlockStart||s.paddingTop),end:parseFloat(s.paddingBlockEnd||s.paddingBottom)}}),n=vn(R(()=>({scrollPaddingStart:o.value.start,scrollPaddingEnd:o.value.end,count:t.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return P(t.optionsRef)},overscan:12}))),r=R(()=>{var l;return(l=t.virtual.value)==null?void 0:l.options}),i=z(0);return ie([r],()=>{i.value+=1}),ct(sa,t.virtual.value?n:null),()=>[Me("div",{style:{position:"relative",width:"100%",height:`${n.value.getTotalSize()}px`},ref:l=>{if(l){if(typeof process<"u"&&fn.JEST_WORKER_ID!==void 0||t.activationTrigger.value===0)return;t.activeOptionIndex.value!==null&&t.virtual.value.options.length>t.activeOptionIndex.value&&n.value.scrollToIndex(t.activeOptionIndex.value)}}},n.value.getVirtualItems().map(l=>ka(a.default({option:t.virtual.value.options[l.index],open:t.comboboxState.value===0})[0],{key:`${i.value}-${l.index}`,"data-index":l.index,"aria-setsize":t.virtual.value.options.length,"aria-posinset":l.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${l.start}px)`,overflowAnchor:"none"}})))]}}),yn=te({name:"Combobox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:a,attrs:t,emit:o}){let n=z(1),r=z(null),i=z(null),l=z(null),s=z(null),v=z({static:!1,hold:!1}),u=z([]),c=z(null),f=z(2),O=z(!1);function x(h=w=>w){let w=c.value!==null?u.value[c.value]:null,T=h(u.value.slice()),E=T.length>0&&T[0].dataRef.order.value!==null?T.sort((D,L)=>D.dataRef.order.value-L.dataRef.order.value):aa(T,D=>P(D.dataRef.domRef)),k=w?E.indexOf(w):null;return k===-1&&(k=null),{options:E,activeOptionIndex:k}}let S=R(()=>e.multiple?1:0),C=R(()=>e.nullable),[g,I]=Ut(R(()=>e.modelValue),h=>o("update:modelValue",h),R(()=>e.defaultValue)),p=R(()=>g.value===void 0?U(S.value,{1:[],0:void 0}):g.value),d=null,b=null;function y(h){return U(S.value,{0(){return I==null?void 0:I(h)},1:()=>{let w=N(m.value.value).slice(),T=N(h),E=w.findIndex(k=>m.compare(T,N(k)));return E===-1?w.push(T):w.splice(E,1),I==null?void 0:I(w)}})}let M=R(()=>{});ie([M],([h],[w])=>{if(m.virtual.value&&h&&w&&c.value!==null){let T=h.indexOf(w[c.value]);T!==-1?c.value=T:c.value=null}});let m={comboboxState:n,value:p,mode:S,compare(h,w){if(typeof e.by=="string"){let T=e.by;return(h==null?void 0:h[T])===(w==null?void 0:w[T])}return e.by===null?pn(h,w):e.by(h,w)},calculateIndex(h){return m.virtual.value?e.by===null?m.virtual.value.options.indexOf(h):m.virtual.value.options.findIndex(w=>m.compare(w,h)):u.value.findIndex(w=>m.compare(w.dataRef.value,h))},defaultValue:R(()=>e.defaultValue),nullable:C,immediate:R(()=>!1),virtual:R(()=>null),inputRef:i,labelRef:r,buttonRef:l,optionsRef:s,disabled:R(()=>e.disabled),options:u,change(h){I(h)},activeOptionIndex:R(()=>{if(O.value&&c.value===null&&(m.virtual.value?m.virtual.value.options.length>0:u.value.length>0)){if(m.virtual.value){let w=m.virtual.value.options.findIndex(T=>{var E;return!((E=m.virtual.value)!=null&&E.disabled(T))});if(w!==-1)return w}let h=u.value.findIndex(w=>!w.dataRef.disabled);if(h!==-1)return h}return c.value}),activationTrigger:f,optionsPropsRef:v,closeCombobox(){O.value=!1,!e.disabled&&n.value!==1&&(n.value=1,c.value=null)},openCombobox(){if(O.value=!0,!e.disabled&&n.value!==0){if(m.value.value){let h=m.calculateIndex(m.value.value);h!==-1&&(c.value=h)}n.value=0}},setActivationTrigger(h){f.value=h},goToOption(h,w,T){O.value=!1,d!==null&&cancelAnimationFrame(d),d=requestAnimationFrame(()=>{if(e.disabled||s.value&&!v.value.static&&n.value===1)return;if(m.virtual.value){c.value=h===B.Specific?w:st({focus:h},{resolveItems:()=>m.virtual.value.options,resolveActiveIndex:()=>{var D,L;return(L=(D=m.activeOptionIndex.value)!=null?D:m.virtual.value.options.findIndex(H=>{var G;return!((G=m.virtual.value)!=null&&G.disabled(H))}))!=null?L:null},resolveDisabled:D=>m.virtual.value.disabled(D),resolveId(){throw new Error("Function not implemented.")}}),f.value=T??2;return}let E=x();if(E.activeOptionIndex===null){let D=E.options.findIndex(L=>!L.dataRef.disabled);D!==-1&&(E.activeOptionIndex=D)}let k=h===B.Specific?w:st({focus:h},{resolveItems:()=>E.options,resolveActiveIndex:()=>E.activeOptionIndex,resolveId:D=>D.id,resolveDisabled:D=>D.dataRef.disabled});c.value=k,f.value=T??2,u.value=E.options})},selectOption(h){let w=u.value.find(E=>E.id===h);if(!w)return;let{dataRef:T}=w;y(T.value)},selectActiveOption(){if(m.activeOptionIndex.value!==null){if(m.virtual.value)y(m.virtual.value.options[m.activeOptionIndex.value]);else{let{dataRef:h}=u.value[m.activeOptionIndex.value];y(h.value)}m.goToOption(B.Specific,m.activeOptionIndex.value)}},registerOption(h,w){let T=Ta({id:h,dataRef:w});if(m.virtual.value){u.value.push(T);return}b&&cancelAnimationFrame(b);let E=x(k=>(k.push(T),k));c.value===null&&m.isSelected(w.value.value)&&(E.activeOptionIndex=E.options.indexOf(T)),u.value=E.options,c.value=E.activeOptionIndex,f.value=2,E.options.some(k=>!P(k.dataRef.domRef))&&(b=requestAnimationFrame(()=>{let k=x();u.value=k.options,c.value=k.activeOptionIndex}))},unregisterOption(h,w){if(d!==null&&cancelAnimationFrame(d),w&&(O.value=!0),m.virtual.value){u.value=u.value.filter(E=>E.id!==h);return}let T=x(E=>{let k=E.findIndex(D=>D.id===h);return k!==-1&&E.splice(k,1),E});u.value=T.options,c.value=T.activeOptionIndex,f.value=2},isSelected(h){return U(S.value,{0:()=>m.compare(N(m.value.value),N(h)),1:()=>N(m.value.value).some(w=>m.compare(N(w),N(h)))})},isActive(h){return c.value===m.calculateIndex(h)}};Kt([i,l,s],()=>m.closeCombobox(),R(()=>n.value===0)),ct(ra,m),Yt(R(()=>U(n.value,{0:me.Open,1:me.Closed})));let A=R(()=>{var h;return(h=P(i))==null?void 0:h.closest("form")});return xe(()=>{ie([A],()=>{if(!A.value||e.defaultValue===void 0)return;function h(){m.change(e.defaultValue)}return A.value.addEventListener("reset",h),()=>{var w;(w=A.value)==null||w.removeEventListener("reset",h)}},{immediate:!0})}),()=>{var h,w,T;let{name:E,disabled:k,form:D,...L}=e,H={open:n.value===0,disabled:k,activeIndex:m.activeOptionIndex.value,activeOption:m.activeOptionIndex.value===null?null:m.virtual.value?m.virtual.value.options[(h=m.activeOptionIndex.value)!=null?h:0]:(T=(w=m.options.value[m.activeOptionIndex.value])==null?void 0:w.dataRef.value)!=null?T:null,value:p.value};return Me(vt,[...E!=null&&p.value!=null?Xt({[E]:p.value}).map(([G,Z])=>Me(Gt,Qt({features:Jt.Hidden,key:G,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:D,disabled:k,name:G,value:Z}))):[],ue({theirProps:{...t,..._e(L,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:H,slots:a,attrs:t,name:"Combobox"})])}}}),On=te({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:a,slots:t,expose:o}){var n;let r=(n=e.id)!=null?n:`headlessui-combobox-button-${Se()}`,i=De("ComboboxButton");o({el:i.buttonRef,$el:i.buttonRef});function l(u){i.disabled.value||(i.comboboxState.value===0?i.closeCombobox():(u.preventDefault(),i.openCombobox()),W(()=>{var c;return(c=P(i.inputRef))==null?void 0:c.focus({preventScroll:!0})}))}function s(u){switch(u.key){case V.ArrowDown:u.preventDefault(),u.stopPropagation(),i.comboboxState.value===1&&i.openCombobox(),W(()=>{var c;return(c=i.inputRef.value)==null?void 0:c.focus({preventScroll:!0})});return;case V.ArrowUp:u.preventDefault(),u.stopPropagation(),i.comboboxState.value===1&&(i.openCombobox(),W(()=>{i.value.value||i.goToOption(B.Last)})),W(()=>{var c;return(c=i.inputRef.value)==null?void 0:c.focus({preventScroll:!0})});return;case V.Escape:if(i.comboboxState.value!==0)return;u.preventDefault(),i.optionsRef.value&&!i.optionsPropsRef.value.static&&u.stopPropagation(),i.closeCombobox(),W(()=>{var c;return(c=i.inputRef.value)==null?void 0:c.focus({preventScroll:!0})});return}}let v=Zt(R(()=>({as:e.as,type:a.type})),i.buttonRef);return()=>{var u,c;let f={open:i.comboboxState.value===0,disabled:i.disabled.value,value:i.value.value},{...O}=e,x={ref:i.buttonRef,id:r,type:v.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(u=P(i.optionsRef))==null?void 0:u.id,"aria-expanded":i.comboboxState.value===0,"aria-labelledby":i.labelRef.value?[(c=P(i.labelRef))==null?void 0:c.id,r].join(" "):void 0,disabled:i.disabled.value===!0?!0:void 0,onKeydown:s,onClick:l};return ue({ourProps:x,theirProps:O,slot:f,attrs:a,slots:t,name:"ComboboxButton"})}}}),xn=te({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:a,attrs:t,slots:o,expose:n}){var r;let i=(r=e.id)!=null?r:`headlessui-combobox-input-${Se()}`,l=De("ComboboxInput"),s=R(()=>Aa(P(l.inputRef))),v={value:!1};n({el:l.inputRef,$el:l.inputRef});function u(){l.change(null);let d=P(l.optionsRef);d&&(d.scrollTop=0),l.goToOption(B.Nothing)}let c=R(()=>{var d;let b=l.value.value;return P(l.inputRef)?typeof e.displayValue<"u"&&b!==void 0?(d=e.displayValue(b))!=null?d:"":typeof b=="string"?b:"":""});xe(()=>{ie([c,l.comboboxState,s],([d,b],[y,M])=>{if(v.value)return;let m=P(l.inputRef);m&&((M===0&&b===1||d!==y)&&(m.value=d),requestAnimationFrame(()=>{var A;if(v.value||!m||((A=s.value)==null?void 0:A.activeElement)!==m)return;let{selectionStart:h,selectionEnd:w}=m;Math.abs((w??0)-(h??0))===0&&h===0&&m.setSelectionRange(m.value.length,m.value.length)}))},{immediate:!0}),ie([l.comboboxState],([d],[b])=>{if(d===0&&b===1){if(v.value)return;let y=P(l.inputRef);if(!y)return;let M=y.value,{selectionStart:m,selectionEnd:A,selectionDirection:h}=y;y.value="",y.value=M,h!==null?y.setSelectionRange(m,A,h):y.setSelectionRange(m,A)}})});let f=z(!1);function O(){f.value=!0}function x(){kt().nextFrame(()=>{f.value=!1})}function S(d){switch(v.value=!0,d.key){case V.Enter:if(v.value=!1,l.comboboxState.value!==0||f.value)return;if(d.preventDefault(),d.stopPropagation(),l.activeOptionIndex.value===null){l.closeCombobox();return}l.selectActiveOption(),l.mode.value===0&&l.closeCombobox();break;case V.ArrowDown:return v.value=!1,d.preventDefault(),d.stopPropagation(),U(l.comboboxState.value,{0:()=>l.goToOption(B.Next),1:()=>l.openCombobox()});case V.ArrowUp:return v.value=!1,d.preventDefault(),d.stopPropagation(),U(l.comboboxState.value,{0:()=>l.goToOption(B.Previous),1:()=>{l.openCombobox(),W(()=>{l.value.value||l.goToOption(B.Last)})}});case V.Home:if(d.shiftKey)break;return v.value=!1,d.preventDefault(),d.stopPropagation(),l.goToOption(B.First);case V.PageUp:return v.value=!1,d.preventDefault(),d.stopPropagation(),l.goToOption(B.First);case V.End:if(d.shiftKey)break;return v.value=!1,d.preventDefault(),d.stopPropagation(),l.goToOption(B.Last);case V.PageDown:return v.value=!1,d.preventDefault(),d.stopPropagation(),l.goToOption(B.Last);case V.Escape:if(v.value=!1,l.comboboxState.value!==0)return;d.preventDefault(),l.optionsRef.value&&!l.optionsPropsRef.value.static&&d.stopPropagation(),l.nullable.value&&l.mode.value===0&&l.value.value===null&&u(),l.closeCombobox();break;case V.Tab:if(v.value=!1,l.comboboxState.value!==0)return;l.mode.value===0&&l.activationTrigger.value!==1&&l.selectActiveOption(),l.closeCombobox();break}}function C(d){a("change",d),l.nullable.value&&l.mode.value===0&&d.target.value===""&&u(),l.openCombobox()}function g(d){var b,y,M;let m=(b=d.relatedTarget)!=null?b:Dt.find(A=>A!==d.currentTarget);if(v.value=!1,!((y=P(l.optionsRef))!=null&&y.contains(m))&&!((M=P(l.buttonRef))!=null&&M.contains(m))&&l.comboboxState.value===0)return d.preventDefault(),l.mode.value===0&&(l.nullable.value&&l.value.value===null?u():l.activationTrigger.value!==1&&l.selectActiveOption()),l.closeCombobox()}function I(d){var b,y,M;let m=(b=d.relatedTarget)!=null?b:Dt.find(A=>A!==d.currentTarget);(y=P(l.buttonRef))!=null&&y.contains(m)||(M=P(l.optionsRef))!=null&&M.contains(m)||l.disabled.value||l.immediate.value&&l.comboboxState.value!==0&&(l.openCombobox(),kt().nextFrame(()=>{l.setActivationTrigger(1)}))}let p=R(()=>{var d,b,y,M;return(M=(y=(b=e.defaultValue)!=null?b:l.defaultValue.value!==void 0?(d=e.displayValue)==null?void 0:d.call(e,l.defaultValue.value):null)!=null?y:l.defaultValue.value)!=null?M:""});return()=>{var d,b,y,M,m,A,h;let w={open:l.comboboxState.value===0},{displayValue:T,onChange:E,...k}=e,D={"aria-controls":(d=l.optionsRef.value)==null?void 0:d.id,"aria-expanded":l.comboboxState.value===0,"aria-activedescendant":l.activeOptionIndex.value===null?void 0:l.virtual.value?(b=l.options.value.find(L=>!l.virtual.value.disabled(L.dataRef.value)&&l.compare(L.dataRef.value,l.virtual.value.options[l.activeOptionIndex.value])))==null?void 0:b.id:(y=l.options.value[l.activeOptionIndex.value])==null?void 0:y.id,"aria-labelledby":(A=(M=P(l.labelRef))==null?void 0:M.id)!=null?A:(m=P(l.buttonRef))==null?void 0:m.id,"aria-autocomplete":"list",id:i,onCompositionstart:O,onCompositionend:x,onKeydown:S,onInput:C,onFocus:I,onBlur:g,role:"combobox",type:(h=t.type)!=null?h:"text",tabIndex:0,ref:l.inputRef,defaultValue:p.value,disabled:l.disabled.value===!0?!0:void 0};return ue({ourProps:D,theirProps:k,slot:w,attrs:t,slots:o,features:Re.RenderStrategy|Re.Static,name:"ComboboxInput"})}}}),wn=te({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:a,slots:t,expose:o}){let n=De("ComboboxOptions"),r=`headlessui-combobox-options-${Se()}`;o({el:n.optionsRef,$el:n.optionsRef}),Ee(()=>{n.optionsPropsRef.value.static=e.static}),Ee(()=>{n.optionsPropsRef.value.hold=e.hold});let i=_t(),l=R(()=>i!==null?(i.value&me.Open)===me.Open:n.comboboxState.value===0);return Pa({container:R(()=>P(n.optionsRef)),enabled:R(()=>n.comboboxState.value===0),accept(s){return s.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:s.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(s){s.setAttribute("role","none")}}),()=>{var s,v,u;let c={open:n.comboboxState.value===0},f={"aria-labelledby":(u=(s=P(n.labelRef))==null?void 0:s.id)!=null?u:(v=P(n.buttonRef))==null?void 0:v.id,id:r,ref:n.optionsRef,role:"listbox","aria-multiselectable":n.mode.value===1?!0:void 0},O=_e(e,["hold"]);return ue({ourProps:f,theirProps:O,slot:c,attrs:a,slots:n.virtual.value&&n.comboboxState.value===0?{...t,default:()=>[Me(gn,{},t.default)]}:t,features:Re.RenderStrategy|Re.Static,visible:l.value,name:"ComboboxOptions"})}}}),Sn=te({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:a,attrs:t,expose:o}){let n=De("ComboboxOption"),r=`headlessui-combobox-option-${Se()}`,i=z(null);o({el:i,$el:i});let l=R(()=>{var g;return n.virtual.value?n.activeOptionIndex.value===n.calculateIndex(e.value):n.activeOptionIndex.value===null?!1:((g=n.options.value[n.activeOptionIndex.value])==null?void 0:g.id)===r}),s=R(()=>n.isSelected(e.value)),v=ft(sa,null),u=R(()=>({disabled:e.disabled,value:e.value,domRef:i,order:R(()=>e.order)}));xe(()=>n.registerOption(r,u)),ea(()=>n.unregisterOption(r,l.value)),Ee(()=>{let g=P(i);g&&(v==null||v.value.measureElement(g))}),Ee(()=>{n.comboboxState.value===0&&l.value&&(n.virtual.value||n.activationTrigger.value!==0&&W(()=>{var g,I;return(I=(g=P(i))==null?void 0:g.scrollIntoView)==null?void 0:I.call(g,{block:"nearest"})}))});function c(g){var I;if(e.disabled||(I=n.virtual.value)!=null&&I.disabled(e.value))return g.preventDefault();n.selectOption(r),Da()||requestAnimationFrame(()=>{var p;return(p=P(n.inputRef))==null?void 0:p.focus({preventScroll:!0})}),n.mode.value===0&&requestAnimationFrame(()=>n.closeCombobox())}function f(){var g;if(e.disabled||(g=n.virtual.value)!=null&&g.disabled(e.value))return n.goToOption(B.Nothing);let I=n.calculateIndex(e.value);n.goToOption(B.Specific,I)}let O=ta();function x(g){O.update(g)}function S(g){var I;if(!O.wasMoved(g)||e.disabled||(I=n.virtual.value)!=null&&I.disabled(e.value)||l.value)return;let p=n.calculateIndex(e.value);n.goToOption(B.Specific,p,0)}function C(g){var I;O.wasMoved(g)&&(e.disabled||(I=n.virtual.value)!=null&&I.disabled(e.value)||l.value&&(n.optionsPropsRef.value.hold||n.goToOption(B.Nothing)))}return()=>{let{disabled:g}=e,I={active:l.value,selected:s.value,disabled:g},p={id:r,ref:i,role:"option",tabIndex:g===!0?void 0:-1,"aria-disabled":g===!0?!0:void 0,"aria-selected":s.value,disabled:void 0,onClick:c,onFocus:f,onPointerenter:x,onMouseenter:x,onPointermove:S,onMousemove:S,onPointerleave:C,onMouseleave:C},d=_e(e,["order","value"]);return ue({ourProps:p,theirProps:d,slot:I,attrs:t,slots:a,name:"ComboboxOption"})}}});function In(e,a){return e===a}var Cn=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Cn||{}),Mn=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Mn||{}),Rn=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Rn||{});function En(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let ua=Symbol("ListboxContext");function et(e){let a=ft(ua,null);if(a===null){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,et),t}return a}let Tn=te({name:"Listbox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],default:()=>In},horizontal:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},multiple:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(e,{slots:a,attrs:t,emit:o}){let n=z(1),r=z(null),i=z(null),l=z(null),s=z([]),v=z(""),u=z(null),c=z(1);function f(p=d=>d){let d=u.value!==null?s.value[u.value]:null,b=aa(p(s.value.slice()),M=>P(M.dataRef.domRef)),y=d?b.indexOf(d):null;return y===-1&&(y=null),{options:b,activeOptionIndex:y}}let O=R(()=>e.multiple?1:0),[x,S]=Ut(R(()=>e.modelValue),p=>o("update:modelValue",p),R(()=>e.defaultValue)),C=R(()=>x.value===void 0?U(O.value,{1:[],0:void 0}):x.value),g={listboxState:n,value:C,mode:O,compare(p,d){if(typeof e.by=="string"){let b=e.by;return(p==null?void 0:p[b])===(d==null?void 0:d[b])}return e.by(p,d)},orientation:R(()=>e.horizontal?"horizontal":"vertical"),labelRef:r,buttonRef:i,optionsRef:l,disabled:R(()=>e.disabled),options:s,searchQuery:v,activeOptionIndex:u,activationTrigger:c,closeListbox(){e.disabled||n.value!==1&&(n.value=1,u.value=null)},openListbox(){e.disabled||n.value!==0&&(n.value=0)},goToOption(p,d,b){if(e.disabled||n.value===1)return;let y=f(),M=st(p===B.Specific?{focus:B.Specific,id:d}:{focus:p},{resolveItems:()=>y.options,resolveActiveIndex:()=>y.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.disabled});v.value="",u.value=M,c.value=b??1,s.value=y.options},search(p){if(e.disabled||n.value===1)return;let d=v.value!==""?0:1;v.value+=p.toLowerCase();let b=(u.value!==null?s.value.slice(u.value+d).concat(s.value.slice(0,u.value+d)):s.value).find(M=>M.dataRef.textValue.startsWith(v.value)&&!M.dataRef.disabled),y=b?s.value.indexOf(b):-1;y===-1||y===u.value||(u.value=y,c.value=1)},clearSearch(){e.disabled||n.value!==1&&v.value!==""&&(v.value="")},registerOption(p,d){let b=f(y=>[...y,{id:p,dataRef:d}]);s.value=b.options,u.value=b.activeOptionIndex},unregisterOption(p){let d=f(b=>{let y=b.findIndex(M=>M.id===p);return y!==-1&&b.splice(y,1),b});s.value=d.options,u.value=d.activeOptionIndex,c.value=1},theirOnChange(p){e.disabled||S(p)},select(p){e.disabled||S(U(O.value,{0:()=>p,1:()=>{let d=N(g.value.value).slice(),b=N(p),y=d.findIndex(M=>g.compare(b,N(M)));return y===-1?d.push(b):d.splice(y,1),d}}))}};Kt([i,l],(p,d)=>{var b;g.closeListbox(),Ba(d,Va.Loose)||(p.preventDefault(),(b=P(i))==null||b.focus())},R(()=>n.value===0)),ct(ua,g),Yt(R(()=>U(n.value,{0:me.Open,1:me.Closed})));let I=R(()=>{var p;return(p=P(i))==null?void 0:p.closest("form")});return xe(()=>{ie([I],()=>{if(!I.value||e.defaultValue===void 0)return;function p(){g.theirOnChange(e.defaultValue)}return I.value.addEventListener("reset",p),()=>{var d;(d=I.value)==null||d.removeEventListener("reset",p)}},{immediate:!0})}),()=>{let{name:p,modelValue:d,disabled:b,form:y,...M}=e,m={open:n.value===0,disabled:b,value:C.value};return Me(vt,[...p!=null&&C.value!=null?Xt({[p]:C.value}).map(([A,h])=>Me(Gt,Qt({features:Jt.Hidden,key:A,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:y,disabled:b,name:A,value:h}))):[],ue({ourProps:{},theirProps:{...t,..._e(M,["defaultValue","onUpdate:modelValue","horizontal","multiple","by"])},slot:m,slots:a,attrs:t,name:"Listbox"})])}}}),An=te({name:"ListboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:a,slots:t,expose:o}){var n;let r=(n=e.id)!=null?n:`headlessui-listbox-button-${Se()}`,i=et("ListboxButton");o({el:i.buttonRef,$el:i.buttonRef});function l(c){switch(c.key){case V.Space:case V.Enter:case V.ArrowDown:c.preventDefault(),i.openListbox(),W(()=>{var f;(f=P(i.optionsRef))==null||f.focus({preventScroll:!0}),i.value.value||i.goToOption(B.First)});break;case V.ArrowUp:c.preventDefault(),i.openListbox(),W(()=>{var f;(f=P(i.optionsRef))==null||f.focus({preventScroll:!0}),i.value.value||i.goToOption(B.Last)});break}}function s(c){switch(c.key){case V.Space:c.preventDefault();break}}function v(c){i.disabled.value||(i.listboxState.value===0?(i.closeListbox(),W(()=>{var f;return(f=P(i.buttonRef))==null?void 0:f.focus({preventScroll:!0})})):(c.preventDefault(),i.openListbox(),En(()=>{var f;return(f=P(i.optionsRef))==null?void 0:f.focus({preventScroll:!0})})))}let u=Zt(R(()=>({as:e.as,type:a.type})),i.buttonRef);return()=>{var c,f;let O={open:i.listboxState.value===0,disabled:i.disabled.value,value:i.value.value},{...x}=e,S={ref:i.buttonRef,id:r,type:u.value,"aria-haspopup":"listbox","aria-controls":(c=P(i.optionsRef))==null?void 0:c.id,"aria-expanded":i.listboxState.value===0,"aria-labelledby":i.labelRef.value?[(f=P(i.labelRef))==null?void 0:f.id,r].join(" "):void 0,disabled:i.disabled.value===!0?!0:void 0,onKeydown:l,onKeyup:s,onClick:v};return ue({ourProps:S,theirProps:x,slot:O,attrs:a,slots:t,name:"ListboxButton"})}}}),Pn=te({name:"ListboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:a,slots:t,expose:o}){var n;let r=(n=e.id)!=null?n:`headlessui-listbox-options-${Se()}`,i=et("ListboxOptions"),l=z(null);o({el:i.optionsRef,$el:i.optionsRef});function s(c){switch(l.value&&clearTimeout(l.value),c.key){case V.Space:if(i.searchQuery.value!=="")return c.preventDefault(),c.stopPropagation(),i.search(c.key);case V.Enter:if(c.preventDefault(),c.stopPropagation(),i.activeOptionIndex.value!==null){let f=i.options.value[i.activeOptionIndex.value];i.select(f.dataRef.value)}i.mode.value===0&&(i.closeListbox(),W(()=>{var f;return(f=P(i.buttonRef))==null?void 0:f.focus({preventScroll:!0})}));break;case U(i.orientation.value,{vertical:V.ArrowDown,horizontal:V.ArrowRight}):return c.preventDefault(),c.stopPropagation(),i.goToOption(B.Next);case U(i.orientation.value,{vertical:V.ArrowUp,horizontal:V.ArrowLeft}):return c.preventDefault(),c.stopPropagation(),i.goToOption(B.Previous);case V.Home:case V.PageUp:return c.preventDefault(),c.stopPropagation(),i.goToOption(B.First);case V.End:case V.PageDown:return c.preventDefault(),c.stopPropagation(),i.goToOption(B.Last);case V.Escape:c.preventDefault(),c.stopPropagation(),i.closeListbox(),W(()=>{var f;return(f=P(i.buttonRef))==null?void 0:f.focus({preventScroll:!0})});break;case V.Tab:c.preventDefault(),c.stopPropagation();break;default:c.key.length===1&&(i.search(c.key),l.value=setTimeout(()=>i.clearSearch(),350));break}}let v=_t(),u=R(()=>v!==null?(v.value&me.Open)===me.Open:i.listboxState.value===0);return()=>{var c,f;let O={open:i.listboxState.value===0},{...x}=e,S={"aria-activedescendant":i.activeOptionIndex.value===null||(c=i.options.value[i.activeOptionIndex.value])==null?void 0:c.id,"aria-multiselectable":i.mode.value===1?!0:void 0,"aria-labelledby":(f=P(i.buttonRef))==null?void 0:f.id,"aria-orientation":i.orientation.value,id:r,onKeydown:s,role:"listbox",tabIndex:0,ref:i.optionsRef};return ue({ourProps:S,theirProps:x,slot:O,attrs:a,slots:t,features:Re.RenderStrategy|Re.Static,visible:u.value,name:"ListboxOptions"})}}}),kn=te({name:"ListboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(e,{slots:a,attrs:t,expose:o}){var n;let r=(n=e.id)!=null?n:`headlessui-listbox-option-${Se()}`,i=et("ListboxOption"),l=z(null);o({el:l,$el:l});let s=R(()=>i.activeOptionIndex.value!==null?i.options.value[i.activeOptionIndex.value].id===r:!1),v=R(()=>U(i.mode.value,{0:()=>i.compare(N(i.value.value),N(e.value)),1:()=>N(i.value.value).some(p=>i.compare(N(p),N(e.value)))})),u=R(()=>U(i.mode.value,{1:()=>{var p;let d=N(i.value.value);return((p=i.options.value.find(b=>d.some(y=>i.compare(N(y),N(b.dataRef.value)))))==null?void 0:p.id)===r},0:()=>v.value})),c=La(l),f=R(()=>({disabled:e.disabled,value:e.value,get textValue(){return c()},domRef:l}));xe(()=>i.registerOption(r,f)),ea(()=>i.unregisterOption(r)),xe(()=>{ie([i.listboxState,v],()=>{i.listboxState.value===0&&v.value&&U(i.mode.value,{1:()=>{u.value&&i.goToOption(B.Specific,r)},0:()=>{i.goToOption(B.Specific,r)}})},{immediate:!0})}),Ee(()=>{i.listboxState.value===0&&s.value&&i.activationTrigger.value!==0&&W(()=>{var p,d;return(d=(p=P(l))==null?void 0:p.scrollIntoView)==null?void 0:d.call(p,{block:"nearest"})})});function O(p){if(e.disabled)return p.preventDefault();i.select(e.value),i.mode.value===0&&(i.closeListbox(),W(()=>{var d;return(d=P(i.buttonRef))==null?void 0:d.focus({preventScroll:!0})}))}function x(){if(e.disabled)return i.goToOption(B.Nothing);i.goToOption(B.Specific,r)}let S=ta();function C(p){S.update(p)}function g(p){S.wasMoved(p)&&(e.disabled||s.value||i.goToOption(B.Specific,r,0))}function I(p){S.wasMoved(p)&&(e.disabled||s.value&&i.goToOption(B.Nothing))}return()=>{let{disabled:p}=e,d={active:s.value,selected:v.value,disabled:p},{value:b,disabled:y,...M}=e,m={id:r,ref:l,role:"option",tabIndex:p===!0?void 0:-1,"aria-disabled":p===!0?!0:void 0,"aria-selected":v.value,disabled:void 0,onClick:O,onFocus:x,onPointerenter:C,onMouseenter:C,onPointermove:g,onMousemove:g,onPointerleave:I,onMouseleave:I};return ue({ourProps:m,theirProps:M,slot:d,attrs:t,slots:a,name:"ListboxOption"})}}});function X(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var a=e.ownerDocument;return a&&a.defaultView||window}return e}function we(e){var a=X(e).Element;return e instanceof a||e instanceof Element}function J(e){var a=X(e).HTMLElement;return e instanceof a||e instanceof HTMLElement}function pt(e){if(typeof ShadowRoot>"u")return!1;var a=X(e).ShadowRoot;return e instanceof a||e instanceof ShadowRoot}var Oe=Math.max,Ze=Math.min,Te=Math.round;function ut(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(a){return a.brand+"/"+a.version}).join(" "):navigator.userAgent}function da(){return!/^((?!chrome|android).)*safari/i.test(ut())}function Ae(e,a,t){a===void 0&&(a=!1),t===void 0&&(t=!1);var o=e.getBoundingClientRect(),n=1,r=1;a&&J(e)&&(n=e.offsetWidth>0&&Te(o.width)/e.offsetWidth||1,r=e.offsetHeight>0&&Te(o.height)/e.offsetHeight||1);var i=we(e)?X(e):window,l=i.visualViewport,s=!da()&&t,v=(o.left+(s&&l?l.offsetLeft:0))/n,u=(o.top+(s&&l?l.offsetTop:0))/r,c=o.width/n,f=o.height/r;return{width:c,height:f,top:u,right:v+c,bottom:u+f,left:v,x:v,y:u}}function mt(e){var a=X(e),t=a.pageXOffset,o=a.pageYOffset;return{scrollLeft:t,scrollTop:o}}function Dn(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Bn(e){return e===X(e)||!J(e)?mt(e):Dn(e)}function le(e){return e?(e.nodeName||"").toLowerCase():null}function he(e){return((we(e)?e.ownerDocument:e.document)||window.document).documentElement}function ht(e){return Ae(he(e)).left+mt(e).scrollLeft}function se(e){return X(e).getComputedStyle(e)}function bt(e){var a=se(e),t=a.overflow,o=a.overflowX,n=a.overflowY;return/auto|scroll|overlay|hidden/.test(t+n+o)}function Vn(e){var a=e.getBoundingClientRect(),t=Te(a.width)/e.offsetWidth||1,o=Te(a.height)/e.offsetHeight||1;return t!==1||o!==1}function Ln(e,a,t){t===void 0&&(t=!1);var o=J(a),n=J(a)&&Vn(a),r=he(a),i=Ae(e,n,t),l={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(o||!o&&!t)&&((le(a)!=="body"||bt(r))&&(l=Bn(a)),J(a)?(s=Ae(a,!0),s.x+=a.clientLeft,s.y+=a.clientTop):r&&(s.x=ht(r))),{x:i.left+l.scrollLeft-s.x,y:i.top+l.scrollTop-s.y,width:i.width,height:i.height}}function gt(e){var a=Ae(e),t=e.offsetWidth,o=e.offsetHeight;return Math.abs(a.width-t)<=1&&(t=a.width),Math.abs(a.height-o)<=1&&(o=a.height),{x:e.offsetLeft,y:e.offsetTop,width:t,height:o}}function tt(e){return le(e)==="html"?e:e.assignedSlot||e.parentNode||(pt(e)?e.host:null)||he(e)}function ca(e){return["html","body","#document"].indexOf(le(e))>=0?e.ownerDocument.body:J(e)&&bt(e)?e:ca(tt(e))}function Fe(e,a){var t;a===void 0&&(a=[]);var o=ca(e),n=o===((t=e.ownerDocument)==null?void 0:t.body),r=X(o),i=n?[r].concat(r.visualViewport||[],bt(o)?o:[]):o,l=a.concat(i);return n?l:l.concat(Fe(tt(i)))}function zn(e){return["table","td","th"].indexOf(le(e))>=0}function $t(e){return!J(e)||se(e).position==="fixed"?null:e.offsetParent}function $n(e){var a=/firefox/i.test(ut()),t=/Trident/i.test(ut());if(t&&J(e)){var o=se(e);if(o.position==="fixed")return null}var n=tt(e);for(pt(n)&&(n=n.host);J(n)&&["html","body"].indexOf(le(n))<0;){var r=se(n);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||a&&r.willChange==="filter"||a&&r.filter&&r.filter!=="none")return n;n=n.parentNode}return null}function qe(e){for(var a=X(e),t=$t(e);t&&zn(t)&&se(t).position==="static";)t=$t(t);return t&&(le(t)==="html"||le(t)==="body"&&se(t).position==="static")?a:t||$n(e)||a}var K="top",_="bottom",ee="right",Y="left",yt="auto",We=[K,_,ee,Y],Pe="start",He="end",jn="clippingParents",va="viewport",je="popper",Fn="reference",jt=We.reduce(function(e,a){return e.concat([a+"-"+Pe,a+"-"+He])},[]),fa=[].concat(We,[yt]).reduce(function(e,a){return e.concat([a,a+"-"+Pe,a+"-"+He])},[]),Nn="beforeRead",Hn="read",qn="afterRead",Wn="beforeMain",Un="main",Kn="afterMain",Yn="beforeWrite",Xn="write",Gn="afterWrite",Qn=[Nn,Hn,qn,Wn,Un,Kn,Yn,Xn,Gn];function Jn(e){var a=new Map,t=new Set,o=[];e.forEach(function(r){a.set(r.name,r)});function n(r){t.add(r.name);var i=[].concat(r.requires||[],r.requiresIfExists||[]);i.forEach(function(l){if(!t.has(l)){var s=a.get(l);s&&n(s)}}),o.push(r)}return e.forEach(function(r){t.has(r.name)||n(r)}),o}function Zn(e){var a=Jn(e);return Qn.reduce(function(t,o){return t.concat(a.filter(function(n){return n.phase===o}))},[])}function _n(e){var a;return function(){return a||(a=new Promise(function(t){Promise.resolve().then(function(){a=void 0,t(e())})})),a}}function eo(e){var a=e.reduce(function(t,o){var n=t[o.name];return t[o.name]=n?Object.assign({},n,o,{options:Object.assign({},n.options,o.options),data:Object.assign({},n.data,o.data)}):o,t},{});return Object.keys(a).map(function(t){return a[t]})}function to(e,a){var t=X(e),o=he(e),n=t.visualViewport,r=o.clientWidth,i=o.clientHeight,l=0,s=0;if(n){r=n.width,i=n.height;var v=da();(v||!v&&a==="fixed")&&(l=n.offsetLeft,s=n.offsetTop)}return{width:r,height:i,x:l+ht(e),y:s}}function ao(e){var a,t=he(e),o=mt(e),n=(a=e.ownerDocument)==null?void 0:a.body,r=Oe(t.scrollWidth,t.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),i=Oe(t.scrollHeight,t.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),l=-o.scrollLeft+ht(e),s=-o.scrollTop;return se(n||t).direction==="rtl"&&(l+=Oe(t.clientWidth,n?n.clientWidth:0)-r),{width:r,height:i,x:l,y:s}}function pa(e,a){var t=a.getRootNode&&a.getRootNode();if(e.contains(a))return!0;if(t&&pt(t)){var o=a;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function dt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function no(e,a){var t=Ae(e,!1,a==="fixed");return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function Ft(e,a,t){return a===va?dt(to(e,t)):we(a)?no(a,t):dt(ao(he(e)))}function oo(e){var a=Fe(tt(e)),t=["absolute","fixed"].indexOf(se(e).position)>=0,o=t&&J(e)?qe(e):e;return we(o)?a.filter(function(n){return we(n)&&pa(n,o)&&le(n)!=="body"}):[]}function io(e,a,t,o){var n=a==="clippingParents"?oo(e):[].concat(a),r=[].concat(n,[t]),i=r[0],l=r.reduce(function(s,v){var u=Ft(e,v,o);return s.top=Oe(u.top,s.top),s.right=Ze(u.right,s.right),s.bottom=Ze(u.bottom,s.bottom),s.left=Oe(u.left,s.left),s},Ft(e,i,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function oe(e){return e.split("-")[0]}function ke(e){return e.split("-")[1]}function Ot(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ma(e){var a=e.reference,t=e.element,o=e.placement,n=o?oe(o):null,r=o?ke(o):null,i=a.x+a.width/2-t.width/2,l=a.y+a.height/2-t.height/2,s;switch(n){case K:s={x:i,y:a.y-t.height};break;case _:s={x:i,y:a.y+a.height};break;case ee:s={x:a.x+a.width,y:l};break;case Y:s={x:a.x-t.width,y:l};break;default:s={x:a.x,y:a.y}}var v=n?Ot(n):null;if(v!=null){var u=v==="y"?"height":"width";switch(r){case Pe:s[v]=s[v]-(a[u]/2-t[u]/2);break;case He:s[v]=s[v]+(a[u]/2-t[u]/2);break}}return s}function ha(){return{top:0,right:0,bottom:0,left:0}}function ba(e){return Object.assign({},ha(),e)}function ga(e,a){return a.reduce(function(t,o){return t[o]=e,t},{})}function xt(e,a){a===void 0&&(a={});var t=a,o=t.placement,n=o===void 0?e.placement:o,r=t.strategy,i=r===void 0?e.strategy:r,l=t.boundary,s=l===void 0?jn:l,v=t.rootBoundary,u=v===void 0?va:v,c=t.elementContext,f=c===void 0?je:c,O=t.altBoundary,x=O===void 0?!1:O,S=t.padding,C=S===void 0?0:S,g=ba(typeof C!="number"?C:ga(C,We)),I=f===je?Fn:je,p=e.rects.popper,d=e.elements[x?I:f],b=io(we(d)?d:d.contextElement||he(e.elements.popper),s,u,i),y=Ae(e.elements.reference),M=ma({reference:y,element:p,strategy:"absolute",placement:n}),m=dt(Object.assign({},p,M)),A=f===je?m:y,h={top:b.top-A.top+g.top,bottom:A.bottom-b.bottom+g.bottom,left:b.left-A.left+g.left,right:A.right-b.right+g.right},w=e.modifiersData.offset;if(f===je&&w){var T=w[n];Object.keys(h).forEach(function(E){var k=[ee,_].indexOf(E)>=0?1:-1,D=[K,_].indexOf(E)>=0?"y":"x";h[E]+=T[D]*k})}return h}var Nt={placement:"bottom",modifiers:[],strategy:"absolute"};function Ht(){for(var e=arguments.length,a=new Array(e),t=0;t=0});f.length===0&&(f=c);var O=f.reduce(function(x,S){return x[S]=xt(e,{placement:S,boundary:n,rootBoundary:r,padding:i})[oe(S)],x},{});return Object.keys(O).sort(function(x,S){return O[x]-O[S]})}function xo(e){if(oe(e)===yt)return[];var a=Je(e);return[Wt(e),a,Wt(a)]}function wo(e){var a=e.state,t=e.options,o=e.name;if(!a.modifiersData[o]._skip){for(var n=t.mainAxis,r=n===void 0?!0:n,i=t.altAxis,l=i===void 0?!0:i,s=t.fallbackPlacements,v=t.padding,u=t.boundary,c=t.rootBoundary,f=t.altBoundary,O=t.flipVariations,x=O===void 0?!0:O,S=t.allowedAutoPlacements,C=a.options.placement,g=oe(C),I=g===C,p=s||(I||!x?[Je(C)]:xo(C)),d=[C].concat(p).reduce(function(Ie,ce){return Ie.concat(oe(ce)===yt?Oo(a,{placement:ce,boundary:u,rootBoundary:c,padding:v,flipVariations:x,allowedAutoPlacements:S}):ce)},[]),b=a.rects.reference,y=a.rects.popper,M=new Map,m=!0,A=d[0],h=0;h=0,D=k?"width":"height",L=xt(a,{placement:w,boundary:u,rootBoundary:c,altBoundary:f,padding:v}),H=k?E?ee:Y:E?_:K;b[D]>y[D]&&(H=Je(H));var G=Je(H),Z=[];if(r&&Z.push(L[T]<=0),l&&Z.push(L[H]<=0,L[G]<=0),Z.every(function(Ie){return Ie})){A=w,m=!1;break}M.set(w,Z)}if(m)for(var $=x?3:1,q=function(ce){var Be=d.find(function(Ue){var be=M.get(Ue);if(be)return be.slice(0,ce).every(function(at){return at})});if(Be)return A=Be,"break"},ae=$;ae>0;ae--){var de=q(ae);if(de==="break")break}a.placement!==A&&(a.modifiersData[o]._skip=!0,a.placement=A,a.reset=!0)}}const So={name:"flip",enabled:!0,phase:"main",fn:wo,requiresIfExists:["offset"],data:{_skip:!1}};function Io(e,a,t){var o=oe(e),n=[Y,K].indexOf(o)>=0?-1:1,r=typeof t=="function"?t(Object.assign({},a,{placement:e})):t,i=r[0],l=r[1];return i=i||0,l=(l||0)*n,[Y,ee].indexOf(o)>=0?{x:l,y:i}:{x:i,y:l}}function Co(e){var a=e.state,t=e.options,o=e.name,n=t.offset,r=n===void 0?[0,0]:n,i=fa.reduce(function(u,c){return u[c]=Io(c,a.rects,r),u},{}),l=i[a.placement],s=l.x,v=l.y;a.modifiersData.popperOffsets!=null&&(a.modifiersData.popperOffsets.x+=s,a.modifiersData.popperOffsets.y+=v),a.modifiersData[o]=i}const Mo={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Co};function Ro(e){return e==="x"?"y":"x"}function Ne(e,a,t){return Oe(e,Ze(a,t))}function Eo(e,a,t){var o=Ne(e,a,t);return o>t?t:o}function To(e){var a=e.state,t=e.options,o=e.name,n=t.mainAxis,r=n===void 0?!0:n,i=t.altAxis,l=i===void 0?!1:i,s=t.boundary,v=t.rootBoundary,u=t.altBoundary,c=t.padding,f=t.tether,O=f===void 0?!0:f,x=t.tetherOffset,S=x===void 0?0:x,C=xt(a,{boundary:s,rootBoundary:v,padding:c,altBoundary:u}),g=oe(a.placement),I=ke(a.placement),p=!I,d=Ot(g),b=Ro(d),y=a.modifiersData.popperOffsets,M=a.rects.reference,m=a.rects.popper,A=typeof S=="function"?S(Object.assign({},a.rects,{placement:a.placement})):S,h=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),w=a.modifiersData.offset?a.modifiersData.offset[a.placement]:null,T={x:0,y:0};if(y){if(r){var E,k=d==="y"?K:Y,D=d==="y"?_:ee,L=d==="y"?"height":"width",H=y[d],G=H+C[k],Z=H-C[D],$=O?-m[L]/2:0,q=I===Pe?M[L]:m[L],ae=I===Pe?-m[L]:-M[L],de=a.elements.arrow,Ie=O&&de?gt(de):{width:0,height:0},ce=a.modifiersData["arrow#persistent"]?a.modifiersData["arrow#persistent"].padding:ha(),Be=ce[k],Ue=ce[D],be=Ne(0,M[L],Ie[L]),at=p?M[L]/2-$-be-Be-h.mainAxis:q-be-Be-h.mainAxis,xa=p?-M[L]/2+$+be+Ue+h.mainAxis:ae+be+Ue+h.mainAxis,nt=a.elements.arrow&&qe(a.elements.arrow),wa=nt?d==="y"?nt.clientTop||0:nt.clientLeft||0:0,wt=(E=w==null?void 0:w[d])!=null?E:0,Sa=H+at-wt-wa,Ia=H+xa-wt,St=Ne(O?Ze(G,Sa):G,H,O?Oe(Z,Ia):Z);y[d]=St,T[d]=St-H}if(l){var It,Ca=d==="x"?K:Y,Ma=d==="x"?_:ee,ge=y[b],Ke=b==="y"?"height":"width",Ct=ge+C[Ca],Mt=ge-C[Ma],ot=[K,Y].indexOf(g)!==-1,Rt=(It=w==null?void 0:w[b])!=null?It:0,Et=ot?Ct:ge-M[Ke]-m[Ke]-Rt+h.altAxis,Tt=ot?ge+M[Ke]+m[Ke]-Rt-h.altAxis:Mt,At=O&&ot?Eo(Et,ge,Tt):Ne(O?Et:Ct,ge,O?Tt:Mt);y[b]=At,T[b]=At-ge}a.modifiersData[o]=T}}const Ao={name:"preventOverflow",enabled:!0,phase:"main",fn:To,requiresIfExists:["offset"]};var Po=function(a,t){return a=typeof a=="function"?a(Object.assign({},t.rects,{placement:t.placement})):a,ba(typeof a!="number"?a:ga(a,We))};function ko(e){var a,t=e.state,o=e.name,n=e.options,r=t.elements.arrow,i=t.modifiersData.popperOffsets,l=oe(t.placement),s=Ot(l),v=[Y,ee].indexOf(l)>=0,u=v?"height":"width";if(!(!r||!i)){var c=Po(n.padding,t),f=gt(r),O=s==="y"?K:Y,x=s==="y"?_:ee,S=t.rects.reference[u]+t.rects.reference[s]-i[s]-t.rects.popper[u],C=i[s]-t.rects.reference[s],g=qe(r),I=g?s==="y"?g.clientHeight||0:g.clientWidth||0:0,p=S/2-C/2,d=c[O],b=I-f[u]-c[x],y=I/2-f[u]/2+p,M=Ne(d,y,b),m=s;t.modifiersData[o]=(a={},a[m]=M,a.centerOffset=M-y,a)}}function Do(e){var a=e.state,t=e.options,o=t.element,n=o===void 0?"[data-popper-arrow]":o;n!=null&&(typeof n=="string"&&(n=a.elements.popper.querySelector(n),!n)||pa(a.elements.popper,n)&&(a.elements.arrow=n))}const Bo={name:"arrow",enabled:!0,phase:"main",fn:ko,effect:Do,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},Vo=lo({defaultModifiers:[...bo,Mo,So,Ao,Oa,ya,Bo]});function Lo({locked:e=!1,overflowPadding:a=8,offsetDistance:t=8,offsetSkid:o=0,gpuAcceleration:n=!0,adaptive:r=!0,scroll:i=!0,resize:l=!0,arrow:s=!1,placement:v,strategy:u},c){const f=z(null),O=z(null),x=z(null);return xe(()=>{Ee(S=>{if(!O.value||!f.value&&!(c!=null&&c.value))return;const C=Bt(O),g=(c==null?void 0:c.value)||Bt(f);if(!(C instanceof HTMLElement)||!g)return;const I={modifiers:[{name:"flip",enabled:!e},{name:"preventOverflow",options:{padding:a}},{name:"offset",options:{offset:[o,t]}},{name:"computeStyles",options:{adaptive:r,gpuAcceleration:n}},{name:"eventListeners",options:{scroll:i,resize:l}},{name:"arrow",enabled:s}]};v&&(I.placement=v),u&&(I.strategy=u),x.value=Vo(g,C,I),S(x.value.destroy)})}),[f,O,x]}const ne=na(ye.ui.strategy,ye.ui.select,$a),Ge=na(ye.ui.strategy,ye.ui.selectMenu,ja),zo=te({components:{HCombobox:yn,HComboboxButton:On,HComboboxOptions:wn,HComboboxOption:Sn,HComboboxInput:xn,HListbox:Tn,HListboxButton:An,HListboxOptions:Pn,HListboxOption:kn,UIcon:oa,UAvatar:ia},inheritAttrs:!1,props:{modelValue:{type:[String,Number,Object,Array,Boolean],default:""},query:{type:String,default:null},by:{type:String,default:void 0},options:{type:Array,default:()=>[]},id:{type:String,default:null},name:{type:String,default:null},required:{type:Boolean,default:!1},icon:{type:String,default:null},loadingIcon:{type:String,default:()=>ne.default.loadingIcon},leadingIcon:{type:String,default:null},trailingIcon:{type:String,default:()=>ne.default.trailingIcon},trailing:{type:Boolean,default:!1},leading:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},selectedIcon:{type:String,default:()=>Ge.default.selectedIcon},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},searchable:{type:[Boolean,Function],default:!1},searchablePlaceholder:{type:String,default:"Search..."},clearSearchOnClose:{type:Boolean,default:()=>Ge.default.clearSearchOnClose},debounce:{type:Number,default:200},creatable:{type:Boolean,default:!1},showCreateOptionWhen:{type:String,default:()=>Ge.default.showCreateOptionWhen},placeholder:{type:String,default:null},padded:{type:Boolean,default:!0},size:{type:String,default:null,validator(e){return Object.keys(ne.size).includes(e)}},color:{type:String,default:()=>ne.default.color,validator(e){return[...ye.ui.colors,...Object.keys(ne.color)].includes(e)}},variant:{type:String,default:()=>ne.default.variant,validator(e){return[...Object.keys(ne.variant),...Object.values(ne.color).flatMap(a=>Object.keys(a))].includes(e)}},optionAttribute:{type:String,default:"label"},valueAttribute:{type:String,default:null},searchAttributes:{type:Array,default:null},popper:{type:Object,default:()=>({})},selectClass:{type:String,default:null},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})},uiMenu:{type:Object,default:()=>({})}},emits:["update:modelValue","update:query","open","close","change"],setup(e,{emit:a,slots:t}){const{ui:o,attrs:n}=Vt("select",it(e,"ui"),ne,it(e,"class")),{ui:r}=Vt("selectMenu",it(e,"uiMenu"),Ge),i=R(()=>Fa({},e.popper,r.value.popper)),[l,s]=Lo(i.value),{size:v,rounded:u}=Na({ui:o,props:e}),{emitFormBlur:c,emitFormChange:f,inputId:O,color:x,size:S,name:C}=Ha(e,ne),g=R(()=>v.value||S.value),I=z(""),p=R({get(){return e.query??I.value},set($){I.value=$,a("update:query",$)}}),d=R(()=>{if(e.multiple)return Array.isArray(e.modelValue)&&e.modelValue.length?`${e.modelValue.length} selected`:null;if(e.modelValue!==void 0&&e.modelValue!==null)if(e.valueAttribute){const $=e.options.find(q=>q[e.valueAttribute]===e.modelValue);return $?$[e.optionAttribute]:null}else return["string","number"].includes(typeof e.modelValue)?e.modelValue:e.modelValue[e.optionAttribute];return null}),b=R(()=>{var q,ae;const $=((ae=(q=o.value.color)==null?void 0:q[x.value])==null?void 0:ae[e.variant])||o.value.variant[e.variant];return qa(Ve(o.value.base,r.value.select,u.value,o.value.size[g.value],o.value.gap[g.value],e.padded?o.value.padding[g.value]:"p-0",$==null?void 0:$.replaceAll("{color}",x.value),(y.value||t.leading)&&o.value.leading.padding[g.value],(M.value||t.trailing)&&o.value.trailing.padding[g.value]),e.placeholder&&e.modelValue===void 0&&e.modelValue===null&&o.value.placeholder,e.selectClass)}),y=R(()=>e.icon&&e.leading||e.icon&&!e.trailing||e.loading&&!e.trailing||e.leadingIcon),M=R(()=>e.icon&&e.trailing||e.loading&&e.trailing||e.trailingIcon),m=R(()=>e.loading?e.loadingIcon:e.leadingIcon||e.icon),A=R(()=>e.loading&&!y.value?e.loadingIcon:e.trailingIcon||e.icon),h=R(()=>Ve(o.value.icon.leading.wrapper,o.value.icon.leading.pointer,o.value.icon.leading.padding[g.value])),w=R(()=>Ve(o.value.icon.base,x.value&&ye.ui.colors.includes(x.value)&&o.value.icon.color.replaceAll("{color}",x.value),o.value.icon.size[g.value],e.loading&&o.value.icon.loading)),T=R(()=>Ve(o.value.icon.trailing.wrapper,o.value.icon.trailing.pointer,o.value.icon.trailing.padding[g.value])),E=R(()=>Ve(o.value.icon.base,x.value&&ye.ui.colors.includes(x.value)&&o.value.icon.color.replaceAll("{color}",x.value),o.value.icon.size[g.value],e.loading&&!y.value&&o.value.icon.loading)),k=typeof e.searchable=="function"?Wa(e.searchable,e.debounce):void 0,D=Ua(async()=>e.searchable&&k?await k(p.value):p.value===""?e.options:e.options.filter($=>{var q;return((q=e.searchAttributes)!=null&&q.length?e.searchAttributes:[e.optionAttribute]).some(ae=>{if(["string","number"].includes(typeof $))return String($).search(new RegExp(p.value,"i"))!==-1;const de=Ja($,ae);return de!=null&&String(de).search(new RegExp(p.value,"i"))!==-1})})),L=R(()=>p.value===""||e.showCreateOptionWhen==="empty"&&D.value.length||e.showCreateOptionWhen==="always"&&D.value.find(q=>["string","number"].includes(typeof q)?q===p.value:q[e.optionAttribute]===p.value)?null:["string","number"].includes(typeof e.modelValue)?p.value:{[e.optionAttribute]:p.value});function H(){e.clearSearchOnClose&&(p.value="")}ie(s,$=>{$?a("open"):(H(),a("close"),c())});function G($){a("update:modelValue",$),a("change",$),f()}function Z($){p.value=$.target.value}return Ka(()=>Za("$YMH7mn4R4k")),{ui:o,uiMenu:r,attrs:n,name:C,inputId:O,popper:i,trigger:l,container:s,label:d,isLeading:y,isTrailing:M,selectClass:b,leadingIconName:m,leadingIconClass:w,leadingWrapperIconClass:h,trailingIconName:A,trailingIconClass:E,trailingWrapperIconClass:T,filteredOptions:D,createOption:L,query:p,onUpdate:G,onQueryChange:Z}}}),$o=["value","required"],jo=["id","disabled"],Fo={class:"truncate"};function No(e,a,t,o,n,r){const i=oa,l=Ya("HComboboxInput"),s=ia;return F(),ve(Le(e.searchable?"HCombobox":"HListbox"),{by:e.by,name:e.name,"model-value":e.modelValue,multiple:e.multiple,disabled:e.disabled,as:"div",class:j(e.ui.wrapper),"onUpdate:modelValue":e.onUpdate},{default:Ce(({open:v})=>[e.required?(F(),Q("input",{key:0,value:e.modelValue,required:e.required,class:j(e.uiMenu.required),tabindex:"-1","aria-hidden":"true"},null,10,$o)):re("",!0),(F(),ve(Le(e.searchable?"HComboboxButton":"HListboxButton"),{ref:"trigger",as:"div",role:"button",class:j(e.uiMenu.trigger)},{default:Ce(()=>[fe(e.$slots,"default",{open:v,disabled:e.disabled,loading:e.loading},()=>[pe("button",lt({id:e.inputId,class:e.selectClass,disabled:e.disabled,type:"button"},e.attrs),[e.isLeading&&e.leadingIconName||e.$slots.leading?(F(),Q("span",{key:0,class:j(e.leadingWrapperIconClass)},[fe(e.$slots,"leading",{disabled:e.disabled,loading:e.loading},()=>[Ye(i,{name:e.leadingIconName,class:j(e.leadingIconClass)},null,8,["name","class"])])],2)):re("",!0),fe(e.$slots,"label",{},()=>[e.label?(F(),Q("span",{key:0,class:j(e.uiMenu.label)},ze(e.label),3)):(F(),Q("span",{key:1,class:j(e.uiMenu.label)},ze(e.placeholder||" "),3))]),e.isTrailing&&e.trailingIconName||e.$slots.trailing?(F(),Q("span",{key:1,class:j(e.trailingWrapperIconClass)},[fe(e.$slots,"trailing",{disabled:e.disabled,loading:e.loading},()=>[Ye(i,{name:e.trailingIconName,class:j(e.trailingIconClass),"aria-hidden":"true"},null,8,["name","class"])])],2)):re("",!0)],16,jo)])]),_:2},1032,["class"])),v?(F(),Q("div",{key:1,ref:"container",class:j([e.uiMenu.container,e.uiMenu.width])},[Ye(Xa,lt({appear:""},e.uiMenu.transition),{default:Ce(()=>[pe("div",null,[e.popper.arrow?(F(),Q("div",{key:0,"data-popper-arrow":"",class:j(Object.values(e.uiMenu.arrow))},null,2)):re("",!0),(F(),ve(Le(e.searchable?"HComboboxOptions":"HListboxOptions"),{static:"",class:j([e.uiMenu.base,e.uiMenu.ring,e.uiMenu.rounded,e.uiMenu.shadow,e.uiMenu.background,e.uiMenu.padding,e.uiMenu.height])},{default:Ce(()=>{var u,c;return[e.searchable?(F(),ve(l,{key:0,"display-value":()=>e.query,name:"q",placeholder:e.searchablePlaceholder,autofocus:"",autocomplete:"off",class:j(e.uiMenu.input),onChange:e.onQueryChange},null,8,["display-value","placeholder","class","onChange"])):re("",!0),(F(!0),Q(vt,null,Ga(e.filteredOptions,(f,O)=>(F(),ve(Le(e.searchable?"HComboboxOption":"HListboxOption"),{key:O,as:"template",value:e.valueAttribute?f[e.valueAttribute]:f,disabled:f.disabled},{default:Ce(({active:x,selected:S,disabled:C})=>[pe("li",{class:j([e.uiMenu.option.base,e.uiMenu.option.rounded,e.uiMenu.option.padding,e.uiMenu.option.size,e.uiMenu.option.color,x?e.uiMenu.option.active:e.uiMenu.option.inactive,S&&e.uiMenu.option.selected,C&&e.uiMenu.option.disabled])},[pe("div",{class:j(e.uiMenu.option.container)},[fe(e.$slots,"option",{option:f,active:x,selected:S},()=>[f.icon?(F(),ve(i,{key:0,name:f.icon,class:j([e.uiMenu.option.icon.base,x?e.uiMenu.option.icon.active:e.uiMenu.option.icon.inactive,f.iconClass]),"aria-hidden":"true"},null,8,["name","class"])):f.avatar?(F(),ve(s,lt({key:1},{size:e.uiMenu.option.avatar.size,...f.avatar},{class:e.uiMenu.option.avatar.base,"aria-hidden":"true"}),null,16,["class"])):f.chip?(F(),Q("span",{key:2,class:j(e.uiMenu.option.chip.base),style:Qa({background:`#${f.chip}`})},null,6)):re("",!0),pe("span",Fo,ze(["string","number"].includes(typeof f)?f:f[e.optionAttribute]),1)])],2),S?(F(),Q("span",{key:0,class:j([e.uiMenu.option.selectedIcon.wrapper,e.uiMenu.option.selectedIcon.padding])},[Ye(i,{name:e.selectedIcon,class:j(e.uiMenu.option.selectedIcon.base),"aria-hidden":"true"},null,8,["name","class"])],2)):re("",!0)],2)]),_:2},1032,["value","disabled"]))),128)),e.creatable&&e.createOption?(F(),ve(Le(e.searchable?"HComboboxOption":"HListboxOption"),{key:1,value:e.createOption,as:"template"},{default:Ce(({active:f,selected:O})=>[pe("li",{class:j([e.uiMenu.option.base,e.uiMenu.option.rounded,e.uiMenu.option.padding,e.uiMenu.option.size,e.uiMenu.option.color,f?e.uiMenu.option.active:e.uiMenu.option.inactive])},[pe("div",{class:j(e.uiMenu.option.container)},[fe(e.$slots,"option-create",{option:e.createOption,active:f,selected:O},()=>[pe("span",{class:j(e.uiMenu.option.create)},'Create "'+ze(e.createOption[e.optionAttribute])+'"',3)])],2)],2)]),_:3},8,["value"])):e.searchable&&e.query&&!((u=e.filteredOptions)!=null&&u.length)?(F(),Q("p",{key:2,class:j(e.uiMenu.option.empty)},[fe(e.$slots,"option-empty",{query:e.query},()=>[Lt(' No results for "'+ze(e.query)+'". ',1)])],2)):(c=e.filteredOptions)!=null&&c.length?re("",!0):(F(),Q("p",{key:3,class:j(e.uiMenu.empty)},[fe(e.$slots,"empty",{query:e.query},()=>[Lt(" No options. ")])],2))]}),_:3},8,["class"]))])]),_:3},16)],2)):re("",!0)]),_:3},8,["by","name","model-value","multiple","disabled","class","onUpdate:modelValue"])}const qo=za(zo,[["render",No]]);export{qo as _}; diff --git a/jesse/static/_nuxt/Cf2pTZZR.js b/jesse/static/_nuxt/Ca98eS_M.js similarity index 98% rename from jesse/static/_nuxt/Cf2pTZZR.js rename to jesse/static/_nuxt/Ca98eS_M.js index 277b78562..70359208d 100644 --- a/jesse/static/_nuxt/Cf2pTZZR.js +++ b/jesse/static/_nuxt/Ca98eS_M.js @@ -1,4 +1,4 @@ -import{m as d}from"./Ddw4NJNB.js";import"./DbTgESvQ.js";/*!----------------------------------------------------------------------------- +import{m as d}from"./Diw-o0Tt.js";import"./CtfKdue9.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) * Released under the MIT license diff --git a/jesse/static/_nuxt/CsXNC8nX.js b/jesse/static/_nuxt/CsXNC8nX.js new file mode 100644 index 000000000..bd84f7a34 --- /dev/null +++ b/jesse/static/_nuxt/CsXNC8nX.js @@ -0,0 +1 @@ +import{a as x,ag as k,ah as p,h as w,ar as y,as as g,ai as C,aj as S,y as o,ak as $,al as l,o as r,c as n,b as i,n as t,F as j,G as O,t as U,E as f,am as v,M as m}from"./CtfKdue9.js";const _={wrapper:{base:"flex items-center align-center text-center",horizontal:"w-full flex-row",vertical:"flex-col"},container:{base:"font-medium text-gray-700 dark:text-gray-200 flex",horizontal:"mx-3 whitespace-nowrap",vertical:"my-2"},border:{base:"flex border-gray-200 dark:border-gray-800",horizontal:"w-full",vertical:"h-full",size:{horizontal:{"2xs":"border-t",xs:"border-t-[2px]",sm:"border-t-[3px]",md:"border-t-[4px]",lg:"border-t-[5px]",xl:"border-t-[6px]"},vertical:{"2xs":"border-s",xs:"border-s-[2px]",sm:"border-s-[3px]",md:"border-s-[4px]",lg:"border-s-[5px]",xl:"border-s-[6px]"}},type:{solid:"border-solid",dotted:"border-dotted",dashed:"border-dashed"}},icon:{base:"flex-shrink-0 w-5 h-5"},avatar:{base:"flex-shrink-0",size:"2xs"},label:"text-sm",default:{size:"2xs"}},s=k(p.ui.strategy,p.ui.divider,_),A=w({components:{UIcon:y,UAvatar:g},inheritAttrs:!1,props:{label:{type:String,default:null},icon:{type:String,default:null},avatar:{type:Object,default:null},size:{type:String,default:()=>s.default.size,validator(e){return Object.keys(s.border.size.horizontal).includes(e)||Object.keys(s.border.size.vertical).includes(e)}},orientation:{type:String,default:"horizontal",validator:e=>["horizontal","vertical"].includes(e)},type:{type:String,default:"solid",validator:e=>["solid","dotted","dashed"].includes(e)},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},setup(e){const{ui:a,attrs:d}=C("divider",S(e,"ui"),s),u=o(()=>$(l(a.value.wrapper.base,a.value.wrapper[e.orientation]),e.class)),c=o(()=>l(a.value.container.base,a.value.container[e.orientation])),b=o(()=>l(a.value.border.base,a.value.border[e.orientation],a.value.border.size[e.orientation][e.size],a.value.border.type[e.type]));return{ui:a,attrs:d,wrapperClass:u,containerClass:c,borderClass:b}}});function B(e,a,d,u,c,b){const h=y,z=g;return r(),n("div",v({class:e.wrapperClass},e.attrs),[i("div",{class:t(e.borderClass)},null,2),e.label||e.icon||e.avatar||e.$slots.default?(r(),n(j,{key:0},[i("div",{class:t(e.containerClass)},[O(e.$slots,"default",{},()=>[e.label?(r(),n("span",{key:0,class:t(e.ui.label)},U(e.label),3)):e.icon?(r(),f(h,{key:1,name:e.icon,class:t(e.ui.icon.base)},null,8,["name","class"])):e.avatar?(r(),f(z,v({key:2},{size:e.ui.avatar.size,...e.avatar},{class:e.ui.avatar.base}),null,16,["class"])):m("",!0)])],2),i("div",{class:t(e.borderClass)},null,2)],64)):m("",!0)],16)}const E=x(A,[["render",B]]);export{E as _}; diff --git a/jesse/static/_nuxt/CtfKdue9.js b/jesse/static/_nuxt/CtfKdue9.js new file mode 100644 index 000000000..c4e93897f --- /dev/null +++ b/jesse/static/_nuxt/CtfKdue9.js @@ -0,0 +1,81 @@ +const __vite__fileDeps=["./Db4jbZ2h.js","./BuJV-6eH.js","./CGl4vwl9.js","./BhE9eUkV.js","./uU1M6rQW.js","./Sidebar.CrjfLt5S.css","./Ca0ihDfi.js","./BaIvpw_P.js","./CsXNC8nX.js","./BnUfHduR.js","./DDEQIaWN.js","./CzuY_Eh0.js","./Bd2bx7A5.js","./Bx5n1Vm4.js","./CzJqIIYd.js","./B1aKZWRr.js","./DcI7kF0e.js","./DDfehepI.js","./oEVPFgVt.js","./BpX9-e39.js","./B1reJhqX.js","./IconCSS.Z2BAHt_z.css","./Diw-o0Tt.js","./editor.DOtah1uZ.css","./Dw-KbuF7.js","./error-404.JekaaCis.css","./DfRq3hyz.js","./error-500.CNP9nqm1.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +/** +* @vue/shared v3.4.23 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function Bp(e,t){const n=new Set(e.split(","));return t?r=>n.has(r.toLowerCase()):r=>n.has(r)}const Tt={},Cs=[],pr=()=>{},aI=()=>!1,gl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Fp=e=>e.startsWith("onUpdate:"),Zt=Object.assign,Np=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},lI=Object.prototype.hasOwnProperty,ct=(e,t)=>lI.call(e,t),Ae=Array.isArray,Ts=e=>qs(e)==="[object Map]",Oc=e=>qs(e)==="[object Set]",$v=e=>qs(e)==="[object Date]",uI=e=>qs(e)==="[object RegExp]",Be=e=>typeof e=="function",Pt=e=>typeof e=="string",mo=e=>typeof e=="symbol",kt=e=>e!==null&&typeof e=="object",Up=e=>(kt(e)||Be(e))&&Be(e.then)&&Be(e.catch),Z_=Object.prototype.toString,qs=e=>Z_.call(e),cI=e=>qs(e).slice(8,-1),J_=e=>qs(e)==="[object Object]",zp=e=>Pt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,As=Bp(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Pc=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},fI=/-(\w)/g,$r=Pc(e=>e.replace(fI,(t,n)=>n?n.toUpperCase():"")),dI=/\B([A-Z])/g,Ji=Pc(e=>e.replace(dI,"-$1").toLowerCase()),Mc=Pc(e=>e.charAt(0).toUpperCase()+e.slice(1)),vd=Pc(e=>e?`on${Mc(e)}`:""),qr=(e,t)=>!Object.is(e,t),$s=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},yh=e=>{const t=parseFloat(e);return isNaN(t)?e:t},X_=e=>{const t=Pt(e)?Number(e):NaN;return isNaN(t)?e:t};let Iv;const Q_=()=>Iv||(Iv=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function zi(e){if(Ae(e)){const t={};for(let n=0;n{if(n){const r=n.split(pI);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function ae(e){let t="";if(Pt(e))t=e;else if(Ae(e))for(let n=0;nDc(n,t))}const tt=e=>Pt(e)?e:e==null?"":Ae(e)||kt(e)&&(e.toString===Z_||!Be(e.toString))?JSON.stringify(e,n1,2):String(e),n1=(e,t)=>t&&t.__v_isRef?n1(e,t.value):Ts(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],s)=>(n[yd(r,s)+" =>"]=o,n),{})}:Oc(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>yd(n))}:mo(t)?yd(t):kt(t)&&!Ae(t)&&!J_(t)?String(t):t,yd=(e,t="")=>{var n;return mo(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.4.23 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Yn;class r1{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Yn,!t&&Yn&&(this.index=(Yn.scopes||(Yn.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Yn;try{return Yn=this,t()}finally{Yn=n}}}on(){Yn=this}off(){Yn=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),ii()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Go,n=Mi;try{return Go=!0,Mi=this,this._runnings++,Rv(this),this.fn()}finally{Lv(this),this._runnings--,Mi=n,Go=t}}stop(){var t;this.active&&(Rv(this),Lv(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function wI(e){return e.value}function Rv(e){e._trackId++,e._depsLength=0}function Lv(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},ac=new WeakMap,Di=Symbol(""),wh=Symbol("");function Fn(e,t,n){if(Go&&Mi){let r=ac.get(e);r||ac.set(e,r=new Map);let o=r.get(n);o||r.set(n,o=l1(()=>r.delete(n))),s1(Mi,o)}}function go(e,t,n,r,o,s){const a=ac.get(e);if(!a)return;let u=[];if(t==="clear")u=[...a.values()];else if(n==="length"&&Ae(e)){const f=Number(r);a.forEach((c,d)=>{(d==="length"||!mo(d)&&d>=f)&&u.push(c)})}else switch(n!==void 0&&u.push(a.get(n)),t){case"add":Ae(e)?zp(n)&&u.push(a.get("length")):(u.push(a.get(Di)),Ts(e)&&u.push(a.get(wh)));break;case"delete":Ae(e)||(u.push(a.get(Di)),Ts(e)&&u.push(a.get(wh)));break;case"set":Ts(e)&&u.push(a.get(Di));break}jp();for(const f of u)f&&a1(f,4);Wp()}function xI(e,t){var n;return(n=ac.get(e))==null?void 0:n.get(t)}const kI=Bp("__proto__,__v_isRef,__isVue"),u1=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(mo)),Ov=SI();function SI(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=je(this);for(let s=0,a=this.length;s{e[t]=function(...n){oi(),jp();const r=je(this)[t].apply(this,n);return Wp(),ii(),r}}),e}function EI(e){mo(e)||(e=String(e));const t=je(this);return Fn(t,"has",e),t.hasOwnProperty(e)}class c1{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const o=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return s;if(n==="__v_raw")return r===(o?s?FI:p1:s?h1:d1).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const a=Ae(t);if(!o){if(a&&ct(Ov,n))return Reflect.get(Ov,n,r);if(n==="hasOwnProperty")return EI}const u=Reflect.get(t,n,r);return(mo(n)?u1.has(n):kI(n))||(o||Fn(t,"get",n),s)?u:ft(u)?a&&zp(n)?u:u.value:kt(u)?o?Gp(u):Tn(u):u}}class f1 extends c1{constructor(t=!1){super(!1,t)}set(t,n,r,o){let s=t[n];if(!this._isShallow){const f=Bs(s);if(!lc(r)&&!Bs(r)&&(s=je(s),r=je(r)),!Ae(t)&&ft(s)&&!ft(r))return f?!1:(s.value=r,!0)}const a=Ae(t)&&zp(n)?Number(n)e,Bc=e=>Reflect.getPrototypeOf(e);function Cu(e,t,n=!1,r=!1){e=e.__v_raw;const o=je(e),s=je(t);n||(qr(t,s)&&Fn(o,"get",t),Fn(o,"get",s));const{has:a}=Bc(o),u=r?Kp:n?Yp:Ga;if(a.call(o,t))return u(e.get(t));if(a.call(o,s))return u(e.get(s));e!==o&&e.get(t)}function Tu(e,t=!1){const n=this.__v_raw,r=je(n),o=je(e);return t||(qr(e,o)&&Fn(r,"has",e),Fn(r,"has",o)),e===o?n.has(e):n.has(e)||n.has(o)}function Au(e,t=!1){return e=e.__v_raw,!t&&Fn(je(e),"iterate",Di),Reflect.get(e,"size",e)}function Pv(e){e=je(e);const t=je(this);return Bc(t).has.call(t,e)||(t.add(e),go(t,"add",e,e)),this}function Mv(e,t){t=je(t);const n=je(this),{has:r,get:o}=Bc(n);let s=r.call(n,e);s||(e=je(e),s=r.call(n,e));const a=o.call(n,e);return n.set(e,t),s?qr(t,a)&&go(n,"set",e,t):go(n,"add",e,t),this}function Dv(e){const t=je(this),{has:n,get:r}=Bc(t);let o=n.call(t,e);o||(e=je(e),o=n.call(t,e)),r&&r.call(t,e);const s=t.delete(e);return o&&go(t,"delete",e,void 0),s}function Bv(){const e=je(this),t=e.size!==0,n=e.clear();return t&&go(e,"clear",void 0,void 0),n}function $u(e,t){return function(r,o){const s=this,a=s.__v_raw,u=je(a),f=t?Kp:e?Yp:Ga;return!e&&Fn(u,"iterate",Di),a.forEach((c,d)=>r.call(o,f(c),f(d),s))}}function Iu(e,t,n){return function(...r){const o=this.__v_raw,s=je(o),a=Ts(s),u=e==="entries"||e===Symbol.iterator&&a,f=e==="keys"&&a,c=o[e](...r),d=n?Kp:t?Yp:Ga;return!t&&Fn(s,"iterate",f?wh:Di),{next(){const{value:g,done:p}=c.next();return p?{value:g,done:p}:{value:u?[d(g[0]),d(g[1])]:d(g),done:p}},[Symbol.iterator](){return this}}}}function Io(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function II(){const e={get(s){return Cu(this,s)},get size(){return Au(this)},has:Tu,add:Pv,set:Mv,delete:Dv,clear:Bv,forEach:$u(!1,!1)},t={get(s){return Cu(this,s,!1,!0)},get size(){return Au(this)},has:Tu,add:Pv,set:Mv,delete:Dv,clear:Bv,forEach:$u(!1,!0)},n={get(s){return Cu(this,s,!0)},get size(){return Au(this,!0)},has(s){return Tu.call(this,s,!0)},add:Io("add"),set:Io("set"),delete:Io("delete"),clear:Io("clear"),forEach:$u(!0,!1)},r={get(s){return Cu(this,s,!0,!0)},get size(){return Au(this,!0)},has(s){return Tu.call(this,s,!0)},add:Io("add"),set:Io("set"),delete:Io("delete"),clear:Io("clear"),forEach:$u(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=Iu(s,!1,!1),n[s]=Iu(s,!0,!1),t[s]=Iu(s,!1,!0),r[s]=Iu(s,!0,!0)}),[e,n,t,r]}const[RI,LI,OI,PI]=II();function qp(e,t){const n=t?e?PI:OI:e?LI:RI;return(r,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(ct(n,o)&&o in r?n:r,o,s)}const MI={get:qp(!1,!1)},DI={get:qp(!1,!0)},BI={get:qp(!0,!1)},d1=new WeakMap,h1=new WeakMap,p1=new WeakMap,FI=new WeakMap;function NI(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function UI(e){return e.__v_skip||!Object.isExtensible(e)?0:NI(cI(e))}function Tn(e){return Bs(e)?e:Zp(e,!1,TI,MI,d1)}function ml(e){return Zp(e,!1,$I,DI,h1)}function Gp(e){return Zp(e,!0,AI,BI,p1)}function Zp(e,t,n,r,o){if(!kt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const a=UI(e);if(a===0)return e;const u=new Proxy(e,a===2?r:n);return o.set(e,u),u}function Bi(e){return Bs(e)?Bi(e.__v_raw):!!(e&&e.__v_isReactive)}function Bs(e){return!!(e&&e.__v_isReadonly)}function lc(e){return!!(e&&e.__v_isShallow)}function g1(e){return e?!!e.__v_raw:!1}function je(e){const t=e&&e.__v_raw;return t?je(t):e}function Jp(e){return Object.isExtensible(e)&&Y_(e,"__v_skip",!0),e}const Ga=e=>kt(e)?Tn(e):e,Yp=e=>kt(e)?Gp(e):e;class m1{constructor(t,n,r,o){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Hp(()=>t(this._value),()=>Is(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=r}get value(){const t=je(this);return(!t._cacheable||t.effect.dirty)&&qr(t._value,t._value=t.effect.run())&&Is(t,4),Xp(t),t.effect._dirtyLevel>=2&&Is(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function zI(e,t,n=!1){let r,o;const s=Be(e);return s?(r=e,o=pr):(r=e.get,o=e.set),new m1(r,o,s||!o,n)}function Xp(e){var t;Go&&Mi&&(e=je(e),s1(Mi,(t=e.dep)!=null?t:e.dep=l1(()=>e.dep=void 0,e instanceof m1?e:void 0)))}function Is(e,t=4,n){e=je(e);const r=e.dep;r&&a1(r,t)}function ft(e){return!!(e&&e.__v_isRef===!0)}function ne(e){return v1(e,!1)}function Gr(e){return v1(e,!0)}function v1(e,t){return ft(e)?e:new VI(e,t)}class VI{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:je(t),this._value=n?t:Ga(t)}get value(){return Xp(this),this._value}set value(t){const n=this.__v_isShallow||lc(t)||Bs(t);t=n?t:je(t),qr(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:Ga(t),Is(this,4))}}function Dj(e){Is(e,4)}function $(e){return ft(e)?e.value:e}function Vr(e){return Be(e)?e():$(e)}const HI={get:(e,t,n)=>$(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return ft(o)&&!ft(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function y1(e){return Bi(e)?e:new Proxy(e,HI)}class jI{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>Xp(this),()=>Is(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function b1(e){return new jI(e)}function WI(e){const t=Ae(e)?new Array(e.length):{};for(const n in e)t[n]=_1(e,n);return t}class KI{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return xI(je(this._object),this._key)}}class qI{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Mt(e,t,n){return ft(e)?e:Be(e)?new qI(e):kt(e)&&arguments.length>1?_1(e,t,n):ne(e)}function _1(e,t,n){const r=e[t];return ft(r)?r:new KI(e,t,n)}/** +* @vue/runtime-core v3.4.23 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Zo(e,t,n,r){try{return r?e(...r):e()}catch(o){Gs(o,t,n)}}function mr(e,t,n,r){if(Be(e)){const o=Zo(e,t,n,r);return o&&Up(o)&&o.catch(s=>{Gs(s,t,n)}),o}if(Ae(e)){const o=[];for(let s=0;s>>1,o=vn[r],s=Ja(o);sHr&&vn.splice(t,1)}function kh(e){Ae(e)?Rs.push(...e):(!No||!No.includes(e,e.allowRecurse?Ci+1:Ci))&&Rs.push(e),x1()}function Fv(e,t,n=Za?Hr+1:0){for(;nJa(n)-Ja(r));if(Rs.length=0,No){No.push(...t);return}for(No=t,Ci=0;Cie.id==null?1/0:e.id,YI=(e,t)=>{const n=Ja(e)-Ja(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function k1(e){xh=!1,Za=!0,vn.sort(YI);try{for(Hr=0;HrPt(v)?v.trim():v)),g&&(o=n.map(yh))}let u,f=r[u=vd(t)]||r[u=vd($r(t))];!f&&s&&(f=r[u=vd(Ji(t))]),f&&mr(f,e,6,o);const c=r[u+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,mr(c,e,6,o)}}function S1(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const s=e.emits;let a={},u=!1;if(!Be(e)){const f=c=>{const d=S1(c,t,!0);d&&(u=!0,Zt(a,d))};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}return!s&&!u?(kt(e)&&r.set(e,null),null):(Ae(s)?s.forEach(f=>a[f]=null):Zt(a,s),kt(e)&&r.set(e,a),a)}function Nc(e,t){return!e||!gl(t)?!1:(t=t.slice(2).replace(/Once$/,""),ct(e,t[0].toLowerCase()+t.slice(1))||ct(e,Ji(t))||ct(e,t))}let Gt=null,Uc=null;function cc(e){const t=Gt;return Gt=e,Uc=e&&e.type.__scopeId||null,t}function QI(e){Uc=e}function e3(){Uc=null}function X(e,t=Gt,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&Xv(-1);const s=cc(t);let a;try{a=e(...o)}finally{cc(s),r._d&&Xv(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function bd(e){const{type:t,vnode:n,proxy:r,withProxy:o,props:s,propsOptions:[a],slots:u,attrs:f,emit:c,render:d,renderCache:g,data:p,setupState:v,ctx:y,inheritAttrs:k}=e;let _,x;const E=cc(e);try{if(n.shapeFlag&4){const T=o||r,O=T;_=dr(d.call(O,T,g,s,v,p,y)),x=f}else{const T=t;_=dr(T.length>1?T(s,{attrs:f,slots:u,emit:c}):T(s,null)),x=t.props?f:n3(f)}}catch(T){Fa.length=0,Gs(T,e,1),_=L(Cn)}let w=_;if(x&&k!==!1){const T=Object.keys(x),{shapeFlag:O}=w;T.length&&O&7&&(a&&T.some(Fp)&&(x=r3(x,a)),w=vr(w,x))}return n.dirs&&(w=vr(w),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&(w.transition=n.transition),_=w,cc(E),_}function t3(e,t=!0){let n;for(let r=0;r{let t;for(const n in e)(n==="class"||n==="style"||gl(n))&&((t||(t={}))[n]=e[n]);return t},r3=(e,t)=>{const n={};for(const r in e)(!Fp(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function o3(e,t,n){const{props:r,children:o,component:s}=e,{props:a,children:u,patchFlag:f}=t,c=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&f>=0){if(f&1024)return!0;if(f&16)return r?Nv(r,a,c):!!a;if(f&8){const d=t.dynamicProps;for(let g=0;ge.__isSuspense;let Sh=0;const i3={name:"Suspense",__isSuspense:!0,process(e,t,n,r,o,s,a,u,f,c){if(e==null)s3(t,n,r,o,s,a,u,f,c);else{if(s&&s.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}a3(e,t,n,r,o,a,u,f,c)}},hydrate:l3,create:rg,normalize:u3},ng=i3;function Ya(e,t){const n=e.props&&e.props[t];Be(n)&&n()}function s3(e,t,n,r,o,s,a,u,f){const{p:c,o:{createElement:d}}=f,g=d("div"),p=e.suspense=rg(e,o,r,t,g,n,s,a,u,f);c(null,p.pendingBranch=e.ssContent,g,null,r,p,s,a),p.deps>0?(Ya(e,"onPending"),Ya(e,"onFallback"),c(null,e.ssFallback,t,n,r,null,s,a),Ls(p,e.ssFallback)):p.resolve(!1,!0)}function a3(e,t,n,r,o,s,a,u,{p:f,um:c,o:{createElement:d}}){const g=t.suspense=e.suspense;g.vnode=t,t.el=e.el;const p=t.ssContent,v=t.ssFallback,{activeBranch:y,pendingBranch:k,isInFallback:_,isHydrating:x}=g;if(k)g.pendingBranch=p,Cr(p,k)?(f(k,p,g.hiddenContainer,null,o,g,s,a,u),g.deps<=0?g.resolve():_&&(x||(f(y,v,n,r,o,null,s,a,u),Ls(g,v)))):(g.pendingId=Sh++,x?(g.isHydrating=!1,g.activeBranch=k):c(k,o,g),g.deps=0,g.effects.length=0,g.hiddenContainer=d("div"),_?(f(null,p,g.hiddenContainer,null,o,g,s,a,u),g.deps<=0?g.resolve():(f(y,v,n,r,o,null,s,a,u),Ls(g,v))):y&&Cr(p,y)?(f(y,p,n,r,o,g,s,a,u),g.resolve(!0)):(f(null,p,g.hiddenContainer,null,o,g,s,a,u),g.deps<=0&&g.resolve()));else if(y&&Cr(p,y))f(y,p,n,r,o,g,s,a,u),Ls(g,p);else if(Ya(t,"onPending"),g.pendingBranch=p,p.shapeFlag&512?g.pendingId=p.component.suspenseId:g.pendingId=Sh++,f(null,p,g.hiddenContainer,null,o,g,s,a,u),g.deps<=0)g.resolve();else{const{timeout:E,pendingId:w}=g;E>0?setTimeout(()=>{g.pendingId===w&&g.fallback(v)},E):E===0&&g.fallback(v)}}function rg(e,t,n,r,o,s,a,u,f,c,d=!1){const{p:g,m:p,um:v,n:y,o:{parentNode:k,remove:_}}=c;let x;const E=c3(e);E&&t!=null&&t.pendingBranch&&(x=t.pendingId,t.deps++);const w=e.props?X_(e.props.timeout):void 0,T=s,O={vnode:e,parent:t,parentComponent:n,namespace:a,container:r,hiddenContainer:o,deps:0,pendingId:Sh++,timeout:typeof w=="number"?w:-1,activeBranch:null,pendingBranch:null,isInFallback:!d,isHydrating:d,isUnmounted:!1,effects:[],resolve(M=!1,F=!1){const{vnode:z,activeBranch:U,pendingBranch:B,pendingId:q,effects:G,parentComponent:me,container:le}=O;let xe=!1;O.isHydrating?O.isHydrating=!1:M||(xe=U&&B.transition&&B.transition.mode==="out-in",xe&&(U.transition.afterLeave=()=>{q===O.pendingId&&(p(B,le,s===T?y(U):s,0),kh(G))}),U&&(k(U.el)!==O.hiddenContainer&&(s=y(U)),v(U,me,O,!0)),xe||p(B,le,s,0)),Ls(O,B),O.pendingBranch=null,O.isInFallback=!1;let se=O.parent,Se=!1;for(;se;){if(se.pendingBranch){se.effects.push(...G),Se=!0;break}se=se.parent}!Se&&!xe&&kh(G),O.effects=[],E&&t&&t.pendingBranch&&x===t.pendingId&&(t.deps--,t.deps===0&&!F&&t.resolve()),Ya(z,"onResolve")},fallback(M){if(!O.pendingBranch)return;const{vnode:F,activeBranch:z,parentComponent:U,container:B,namespace:q}=O;Ya(F,"onFallback");const G=y(z),me=()=>{O.isInFallback&&(g(null,M,B,G,U,null,q,u,f),Ls(O,M))},le=M.transition&&M.transition.mode==="out-in";le&&(z.transition.afterLeave=me),O.isInFallback=!0,v(z,U,null,!0),le||me()},move(M,F,z){O.activeBranch&&p(O.activeBranch,M,F,z),O.container=M},next(){return O.activeBranch&&y(O.activeBranch)},registerDep(M,F){const z=!!O.pendingBranch;z&&O.deps++;const U=M.vnode.el;M.asyncDep.catch(B=>{Gs(B,M,0)}).then(B=>{if(M.isUnmounted||O.isUnmounted||O.pendingId!==M.suspenseId)return;M.asyncResolved=!0;const{vnode:q}=M;Mh(M,B,!1),U&&(q.el=U);const G=!U&&M.subTree.el;F(M,q,k(U||M.subTree.el),U?null:y(M.subTree),O,a,f),G&&_(G),eg(M,q.el),z&&--O.deps===0&&O.resolve()})},unmount(M,F){O.isUnmounted=!0,O.activeBranch&&v(O.activeBranch,n,M,F),O.pendingBranch&&v(O.pendingBranch,n,M,F)}};return O}function l3(e,t,n,r,o,s,a,u,f){const c=t.suspense=rg(t,r,n,e.parentNode,document.createElement("div"),null,o,s,a,u,!0),d=f(e,c.pendingBranch=t.ssContent,n,c,s,a);return c.deps===0&&c.resolve(!1,!0),d}function u3(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=zv(r?n.default:n),e.ssFallback=r?zv(n.fallback):L(Cn)}function zv(e){let t;if(Be(e)){const n=Ns&&e._c;n&&(e._d=!1,H()),e=e(),n&&(e._d=!0,t=gr,tw())}return Ae(e)&&(e=t3(e)),e=dr(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function A1(e,t){t&&t.pendingBranch?Ae(e)?t.effects.push(...e):t.effects.push(e):kh(e)}function Ls(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e;let o=t.el;for(;!o&&t.component;)t=t.component.subTree,o=t.el;n.el=o,r&&r.subTree===n&&(r.vnode.el=o,eg(r,o))}function c3(e){var t;return((t=e.props)==null?void 0:t.suspensible)!=null&&e.props.suspensible!==!1}const f3=Symbol.for("v-scx"),d3=()=>qe(f3);function on(e,t){return vl(e,null,t)}function h3(e,t){return vl(e,null,{flush:"post"})}function p3(e,t){return vl(e,null,{flush:"sync"})}const Ru={};function vt(e,t,n){return vl(e,t,n)}function vl(e,t,{immediate:n,deep:r,flush:o,once:s,onTrack:a,onTrigger:u}=Tt){if(t&&s){const M=t;t=(...F)=>{M(...F),O()}}const f=en,c=M=>r===!0?M:$i(M,r===!1?1:void 0);let d,g=!1,p=!1;if(ft(e)?(d=()=>e.value,g=lc(e)):Bi(e)?(d=()=>c(e),g=!0):Ae(e)?(p=!0,g=e.some(M=>Bi(M)||lc(M)),d=()=>e.map(M=>{if(ft(M))return M.value;if(Bi(M))return c(M);if(Be(M))return Zo(M,f,2)})):Be(e)?t?d=()=>Zo(e,f,2):d=()=>(v&&v(),mr(e,f,3,[y])):d=pr,t&&r){const M=d;d=()=>$i(M())}let v,y=M=>{v=w.onStop=()=>{Zo(M,f,4),v=w.onStop=void 0}},k;if(wl)if(y=pr,t?n&&mr(t,f,3,[d(),p?[]:void 0,y]):d(),o==="sync"){const M=d3();k=M.__watcherHandles||(M.__watcherHandles=[])}else return pr;let _=p?new Array(e.length).fill(Ru):Ru;const x=()=>{if(!(!w.active||!w.dirty))if(t){const M=w.run();(r||g||(p?M.some((F,z)=>qr(F,_[z])):qr(M,_)))&&(v&&v(),mr(t,f,3,[M,_===Ru?void 0:p&&_[0]===Ru?[]:_,y]),_=M)}else w.run()};x.allowRecurse=!!t;let E;o==="sync"?E=x:o==="post"?E=()=>dn(x,f&&f.suspense):(x.pre=!0,f&&(x.id=f.uid),E=()=>Fc(x));const w=new Hp(d,pr,E),T=ri(),O=()=>{w.stop(),T&&Np(T.effects,w)};return t?n?x():_=w.run():o==="post"?dn(w.run.bind(w),f&&f.suspense):w.run(),k&&k.push(O),O}function g3(e,t,n){const r=this.proxy,o=Pt(e)?e.includes(".")?$1(r,e):()=>r[e]:e.bind(r,r);let s;Be(t)?s=t:(s=t.handler,n=t);const a=Hi(this),u=vl(o,s.bind(r),n);return a(),u}function $1(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o0){if(n>=t)return e;n++}if(r=r||new Set,r.has(e))return e;if(r.add(e),ft(e))$i(e.value,t,n,r);else if(Ae(e))for(let o=0;o{$i(o,t,n,r)});else if(J_(e))for(const o in e)$i(e[o],t,n,r);return e}function I1(e,t){if(Gt===null)return e;const n=Vc(Gt)||Gt.proxy,r=e.dirs||(e.dirs=[]);for(let o=0;o{e.isMounted=!0}),bl(()=>{e.isUnmounting=!0}),e}const fr=[Function,Array],R1={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:fr,onEnter:fr,onAfterEnter:fr,onEnterCancelled:fr,onBeforeLeave:fr,onLeave:fr,onAfterLeave:fr,onLeaveCancelled:fr,onBeforeAppear:fr,onAppear:fr,onAfterAppear:fr,onAppearCancelled:fr},v3={name:"BaseTransition",props:R1,setup(e,{slots:t}){const n=nr(),r=m3();return()=>{const o=t.default&&O1(t.default(),!0);if(!o||!o.length)return;let s=o[0];if(o.length>1){for(const p of o)if(p.type!==Cn){s=p;break}}const a=je(e),{mode:u}=a;if(r.isLeaving)return _d(s);const f=Vv(s);if(!f)return _d(s);const c=Eh(f,a,r,n);fc(f,c);const d=n.subTree,g=d&&Vv(d);if(g&&g.type!==Cn&&!Cr(f,g)){const p=Eh(g,a,r,n);if(fc(g,p),u==="out-in")return r.isLeaving=!0,p.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},_d(s);u==="in-out"&&f.type!==Cn&&(p.delayLeave=(v,y,k)=>{const _=L1(r,g);_[String(g.key)]=g,v[Uo]=()=>{y(),v[Uo]=void 0,delete c.delayedLeave},c.delayedLeave=k})}return s}}},y3=v3;function L1(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Eh(e,t,n,r){const{appear:o,mode:s,persisted:a=!1,onBeforeEnter:u,onEnter:f,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:g,onLeave:p,onAfterLeave:v,onLeaveCancelled:y,onBeforeAppear:k,onAppear:_,onAfterAppear:x,onAppearCancelled:E}=t,w=String(e.key),T=L1(n,e),O=(z,U)=>{z&&mr(z,r,9,U)},M=(z,U)=>{const B=U[1];O(z,U),Ae(z)?z.every(q=>q.length<=1)&&B():z.length<=1&&B()},F={mode:s,persisted:a,beforeEnter(z){let U=u;if(!n.isMounted)if(o)U=k||u;else return;z[Uo]&&z[Uo](!0);const B=T[w];B&&Cr(e,B)&&B.el[Uo]&&B.el[Uo](),O(U,[z])},enter(z){let U=f,B=c,q=d;if(!n.isMounted)if(o)U=_||f,B=x||c,q=E||d;else return;let G=!1;const me=z[Lu]=le=>{G||(G=!0,le?O(q,[z]):O(B,[z]),F.delayedLeave&&F.delayedLeave(),z[Lu]=void 0)};U?M(U,[z,me]):me()},leave(z,U){const B=String(e.key);if(z[Lu]&&z[Lu](!0),n.isUnmounting)return U();O(g,[z]);let q=!1;const G=z[Uo]=me=>{q||(q=!0,U(),me?O(y,[z]):O(v,[z]),z[Uo]=void 0,T[B]===e&&delete T[B])};T[B]=e,p?M(p,[z,G]):G()},clone(z){return Eh(z,t,n,r)}};return F}function _d(e){if(yl(e))return e=vr(e),e.children=null,e}function Vv(e){return yl(e)?e.children?e.children[0]:void 0:e}function fc(e,t){e.shapeFlag&6&&e.component?fc(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function O1(e,t=!1,n){let r=[],o=0;for(let s=0;s1)for(let s=0;s!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function dc(e){Be(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:o=200,timeout:s,suspensible:a=!0,onError:u}=e;let f=null,c,d=0;const g=()=>(d++,f=null,p()),p=()=>{let v;return f||(v=f=t().catch(y=>{if(y=y instanceof Error?y:new Error(String(y)),u)return new Promise((k,_)=>{u(y,()=>k(g()),()=>_(y),d+1)});throw y}).then(y=>v!==f&&f?f:(y&&(y.__esModule||y[Symbol.toStringTag]==="Module")&&(y=y.default),c=y,y)))};return _e({name:"AsyncComponentWrapper",__asyncLoader:p,get __asyncResolved(){return c},setup(){const v=en;if(c)return()=>wd(c,v);const y=E=>{f=null,Gs(E,v,13,!r)};if(a&&v.suspense||wl)return p().then(E=>()=>wd(E,v)).catch(E=>(y(E),()=>r?L(r,{error:E}):null));const k=ne(!1),_=ne(),x=ne(!!o);return o&&setTimeout(()=>{x.value=!1},o),s!=null&&setTimeout(()=>{if(!k.value&&!_.value){const E=new Error(`Async component timed out after ${s}ms.`);y(E),_.value=E}},s),p().then(()=>{k.value=!0,v.parent&&yl(v.parent.vnode)&&(v.parent.effect.dirty=!0,Fc(v.parent.update))}).catch(E=>{y(E),_.value=E}),()=>{if(k.value&&c)return wd(c,v);if(_.value&&r)return L(r,{error:_.value});if(n&&!x.value)return L(n)}}})}function wd(e,t){const{ref:n,props:r,children:o,ce:s}=t.vnode,a=L(e,r,o);return a.ref=n,a.ce=s,delete t.vnode.ce,a}const yl=e=>e.type.__isKeepAlive,b3={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=nr(),r=n.ctx;if(!r.renderer)return()=>{const E=t.default&&t.default();return E&&E.length===1?E[0]:E};const o=new Map,s=new Set;let a=null;const u=n.suspense,{renderer:{p:f,m:c,um:d,o:{createElement:g}}}=r,p=g("div");r.activate=(E,w,T,O,M)=>{const F=E.component;c(E,w,T,0,u),f(F.vnode,E,w,T,F,u,O,E.slotScopeIds,M),dn(()=>{F.isDeactivated=!1,F.a&&$s(F.a);const z=E.props&&E.props.onVnodeMounted;z&&Pn(z,F.parent,E)},u)},r.deactivate=E=>{const w=E.component;c(E,p,null,1,u),dn(()=>{w.da&&$s(w.da);const T=E.props&&E.props.onVnodeUnmounted;T&&Pn(T,w.parent,E),w.isDeactivated=!0},u)};function v(E){xd(E),d(E,n,u,!0)}function y(E){o.forEach((w,T)=>{const O=Dh(w.type);O&&(!E||!E(O))&&k(T)})}function k(E){const w=o.get(E);!a||!Cr(w,a)?v(w):a&&xd(a),o.delete(E),s.delete(E)}vt(()=>[e.include,e.exclude],([E,w])=>{E&&y(T=>Ia(E,T)),w&&y(T=>!Ia(w,T))},{flush:"post",deep:!0});let _=null;const x=()=>{_!=null&&o.set(_,kd(n.subTree))};return ut(x),F1(x),bl(()=>{o.forEach(E=>{const{subTree:w,suspense:T}=n,O=kd(w);if(E.type===O.type&&E.key===O.key){xd(O);const M=O.component.da;M&&dn(M,T);return}v(E)})}),()=>{if(_=null,!t.default)return a=null;const E=t.default(),w=E[0];if(E.length>1)return a=null,E;if(!Us(w)||!(w.shapeFlag&4)&&!(w.shapeFlag&128))return a=null,w;let T=kd(w);const O=T.type,M=Dh(Fi(T)?T.type.__asyncResolved||{}:O),{include:F,exclude:z,max:U}=e;if(F&&(!M||!Ia(F,M))||z&&M&&Ia(z,M))return a=T,w;const B=T.key==null?O:T.key,q=o.get(B);return T.el&&(T=vr(T),w.shapeFlag&128&&(w.ssContent=T)),_=B,q?(T.el=q.el,T.component=q.component,T.transition&&fc(T,T.transition),T.shapeFlag|=512,s.delete(B),s.add(B)):(s.add(B),U&&s.size>parseInt(U,10)&&k(s.values().next().value)),T.shapeFlag|=256,a=T,T1(w.type)?w:T}}},_3=b3;function Ia(e,t){return Ae(e)?e.some(n=>Ia(n,t)):Pt(e)?e.split(",").includes(t):uI(e)?e.test(t):!1}function P1(e,t){D1(e,"a",t)}function M1(e,t){D1(e,"da",t)}function D1(e,t,n=en){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(zc(t,r,n),n){let o=n.parent;for(;o&&o.parent;)yl(o.parent.vnode)&&w3(r,t,n,o),o=o.parent}}function w3(e,t,n,r){const o=zc(t,e,r,!0);Kt(()=>{Np(r[t],o)},n)}function xd(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function kd(e){return e.shapeFlag&128?e.ssContent:e}function zc(e,t,n=en,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...a)=>{if(n.isUnmounted)return;oi();const u=Hi(n),f=mr(t,n,e,a);return u(),ii(),f});return r?o.unshift(s):o.push(s),s}}const bo=e=>(t,n=en)=>(!wl||e==="sp")&&zc(e,(...r)=>t(...r),n),B1=bo("bm"),ut=bo("m"),x3=bo("bu"),F1=bo("u"),bl=bo("bum"),Kt=bo("um"),k3=bo("sp"),S3=bo("rtg"),E3=bo("rtc");function N1(e,t=en){zc("ec",e,t)}function Nn(e,t,n,r){let o;const s=n&&n[r];if(Ae(e)||Pt(e)){o=new Array(e.length);for(let a=0,u=e.length;at(a,u,void 0,s&&s[u]));else{const a=Object.keys(e);o=new Array(a.length);for(let u=0,f=a.length;u{const s=r.fn(...o);return s&&(s.key=r.key),s}:r.fn)}return e}function at(e,t,n={},r,o){if(Gt.isCE||Gt.parent&&Fi(Gt.parent)&&Gt.parent.isCE)return t!=="default"&&(n.name=t),L("slot",n,r&&r());let s=e[t];s&&s._c&&(s._d=!1),H();const a=s&&U1(s(n)),u=$e(Xe,{key:n.key||a&&a.key||`_${t}`},a||(r?r():[]),a&&e._===1?64:-2);return!o&&u.scopeId&&(u.slotScopeIds=[u.scopeId+"-s"]),s&&s._c&&(s._d=!0),u}function U1(e){return e.some(t=>Us(t)?!(t.type===Cn||t.type===Xe&&!U1(t.children)):!0)?e:null}const Ch=e=>e?ow(e)?Vc(e)||e.proxy:Ch(e.parent):null,Da=Zt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ch(e.parent),$root:e=>Ch(e.root),$emit:e=>e.emit,$options:e=>og(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Fc(e.update)}),$nextTick:e=>e.n||(e.n=hn.bind(e.proxy)),$watch:e=>g3.bind(e)}),Sd=(e,t)=>e!==Tt&&!e.__isScriptSetup&&ct(e,t),T3={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:s,accessCache:a,type:u,appContext:f}=e;let c;if(t[0]!=="$"){const v=a[t];if(v!==void 0)switch(v){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(Sd(r,t))return a[t]=1,r[t];if(o!==Tt&&ct(o,t))return a[t]=2,o[t];if((c=e.propsOptions[0])&&ct(c,t))return a[t]=3,s[t];if(n!==Tt&&ct(n,t))return a[t]=4,n[t];Th&&(a[t]=0)}}const d=Da[t];let g,p;if(d)return t==="$attrs"&&Fn(e.attrs,"get",""),d(e);if((g=u.__cssModules)&&(g=g[t]))return g;if(n!==Tt&&ct(n,t))return a[t]=4,n[t];if(p=f.config.globalProperties,ct(p,t))return p[t]},set({_:e},t,n){const{data:r,setupState:o,ctx:s}=e;return Sd(o,t)?(o[t]=n,!0):r!==Tt&&ct(r,t)?(r[t]=n,!0):ct(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:s}},a){let u;return!!n[a]||e!==Tt&&ct(e,a)||Sd(t,a)||(u=s[0])&&ct(u,a)||ct(r,a)||ct(Da,a)||ct(o.config.globalProperties,a)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ct(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function A3(){return $3().attrs}function $3(){const e=nr();return e.setupContext||(e.setupContext=sw(e))}function hc(e){return Ae(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function _l(e,t){return!e||!t?e||t:Ae(e)&&Ae(t)?e.concat(t):Zt({},hc(e),hc(t))}function I3(e){const t=nr();let n=e();return Ph(),Up(n)&&(n=n.catch(r=>{throw Hi(t),r})),[n,()=>Hi(t)]}let Th=!0;function R3(e){const t=og(e),n=e.proxy,r=e.ctx;Th=!1,t.beforeCreate&&Hv(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:a,watch:u,provide:f,inject:c,created:d,beforeMount:g,mounted:p,beforeUpdate:v,updated:y,activated:k,deactivated:_,beforeDestroy:x,beforeUnmount:E,destroyed:w,unmounted:T,render:O,renderTracked:M,renderTriggered:F,errorCaptured:z,serverPrefetch:U,expose:B,inheritAttrs:q,components:G,directives:me,filters:le}=t;if(c&&L3(c,r,null),a)for(const Se in a){const ye=a[Se];Be(ye)&&(r[Se]=ye.bind(n))}if(o){const Se=o.call(n,n);kt(Se)&&(e.data=Tn(Se))}if(Th=!0,s)for(const Se in s){const ye=s[Se],Bt=Be(ye)?ye.bind(n,n):Be(ye.get)?ye.get.bind(n,n):pr,Yt=!Be(ye)&&Be(ye.set)?ye.set.bind(n):pr,Re=N({get:Bt,set:Yt});Object.defineProperty(r,Se,{enumerable:!0,configurable:!0,get:()=>Re.value,set:ze=>Re.value=ze})}if(u)for(const Se in u)z1(u[Se],r,n,Se);if(f){const Se=Be(f)?f.call(n):f;Reflect.ownKeys(Se).forEach(ye=>{wt(ye,Se[ye])})}d&&Hv(d,e,"c");function se(Se,ye){Ae(ye)?ye.forEach(Bt=>Se(Bt.bind(n))):ye&&Se(ye.bind(n))}if(se(B1,g),se(ut,p),se(x3,v),se(F1,y),se(P1,k),se(M1,_),se(N1,z),se(E3,M),se(S3,F),se(bl,E),se(Kt,T),se(k3,U),Ae(B))if(B.length){const Se=e.exposed||(e.exposed={});B.forEach(ye=>{Object.defineProperty(Se,ye,{get:()=>n[ye],set:Bt=>n[ye]=Bt})})}else e.exposed||(e.exposed={});O&&e.render===pr&&(e.render=O),q!=null&&(e.inheritAttrs=q),G&&(e.components=G),me&&(e.directives=me)}function L3(e,t,n=pr){Ae(e)&&(e=Ah(e));for(const r in e){const o=e[r];let s;kt(o)?"default"in o?s=qe(o.from||r,o.default,!0):s=qe(o.from||r):s=qe(o),ft(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:a=>s.value=a}):t[r]=s}}function Hv(e,t,n){mr(Ae(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function z1(e,t,n,r){const o=r.includes(".")?$1(n,r):()=>n[r];if(Pt(e)){const s=t[e];Be(s)&&vt(o,s)}else if(Be(e))vt(o,e.bind(n));else if(kt(e))if(Ae(e))e.forEach(s=>z1(s,t,n,r));else{const s=Be(e.handler)?e.handler.bind(n):t[e.handler];Be(s)&&vt(o,s,e)}}function og(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:a}}=e.appContext,u=s.get(t);let f;return u?f=u:!o.length&&!n&&!r?f=t:(f={},o.length&&o.forEach(c=>pc(f,c,a,!0)),pc(f,t,a)),kt(t)&&s.set(t,f),f}function pc(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&pc(e,s,n,!0),o&&o.forEach(a=>pc(e,a,n,!0));for(const a in t)if(!(r&&a==="expose")){const u=O3[a]||n&&n[a];e[a]=u?u(e[a],t[a]):t[a]}return e}const O3={data:jv,props:Wv,emits:Wv,methods:Ra,computed:Ra,beforeCreate:Sn,created:Sn,beforeMount:Sn,mounted:Sn,beforeUpdate:Sn,updated:Sn,beforeDestroy:Sn,beforeUnmount:Sn,destroyed:Sn,unmounted:Sn,activated:Sn,deactivated:Sn,errorCaptured:Sn,serverPrefetch:Sn,components:Ra,directives:Ra,watch:M3,provide:jv,inject:P3};function jv(e,t){return t?e?function(){return Zt(Be(e)?e.call(this,this):e,Be(t)?t.call(this,this):t)}:t:e}function P3(e,t){return Ra(Ah(e),Ah(t))}function Ah(e){if(Ae(e)){const t={};for(let n=0;n1)return n&&Be(t)?t.call(r&&r.proxy):t}}function ig(){return!!(en||Gt||Os)}const H1=Object.create(null),$h=()=>Object.create(H1),j1=e=>Object.getPrototypeOf(e)===H1;function F3(e,t,n,r=!1){const o={},s=$h();e.propsDefaults=Object.create(null),W1(e,t,o,s);for(const a in e.propsOptions[0])a in o||(o[a]=void 0);n?e.props=r?o:ml(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function N3(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:a}}=e,u=je(o),[f]=e.propsOptions;let c=!1;if((r||a>0)&&!(a&16)){if(a&8){const d=e.vnode.dynamicProps;for(let g=0;g{f=!0;const[p,v]=K1(g,t,!0);Zt(a,p),v&&u.push(...v)};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!s&&!f)return kt(e)&&r.set(e,Cs),Cs;if(Ae(s))for(let d=0;d-1,v[1]=k<0||y-1||ct(v,"default"))&&u.push(g)}}}const c=[a,u];return kt(e)&&r.set(e,c),c}function Kv(e){return e[0]!=="$"&&!As(e)}function qv(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Gv(e,t){return qv(e)===qv(t)}function Zv(e,t){return Ae(t)?t.findIndex(n=>Gv(n,e)):Be(t)&&Gv(t,e)?0:-1}const q1=e=>e[0]==="_"||e==="$stable",sg=e=>Ae(e)?e.map(dr):[dr(e)],U3=(e,t,n)=>{if(t._n)return t;const r=X((...o)=>sg(t(...o)),n);return r._c=!1,r},G1=(e,t,n)=>{const r=e._ctx;for(const o in e){if(q1(o))continue;const s=e[o];if(Be(s))t[o]=U3(o,s,r);else if(s!=null){const a=sg(s);t[o]=()=>a}}},Z1=(e,t)=>{const n=sg(t);e.slots.default=()=>n},z3=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=je(t),Y_(e.slots,"_",n)):G1(t,e.slots=$h())}else e.slots=$h(),t&&Z1(e,t)},V3=(e,t,n)=>{const{vnode:r,slots:o}=e;let s=!0,a=Tt;if(r.shapeFlag&32){const u=t._;u?n&&u===1?s=!1:(Zt(o,t),!n&&u===1&&delete o._):(s=!t.$stable,G1(t,o)),a=t}else t&&(Z1(e,t),a={default:1});if(s)for(const u in o)!q1(u)&&a[u]==null&&delete o[u]};function gc(e,t,n,r,o=!1){if(Ae(e)){e.forEach((p,v)=>gc(p,t&&(Ae(t)?t[v]:t),n,r,o));return}if(Fi(r)&&!o)return;const s=r.shapeFlag&4?Vc(r.component)||r.component.proxy:r.el,a=o?null:s,{i:u,r:f}=e,c=t&&t.r,d=u.refs===Tt?u.refs={}:u.refs,g=u.setupState;if(c!=null&&c!==f&&(Pt(c)?(d[c]=null,ct(g,c)&&(g[c]=null)):ft(c)&&(c.value=null)),Be(f))Zo(f,u,12,[a,d]);else{const p=Pt(f),v=ft(f);if(p||v){const y=()=>{if(e.f){const k=p?ct(g,f)?g[f]:d[f]:f.value;o?Ae(k)&&Np(k,s):Ae(k)?k.includes(s)||k.push(s):p?(d[f]=[s],ct(g,f)&&(g[f]=d[f])):(f.value=[s],e.k&&(d[e.k]=f.value))}else p?(d[f]=a,ct(g,f)&&(g[f]=a)):v&&(f.value=a,e.k&&(d[e.k]=a))};a?(y.id=-1,dn(y,n)):y()}}}let Ro=!1;const H3=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",j3=e=>e.namespaceURI.includes("MathML"),Ou=e=>{if(H3(e))return"svg";if(j3(e))return"mathml"},Pu=e=>e.nodeType===8;function W3(e){const{mt:t,p:n,o:{patchProp:r,createText:o,nextSibling:s,parentNode:a,remove:u,insert:f,createComment:c}}=e,d=(w,T)=>{if(!T.hasChildNodes()){n(null,w,T),uc(),T._vnode=w;return}Ro=!1,g(T.firstChild,w,null,null,null),uc(),T._vnode=w,Ro&&console.error("Hydration completed but contains mismatches.")},g=(w,T,O,M,F,z=!1)=>{z=z||!!T.dynamicChildren;const U=Pu(w)&&w.data==="[",B=()=>k(w,T,O,M,F,U),{type:q,ref:G,shapeFlag:me,patchFlag:le}=T;let xe=w.nodeType;T.el=w,le===-2&&(z=!1,T.dynamicChildren=null);let se=null;switch(q){case Fs:xe!==3?T.children===""?(f(T.el=o(""),a(w),w),se=w):se=B():(w.data!==T.children&&(Ro=!0,w.data=T.children),se=s(w));break;case Cn:E(w)?(se=s(w),x(T.el=w.content.firstChild,w,O)):xe!==8||U?se=B():se=s(w);break;case Ps:if(U&&(w=s(w),xe=w.nodeType),xe===1||xe===3){se=w;const Se=!T.children.length;for(let ye=0;ye{z=z||!!T.dynamicChildren;const{type:U,props:B,patchFlag:q,shapeFlag:G,dirs:me,transition:le}=T,xe=U==="input"||U==="option";if(xe||q!==-1){me&&Nr(T,null,O,"created");let se=!1;if(E(w)){se=Y1(M,le)&&O&&O.vnode.props&&O.vnode.props.appear;const ye=w.content.firstChild;se&&le.beforeEnter(ye),x(ye,w,O),T.el=w=ye}if(G&16&&!(B&&(B.innerHTML||B.textContent))){let ye=v(w.firstChild,T,w,O,M,F,z);for(;ye;){Ro=!0;const Bt=ye;ye=ye.nextSibling,u(Bt)}}else G&8&&w.textContent!==T.children&&(Ro=!0,w.textContent=T.children);if(B)if(xe||!z||q&48)for(const ye in B)(xe&&(ye.endsWith("value")||ye==="indeterminate")||gl(ye)&&!As(ye)||ye[0]===".")&&r(w,ye,null,B[ye],void 0,void 0,O);else B.onClick&&r(w,"onClick",null,B.onClick,void 0,void 0,O);let Se;(Se=B&&B.onVnodeBeforeMount)&&Pn(Se,O,T),me&&Nr(T,null,O,"beforeMount"),((Se=B&&B.onVnodeMounted)||me||se)&&A1(()=>{Se&&Pn(Se,O,T),se&&le.enter(w),me&&Nr(T,null,O,"mounted")},M)}return w.nextSibling},v=(w,T,O,M,F,z,U)=>{U=U||!!T.dynamicChildren;const B=T.children,q=B.length;for(let G=0;G{const{slotScopeIds:U}=T;U&&(F=F?F.concat(U):U);const B=a(w),q=v(s(w),T,B,O,M,F,z);return q&&Pu(q)&&q.data==="]"?s(T.anchor=q):(Ro=!0,f(T.anchor=c("]"),B,q),q)},k=(w,T,O,M,F,z)=>{if(Ro=!0,T.el=null,z){const q=_(w);for(;;){const G=s(w);if(G&&G!==q)u(G);else break}}const U=s(w),B=a(w);return u(w),n(null,T,B,U,O,M,Ou(B),F),U},_=(w,T="[",O="]")=>{let M=0;for(;w;)if(w=s(w),w&&Pu(w)&&(w.data===T&&M++,w.data===O)){if(M===0)return s(w);M--}return w},x=(w,T,O)=>{const M=T.parentNode;M&&M.replaceChild(w,T);let F=O;for(;F;)F.vnode.el===T&&(F.vnode.el=F.subTree.el=w),F=F.parent},E=w=>w.nodeType===1&&w.tagName.toLowerCase()==="template";return[d,g]}const dn=A1;function K3(e){return J1(e)}function q3(e){return J1(e,W3)}function J1(e,t){const n=Q_();n.__VUE__=!0;const{insert:r,remove:o,patchProp:s,createElement:a,createText:u,createComment:f,setText:c,setElementText:d,parentNode:g,nextSibling:p,setScopeId:v=pr,insertStaticContent:y}=e,k=(A,P,W,re=null,Z=null,fe=null,ve=void 0,ue=null,ce=!!P.dynamicChildren)=>{if(A===P)return;A&&!Cr(A,P)&&(re=te(A),ze(A,Z,fe,!0),A=null),P.patchFlag===-2&&(ce=!1,P.dynamicChildren=null);const{type:ie,ref:we,shapeFlag:Le}=P;switch(ie){case Fs:_(A,P,W,re);break;case Cn:x(A,P,W,re);break;case Ps:A==null&&E(P,W,re,ve);break;case Xe:G(A,P,W,re,Z,fe,ve,ue,ce);break;default:Le&1?O(A,P,W,re,Z,fe,ve,ue,ce):Le&6?me(A,P,W,re,Z,fe,ve,ue,ce):(Le&64||Le&128)&&ie.process(A,P,W,re,Z,fe,ve,ue,ce,Ee)}we!=null&&Z&&gc(we,A&&A.ref,fe,P||A,!P)},_=(A,P,W,re)=>{if(A==null)r(P.el=u(P.children),W,re);else{const Z=P.el=A.el;P.children!==A.children&&c(Z,P.children)}},x=(A,P,W,re)=>{A==null?r(P.el=f(P.children||""),W,re):P.el=A.el},E=(A,P,W,re)=>{[A.el,A.anchor]=y(A.children,P,W,re,A.el,A.anchor)},w=({el:A,anchor:P},W,re)=>{let Z;for(;A&&A!==P;)Z=p(A),r(A,W,re),A=Z;r(P,W,re)},T=({el:A,anchor:P})=>{let W;for(;A&&A!==P;)W=p(A),o(A),A=W;o(P)},O=(A,P,W,re,Z,fe,ve,ue,ce)=>{P.type==="svg"?ve="svg":P.type==="math"&&(ve="mathml"),A==null?M(P,W,re,Z,fe,ve,ue,ce):U(A,P,Z,fe,ve,ue,ce)},M=(A,P,W,re,Z,fe,ve,ue)=>{let ce,ie;const{props:we,shapeFlag:Le,transition:Ce,dirs:Fe}=A;if(ce=A.el=a(A.type,fe,we&&we.is,we),Le&8?d(ce,A.children):Le&16&&z(A.children,ce,null,re,Z,Ed(A,fe),ve,ue),Fe&&Nr(A,null,re,"created"),F(ce,A,A.scopeId,ve,re),we){for(const ot in we)ot!=="value"&&!As(ot)&&s(ce,ot,null,we[ot],fe,A.children,re,Z,Et);"value"in we&&s(ce,"value",null,we.value,fe),(ie=we.onVnodeBeforeMount)&&Pn(ie,re,A)}Fe&&Nr(A,null,re,"beforeMount");const He=Y1(Z,Ce);He&&Ce.beforeEnter(ce),r(ce,P,W),((ie=we&&we.onVnodeMounted)||He||Fe)&&dn(()=>{ie&&Pn(ie,re,A),He&&Ce.enter(ce),Fe&&Nr(A,null,re,"mounted")},Z)},F=(A,P,W,re,Z)=>{if(W&&v(A,W),re)for(let fe=0;fe{for(let ie=ce;ie{const ue=P.el=A.el;let{patchFlag:ce,dynamicChildren:ie,dirs:we}=P;ce|=A.patchFlag&16;const Le=A.props||Tt,Ce=P.props||Tt;let Fe;if(W&&vi(W,!1),(Fe=Ce.onVnodeBeforeUpdate)&&Pn(Fe,W,P,A),we&&Nr(P,A,W,"beforeUpdate"),W&&vi(W,!0),ie?B(A.dynamicChildren,ie,ue,W,re,Ed(P,Z),fe):ve||ye(A,P,ue,null,W,re,Ed(P,Z),fe,!1),ce>0){if(ce&16)q(ue,P,Le,Ce,W,re,Z);else if(ce&2&&Le.class!==Ce.class&&s(ue,"class",null,Ce.class,Z),ce&4&&s(ue,"style",Le.style,Ce.style,Z),ce&8){const He=P.dynamicProps;for(let ot=0;ot{Fe&&Pn(Fe,W,P,A),we&&Nr(P,A,W,"updated")},re)},B=(A,P,W,re,Z,fe,ve)=>{for(let ue=0;ue{if(W!==re){if(W!==Tt)for(const ue in W)!As(ue)&&!(ue in re)&&s(A,ue,W[ue],null,ve,P.children,Z,fe,Et);for(const ue in re){if(As(ue))continue;const ce=re[ue],ie=W[ue];ce!==ie&&ue!=="value"&&s(A,ue,ie,ce,ve,P.children,Z,fe,Et)}"value"in re&&s(A,"value",W.value,re.value,ve)}},G=(A,P,W,re,Z,fe,ve,ue,ce)=>{const ie=P.el=A?A.el:u(""),we=P.anchor=A?A.anchor:u("");let{patchFlag:Le,dynamicChildren:Ce,slotScopeIds:Fe}=P;Fe&&(ue=ue?ue.concat(Fe):Fe),A==null?(r(ie,W,re),r(we,W,re),z(P.children||[],W,we,Z,fe,ve,ue,ce)):Le>0&&Le&64&&Ce&&A.dynamicChildren?(B(A.dynamicChildren,Ce,W,Z,fe,ve,ue),(P.key!=null||Z&&P===Z.subTree)&&ag(A,P,!0)):ye(A,P,W,we,Z,fe,ve,ue,ce)},me=(A,P,W,re,Z,fe,ve,ue,ce)=>{P.slotScopeIds=ue,A==null?P.shapeFlag&512?Z.ctx.activate(P,W,re,ve,ce):le(P,W,re,Z,fe,ve,ce):xe(A,P,ce)},le=(A,P,W,re,Z,fe,ve)=>{const ue=A.component=t4(A,re,Z);if(yl(A)&&(ue.ctx.renderer=Ee),n4(ue),ue.asyncDep){if(Z&&Z.registerDep(ue,se),!A.el){const ce=ue.subTree=L(Cn);x(null,ce,P,W)}}else se(ue,A,P,W,Z,fe,ve)},xe=(A,P,W)=>{const re=P.component=A.component;if(o3(A,P,W))if(re.asyncDep&&!re.asyncResolved){Se(re,P,W);return}else re.next=P,JI(re.update),re.effect.dirty=!0,re.update();else P.el=A.el,re.vnode=P},se=(A,P,W,re,Z,fe,ve)=>{const ue=()=>{if(A.isMounted){let{next:we,bu:Le,u:Ce,parent:Fe,vnode:He}=A;{const Rr=X1(A);if(Rr){we&&(we.el=He.el,Se(A,we,ve)),Rr.asyncDep.then(()=>{A.isUnmounted||ue()});return}}let ot=we,xt;vi(A,!1),we?(we.el=He.el,Se(A,we,ve)):we=He,Le&&$s(Le),(xt=we.props&&we.props.onVnodeBeforeUpdate)&&Pn(xt,Fe,we,He),vi(A,!0);const Ft=bd(A),bn=A.subTree;A.subTree=Ft,k(bn,Ft,g(bn.el),te(bn),A,Z,fe),we.el=Ft.el,ot===null&&eg(A,Ft.el),Ce&&dn(Ce,Z),(xt=we.props&&we.props.onVnodeUpdated)&&dn(()=>Pn(xt,Fe,we,He),Z)}else{let we;const{el:Le,props:Ce}=P,{bm:Fe,m:He,parent:ot}=A,xt=Fi(P);if(vi(A,!1),Fe&&$s(Fe),!xt&&(we=Ce&&Ce.onVnodeBeforeMount)&&Pn(we,ot,P),vi(A,!0),Le&&yt){const Ft=()=>{A.subTree=bd(A),yt(Le,A.subTree,A,Z,null)};xt?P.type.__asyncLoader().then(()=>!A.isUnmounted&&Ft()):Ft()}else{const Ft=A.subTree=bd(A);k(null,Ft,W,re,A,Z,fe),P.el=Ft.el}if(He&&dn(He,Z),!xt&&(we=Ce&&Ce.onVnodeMounted)){const Ft=P;dn(()=>Pn(we,ot,Ft),Z)}(P.shapeFlag&256||ot&&Fi(ot.vnode)&&ot.vnode.shapeFlag&256)&&A.a&&dn(A.a,Z),A.isMounted=!0,P=W=re=null}},ce=A.effect=new Hp(ue,pr,()=>Fc(ie),A.scope),ie=A.update=()=>{ce.dirty&&ce.run()};ie.id=A.uid,vi(A,!0),ie()},Se=(A,P,W)=>{P.component=A;const re=A.vnode.props;A.vnode=P,A.next=null,N3(A,P.props,re,W),V3(A,P.children,W),oi(),Fv(A),ii()},ye=(A,P,W,re,Z,fe,ve,ue,ce=!1)=>{const ie=A&&A.children,we=A?A.shapeFlag:0,Le=P.children,{patchFlag:Ce,shapeFlag:Fe}=P;if(Ce>0){if(Ce&128){Yt(ie,Le,W,re,Z,fe,ve,ue,ce);return}else if(Ce&256){Bt(ie,Le,W,re,Z,fe,ve,ue,ce);return}}Fe&8?(we&16&&Et(ie,Z,fe),Le!==ie&&d(W,Le)):we&16?Fe&16?Yt(ie,Le,W,re,Z,fe,ve,ue,ce):Et(ie,Z,fe,!0):(we&8&&d(W,""),Fe&16&&z(Le,W,re,Z,fe,ve,ue,ce))},Bt=(A,P,W,re,Z,fe,ve,ue,ce)=>{A=A||Cs,P=P||Cs;const ie=A.length,we=P.length,Le=Math.min(ie,we);let Ce;for(Ce=0;Cewe?Et(A,Z,fe,!0,!1,Le):z(P,W,re,Z,fe,ve,ue,ce,Le)},Yt=(A,P,W,re,Z,fe,ve,ue,ce)=>{let ie=0;const we=P.length;let Le=A.length-1,Ce=we-1;for(;ie<=Le&&ie<=Ce;){const Fe=A[ie],He=P[ie]=ce?zo(P[ie]):dr(P[ie]);if(Cr(Fe,He))k(Fe,He,W,null,Z,fe,ve,ue,ce);else break;ie++}for(;ie<=Le&&ie<=Ce;){const Fe=A[Le],He=P[Ce]=ce?zo(P[Ce]):dr(P[Ce]);if(Cr(Fe,He))k(Fe,He,W,null,Z,fe,ve,ue,ce);else break;Le--,Ce--}if(ie>Le){if(ie<=Ce){const Fe=Ce+1,He=FeCe)for(;ie<=Le;)ze(A[ie],Z,fe,!0),ie++;else{const Fe=ie,He=ie,ot=new Map;for(ie=He;ie<=Ce;ie++){const sn=P[ie]=ce?zo(P[ie]):dr(P[ie]);sn.key!=null&&ot.set(sn.key,ie)}let xt,Ft=0;const bn=Ce-He+1;let Rr=!1,ts=0;const Zr=new Array(bn);for(ie=0;ie=bn){ze(sn,Z,fe,!0);continue}let $n;if(sn.key!=null)$n=ot.get(sn.key);else for(xt=He;xt<=Ce;xt++)if(Zr[xt-He]===0&&Cr(sn,P[xt])){$n=xt;break}$n===void 0?ze(sn,Z,fe,!0):(Zr[$n-He]=ie+1,$n>=ts?ts=$n:Rr=!0,k(sn,P[$n],W,null,Z,fe,ve,ue,ce),Ft++)}const ns=Rr?G3(Zr):Cs;for(xt=ns.length-1,ie=bn-1;ie>=0;ie--){const sn=He+ie,$n=P[sn],Bl=sn+1{const{el:fe,type:ve,transition:ue,children:ce,shapeFlag:ie}=A;if(ie&6){Re(A.component.subTree,P,W,re);return}if(ie&128){A.suspense.move(P,W,re);return}if(ie&64){ve.move(A,P,W,Ee);return}if(ve===Xe){r(fe,P,W);for(let Le=0;Leue.enter(fe),Z);else{const{leave:Le,delayLeave:Ce,afterLeave:Fe}=ue,He=()=>r(fe,P,W),ot=()=>{Le(fe,()=>{He(),Fe&&Fe()})};Ce?Ce(fe,He,ot):ot()}else r(fe,P,W)},ze=(A,P,W,re=!1,Z=!1)=>{const{type:fe,props:ve,ref:ue,children:ce,dynamicChildren:ie,shapeFlag:we,patchFlag:Le,dirs:Ce}=A;if(ue!=null&&gc(ue,null,W,A,!0),we&256){P.ctx.deactivate(A);return}const Fe=we&1&&Ce,He=!Fi(A);let ot;if(He&&(ot=ve&&ve.onVnodeBeforeUnmount)&&Pn(ot,P,A),we&6)yn(A.component,W,re);else{if(we&128){A.suspense.unmount(W,re);return}Fe&&Nr(A,null,P,"beforeUnmount"),we&64?A.type.remove(A,P,W,Z,Ee,re):ie&&(fe!==Xe||Le>0&&Le&64)?Et(ie,P,W,!1,!0):(fe===Xe&&Le&384||!Z&&we&16)&&Et(ce,P,W),re&&Ut(A)}(He&&(ot=ve&&ve.onVnodeUnmounted)||Fe)&&dn(()=>{ot&&Pn(ot,P,A),Fe&&Nr(A,null,P,"unmounted")},W)},Ut=A=>{const{type:P,el:W,anchor:re,transition:Z}=A;if(P===Xe){zt(W,re);return}if(P===Ps){T(A);return}const fe=()=>{o(W),Z&&!Z.persisted&&Z.afterLeave&&Z.afterLeave()};if(A.shapeFlag&1&&Z&&!Z.persisted){const{leave:ve,delayLeave:ue}=Z,ce=()=>ve(W,fe);ue?ue(A.el,fe,ce):ce()}else fe()},zt=(A,P)=>{let W;for(;A!==P;)W=p(A),o(A),A=W;o(P)},yn=(A,P,W)=>{const{bum:re,scope:Z,update:fe,subTree:ve,um:ue}=A;re&&$s(re),Z.stop(),fe&&(fe.active=!1,ze(ve,A,P,W)),ue&&dn(ue,P),dn(()=>{A.isUnmounted=!0},P),P&&P.pendingBranch&&!P.isUnmounted&&A.asyncDep&&!A.asyncResolved&&A.suspenseId===P.pendingId&&(P.deps--,P.deps===0&&P.resolve())},Et=(A,P,W,re=!1,Z=!1,fe=0)=>{for(let ve=fe;veA.shapeFlag&6?te(A.component.subTree):A.shapeFlag&128?A.suspense.next():p(A.anchor||A.el);let be=!1;const he=(A,P,W)=>{A==null?P._vnode&&ze(P._vnode,null,null,!0):k(P._vnode||null,A,P,null,null,null,W),be||(be=!0,Fv(),uc(),be=!1),P._vnode=A},Ee={p:k,um:ze,m:Re,r:Ut,mt:le,mc:z,pc:ye,pbc:B,n:te,o:e};let rt,yt;return t&&([rt,yt]=t(Ee)),{render:he,hydrate:rt,createApp:B3(he,rt)}}function Ed({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function vi({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Y1(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ag(e,t,n=!1){const r=e.children,o=t.children;if(Ae(r)&&Ae(o))for(let s=0;s>1,e[n[u]]0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,a=n[s-1];s-- >0;)n[s]=a,a=t[a];return n}function X1(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:X1(t)}const Z3=e=>e.__isTeleport,Ba=e=>e&&(e.disabled||e.disabled===""),Jv=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Yv=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Rh=(e,t)=>{const n=e&&e.to;return Pt(n)?t?t(n):null:n},J3={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,s,a,u,f,c){const{mc:d,pc:g,pbc:p,o:{insert:v,querySelector:y,createText:k,createComment:_}}=c,x=Ba(t.props);let{shapeFlag:E,children:w,dynamicChildren:T}=t;if(e==null){const O=t.el=k(""),M=t.anchor=k("");v(O,n,r),v(M,n,r);const F=t.target=Rh(t.props,y),z=t.targetAnchor=k("");F&&(v(z,F),a==="svg"||Jv(F)?a="svg":(a==="mathml"||Yv(F))&&(a="mathml"));const U=(B,q)=>{E&16&&d(w,B,q,o,s,a,u,f)};x?U(n,M):F&&U(F,z)}else{t.el=e.el;const O=t.anchor=e.anchor,M=t.target=e.target,F=t.targetAnchor=e.targetAnchor,z=Ba(e.props),U=z?n:M,B=z?O:F;if(a==="svg"||Jv(M)?a="svg":(a==="mathml"||Yv(M))&&(a="mathml"),T?(p(e.dynamicChildren,T,U,o,s,a,u),ag(e,t,!0)):f||g(e,t,U,B,o,s,a,u,!1),x)z?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Mu(t,n,O,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const q=t.target=Rh(t.props,y);q&&Mu(t,q,null,c,0)}else z&&Mu(t,M,F,c,1)}ew(t)},remove(e,t,n,r,{um:o,o:{remove:s}},a){const{shapeFlag:u,children:f,anchor:c,targetAnchor:d,target:g,props:p}=e;if(g&&s(d),a&&s(c),u&16){const v=a||!Ba(p);for(let y=0;y0?gr||Cs:null,tw(),Ns>0&&gr&&gr.push(e),e}function J(e,t,n,r,o,s){return nw(R(e,t,n,r,o,s,!0))}function $e(e,t,n,r,o){return nw(L(e,t,n,r,o,!0))}function Us(e){return e?e.__v_isVNode===!0:!1}function Cr(e,t){return e.type===t.type&&e.key===t.key}const rw=({key:e})=>e??null,Yu=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Pt(e)||ft(e)||Be(e)?{i:Gt,r:e,k:t,f:!!n}:e:null);function R(e,t=null,n=null,r=0,o=null,s=e===Xe?0:1,a=!1,u=!1){const f={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&rw(t),ref:t&&Yu(t),scopeId:Uc,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Gt};return u?(lg(f,n),s&128&&e.normalize(f)):n&&(f.shapeFlag|=Pt(n)?8:16),Ns>0&&!a&&gr&&(f.patchFlag>0||s&6)&&f.patchFlag!==32&&gr.push(f),f}const L=X3;function X3(e,t=null,n=null,r=0,o=null,s=!1){if((!e||e===E1)&&(e=Cn),Us(e)){const u=vr(e,t,!0);return n&&lg(u,n),Ns>0&&!s&&gr&&(u.shapeFlag&6?gr[gr.indexOf(e)]=u:gr.push(u)),u.patchFlag|=-2,u}if(i4(e)&&(e=e.__vccOpts),t){t=zs(t);let{class:u,style:f}=t;u&&!Pt(u)&&(t.class=ae(u)),kt(f)&&(g1(f)&&!Ae(f)&&(f=Zt({},f)),t.style=zi(f))}const a=Pt(e)?1:T1(e)?128:Z3(e)?64:kt(e)?4:Be(e)?2:0;return R(e,t,n,r,o,a,s,!0)}function zs(e){return e?g1(e)||j1(e)?Zt({},e):e:null}function vr(e,t,n=!1){const{props:r,ref:o,patchFlag:s,children:a}=e,u=t?lt(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&rw(u),ref:t&&t.ref?n&&o?Ae(o)?o.concat(Yu(t)):[o,Yu(t)]:Yu(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Xe?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&vr(e.ssContent),ssFallback:e.ssFallback&&vr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function de(e=" ",t=0){return L(Fs,null,e,t)}function Lh(e,t){const n=L(Ps,null,e);return n.staticCount=t,n}function Ie(e="",t=!1){return t?(H(),$e(Cn,null,e)):L(Cn,null,e)}function dr(e){return e==null||typeof e=="boolean"?L(Cn):Ae(e)?L(Xe,null,e.slice()):typeof e=="object"?zo(e):L(Fs,null,String(e))}function zo(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:vr(e)}function lg(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Ae(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),lg(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!j1(t)?t._ctx=Gt:o===3&&Gt&&(Gt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Be(t)?(t={default:t,_ctx:Gt},n=32):(t=String(t),r&64?(n=16,t=[de(t)]):n=8);e.children=t,e.shapeFlag|=n}function lt(...e){const t={};for(let n=0;nen||Gt;let mc,Oh;{const e=Q_(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),s=>{o.length>1?o.forEach(a=>a(s)):o[0](s)}};mc=t("__VUE_INSTANCE_SETTERS__",n=>en=n),Oh=t("__VUE_SSR_SETTERS__",n=>wl=n)}const Hi=e=>{const t=en;return mc(e),e.scope.on(),()=>{e.scope.off(),mc(t)}},Ph=()=>{en&&en.scope.off(),mc(null)};function ow(e){return e.vnode.shapeFlag&4}let wl=!1;function n4(e,t=!1){t&&Oh(t);const{props:n,children:r}=e.vnode,o=ow(e);F3(e,n,o,t),z3(e,r);const s=o?r4(e,t):void 0;return t&&Oh(!1),s}function r4(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,T3);const{setup:r}=n;if(r){const o=e.setupContext=r.length>1?sw(e):null,s=Hi(e);oi();const a=Zo(r,e,0,[e.props,o]);if(ii(),s(),Up(a)){if(a.then(Ph,Ph),t)return a.then(u=>{Mh(e,u,t)}).catch(u=>{Gs(u,e,0)});e.asyncDep=a}else Mh(e,a,t)}else iw(e,t)}function Mh(e,t,n){Be(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:kt(t)&&(e.setupState=y1(t)),iw(e,n)}let Qv;function iw(e,t,n){const r=e.type;if(!e.render){if(!t&&Qv&&!r.render){const o=r.template||og(e).template;if(o){const{isCustomElement:s,compilerOptions:a}=e.appContext.config,{delimiters:u,compilerOptions:f}=r,c=Zt(Zt({isCustomElement:s,delimiters:u},a),f);r.render=Qv(o,c)}}e.render=r.render||pr}{const o=Hi(e);oi();try{R3(e)}finally{ii(),o()}}}const o4={get(e,t){return Fn(e,"get",""),e[t]}};function sw(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,o4),slots:e.slots,emit:e.emit,expose:t}}function Vc(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(y1(Jp(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Da)return Da[n](e)},has(t,n){return n in t||n in Da}}))}function Dh(e,t=!0){return Be(e)?e.displayName||e.name:e.name||t&&e.__name}function i4(e){return Be(e)&&"__vccOpts"in e}const N=(e,t)=>zI(e,t,wl);function si(e,t,n=Tt){const r=nr(),o=$r(t),s=Ji(t),a=b1((f,c)=>{let d;return p3(()=>{const g=e[t];qr(d,g)&&(d=g,c())}),{get(){return f(),n.get?n.get(d):d},set(g){const p=r.vnode.props;!(p&&(t in p||o in p||s in p)&&(`onUpdate:${t}`in p||`onUpdate:${o}`in p||`onUpdate:${s}`in p))&&qr(g,d)&&(d=g,c()),r.emit(`update:${t}`,n.set?n.set(g):g)}}}),u=t==="modelValue"?"modelModifiers":`${t}Modifiers`;return a[Symbol.iterator]=()=>{let f=0;return{next(){return f<2?{value:f++?e[u]||{}:a,done:!1}:{done:!0}}}},a}function Ye(e,t,n){const r=arguments.length;return r===2?kt(t)&&!Ae(t)?Us(t)?L(e,null,[t]):L(e,t):L(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Us(n)&&(n=[n]),L(e,t,n))}const aw="3.4.23";/** +* @vue/runtime-dom v3.4.23 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/const s4="http://www.w3.org/2000/svg",a4="http://www.w3.org/1998/Math/MathML",Vo=typeof document<"u"?document:null,ey=Vo&&Vo.createElement("template"),l4={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?Vo.createElementNS(s4,e):t==="mathml"?Vo.createElementNS(a4,e):Vo.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Vo.createTextNode(e),createComment:e=>Vo.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Vo.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,s){const a=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===s||!(o=o.nextSibling)););else{ey.innerHTML=r==="svg"?`${e}`:r==="mathml"?`${e}`:e;const u=ey.content;if(r==="svg"||r==="mathml"){const f=u.firstChild;for(;f.firstChild;)u.appendChild(f.firstChild);u.removeChild(f)}t.insertBefore(u,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Lo="transition",ya="animation",Xa=Symbol("_vtc"),Zs=(e,{slots:t})=>Ye(y3,u4(e),t);Zs.displayName="Transition";const lw={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};Zs.props=Zt({},R1,lw);const yi=(e,t=[])=>{Ae(e)?e.forEach(n=>n(...t)):e&&e(...t)},ty=e=>e?Ae(e)?e.some(t=>t.length>1):e.length>1:!1;function u4(e){const t={};for(const G in e)G in lw||(t[G]=e[G]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:u=`${n}-enter-to`,appearFromClass:f=s,appearActiveClass:c=a,appearToClass:d=u,leaveFromClass:g=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:v=`${n}-leave-to`}=e,y=c4(o),k=y&&y[0],_=y&&y[1],{onBeforeEnter:x,onEnter:E,onEnterCancelled:w,onLeave:T,onLeaveCancelled:O,onBeforeAppear:M=x,onAppear:F=E,onAppearCancelled:z=w}=t,U=(G,me,le)=>{bi(G,me?d:u),bi(G,me?c:a),le&&le()},B=(G,me)=>{G._isLeaving=!1,bi(G,g),bi(G,v),bi(G,p),me&&me()},q=G=>(me,le)=>{const xe=G?F:E,se=()=>U(me,G,le);yi(xe,[me,se]),ny(()=>{bi(me,G?f:s),Oo(me,G?d:u),ty(xe)||ry(me,r,k,se)})};return Zt(t,{onBeforeEnter(G){yi(x,[G]),Oo(G,s),Oo(G,a)},onBeforeAppear(G){yi(M,[G]),Oo(G,f),Oo(G,c)},onEnter:q(!1),onAppear:q(!0),onLeave(G,me){G._isLeaving=!0;const le=()=>B(G,me);Oo(G,g),h4(),Oo(G,p),ny(()=>{G._isLeaving&&(bi(G,g),Oo(G,v),ty(T)||ry(G,r,_,le))}),yi(T,[G,le])},onEnterCancelled(G){U(G,!1),yi(w,[G])},onAppearCancelled(G){U(G,!0),yi(z,[G])},onLeaveCancelled(G){B(G),yi(O,[G])}})}function c4(e){if(e==null)return null;if(kt(e))return[Cd(e.enter),Cd(e.leave)];{const t=Cd(e);return[t,t]}}function Cd(e){return X_(e)}function Oo(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Xa]||(e[Xa]=new Set)).add(t)}function bi(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Xa];n&&(n.delete(t),n.size||(e[Xa]=void 0))}function ny(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let f4=0;function ry(e,t,n,r){const o=e._endId=++f4,s=()=>{o===e._endId&&r()};if(n)return setTimeout(s,n);const{type:a,timeout:u,propCount:f}=d4(e,t);if(!a)return r();const c=a+"end";let d=0;const g=()=>{e.removeEventListener(c,p),s()},p=v=>{v.target===e&&++d>=f&&g()};setTimeout(()=>{d(n[y]||"").split(", "),o=r(`${Lo}Delay`),s=r(`${Lo}Duration`),a=oy(o,s),u=r(`${ya}Delay`),f=r(`${ya}Duration`),c=oy(u,f);let d=null,g=0,p=0;t===Lo?a>0&&(d=Lo,g=a,p=s.length):t===ya?c>0&&(d=ya,g=c,p=f.length):(g=Math.max(a,c),d=g>0?a>c?Lo:ya:null,p=d?d===Lo?s.length:f.length:0);const v=d===Lo&&/\b(transform|all)(,|$)/.test(r(`${Lo}Property`).toString());return{type:d,timeout:g,propCount:p,hasTransform:v}}function oy(e,t){for(;e.lengthiy(n)+iy(e[r])))}function iy(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function h4(){return document.body.offsetHeight}function p4(e,t,n){const r=e[Xa];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const vc=Symbol("_vod"),uw=Symbol("_vsh"),Bj={beforeMount(e,{value:t},{transition:n}){e[vc]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):ba(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),ba(e,!0),r.enter(e)):r.leave(e,()=>{ba(e,!1)}):ba(e,t))},beforeUnmount(e,{value:t}){ba(e,t)}};function ba(e,t){e.style.display=t?e[vc]:"none",e[uw]=!t}const cw=Symbol("");function Fj(e){const t=nr();if(!t)return;const n=t.ut=(o=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(s=>Fh(s,o))},r=()=>{const o=e(t.proxy);Bh(t.subTree,o),n(o)};ut(()=>{h3(r);const o=new MutationObserver(r);o.observe(t.subTree.el.parentNode,{childList:!0}),Kt(()=>o.disconnect())})}function Bh(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Bh(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Fh(e.el,t);else if(e.type===Xe)e.children.forEach(n=>Bh(n,t));else if(e.type===Ps){let{el:n,anchor:r}=e;for(;n&&(Fh(n,t),n!==r);)n=n.nextSibling}}function Fh(e,t){if(e.nodeType===1){const n=e.style;let r="";for(const o in t)n.setProperty(`--${o}`,t[o]),r+=`--${o}: ${t[o]};`;n[cw]=r}}const g4=/(^|;)\s*display\s*:/;function m4(e,t,n){const r=e.style,o=Pt(n);let s=!1;if(n&&!o){if(t)if(Pt(t))for(const a of t.split(";")){const u=a.slice(0,a.indexOf(":")).trim();n[u]==null&&Xu(r,u,"")}else for(const a in t)n[a]==null&&Xu(r,a,"");for(const a in n)a==="display"&&(s=!0),Xu(r,a,n[a])}else if(o){if(t!==n){const a=r[cw];a&&(n+=";"+a),r.cssText=n,s=g4.test(n)}}else t&&e.removeAttribute("style");vc in e&&(e[vc]=s?r.display:"",e[uw]&&(r.display="none"))}const sy=/\s*!important$/;function Xu(e,t,n){if(Ae(n))n.forEach(r=>Xu(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=v4(e,t);sy.test(n)?e.setProperty(Ji(r),n.replace(sy,""),"important"):e[r]=n}}const ay=["Webkit","Moz","ms"],Td={};function v4(e,t){const n=Td[t];if(n)return n;let r=$r(t);if(r!=="filter"&&r in e)return Td[t]=r;r=Mc(r);for(let o=0;oAd||(k4.then(()=>Ad=0),Ad=Date.now());function E4(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;mr(C4(r,n.value),t,5,[r])};return n.value=e,n.attached=S4(),n}function C4(e,t){if(Ae(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const fy=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,T4=(e,t,n,r,o,s,a,u,f)=>{const c=o==="svg";t==="class"?p4(e,r,c):t==="style"?m4(e,n,r):gl(t)?Fp(t)||w4(e,t,n,r,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):A4(e,t,r,c))?b4(e,t,r,s,a,u,f):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),y4(e,t,r,c))};function A4(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&fy(t)&&Be(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return fy(t)&&Pt(n)?!1:t in e}const yc=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ae(t)?n=>$s(t,n):t};function $4(e){e.target.composing=!0}function dy(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ms=Symbol("_assign"),I4={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e[Ms]=yc(o);const s=r||o.props&&o.props.type==="number";Ti(e,t?"change":"input",a=>{if(a.target.composing)return;let u=e.value;n&&(u=u.trim()),s&&(u=yh(u)),e[Ms](u)}),n&&Ti(e,"change",()=>{e.value=e.value.trim()}),t||(Ti(e,"compositionstart",$4),Ti(e,"compositionend",dy),Ti(e,"change",dy))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:o}},s){if(e[Ms]=yc(s),e.composing)return;const a=(o||e.type==="number")&&!/^0\d/.test(e.value)?yh(e.value):e.value,u=t??"";a!==u&&(document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===u)||(e.value=u))}},R4={deep:!0,created(e,t,n){e[Ms]=yc(n),Ti(e,"change",()=>{const r=e._modelValue,o=L4(e),s=e.checked,a=e[Ms];if(Ae(r)){const u=t1(r,o),f=u!==-1;if(s&&!f)a(r.concat(o));else if(!s&&f){const c=[...r];c.splice(u,1),a(c)}}else if(Oc(r)){const u=new Set(r);s?u.add(o):u.delete(o),a(u)}else a(fw(e,s))})},mounted:hy,beforeUpdate(e,t,n){e[Ms]=yc(n),hy(e,t,n)}};function hy(e,{value:t,oldValue:n},r){e._modelValue=t,Ae(t)?e.checked=t1(t,r.props.value)>-1:Oc(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=Dc(t,fw(e,!0)))}function L4(e){return"_value"in e?e._value:e.value}function fw(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const O4=["ctrl","shift","alt","meta"],P4={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>O4.some(n=>e[`${n}Key`]&&!t.includes(n))},Qu=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...s)=>{for(let a=0;a{const t=M4().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=pw(r);if(!o)return;const s=t._component;!Be(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.innerHTML="";const a=n(o,!1,hw(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),a},t},F4=(...e)=>{const t=D4().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=pw(r);if(o)return n(o,!0,hw(o))},t};function hw(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function pw(e){return Pt(e)?document.querySelector(e):e}const N4=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,U4=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,z4=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function V4(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){H4(e);return}return t}function H4(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function Qa(e,t={}){if(typeof e!="string")return e;const n=e.trim();if(e[0]==='"'&&e.endsWith('"')&&!e.includes("\\"))return n.slice(1,-1);if(n.length<=9){const r=n.toLowerCase();if(r==="true")return!0;if(r==="false")return!1;if(r==="undefined")return;if(r==="null")return null;if(r==="nan")return Number.NaN;if(r==="infinity")return Number.POSITIVE_INFINITY;if(r==="-infinity")return Number.NEGATIVE_INFINITY}if(!z4.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(N4.test(e)||U4.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,V4)}return JSON.parse(e)}catch(r){if(t.strict)throw r;return e}}const j4=/#/g,W4=/&/g,K4=/\//g,q4=/=/g,ug=/\+/g,G4=/%5e/gi,Z4=/%60/gi,J4=/%7c/gi,Y4=/%20/gi;function X4(e){return encodeURI(""+e).replace(J4,"|")}function Nh(e){return X4(typeof e=="string"?e:JSON.stringify(e)).replace(ug,"%2B").replace(Y4,"+").replace(j4,"%23").replace(W4,"%26").replace(Z4,"`").replace(G4,"^").replace(K4,"%2F")}function $d(e){return Nh(e).replace(q4,"%3D")}function bc(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function Q4(e){return bc(e.replace(ug," "))}function eR(e){return bc(e.replace(ug," "))}function gw(e=""){const t={};e[0]==="?"&&(e=e.slice(1));for(const n of e.split("&")){const r=n.match(/([^=]+)=?(.*)/)||[];if(r.length<2)continue;const o=Q4(r[1]);if(o==="__proto__"||o==="constructor")continue;const s=eR(r[2]||"");t[o]===void 0?t[o]=s:Array.isArray(t[o])?t[o].push(s):t[o]=[t[o],s]}return t}function tR(e,t){return(typeof t=="number"||typeof t=="boolean")&&(t=String(t)),t?Array.isArray(t)?t.map(n=>`${$d(e)}=${Nh(n)}`).join("&"):`${$d(e)}=${Nh(t)}`:$d(e)}function nR(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>tR(t,e[t])).filter(Boolean).join("&")}const rR=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,oR=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,iR=/^([/\\]\s*){2,}[^/\\]/,sR=/^[\s\0]*(blob|data|javascript|vbscript):$/i,aR=/\/$|\/\?|\/#/,lR=/^\.?\//;function ai(e,t={}){return typeof t=="boolean"&&(t={acceptRelative:t}),t.strict?rR.test(e):oR.test(e)||(t.acceptRelative?iR.test(e):!1)}function uR(e){return!!e&&sR.test(e)}function Uh(e="",t){return t?aR.test(e):e.endsWith("/")}function cg(e="",t){if(!t)return(Uh(e)?e.slice(0,-1):e)||"/";if(!Uh(e,!0))return e||"/";let n=e,r="";const o=e.indexOf("#");o>=0&&(n=e.slice(0,o),r=e.slice(o));const[s,...a]=n.split("?");return((s.endsWith("/")?s.slice(0,-1):s)||"/")+(a.length>0?`?${a.join("?")}`:"")+r}function _c(e="",t){if(!t)return e.endsWith("/")?e:e+"/";if(Uh(e,!0))return e||"/";let n=e,r="";const o=e.indexOf("#");if(o>=0&&(n=e.slice(0,o),r=e.slice(o),!n))return r;const[s,...a]=n.split("?");return s+"/"+(a.length>0?`?${a.join("?")}`:"")+r}function cR(e=""){return e.startsWith("/")}function gy(e=""){return cR(e)?e:"/"+e}function fR(e,t){if(vw(t)||ai(e))return e;const n=cg(t);return e.startsWith(n)?e:Hc(n,e)}function my(e,t){if(vw(t))return e;const n=cg(t);if(!e.startsWith(n))return e;const r=e.slice(n.length);return r[0]==="/"?r:"/"+r}function mw(e,t){const n=xl(e),r={...gw(n.search),...t};return n.search=nR(r),pR(n)}function vw(e){return!e||e==="/"}function dR(e){return e&&e!=="/"}function Hc(e,...t){let n=e||"";for(const r of t.filter(o=>dR(o)))if(n){const o=r.replace(lR,"");n=_c(n)+o}else n=r;return n}function yw(...e){var a,u,f,c;const t=/\/(?!\/)/,n=e.filter(Boolean),r=[];let o=0;for(const d of n)if(!(!d||d==="/")){for(const[g,p]of d.split(t).entries())if(!(!p||p===".")){if(p===".."){if(r.length===1&&ai(r[0]))continue;r.pop(),o--;continue}if(g===1&&((a=r[r.length-1])!=null&&a.endsWith(":/"))){r[r.length-1]+="/"+p;continue}r.push(p),o++}}let s=r.join("/");return o>=0?(u=n[0])!=null&&u.startsWith("/")&&!s.startsWith("/")?s="/"+s:(f=n[0])!=null&&f.startsWith("./")&&!s.startsWith("./")&&(s="./"+s):s="../".repeat(-1*o)+s,(c=n[n.length-1])!=null&&c.endsWith("/")&&!s.endsWith("/")&&(s+="/"),s}function hR(e,t,n={}){return n.trailingSlash||(e=_c(e),t=_c(t)),n.leadingSlash||(e=gy(e),t=gy(t)),n.encoding||(e=bc(e),t=bc(t)),e===t}const bw=Symbol.for("ufo:protocolRelative");function xl(e="",t){const n=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){const[,g,p=""]=n;return{protocol:g.toLowerCase(),pathname:p,href:g+p,auth:"",host:"",search:"",hash:""}}if(!ai(e,{acceptRelative:!0}))return t?xl(t+e):vy(e);const[,r="",o,s=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,a="",u=""]=s.match(/([^#/?]*)(.*)?/)||[],{pathname:f,search:c,hash:d}=vy(u.replace(/\/(?=[A-Za-z]:)/,""));return{protocol:r.toLowerCase(),auth:o?o.slice(0,Math.max(0,o.length-1)):"",host:a,pathname:f,search:c,hash:d,[bw]:!r}}function vy(e=""){const[t="",n="",r=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}function pR(e){const t=e.pathname||"",n=e.search?(e.search.startsWith("?")?"":"?")+e.search:"",r=e.hash||"",o=e.auth?e.auth+"@":"",s=e.host||"";return(e.protocol||e[bw]?(e.protocol||"")+"//":"")+o+s+t+n+r}class gR extends Error{constructor(t,n){super(t,n),this.name="FetchError",n!=null&&n.cause&&!this.cause&&(this.cause=n.cause)}}function mR(e){var f,c,d,g,p;const t=((f=e.error)==null?void 0:f.message)||((c=e.error)==null?void 0:c.toString())||"",n=((d=e.request)==null?void 0:d.method)||((g=e.options)==null?void 0:g.method)||"GET",r=((p=e.request)==null?void 0:p.url)||String(e.request)||"/",o=`[${n}] ${JSON.stringify(r)}`,s=e.response?`${e.response.status} ${e.response.statusText}`:"",a=`${o}: ${s}${t?` ${t}`:""}`,u=new gR(a,e.error?{cause:e.error}:void 0);for(const v of["request","options","response"])Object.defineProperty(u,v,{get(){return e[v]}});for(const[v,y]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(u,v,{get(){return e.response&&e.response[y]}});return u}const vR=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function yy(e="GET"){return vR.has(e.toUpperCase())}function yR(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}const bR=new Set(["image/svg","application/xml","application/xhtml","application/html"]),_R=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function wR(e=""){if(!e)return"json";const t=e.split(";").shift()||"";return _R.test(t)?"json":bR.has(t)||t.startsWith("text/")?"text":"blob"}function xR(e,t,n=globalThis.Headers){const r={...t,...e};if(t!=null&&t.params&&(e!=null&&e.params)&&(r.params={...t==null?void 0:t.params,...e==null?void 0:e.params}),t!=null&&t.query&&(e!=null&&e.query)&&(r.query={...t==null?void 0:t.query,...e==null?void 0:e.query}),t!=null&&t.headers&&(e!=null&&e.headers)){r.headers=new n((t==null?void 0:t.headers)||{});for(const[o,s]of new n((e==null?void 0:e.headers)||{}))r.headers.set(o,s)}return r}const kR=new Set([408,409,425,429,500,502,503,504]),SR=new Set([101,204,205,304]);function _w(e={}){const{fetch:t=globalThis.fetch,Headers:n=globalThis.Headers,AbortController:r=globalThis.AbortController}=e;async function o(u){const f=u.error&&u.error.name==="AbortError"&&!u.options.timeout||!1;if(u.options.retry!==!1&&!f){let d;typeof u.options.retry=="number"?d=u.options.retry:d=yy(u.options.method)?0:1;const g=u.response&&u.response.status||500;if(d>0&&(Array.isArray(u.options.retryStatusCodes)?u.options.retryStatusCodes.includes(g):kR.has(g))){const p=u.options.retryDelay||0;return p>0&&await new Promise(v=>setTimeout(v,p)),s(u.request,{...u.options,retry:d-1})}}const c=mR(u);throw Error.captureStackTrace&&Error.captureStackTrace(c,s),c}const s=async function(f,c={}){var v;const d={request:f,options:xR(c,e.defaults,n),response:void 0,error:void 0};d.options.method=(v=d.options.method)==null?void 0:v.toUpperCase(),d.options.onRequest&&await d.options.onRequest(d),typeof d.request=="string"&&(d.options.baseURL&&(d.request=fR(d.request,d.options.baseURL)),(d.options.query||d.options.params)&&(d.request=mw(d.request,{...d.options.params,...d.options.query}))),d.options.body&&yy(d.options.method)&&(yR(d.options.body)?(d.options.body=typeof d.options.body=="string"?d.options.body:JSON.stringify(d.options.body),d.options.headers=new n(d.options.headers||{}),d.options.headers.has("content-type")||d.options.headers.set("content-type","application/json"),d.options.headers.has("accept")||d.options.headers.set("accept","application/json")):("pipeTo"in d.options.body&&typeof d.options.body.pipeTo=="function"||typeof d.options.body.pipe=="function")&&("duplex"in d.options||(d.options.duplex="half")));let g;if(!d.options.signal&&d.options.timeout){const y=new r;g=setTimeout(()=>y.abort(),d.options.timeout),d.options.signal=y.signal}try{d.response=await t(d.request,d.options)}catch(y){return d.error=y,d.options.onRequestError&&await d.options.onRequestError(d),await o(d)}finally{g&&clearTimeout(g)}if(d.response.body&&!SR.has(d.response.status)&&d.options.method!=="HEAD"){const y=(d.options.parseResponse?"json":d.options.responseType)||wR(d.response.headers.get("content-type")||"");switch(y){case"json":{const k=await d.response.text(),_=d.options.parseResponse||Qa;d.response._data=_(k);break}case"stream":{d.response._data=d.response.body;break}default:d.response._data=await d.response[y]()}}return d.options.onResponse&&await d.options.onResponse(d),!d.options.ignoreResponseError&&d.response.status>=400&&d.response.status<600?(d.options.onResponseError&&await d.options.onResponseError(d),await o(d)):d.response},a=async function(f,c){return(await s(f,c))._data};return a.raw=s,a.native=(...u)=>t(...u),a.create=(u={})=>_w({...e,defaults:{...e.defaults,...u}}),a}const fg=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}(),ER=fg.fetch||(()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!"))),CR=fg.Headers,TR=fg.AbortController,AR=_w({fetch:ER,Headers:CR,AbortController:TR}),$R=AR,IR=()=>{var e;return((e=window==null?void 0:window.__NUXT__)==null?void 0:e.config)||{}},wc=IR().app,RR=()=>wc.baseURL,LR=()=>wc.buildAssetsDir,OR=(...e)=>yw(ww(),LR(),...e),ww=(...e)=>{const t=wc.cdnURL||wc.baseURL;return e.length?yw(t,...e):t};globalThis.__buildAssetsURL=OR,globalThis.__publicAssetsURL=ww;globalThis.$fetch||(globalThis.$fetch=$R.create({baseURL:RR()}));function zh(e,t={},n){for(const r in e){const o=e[r],s=n?`${n}:${r}`:r;typeof o=="object"&&o!==null?zh(o,t,s):typeof o=="function"&&(t[s]=o)}return t}const PR={run:e=>e()},MR=()=>PR,xw=typeof console.createTask<"u"?console.createTask:MR;function DR(e,t){const n=t.shift(),r=xw(n);return e.reduce((o,s)=>o.then(()=>r.run(()=>s(...t))),Promise.resolve())}function BR(e,t){const n=t.shift(),r=xw(n);return Promise.all(e.map(o=>r.run(()=>o(...t))))}function Id(e,t){for(const n of[...e])n(t)}class FR{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,n,r={}){if(!t||typeof n!="function")return()=>{};const o=t;let s;for(;this._deprecatedHooks[t];)s=this._deprecatedHooks[t],t=s.to;if(s&&!r.allowDeprecated){let a=s.message;a||(a=`${o} hook has been deprecated`+(s.to?`, please use ${s.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(a)||(console.warn(a),this._deprecatedMessages.add(a))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=void 0)}}hookOnce(t,n){let r,o=(...s)=>(typeof r=="function"&&r(),r=void 0,o=void 0,n(...s));return r=this.hook(t,o),r}removeHook(t,n){if(this._hooks[t]){const r=this._hooks[t].indexOf(n);r!==-1&&this._hooks[t].splice(r,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const r=this._hooks[t]||[];delete this._hooks[t];for(const o of r)this.hook(t,o)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=zh(t),r=Object.keys(n).map(o=>this.hook(o,n[o]));return()=>{for(const o of r.splice(0,r.length))o()}}removeHooks(t){const n=zh(t);for(const r in n)this.removeHook(r,n[r])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...n){return n.unshift(t),this.callHookWith(DR,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(BR,t,...n)}callHookWith(t,n,...r){const o=this._before||this._after?{name:n,args:r,context:{}}:void 0;this._before&&Id(this._before,o);const s=t(n in this._hooks?[...this._hooks[n]]:[],r);return s instanceof Promise?s.finally(()=>{this._after&&o&&Id(this._after,o)}):(this._after&&o&&Id(this._after,o),s)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}}function kw(){return new FR}function NR(e={}){let t,n=!1;const r=a=>{if(t&&t!==a)throw new Error("Context conflict")};let o;if(e.asyncContext){const a=e.AsyncLocalStorage||globalThis.AsyncLocalStorage;a?o=new a:console.warn("[unctx] `AsyncLocalStorage` is not provided.")}const s=()=>{if(o&&t===void 0){const a=o.getStore();if(a!==void 0)return a}return t};return{use:()=>{const a=s();if(a===void 0)throw new Error("Context is not available");return a},tryUse:()=>s(),set:(a,u)=>{u||r(a),t=a,n=!0},unset:()=>{t=void 0,n=!1},call:(a,u)=>{r(a),t=a;try{return o?o.run(a,u):u()}finally{n||(t=void 0)}},async callAsync(a,u){t=a;const f=()=>{t=a},c=()=>t===a?f:void 0;Vh.add(c);try{const d=o?o.run(a,u):u();return n||(t=void 0),await d}finally{Vh.delete(c)}}}}function UR(e={}){const t={};return{get(n,r={}){return t[n]||(t[n]=NR({...e,...r})),t[n],t[n]}}}const xc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof global<"u"?global:typeof window<"u"?window:{},by="__unctx__",zR=xc[by]||(xc[by]=UR()),VR=(e,t={})=>zR.get(e,t),_y="__unctx_async_handlers__",Vh=xc[_y]||(xc[_y]=new Set);function el(e){const t=[];for(const o of Vh){const s=o();s&&t.push(s)}const n=()=>{for(const o of t)o()};let r=e();return r&&typeof r=="object"&&"catch"in r&&(r=r.catch(o=>{throw n(),o})),[r,n]}const Sw=VR("nuxt-app",{asyncContext:!1}),HR="__nuxt_plugin";function jR(e){let t=0;const n={_scope:Vp(),provide:void 0,globalName:"nuxt",versions:{get nuxt(){return"3.11.2"},get vue(){return n.vueApp.version}},payload:Tn({data:{},state:{},once:new Set,_errors:{},...window.__NUXT__??{}}),static:{data:{}},runWithContext:o=>n._scope.run(()=>qR(n,o)),isHydrating:!0,deferHydration(){if(!n.isHydrating)return()=>{};t++;let o=!1;return()=>{if(!o&&(o=!0,t--,t===0))return n.isHydrating=!1,n.callHook("app:suspense:resolve")}},_asyncDataPromises:{},_asyncData:{},_payloadRevivers:{},...e};n.hooks=kw(),n.hook=n.hooks.hook,n.callHook=n.hooks.callHook,n.provide=(o,s)=>{const a="$"+o;Du(n,a,s),Du(n.vueApp.config.globalProperties,a,s)},Du(n.vueApp,"$nuxt",n),Du(n.vueApp.config.globalProperties,"$nuxt",n);{window.addEventListener("nuxt.preloadError",s=>{n.callHook("app:chunkError",{error:s.payload})}),window.useNuxtApp=window.useNuxtApp||nt;const o=n.hook("app:error",(...s)=>{console.error("[nuxt] error caught during app initialization",...s)});n.hook("app:mounted",o)}const r=n.payload.config;return n.provide("config",r),n}async function WR(e,t){if(t.hooks&&e.hooks.addHooks(t.hooks),typeof t=="function"){const{provide:n}=await e.runWithContext(()=>t(e))||{};if(n&&typeof n=="object")for(const r in n)e.provide(r,n[r])}}async function KR(e,t){const n=[],r=[],o=[],s=[];let a=0;async function u(f){var d;const c=((d=f.dependsOn)==null?void 0:d.filter(g=>t.some(p=>p._name===g)&&!n.includes(g)))??[];if(c.length>0)r.push([new Set(c),f]);else{const g=WR(e,f).then(async()=>{f._name&&(n.push(f._name),await Promise.all(r.map(async([p,v])=>{p.has(f._name)&&(p.delete(f._name),p.size===0&&(a++,await u(v)))})))});f.parallel?o.push(g.catch(p=>s.push(p))):await g}}for(const f of t)await u(f);if(await Promise.all(o),a)for(let f=0;f{}),e,{[HR]:!0,_name:t})}function qR(e,t,n){const r=()=>n?t(...n):t();return Sw.set(e),e.vueApp.runWithContext(r)}function GR(){var t;let e;return ig()&&(e=(t=nr())==null?void 0:t.appContext.app.$nuxt),e=e||Sw.tryUse(),e||null}function nt(){const e=GR();if(!e)throw new Error("[nuxt] instance unavailable");return e}function yo(e){return nt().$config}function Du(e,t,n){Object.defineProperty(e,t,{get:()=>n})}const Bu=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function ZR(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");const n={},o=(t||{}).decode||XR;let s=0;for(;s{t+=o};return{toString(){return t},getContext(){return n},dispatch(o){return e.replacer&&(o=e.replacer(o)),this[o===null?"null":typeof o](o)},object(o){if(o&&typeof o.toJSON=="function")return this.object(o.toJSON());const s=Object.prototype.toString.call(o);let a="";const u=s.length;u<10?a="unknown:["+s+"]":a=s.slice(8,u-1),a=a.toLowerCase();let f=null;if((f=n.get(o))===void 0)n.set(o,n.size);else return this.dispatch("[CIRCULAR:"+f+"]");if(typeof Buffer<"u"&&Buffer.isBuffer&&Buffer.isBuffer(o))return r("buffer:"),r(o.toString("utf8"));if(a!=="object"&&a!=="function"&&a!=="asyncfunction")this[a]?this[a](o):e.ignoreUnknown||this.unkown(o,a);else{let c=Object.keys(o);e.unorderedObjects&&(c=c.sort());let d=[];e.respectType!==!1&&!ky(o)&&(d=e6),e.excludeKeys&&(c=c.filter(p=>!e.excludeKeys(p)),d=d.filter(p=>!e.excludeKeys(p))),r("object:"+(c.length+d.length)+":");const g=p=>{this.dispatch(p),r(":"),e.excludeValues||this.dispatch(o[p]),r(",")};for(const p of c)g(p);for(const p of d)g(p)}},array(o,s){if(s=s===void 0?e.unorderedArrays!==!1:s,r("array:"+o.length+":"),!s||o.length<=1){for(const f of o)this.dispatch(f);return}const a=new Map,u=o.map(f=>{const c=Ew(e);c.dispatch(f);for(const[d,g]of c.getContext())a.set(d,g);return c.toString()});return n=a,u.sort(),this.array(u,!1)},date(o){return r("date:"+o.toJSON())},symbol(o){return r("symbol:"+o.toString())},unkown(o,s){if(r(s),!!o&&(r(":"),o&&typeof o.entries=="function"))return this.array(Array.from(o.entries()),!0)},error(o){return r("error:"+o.toString())},boolean(o){return r("bool:"+o)},string(o){r("string:"+o.length+":"),r(o)},function(o){r("fn:"),ky(o)?this.dispatch("[native]"):this.dispatch(o.toString()),e.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(o.name)),e.respectFunctionProperties&&this.object(o)},number(o){return r("number:"+o)},xml(o){return r("xml:"+o.toString())},null(){return r("Null")},undefined(){return r("Undefined")},regexp(o){return r("regex:"+o.toString())},uint8array(o){return r("uint8array:"),this.dispatch(Array.prototype.slice.call(o))},uint8clampedarray(o){return r("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(o))},int8array(o){return r("int8array:"),this.dispatch(Array.prototype.slice.call(o))},uint16array(o){return r("uint16array:"),this.dispatch(Array.prototype.slice.call(o))},int16array(o){return r("int16array:"),this.dispatch(Array.prototype.slice.call(o))},uint32array(o){return r("uint32array:"),this.dispatch(Array.prototype.slice.call(o))},int32array(o){return r("int32array:"),this.dispatch(Array.prototype.slice.call(o))},float32array(o){return r("float32array:"),this.dispatch(Array.prototype.slice.call(o))},float64array(o){return r("float64array:"),this.dispatch(Array.prototype.slice.call(o))},arraybuffer(o){return r("arraybuffer:"),this.dispatch(new Uint8Array(o))},url(o){return r("url:"+o.toString())},map(o){r("map:");const s=[...o];return this.array(s,e.unorderedSets!==!1)},set(o){r("set:");const s=[...o];return this.array(s,e.unorderedSets!==!1)},file(o){return r("file:"),this.dispatch([o.name,o.size,o.type,o.lastModfied])},blob(){if(e.ignoreUnknown)return r("[blob]");throw new Error(`Hashing Blob objects is currently not supported +Use "options.replacer" or "options.ignoreUnknown" +`)},domwindow(){return r("domwindow")},bigint(o){return r("bigint:"+o.toString())},process(){return r("process")},timer(){return r("timer")},pipe(){return r("pipe")},tcp(){return r("tcp")},udp(){return r("udp")},tty(){return r("tty")},statwatcher(){return r("statwatcher")},securecontext(){return r("securecontext")},connection(){return r("connection")},zlib(){return r("zlib")},context(){return r("context")},nodescript(){return r("nodescript")},httpparser(){return r("httpparser")},dataview(){return r("dataview")},signal(){return r("signal")},fsevent(){return r("fsevent")},tlswrap(){return r("tlswrap")}}}const Cw="[native code] }",t6=Cw.length;function ky(e){return typeof e!="function"?!1:Function.prototype.toString.call(e).slice(-t6)===Cw}class Jo{constructor(t,n){t=this.words=t||[],this.sigBytes=n===void 0?t.length*4:n}toString(t){return(t||n6).stringify(this)}concat(t){if(this.clamp(),this.sigBytes%4)for(let n=0;n>>2]>>>24-n%4*8&255;this.words[this.sigBytes+n>>>2]|=r<<24-(this.sigBytes+n)%4*8}else for(let n=0;n>>2]=t.words[n>>>2];return this.sigBytes+=t.sigBytes,this}clamp(){this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4)}clone(){return new Jo([...this.words])}}const n6={stringify(e){const t=[];for(let n=0;n>>2]>>>24-n%4*8&255;t.push((r>>>4).toString(16),(r&15).toString(16))}return t.join("")}},r6={stringify(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[];for(let r=0;r>>2]>>>24-r%4*8&255,s=e.words[r+1>>>2]>>>24-(r+1)%4*8&255,a=e.words[r+2>>>2]>>>24-(r+2)%4*8&255,u=o<<16|s<<8|a;for(let f=0;f<4&&r*8+f*6>>6*(3-f)&63))}return n.join("")}},o6={parse(e){const t=e.length,n=[];for(let r=0;r>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new Jo(n,t)}},i6={parse(e){return o6.parse(unescape(encodeURIComponent(e)))}};class s6{constructor(){this._data=new Jo,this._nDataBytes=0,this._minBufferSize=0,this.blockSize=512/32}reset(){this._data=new Jo,this._nDataBytes=0}_append(t){typeof t=="string"&&(t=i6.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes}_doProcessBlock(t,n){}_process(t){let n,r=this._data.sigBytes/(this.blockSize*4);t?r=Math.ceil(r):r=Math.max((r|0)-this._minBufferSize,0);const o=r*this.blockSize,s=Math.min(o*4,this._data.sigBytes);if(o){for(let a=0;a>>7)^(w<<14|w>>>18)^w>>>3,O=_i[p-2],M=(O<<15|O>>>17)^(O<<13|O>>>19)^O>>>10;_i[p]=T+_i[p-7]+M+_i[p-16]}const v=f&c^~f&d,y=o&s^o&a^s&a,k=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),_=(f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25),x=g+_+v+l6[p]+_i[p],E=k+y;g=d,d=c,c=f,f=u+x|0,u=a,a=s,s=o,o=x+E|0}r[0]=r[0]+o|0,r[1]=r[1]+s|0,r[2]=r[2]+a|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+c|0,r[6]=r[6]+d|0,r[7]=r[7]+g|0}finalize(t){super.finalize(t);const n=this._nDataBytes*8,r=this._data.sigBytes*8;return this._data.words[r>>>5]|=128<<24-r%32,this._data.words[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),this._data.words[(r+64>>>9<<4)+15]=n,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}}function c6(e){return new u6().finalize(e).toString(r6)}function f6(e,t={}){const n=typeof e=="string"?e:Hh(e,t);return c6(n).slice(0,10)}function Tw(e,t,n={}){return e===t||Hh(e,n)===Hh(t,n)}function Rd(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function jh(e,t,n=".",r){if(!Rd(t))return jh(e,{},n,r);const o=Object.assign({},t);for(const s in e){if(s==="__proto__"||s==="constructor")continue;const a=e[s];a!=null&&(r&&r(o,s,a,n)||(Array.isArray(a)&&Array.isArray(o[s])?o[s]=[...a,...o[s]]:Rd(a)&&Rd(o[s])?o[s]=jh(a,o[s],(n?`${n}.`:"")+s.toString(),r):o[s]=a))}return o}function dg(e){return(...t)=>t.reduce((n,r)=>jh(n,r,"",e),{})}const jc=dg(),d6=dg((e,t,n)=>{if(e[t]!==void 0&&typeof n=="function")return e[t]=n(e[t]),!0});function h6(e,t){try{return t in e}catch{return!1}}var p6=Object.defineProperty,g6=(e,t,n)=>t in e?p6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Si=(e,t,n)=>(g6(e,typeof t!="symbol"?t+"":t,n),n);class Wh extends Error{constructor(t,n={}){super(t,n),Si(this,"statusCode",500),Si(this,"fatal",!1),Si(this,"unhandled",!1),Si(this,"statusMessage"),Si(this,"data"),Si(this,"cause"),n.cause&&!this.cause&&(this.cause=n.cause)}toJSON(){const t={message:this.message,statusCode:qh(this.statusCode,500)};return this.statusMessage&&(t.statusMessage=Aw(this.statusMessage)),this.data!==void 0&&(t.data=this.data),t}}Si(Wh,"__h3_error__",!0);function Kh(e){if(typeof e=="string")return new Wh(e);if(m6(e))return e;const t=new Wh(e.message??e.statusMessage??"",{cause:e.cause||e});if(h6(e,"stack"))try{Object.defineProperty(t,"stack",{get(){return e.stack}})}catch{try{t.stack=e.stack}catch{}}if(e.data&&(t.data=e.data),e.statusCode?t.statusCode=qh(e.statusCode,t.statusCode):e.status&&(t.statusCode=qh(e.status,t.statusCode)),e.statusMessage?t.statusMessage=e.statusMessage:e.statusText&&(t.statusMessage=e.statusText),t.statusMessage){const n=t.statusMessage;Aw(t.statusMessage)!==n&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return e.fatal!==void 0&&(t.fatal=e.fatal),e.unhandled!==void 0&&(t.unhandled=e.unhandled),t}function m6(e){var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.__h3_error__)===!0}const v6=/[^\u0009\u0020-\u007E]/g;function Aw(e=""){return e.replace(v6,"")}function qh(e,t=200){return!e||(typeof e=="string"&&(e=Number.parseInt(e,10)),e<100||e>999)?t:e}const $w=Symbol("layout-meta"),Mn=Symbol("route"),zn=()=>{var e;return(e=nt())==null?void 0:e.$router},Wc=()=>ig()?qe(Mn,nt()._route):nt()._route;const y6=()=>{try{if(nt()._processingMiddleware)return!0}catch{return!1}return!1},Yo=(e,t)=>{e||(e="/");const n=typeof e=="string"?e:mw(e.path||"/",e.query||{})+(e.hash||"");if(t!=null&&t.open){const{target:u="_blank",windowFeatures:f={}}=t.open,c=Object.entries(f).filter(([d,g])=>g!==void 0).map(([d,g])=>`${d.toLowerCase()}=${g}`).join(", ");return open(n,u,c),Promise.resolve()}const r=(t==null?void 0:t.external)||ai(n,{acceptRelative:!0});if(r){if(!(t!=null&&t.external))throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");const u=xl(n).protocol;if(u&&uR(u))throw new Error(`Cannot navigate to a URL with '${u}' protocol.`)}const o=y6();if(!r&&o)return e;const s=zn(),a=nt();return r?(a._scope.stop(),t!=null&&t.replace?location.replace(n):location.href=n,o?a.isHydrating?new Promise(()=>{}):!1:Promise.resolve()):t!=null&&t.replace?s.replace(e):s.push(e)},Iw="__nuxt_error",Kc=()=>Mt(nt().payload,"error"),Es=e=>{const t=kl(e);try{const n=nt(),r=Kc();n.hooks.callHook("app:error",t),r.value=r.value||t}catch{throw t}return t},b6=async(e={})=>{const t=nt(),n=Kc();t.callHook("app:error:cleared",e),e.redirect&&await zn().replace(e.redirect),n.value=null},_6=e=>!!e&&typeof e=="object"&&Iw in e,kl=e=>{const t=Kh(e);return Object.defineProperty(t,Iw,{value:!0,configurable:!1,writable:!1}),t},w6="modulepreload",x6=function(e,t){return e[0]==="."?new URL(e,t).href:e},Ey={},k6=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),u=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));o=Promise.all(n.map(f=>{if(f=x6(f,r),f in Ey)return;Ey[f]=!0;const c=f.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(!!r)for(let v=s.length-1;v>=0;v--){const y=s[v];if(y.href===f&&(!c||y.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${f}"]${d}`))return;const p=document.createElement("link");if(p.rel=c?"stylesheet":w6,c||(p.as="script",p.crossOrigin=""),p.href=f,u&&p.setAttribute("nonce",u),document.head.appendChild(p),c)return new Promise((v,y)=>{p.addEventListener("load",v),p.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${f}`)))})}))}return o.then(()=>t()).catch(s=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s})},nn=(...e)=>k6(...e).catch(t=>{const n=new Event("nuxt.preloadError");throw n.payload=t,window.dispatchEvent(n),t}),S6=-1,E6=-2,C6=-3,T6=-4,A6=-5,$6=-6;function I6(e,t){return R6(JSON.parse(e),t)}function R6(e,t){if(typeof e=="number")return o(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function o(s,a=!1){if(s===S6)return;if(s===C6)return NaN;if(s===T6)return 1/0;if(s===A6)return-1/0;if(s===$6)return-0;if(a)throw new Error("Invalid input");if(s in r)return r[s];const u=n[s];if(!u||typeof u!="object")r[s]=u;else if(Array.isArray(u))if(typeof u[0]=="string"){const f=u[0],c=t==null?void 0:t[f];if(c)return r[s]=c(o(u[1]));switch(f){case"Date":r[s]=new Date(u[1]);break;case"Set":const d=new Set;r[s]=d;for(let v=1;v>>9)+65536).toString(16).substring(1,8).toLowerCase()}function Cy(e){return e._h||hg(e._d?e._d:`${e.tag}:${e.textContent||e.innerHTML||""}:${Object.entries(e.props).map(([t,n])=>`${t}:${String(n)}`).join(",")}`)}function Lw(e,t){const{props:n,tag:r}=e;if(M6.includes(r))return r;if(r==="link"&&n.rel==="canonical")return"canonical";if(n.charset)return"charset";const o=["id"];r==="meta"&&o.push("name","property","http-equiv");for(const s of o)if(typeof n[s]<"u"){const a=String(n[s]);return t&&!t(a)?!1:`${r}:${s}:${a}`}return!1}function Ty(e,t){return e==null?t||null:typeof e=="function"?e(t):e}function Ow(e,t){const n=[],r=t.resolveKeyData||(s=>s.key),o=t.resolveValueData||(s=>s.value);for(const[s,a]of Object.entries(e))n.push(...(Array.isArray(a)?a:[a]).map(u=>{const f={key:s,value:u},c=o(f);return typeof c=="object"?Ow(c,t):Array.isArray(c)?c:{[typeof t.key=="function"?t.key(f):t.key]:r(f),[typeof t.value=="function"?t.value(f):t.value]:c}}).flat());return n}function Pw(e,t){return Object.entries(e).map(([n,r])=>{if(typeof r=="object"&&(r=Pw(r,t)),t.resolve){const o=t.resolve({key:n,value:r});if(typeof o<"u")return o}return typeof r=="number"&&(r=r.toString()),typeof r=="string"&&t.wrapValue&&(r=r.replace(new RegExp(t.wrapValue,"g"),`\\${t.wrapValue}`),r=`${t.wrapValue}${r}${t.wrapValue}`),`${n}${t.keyValueSeparator||""}${r}`}).join(t.entrySeparator||"")}const kn=e=>({keyValue:e,metaKey:"property"}),Ld=e=>({keyValue:e}),pg={appleItunesApp:{unpack:{entrySeparator:", ",resolve({key:e,value:t}){return`${po(e)}=${t}`}}},articleExpirationTime:kn("article:expiration_time"),articleModifiedTime:kn("article:modified_time"),articlePublishedTime:kn("article:published_time"),bookReleaseDate:kn("book:release_date"),charset:{metaKey:"charset"},contentSecurityPolicy:{unpack:{entrySeparator:"; ",resolve({key:e,value:t}){return`${po(e)} ${t}`}},metaKey:"http-equiv"},contentType:{metaKey:"http-equiv"},defaultStyle:{metaKey:"http-equiv"},fbAppId:kn("fb:app_id"),msapplicationConfig:Ld("msapplication-Config"),msapplicationTileColor:Ld("msapplication-TileColor"),msapplicationTileImage:Ld("msapplication-TileImage"),ogAudioSecureUrl:kn("og:audio:secure_url"),ogAudioUrl:kn("og:audio"),ogImageSecureUrl:kn("og:image:secure_url"),ogImageUrl:kn("og:image"),ogSiteName:kn("og:site_name"),ogVideoSecureUrl:kn("og:video:secure_url"),ogVideoUrl:kn("og:video"),profileFirstName:kn("profile:first_name"),profileLastName:kn("profile:last_name"),profileUsername:kn("profile:username"),refresh:{metaKey:"http-equiv",unpack:{entrySeparator:";",resolve({key:e,value:t}){if(e==="seconds")return`${t}`}}},robots:{unpack:{entrySeparator:", ",resolve({key:e,value:t}){return typeof t=="boolean"?`${po(e)}`:`${po(e)}:${t}`}}},xUaCompatible:{metaKey:"http-equiv"}},Mw=["og","book","article","profile"];function Dw(e){var n;const t=po(e).split(":")[0];return Mw.includes(t)?"property":((n=pg[e])==null?void 0:n.metaKey)||"name"}function B6(e){var t;return((t=pg[e])==null?void 0:t.keyValue)||po(e)}function po(e){const t=e.replace(/([A-Z])/g,"-$1").toLowerCase(),n=t.split("-")[0];return Mw.includes(n)||n==="twitter"?e.replace(/([A-Z])/g,":$1").toLowerCase():t}function Gh(e){if(Array.isArray(e))return e.map(n=>Gh(n));if(typeof e!="object"||Array.isArray(e))return e;const t={};for(const[n,r]of Object.entries(e))t[po(n)]=Gh(r);return t}function F6(e,t){const n=pg[t];return t==="refresh"?`${e.seconds};url=${e.url}`:Pw(Gh(e),{keyValueSeparator:"=",entrySeparator:", ",resolve({value:r,key:o}){if(r===null)return"";if(typeof r=="boolean")return`${o}`},...n==null?void 0:n.unpack})}const Bw=["og:image","og:video","og:audio","twitter:image"];function Fw(e){const t={};return Object.entries(e).forEach(([n,r])=>{String(r)!=="false"&&n&&(t[n]=r)}),t}function Ay(e,t){const n=Fw(t),r=po(e),o=Dw(r);if(Bw.includes(r)){const s={};return Object.entries(n).forEach(([a,u])=>{s[`${e}${a==="url"?"":`${a.charAt(0).toUpperCase()}${a.slice(1)}`}`]=u}),Nw(s).sort((a,u)=>{var f,c;return(((f=a[o])==null?void 0:f.length)||0)-(((c=u[o])==null?void 0:c.length)||0)})}return[{[o]:r,...n}]}function Nw(e){const t=[],n={};Object.entries(e).forEach(([o,s])=>{if(!Array.isArray(s)){if(typeof s=="object"&&s){if(Bw.includes(po(o))){t.push(...Ay(o,s));return}n[o]=Fw(s)}else n[o]=s;return}s.forEach(a=>{t.push(...typeof a=="string"?Nw({[o]:a}):Ay(o,a))})});const r=Ow(n,{key({key:o}){return Dw(o)},value({key:o}){return o==="charset"?"charset":"content"},resolveKeyData({key:o}){return B6(o)},resolveValueData({value:o,key:s}){return o===null?"_null":typeof o=="object"?F6(o,s):typeof o=="number"?o.toString():o}});return[...t,...r].map(o=>(o.content==="_null"&&(o.content=null),o))}async function N6(e,t,n){const r={tag:e,props:await Uw(typeof t=="object"&&typeof t!="function"&&!(t instanceof Promise)?{...t}:{[["script","noscript","style"].includes(e)?"innerHTML":"textContent"]:t},["templateParams","titleTemplate"].includes(e))};return Rw.forEach(o=>{const s=typeof r.props[o]<"u"?r.props[o]:n[o];typeof s<"u"&&((!["innerHTML","textContent","children"].includes(o)||O6.includes(r.tag))&&(r[o==="children"?"innerHTML":o]=s),delete r.props[o])}),r.props.body&&(r.tagPosition="bodyClose",delete r.props.body),r.tag==="script"&&typeof r.innerHTML=="object"&&(r.innerHTML=JSON.stringify(r.innerHTML),r.props.type=r.props.type||"application/json"),Array.isArray(r.props.content)?r.props.content.map(o=>({...r,props:{...r.props,content:o}})):r}function U6(e,t){var r;const n=e==="class"?" ":";";return typeof t=="object"&&!Array.isArray(t)&&(t=Object.entries(t).filter(([,o])=>o).map(([o,s])=>e==="style"?`${o}:${s}`:o)),(r=Array.isArray(t)?t.join(n):t)==null?void 0:r.split(n).filter(o=>o.trim()).filter(Boolean).join(n)}async function Uw(e,t){for(const n of Object.keys(e)){if(["class","style"].includes(n)){e[n]=U6(n,e[n]);continue}if(e[n]instanceof Promise&&(e[n]=await e[n]),!t&&!Rw.includes(n)){const r=String(e[n]),o=n.startsWith("data-");r==="true"||r===""?e[n]=o?"true":!0:e[n]||(o&&r==="false"?e[n]="false":delete e[n])}}return e}const z6=10;async function V6(e){const t=[];return Object.entries(e.resolvedInput).filter(([n,r])=>typeof r<"u"&&P6.includes(n)).forEach(([n,r])=>{const o=L6(r);t.push(...o.map(s=>N6(n,s,e)).flat())}),(await Promise.all(t)).flat().filter(Boolean).map((n,r)=>(n._e=e._i,e.mode&&(n._m=e.mode),n._p=(e._i<f&&f[c]||void 0,t):u=t[a],typeof u<"u"?(u||"").replace(/"/g,'\\"'):!1}let o=e;try{o=decodeURI(e)}catch{}return(o.match(/%(\w+\.+\w+)|%(\w+)/g)||[]).sort().reverse().forEach(a=>{const u=r(a.slice(1));typeof u=="string"&&(e=e.replace(new RegExp(`\\${a}(\\W|$)`,"g"),(f,c)=>`${u}${c}`).trim())}),e.includes(Po)&&(e.endsWith(Po)&&(e=e.slice(0,-Po.length).trim()),e.startsWith(Po)&&(e=e.slice(Po.length).trim()),e=e.replace(new RegExp(`\\${Po}\\s*\\${Po}`,"g"),Po),e=tc(e,{separator:n},n)),e}async function zw(e,t={}){var d;const n=t.document||e.resolvedOptions.document;if(!n||!e.dirty)return;const r={shouldRender:!0,tags:[]};if(await e.hooks.callHook("dom:beforeRender",r),!r.shouldRender)return;const o=(await e.resolveTags()).map(g=>({tag:g,id:ec.includes(g.tag)?Cy(g):g.tag,shouldRender:!0}));let s=e._dom;if(!s){s={elMap:{htmlAttrs:n.documentElement,bodyAttrs:n.body}};for(const g of["body","head"]){const p=(d=n[g])==null?void 0:d.children,v=[];for(const y of[...p].filter(k=>ec.includes(k.tagName.toLowerCase()))){const k={tag:y.tagName.toLowerCase(),props:await Uw(y.getAttributeNames().reduce((E,w)=>({...E,[w]:y.getAttribute(w)}),{})),innerHTML:y.innerHTML};let _=1,x=Lw(k);for(;x&&v.find(E=>E._d===x);)x=`${x}:${_++}`;k._d=x||void 0,v.push(k),s.elMap[y.getAttribute("data-hid")||Cy(k)]=y}}}s.pendingSideEffects={...s.sideEffects||{}},s.sideEffects={};function a(g,p,v){const y=`${g}:${p}`;s.sideEffects[y]=v,delete s.pendingSideEffects[y]}function u({id:g,$el:p,tag:v}){const y=v.tag.endsWith("Attrs");s.elMap[g]=p,y||(["textContent","innerHTML"].forEach(k=>{v[k]&&v[k]!==p[k]&&(p[k]=v[k])}),a(g,"el",()=>{var k;(k=s.elMap[g])==null||k.remove(),delete s.elMap[g]}));for(const[k,_]of Object.entries(v._eventHandlers||{}))p.getAttribute(`data-${k}`)!==""&&((v.tag==="bodyAttrs"?n.defaultView:p).addEventListener(k.replace("on",""),_.bind(p)),p.setAttribute(`data-${k}`,""));Object.entries(v.props).forEach(([k,_])=>{const x=`attr:${k}`;if(k==="class")for(const E of(_||"").split(" ").filter(Boolean))y&&a(g,`${x}:${E}`,()=>p.classList.remove(E)),!p.classList.contains(E)&&p.classList.add(E);else if(k==="style")for(const E of(_||"").split(";").filter(Boolean)){const[w,...T]=E.split(":").map(O=>O.trim());a(g,`${x}:${E}:${w}`,()=>{p.style.removeProperty(w)}),p.style.setProperty(w,T.join(":"))}else p.getAttribute(k)!==_&&p.setAttribute(k,_===!0?"":String(_)),y&&a(g,x,()=>p.removeAttribute(k))})}const f=[],c={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const g of o){const{tag:p,shouldRender:v,id:y}=g;if(v){if(p.tag==="title"){n.title=p.textContent;continue}g.$el=g.$el||s.elMap[y],g.$el?u(g):ec.includes(p.tag)&&f.push(g)}}for(const g of f){const p=g.tag.tagPosition||"head";g.$el=n.createElement(g.tag.tag),u(g),c[p]=c[p]||n.createDocumentFragment(),c[p].appendChild(g.$el)}for(const g of o)await e.hooks.callHook("dom:renderTag",g,n,a);c.head&&n.head.appendChild(c.head),c.bodyOpen&&n.body.insertBefore(c.bodyOpen,n.body.firstChild),c.bodyClose&&n.body.appendChild(c.bodyClose),Object.values(s.pendingSideEffects).forEach(g=>g()),e._dom=s,e.dirty=!1,await e.hooks.callHook("dom:rendered",{renders:o})}async function j6(e,t={}){const n=t.delayFn||(r=>setTimeout(r,10));return e._domUpdatePromise=e._domUpdatePromise||new Promise(r=>n(async()=>{await zw(e,t),delete e._domUpdatePromise,r()}))}function W6(e){return t=>{var r,o;const n=((o=(r=t.resolvedOptions.document)==null?void 0:r.head.querySelector('script[id="unhead:payload"]'))==null?void 0:o.innerHTML)||!1;return n&&t.push(JSON.parse(n)),{mode:"client",hooks:{"entries:updated":function(s){j6(s,e)}}}}}const K6=["templateParams","htmlAttrs","bodyAttrs"],q6={hooks:{"tag:normalise":function({tag:e}){["hid","vmid","key"].forEach(r=>{e.props[r]&&(e.key=e.props[r],delete e.props[r])});const n=Lw(e)||(e.key?`${e.tag}:${e.key}`:!1);n&&(e._d=n)},"tags:resolve":function(e){const t={};e.tags.forEach(r=>{const o=(r.key?`${r.tag}:${r.key}`:r._d)||r._p,s=t[o];if(s){let u=r==null?void 0:r.tagDuplicateStrategy;if(!u&&K6.includes(r.tag)&&(u="merge"),u==="merge"){const f=s.props;["class","style"].forEach(c=>{f[c]&&(r.props[c]?(c==="style"&&!f[c].endsWith(";")&&(f[c]+=";"),r.props[c]=`${f[c]} ${r.props[c]}`):r.props[c]=f[c])}),t[o].props={...f,...r.props};return}else if(r._e===s._e){s._duped=s._duped||[],r._d=`${s._d}:${s._duped.length+1}`,s._duped.push(r);return}else if(kc(r)>kc(s))return}const a=Object.keys(r.props).length+(r.innerHTML?1:0)+(r.textContent?1:0);if(ec.includes(r.tag)&&a===0){delete t[o];return}t[o]=r});const n=[];Object.values(t).forEach(r=>{const o=r._duped;delete r._duped,n.push(r),o&&n.push(...o)}),e.tags=n,e.tags=e.tags.filter(r=>!(r.tag==="meta"&&(r.props.name||r.props.property)&&!r.props.content))}}},G6={mode:"server",hooks:{"tags:resolve":function(e){const t={};e.tags.filter(n=>["titleTemplate","templateParams","title"].includes(n.tag)&&n._m==="server").forEach(n=>{t[n.tag]=n.tag.startsWith("title")?n.textContent:n.props}),Object.keys(t).length&&e.tags.push({tag:"script",innerHTML:JSON.stringify(t),props:{id:"unhead:payload",type:"application/json"}})}}},Z6=["script","link","bodyAttrs"],J6=e=>({hooks:{"tags:resolve":function(t){for(const n of t.tags.filter(r=>Z6.includes(r.tag)))Object.entries(n.props).forEach(([r,o])=>{r.startsWith("on")&&typeof o=="function"&&(e.ssr&&Ry.includes(r)?n.props[r]=`this.dataset.${r}fired = true`:delete n.props[r],n._eventHandlers=n._eventHandlers||{},n._eventHandlers[r]=o)}),e.ssr&&n._eventHandlers&&(n.props.src||n.props.href)&&(n.key=n.key||hg(n.props.src||n.props.href))},"dom:renderTag":function({$el:t,tag:n}){var r,o;for(const s of Object.keys((t==null?void 0:t.dataset)||{}).filter(a=>Ry.some(u=>`${u}fired`===a))){const a=s.replace("fired","");(o=(r=n._eventHandlers)==null?void 0:r[a])==null||o.call(t,new Event(a.replace("on","")))}}}}),Y6=["link","style","script","noscript"],X6={hooks:{"tag:normalise":({tag:e})=>{e.key&&Y6.includes(e.tag)&&(e.props["data-hid"]=e._h=hg(e.key))}}},Q6={hooks:{"tags:resolve":e=>{const t=n=>{var r;return(r=e.tags.find(o=>o._d===n))==null?void 0:r._p};for(const{prefix:n,offset:r}of H6)for(const o of e.tags.filter(s=>typeof s.tagPriority=="string"&&s.tagPriority.startsWith(n))){const s=t(o.tagPriority.replace(n,""));typeof s<"u"&&(o._p=s+r)}e.tags.sort((n,r)=>n._p-r._p).sort((n,r)=>kc(n)-kc(r))}}},eL={meta:"content",link:"href",htmlAttrs:"lang"},tL=e=>({hooks:{"tags:resolve":t=>{var u;const{tags:n}=t,r=(u=n.find(f=>f.tag==="title"))==null?void 0:u.textContent,o=n.findIndex(f=>f.tag==="templateParams"),s=o!==-1?n[o].props:{},a=s.separator||"|";delete s.separator,s.pageTitle=tc(s.pageTitle||r||"",s,a);for(const f of n.filter(c=>c.processTemplateParams!==!1)){const c=eL[f.tag];c&&typeof f.props[c]=="string"?f.props[c]=tc(f.props[c],s,a):(f.processTemplateParams===!0||["titleTemplate","title"].includes(f.tag))&&["innerHTML","textContent"].forEach(d=>{typeof f[d]=="string"&&(f[d]=tc(f[d],s,a))})}e._templateParams=s,e._separator=a,t.tags=n.filter(f=>f.tag!=="templateParams")}}}),nL={hooks:{"tags:resolve":e=>{const{tags:t}=e;let n=t.findIndex(o=>o.tag==="titleTemplate");const r=t.findIndex(o=>o.tag==="title");if(r!==-1&&n!==-1){const o=Ty(t[n].textContent,t[r].textContent);o!==null?t[r].textContent=o||t[r].textContent:delete t[r]}else if(n!==-1){const o=Ty(t[n].textContent);o!==null&&(t[n].textContent=o,t[n].tag="title",n=-1)}n!==-1&&delete t[n],e.tags=t.filter(Boolean)}}},rL={hooks:{"tags:afterResolve":function(e){for(const t of e.tags)typeof t.innerHTML=="string"&&(t.innerHTML&&["application/ld+json","application/json"].includes(t.props.type)?t.innerHTML=t.innerHTML.replace(/{u.dirty=!0,t.callHook("entries:updated",u)};let o=0,s=[];const a=[],u={plugins:a,dirty:!1,resolvedOptions:e,hooks:t,headEntries(){return s},use(f){const c=typeof f=="function"?f(u):f;(!c.key||!a.some(d=>d.key===c.key))&&(a.push(c),Ly(c.mode,n)&&t.addHooks(c.hooks||{}))},push(f,c){c==null||delete c.head;const d={_i:o++,input:f,...c};return Ly(d.mode,n)&&(s.push(d),r()),{dispose(){s=s.filter(g=>g._i!==d._i),t.callHook("entries:updated",u),r()},patch(g){s=s.map(p=>(p._i===d._i&&(p.input=d.input=g),p)),r()}}},async resolveTags(){const f={tags:[],entries:[...s]};await t.callHook("entries:resolve",f);for(const c of f.entries){const d=c.resolvedInput||c.input;if(c.resolvedInput=await(c.transform?c.transform(d):d),c.resolvedInput)for(const g of await V6(c)){const p={tag:g,entry:c,resolvedOptions:u.resolvedOptions};await t.callHook("tag:normalise",p),f.tags.push(p.tag)}}return await t.callHook("tags:beforeResolve",f),await t.callHook("tags:resolve",f),await t.callHook("tags:afterResolve",f),f.tags},ssr:n};return[q6,G6,J6,X6,Q6,tL,nL,rL,...(e==null?void 0:e.plugins)||[]].forEach(f=>u.use(f)),u.hooks.callHook("init",u),u}function sL(){return Vw}const aL=aw.startsWith("3");function lL(e){return typeof e=="function"?e():$(e)}function Sc(e,t=""){if(e instanceof Promise)return e;const n=lL(e);return!e||!n?n:Array.isArray(n)?n.map(r=>Sc(r,t)):typeof n=="object"?Object.fromEntries(Object.entries(n).map(([r,o])=>r==="titleTemplate"||r.startsWith("on")?[r,$(o)]:[r,Sc(o,r)])):n}const uL={hooks:{"entries:resolve":function(e){for(const t of e.entries)t.resolvedInput=Sc(t.input)}}},Hw="usehead";function cL(e){return{install(n){aL&&(n.config.globalProperties.$unhead=e,n.config.globalProperties.$head=e,n.provide(Hw,e))}}.install}function fL(e={}){e.domDelayFn=e.domDelayFn||(n=>hn(()=>setTimeout(()=>n(),0)));const t=oL(e);return t.use(uL),t.install=cL(t),t}const Zh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Jh="__unhead_injection_handler__";function dL(e){Zh[Jh]=e}function hL(){if(Jh in Zh)return Zh[Jh]();const e=qe(Hw);return e||sL()}function pL(e,t={}){const n=t.head||hL();if(n)return n.ssr?n.push(e,t):gL(n,e,t)}function gL(e,t,n={}){const r=ne(!1),o=ne({});on(()=>{o.value=r.value?{}:Sc(t)});const s=e.push(o.value,n);return vt(o,u=>{s.patch(u)}),nr()&&(bl(()=>{s.dispose()}),M1(()=>{r.value=!0}),P1(()=>{r.value=!1})),s}function Fr(e){if(typeof e!="object")return e;var t,n,r=Object.prototype.toString.call(e);if(r==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){n=new e.constructor;for(t in e)e.hasOwnProperty(t)&&n[t]!==e[t]&&(n[t]=Fr(e[t]))}else{n={};for(t in e)t==="__proto__"?Object.defineProperty(n,t,{value:Fr(e[t]),configurable:!0,enumerable:!0,writable:!0}):n[t]=Fr(e[t])}return n}if(r==="[object Array]"){for(t=e.length,n=Array(t);t--;)n[t]=Fr(e[t]);return n}return r==="[object Set]"?(n=new Set,e.forEach(function(o){n.add(Fr(o))}),n):r==="[object Map]"?(n=new Map,e.forEach(function(o,s){n.set(Fr(s),Fr(o))}),n):r==="[object Date]"?new Date(+e):r==="[object RegExp]"?(n=new RegExp(e.source,e.flags),n.lastIndex=e.lastIndex,n):r==="[object DataView]"?new e.constructor(Fr(e.buffer)):r==="[object ArrayBuffer]"?e.slice(0):r.slice(-6)==="Array]"?new e.constructor(e):e}const mL={ui:{primary:"indigo",gray:"stone"}},vL={nuxt:{},ui:{primary:"green",gray:"cool",colors:["red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose","primary","backdrop","body"],strategy:"merge"}},Ge=d6(mL,vL);function Sl(){const e=nt();return e._appConfig||(e._appConfig=Tn(Ge)),e._appConfig}const yL=!1,Yh=!1,bL=!1,_L={componentName:"NuxtLink"},wL={deep:!0},xL={},kL="#__nuxt";function Oy(e,t={}){const n=EL(e,t),r=nt(),o=r._payloadCache=r._payloadCache||{};return n in o||(o[n]=CL(e).then(s=>s?jw(n).then(a=>a||(delete o[n],null)):(o[n]=null,null))),o[n]}const SL="_payload.json";function EL(e,t={}){var o;const n=new URL(e,"http://localhost");if(n.host!=="localhost"||ai(n.pathname,{acceptRelative:!0}))throw new Error("Payload URL must not include hostname: "+e);const r=t.hash||(t.fresh?Date.now():(o=Sl().nuxt)==null?void 0:o.buildId);return Hc(yo().app.baseURL,n.pathname,SL+(r?`?${r}`:""))}async function jw(e){const t=fetch(e).then(n=>n.text().then(Ww));try{return await t}catch(n){console.warn("[nuxt] Cannot load payload ",e,n)}return null}async function CL(e=Wc().path){return!!nt().payload.prerenderedAt}let Fu=null;async function TL(){if(Fu)return Fu;const e=document.getElementById("__NUXT_DATA__");if(!e)return{};const t=await Ww(e.textContent||""),n=e.dataset.src?await jw(e.dataset.src):void 0;return Fu={...t,...n,...window.__NUXT__},Fu}async function Ww(e){return await I6(e,nt()._payloadRevivers)}function AL(e,t){nt()._payloadRevivers[e]=t}const Py={NuxtError:e=>kl(e),EmptyShallowRef:e=>Gr(e==="_"?void 0:e==="0n"?BigInt(0):Qa(e)),EmptyRef:e=>ne(e==="_"?void 0:e==="0n"?BigInt(0):Qa(e)),ShallowRef:e=>Gr(e),ShallowReactive:e=>ml(e),Ref:e=>ne(e),Reactive:e=>Tn(e)},$L=Un({name:"nuxt:revive-payload:client",order:-30,async setup(e){let t,n;for(const r in Py)AL(r,Py[r]);Object.assign(e.payload,([t,n]=el(()=>e.runWithContext(TL)),t=await t,n(),t)),window.__NUXT__=e.payload}}),IL=[],RL=Un({name:"nuxt:head",enforce:"pre",setup(e){const t=fL({plugins:IL});dL(()=>nt().vueApp._context.provides.usehead),e.vueApp.use(t);{let n=!0;const r=async()=>{n=!1,await zw(t)};t.hooks.hook("dom:beforeRender",o=>{o.shouldRender=!n}),e.hooks.hook("page:start",()=>{n=!0}),e.hooks.hook("page:finish",()=>{e.isHydrating||r()}),e.hooks.hook("app:error",r),e.hooks.hook("app:suspense:resolve",r)}}});/*! + * vue-router v4.3.2 + * (c) 2024 Eduardo San Martin Morote + * @license MIT + */const Ss=typeof document<"u";function LL(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const _t=Object.assign;function Od(e,t){const n={};for(const r in t){const o=t[r];n[r]=Ir(o)?o.map(e):e(o)}return n}const Ua=()=>{},Ir=Array.isArray,Kw=/#/g,OL=/&/g,PL=/\//g,ML=/=/g,DL=/\?/g,qw=/\+/g,BL=/%5B/g,FL=/%5D/g,Gw=/%5E/g,NL=/%60/g,Zw=/%7B/g,UL=/%7C/g,Jw=/%7D/g,zL=/%20/g;function gg(e){return encodeURI(""+e).replace(UL,"|").replace(BL,"[").replace(FL,"]")}function VL(e){return gg(e).replace(Zw,"{").replace(Jw,"}").replace(Gw,"^")}function Xh(e){return gg(e).replace(qw,"%2B").replace(zL,"+").replace(Kw,"%23").replace(OL,"%26").replace(NL,"`").replace(Zw,"{").replace(Jw,"}").replace(Gw,"^")}function HL(e){return Xh(e).replace(ML,"%3D")}function jL(e){return gg(e).replace(Kw,"%23").replace(DL,"%3F")}function WL(e){return e==null?"":jL(e).replace(PL,"%2F")}function tl(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const KL=/\/$/,qL=e=>e.replace(KL,"");function Pd(e,t,n="/"){let r,o={},s="",a="";const u=t.indexOf("#");let f=t.indexOf("?");return u=0&&(f=-1),f>-1&&(r=t.slice(0,f),s=t.slice(f+1,u>-1?u:t.length),o=e(s)),u>-1&&(r=r||t.slice(0,u),a=t.slice(u,t.length)),r=YL(r??t,n),{fullPath:r+(s&&"?")+s+a,path:r,query:o,hash:tl(a)}}function GL(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function My(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ZL(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&Vs(t.matched[r],n.matched[o])&&Yw(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Vs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Yw(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!JL(e[n],t[n]))return!1;return!0}function JL(e,t){return Ir(e)?Dy(e,t):Ir(t)?Dy(t,e):e===t}function Dy(e,t){return Ir(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function YL(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),o=r[r.length-1];(o===".."||o===".")&&r.push("");let s=n.length-1,a,u;for(a=0;a1&&s--;else break;return n.slice(0,s).join("/")+"/"+r.slice(a).join("/")}var nl;(function(e){e.pop="pop",e.push="push"})(nl||(nl={}));var za;(function(e){e.back="back",e.forward="forward",e.unknown=""})(za||(za={}));function XL(e){if(!e)if(Ss){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),qL(e)}const QL=/^[^#]+#/;function e8(e,t){return e.replace(QL,"#")+t}function t8(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const qc=()=>({left:window.scrollX,top:window.scrollY});function n8(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=t8(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function By(e,t){return(history.state?history.state.position-t:-1)+e}const Qh=new Map;function r8(e,t){Qh.set(e,t)}function o8(e){const t=Qh.get(e);return Qh.delete(e),t}let i8=()=>location.protocol+"//"+location.host;function Xw(e,t){const{pathname:n,search:r,hash:o}=t,s=e.indexOf("#");if(s>-1){let u=o.includes(e.slice(s))?e.slice(s).length:1,f=o.slice(u);return f[0]!=="/"&&(f="/"+f),My(f,"")}return My(n,e)+r+o}function s8(e,t,n,r){let o=[],s=[],a=null;const u=({state:p})=>{const v=Xw(e,location),y=n.value,k=t.value;let _=0;if(p){if(n.value=v,t.value=p,a&&a===y){a=null;return}_=k?p.position-k.position:0}else r(v);o.forEach(x=>{x(n.value,y,{delta:_,type:nl.pop,direction:_?_>0?za.forward:za.back:za.unknown})})};function f(){a=n.value}function c(p){o.push(p);const v=()=>{const y=o.indexOf(p);y>-1&&o.splice(y,1)};return s.push(v),v}function d(){const{history:p}=window;p.state&&p.replaceState(_t({},p.state,{scroll:qc()}),"")}function g(){for(const p of s)p();s=[],window.removeEventListener("popstate",u),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",u),window.addEventListener("beforeunload",d,{passive:!0}),{pauseListeners:f,listen:c,destroy:g}}function Fy(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?qc():null}}function a8(e){const{history:t,location:n}=window,r={value:Xw(e,n)},o={value:t.state};o.value||s(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(f,c,d){const g=e.indexOf("#"),p=g>-1?(n.host&&document.querySelector("base")?e:e.slice(g))+f:i8()+e+f;try{t[d?"replaceState":"pushState"](c,"",p),o.value=c}catch(v){console.error(v),n[d?"replace":"assign"](p)}}function a(f,c){const d=_t({},t.state,Fy(o.value.back,f,o.value.forward,!0),c,{position:o.value.position});s(f,d,!0),r.value=f}function u(f,c){const d=_t({},o.value,t.state,{forward:f,scroll:qc()});s(d.current,d,!0);const g=_t({},Fy(r.value,f,null),{position:d.position+1},c);s(f,g,!1),r.value=f}return{location:r,state:o,push:u,replace:a}}function Qw(e){e=XL(e);const t=a8(e),n=s8(e,t.state,t.location,t.replace);function r(s,a=!0){a||n.pauseListeners(),history.go(s)}const o=_t({location:"",base:e,go:r,createHref:e8.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function l8(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Qw(e)}function u8(e){return typeof e=="string"||e&&typeof e=="object"}function ex(e){return typeof e=="string"||typeof e=="symbol"}const Er={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},tx=Symbol("");var Ny;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Ny||(Ny={}));function Hs(e,t){return _t(new Error,{type:e,[tx]:!0},t)}function io(e,t){return e instanceof Error&&tx in e&&(t==null||!!(e.type&t))}const Uy="[^/]+?",c8={sensitive:!1,strict:!1,start:!0,end:!0},f8=/[.+*?^${}()[\]/\\]/g;function d8(e,t){const n=_t({},c8,t),r=[];let o=n.start?"^":"";const s=[];for(const c of e){const d=c.length?[]:[90];n.strict&&!c.length&&(o+="/");for(let g=0;gt.length?t.length===1&&t[0]===80?1:-1:0}function p8(e,t){let n=0;const r=e.score,o=t.score;for(;n0&&t[t.length-1]<0}const g8={type:0,value:""},m8=/[a-zA-Z0-9_]/;function v8(e){if(!e)return[[]];if(e==="/")return[[g8]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(v){throw new Error(`ERR (${n})/"${c}": ${v}`)}let n=0,r=n;const o=[];let s;function a(){s&&o.push(s),s=[]}let u=0,f,c="",d="";function g(){c&&(n===0?s.push({type:0,value:c}):n===1||n===2||n===3?(s.length>1&&(f==="*"||f==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:c,regexp:d,repeatable:f==="*"||f==="+",optional:f==="*"||f==="?"})):t("Invalid state to consume buffer"),c="")}function p(){c+=f}for(;u{a(E)}:Ua}function a(d){if(ex(d)){const g=r.get(d);g&&(r.delete(d),n.splice(n.indexOf(g),1),g.children.forEach(a),g.alias.forEach(a))}else{const g=n.indexOf(d);g>-1&&(n.splice(g,1),d.record.name&&r.delete(d.record.name),d.children.forEach(a),d.alias.forEach(a))}}function u(){return n}function f(d){let g=0;for(;g=0&&(d.record.path!==n[g].record.path||!nx(d,n[g]));)g++;n.splice(g,0,d),d.record.name&&!Hy(d)&&r.set(d.record.name,d)}function c(d,g){let p,v={},y,k;if("name"in d&&d.name){if(p=r.get(d.name),!p)throw Hs(1,{location:d});k=p.record.name,v=_t(Vy(g.params,p.keys.filter(E=>!E.optional).concat(p.parent?p.parent.keys.filter(E=>E.optional):[]).map(E=>E.name)),d.params&&Vy(d.params,p.keys.map(E=>E.name))),y=p.stringify(v)}else if(d.path!=null)y=d.path,p=n.find(E=>E.re.test(y)),p&&(v=p.parse(y),k=p.record.name);else{if(p=g.name?r.get(g.name):n.find(E=>E.re.test(g.path)),!p)throw Hs(1,{location:d,currentLocation:g});k=p.record.name,v=_t({},g.params,d.params),y=p.stringify(v)}const _=[];let x=p;for(;x;)_.unshift(x.record),x=x.parent;return{name:k,path:y,params:v,matched:_,meta:x8(_)}}return e.forEach(d=>s(d)),{addRoute:s,resolve:c,removeRoute:a,getRoutes:u,getRecordMatcher:o}}function Vy(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function _8(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:w8(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function w8(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function Hy(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function x8(e){return e.reduce((t,n)=>_t(t,n.meta),{})}function jy(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function nx(e,t){return t.children.some(n=>n===e||nx(e,n))}function k8(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;os&&Xh(s)):[r&&Xh(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function S8(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Ir(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}const E8=Symbol(""),Ky=Symbol(""),mg=Symbol(""),vg=Symbol(""),ep=Symbol("");function _a(){let e=[];function t(r){return e.push(r),()=>{const o=e.indexOf(r);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Ho(e,t,n,r,o,s=a=>a()){const a=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((u,f)=>{const c=p=>{p===!1?f(Hs(4,{from:n,to:t})):p instanceof Error?f(p):u8(p)?f(Hs(2,{from:t,to:p})):(a&&r.enterCallbacks[o]===a&&typeof p=="function"&&a.push(p),u())},d=s(()=>e.call(r&&r.instances[o],t,n,c));let g=Promise.resolve(d);e.length<3&&(g=g.then(c)),g.catch(p=>f(p))})}function Md(e,t,n,r,o=s=>s()){const s=[];for(const a of e)for(const u in a.components){let f=a.components[u];if(!(t!=="beforeRouteEnter"&&!a.instances[u]))if(C8(f)){const d=(f.__vccOpts||f)[t];d&&s.push(Ho(d,n,r,a,u,o))}else{let c=f();s.push(()=>c.then(d=>{if(!d)return Promise.reject(new Error(`Couldn't resolve component "${u}" at "${a.path}"`));const g=LL(d)?d.default:d;a.components[u]=g;const v=(g.__vccOpts||g)[t];return v&&Ho(v,n,r,a,u,o)()}))}}return s}function C8(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function qy(e){const t=qe(mg),n=qe(vg),r=N(()=>{const f=$(e.to);return t.resolve(f)}),o=N(()=>{const{matched:f}=r.value,{length:c}=f,d=f[c-1],g=n.matched;if(!d||!g.length)return-1;const p=g.findIndex(Vs.bind(null,d));if(p>-1)return p;const v=Gy(f[c-2]);return c>1&&Gy(d)===v&&g[g.length-1].path!==v?g.findIndex(Vs.bind(null,f[c-2])):p}),s=N(()=>o.value>-1&&I8(n.params,r.value.params)),a=N(()=>o.value>-1&&o.value===n.matched.length-1&&Yw(n.params,r.value.params));function u(f={}){return $8(f)?t[$(e.replace)?"replace":"push"]($(e.to)).catch(Ua):Promise.resolve()}return{route:r,href:N(()=>r.value.href),isActive:s,isExactActive:a,navigate:u}}const T8=_e({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:qy,setup(e,{slots:t}){const n=Tn(qy(e)),{options:r}=qe(mg),o=N(()=>({[Zy(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Zy(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&t.default(n);return e.custom?s:Ye("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},s)}}}),A8=T8;function $8(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function I8(e,t){for(const n in t){const r=t[n],o=e[n];if(typeof r=="string"){if(r!==o)return!1}else if(!Ir(o)||o.length!==r.length||r.some((s,a)=>s!==o[a]))return!1}return!0}function Gy(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Zy=(e,t,n)=>e??t??n,R8=_e({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=qe(ep),o=N(()=>e.route||r.value),s=qe(Ky,0),a=N(()=>{let c=$(s);const{matched:d}=o.value;let g;for(;(g=d[c])&&!g.components;)c++;return c}),u=N(()=>o.value.matched[a.value]);wt(Ky,N(()=>a.value+1)),wt(E8,u),wt(ep,o);const f=ne();return vt(()=>[f.value,u.value,e.name],([c,d,g],[p,v,y])=>{d&&(d.instances[g]=c,v&&v!==d&&c&&c===p&&(d.leaveGuards.size||(d.leaveGuards=v.leaveGuards),d.updateGuards.size||(d.updateGuards=v.updateGuards))),c&&d&&(!v||!Vs(d,v)||!p)&&(d.enterCallbacks[g]||[]).forEach(k=>k(c))},{flush:"post"}),()=>{const c=o.value,d=e.name,g=u.value,p=g&&g.components[d];if(!p)return Jy(n.default,{Component:p,route:c});const v=g.props[d],y=v?v===!0?c.params:typeof v=="function"?v(c):v:null,_=Ye(p,_t({},y,t,{onVnodeUnmounted:x=>{x.component.isUnmounted&&(g.instances[d]=null)},ref:f}));return Jy(n.default,{Component:_,route:c})||_}}});function Jy(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const rx=R8;function L8(e){const t=b8(e.routes,e),n=e.parseQuery||k8,r=e.stringifyQuery||Wy,o=e.history,s=_a(),a=_a(),u=_a(),f=Gr(Er);let c=Er;Ss&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=Od.bind(null,te=>""+te),g=Od.bind(null,WL),p=Od.bind(null,tl);function v(te,be){let he,Ee;return ex(te)?(he=t.getRecordMatcher(te),Ee=be):Ee=te,t.addRoute(Ee,he)}function y(te){const be=t.getRecordMatcher(te);be&&t.removeRoute(be)}function k(){return t.getRoutes().map(te=>te.record)}function _(te){return!!t.getRecordMatcher(te)}function x(te,be){if(be=_t({},be||f.value),typeof te=="string"){const P=Pd(n,te,be.path),W=t.resolve({path:P.path},be),re=o.createHref(P.fullPath);return _t(P,W,{params:p(W.params),hash:tl(P.hash),redirectedFrom:void 0,href:re})}let he;if(te.path!=null)he=_t({},te,{path:Pd(n,te.path,be.path).path});else{const P=_t({},te.params);for(const W in P)P[W]==null&&delete P[W];he=_t({},te,{params:g(P)}),be.params=g(be.params)}const Ee=t.resolve(he,be),rt=te.hash||"";Ee.params=d(p(Ee.params));const yt=GL(r,_t({},te,{hash:VL(rt),path:Ee.path})),A=o.createHref(yt);return _t({fullPath:yt,hash:rt,query:r===Wy?S8(te.query):te.query||{}},Ee,{redirectedFrom:void 0,href:A})}function E(te){return typeof te=="string"?Pd(n,te,f.value.path):_t({},te)}function w(te,be){if(c!==te)return Hs(8,{from:be,to:te})}function T(te){return F(te)}function O(te){return T(_t(E(te),{replace:!0}))}function M(te){const be=te.matched[te.matched.length-1];if(be&&be.redirect){const{redirect:he}=be;let Ee=typeof he=="function"?he(te):he;return typeof Ee=="string"&&(Ee=Ee.includes("?")||Ee.includes("#")?Ee=E(Ee):{path:Ee},Ee.params={}),_t({query:te.query,hash:te.hash,params:Ee.path!=null?{}:te.params},Ee)}}function F(te,be){const he=c=x(te),Ee=f.value,rt=te.state,yt=te.force,A=te.replace===!0,P=M(he);if(P)return F(_t(E(P),{state:typeof P=="object"?_t({},rt,P.state):rt,force:yt,replace:A}),be||he);const W=he;W.redirectedFrom=be;let re;return!yt&&ZL(r,Ee,he)&&(re=Hs(16,{to:W,from:Ee}),Re(Ee,Ee,!0,!1)),(re?Promise.resolve(re):B(W,Ee)).catch(Z=>io(Z)?io(Z,2)?Z:Yt(Z):ye(Z,W,Ee)).then(Z=>{if(Z){if(io(Z,2))return F(_t({replace:A},E(Z.to),{state:typeof Z.to=="object"?_t({},rt,Z.to.state):rt,force:yt}),be||W)}else Z=G(W,Ee,!0,A,rt);return q(W,Ee,Z),Z})}function z(te,be){const he=w(te,be);return he?Promise.reject(he):Promise.resolve()}function U(te){const be=zt.values().next().value;return be&&typeof be.runWithContext=="function"?be.runWithContext(te):te()}function B(te,be){let he;const[Ee,rt,yt]=O8(te,be);he=Md(Ee.reverse(),"beforeRouteLeave",te,be);for(const P of Ee)P.leaveGuards.forEach(W=>{he.push(Ho(W,te,be))});const A=z.bind(null,te,be);return he.push(A),Et(he).then(()=>{he=[];for(const P of s.list())he.push(Ho(P,te,be));return he.push(A),Et(he)}).then(()=>{he=Md(rt,"beforeRouteUpdate",te,be);for(const P of rt)P.updateGuards.forEach(W=>{he.push(Ho(W,te,be))});return he.push(A),Et(he)}).then(()=>{he=[];for(const P of yt)if(P.beforeEnter)if(Ir(P.beforeEnter))for(const W of P.beforeEnter)he.push(Ho(W,te,be));else he.push(Ho(P.beforeEnter,te,be));return he.push(A),Et(he)}).then(()=>(te.matched.forEach(P=>P.enterCallbacks={}),he=Md(yt,"beforeRouteEnter",te,be,U),he.push(A),Et(he))).then(()=>{he=[];for(const P of a.list())he.push(Ho(P,te,be));return he.push(A),Et(he)}).catch(P=>io(P,8)?P:Promise.reject(P))}function q(te,be,he){u.list().forEach(Ee=>U(()=>Ee(te,be,he)))}function G(te,be,he,Ee,rt){const yt=w(te,be);if(yt)return yt;const A=be===Er,P=Ss?history.state:{};he&&(Ee||A?o.replace(te.fullPath,_t({scroll:A&&P&&P.scroll},rt)):o.push(te.fullPath,rt)),f.value=te,Re(te,be,he,A),Yt()}let me;function le(){me||(me=o.listen((te,be,he)=>{if(!yn.listening)return;const Ee=x(te),rt=M(Ee);if(rt){F(_t(rt,{replace:!0}),Ee).catch(Ua);return}c=Ee;const yt=f.value;Ss&&r8(By(yt.fullPath,he.delta),qc()),B(Ee,yt).catch(A=>io(A,12)?A:io(A,2)?(F(A.to,Ee).then(P=>{io(P,20)&&!he.delta&&he.type===nl.pop&&o.go(-1,!1)}).catch(Ua),Promise.reject()):(he.delta&&o.go(-he.delta,!1),ye(A,Ee,yt))).then(A=>{A=A||G(Ee,yt,!1),A&&(he.delta&&!io(A,8)?o.go(-he.delta,!1):he.type===nl.pop&&io(A,20)&&o.go(-1,!1)),q(Ee,yt,A)}).catch(Ua)}))}let xe=_a(),se=_a(),Se;function ye(te,be,he){Yt(te);const Ee=se.list();return Ee.length?Ee.forEach(rt=>rt(te,be,he)):console.error(te),Promise.reject(te)}function Bt(){return Se&&f.value!==Er?Promise.resolve():new Promise((te,be)=>{xe.add([te,be])})}function Yt(te){return Se||(Se=!te,le(),xe.list().forEach(([be,he])=>te?he(te):be()),xe.reset()),te}function Re(te,be,he,Ee){const{scrollBehavior:rt}=e;if(!Ss||!rt)return Promise.resolve();const yt=!he&&o8(By(te.fullPath,0))||(Ee||!he)&&history.state&&history.state.scroll||null;return hn().then(()=>rt(te,be,yt)).then(A=>A&&n8(A)).catch(A=>ye(A,te,be))}const ze=te=>o.go(te);let Ut;const zt=new Set,yn={currentRoute:f,listening:!0,addRoute:v,removeRoute:y,hasRoute:_,getRoutes:k,resolve:x,options:e,push:T,replace:O,go:ze,back:()=>ze(-1),forward:()=>ze(1),beforeEach:s.add,beforeResolve:a.add,afterEach:u.add,onError:se.add,isReady:Bt,install(te){const be=this;te.component("RouterLink",A8),te.component("RouterView",rx),te.config.globalProperties.$router=be,Object.defineProperty(te.config.globalProperties,"$route",{enumerable:!0,get:()=>$(f)}),Ss&&!Ut&&f.value===Er&&(Ut=!0,T(o.location).catch(rt=>{}));const he={};for(const rt in Er)Object.defineProperty(he,rt,{get:()=>f.value[rt],enumerable:!0});te.provide(mg,be),te.provide(vg,ml(he)),te.provide(ep,f);const Ee=te.unmount;zt.add(te),te.unmount=function(){zt.delete(te),zt.size<1&&(c=Er,me&&me(),me=null,f.value=Er,Ut=!1,Se=!1),Ee()}}};function Et(te){return te.reduce((be,he)=>be.then(()=>U(he)),Promise.resolve())}return yn}function O8(e,t){const n=[],r=[],o=[],s=Math.max(t.matched.length,e.matched.length);for(let a=0;aVs(c,u))?r.push(u):n.push(u));const f=e.matched[a];f&&(t.matched.find(c=>Vs(c,f))||o.push(f))}return[n,r,o]}function P8(){return qe(vg)}const M8=(e,t)=>t.path.replace(/(:\w+)\([^)]+\)/g,"$1").replace(/(:\w+)[?+*]/g,"$1").replace(/:\w+/g,n=>{var r;return((r=e.params[n.slice(1)])==null?void 0:r.toString())||""}),tp=(e,t)=>{const n=e.route.matched.find(o=>{var s;return((s=o.components)==null?void 0:s.default)===e.Component.type}),r=t??(n==null?void 0:n.meta.key)??(n&&M8(e.route,n));return typeof r=="function"?r(e.route):r},D8=(e,t)=>({default:()=>e?Ye(_3,e===!0?{}:e,t):t});function yg(e){return Array.isArray(e)?e:[e]}const Dd=null,Bd=null,Fd=null,Nd=null,Ud=null,zd=null,Vd=null,Hd=null,jd=null,Wd=null,Kd=null,qd=null,Yy=[{name:"backtest-id",path:"/backtest/:id()",meta:{},alias:[],redirect:Dd==null?void 0:Dd.redirect,component:()=>nn(()=>import("./Db4jbZ2h.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url).then(e=>e.default||e)},{name:"backtest",path:"/backtest",meta:{},alias:[],redirect:Bd==null?void 0:Bd.redirect,component:()=>nn(()=>import("./BVzqvNoh.js"),[],import.meta.url).then(e=>e.default||e)},{name:"candles-id",path:"/candles/:id()",meta:{},alias:[],redirect:Fd==null?void 0:Fd.redirect,component:()=>nn(()=>import("./DDEQIaWN.js"),__vite__mapDeps([10,1,4,5,6,9]),import.meta.url).then(e=>e.default||e)},{name:"candles",path:"/candles",meta:{},alias:[],redirect:Nd==null?void 0:Nd.redirect,component:()=>nn(()=>import("./DuAXaxTg.js"),[],import.meta.url).then(e=>e.default||e)},{name:"exchange-api-keys",path:"/exchange-api-keys",meta:{},alias:[],redirect:Ud==null?void 0:Ud.redirect,component:()=>nn(()=>import("./CzuY_Eh0.js"),__vite__mapDeps([11,6,3,9,12]),import.meta.url).then(e=>e.default||e)},{name:"index",path:"/",meta:{},alias:[],redirect:zd==null?void 0:zd.redirect,component:()=>nn(()=>import("./Bx5n1Vm4.js"),__vite__mapDeps([13,9]),import.meta.url).then(e=>e.default||e)},{name:"live-id",path:"/live/:id()",meta:{},alias:[],redirect:Vd==null?void 0:Vd.redirect,component:()=>nn(()=>import("./CzJqIIYd.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,9]),import.meta.url).then(e=>e.default||e)},{name:"live",path:"/live",meta:{},alias:[],redirect:Hd==null?void 0:Hd.redirect,component:()=>nn(()=>import("./BiSy5BNH.js"),[],import.meta.url).then(e=>e.default||e)},{name:"notification-api-keys",path:"/notification-api-keys",meta:{},alias:[],redirect:jd==null?void 0:jd.redirect,component:()=>nn(()=>import("./B1aKZWRr.js"),__vite__mapDeps([15,6,3,9,12]),import.meta.url).then(e=>e.default||e)},{name:"optimization",path:"/optimization",meta:{},alias:[],redirect:Wd==null?void 0:Wd.redirect,component:()=>nn(()=>import("./DcI7kF0e.js"),__vite__mapDeps([16,2,3,4,5,6,9]),import.meta.url).then(e=>e.default||e)},{name:"strategies-name",path:"/strategies/:name()",meta:{},alias:[],redirect:Kd==null?void 0:Kd.redirect,component:()=>nn(()=>import("./DDfehepI.js"),__vite__mapDeps([17,18,9]),import.meta.url).then(e=>e.default||e)},{name:"strategies",path:"/strategies",meta:{},alias:[],redirect:qd==null?void 0:qd.redirect,component:()=>nn(()=>import("./BpX9-e39.js"),__vite__mapDeps([19,8,9,18]),import.meta.url).then(e=>e.default||e)}],ox=(e,t,n)=>(t=t===!0?{}:t,{default:()=>{var r;return t?Ye(e,t,n):(r=n.default)==null?void 0:r.call(n)}});function Xy(e){const t=(e==null?void 0:e.meta.key)??e.path.replace(/(:\w+)\([^)]+\)/g,"$1").replace(/(:\w+)[?+*]/g,"$1").replace(/:\w+/g,n=>{var r;return((r=e.params[n.slice(1)])==null?void 0:r.toString())||""});return typeof t=="function"?t(e):t}function B8(e,t){return e===t||t===Er?!1:Xy(e)!==Xy(t)?!0:!e.matched.every((r,o)=>{var s,a;return r.components&&r.components.default===((a=(s=t.matched[o])==null?void 0:s.components)==null?void 0:a.default)})}function Qy(e,t=!1){if(e){if(e.nodeName==="#comment"&&e.nodeValue==="[")return ix(e,[],t);if(t){const n=e.cloneNode(!0);return n.querySelectorAll("[data-island-slot]").forEach(r=>{r.innerHTML=""}),[n.outerHTML]}return[e.outerHTML]}return null}function ix(e,t=[],n=!1){if(e&&e.nodeName){if(N8(e))return t;if(!F8(e)){const r=e.cloneNode(!0);n&&r.querySelectorAll("[data-island-slot]").forEach(o=>{o.innerHTML=""}),t.push(r.outerHTML)}ix(e.nextSibling,t,n)}return t}function F8(e){return e.nodeName==="#comment"&&e.nodeValue==="["}function N8(e){return e.nodeName==="#comment"&&e.nodeValue==="]"}const U8={scrollBehavior(e,t,n){var c;const r=nt(),o=((c=zn().options)==null?void 0:c.scrollBehaviorType)??"auto";let s=n||void 0;const a=typeof e.meta.scrollToTop=="function"?e.meta.scrollToTop(e,t):e.meta.scrollToTop;if(!s&&t&&e&&a!==!1&&B8(e,t)&&(s={left:0,top:0}),e.path===t.path)return t.hash&&!e.hash?{left:0,top:0}:e.hash?{el:e.hash,top:eb(e.hash),behavior:o}:!1;const u=d=>!!(d.meta.pageTransition??Yh),f=u(t)&&u(e)?"page:transition:finish":"page:finish";return new Promise(d=>{r.hooks.hookOnce(f,async()=>{await new Promise(g=>setTimeout(g,0)),e.hash&&(s={el:e.hash,top:eb(e.hash),behavior:o}),d(s)})})}};function eb(e){try{const t=document.querySelector(e);if(t)return parseFloat(getComputedStyle(t).scrollMarginTop)}catch{}return 0}const z8={hashMode:!0,scrollBehaviorType:"auto"},Zn={...z8,...U8},V8=async e=>{var f;let t,n;if(!((f=e.meta)!=null&&f.validate))return;const r=nt(),o=zn();if(([t,n]=el(()=>Promise.resolve(e.meta.validate(e))),t=await t,n(),t)===!0)return;const a=kl({statusCode:404,statusMessage:`Page Not Found: ${e.fullPath}`,data:{path:e.fullPath}}),u=o.beforeResolve(c=>{if(u(),c===e){const d=o.afterEach(async()=>{d(),await r.runWithContext(()=>Es(a)),window.history.pushState({},"",e.fullPath)});return!1}})},H8=[V8],Va={};function j8(e,t,n){const{pathname:r,search:o,hash:s}=t,a=e.indexOf("#");if(a>-1){const c=s.includes(e.slice(a))?e.slice(a).length:1;let d=s.slice(c);return d[0]!=="/"&&(d="/"+d),my(d,"")}const u=my(r,e),f=!n||hR(u,n,{trailingSlash:!0})?u:n;return f+(f.includes("?")?"":o)+s}const W8=Un({name:"nuxt:router",enforce:"pre",async setup(e){var _,x;let t,n,r=yo().app.baseURL;Zn.hashMode&&!r.includes("#")&&(r+="#");const o=((_=Zn.history)==null?void 0:_.call(Zn,r))??(Zn.hashMode?l8(r):Qw(r)),s=((x=Zn.routes)==null?void 0:x.call(Zn,Yy))??Yy;let a;const u=L8({...Zn,scrollBehavior:(E,w,T)=>{if(w===Er){a=T;return}if(Zn.scrollBehavior){if(u.options.scrollBehavior=Zn.scrollBehavior,"scrollRestoration"in window.history){const O=u.beforeEach(()=>{O(),window.history.scrollRestoration="manual"})}return Zn.scrollBehavior(E,Er,a||T)}},history:o,routes:s});"scrollRestoration"in window.history&&(window.history.scrollRestoration="auto"),e.vueApp.use(u);const f=Gr(u.currentRoute.value);u.afterEach((E,w)=>{f.value=w}),Object.defineProperty(e.vueApp.config.globalProperties,"previousRoute",{get:()=>f.value});const c=j8(r,window.location,e.payload.path),d=Gr(u.currentRoute.value),g=()=>{d.value=u.currentRoute.value};e.hook("page:finish",g),u.afterEach((E,w)=>{var T,O,M,F;((O=(T=E.matched[0])==null?void 0:T.components)==null?void 0:O.default)===((F=(M=w.matched[0])==null?void 0:M.components)==null?void 0:F.default)&&g()});const p={};for(const E in d.value)Object.defineProperty(p,E,{get:()=>d.value[E]});e._route=ml(p),e._middleware=e._middleware||{global:[],named:{}};try{[t,n]=el(()=>u.isReady()),await t,n()}catch(E){[t,n]=el(()=>e.runWithContext(()=>Es(E))),await t,n()}const v=c!==u.currentRoute.value.fullPath?u.resolve(c):u.currentRoute.value;g();const y=e.payload.state._layout;u.beforeEach(async(E,w)=>{var T;await e.callHook("page:loading:start"),E.meta=Tn(E.meta),e.isHydrating&&y&&!Bs(E.meta.layout)&&(E.meta.layout=y),e._processingMiddleware=!0;{const O=new Set([...H8,...e._middleware.global]);for(const M of E.matched){const F=M.meta.middleware;if(F)for(const z of yg(F))O.add(z)}for(const M of O){const F=typeof M=="string"?e._middleware.named[M]||await((T=Va[M])==null?void 0:T.call(Va).then(U=>U.default||U)):M;if(!F)throw new Error(`Unknown route middleware: '${M}'.`);const z=await e.runWithContext(()=>F(E,w));if(!e.payload.serverRendered&&e.isHydrating&&(z===!1||z instanceof Error)){const U=z||Kh({statusCode:404,statusMessage:`Page Not Found: ${c}`});return await e.runWithContext(()=>Es(U)),!1}if(z!==!0&&(z||z===!1))return z}}}),u.onError(async()=>{delete e._processingMiddleware,await e.callHook("page:loading:end")});const k=Kc();return u.afterEach(async(E,w,T)=>{delete e._processingMiddleware,!e.isHydrating&&k.value&&await e.runWithContext(b6),T&&await e.callHook("page:loading:end"),E.matched.length===0&&await e.runWithContext(()=>Es(Kh({statusCode:404,fatal:!1,statusMessage:`Page not found: ${E.fullPath}`,data:{path:E.fullPath}})))}),e.hooks.hookOnce("app:created",async()=>{try{"name"in v&&(v.name=void 0),await u.replace({...v,force:!0}),u.options.scrollBehavior=Zn.scrollBehavior}catch(E){await e.runWithContext(()=>Es(E))}}),{provide:{router:u}}}}),np=globalThis.requestIdleCallback||(e=>{const t=Date.now(),n={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))};return setTimeout(()=>{e(n)},1)}),K8=globalThis.cancelIdleCallback||(e=>{clearTimeout(e)}),sx=e=>{const t=nt();t.isHydrating?t.hooks.hookOnce("app:suspense:resolve",()=>{np(e)}):np(e)},q8=Un({name:"nuxt:payload",setup(e){zn().beforeResolve(async(t,n)=>{if(t.path===n.path)return;const r=await Oy(t.path);r&&Object.assign(e.static.data,r.data)}),sx(()=>{e.hooks.hook("link:prefetch",async t=>{xl(t).protocol||await Oy(t)})})}}),G8=!1;/*! + * pinia v2.1.7 + * (c) 2023 Eduardo San Martin Morote + * @license MIT + */let ax;const El=e=>ax=e,lx=Symbol();function rp(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Ha;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Ha||(Ha={}));function Z8(){const e=Vp(!0),t=e.run(()=>ne({}));let n=[],r=[];const o=Jp({install(s){El(o),o._a=s,s.provide(lx,o),s.config.globalProperties.$pinia=o,r.forEach(a=>n.push(a)),r=[]},use(s){return!this._a&&!G8?r.push(s):n.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o}const ux=()=>{};function tb(e,t,n,r=ux){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&ri()&&Vi(o),o}function vs(e,...t){e.slice().forEach(n=>{n(...t)})}const J8=e=>e();function op(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,r)=>e.set(r,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],o=e[n];rp(o)&&rp(r)&&e.hasOwnProperty(n)&&!ft(r)&&!Bi(r)?e[n]=op(o,r):e[n]=r}return e}const Y8=Symbol();function X8(e){return!rp(e)||!e.hasOwnProperty(Y8)}const{assign:Fo}=Object;function Q8(e){return!!(ft(e)&&e.effect)}function eO(e,t,n,r){const{state:o,actions:s,getters:a}=t,u=n.state.value[e];let f;function c(){u||(n.state.value[e]=o?o():{});const d=WI(n.state.value[e]);return Fo(d,s,Object.keys(a||{}).reduce((g,p)=>(g[p]=Jp(N(()=>{El(n);const v=n._s.get(e);return a[p].call(v,v)})),g),{}))}return f=cx(e,c,t,n,r,!0),f}function cx(e,t,n={},r,o,s){let a;const u=Fo({actions:{}},n),f={deep:!0};let c,d,g=[],p=[],v;const y=r.state.value[e];!s&&!y&&(r.state.value[e]={}),ne({});let k;function _(z){let U;c=d=!1,typeof z=="function"?(z(r.state.value[e]),U={type:Ha.patchFunction,storeId:e,events:v}):(op(r.state.value[e],z),U={type:Ha.patchObject,payload:z,storeId:e,events:v});const B=k=Symbol();hn().then(()=>{k===B&&(c=!0)}),d=!0,vs(g,U,r.state.value[e])}const x=s?function(){const{state:U}=n,B=U?U():{};this.$patch(q=>{Fo(q,B)})}:ux;function E(){a.stop(),g=[],p=[],r._s.delete(e)}function w(z,U){return function(){El(r);const B=Array.from(arguments),q=[],G=[];function me(se){q.push(se)}function le(se){G.push(se)}vs(p,{args:B,name:z,store:O,after:me,onError:le});let xe;try{xe=U.apply(this&&this.$id===e?this:O,B)}catch(se){throw vs(G,se),se}return xe instanceof Promise?xe.then(se=>(vs(q,se),se)).catch(se=>(vs(G,se),Promise.reject(se))):(vs(q,xe),xe)}}const T={_p:r,$id:e,$onAction:tb.bind(null,p),$patch:_,$reset:x,$subscribe(z,U={}){const B=tb(g,z,U.detached,()=>q()),q=a.run(()=>vt(()=>r.state.value[e],G=>{(U.flush==="sync"?d:c)&&z({storeId:e,type:Ha.direct,events:v},G)},Fo({},f,U)));return B},$dispose:E},O=Tn(T);r._s.set(e,O);const F=(r._a&&r._a.runWithContext||J8)(()=>r._e.run(()=>(a=Vp()).run(t)));for(const z in F){const U=F[z];if(ft(U)&&!Q8(U)||Bi(U))s||(y&&X8(U)&&(ft(U)?U.value=y[z]:op(U,y[z])),r.state.value[e][z]=U);else if(typeof U=="function"){const B=w(z,U);F[z]=B,u.actions[z]=U}}return Fo(O,F),Fo(je(O),F),Object.defineProperty(O,"$state",{get:()=>r.state.value[e],set:z=>{_(U=>{Fo(U,z)})}}),r._p.forEach(z=>{Fo(O,a.run(()=>z({store:O,app:r._a,pinia:r,options:u})))}),y&&s&&n.hydrate&&n.hydrate(O.$state,y),c=!0,d=!0,O}function Yi(e,t,n){let r,o;const s=typeof t=="function";typeof e=="string"?(r=e,o=s?n:t):(o=e,r=e.id);function a(u,f){const c=ig();return u=u||(c?qe(lx,null):null),u&&El(u),u=ax,u._s.has(r)||(s?cx(r,t,o,u):eO(r,o,u)),u._s.get(r)}return a.$id=r,a}const tO=e=>e==="defer"||e===!1;function nO(...e){var y;const t=typeof e[e.length-1]=="string"?e.pop():void 0;typeof e[0]!="string"&&e.unshift(t);let[n,r,o={}]=e;if(typeof n!="string")throw new TypeError("[nuxt] [asyncData] key must be a string.");if(typeof r!="function")throw new TypeError("[nuxt] [asyncData] handler must be a function.");const s=nt(),a=r,u=()=>null,f=()=>s.isHydrating?s.payload.data[n]:s.static.data[n];o.server=o.server??!0,o.default=o.default??u,o.getCachedData=o.getCachedData??f,o.lazy=o.lazy??!1,o.immediate=o.immediate??!0,o.deep=o.deep??wL.deep,o.dedupe=o.dedupe??"cancel";const c=()=>o.getCachedData(n,s)!=null;if(!s._asyncData[n]||!o.immediate){(y=s.payload._errors)[n]??(y[n]=null);const k=o.deep?ne:Gr;s._asyncData[n]={data:k(o.getCachedData(n,s)??o.default()),pending:ne(!c()),error:Mt(s.payload._errors,n),status:ne("idle")}}const d={...s._asyncData[n]};d.refresh=d.execute=(k={})=>{if(s._asyncDataPromises[n]){if(tO(k.dedupe??o.dedupe))return s._asyncDataPromises[n];s._asyncDataPromises[n].cancelled=!0}if((k._initial||s.isHydrating&&k._initial!==!1)&&c())return Promise.resolve(o.getCachedData(n,s));d.pending.value=!0,d.status.value="pending";const _=new Promise((x,E)=>{try{x(a(s))}catch(w){E(w)}}).then(async x=>{if(_.cancelled)return s._asyncDataPromises[n];let E=x;o.transform&&(E=await o.transform(x)),o.pick&&(E=oO(E,o.pick)),s.payload.data[n]=E,d.data.value=E,d.error.value=null,d.status.value="success"}).catch(x=>{if(_.cancelled)return s._asyncDataPromises[n];d.error.value=kl(x),d.data.value=$(o.default()),d.status.value="error"}).finally(()=>{_.cancelled||(d.pending.value=!1,delete s._asyncDataPromises[n])});return s._asyncDataPromises[n]=_,s._asyncDataPromises[n]},d.clear=()=>rO(s,n);const g=()=>d.refresh({_initial:!0}),p=o.server!==!1&&s.payload.serverRendered;{const k=nr();if(k&&!k._nuxtOnBeforeMountCbs){k._nuxtOnBeforeMountCbs=[];const E=k._nuxtOnBeforeMountCbs;B1(()=>{E.forEach(w=>{w()}),E.splice(0,E.length)}),Kt(()=>E.splice(0,E.length))}p&&s.isHydrating&&(d.error.value||c())?(d.pending.value=!1,d.status.value=d.error.value?"error":"success"):k&&(s.payload.serverRendered&&s.isHydrating||o.lazy)&&o.immediate?k._nuxtOnBeforeMountCbs.push(g):o.immediate&&g();const _=ri();if(o.watch){const E=vt(o.watch,()=>d.refresh());_&&Vi(E)}const x=s.hook("app:data:refresh",async E=>{(!E||E.includes(n))&&await d.refresh()});_&&Vi(x)}const v=Promise.resolve(s._asyncDataPromises[n]).then(()=>d);return Object.assign(v,d),v}function rO(e,t){t in e.payload.data&&(e.payload.data[t]=void 0),t in e.payload._errors&&(e.payload._errors[t]=null),e._asyncData[t]&&(e._asyncData[t].data.value=void 0,e._asyncData[t].error.value=null,e._asyncData[t].pending.value=!1,e._asyncData[t].status.value="idle"),t in e._asyncDataPromises&&(e._asyncDataPromises[t].cancelled=!0,e._asyncDataPromises[t]=void 0)}function oO(e,t){const n={};for(const r of t)n[r]=e[r];return n}const iO="$s";function Js(...e){const t=typeof e[e.length-1]=="string"?e.pop():void 0;typeof e[0]!="string"&&e.unshift(t);const[n,r]=e;if(!n||typeof n!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+n);if(r!==void 0&&typeof r!="function")throw new Error("[nuxt] [useState] init must be a function: "+r);const o=iO+n,s=nt(),a=Mt(s.payload.state,o);if(a.value===void 0&&r){const u=r();if(ft(u))return s.payload.state[o]=u,u;a.value=u}return a}function fx(e,t,n){const[r={},o]=typeof t=="string"?[{},t]:[t,n],s=N(()=>Vr(e)),a=r.key||f6([o,typeof s.value=="string"?s.value:"",...sO(r)]);if(!a||typeof a!="string")throw new TypeError("[nuxt] [useFetch] key must be a string: "+a);if(!e)throw new Error("[nuxt] [useFetch] request is missing.");const u=a===o?"$f"+a:a;if(!r.baseURL&&typeof s.value=="string"&&s.value[0]==="/"&&s.value[1]==="/")throw new Error('[nuxt] [useFetch] the request URL must not start with "//".');const{server:f,lazy:c,default:d,transform:g,pick:p,watch:v,immediate:y,getCachedData:k,deep:_,dedupe:x,...E}=r,w=Tn({...xL,...E,cache:typeof r.cache=="boolean"?void 0:r.cache}),T={server:f,lazy:c,default:d,transform:g,pick:p,immediate:y,getCachedData:k,deep:_,dedupe:x,watch:v===!1?[]:[w,s,...v||[]]};let O;return nO(u,()=>{var U;(U=O==null?void 0:O.abort)==null||U.call(O),O=typeof AbortController<"u"?new AbortController:{};const F=Vr(r.timeout);return F&&setTimeout(()=>O.abort(),F),(r.$fetch||globalThis.$fetch)(s.value,{signal:O.signal,...w})},T)}function sO(e){var n;const t=[((n=Vr(e.method))==null?void 0:n.toUpperCase())||"GET",Vr(e.baseURL)];for(const r of[e.params||e.query]){const o=Vr(r);if(!o)continue;const s={};for(const[a,u]of Object.entries(o))s[Vr(a)]=Vr(u);t.push(s)}return t}const aO={path:"/",watch:!0,decode:e=>Qa(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},lO=void 0;function nb(e,t){var f;const n={...aO,...t},r=rb(n)||{};let o;n.maxAge!==void 0?o=n.maxAge*1e3:n.expires&&(o=n.expires.getTime()-Date.now());const s=o!==void 0&&o<=0,a=Fr(s?void 0:r[e]??((f=n.default)==null?void 0:f.call(n))),u=o&&!s?fO(a,o,n.watch&&n.watch!=="shallow"):ne(a);{let c=null;try{!lO&&typeof BroadcastChannel<"u"&&(c=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const d=()=>{n.readonly||Tw(u.value,r[e])||(cO(e,u.value,n),r[e]=Fr(u.value),c==null||c.postMessage({value:n.encode(u.value)}))},g=v=>{var k;const y=v.refresh?(k=rb(n))==null?void 0:k[e]:n.decode(v.value);p=!0,r[e]=u.value=y,hn(()=>{p=!1})};let p=!1;ri()&&Vi(()=>{p=!0,d(),c==null||c.close()}),c&&(c.onmessage=({data:v})=>g(v)),n.watch?vt(u,()=>{p||d()},{deep:n.watch!=="shallow"}):d()}return u}function rb(e={}){return ZR(document.cookie,e)}function uO(e,t,n={}){return t==null?wy(e,t,{...n,maxAge:-1}):wy(e,t,n)}function cO(e,t,n={}){document.cookie=uO(e,t,n)}const ob=2147483647;function fO(e,t,n){let r,o,s=0;const a=n?ne(e):{value:e};return ri()&&Vi(()=>{o==null||o(),clearTimeout(r)}),b1((u,f)=>{n&&(o=vt(a,f));function c(){clearTimeout(r);const d=t-s,g=d{if(s+=g,s4)return Promise.all(o).then(()=>dx(e,t));t._routePreloaded.add(n);const s=r.map(a=>{var u;return(u=a.components)==null?void 0:u.default}).filter(a=>typeof a=="function");for(const a of s){const u=Promise.resolve(a()).catch(()=>{}).finally(()=>o.splice(o.indexOf(u)));o.push(u)}await Promise.all(o)}function dO(e={}){const t=e.path||window.location.pathname;let n={};try{n=Qa(sessionStorage.getItem("nuxt:reload")||"{}")}catch{}if(e.force||(n==null?void 0:n.path)!==t||(n==null?void 0:n.expires){r.value=!0}),wt(hx,!0),o=>{var f;if(r.value)return(f=t.default)==null?void 0:f.call(t);const s=t.fallback||t.placeholder;if(s)return s();const a=o.fallback||o.placeholder||"",u=o.fallbackTag||o.placeholderTag||"span";return J(u,n,a)}}}),Gd=new WeakMap;function Nj(e){if(Gd.has(e))return Gd.get(e);const t={...e};return t.render?t.render=(n,r,o,s,a,u)=>{var f;if(s.mounted$??n.mounted$){const c=(f=e.render)==null?void 0:f.bind(n)(n,r,o,s,a,u);return c.children===null||typeof c.children=="string"?vr(c):Ye(c)}else{const c=Qy(n._.vnode.el??null)??["
"];return Lh(c.join(""),c.length)}}:t.template&&(t.template=` + + + `),t.setup=(n,r)=>{var f;const o=nr(),s={...o.attrs},a=pO(o);for(const c in s)delete o.attrs[c];const u=ne(!1);return ut(()=>{Object.assign(o.attrs,s),o.vnode.dirs=a,u.value=!0}),Promise.resolve(((f=e.setup)==null?void 0:f.call(e,n,r))||{}).then(c=>typeof c!="function"?(c=c||{},c.mounted$=u,c):(...d)=>{if(u.value){const g=c(...d);return g.children===null||typeof g.children=="string"?vr(g):Ye(g)}else{const g=Qy((o==null?void 0:o.vnode.el)??null)??["
"];return Lh(g.join(""),g.length)}})},Gd.set(e,t),t}function pO(e){if(!e||!e.vnode.dirs)return null;const t=e.vnode.dirs;return e.vnode.dirs=null,t}const gO="data-n-ids",mO="-";function Ys(e){var o,s,a,u,f,c;if(typeof e!="string")throw new TypeError("[nuxt] [useId] key must be a string.");e=`n${e.slice(1)}`;const t=nt(),n=nr();if(!n)throw new TypeError("[nuxt] `useId` must be called within a component setup function.");t._id||(t._id=0),n._nuxtIdIndex||(n._nuxtIdIndex={}),(o=n._nuxtIdIndex)[e]||(o[e]=0);const r=e+mO+n._nuxtIdIndex[e]++;if(t.payload.serverRendered&&t.isHydrating&&!qe(hx,!1)){const d=((s=n.vnode.el)==null?void 0:s.nodeType)===8&&((u=(a=n.vnode.el)==null?void 0:a.nextElementSibling)!=null&&u.getAttribute)?(f=n.vnode.el)==null?void 0:f.nextElementSibling:n.vnode.el,g=JSON.parse(((c=d==null?void 0:d.getAttribute)==null?void 0:c.call(d,gO))||"{}");if(g[r])return g[r]}return e+"_"+t._id++}const vO=(...e)=>e.find(t=>t!==void 0);function yO(e){const t=e.componentName||"NuxtLink";function n(r,o){if(!r||e.trailingSlash!=="append"&&e.trailingSlash!=="remove")return r;if(typeof r=="string")return ib(r,e.trailingSlash);const s="path"in r&&r.path!==void 0?r.path:o(r).path;return{...r,name:void 0,path:ib(s,e.trailingSlash)}}return _e({name:t,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1}},setup(r,{slots:o}){const s=zn(),a=yo(),u=N(()=>{const y=r.to||r.href||"";return n(y,s.resolve)}),f=N(()=>typeof u.value=="string"&&ai(u.value,{acceptRelative:!0})),c=N(()=>r.target&&r.target!=="_self"),d=N(()=>r.external||c.value?!0:typeof u.value=="object"?!1:u.value===""||f.value),g=ne(!1),p=ne(null),v=y=>{var k;p.value=r.custom?(k=y==null?void 0:y.$el)==null?void 0:k.nextElementSibling:y==null?void 0:y.$el};if(r.prefetch!==!1&&r.noPrefetch!==!0&&r.target!=="_blank"&&!_O()){const k=nt();let _,x=null;ut(()=>{const E=bO();sx(()=>{_=np(()=>{var w;(w=p==null?void 0:p.value)!=null&&w.tagName&&(x=E.observe(p.value,async()=>{x==null||x(),x=null;const T=typeof u.value=="string"?u.value:s.resolve(u.value).fullPath;await Promise.all([k.hooks.callHook("link:prefetch",T).catch(()=>{}),!d.value&&dx(u.value,s).catch(()=>{})]),g.value=!0}))})})}),bl(()=>{_&&K8(_),x==null||x(),x=null})}return()=>{var x,E;if(!d.value){const w={ref:v,to:u.value,activeClass:r.activeClass||e.activeClass,exactActiveClass:r.exactActiveClass||e.exactActiveClass,replace:r.replace,ariaCurrentValue:r.ariaCurrentValue,custom:r.custom};return r.custom||(g.value&&(w.class=r.prefetchedClass||e.prefetchedClass),w.rel=r.rel||void 0),Ye(Tr("RouterLink"),w,o.default)}const y=typeof u.value=="object"?((x=s.resolve(u.value))==null?void 0:x.href)??null:u.value&&!r.external&&!f.value?n(Hc(a.app.baseURL,u.value),s.resolve):u.value||null,k=r.target||null,_=vO(r.noRel?"":r.rel,e.externalRelAttribute,f.value||c.value?"noopener noreferrer":"")||null;if(r.custom){if(!o.default)return null;const w=()=>Yo(y,{replace:r.replace,external:r.external});return o.default({href:y,navigate:w,get route(){if(!y)return;const T=xl(y);return{path:T.pathname,fullPath:T.pathname,get query(){return gw(T.search)},hash:T.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:y}},rel:_,target:k,isExternal:d.value,isActive:!1,isExactActive:!1})}return Ye("a",{ref:p,href:y,rel:_,target:k},(E=o.default)==null?void 0:E.call(o))}}})}const Ec=yO(_L);function ib(e,t){const n=t==="append"?_c:cg;return ai(e)&&!e.startsWith("http")?e:n(e,!0)}function bO(){const e=nt();if(e._observer)return e._observer;let t=null;const n=new Map,r=(s,a)=>(t||(t=new IntersectionObserver(u=>{for(const f of u){const c=n.get(f.target);(f.isIntersecting||f.intersectionRatio>0)&&c&&c()}})),n.set(s,a),t.observe(s),()=>{n.delete(s),t.unobserve(s),n.size===0&&(t.disconnect(),t=null)});return e._observer={observe:r}}function _O(){const e=navigator.connection;return!!(e&&(e.saveData||/2g/.test(e.effectiveType)))}const wO=Un(e=>{const t=Z8();return e.vueApp.use(t),El(t),e.payload&&e.payload.pinia&&(t.state.value=e.payload.pinia),{provide:{pinia:t}}}),xO=dc(()=>nn(()=>Promise.resolve().then(()=>UD),void 0,import.meta.url).then(e=>e.default||e.default||e)),kO=dc(()=>nn(()=>import("./B1reJhqX.js"),__vite__mapDeps([20,21]),import.meta.url).then(e=>e.default||e.default||e)),SO=[["Icon",xO],["IconCSS",kO]],EO=Un({name:"nuxt:global-components",setup(e){for(const[t,n]of SO)e.vueApp.component(t,n),e.vueApp.component("Lazy"+t,n)}}),Wo={default:()=>nn(()=>import("./cKP3bPg8.js"),[],import.meta.url).then(e=>e.default||e)},CO=Un({name:"nuxt:prefetch",setup(e){const t=zn();e.hooks.hook("app:mounted",()=>{t.beforeEach(async n=>{var o;const r=(o=n==null?void 0:n.meta)==null?void 0:o.layout;r&&typeof Wo[r]=="function"&&await Wo[r]()})}),e.hooks.hook("link:prefetch",n=>{if(ai(n))return;const r=t.resolve(n);if(!r)return;const o=r.meta.layout;let s=yg(r.meta.middleware);s=s.filter(a=>typeof a=="string");for(const a of s)typeof Va[a]=="function"&&Va[a]();o&&typeof Wo[o]=="function"&&Wo[o]()})}}),px=()=>Js("MonacoEditorNamespace",()=>null),Uj=()=>px().value,TO=Un(async e=>{let t,n;const r=(s,a)=>new Worker(new URL(`${e.$config.app.baseURL}/_nuxt/nuxt-monaco-editor/vs/${s}.js`.replace(/\/\//g,"/"),import.meta.url),{name:a,type:"module"});self.MonacoEnvironment={getWorker(s,a){switch(a){case"json":return r("language/json/json.worker",a);case"css":case"scss":case"less":return r("language/css/css.worker",a);case"html":case"handlebars":case"razor":return r("language/html/html.worker",a);case"typescript":case"javascript":return r("language/typescript/ts.worker",a);default:return r("editor/editor.worker",a)}}};const o=px();o.value=([t,n]=el(()=>nn(()=>import("./Diw-o0Tt.js").then(s=>s.e),__vite__mapDeps([22,23]),import.meta.url)),t=await t,n(),t)});function ip(e){return ri()?(Vi(e),!0):!1}function ji(e){return typeof e=="function"?e():$(e)}const sp=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const sb=()=>+Date.now(),rl=()=>{};function gx(e,t){function n(...r){return new Promise((o,s)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(o).catch(s)})}return n}function AO(e,t={}){let n,r,o=rl;const s=u=>{clearTimeout(u),o(),o=rl};return u=>{const f=ji(e),c=ji(t.maxWait);return n&&s(n),f<=0||c!==void 0&&c<=0?(r&&(s(r),r=null),Promise.resolve(u())):new Promise((d,g)=>{o=t.rejectOnCancel?g:d,c&&!r&&(r=setTimeout(()=>{n&&s(n),r=null,d(u())},c)),n=setTimeout(()=>{r&&s(r),r=null,d(u())},f)})}}function $O(...e){let t=0,n,r=!0,o=rl,s,a,u,f,c;!ft(e[0])&&typeof e[0]=="object"?{delay:a,trailing:u=!0,leading:f=!0,rejectOnCancel:c=!1}=e[0]:[a,u=!0,f=!0,c=!1]=e;const d=()=>{n&&(clearTimeout(n),n=void 0,o(),o=rl)};return p=>{const v=ji(a),y=Date.now()-t,k=()=>s=p();return d(),v<=0?(t=Date.now(),k()):(y>v&&(f||!r)?(t=Date.now(),k()):u&&(s=new Promise((_,x)=>{o=c?x:_,n=setTimeout(()=>{t=Date.now(),r=!0,_(k()),d()},Math.max(0,v-y))})),!f&&!n&&(n=setTimeout(()=>r=!0,v)),r=!1,s)}}function IO(e,t=200,n={}){return gx(AO(t,n),e)}function RO(e,t=200,n=!1,r=!0,o=!1){return gx($O(t,n,r,o),e)}function mx(e,t=1e3,n={}){const{immediate:r=!0,immediateCallback:o=!1}=n;let s=null;const a=ne(!1);function u(){s&&(clearInterval(s),s=null)}function f(){a.value=!1,u()}function c(){const d=ji(t);d<=0||(a.value=!0,o&&e(),u(),s=setInterval(e,d))}if(r&&sp&&c(),ft(t)||typeof t=="function"){const d=vt(t,()=>{a.value&&sp&&c()});ip(d)}return ip(f),{isActive:a,pause:f,resume:c}}function zj(e,t,n){let r;ft(n)?r={evaluating:n}:r=n||{};const{lazy:o=!1,evaluating:s=void 0,shallow:a=!0,onError:u=rl}=r,f=ne(!o),c=a?Gr(t):ne(t);let d=0;return on(async g=>{if(!f.value)return;d++;const p=d;let v=!1;s&&Promise.resolve().then(()=>{s.value=!0});try{const y=await e(k=>{g(()=>{s&&(s.value=!1),v||k()})});p===d&&(c.value=y)}catch(y){u(y)}finally{s&&p===d&&(s.value=!1),v=!0}}),o?N(()=>(f.value=!0,c.value)):c}function Vj(e){var t;const n=ji(e);return(t=n==null?void 0:n.$el)!=null?t:n}const LO=sp?window:void 0;function vx(e,t={}){const{immediate:n=!0,fpsLimit:r=void 0,window:o=LO}=t,s=ne(!1),a=r?1e3/r:null;let u=0,f=null;function c(p){if(!s.value||!o)return;u||(u=p);const v=p-u;if(a&&vo(u);return(f=t==null?void 0:t.cleanups)==null||f.push(d),d}function r(u){function f(...c){o(f),u(...c)}return n(f)}function o(u){const f=wa.get(e);f&&(f.delete(u),f.size||s())}function s(){wa.delete(e)}function a(u,f){var c;(c=wa.get(e))==null||c.forEach(d=>d(u,f))}return{on:n,once:r,off:o,emit:a,reset:s}}function PO(e={}){const{controls:t=!1,interval:n="requestAnimationFrame"}=e,r=ne(new Date),o=()=>r.value=new Date,s=n==="requestAnimationFrame"?vx(o,{immediate:!0}):mx(o,n,{immediate:!0});return t?{now:r,...s}:r}const MO=[{max:6e4,value:1e3,name:"second"},{max:276e4,value:6e4,name:"minute"},{max:72e6,value:36e5,name:"hour"},{max:5184e5,value:864e5,name:"day"},{max:24192e5,value:6048e5,name:"week"},{max:28512e6,value:2592e6,name:"month"},{max:Number.POSITIVE_INFINITY,value:31536e6,name:"year"}],DO={justNow:"just now",past:e=>e.match(/\d/)?`${e} ago`:e,future:e=>e.match(/\d/)?`in ${e}`:e,month:(e,t)=>e===1?t?"last month":"next month":`${e} month${e>1?"s":""}`,year:(e,t)=>e===1?t?"last year":"next year":`${e} year${e>1?"s":""}`,day:(e,t)=>e===1?t?"yesterday":"tomorrow":`${e} day${e>1?"s":""}`,week:(e,t)=>e===1?t?"last week":"next week":`${e} week${e>1?"s":""}`,hour:e=>`${e} hour${e>1?"s":""}`,minute:e=>`${e} minute${e>1?"s":""}`,second:e=>`${e} second${e>1?"s":""}`,invalid:""};function BO(e){return e.toISOString().slice(0,10)}function Hj(e,t={}){const{controls:n=!1,updateInterval:r=3e4}=t,{now:o,...s}=PO({interval:r,controls:!0}),a=N(()=>FO(new Date(ji(e)),t,ji(o)));return n?{timeAgo:a,...s}:a}function FO(e,t={},n=Date.now()){var r;const{max:o,messages:s=DO,fullDateFormatter:a=BO,units:u=MO,showSecond:f=!1,rounding:c="round"}=t,d=typeof c=="number"?_=>+_.toFixed(c):Math[c],g=+n-+e,p=Math.abs(g);function v(_,x){return d(Math.abs(_)/x.value)}function y(_,x){const E=v(_,x),w=_>0,T=k(x.name,E,w);return k(w?"past":"future",T,w)}function k(_,x,E){const w=s[_];return typeof w=="function"?w(x,E):w.replace("{0}",x.toString())}if(p<6e4&&!f)return s.justNow;if(typeof o=="number"&&p>o)return a(new Date(e));if(typeof o=="string"){const _=(r=u.find(x=>x.name===o))==null?void 0:r.max;if(_&&p>_)return a(new Date(e))}for(const[_,x]of u.entries()){if(v(g,x)<=0&&u[_-1])return y(g,u[_-1]);if(pa.value=sb()+n,f=s?()=>{u(),s(a.value)}:u,c=o==="requestAnimationFrame"?vx(f,{immediate:r}):mx(f,o,{immediate:r});return t?{timestamp:a,...c}:a}const UO=Symbol("nuxt-ui.slideover"),zO=Un(e=>{const t=Gr({component:"div",props:{}});e.vueApp.provide(UO,t)}),VO=Symbol("nuxt-ui.modal"),HO=Un(e=>{const t=Gr({component:"div",props:{}});e.vueApp.provide(VO,t)}),bg="-";function jO(e){const t=KO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(a){const u=a.split(bg);return u[0]===""&&u.length!==1&&u.shift(),yx(u,t)||WO(a)}function s(a,u){const f=n[a]||[];return u&&r[a]?[...f,...r[a]]:f}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function yx(e,t){var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?yx(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(bg);return(a=t.validators.find(({validator:u})=>u(s)))==null?void 0:a.classGroupId}const ab=/^\[(.+)\]$/;function WO(e){if(ab.test(e)){const t=ab.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function KO(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return GO(Object.entries(e.classGroups),n).forEach(([s,a])=>{ap(a,r,s,t)}),r}function ap(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:lb(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(qO(o)){ap(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,a])=>{ap(a,lb(t,s),n,r)})})}function lb(e,t){let n=e;return t.split(bg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function qO(e){return e.isThemeGetter}function GO(e,t){return t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,u])=>[t+a,u])):s);return[n,o]}):e}function ZO(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(s,a){n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)}return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return o(s,a),a},set(s,a){n.has(s)?n.set(s,a):o(s,a)}}}const bx="!";function JO(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(a){const u=[];let f=0,c=0,d;for(let k=0;kc?d-c:void 0;return{modifiers:u,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:y}}}function YO(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function XO(e){return{cache:ZO(e.cacheSize),splitModifiers:JO(e),...jO(e)}}const QO=/\s+/;function eP(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(QO).map(a=>{const{modifiers:u,hasImportantModifier:f,baseClassName:c,maybePostfixModifierPosition:d}=n(a);let g=r(d?c.substring(0,d):c),p=!!d;if(!g){if(!d)return{isTailwindClass:!1,originalClassName:a};if(g=r(c),!g)return{isTailwindClass:!1,originalClassName:a};p=!1}const v=YO(u).join(":");return{isTailwindClass:!0,modifierId:f?v+bx:v,classGroupId:g,originalClassName:a,hasPostfixModifier:p}}).reverse().filter(a=>{if(!a.isTailwindClass)return!0;const{modifierId:u,classGroupId:f,hasPostfixModifier:c}=a,d=u+f;return s.has(d)?!1:(s.add(d),o(f,c).forEach(g=>s.add(u+g)),!0)}).reverse().map(a=>a.originalClassName).join(" ")}function gt(){let e=0,t,n,r="";for(;eg(d),e());return n=XO(c),r=n.cache.get,o=n.cache.set,s=u,u(f)}function u(f){const c=r(f);if(c)return c;const d=eP(f,n);return o(f,d),d}return function(){return s(gt.apply(null,arguments))}}function It(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const wx=/^\[(?:([a-z-]+):)?(.+)\]$/i,tP=/^\d+\/\d+$/,nP=new Set(["px","full","screen"]),rP=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oP=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,iP=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,sP=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,aP=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function so(e){return Ii(e)||nP.has(e)||tP.test(e)}function Mo(e){return Xs(e,"length",gP)}function Ii(e){return!!e&&!Number.isNaN(Number(e))}function Nu(e){return Xs(e,"number",Ii)}function xa(e){return!!e&&Number.isInteger(Number(e))}function lP(e){return e.endsWith("%")&&Ii(e.slice(0,-1))}function Ke(e){return wx.test(e)}function Do(e){return rP.test(e)}const uP=new Set(["length","size","percentage"]);function cP(e){return Xs(e,uP,xx)}function fP(e){return Xs(e,"position",xx)}const dP=new Set(["image","url"]);function hP(e){return Xs(e,dP,vP)}function pP(e){return Xs(e,"",mP)}function ka(){return!0}function Xs(e,t,n){const r=wx.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function gP(e){return oP.test(e)&&!iP.test(e)}function xx(){return!1}function mP(e){return sP.test(e)}function vP(e){return aP.test(e)}function up(){const e=It("colors"),t=It("spacing"),n=It("blur"),r=It("brightness"),o=It("borderColor"),s=It("borderRadius"),a=It("borderSpacing"),u=It("borderWidth"),f=It("contrast"),c=It("grayscale"),d=It("hueRotate"),g=It("invert"),p=It("gap"),v=It("gradientColorStops"),y=It("gradientColorStopPositions"),k=It("inset"),_=It("margin"),x=It("opacity"),E=It("padding"),w=It("saturate"),T=It("scale"),O=It("sepia"),M=It("skew"),F=It("space"),z=It("translate"),U=()=>["auto","contain","none"],B=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",Ke,t],G=()=>[Ke,t],me=()=>["",so,Mo],le=()=>["auto",Ii,Ke],xe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],se=()=>["solid","dashed","dotted","double","none"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ye=()=>["start","end","center","between","around","evenly","stretch"],Bt=()=>["","0",Ke],Yt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Re=()=>[Ii,Nu],ze=()=>[Ii,Ke];return{cacheSize:500,separator:":",theme:{colors:[ka],spacing:[so,Mo],blur:["none","",Do,Ke],brightness:Re(),borderColor:[e],borderRadius:["none","","full",Do,Ke],borderSpacing:G(),borderWidth:me(),contrast:Re(),grayscale:Bt(),hueRotate:ze(),invert:Bt(),gap:G(),gradientColorStops:[e],gradientColorStopPositions:[lP,Mo],inset:q(),margin:q(),opacity:Re(),padding:G(),saturate:Re(),scale:Re(),sepia:Bt(),skew:ze(),space:G(),translate:G()},classGroups:{aspect:[{aspect:["auto","square","video",Ke]}],container:["container"],columns:[{columns:[Do]}],"break-after":[{"break-after":Yt()}],"break-before":[{"break-before":Yt()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...xe(),Ke]}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",xa,Ke]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ke]}],grow:[{grow:Bt()}],shrink:[{shrink:Bt()}],order:[{order:["first","last","none",xa,Ke]}],"grid-cols":[{"grid-cols":[ka]}],"col-start-end":[{col:["auto",{span:["full",xa,Ke]},Ke]}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":[ka]}],"row-start-end":[{row:["auto",{span:[xa,Ke]},Ke]}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ke]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ke]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...ye()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ye(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ye(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[F]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[F]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ke,t]}],"min-w":[{"min-w":[Ke,t,"min","max","fit"]}],"max-w":[{"max-w":[Ke,t,"none","full","min","max","fit","prose",{screen:[Do]},Do]}],h:[{h:[Ke,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ke,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ke,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ke,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Do,Mo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Nu]}],"font-family":[{font:[ka]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ke]}],"line-clamp":[{"line-clamp":["none",Ii,Nu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",so,Ke]}],"list-image":[{"list-image":["none",Ke]}],"list-style-type":[{list:["none","disc","decimal",Ke]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",so,Mo]}],"underline-offset":[{"underline-offset":["auto",so,Ke]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:G()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ke]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...xe(),fP]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",cP]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},hP]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...se(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:se()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...se()]}],"outline-offset":[{"outline-offset":[so,Ke]}],"outline-w":[{outline:[so,Mo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[so,Mo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Do,pP]}],"shadow-color":[{shadow:[ka]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...Se(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Se()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Do,Ke]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[g]}],saturate:[{saturate:[w]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ke]}],duration:[{duration:ze()}],ease:[{ease:["linear","in","out","in-out",Ke]}],delay:[{delay:ze()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ke]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[xa,Ke]}],"translate-x":[{"translate-x":[z]}],"translate-y":[{"translate-y":[z]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ke]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ke]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ke]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[so,Mo,Nu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}function yP(e,{cacheSize:t,prefix:n,separator:r,extend:o={},override:s={}}){nc(e,"cacheSize",t),nc(e,"prefix",n),nc(e,"separator",r);for(const a in s)bP(e[a],s[a]);for(const a in o)_P(e[a],o[a]);return e}function nc(e,t,n){n!==void 0&&(e[t]=n)}function bP(e,t){if(t)for(const n in t)nc(e,n,t[n])}function _P(e,t){if(t)for(const n in t){const r=t[n];r!==void 0&&(e[n]=(e[n]||[]).concat(r))}}function wP(e,...t){return typeof e=="function"?lp(up,e,...t):lp(()=>yP(up(),e),...t)}const er=lp(up);function xP(e,t){const n={...e};for(const r of t)delete n[r];return n}function La(e,t,n){typeof t=="string"&&(t=t.split(".").map(o=>{const s=Number(o);return isNaN(s)?o:s}));let r=e;for(const o of t){if(r==null)return n;r=r[o]}return r!==void 0?r:n}const _g={to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1}},kP=e=>Object.keys(_g).reduce((n,r)=>(e[r]!==void 0&&(n[r]=e[r]),n),{}),SP=wP({extend:{classGroups:{icons:[e=>/^i-/.test(e)]}}}),EP=dg((e,t,n,r)=>{if(r==="default"||r.startsWith("default.")||r==="popper"||r.startsWith("popper.")||r.endsWith("avatar")&&t==="size"||r.endsWith("chip")&&t==="size"||r.endsWith("badge")&&t==="size"||t==="color"||t==="variant")return!1;if(typeof e[t]=="string"&&typeof n=="string"&&e[t]&&n)return e[t]=SP(e[t],n),!0});function An(e,...t){return e==="override"?jc({},...t):EP({},...t)}function ub(e){const t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(r,o,s,a){return o+o+s+s+a+a});const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?`${parseInt(n[1],16)} ${parseInt(n[2],16)} ${parseInt(n[3],16)}`:null}function kx(e){const t=parseFloat(e);return isNaN(t)?e:t}const CP="inherit",TP="currentColor",AP="transparent",$P="#000",IP="#fff",RP={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},LP={50:"rgb(var(--color-gray-50) / )",100:"rgb(var(--color-gray-100) / )",200:"rgb(var(--color-gray-200) / )",300:"rgb(var(--color-gray-300) / )",400:"rgb(var(--color-gray-400) / )",500:"rgb(var(--color-gray-500) / )",600:"rgb(var(--color-gray-600) / )",700:"rgb(var(--color-gray-700) / )",800:"rgb(var(--color-gray-800) / )",900:"rgb(var(--color-gray-900) / )",950:"rgb(var(--color-gray-950) / )"},OP={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},PP={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},MP={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},DP={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},BP={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},FP={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},NP={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},UP={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},zP={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},VP={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},HP={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},jP={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},WP={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},KP={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},qP={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},GP={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},ZP={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},JP={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},YP={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},XP={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},QP={50:"rgb(var(--color-primary-50) / )",100:"rgb(var(--color-primary-100) / )",200:"rgb(var(--color-primary-200) / )",300:"rgb(var(--color-primary-300) / )",400:"rgb(var(--color-primary-400) / )",500:"rgb(var(--color-primary-500) / )",600:"rgb(var(--color-primary-600) / )",700:"rgb(var(--color-primary-700) / )",800:"rgb(var(--color-primary-800) / )",900:"rgb(var(--color-primary-900) / )",950:"rgb(var(--color-primary-950) / )",DEFAULT:"rgb(var(--color-primary-DEFAULT) / )"},e7={DEFAULT:"#ffffff",dark:"#333333"},t7={DEFAULT:"#333333",dark:"#f6f7ee"},Uu={inherit:CP,current:TP,transparent:AP,black:$P,white:IP,slate:RP,gray:LP,zinc:OP,neutral:PP,stone:MP,red:DP,orange:BP,amber:FP,yellow:NP,lime:UP,green:zP,emerald:VP,teal:HP,cyan:jP,sky:WP,blue:KP,indigo:qP,violet:GP,purple:ZP,fuchsia:JP,pink:YP,rose:XP,primary:QP,backdrop:e7,body:t7,"cool-gray":void 0},n7=Un(()=>{const e=Sl(),t=nt(),n=N(()=>{const o=Uu[e.ui.primary],s=Uu[e.ui.gray];return o||console.warn(`[@nuxt/ui] Primary color '${e.ui.primary}' not found in Tailwind config`),s||console.warn(`[@nuxt/ui] Gray color '${e.ui.gray}' not found in Tailwind config`),`:root { +${Object.entries(o||Uu.green).map(([a,u])=>`--color-primary-${a}: ${ub(u)};`).join(` +`)} +--color-primary-DEFAULT: var(--color-primary-500); + +${Object.entries(s||Uu.cool).map(([a,u])=>`--color-gray-${a}: ${ub(u)};`).join(` +`)} +} + +.dark { + --color-primary-DEFAULT: var(--color-primary-400); +} +`}),r={style:[{innerHTML:()=>n.value,tagPriority:-2,id:"nuxt-ui-colors"}]};if(t.isHydrating&&!t.payload.serverRendered){const o=document.createElement("style");o.innerHTML=n.value,o.setAttribute("data-nuxt-ui-colors",""),document.head.appendChild(o),r.script=[{innerHTML:"document.head.removeChild(document.querySelector('[data-nuxt-ui-colors]'))"}]}pL(r)}),r7="__NUXT_COLOR_MODE__",o7="nuxt-color-mode",ao=window[r7]||{},i7=Un(e=>{const t=Js("color-mode",()=>Tn({preference:ao.preference,value:ao.value,unknown:!1,forced:!1})).value;zn().afterEach(o=>{const s=o.meta.colorMode;s&&s!=="system"?(t.value=s,t.forced=!0):(s==="system"&&console.warn("You cannot force the colorMode to system at the page level."),t.forced=!1,t.value=t.preference==="system"?ao.getColorScheme():t.preference)});let n;function r(){n||!window.matchMedia||(n=window.matchMedia("(prefers-color-scheme: dark)"),n.addEventListener("change",()=>{!t.forced&&t.preference==="system"&&(t.value=ao.getColorScheme())}))}vt(()=>t.preference,o=>{var s;t.forced||(o==="system"?(t.value=ao.getColorScheme(),r()):t.value=o,(s=window.localStorage)==null||s.setItem(o7,o))},{immediate:!0}),vt(()=>t.value,(o,s)=>{ao.removeColorScheme(s),ao.addColorScheme(o)}),t.preference==="system"&&r(),e.hook("app:mounted",()=>{t.unknown&&(t.preference=ao.preference,t.value=ao.value,t.unknown=!1)}),e.provide("colorMode",t)}),s7=Un({name:"nuxt:chunk-reload",setup(e){const t=zn(),n=yo(),r=new Set;t.beforeEach(()=>{r.clear()}),e.hook("app:chunkError",({error:s})=>{r.add(s)});function o(s){const u="href"in s&&s.href[0]==="#"?n.app.baseURL+s.href:Hc(n.app.baseURL,s.fullPath);dO({path:u,persistState:!0})}e.hook("app:manifest:update",()=>{t.beforeResolve(o)}),t.onError((s,a)=>{r.has(s)&&o(a)})}});function cb(e){return{getItem:t=>nb(t,{...e,encode:encodeURIComponent,decode:decodeURIComponent}).value,setItem:(t,n)=>{nb(t,{...e,encode:encodeURIComponent,decode:decodeURIComponent}).value=n}}}function a7(){return{getItem:e=>nt().ssrContext?null:localStorage.getItem(e),setItem:(e,t)=>{nt().ssrContext||localStorage.setItem(e,t)}}}function l7(){return{getItem:e=>nt().ssrContext?null:sessionStorage.getItem(e),setItem:(e,t)=>{nt().ssrContext||sessionStorage.setItem(e,t)}}}const Wi={localStorage:a7(),sessionStorage:l7(),cookies:cb(),cookiesWithOptions:cb};function u7(e){return typeof e=="object"&&e!==null}function fb(e,t){return e=u7(e)?e:Object.create(null),new Proxy(e,{get(n,r,o){return r==="key"?Reflect.get(n,r,o):Reflect.get(n,r,o)||Reflect.get(t,r,o)}})}function c7(e,t){return t.reduce((n,r)=>n==null?void 0:n[r],e)}function f7(e,t,n){return t.slice(0,-1).reduce((r,o)=>/^(__proto__)$/.test(o)?{}:r[o]=r[o]||{},e)[t[t.length-1]]=n,e}function d7(e,t){return t.reduce((n,r)=>{const o=r.split(".");return f7(n,o,c7(e,o))},{})}function h7(e,t){return n=>{var r;try{const{storage:o=localStorage,beforeRestore:s=void 0,afterRestore:a=void 0,serializer:u={serialize:JSON.stringify,deserialize:JSON.parse},key:f=t.$id,paths:c=null,debug:d=!1}=n;return{storage:o,beforeRestore:s,afterRestore:a,serializer:u,key:((r=e.key)!=null?r:g=>g)(typeof f=="string"?f:f(t.$id)),paths:c,debug:d}}catch(o){return n.debug&&console.error("[pinia-plugin-persistedstate]",o),null}}}function db(e,{storage:t,serializer:n,key:r,debug:o}){try{const s=t==null?void 0:t.getItem(r);s&&e.$patch(n==null?void 0:n.deserialize(s))}catch(s){o&&console.error("[pinia-plugin-persistedstate]",s)}}function hb(e,{storage:t,serializer:n,key:r,paths:o,debug:s}){try{const a=Array.isArray(o)?d7(e,o):e;t.setItem(r,n.serialize(a))}catch(a){s&&console.error("[pinia-plugin-persistedstate]",a)}}function p7(e={}){return t=>{const{auto:n=!1}=e,{options:{persist:r=n},store:o,pinia:s}=t;if(!r)return;if(!(o.$id in s.state.value)){const u=s._s.get(o.$id.replace("__hot:",""));u&&Promise.resolve().then(()=>u.$persist());return}const a=(Array.isArray(r)?r.map(u=>fb(u,e)):[fb(r,e)]).map(h7(e,o)).filter(Boolean);o.$persist=()=>{a.forEach(u=>{hb(o.$state,u)})},o.$hydrate=({runHooks:u=!0}={})=>{a.forEach(f=>{const{beforeRestore:c,afterRestore:d}=f;u&&(c==null||c(t)),db(o,f),u&&(d==null||d(t))})},a.forEach(u=>{const{beforeRestore:f,afterRestore:c}=u;f==null||f(t),db(o,u),c==null||c(t),o.$subscribe((d,g)=>{hb(g,u)},{detached:!0})})}}const g7=Un(e=>{const{cookieOptions:t,debug:n,storage:r}=yo().public.persistedState;e.$pinia.use(p7({storage:r==="cookies"?Wi.cookiesWithOptions(t):Wi[r],debug:n}))}),m7=[$L,RL,W8,q8,wO,EO,CO,TO,zO,HO,n7,i7,s7,g7];function v7(e,t){const n=t/e*100;return 2/Math.PI*100*Math.atan(n/50)}function y7(e={}){const{duration:t=2e3,throttle:n=200,hideDelay:r=500,resetDelay:o=400}=e,s=e.estimatedProgress||v7,a=nt(),u=ne(0),f=ne(!1);let c=!1,d,g,p,v;const y=()=>k(0);function k(M=0){if(!a.isHydrating){if(M>=100)return x();w(),u.value=M<0?0:M,n?g=setTimeout(()=>{f.value=!0,T()},n):(f.value=!0,T())}}function _(){p=setTimeout(()=>{f.value=!1,v=setTimeout(()=>{u.value=0},o)},r)}function x(M={}){u.value=100,c=!0,w(),E(),M.force?(u.value=0,f.value=!1):_()}function E(){clearTimeout(p),clearTimeout(v)}function w(){clearTimeout(g),cancelAnimationFrame(d)}function T(){c=!1;let M;function F(z){if(c)return;M??(M=z);const U=z-M;u.value=Math.max(0,Math.min(100,s(t,U))),d=requestAnimationFrame(F)}d=requestAnimationFrame(F)}let O=()=>{};{const M=a.hook("page:loading:start",()=>{y()}),F=a.hook("page:loading:end",()=>{x()}),z=a.hook("vue:error",()=>x());O=()=>{z(),M(),F(),w()}}return{_cleanup:O,progress:N(()=>u.value),isLoading:N(()=>f.value),start:y,set:k,finish:x,clear:w}}function b7(e={}){const t=nt(),n=t._loadingIndicator=t._loadingIndicator||y7(e);return ri()&&(t._loadingIndicatorDeps=t._loadingIndicatorDeps||0,t._loadingIndicatorDeps++,Vi(()=>{t._loadingIndicatorDeps--,t._loadingIndicatorDeps===0&&(n._cleanup(),delete t._loadingIndicator)})),n}const _7=_e({name:"NuxtLoadingIndicator",props:{throttle:{type:Number,default:200},duration:{type:Number,default:2e3},height:{type:Number,default:3},color:{type:[String,Boolean],default:"repeating-linear-gradient(to right,#00dc82 0%,#34cdfe 50%,#0047e1 100%)"},estimatedProgress:{type:Function,required:!1}},setup(e,{slots:t,expose:n}){const{progress:r,isLoading:o,start:s,finish:a,clear:u}=b7({duration:e.duration,throttle:e.throttle,estimatedProgress:e.estimatedProgress});return n({progress:r,isLoading:o,start:s,finish:a,clear:u}),()=>Ye("div",{class:"nuxt-loading-indicator",style:{position:"fixed",top:0,right:0,left:0,pointerEvents:"none",width:"auto",height:`${e.height}px`,opacity:o.value?1:0,background:e.color||void 0,backgroundSize:`${100/r.value*100}% auto`,transform:`scaleX(${r.value}%)`,transformOrigin:"left",transition:"transform 0.1s, height 0.4s, opacity 0.4s",zIndex:999999}},t)}});function w7(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"})])}function pb(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15M12 9l-3 3m0 0 3 3m-3-3h12.75"})])}function x7(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})])}function gb(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0M3.124 7.5A8.969 8.969 0 0 1 5.292 3m13.416 0a8.969 8.969 0 0 1 2.168 4.5"})])}function Sx(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 15.75V18m-7.5-6.75h.008v.008H8.25v-.008Zm0 2.25h.008v.008H8.25V13.5Zm0 2.25h.008v.008H8.25v-.008Zm0 2.25h.008v.008H8.25V18Zm2.498-6.75h.007v.008h-.007v-.008Zm0 2.25h.007v.008h-.007V13.5Zm0 2.25h.007v.008h-.007v-.008Zm0 2.25h.007v.008h-.007V18Zm2.504-6.75h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V13.5Zm0 2.25h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V18Zm2.498-6.75h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V13.5ZM8.25 6h7.5v2.25h-7.5V6ZM12 2.25c-1.892 0-3.758.11-5.593.322C5.307 2.7 4.5 3.65 4.5 4.757V19.5a2.25 2.25 0 0 0 2.25 2.25h10.5a2.25 2.25 0 0 0 2.25-2.25V4.757c0-1.108-.806-2.057-1.907-2.185A48.507 48.507 0 0 0 12 2.25Z"})])}function mb(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.076-4.076a1.526 1.526 0 0 1 1.037-.443 48.282 48.282 0 0 0 5.68-.494c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"})])}function k7(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m4.5 12.75 6 6 9-13.5"})])}function vb(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"})])}function Ex(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"})])}function yb(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12a7.5 7.5 0 0 0 15 0m-15 0a7.5 7.5 0 1 1 15 0m-15 0H3m16.5 0H21m-1.5 0H12m-8.457 3.077 1.41-.513m14.095-5.13 1.41-.513M5.106 17.785l1.15-.964m11.49-9.642 1.149-.964M7.501 19.795l.75-1.3m7.5-12.99.75-1.3m-6.063 16.658.26-1.477m2.605-14.772.26-1.477m0 17.726-.26-1.477M10.698 4.614l-.26-1.477M16.5 19.794l-.75-1.299M7.5 4.205 12 12m6.894 5.785-1.149-.964M6.256 7.178l-1.15-.964m15.352 8.864-1.41-.513M4.954 9.435l-1.41-.514M12.002 12l-3.75 6.495"})])}function Cx(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Zm.75-12h9v9h-9v-9Z"})])}function Tx(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6v12m-3-2.818.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-2.003-.659-1.106-.879-1.106-2.303 0-3.182s2.9-.879 4.006 0l.415.33M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function bb(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})])}function _b(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})])}function S7(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 12.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 18.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5Z"})])}function E7(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"})])}function C7(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"})])}function wb(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Zm6-10.125a1.875 1.875 0 1 1-3.75 0 1.875 1.875 0 0 1 3.75 0Zm1.294 6.336a6.721 6.721 0 0 1-3.17.789 6.721 6.721 0 0 1-3.168-.789 3.376 3.376 0 0 1 6.338 0Z"})])}function Ax(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"})])}function xb(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z"})])}function T7(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"})])}function A7(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M18.364 18.364A9 9 0 0 0 5.636 5.636m12.728 12.728A9 9 0 0 1 5.636 5.636m12.728 12.728L5.636 5.636"})])}function kb(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z"})])}function $7(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"})])}function Sb(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"})])}function wg(e,t){return H(),J("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[R("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})])}async function Eb(e,t=!1){let n=yo().public.apiBaseUrl;if(!n)throw new Error("apiBaseUrl is not defined");n==="/"&&(n="");let r=n+e;e.startsWith("https://")&&(r=e);const o=t?{Authorization:`${At().authToken}`}:void 0,{data:s,error:a}=await fx(`${r}`,{headers:o,server:!1,lazy:!0},"$UqgiltlUfE");return{data:s,error:a}}async function jt(e,t,n=!1){let r=yo().public.apiBaseUrl;if(!r)throw new Error("apiBaseUrl is not defined");r==="/"&&(r="");let o=r+e;e.startsWith("https://")&&(o=e);const s=n?{Authorization:`${At().authToken}`,"Content-Type":"application/json"}:{"Content-Type":"application/json"},{data:a,error:u}=await fx(`${o}`,{method:"POST",body:JSON.stringify(t),headers:s,server:!1,lazy:!0},"$HgqqyPIEgZ");return{data:a,error:u}}function $x(){const e=Js("notifications",()=>[]);function t(r){const o={id:new Date().getTime().toString(),...r};return e.value.findIndex(a=>a.id===o.id)===-1&&e.value.push(o),o}function n(r){e.value=e.value.filter(o=>o.id!==r)}return{add:t,remove:n}}function Ne(e,t){if(typeof window>"u")return;const n=$x(),r=e.charAt(0).toUpperCase()+e.slice(1),o=e==="error"?"red":"green",s=e==="error"?"i-heroicons i-heroicons-x-circle":"i-heroicons i-heroicons-check-circle";n.add({title:r,description:t,color:o,icon:s})}function Ei(e){e.response?e.response.data&&e.response.data.message&&Ne("error",e.response.data.message):e.value?e.value.data&&e.value.data.message?Ne("error",e.value.data.message):e.value.data&&e.value.data.error&&Ne("error",e.value.data.error):e.message?Ne("error",e.message):Ne("error","An error occurred")}var Sa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function I7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cc={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */Cc.exports;(function(e,t){(function(){var n,r="4.17.21",o=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",u="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",c=500,d="__lodash_placeholder__",g=1,p=2,v=4,y=1,k=2,_=1,x=2,E=4,w=8,T=16,O=32,M=64,F=128,z=256,U=512,B=30,q="...",G=800,me=16,le=1,xe=2,se=3,Se=1/0,ye=9007199254740991,Bt=17976931348623157e292,Yt=NaN,Re=4294967295,ze=Re-1,Ut=Re>>>1,zt=[["ary",F],["bind",_],["bindKey",x],["curry",w],["curryRight",T],["flip",U],["partial",O],["partialRight",M],["rearg",z]],yn="[object Arguments]",Et="[object Array]",te="[object AsyncFunction]",be="[object Boolean]",he="[object Date]",Ee="[object DOMException]",rt="[object Error]",yt="[object Function]",A="[object GeneratorFunction]",P="[object Map]",W="[object Number]",re="[object Null]",Z="[object Object]",fe="[object Promise]",ve="[object Proxy]",ue="[object RegExp]",ce="[object Set]",ie="[object String]",we="[object Symbol]",Le="[object Undefined]",Ce="[object WeakMap]",Fe="[object WeakSet]",He="[object ArrayBuffer]",ot="[object DataView]",xt="[object Float32Array]",Ft="[object Float64Array]",bn="[object Int8Array]",Rr="[object Int16Array]",ts="[object Int32Array]",Zr="[object Uint8Array]",ns="[object Uint8ClampedArray]",sn="[object Uint16Array]",$n="[object Uint32Array]",Bl=/\b__p \+= '';/g,$k=/\b(__p \+=) '' \+/g,Ik=/(__e\(.*?\)|\b__t\)) \+\n'';/g,e0=/&(?:amp|lt|gt|quot|#39);/g,t0=/[&<>"']/g,Rk=RegExp(e0.source),Lk=RegExp(t0.source),Ok=/<%-([\s\S]+?)%>/g,Pk=/<%([\s\S]+?)%>/g,n0=/<%=([\s\S]+?)%>/g,Mk=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dk=/^\w*$/,Bk=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,of=/[\\^$.*+?()[\]{}|]/g,Fk=RegExp(of.source),sf=/^\s+/,Nk=/\s/,Uk=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,zk=/\{\n\/\* \[wrapped with (.+)\] \*/,Vk=/,? & /,Hk=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,jk=/[()=,{}\[\]\/\s]/,Wk=/\\(\\)?/g,Kk=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,r0=/\w*$/,qk=/^[-+]0x[0-9a-f]+$/i,Gk=/^0b[01]+$/i,Zk=/^\[object .+?Constructor\]$/,Jk=/^0o[0-7]+$/i,Yk=/^(?:0|[1-9]\d*)$/,Xk=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Fl=/($^)/,Qk=/['\n\r\u2028\u2029\\]/g,Nl="\\ud800-\\udfff",eS="\\u0300-\\u036f",tS="\\ufe20-\\ufe2f",nS="\\u20d0-\\u20ff",o0=eS+tS+nS,i0="\\u2700-\\u27bf",s0="a-z\\xdf-\\xf6\\xf8-\\xff",rS="\\xac\\xb1\\xd7\\xf7",oS="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",iS="\\u2000-\\u206f",sS=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a0="A-Z\\xc0-\\xd6\\xd8-\\xde",l0="\\ufe0e\\ufe0f",u0=rS+oS+iS+sS,af="['’]",aS="["+Nl+"]",c0="["+u0+"]",Ul="["+o0+"]",f0="\\d+",lS="["+i0+"]",d0="["+s0+"]",h0="[^"+Nl+u0+f0+i0+s0+a0+"]",lf="\\ud83c[\\udffb-\\udfff]",uS="(?:"+Ul+"|"+lf+")",p0="[^"+Nl+"]",uf="(?:\\ud83c[\\udde6-\\uddff]){2}",cf="[\\ud800-\\udbff][\\udc00-\\udfff]",rs="["+a0+"]",g0="\\u200d",m0="(?:"+d0+"|"+h0+")",cS="(?:"+rs+"|"+h0+")",v0="(?:"+af+"(?:d|ll|m|re|s|t|ve))?",y0="(?:"+af+"(?:D|LL|M|RE|S|T|VE))?",b0=uS+"?",_0="["+l0+"]?",fS="(?:"+g0+"(?:"+[p0,uf,cf].join("|")+")"+_0+b0+")*",dS="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",hS="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",w0=_0+b0+fS,pS="(?:"+[lS,uf,cf].join("|")+")"+w0,gS="(?:"+[p0+Ul+"?",Ul,uf,cf,aS].join("|")+")",mS=RegExp(af,"g"),vS=RegExp(Ul,"g"),ff=RegExp(lf+"(?="+lf+")|"+gS+w0,"g"),yS=RegExp([rs+"?"+d0+"+"+v0+"(?="+[c0,rs,"$"].join("|")+")",cS+"+"+y0+"(?="+[c0,rs+m0,"$"].join("|")+")",rs+"?"+m0+"+"+v0,rs+"+"+y0,hS,dS,f0,pS].join("|"),"g"),bS=RegExp("["+g0+Nl+o0+l0+"]"),_S=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,wS=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],xS=-1,$t={};$t[xt]=$t[Ft]=$t[bn]=$t[Rr]=$t[ts]=$t[Zr]=$t[ns]=$t[sn]=$t[$n]=!0,$t[yn]=$t[Et]=$t[He]=$t[be]=$t[ot]=$t[he]=$t[rt]=$t[yt]=$t[P]=$t[W]=$t[Z]=$t[ue]=$t[ce]=$t[ie]=$t[Ce]=!1;var Ct={};Ct[yn]=Ct[Et]=Ct[He]=Ct[ot]=Ct[be]=Ct[he]=Ct[xt]=Ct[Ft]=Ct[bn]=Ct[Rr]=Ct[ts]=Ct[P]=Ct[W]=Ct[Z]=Ct[ue]=Ct[ce]=Ct[ie]=Ct[we]=Ct[Zr]=Ct[ns]=Ct[sn]=Ct[$n]=!0,Ct[rt]=Ct[yt]=Ct[Ce]=!1;var kS={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},SS={"&":"&","<":"<",">":">",'"':""","'":"'"},ES={"&":"&","<":"<",">":">",""":'"',"'":"'"},CS={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},TS=parseFloat,AS=parseInt,x0=typeof Sa=="object"&&Sa&&Sa.Object===Object&&Sa,$S=typeof self=="object"&&self&&self.Object===Object&&self,an=x0||$S||Function("return this")(),df=t&&!t.nodeType&&t,li=df&&!0&&e&&!e.nodeType&&e,k0=li&&li.exports===df,hf=k0&&x0.process,rr=function(){try{var V=li&&li.require&&li.require("util").types;return V||hf&&hf.binding&&hf.binding("util")}catch{}}(),S0=rr&&rr.isArrayBuffer,E0=rr&&rr.isDate,C0=rr&&rr.isMap,T0=rr&&rr.isRegExp,A0=rr&&rr.isSet,$0=rr&&rr.isTypedArray;function Hn(V,Y,K){switch(K.length){case 0:return V.call(Y);case 1:return V.call(Y,K[0]);case 2:return V.call(Y,K[0],K[1]);case 3:return V.call(Y,K[0],K[1],K[2])}return V.apply(Y,K)}function IS(V,Y,K,ke){for(var Ue=-1,dt=V==null?0:V.length;++Ue-1}function pf(V,Y,K){for(var ke=-1,Ue=V==null?0:V.length;++ke-1;);return K}function B0(V,Y){for(var K=V.length;K--&&os(Y,V[K],0)>-1;);return K}function NS(V,Y){for(var K=V.length,ke=0;K--;)V[K]===Y&&++ke;return ke}var US=yf(kS),zS=yf(SS);function VS(V){return"\\"+CS[V]}function HS(V,Y){return V==null?n:V[Y]}function is(V){return bS.test(V)}function jS(V){return _S.test(V)}function WS(V){for(var Y,K=[];!(Y=V.next()).done;)K.push(Y.value);return K}function xf(V){var Y=-1,K=Array(V.size);return V.forEach(function(ke,Ue){K[++Y]=[Ue,ke]}),K}function F0(V,Y){return function(K){return V(Y(K))}}function ko(V,Y){for(var K=-1,ke=V.length,Ue=0,dt=[];++K-1}function LE(i,l){var h=this.__data__,m=ou(h,i);return m<0?(++this.size,h.push([i,l])):h[m][1]=l,this}Jr.prototype.clear=AE,Jr.prototype.delete=$E,Jr.prototype.get=IE,Jr.prototype.has=RE,Jr.prototype.set=LE;function Yr(i){var l=-1,h=i==null?0:i.length;for(this.clear();++l=l?i:l)),i}function ar(i,l,h,m,b,C){var I,D=l&g,j=l&p,Q=l&v;if(h&&(I=b?h(i,m,b,C):h(i)),I!==n)return I;if(!Dt(i))return i;var ee=Ve(i);if(ee){if(I=D5(i),!D)return In(i,I)}else{var oe=gn(i),ge=oe==yt||oe==A;if($o(i))return _m(i,D);if(oe==Z||oe==yn||ge&&!b){if(I=j||ge?{}:Nm(i),!D)return j?E5(i,GE(I,i)):S5(i,J0(I,i))}else{if(!Ct[oe])return b?i:{};I=B5(i,oe,D)}}C||(C=new xr);var Te=C.get(i);if(Te)return Te;C.set(i,I),pv(i)?i.forEach(function(Me){I.add(ar(Me,l,h,Me,i,C))}):dv(i)&&i.forEach(function(Me,Qe){I.set(Qe,ar(Me,l,h,Qe,i,C))});var Pe=Q?j?Gf:qf:j?Ln:tn,Ze=ee?n:Pe(i);return or(Ze||i,function(Me,Qe){Ze&&(Qe=Me,Me=i[Qe]),ua(I,Qe,ar(Me,l,h,Qe,i,C))}),I}function ZE(i){var l=tn(i);return function(h){return Y0(h,i,l)}}function Y0(i,l,h){var m=h.length;if(i==null)return!m;for(i=St(i);m--;){var b=h[m],C=l[b],I=i[b];if(I===n&&!(b in i)||!C(I))return!1}return!0}function X0(i,l,h){if(typeof i!="function")throw new ir(a);return ma(function(){i.apply(n,h)},l)}function ca(i,l,h,m){var b=-1,C=zl,I=!0,D=i.length,j=[],Q=l.length;if(!D)return j;h&&(l=Rt(l,jn(h))),m?(C=pf,I=!1):l.length>=o&&(C=ra,I=!1,l=new fi(l));e:for(;++bb?0:b+h),m=m===n||m>b?b:We(m),m<0&&(m+=b),m=h>m?0:mv(m);h0&&h(D)?l>1?ln(D,l-1,h,m,b):xo(b,D):m||(b[b.length]=D)}return b}var $f=Cm(),tm=Cm(!0);function Lr(i,l){return i&&$f(i,l,tn)}function If(i,l){return i&&tm(i,l,tn)}function su(i,l){return wo(l,function(h){return no(i[h])})}function hi(i,l){l=To(l,i);for(var h=0,m=l.length;i!=null&&hl}function XE(i,l){return i!=null&&bt.call(i,l)}function QE(i,l){return i!=null&&l in St(i)}function e5(i,l,h){return i>=pn(l,h)&&i=120&&ee.length>=120)?new fi(I&&ee):n}ee=i[0];var oe=-1,ge=D[0];e:for(;++oe-1;)D!==i&&Yl.call(D,j,1),Yl.call(i,j,1);return i}function dm(i,l){for(var h=i?l.length:0,m=h-1;h--;){var b=l[h];if(h==m||b!==C){var C=b;to(b)?Yl.call(i,b,1):Uf(i,b)}}return i}function Bf(i,l){return i+eu(K0()*(l-i+1))}function h5(i,l,h,m){for(var b=-1,C=Qt(Ql((l-i)/(h||1)),0),I=K(C);C--;)I[m?C:++b]=i,i+=h;return I}function Ff(i,l){var h="";if(!i||l<1||l>ye)return h;do l%2&&(h+=i),l=eu(l/2),l&&(i+=i);while(l);return h}function Je(i,l){return td(Vm(i,l,On),i+"")}function p5(i){return Z0(ms(i))}function g5(i,l){var h=ms(i);return vu(h,di(l,0,h.length))}function ha(i,l,h,m){if(!Dt(i))return i;l=To(l,i);for(var b=-1,C=l.length,I=C-1,D=i;D!=null&&++bb?0:b+l),h=h>b?b:h,h<0&&(h+=b),b=l>h?0:h-l>>>0,l>>>=0;for(var C=K(b);++m>>1,I=i[C];I!==null&&!Kn(I)&&(h?I<=l:I=o){var Q=l?null:$5(i);if(Q)return Hl(Q);I=!1,b=ra,j=new fi}else j=l?[]:D;e:for(;++m=m?i:lr(i,l,h)}var bm=sE||function(i){return an.clearTimeout(i)};function _m(i,l){if(l)return i.slice();var h=i.length,m=z0?z0(h):new i.constructor(h);return i.copy(m),m}function jf(i){var l=new i.constructor(i.byteLength);return new Zl(l).set(new Zl(i)),l}function _5(i,l){var h=l?jf(i.buffer):i.buffer;return new i.constructor(h,i.byteOffset,i.byteLength)}function w5(i){var l=new i.constructor(i.source,r0.exec(i));return l.lastIndex=i.lastIndex,l}function x5(i){return la?St(la.call(i)):{}}function wm(i,l){var h=l?jf(i.buffer):i.buffer;return new i.constructor(h,i.byteOffset,i.length)}function xm(i,l){if(i!==l){var h=i!==n,m=i===null,b=i===i,C=Kn(i),I=l!==n,D=l===null,j=l===l,Q=Kn(l);if(!D&&!Q&&!C&&i>l||C&&I&&j&&!D&&!Q||m&&I&&j||!h&&j||!b)return 1;if(!m&&!C&&!Q&&i=D)return j;var Q=h[m];return j*(Q=="desc"?-1:1)}}return i.index-l.index}function km(i,l,h,m){for(var b=-1,C=i.length,I=h.length,D=-1,j=l.length,Q=Qt(C-I,0),ee=K(j+Q),oe=!m;++D1?h[b-1]:n,I=b>2?h[2]:n;for(C=i.length>3&&typeof C=="function"?(b--,C):n,I&&wn(h[0],h[1],I)&&(C=b<3?n:C,b=1),l=St(l);++m-1?b[C?l[I]:I]:n}}function $m(i){return eo(function(l){var h=l.length,m=h,b=sr.prototype.thru;for(i&&l.reverse();m--;){var C=l[m];if(typeof C!="function")throw new ir(a);if(b&&!I&&gu(C)=="wrapper")var I=new sr([],!0)}for(m=I?m:h;++m1&&it.reverse(),ee&&jD))return!1;var Q=C.get(i),ee=C.get(l);if(Q&&ee)return Q==l&&ee==i;var oe=-1,ge=!0,Te=h&k?new fi:n;for(C.set(i,l),C.set(l,i);++oe1?"& ":"")+l[m],l=l.join(h>2?", ":" "),i.replace(Uk,`{ +/* [wrapped with `+l+`] */ +`)}function N5(i){return Ve(i)||mi(i)||!!(j0&&i&&i[j0])}function to(i,l){var h=typeof i;return l=l??ye,!!l&&(h=="number"||h!="symbol"&&Yk.test(i))&&i>-1&&i%1==0&&i0){if(++l>=G)return arguments[0]}else l=0;return i.apply(n,arguments)}}function vu(i,l){var h=-1,m=i.length,b=m-1;for(l=l===n?m:l;++h1?i[l-1]:n;return h=typeof h=="function"?(i.pop(),h):n,ev(i,h)});function tv(i){var l=S(i);return l.__chain__=!0,l}function JC(i,l){return l(i),i}function yu(i,l){return l(i)}var YC=eo(function(i){var l=i.length,h=l?i[0]:0,m=this.__wrapped__,b=function(C){return Af(C,i)};return l>1||this.__actions__.length||!(m instanceof et)||!to(h)?this.thru(b):(m=m.slice(h,+h+(l?1:0)),m.__actions__.push({func:yu,args:[b],thisArg:n}),new sr(m,this.__chain__).thru(function(C){return l&&!C.length&&C.push(n),C}))});function XC(){return tv(this)}function QC(){return new sr(this.value(),this.__chain__)}function eT(){this.__values__===n&&(this.__values__=gv(this.value()));var i=this.__index__>=this.__values__.length,l=i?n:this.__values__[this.__index__++];return{done:i,value:l}}function tT(){return this}function nT(i){for(var l,h=this;h instanceof ru;){var m=Gm(h);m.__index__=0,m.__values__=n,l?b.__wrapped__=m:l=m;var b=m;h=h.__wrapped__}return b.__wrapped__=i,l}function rT(){var i=this.__wrapped__;if(i instanceof et){var l=i;return this.__actions__.length&&(l=new et(this)),l=l.reverse(),l.__actions__.push({func:yu,args:[nd],thisArg:n}),new sr(l,this.__chain__)}return this.thru(nd)}function oT(){return vm(this.__wrapped__,this.__actions__)}var iT=cu(function(i,l,h){bt.call(i,h)?++i[h]:Xr(i,h,1)});function sT(i,l,h){var m=Ve(i)?I0:JE;return h&&wn(i,l,h)&&(l=n),m(i,Oe(l,3))}function aT(i,l){var h=Ve(i)?wo:em;return h(i,Oe(l,3))}var lT=Am(Zm),uT=Am(Jm);function cT(i,l){return ln(bu(i,l),1)}function fT(i,l){return ln(bu(i,l),Se)}function dT(i,l,h){return h=h===n?1:We(h),ln(bu(i,l),h)}function nv(i,l){var h=Ve(i)?or:Eo;return h(i,Oe(l,3))}function rv(i,l){var h=Ve(i)?RS:Q0;return h(i,Oe(l,3))}var hT=cu(function(i,l,h){bt.call(i,h)?i[h].push(l):Xr(i,h,[l])});function pT(i,l,h,m){i=Rn(i)?i:ms(i),h=h&&!m?We(h):0;var b=i.length;return h<0&&(h=Qt(b+h,0)),Su(i)?h<=b&&i.indexOf(l,h)>-1:!!b&&os(i,l,h)>-1}var gT=Je(function(i,l,h){var m=-1,b=typeof l=="function",C=Rn(i)?K(i.length):[];return Eo(i,function(I){C[++m]=b?Hn(l,I,h):fa(I,l,h)}),C}),mT=cu(function(i,l,h){Xr(i,h,l)});function bu(i,l){var h=Ve(i)?Rt:sm;return h(i,Oe(l,3))}function vT(i,l,h,m){return i==null?[]:(Ve(l)||(l=l==null?[]:[l]),h=m?n:h,Ve(h)||(h=h==null?[]:[h]),cm(i,l,h))}var yT=cu(function(i,l,h){i[h?0:1].push(l)},function(){return[[],[]]});function bT(i,l,h){var m=Ve(i)?gf:P0,b=arguments.length<3;return m(i,Oe(l,4),h,b,Eo)}function _T(i,l,h){var m=Ve(i)?LS:P0,b=arguments.length<3;return m(i,Oe(l,4),h,b,Q0)}function wT(i,l){var h=Ve(i)?wo:em;return h(i,xu(Oe(l,3)))}function xT(i){var l=Ve(i)?Z0:p5;return l(i)}function kT(i,l,h){(h?wn(i,l,h):l===n)?l=1:l=We(l);var m=Ve(i)?WE:g5;return m(i,l)}function ST(i){var l=Ve(i)?KE:v5;return l(i)}function ET(i){if(i==null)return 0;if(Rn(i))return Su(i)?ss(i):i.length;var l=gn(i);return l==P||l==ce?i.size:Pf(i).length}function CT(i,l,h){var m=Ve(i)?mf:y5;return h&&wn(i,l,h)&&(l=n),m(i,Oe(l,3))}var TT=Je(function(i,l){if(i==null)return[];var h=l.length;return h>1&&wn(i,l[0],l[1])?l=[]:h>2&&wn(l[0],l[1],l[2])&&(l=[l[0]]),cm(i,ln(l,1),[])}),_u=aE||function(){return an.Date.now()};function AT(i,l){if(typeof l!="function")throw new ir(a);return i=We(i),function(){if(--i<1)return l.apply(this,arguments)}}function ov(i,l,h){return l=h?n:l,l=i&&l==null?i.length:l,Qr(i,F,n,n,n,n,l)}function iv(i,l){var h;if(typeof l!="function")throw new ir(a);return i=We(i),function(){return--i>0&&(h=l.apply(this,arguments)),i<=1&&(l=n),h}}var od=Je(function(i,l,h){var m=_;if(h.length){var b=ko(h,ps(od));m|=O}return Qr(i,m,l,h,b)}),sv=Je(function(i,l,h){var m=_|x;if(h.length){var b=ko(h,ps(sv));m|=O}return Qr(l,m,i,h,b)});function av(i,l,h){l=h?n:l;var m=Qr(i,w,n,n,n,n,n,l);return m.placeholder=av.placeholder,m}function lv(i,l,h){l=h?n:l;var m=Qr(i,T,n,n,n,n,n,l);return m.placeholder=lv.placeholder,m}function uv(i,l,h){var m,b,C,I,D,j,Q=0,ee=!1,oe=!1,ge=!0;if(typeof i!="function")throw new ir(a);l=cr(l)||0,Dt(h)&&(ee=!!h.leading,oe="maxWait"in h,C=oe?Qt(cr(h.maxWait)||0,l):C,ge="trailing"in h?!!h.trailing:ge);function Te(Ht){var Sr=m,oo=b;return m=b=n,Q=Ht,I=i.apply(oo,Sr),I}function Pe(Ht){return Q=Ht,D=ma(Qe,l),ee?Te(Ht):I}function Ze(Ht){var Sr=Ht-j,oo=Ht-Q,Av=l-Sr;return oe?pn(Av,C-oo):Av}function Me(Ht){var Sr=Ht-j,oo=Ht-Q;return j===n||Sr>=l||Sr<0||oe&&oo>=C}function Qe(){var Ht=_u();if(Me(Ht))return it(Ht);D=ma(Qe,Ze(Ht))}function it(Ht){return D=n,ge&&m?Te(Ht):(m=b=n,I)}function qn(){D!==n&&bm(D),Q=0,m=j=b=D=n}function xn(){return D===n?I:it(_u())}function Gn(){var Ht=_u(),Sr=Me(Ht);if(m=arguments,b=this,j=Ht,Sr){if(D===n)return Pe(j);if(oe)return bm(D),D=ma(Qe,l),Te(j)}return D===n&&(D=ma(Qe,l)),I}return Gn.cancel=qn,Gn.flush=xn,Gn}var $T=Je(function(i,l){return X0(i,1,l)}),IT=Je(function(i,l,h){return X0(i,cr(l)||0,h)});function RT(i){return Qr(i,U)}function wu(i,l){if(typeof i!="function"||l!=null&&typeof l!="function")throw new ir(a);var h=function(){var m=arguments,b=l?l.apply(this,m):m[0],C=h.cache;if(C.has(b))return C.get(b);var I=i.apply(this,m);return h.cache=C.set(b,I)||C,I};return h.cache=new(wu.Cache||Yr),h}wu.Cache=Yr;function xu(i){if(typeof i!="function")throw new ir(a);return function(){var l=arguments;switch(l.length){case 0:return!i.call(this);case 1:return!i.call(this,l[0]);case 2:return!i.call(this,l[0],l[1]);case 3:return!i.call(this,l[0],l[1],l[2])}return!i.apply(this,l)}}function LT(i){return iv(2,i)}var OT=b5(function(i,l){l=l.length==1&&Ve(l[0])?Rt(l[0],jn(Oe())):Rt(ln(l,1),jn(Oe()));var h=l.length;return Je(function(m){for(var b=-1,C=pn(m.length,h);++b=l}),mi=rm(function(){return arguments}())?rm:function(i){return Nt(i)&&bt.call(i,"callee")&&!H0.call(i,"callee")},Ve=K.isArray,GT=S0?jn(S0):n5;function Rn(i){return i!=null&&ku(i.length)&&!no(i)}function Vt(i){return Nt(i)&&Rn(i)}function ZT(i){return i===!0||i===!1||Nt(i)&&_n(i)==be}var $o=uE||md,JT=E0?jn(E0):r5;function YT(i){return Nt(i)&&i.nodeType===1&&!va(i)}function XT(i){if(i==null)return!0;if(Rn(i)&&(Ve(i)||typeof i=="string"||typeof i.splice=="function"||$o(i)||gs(i)||mi(i)))return!i.length;var l=gn(i);if(l==P||l==ce)return!i.size;if(ga(i))return!Pf(i).length;for(var h in i)if(bt.call(i,h))return!1;return!0}function QT(i,l){return da(i,l)}function eA(i,l,h){h=typeof h=="function"?h:n;var m=h?h(i,l):n;return m===n?da(i,l,n,h):!!m}function sd(i){if(!Nt(i))return!1;var l=_n(i);return l==rt||l==Ee||typeof i.message=="string"&&typeof i.name=="string"&&!va(i)}function tA(i){return typeof i=="number"&&W0(i)}function no(i){if(!Dt(i))return!1;var l=_n(i);return l==yt||l==A||l==te||l==ve}function fv(i){return typeof i=="number"&&i==We(i)}function ku(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=ye}function Dt(i){var l=typeof i;return i!=null&&(l=="object"||l=="function")}function Nt(i){return i!=null&&typeof i=="object"}var dv=C0?jn(C0):i5;function nA(i,l){return i===l||Of(i,l,Jf(l))}function rA(i,l,h){return h=typeof h=="function"?h:n,Of(i,l,Jf(l),h)}function oA(i){return hv(i)&&i!=+i}function iA(i){if(V5(i))throw new Ue(s);return om(i)}function sA(i){return i===null}function aA(i){return i==null}function hv(i){return typeof i=="number"||Nt(i)&&_n(i)==W}function va(i){if(!Nt(i)||_n(i)!=Z)return!1;var l=Jl(i);if(l===null)return!0;var h=bt.call(l,"constructor")&&l.constructor;return typeof h=="function"&&h instanceof h&&Kl.call(h)==rE}var ad=T0?jn(T0):s5;function lA(i){return fv(i)&&i>=-ye&&i<=ye}var pv=A0?jn(A0):a5;function Su(i){return typeof i=="string"||!Ve(i)&&Nt(i)&&_n(i)==ie}function Kn(i){return typeof i=="symbol"||Nt(i)&&_n(i)==we}var gs=$0?jn($0):l5;function uA(i){return i===n}function cA(i){return Nt(i)&&gn(i)==Ce}function fA(i){return Nt(i)&&_n(i)==Fe}var dA=pu(Mf),hA=pu(function(i,l){return i<=l});function gv(i){if(!i)return[];if(Rn(i))return Su(i)?wr(i):In(i);if(oa&&i[oa])return WS(i[oa]());var l=gn(i),h=l==P?xf:l==ce?Hl:ms;return h(i)}function ro(i){if(!i)return i===0?i:0;if(i=cr(i),i===Se||i===-Se){var l=i<0?-1:1;return l*Bt}return i===i?i:0}function We(i){var l=ro(i),h=l%1;return l===l?h?l-h:l:0}function mv(i){return i?di(We(i),0,Re):0}function cr(i){if(typeof i=="number")return i;if(Kn(i))return Yt;if(Dt(i)){var l=typeof i.valueOf=="function"?i.valueOf():i;i=Dt(l)?l+"":l}if(typeof i!="string")return i===0?i:+i;i=M0(i);var h=Gk.test(i);return h||Jk.test(i)?AS(i.slice(2),h?2:8):qk.test(i)?Yt:+i}function vv(i){return Or(i,Ln(i))}function pA(i){return i?di(We(i),-ye,ye):i===0?i:0}function mt(i){return i==null?"":Wn(i)}var gA=ds(function(i,l){if(ga(l)||Rn(l)){Or(l,tn(l),i);return}for(var h in l)bt.call(l,h)&&ua(i,h,l[h])}),yv=ds(function(i,l){Or(l,Ln(l),i)}),Eu=ds(function(i,l,h,m){Or(l,Ln(l),i,m)}),mA=ds(function(i,l,h,m){Or(l,tn(l),i,m)}),vA=eo(Af);function yA(i,l){var h=fs(i);return l==null?h:J0(h,l)}var bA=Je(function(i,l){i=St(i);var h=-1,m=l.length,b=m>2?l[2]:n;for(b&&wn(l[0],l[1],b)&&(m=1);++h1),C}),Or(i,Gf(i),h),m&&(h=ar(h,g|p|v,I5));for(var b=l.length;b--;)Uf(h,l[b]);return h});function BA(i,l){return _v(i,xu(Oe(l)))}var FA=eo(function(i,l){return i==null?{}:f5(i,l)});function _v(i,l){if(i==null)return{};var h=Rt(Gf(i),function(m){return[m]});return l=Oe(l),fm(i,h,function(m,b){return l(m,b[0])})}function NA(i,l,h){l=To(l,i);var m=-1,b=l.length;for(b||(b=1,i=n);++ml){var m=i;i=l,l=m}if(h||i%1||l%1){var b=K0();return pn(i+b*(l-i+TS("1e-"+((b+"").length-1))),l)}return Bf(i,l)}var JA=hs(function(i,l,h){return l=l.toLowerCase(),i+(h?kv(l):l)});function kv(i){return cd(mt(i).toLowerCase())}function Sv(i){return i=mt(i),i&&i.replace(Xk,US).replace(vS,"")}function YA(i,l,h){i=mt(i),l=Wn(l);var m=i.length;h=h===n?m:di(We(h),0,m);var b=h;return h-=l.length,h>=0&&i.slice(h,b)==l}function XA(i){return i=mt(i),i&&Lk.test(i)?i.replace(t0,zS):i}function QA(i){return i=mt(i),i&&Fk.test(i)?i.replace(of,"\\$&"):i}var e$=hs(function(i,l,h){return i+(h?"-":"")+l.toLowerCase()}),t$=hs(function(i,l,h){return i+(h?" ":"")+l.toLowerCase()}),n$=Tm("toLowerCase");function r$(i,l,h){i=mt(i),l=We(l);var m=l?ss(i):0;if(!l||m>=l)return i;var b=(l-m)/2;return hu(eu(b),h)+i+hu(Ql(b),h)}function o$(i,l,h){i=mt(i),l=We(l);var m=l?ss(i):0;return l&&m>>0,h?(i=mt(i),i&&(typeof l=="string"||l!=null&&!ad(l))&&(l=Wn(l),!l&&is(i))?Ao(wr(i),0,h):i.split(l,h)):[]}var f$=hs(function(i,l,h){return i+(h?" ":"")+cd(l)});function d$(i,l,h){return i=mt(i),h=h==null?0:di(We(h),0,i.length),l=Wn(l),i.slice(h,h+l.length)==l}function h$(i,l,h){var m=S.templateSettings;h&&wn(i,l,h)&&(l=n),i=mt(i),l=Eu({},l,m,Pm);var b=Eu({},l.imports,m.imports,Pm),C=tn(b),I=wf(b,C),D,j,Q=0,ee=l.interpolate||Fl,oe="__p += '",ge=kf((l.escape||Fl).source+"|"+ee.source+"|"+(ee===n0?Kk:Fl).source+"|"+(l.evaluate||Fl).source+"|$","g"),Te="//# sourceURL="+(bt.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++xS+"]")+` +`;i.replace(ge,function(Me,Qe,it,qn,xn,Gn){return it||(it=qn),oe+=i.slice(Q,Gn).replace(Qk,VS),Qe&&(D=!0,oe+=`' + +__e(`+Qe+`) + +'`),xn&&(j=!0,oe+=`'; +`+xn+`; +__p += '`),it&&(oe+=`' + +((__t = (`+it+`)) == null ? '' : __t) + +'`),Q=Gn+Me.length,Me}),oe+=`'; +`;var Pe=bt.call(l,"variable")&&l.variable;if(!Pe)oe=`with (obj) { +`+oe+` +} +`;else if(jk.test(Pe))throw new Ue(u);oe=(j?oe.replace(Bl,""):oe).replace($k,"$1").replace(Ik,"$1;"),oe="function("+(Pe||"obj")+`) { +`+(Pe?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(D?", __e = _.escape":"")+(j?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+oe+`return __p +}`;var Ze=Cv(function(){return dt(C,Te+"return "+oe).apply(n,I)});if(Ze.source=oe,sd(Ze))throw Ze;return Ze}function p$(i){return mt(i).toLowerCase()}function g$(i){return mt(i).toUpperCase()}function m$(i,l,h){if(i=mt(i),i&&(h||l===n))return M0(i);if(!i||!(l=Wn(l)))return i;var m=wr(i),b=wr(l),C=D0(m,b),I=B0(m,b)+1;return Ao(m,C,I).join("")}function v$(i,l,h){if(i=mt(i),i&&(h||l===n))return i.slice(0,N0(i)+1);if(!i||!(l=Wn(l)))return i;var m=wr(i),b=B0(m,wr(l))+1;return Ao(m,0,b).join("")}function y$(i,l,h){if(i=mt(i),i&&(h||l===n))return i.replace(sf,"");if(!i||!(l=Wn(l)))return i;var m=wr(i),b=D0(m,wr(l));return Ao(m,b).join("")}function b$(i,l){var h=B,m=q;if(Dt(l)){var b="separator"in l?l.separator:b;h="length"in l?We(l.length):h,m="omission"in l?Wn(l.omission):m}i=mt(i);var C=i.length;if(is(i)){var I=wr(i);C=I.length}if(h>=C)return i;var D=h-ss(m);if(D<1)return m;var j=I?Ao(I,0,D).join(""):i.slice(0,D);if(b===n)return j+m;if(I&&(D+=j.length-D),ad(b)){if(i.slice(D).search(b)){var Q,ee=j;for(b.global||(b=kf(b.source,mt(r0.exec(b))+"g")),b.lastIndex=0;Q=b.exec(ee);)var oe=Q.index;j=j.slice(0,oe===n?D:oe)}}else if(i.indexOf(Wn(b),D)!=D){var ge=j.lastIndexOf(b);ge>-1&&(j=j.slice(0,ge))}return j+m}function _$(i){return i=mt(i),i&&Rk.test(i)?i.replace(e0,ZS):i}var w$=hs(function(i,l,h){return i+(h?" ":"")+l.toUpperCase()}),cd=Tm("toUpperCase");function Ev(i,l,h){return i=mt(i),l=h?n:l,l===n?jS(i)?XS(i):MS(i):i.match(l)||[]}var Cv=Je(function(i,l){try{return Hn(i,n,l)}catch(h){return sd(h)?h:new Ue(h)}}),x$=eo(function(i,l){return or(l,function(h){h=Pr(h),Xr(i,h,od(i[h],i))}),i});function k$(i){var l=i==null?0:i.length,h=Oe();return i=l?Rt(i,function(m){if(typeof m[1]!="function")throw new ir(a);return[h(m[0]),m[1]]}):[],Je(function(m){for(var b=-1;++bye)return[];var h=Re,m=pn(i,Re);l=Oe(l),i-=Re;for(var b=_f(m,l);++h0||l<0)?new et(h):(i<0?h=h.takeRight(-i):i&&(h=h.drop(i)),l!==n&&(l=We(l),h=l<0?h.dropRight(-l):h.take(l-i)),h)},et.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},et.prototype.toArray=function(){return this.take(Re)},Lr(et.prototype,function(i,l){var h=/^(?:filter|find|map|reject)|While$/.test(l),m=/^(?:head|last)$/.test(l),b=S[m?"take"+(l=="last"?"Right":""):l],C=m||/^find/.test(l);b&&(S.prototype[l]=function(){var I=this.__wrapped__,D=m?[1]:arguments,j=I instanceof et,Q=D[0],ee=j||Ve(I),oe=function(Qe){var it=b.apply(S,xo([Qe],D));return m&&ge?it[0]:it};ee&&h&&typeof Q=="function"&&Q.length!=1&&(j=ee=!1);var ge=this.__chain__,Te=!!this.__actions__.length,Pe=C&&!ge,Ze=j&&!Te;if(!C&&ee){I=Ze?I:new et(this);var Me=i.apply(I,D);return Me.__actions__.push({func:yu,args:[oe],thisArg:n}),new sr(Me,ge)}return Pe&&Ze?i.apply(this,D):(Me=this.thru(oe),Pe?m?Me.value()[0]:Me.value():Me)})}),or(["pop","push","shift","sort","splice","unshift"],function(i){var l=jl[i],h=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",m=/^(?:pop|shift)$/.test(i);S.prototype[i]=function(){var b=arguments;if(m&&!this.__chain__){var C=this.value();return l.apply(Ve(C)?C:[],b)}return this[h](function(I){return l.apply(Ve(I)?I:[],b)})}}),Lr(et.prototype,function(i,l){var h=S[l];if(h){var m=h.name+"";bt.call(cs,m)||(cs[m]=[]),cs[m].push({name:l,func:h})}}),cs[fu(n,x).name]=[{name:"wrapper",func:n}],et.prototype.clone=_E,et.prototype.reverse=wE,et.prototype.value=xE,S.prototype.at=YC,S.prototype.chain=XC,S.prototype.commit=QC,S.prototype.next=eT,S.prototype.plant=nT,S.prototype.reverse=rT,S.prototype.toJSON=S.prototype.valueOf=S.prototype.value=oT,S.prototype.first=S.prototype.head,oa&&(S.prototype[oa]=tT),S},as=QS();li?((li.exports=as)._=as,df._=as):an._=as}).call(Sa)})(Cc,Cc.exports);var R7=Cc.exports;const pe=I7(R7);let zu;const L7=new Uint8Array(16);function O7(){if(!zu&&(zu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!zu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return zu(L7)}const cn=[];for(let e=0;e<256;++e)cn.push((e+256).toString(16).slice(1));function P7(e,t=0){return cn[e[t+0]]+cn[e[t+1]]+cn[e[t+2]]+cn[e[t+3]]+"-"+cn[e[t+4]]+cn[e[t+5]]+"-"+cn[e[t+6]]+cn[e[t+7]]+"-"+cn[e[t+8]]+cn[e[t+9]]+"-"+cn[e[t+10]]+cn[e[t+11]]+cn[e[t+12]]+cn[e[t+13]]+cn[e[t+14]]+cn[e[t+15]]}const M7=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Cb={randomUUID:M7};function D7(e,t,n){if(Cb.randomUUID&&!t&&!e)return Cb.randomUUID();e=e||{};const r=e.random||(e.rng||O7)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let o=0;o<16;++o)t[n+o]=r[o];return t}return P7(r)}const Ot={timestampToTime(e){const t=new Date(Number(e)),n=t.getUTCFullYear(),r=String(t.getUTCMonth()+1).padStart(2,"0"),o=String(t.getUTCDate()).padStart(2,"0");return`${n}-${r}-${o} ${t.toUTCString().slice(17,25)}`},timestampToTimeOnly(e){return`${new Date(Number(e)).toUTCString().slice(17,25)}`},timestampToDate(e){const t=new Date(Number(e)),n=t.getUTCFullYear(),r=String(t.getUTCMonth()+1).padStart(2,"0"),o=String(t.getUTCDate()).padStart(2,"0");return`${n}-${r}-${o}`},currentTime(){return new Date().toISOString().slice(11,19)},secondsToHumanReadable(e){const t=Math.floor(e/3600),n=Math.floor((e-t*3600)/60),r=pe.round(e-t*3600-n*60,2);return`${t}h ${n}m ${r}s`},remainingTimeText(e){return Math.round(e)===0?"Please wait...":e>60?`${this.secondsToHumanReadable(e)} remaining...`:`${Math.round(e)} seconds remaining...`},roundPrice(e){return e>1?pe.round(e,2):e},colorBasedOnSide(e){return e==="buy"?"text-green-600 dark:text-green-400":e==="sell"?"text-red-500 dark:text-red-400":"text-gray-900 dark:text-gray-200"},colorBasedOnType(e){return e==="long"?"text-green-600 dark:text-green-400":e==="short"?"text-red-500 dark:text-red-400":"text-gray-900 dark:text-gray-200"},colorBasedOnNumber(e){return e>0?"text-green-600 dark:text-green-400":e<0?"text-red-500 dark:text-red-400":"text-gray-900 dark:text-gray-200"},uuid(){return D7()}};function Tb(){return pe.cloneDeep({id:Ot.uuid(),form:{start_date:"2021-01-01",exchange:"",symbol:""},results:{showResults:!1,executing:!1,progressbar:{current:0,estimated_remaining_seconds:0},metrics:[],infoLogs:"",exception:{error:"",traceback:""},alert:{message:"",type:""}}})}const Ix=Yi("candles",{state:()=>({tabs:{}}),persist:{storage:Wi.localStorage},actions:{async init(e){for(const t in this.tabs){const n=this.tabs[t];n.results.executing&&!n.results.exception.error&&(e.has(n.id)||await this.cancel(n.id))}},async addTab(){const e=Tb();this.tabs[e.id]=e,await Yo(`/candles/${e.id}`)},closeTab(e){delete this.tabs[e],Yo("/candles")},startInNewTab(e){const t=Tb();t.form=pe.cloneDeep(this.tabs[e].form),this.tabs[t.id]=t,this.start(t.id)},async start(e){this.tabs[e].results.progressbar.current=0,this.tabs[e].results.executing=!0,this.tabs[e].results.infoLogs="",this.tabs[e].results.exception.traceback="",this.tabs[e].results.exception.error="",this.tabs[e].results.alert.message="";const{data:t,error:n}=await jt("/import-candles",{id:e,exchange:this.tabs[e].form.exchange,symbol:this.tabs[e].form.symbol,start_date:this.tabs[e].form.start_date},!0);if(n.value&&n.value.statusCode!==200){Ne("error",n.value.message);return}},async cancel(e){if(this.tabs[e].results.exception.error){this.tabs[e].results.executing=!1;return}const{data:t,error:n}=await jt("/cancel-import-candles",{id:e},!0);if(n.value&&n.value.statusCode!==200){Ne("error",n.value.message);return}this.tabs[e].results.executing=!1},progressbarEvent(e,t){this.tabs[e].results.progressbar=t,this.tabs[e].results.progressbar.current<100&&this.tabs[e].results.executing===!1&&(this.tabs[e].results.executing=!0)},alertEvent(e,t){this.tabs[e].results.alert=t,this.tabs[e].results.progressbar.current=100,this.tabs[e].results.executing=!1,this.tabs[e].results.exception.traceback="",this.tabs[e].results.exception.error=""},infoLogEvent(e,t){this.tabs[e].results.infoLogs+=`[${Ot.timestampToTime(t.timestamp)}] ${t.message} +`},exceptionEvent(e,t){this.tabs[e].results.exception.error=t.error,this.tabs[e].results.exception.traceback=t.traceback},terminationEvent(e){this.tabs[e].results.executing&&(this.tabs[e].results.executing=!1,Ne("success","Session terminated successfully"))}}}),cp=(e,t)=>t.some(n=>e instanceof n);let Ab,$b;function B7(){return Ab||(Ab=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function F7(){return $b||($b=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const fp=new WeakMap,Zd=new WeakMap,Gc=new WeakMap;function N7(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",a)},s=()=>{n(Ni(e.result)),o()},a=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",a)});return Gc.set(t,e),t}function U7(e){if(fp.has(e))return;const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",a),e.removeEventListener("abort",a)},s=()=>{n(),o()},a=()=>{r(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",s),e.addEventListener("error",a),e.addEventListener("abort",a)});fp.set(e,t)}let dp={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return fp.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Ni(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Rx(e){dp=e(dp)}function z7(e){return F7().includes(e)?function(...t){return e.apply(hp(this),t),Ni(this.request)}:function(...t){return Ni(e.apply(hp(this),t))}}function V7(e){return typeof e=="function"?z7(e):(e instanceof IDBTransaction&&U7(e),cp(e,B7())?new Proxy(e,dp):e)}function Ni(e){if(e instanceof IDBRequest)return N7(e);if(Zd.has(e))return Zd.get(e);const t=V7(e);return t!==e&&(Zd.set(e,t),Gc.set(t,e)),t}const hp=e=>Gc.get(e);function H7(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const a=indexedDB.open(e,t),u=Ni(a);return r&&a.addEventListener("upgradeneeded",f=>{r(Ni(a.result),f.oldVersion,f.newVersion,Ni(a.transaction),f)}),n&&a.addEventListener("blocked",f=>n(f.oldVersion,f.newVersion,f)),u.then(f=>{s&&f.addEventListener("close",()=>s()),o&&f.addEventListener("versionchange",c=>o(c.oldVersion,c.newVersion,c))}).catch(()=>{}),u}const j7=["get","getKey","getAll","getAllKeys","count"],W7=["put","add","delete","clear"],Jd=new Map;function Ib(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Jd.get(t))return Jd.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=W7.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||j7.includes(n)))return;const s=async function(a,...u){const f=this.transaction(a,o?"readwrite":"readonly");let c=f.store;return r&&(c=c.index(u.shift())),(await Promise.all([c[n](...u),o&&f.done]))[0]};return Jd.set(t,s),s}Rx(e=>({...e,get:(t,n,r)=>Ib(t,n)||e.get(t,n,r),has:(t,n)=>!!Ib(t,n)||e.has(t,n)}));const K7=["continue","continuePrimaryKey","advance"],Rb={},pp=new WeakMap,Lx=new WeakMap,q7={get(e,t){if(!K7.includes(t))return e[t];let n=Rb[t];return n||(n=Rb[t]=function(...r){pp.set(this,Lx.get(this)[t](...r))}),n}};async function*G7(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,q7);for(Lx.set(n,t),Gc.set(n,hp(t));t;)yield n,t=await(pp.get(n)||t.continue()),pp.delete(n)}function Lb(e,t){return t===Symbol.asyncIterator&&cp(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&cp(e,[IDBIndex,IDBObjectStore])}Rx(e=>({...e,get(t,n,r){return Lb(t,n)?G7:e.get(t,n,r)},has(t,n){return Lb(t,n)||e.has(t,n)}}));async function Cl(){return H7("ChartDataDB",1,{upgrade(e){e.createObjectStore("jesse",{keyPath:"id"})}})}async function ys(e){return await(await Cl()).get("jesse",e)!==void 0}async function bs(e){return(await(await Cl()).get("jesse",e)).data}async function _s(e,t){await(await Cl()).put("jesse",{id:e,data:t})}async function ws(e){await(await Cl()).delete("jesse",e)}async function Z7(e){return(await(await Cl()).getAllKeys("jesse")).filter(r=>typeof r=="string"&&r.startsWith(e))}const mn={candles:{},orders:{},lines:{},extraChartLines:{},horizontalLines:{},horizontalExtraLines:{}};function Ob(){return pe.cloneDeep({id:Ot.uuid(),form:{start_date:"2024-01-01",finish_date:"2024-03-01",debug_mode:!1,export_chart:!1,export_tradingview:!1,export_full_reports:!1,export_csv:!1,export_json:!1,fast_mode:!1,benchmark:!0,exchange:"",routes:[],data_routes:[]},results:{showResults:!1,executing:!1,logsModal:!1,progressbar:{current:0,estimated_remaining_seconds:0},routes_info:[],metrics:[],hyperparameters:[],generalInfo:{},infoLogs:"",exception:{error:"",traceback:""},charts:{equity_curve:[]},selectedRoute:{},alert:{message:"",type:""},info:[]}})}const Ox=Yi("backtest",{state:()=>({tabs:{}}),persist:{storage:Wi.localStorage},actions:{async init(e){await this.cancelInactiveTabs(e),await this.syncDB()},async cancelInactiveTabs(e){for(const t in this.tabs){const n=this.tabs[t];n.results.executing&&!n.results.exception.error&&(e.has(n.id)||await this.cancel(n.id))}},async syncDB(){for(const e of await Z7("candles-")){const t=e.replace("candles-","");this.tabs[t]||(await ws(`candles-${t}`),await ws(`orders-${t}`),await ws(`lines-${t}`),await ws(`extra-lines-${t}`),await ws(`horizontal-lines-${t}`),await ws(`horizontal-extra-lines-${t}`))}for(const e in this.tabs)Object.hasOwn(mn.candles,e)||(await ys(`candles-${e}`)&&(mn.candles[e]=await bs(`candles-${e}`)),await ys(`orders-${e}`)&&(mn.orders[e]=await bs(`orders-${e}`)),await ys(`lines-${e}`)&&(mn.lines[e]=await bs(`lines-${e}`)),await ys(`extra-lines-${e}`)&&(mn.extraChartLines[e]=await bs(`extra-lines-${e}`)),await ys(`horizontal-lines-${e}`)&&(mn.horizontalLines[e]=await bs(`horizontal-lines-${e}`)),await ys(`horizontal-extra-lines-${e}`)&&(mn.horizontalExtraLines[e]=await bs(`horizontal-extra-lines-${e}`)))},async addTab(e){const t=Ob();if(this.tabs[t.id]=t,e){const n=this.tabs[e];t.form=JSON.parse(JSON.stringify(n.form))}await Yo(`/backtest/${t.id}`)},closeTab(e){delete this.tabs[e],Yo("/backtest"),delete mn.orders[e],delete mn.lines[e],delete mn.candles[e]},async startInNewTab(e){const t=Ob();t.form=pe.cloneDeep(this.tabs[e].form),this.tabs[t.id]=t,this.start(t.id),await Yo(`/backtest/${t.id}`)},async start(e){if(this.tabs[e].results.progressbar.current=0,this.tabs[e].results.executing=!0,this.tabs[e].results.infoLogs="",this.tabs[e].results.exception.traceback="",this.tabs[e].results.exception.error="",this.tabs[e].results.alert||(this.tabs[e].results.alert={message:"",type:""}),this.tabs[e].results.alert.message="",this.tabs[e].results.selectedRoute=this.tabs[e].form.routes[0],this.tabs[e].form.fast_mode&&this.tabs[e].form.routes.length>1){Ne("error","For the moment, the fast mode can only be used with one trading route"),this.tabs[e].results.executing=!1;return}const{data:t,error:n}=await jt("/backtest",{id:e,exchange:this.tabs[e].form.exchange,routes:this.tabs[e].form.routes,data_routes:this.tabs[e].form.data_routes,config:At().settings.backtest,start_date:this.tabs[e].form.start_date,finish_date:this.tabs[e].form.finish_date,debug_mode:this.tabs[e].form.debug_mode,export_csv:this.tabs[e].form.export_csv,export_chart:this.tabs[e].form.export_chart,export_tradingview:this.tabs[e].form.export_tradingview,export_full_reports:this.tabs[e].form.export_full_reports,export_json:this.tabs[e].form.export_json,fast_mode:this.tabs[e].form.fast_mode,benchmark:this.tabs[e].form.benchmark},!0);if(n.value&&n.value.statusCode!==200){Ne("error",n.value.data.message),this.tabs[e].results.executing=!1;return}},async cancel(e){if(this.tabs[e].results.exception.error){this.tabs[e].results.executing=!1;return}const{data:t,error:n}=await jt("/cancel-backtest",{id:e},!0);n.value&&n.value.statusCode!==200&&Ne("error",n.value.data.message),this.tabs[e].results.executing=!1},rerun(e){this.tabs[e].results.showResults=!1,this.start(e)},newBacktest(e){this.tabs[e].results.showResults=!1},candlesInfoEvent(e,t){const n=[["Period",t.duration],["Starting Date",Ot.timestampToDate(t.starting_time)],["Ending Date",Ot.timestampToDate(t.finishing_time)],["Exchange",t.exchange],["Exchange Type",t.exchange_type]];t.exchange_type==="futures"&&(n.push(["Leverage",t.leverage]),n.push(["Leverage Mode",t.leverage_mode])),this.tabs[e].results.info=n},routesInfoEvent(e,t){const n=[];t.forEach(r=>{n.push([{value:r.symbol,style:""},{value:r.timeframe,style:""},{value:r.strategy_name,style:""}])}),this.tabs[e].results.routes_info=n},progressbarEvent(e,t){this.tabs[e].results.progressbar=t},infoLogEvent(e,t){this.tabs[e].results.infoLogs+=`[${Ot.timestampToTime(t.timestamp)}] ${t.message} +`},exceptionEvent(e,t){this.tabs[e].results.exception.error=t.error,this.tabs[e].results.exception.traceback=t.traceback},generalInfoEvent(e,t){this.tabs[e].results.generalInfo=t},hyperparametersEvent(e,t){this.tabs[e].results.hyperparameters=t},metricsEvent(e,t){if(t===null){this.tabs[e].results.metrics=[];return}this.tabs[e].results.metrics=[["Total Closed Trades",t.total],["Total Net Profit",`${pe.round(t.net_profit,2)} (${pe.round(t.net_profit_percentage,2)}%)`],["Starting => Finishing Balance",`${pe.round(t.starting_balance,2)} => ${pe.round(t.finishing_balance,2)}`],["Open Trades",t.total_open_trades],["Total Paid Fees",pe.round(t.fee,2)],["Max Drawdown",`${pe.round(t.max_drawdown,2)}%`],["Annual Return",`${pe.round(t.annual_return,2)}%`],["Expectancy",`${pe.round(t.expectancy,2)} (${pe.round(t.expectancy_percentage,2)}%)`],["Avg Win | Avg Loss",`${pe.round(t.average_win,2)} | ${pe.round(t.average_loss,2)}`],["Ratio Avg Win / Avg Loss",pe.round(t.ratio_avg_win_loss,2)],["Win-rate",`${pe.round(t.win_rate*100,2)}%`],["Longs | Shorts",`${pe.round(t.longs_percentage,2)}% | ${pe.round(t.shorts_percentage,2)}%`],["Avg Holding Time",Ot.secondsToHumanReadable(t.average_holding_period)],["Winning Trades Avg Holding Time",Ot.secondsToHumanReadable(t.average_winning_holding_period)],["Losing Trades Avg Holding Time",Ot.secondsToHumanReadable(t.average_losing_holding_period)],["Sharpe Ratio",pe.round(t.sharpe_ratio,2)],["Calmar Ratio",pe.round(t.calmar_ratio,2)],["Sortino Ratio",pe.round(t.sortino_ratio,2)],["Omega Ratio",pe.round(t.omega_ratio,2)],["Winning Streak",t.winning_streak],["Losing Streak",t.losing_streak],["Largest Winning Trade",pe.round(t.largest_winning_trade,2)],["Largest Losing Trade",pe.round(t.largest_losing_trade,2)],["Total Winning Trades",t.total_winning_trades],["Total Losing Trades",t.total_losing_trades]]},equityCurveEvent(e,t){this.tabs[e].results.charts.equity_curve=t,this.tabs[e].results.executing=!1,this.tabs[e].results.showResults=!0},terminationEvent(e,t){this.tabs[e].results.executing&&(this.tabs[e].results.executing=!1,Ne("success","Session terminated successfully"))},alertEvent(e,t){this.tabs[e].results.alert=t},notificationEvent(e,t){Ne(t.type,t.message)},candlesChartEvent(e,t){mn.candles[e]=t,_s(`candles-${e}`,t)},ordersChartEvent(e,t){mn.orders[e]=t,_s(`orders-${e}`,t)},chartLinesEvent(e,t){mn.lines[e]=t,_s(`lines-${e}`,t)},extraChartLinesEvent(e,t){mn.extraChartLines[e]=t,_s(`extra-lines-${e}`,t)},horizontalChartLinesEvent(e,t){mn.horizontalLines[e]=t,_s(`horizontal-lines-${e}`,t)},horizontalExtraChartLinesEvent(e,t){mn.horizontalExtraLines[e]=t,_s(`horizontal-extra-lines-${e}`,t)}}}),Px=Yi("optimization",{state:()=>({form:{start_date:"2024-01-01",finish_date:"2024-03-01",debug_mode:!1,export_csv:!1,export_json:!1,exchange:"",routes:[],data_routes:[],optimal_total:50,fast_mode:!1},results:{showResults:!1,executing:!1,logsModal:!1,progressbar:{current:0,estimated_remaining_seconds:0},routes_info:[],best_candidates:[],metrics:[],generalInfo:[],infoLogs:"",info:[],exception:{error:"",traceback:""},alert:{message:"",type:""}}}),persist:{storage:Wi.localStorage},actions:{async init(e){this.results.executing&&!this.results.exception.error&&(e.has("optimization")||await this.cancel())},async start(){this.results.progressbar.current=0,this.results.executing=!0,this.results.infoLogs="",this.results.exception.traceback="",this.results.exception.error="",this.results.alert.message="",this.results.alert.type="",this.results.metrics=[],this.results.generalInfo=[],this.results.best_candidates=[],this.results.routes_info=[],this.results.showResults=!1;const e=At(),t={id:"optimization",exchange:this.form.exchange,routes:this.form.routes,data_routes:this.form.data_routes,config:e.settings.optimization,start_date:this.form.start_date,finish_date:this.form.finish_date,optimal_total:this.form.optimal_total,debug_mode:this.form.debug_mode,export_csv:this.form.export_csv,export_json:this.form.export_json,fast_mode:this.form.fast_mode},{data:n,error:r}=await jt("/optimization",t,!0);if(r.value&&r.value.statusCode!==200){Ne("error",r.value.data.message);return}},async cancel(){if(this.results.exception.error){this.results.executing=!1;return}this.results.executing=!1;const{data:e,error:t}=await jt("/cancel-optimization",{id:"optimization"},!0);if(t.value&&t.value.statusCode!==200){Ne("error",t.value.data.message);return}},rerun(){this.results.showResults=!1,this.start()},candlesInfoEvent(e,t){this.results.info=[["Period",t.duration],["Starting-Ending Date",`${Ot.timestampToDate(t.starting_time)} => ${Ot.timestampToDate(t.finishing_time)}`]]},routesInfoEvent(e,t){const n=[];t.forEach(r=>{n.push([{value:r.symbol,style:""},{value:r.timeframe,style:""},{value:r.strategy_name,style:""}])}),this.results.routes_info=n},progressbarEvent(e,t){this.results.progressbar=t},infoLogEvent(e,t){this.results.infoLogs+=`[${Ot.timestampToTime(t.timestamp)}] ${t.message} +`},exceptionEvent(e,t){this.results.exception.error=t.error,this.results.exception.traceback=t.traceback},generalInfoEvent(e,t){this.results.executing||(this.results.executing=!0),this.results.generalInfo=[["Started at",t.started_at],["Index",t.index],["Average strategy execution time",`${pe.round(t.average_execution_seconds,2)} seconds`],["Trading route",t.trading_route]],"population_size"in t&&this.results.generalInfo.push(["Population size",t.population_size?t.population_size:""]),"iterations"in t&&this.results.generalInfo.push(["Iterations",t.iterations?t.iterations:""]),"solution_length"in t&&this.results.generalInfo.push(["Solution length",t.solution_length?t.solution_length:""])},metricsEvent(e,t){if(t===null){this.results.metrics=[];return}this.results.metrics=[["Total Closed Trades",t.total],["Total Net Profit",`${pe.round(t.net_profit,2)} (${pe.round(t.net_profit_percentage,2)}%)`],["Starting => Finishing Balance",`${pe.round(t.starting_balance,2)} => ${pe.round(t.finishing_balance,2)}`],["Open Trades",t.total_open_trades],["Total Paid Fees",pe.round(t.fee,2)],["Max Drawdown",pe.round(t.max_drawdown,2)],["Annual Return",`${pe.round(t.annual_return,2)}%`],["Expectancy",`${pe.round(t.expectancy,2)} (${pe.round(t.expectancy_percentage,2)}%)`],["Avg Win | Avg Loss",`${pe.round(t.average_win,2)} | ${pe.round(t.average_loss,2)}`],["Ratio Avg Win / Avg Loss",pe.round(t.ratio_avg_win_loss,2)],["Win-rate",`${pe.round(t.win_rate*100,2)}%`],["Longs | Shorts",`${pe.round(t.longs_percentage,2)}% | ${pe.round(t.shorts_percentage,2)}%`],["Avg Holding Time",t.average_holding_period],["Winning Trades Avg Holding Time",t.average_winning_holding_period],["Losing Trades Avg Holding Time",t.average_losing_holding_period],["Sharpe Ratio",pe.round(t.sharpe_ratio,2)],["Calmar Ratio",pe.round(t.calmar_ratio,2)],["Sortino Ratio",pe.round(t.sortino_ratio,2)],["Omega Ratio",pe.round(t.omega_ratio,2)],["Winning Streak",t.winning_streak],["Losing Streak",t.losing_streak],["Largest Winning Trade",pe.round(t.largest_winning_trade,2)],["Largest Losing Trade",pe.round(t.largest_losing_trade,2)],["Total Winning Trades",t.total_winning_trades],["Total Losing Trades",t.total_losing_trades]]},terminationEvent(e){this.results.executing&&(this.results.executing=!1,Ne("success","Session terminated successfully"))},bestCandidatesEvent(e,t){const n=[];t.forEach(r=>{n.push([{value:`#${r.rank}`,style:""},{value:r.dna,style:"",tag:"code"},{value:r.fitness,style:""},{value:`${r.training_win_rate}% | ${r.testing_win_rate}%`,style:""},{value:`${r.training_total_trades} | ${r.testing_total_trades}`,style:""},{value:`${r.training_pnl}% | ${r.testing_pnl}%`,style:""}])}),this.results.best_candidates=n},alertEvent(e,t){this.results.alert=t,this.results.executing=!1,this.results.showResults=!0}}}),zr=Yi("temp",{state:()=>({initiated:!1,makeStrategy:!1})});function un(e=""){return pe.cloneDeep({id:e||Ot.uuid(),form:{debug_mode:!0,paper_mode:!0,exchange_api_key_id:"",notification_api_key_id:"",exchange:"",routes:[],data_routes:[]},results:{showResults:!1,booting:!1,monitoring:!1,finished:!1,terminating:!1,progressbar:{current:0,estimated_remaining_seconds:0},routes_info:[],routes:[],metrics:[],generalInfo:{},positions:[],orders:[],watchlist:[],candles:[],currentCandles:{},infoLogs:"",errorLogs:"",exception:{error:"",traceback:""},charts:{equity_curve:[]},selectedRoute:{},info:[]}})}const Mx=Yi("Live",{state:()=>({tabs:{}}),persist:{storage:Wi.localStorage},actions:{async init(e){for(const t in this.tabs){const n=this.tabs[t];n.results.monitoring&&!n.results.exception.error&&(e.has(n.id)?this.fetchLogs(n.id):this.forceClose(n.id))}},async addTab(){const e=un();this.tabs[e.id]=e,await Yo(`/live/${e.id}`)},closeTab(e){const t=this.tabs[e];if(t.results.monitoring&&!t.results.exception.error&&!t.results.finished){Ne("error","Cannot close a live session tab that is currently running");return}delete this.tabs[e],Yo("/live")},reset(e){this.tabs[e].results.progressbar.current=0,this.tabs[e].results.booting=!0,this.tabs[e].results.finished=!1,this.tabs[e].results.infoLogs="",this.tabs[e].results.errorLogs="",this.tabs[e].results.exception.traceback="",this.tabs[e].results.exception.error="",this.tabs[e].results.routes_info=[],this.tabs[e].results.metrics=[],this.tabs[e].results.generalInfo={},this.tabs[e].results.positions=[],this.tabs[e].results.orders=[],this.tabs[e].results.candles=[],this.tabs[e].results.currentCandles={},this.tabs[e].results.watchlist=[]},async start(e){this.reset(e);const t=At(),n=this.tabs[e].form.paper_mode?"":this.tabs[e].form.exchange_api_key_id,r=this.tabs[e].form.exchange,o=this.tabs[e].form.notification_api_key_id?this.tabs[e].form.notification_api_key_id:"";this.tabs[e].results.selectedRoute=this.tabs[e].form.routes[0];const{data:s,error:a}=await jt("/live",{id:e,exchange:r,exchange_api_key_id:n,notification_api_key_id:o,routes:this.tabs[e].form.routes,data_routes:this.tabs[e].form.data_routes,config:t.settings.live,debug_mode:this.tabs[e].form.debug_mode,paper_mode:this.tabs[e].form.paper_mode},!0);if(a.value&&a.value.statusCode!==200){Ne("error",a.value.data.message);return}},async cancel(e){const{data:t,error:n}=await jt("/cancel-live",{id:e,paper_mode:this.tabs[e].form.paper_mode},!0);if(n.value&&n.value.statusCode!==200){Ne("error",n.value.data.message);return}this.tabs[e].results.booting=!1},async stop(e){const{data:t,error:n}=await jt("/cancel-live",{id:e,paper_mode:this.tabs[e].form.paper_mode},!0);if(n.value&&n.value.statusCode!==200){Ne("error",n.value.data.message);return}this.tabs[e].results.terminating=!0},newLive(e){this.tabs[e].results.monitoring=!1,this.tabs[e].results.finished=!1},candlesInfoEvent(e,t){this.tabs[e]===void 0&&(this.tabs[e]=un(e)),this.tabs[e].results.info=[["Period",t.duration],["Starting-Ending Date",`${Ot.timestampToDate(t.starting_time)} => ${Ot.timestampToDate(t.finishing_time)}`]]},routesInfoEvent(e,t){this.tabs[e]===void 0&&(this.tabs[e]=un(e));const n=[];t.forEach(r=>{n.push([{value:r.symbol,style:""},{value:r.timeframe,style:""},{value:r.strategy_name,style:""}])}),this.tabs[e].results.routes_info=n},progressbarEvent(e,t){this.tabs[e]===void 0&&(this.tabs[e]=un(e)),this.tabs[e].results.progressbar=t},infoLogEvent(e,t){this.tabs[e]===void 0&&(this.tabs[e]=un(e)),this.tabs[e].results.infoLogs+=`[${Ot.timestampToTime(t.timestamp)}] ${t.message} +`},errorLogEvent(e,t){this.tabs[e]===void 0&&(this.tabs[e]=un(e)),Ne("error",t.message),this.tabs[e].results.errorLogs+=`[${Ot.timestampToTime(t.timestamp)}] ${t.message} +`},exceptionEvent(e,t){this.tabs[e]===void 0&&(this.tabs[e]=un(e)),this.tabs[e].results.exception.error=t.error,this.tabs[e].results.exception.traceback=t.traceback},generalInfoEvent(e,t){this.tabs[e]===void 0&&(this.tabs[e]=un(e)),this.tabs[e].results.generalInfo=t,this.tabs[e].form.routes=this.tabs[e].results.generalInfo.routes,this.tabs[e].results.routes=[];for(const n of this.tabs[e].form.routes)this.tabs[e].results.routes.push([{value:n.symbol,style:""},{value:n.timeframe,style:""},{value:n.strategy,style:""}]);this.tabs[e].results.monitoring||(this.tabs[e].results.booting=!1,this.tabs[e].results.monitoring=!0,this.fetchLogs(e))},async fetchCandles(e){const{data:t,error:n}=await jt("/get-candles",{id:e,exchange:this.tabs[e].form.exchange,symbol:this.tabs[e].results.selectedRoute.symbol,timeframe:this.tabs[e].results.selectedRoute.timeframe},!0);if(n.value&&n.value.statusCode!==200){Ne("error",n.value.data.message);return}const r=t.value;this.tabs[e].results.candles=r.data},async fetchLogs(e){this.tabs[e]===void 0&&(this.tabs[e]=un(e)),this.tabs[e].results.infoLogs="",this.tabs[e].results.errorLogs="";const{data:t,error:n}=await jt("/get-logs",{id:e,type:"info",start_time:this.tabs[e].results.generalInfo.started_at},!0);if(n.value&&n.value.statusCode!==200){Ne("error",n.value.data.message);return}const o=t.value.data;this.tabs[e].results.infoLogs="",o.forEach(c=>{this.tabs[e].results.infoLogs+=`[${Ot.timestampToTime(c.timestamp)}] ${c.message} +`});const{data:s,error:a}=await jt("/get-logs",{id:e,type:"error",start_time:this.tabs[e].results.generalInfo.started_at},!0);if(a.value&&a.value.statusCode!==200){Ne("error",a.value.data.message);return}const f=s.value.data;this.tabs[e].results.errorLogs="",f.forEach(c=>{this.tabs[e].results.errorLogs+=`[${Ot.timestampToTime(c.timestamp)}] ${c.message} +`})},currentCandlesEvent(e,t){this.tabs[e]===void 0&&(this.tabs[e]=un(e)),this.tabs[e].results.currentCandles=t},watchlistEvent(e,t){this.tabs[e]===void 0&&(this.tabs[e]=un(e)),this.tabs[e].results.watchlist=t},positionsEvent(e,t){this.tabs[e]===void 0&&(this.tabs[e]=un(e)),this.tabs[e].results.positions=[];for(const n of t){const r=n.type==="close"?"":n.qty;this.tabs[e].results.positions.push([{value:n.symbol,style:""},{value:r,style:Ot.colorBasedOnType(n.type),tooltip:`${n.value} ${n.currency}`},{value:Ot.roundPrice(n.entry),style:""},{value:Ot.roundPrice(n.current_price),style:""},{value:n.liquidation_price?Ot.roundPrice(n.liquidation_price):"",style:""},{value:`${pe.round(n.pnl,2)} (${pe.round(n.pnl_perc,2)}%)`,style:Ot.colorBasedOnNumber(n.pnl)}])}},ordersEvent(e,t){this.tabs[e]===void 0&&(this.tabs[e]=un(e)),this.tabs[e].results.orders=t},metricsEvent(e,t){this.tabs[e]===void 0&&(this.tabs[e]=un(e)),this.tabs[e].results.metrics=[["Total Closed Trades",t.total],["Total Net Profit",`${pe.round(t.net_profit,2)} (${pe.round(t.net_profit_percentage,2)}%)`],["Starting => Finishing Balance",`${pe.round(t.starting_balance,2)} => ${pe.round(t.finishing_balance,2)}`],["Open Trades",t.total_open_trades],["Total Paid Fees",pe.round(t.fee,2)],["Max Drawdown",pe.round(t.max_drawdown,2)],["Annual Return",`${pe.round(t.annual_return,2)}%`],["Expectancy",`${pe.round(t.expectancy,2)} (${pe.round(t.expectancy_percentage,2)}%)`],["Avg Win | Avg Loss",`${pe.round(t.average_win,2)} | ${pe.round(t.average_loss,2)}`],["Ratio Avg Win / Avg Loss",pe.round(t.ratio_avg_win_loss,2)],["Win-rate",`${pe.round(t.win_rate*100,2)}%`],["Longs | Shorts",`${pe.round(t.longs_percentage,2)}% | ${pe.round(t.shorts_percentage,2)}%`],["Avg Holding Time",t.average_holding_period],["Winning Trades Avg Holding Time",t.average_winning_holding_period],["Losing Trades Avg Holding Time",t.average_losing_holding_period],["Sharpe Ratio",pe.round(t.sharpe_ratio,2)],["Calmar Ratio",pe.round(t.calmar_ratio,2)],["Sortino Ratio",pe.round(t.sortino_ratio,2)],["Omega Ratio",pe.round(t.omega_ratio,2)],["Winning Streak",t.winning_streak],["Losing Streak",t.losing_streak],["Largest Winning Trade",pe.round(t.largest_winning_trade,2)],["Largest Losing Trade",pe.round(t.largest_losing_trade,2)],["Total Winning Trades",t.total_winning_trades],["Total Losing Trades",t.total_losing_trades]]},equityCurveEvent(e,t){this.tabs[e].results.charts.equity_curve=t,this.tabs[e].results.showResults=!0},unexpectedTerminationEvent(e){this.tabs[e]===void 0&&(this.tabs[e]=un(e)),this.tabs[e].results.finished=!0},terminationEvent(e){this.tabs[e]===void 0&&(this.tabs[e]=un(e)),this.tabs[e].results.finished||(this.tabs[e].results.finished=!0,this.tabs[e].results.terminating=!1,Ne("success","Session terminated successfully"))},forceClose(e){this.tabs[e]===void 0&&(this.tabs[e]=un(e)),this.tabs[e].results.finished=!0,this.tabs[e].results.terminating=!1}}}),At=Yi("main",{state:()=>({loadingVar:!1,authToken:"",hasLivePluginInstalled:!1,systemInfo:{},updateInfo:{},plan:"",planLimits:{},settings:{backtest:{logging:{order_submission:!0,order_cancellation:!0,order_execution:!0,position_opened:!0,position_increased:!0,position_reduced:!0,position_closed:!0,shorter_period_candles:!1,trading_candles:!0,balance_update:!0},warm_up_candles:210,exchanges:{}},live:{persistency:!0,generate_candles_from_1m:!1,logging:{order_submission:!0,order_cancellation:!0,order_execution:!0,position_opened:!0,position_increased:!0,position_reduced:!0,position_closed:!0,shorter_period_candles:!1,trading_candles:!0,balance_update:!0},warm_up_candles:210,exchanges:{},notifications:{enabled:!0,position_report_timeframe:"1h",events:{errors:!0,started_session:!0,terminated_session:!0,submitted_orders:!0,cancelled_orders:!0,executed_orders:!0,opened_position:!0,updated_position:!0}}},optimization:{cpu_cores:2,ratio:"sharpe",warm_up_candles:210,exchange:{balance:1e4,fee:.001,type:"futures",futures_leverage:3,futures_leverage_mode:"cross"}},editor:{fontSize:16,cursorStyle:"line",minimap:!1,lineHeight:24,cursorWidth:2,cursorBlinking:"blink",renderLineHighlight:"line"}},strategies:[],exchangeInfo:{},jesseSupportedTimeframes:[],exchangeSupportedSymbols:{},skippedJesseVersions:[],skippedLivePluginVersions:[],activeWorkers:new Set,exchangeApiKeys:[],notificationApiKeys:[]}),persist:{storage:Wi.localStorage},getters:{backtestingExchangeNames(){const e=[];for(const t in this.exchangeInfo)this.exchangeInfo[t].modes.backtesting&&e.push(t);return e.sort()},liveTradingExchangeNames(){const e=[];for(const t in this.exchangeInfo)this.exchangeInfo[t].modes.live_trading&&e.push(t);return e.sort()},isAuthenticated(){return this.authToken!==""}},actions:{async initiate(){const{data:e,error:t}=await jt("/general-info",{},!0);if(t&&t.value&&t.value.statusCode!==200){Ei(t);return}const n=e.value;this.systemInfo=n.system_info,this.updateInfo=n.update_info,this.strategies=n.strategies,this.exchangeInfo=n.exchanges,this.jesseSupportedTimeframes=n.jesse_supported_timeframes,this.hasLivePluginInstalled=n.has_live_plugin_installed,this.plan=n.plan,this.planLimits=n.limits;for(const c in this.exchangeInfo){const d=this.exchangeInfo[c];d.modes.backtesting&&(this.settings.backtest.exchanges[c]={name:c,fee:d.fee,balance:1e4,type:d.type},d.type==="futures"&&(this.settings.backtest.exchanges[c].futures_leverage_mode="cross",this.settings.backtest.exchanges[c].futures_leverage=2)),d.modes.live_trading&&(this.settings.live.exchanges[d.name]={name:c,fee:d.fee,futures_leverage_mode:"cross",futures_leverage:2,balance:1e4})}const{data:r,error:o}=await jt("/get-config",{current_config:this.settings},!0);if(o.value&&o.value.statusCode!==200){Ei(o);return}const s=r.value;this.settings=s.data.data;const{data:a,error:u}=await jt("/active-workers",{},!0);if(u.value&&u.value.statusCode!==200){Ei(u);return}const f=a.value;this.activeWorkers=new Set(f.data),await this.syncOpenTabs(),await this.fetchExchangeApiKeys(),await this.fetchNotificationApiKeys(),zr().initiated=!0},async syncOpenTabs(){Ix().init(this.activeWorkers),Ox().init(this.activeWorkers),Px().init(this.activeWorkers),Mx().init(this.activeWorkers)},updateConfig:RO(async()=>{if(!At().settings)return;const{data:e,error:t}=await jt("/update-config",{current_config:At().settings},!0);t.value&&t.value.statusCode!==200&&Ei(t)},1e3,!0,!0),async fetchExchangeApiKeys(){const{data:e,error:t}=await Eb("/exchange-api-keys",!0);if(t.value&&t.value.statusCode!==200){Ei(t);return}const n=e.value;this.exchangeApiKeys=n.data},async fetchNotificationApiKeys(){const{data:e,error:t}=await Eb("/notification-api-keys",!0);if(t.value&&t.value.statusCode!==200){Ei(t);return}const n=e.value;this.notificationApiKeys=n.data},setAuthToken(e){this.authToken=e},async updateSupportedSymbols(e){const{data:t,error:n}=await jt("/exchange-supported-symbols",{exchange:e},!0);if(n.value&&n.value.statusCode!==200){Ne("error",`[${n.value.statusCode}]: ${n.value.message}`);return}const r=t.value;this.exchangeSupportedSymbols[e]={data:r.data,updated_at:new Date}},async getExchangeSupportedSymbols(e){if(!this.exchangeSupportedSymbols[e])return await this.updateSupportedSymbols(e),this.exchangeSupportedSymbols[e].data;const t=new Date(this.exchangeSupportedSymbols[e].updated_at),r=new Date().getTime()-t.getTime();return Math.ceil(r/(1e3*3600*24))>1&&await this.updateSupportedSymbols(e),this.exchangeSupportedSymbols[e].data}}}),J7={key:0,class:"relative bg-indigo-600 dark:bg-indigo-400 select-none text-white dark:text-black"},Y7={class:"max-w-7xl mx-auto py-3 px-3 sm:px-6 lg:px-8"},X7={class:"pr-16 sm:text-center sm:px-16"},Q7={class:"font-medium"},eM={class:"md:inline"},tM=R("span",{class:"block sm:ml-2 sm:inline-block"},[R("a",{href:"https://docs.jesse.trade/docs/getting-started/update.html",target:"_blank",class:"font-bold underline"},[de(" Update Guide "),R("span",{"aria-hidden":"true"},"→")])],-1),nM={class:"absolute inset-y-0 right-0 pt-1 pr-1 flex items-start sm:pt-1 sm:pr-2 sm:items-start"},rM=_e({__name:"UpdateBanner",setup(e){const t=ne(!1),n=At(),r=N(()=>n.updateInfo),o=N(()=>n.systemInfo),s=N(()=>{if(t.value||!r.value||!r.value.is_update_info_available)return{flag:!1,message:"",type:"",version:""};const u=n.skippedJesseVersions,f=n.skippedLivePluginVersions;return r.value.jesse_latest_version>o.value.jesse_version&&!u.includes(r.value.jesse_latest_version)?{flag:!0,message:`Version "${r.value.jesse_latest_version}" of Jesse is available. You are currently running version "${o.value.jesse_version}".`,type:"jesse",version:r.value.jesse_latest_version}:o.value.live_plugin_version&&r.value.jesse_live_latest_version>o.value.live_plugin_version&&!f.includes(r.value.jesse_live_latest_version)?{flag:!0,message:`Version "${r.value.jesse_live_latest_version}" of the live plugin is available. You are running "${o.value.live_plugin_version}".`,type:"live",version:r.value.jesse_live_latest_version}:{flag:!1,message:"",type:"",version:""}}),a=(u,f)=>{if(u==="jesse"){const c=n.skippedJesseVersions||[];c.push(f),n.skippedJesseVersions=c,t.value=!0}if(u==="live"){const c=n.skippedLivePluginVersions||[];c.push(f),n.skippedLivePluginVersions=c,t.value=!0}};return(u,f)=>$(s).flag?(H(),J("div",J7,[R("div",Y7,[R("div",X7,[R("p",Q7,[R("span",eM,tt($(s).message),1),tM])]),R("div",nM,[R("button",{type:"button",class:"flex p-2 rounded-md hover:bg-indigo-500 focus:outline-none focus:ring-0",onClick:f[0]||(f[0]=c=>a($(s).type,$(s).version))},[L($(wg),{class:"h-6 w-6","aria-hidden":"true"})])])])])):Ie("",!0)}}),qt=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},oM={},iM={class:"text-2xl mb-4"};function sM(e,t){return H(),J("h3",iM,[at(e.$slots,"default")])}const Tl=qt(oM,[["render",sM]]),Vn=(e,t,n,r,o=!1)=>{const s=A3(),a=Sl(),u=N(()=>{var p;const c=Vr(t),d=Vr(n),g=Vr(r);return An((c==null?void 0:c.strategy)||((p=a.ui)==null?void 0:p.strategy),g?{wrapper:g}:{},c||{},o?La(a.ui,e,{}):{},d||{})}),f=N(()=>xP(s,["class"]));return{ui:u,attrs:f}},Al=(e,t)=>{const n=qe("form-events",void 0),r=qe("form-group",void 0),o=qe("form-inputs",void 0);r&&(e!=null&&e.id&&(r.inputId.value=e==null?void 0:e.id),o&&(o.value[r.name.value]=r.inputId.value));const s=ne(!1);function a(d,g){n&&n.emit({type:d,path:g})}function u(){a("blur",r==null?void 0:r.name.value),s.value=!0}function f(){a("change",r==null?void 0:r.name.value)}const c=IO(()=>{(s.value||r!=null&&r.eagerValidation.value)&&a("input",r==null?void 0:r.name.value)},300);return{inputId:N(()=>(e==null?void 0:e.id)??(r==null?void 0:r.inputId.value)),name:N(()=>(e==null?void 0:e.name)??(r==null?void 0:r.name.value)),size:N(()=>{var g;const d=t.size[r==null?void 0:r.size.value]?r==null?void 0:r.size.value:null;return(e==null?void 0:e.size)??d??((g=t==null?void 0:t.default)==null?void 0:g.size)}),color:N(()=>{var d;return(d=r==null?void 0:r.error)!=null&&d.value?"red":e==null?void 0:e.color}),emitFormBlur:u,emitFormInput:c,emitFormChange:f}},aM={wrapper:"relative inline-flex items-center justify-center flex-shrink-0",background:"bg-gray-100 dark:bg-gray-800",rounded:"rounded-full",text:"font-medium leading-none text-gray-900 dark:text-white truncate",placeholder:"font-medium leading-none text-gray-500 dark:text-gray-400 truncate",size:{"3xs":"h-4 w-4 text-[8px]","2xs":"h-5 w-5 text-[10px]",xs:"h-6 w-6 text-xs",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-14 w-14 text-xl","2xl":"h-16 w-16 text-2xl","3xl":"h-20 w-20 text-3xl"},chip:{base:"absolute rounded-full ring-1 ring-white dark:ring-gray-900 flex items-center justify-center text-white dark:text-gray-900 font-medium",background:"bg-{color}-500 dark:bg-{color}-400",position:{"top-right":"top-0 right-0","bottom-right":"bottom-0 right-0","top-left":"top-0 left-0","bottom-left":"bottom-0 left-0"},size:{"3xs":"h-[4px] min-w-[4px] text-[4px] p-px","2xs":"h-[5px] min-w-[5px] text-[5px] p-px",xs:"h-1.5 min-w-[0.375rem] text-[6px] p-px",sm:"h-2 min-w-[0.5rem] text-[7px] p-0.5",md:"h-2.5 min-w-[0.625rem] text-[8px] p-0.5",lg:"h-3 min-w-[0.75rem] text-[10px] p-0.5",xl:"h-3.5 min-w-[0.875rem] text-[11px] p-1","2xl":"h-4 min-w-[1rem] text-[12px] p-1","3xl":"h-5 min-w-[1.25rem] text-[14px] p-1"}},icon:{base:"text-gray-500 dark:text-gray-400 flex-shrink-0",size:{"3xs":"h-2 w-2","2xs":"h-2.5 w-2.5",xs:"h-3 w-3",sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7","2xl":"h-8 w-8","3xl":"h-10 w-10"}},default:{size:"sm",icon:null,chipColor:null,chipPosition:"top-right"}},lM={base:"focus:outline-none focus-visible:outline-0 disabled:cursor-not-allowed disabled:opacity-75 flex-shrink-0",font:"font-medium",rounded:"rounded-md",truncate:"text-left break-all line-clamp-1",block:"w-full flex justify-center items-center",inline:"inline-flex items-center",size:{"2xs":"text-xs",xs:"text-xs",sm:"text-sm",md:"text-sm",lg:"text-sm",xl:"text-base"},gap:{"2xs":"gap-x-1",xs:"gap-x-1.5",sm:"gap-x-1.5",md:"gap-x-2",lg:"gap-x-2.5",xl:"gap-x-2.5"},padding:{"2xs":"px-2 py-1",xs:"px-2.5 py-1.5",sm:"px-2.5 py-1.5",md:"px-3 py-2",lg:"px-3.5 py-2.5",xl:"px-3.5 py-2.5"},square:{"2xs":"p-1",xs:"p-1.5",sm:"p-1.5",md:"p-2",lg:"p-2.5",xl:"p-2.5"},color:{white:{solid:"shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-700 text-gray-900 dark:text-white bg-white hover:bg-gray-50 disabled:bg-white dark:bg-gray-900 dark:hover:bg-gray-800/50 dark:disabled:bg-gray-900 focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400",ghost:"text-gray-900 dark:text-white hover:bg-white dark:hover:bg-gray-900 focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400"},gray:{solid:"shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-700 text-gray-700 dark:text-gray-200 bg-gray-50 hover:bg-gray-100 disabled:bg-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700/50 dark:disabled:bg-gray-800 focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400",ghost:"text-gray-700 dark:text-gray-200 hover:text-gray-900 dark:hover:text-white hover:bg-gray-50 dark:hover:bg-gray-800 focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400",link:"text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 underline-offset-4 hover:underline focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400"},black:{solid:"shadow-sm text-white dark:text-gray-900 bg-gray-900 hover:bg-gray-800 disabled:bg-gray-900 dark:bg-white dark:hover:bg-gray-100 dark:disabled:bg-white focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400",link:"text-gray-900 dark:text-white underline-offset-4 hover:underline focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400"}},variant:{solid:"shadow-sm text-white dark:text-gray-900 bg-{color}-500 hover:bg-{color}-600 disabled:bg-{color}-500 dark:bg-{color}-400 dark:hover:bg-{color}-500 dark:disabled:bg-{color}-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-{color}-500 dark:focus-visible:outline-{color}-400",outline:"ring-1 ring-inset ring-current text-{color}-500 dark:text-{color}-400 hover:bg-{color}-50 disabled:bg-transparent dark:hover:bg-{color}-950 dark:disabled:bg-transparent focus-visible:ring-2 focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400",soft:"text-{color}-500 dark:text-{color}-400 bg-{color}-50 hover:bg-{color}-100 disabled:bg-{color}-50 dark:bg-{color}-950 dark:hover:bg-{color}-900 dark:disabled:bg-{color}-950 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400",ghost:"text-{color}-500 dark:text-{color}-400 hover:bg-{color}-50 disabled:bg-transparent dark:hover:bg-{color}-950 dark:disabled:bg-transparent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400",link:"text-{color}-500 hover:text-{color}-600 disabled:text-{color}-500 dark:text-{color}-400 dark:hover:text-{color}-500 dark:disabled:text-{color}-400 underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400"},icon:{base:"flex-shrink-0",loading:"animate-spin",size:{"2xs":"h-4 w-4",xs:"h-4 w-4",sm:"h-5 w-5",md:"h-5 w-5",lg:"h-5 w-5",xl:"h-6 w-6"}},default:{size:"sm",variant:"solid",color:"primary",loadingIcon:"i-heroicons-arrow-path-20-solid"}},Dx={base:"invisible before:visible before:block before:rotate-45 before:z-[-1] before:w-2 before:h-2",ring:"before:ring-1 before:ring-gray-200 dark:before:ring-gray-800",rounded:"before:rounded-sm",background:"before:bg-gray-200 dark:before:bg-gray-800",shadow:"before:shadow",placement:"group-data-[popper-placement*='right']:-left-1 group-data-[popper-placement*='left']:-right-1 group-data-[popper-placement*='top']:-bottom-1 group-data-[popper-placement*='bottom']:-top-1"},xg={wrapper:"relative",base:"relative block w-full disabled:cursor-not-allowed disabled:opacity-75 focus:outline-none border-0",form:"form-input",rounded:"rounded-md",placeholder:"placeholder-gray-400 dark:placeholder-gray-500",file:{base:"file:cursor-pointer file:rounded-l-md file:absolute file:left-0 file:inset-y-0 file:font-medium file:m-0 file:border-0 file:ring-1 file:ring-gray-300 dark:file:ring-gray-700 file:text-gray-900 dark:file:text-white file:bg-gray-50 hover:file:bg-gray-100 dark:file:bg-gray-800 dark:hover:file:bg-gray-700/50",padding:{"2xs":"ps-[85px]",xs:"ps-[87px]",sm:"ps-[96px]",md:"ps-[98px]",lg:"ps-[100px]",xl:"ps-[109px]"}},size:{"2xs":"text-xs",xs:"text-xs",sm:"text-sm",md:"text-sm",lg:"text-sm",xl:"text-base"},gap:{"2xs":"gap-x-1",xs:"gap-x-1.5",sm:"gap-x-1.5",md:"gap-x-2",lg:"gap-x-2.5",xl:"gap-x-2.5"},padding:{"2xs":"px-2 py-1",xs:"px-2.5 py-1.5",sm:"px-2.5 py-1.5",md:"px-3 py-2",lg:"px-3.5 py-2.5",xl:"px-3.5 py-2.5"},leading:{padding:{"2xs":"ps-7",xs:"ps-8",sm:"ps-9",md:"ps-10",lg:"ps-11",xl:"ps-12"}},trailing:{padding:{"2xs":"pe-7",xs:"pe-8",sm:"pe-9",md:"pe-10",lg:"pe-11",xl:"pe-12"}},color:{white:{outline:"shadow-sm bg-white dark:bg-gray-900 text-gray-900 dark:text-white ring-1 ring-inset ring-gray-300 dark:ring-gray-700 focus:ring-2 focus:ring-primary-500 dark:focus:ring-primary-400"},gray:{outline:"shadow-sm bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-white ring-1 ring-inset ring-gray-300 dark:ring-gray-700 focus:ring-2 focus:ring-primary-500 dark:focus:ring-primary-400"}},variant:{outline:"shadow-sm bg-transparent text-gray-900 dark:text-white ring-1 ring-inset ring-{color}-500 dark:ring-{color}-400 focus:ring-2 focus:ring-{color}-500 dark:focus:ring-{color}-400",none:"bg-transparent focus:ring-0 focus:shadow-none"},icon:{base:"flex-shrink-0 text-gray-400 dark:text-gray-500",color:"text-{color}-500 dark:text-{color}-400",loading:"animate-spin",size:{"2xs":"h-4 w-4",xs:"h-4 w-4",sm:"h-5 w-5",md:"h-5 w-5",lg:"h-5 w-5",xl:"h-6 w-6"},leading:{wrapper:"absolute inset-y-0 start-0 flex items-center",pointer:"pointer-events-none",padding:{"2xs":"px-2",xs:"px-2.5",sm:"px-2.5",md:"px-3",lg:"px-3.5",xl:"px-3.5"}},trailing:{wrapper:"absolute inset-y-0 end-0 flex items-center",pointer:"pointer-events-none",padding:{"2xs":"px-2",xs:"px-2.5",sm:"px-2.5",md:"px-3",lg:"px-3.5",xl:"px-3.5"}}},default:{size:"sm",color:"white",variant:"outline",loadingIcon:"i-heroicons-arrow-path-20-solid"}},Pb={container:"z-20 group",trigger:"flex items-center w-full",width:"w-full",height:"max-h-60",base:"relative focus:outline-none overflow-y-auto scroll-py-1",background:"bg-white dark:bg-gray-800",shadow:"shadow-lg",rounded:"rounded-md",padding:"p-1",ring:"ring-1 ring-gray-200 dark:ring-gray-700",empty:"text-sm text-gray-400 dark:text-gray-500 px-2 py-1.5",option:{base:"cursor-default select-none relative flex items-center justify-between gap-1",rounded:"rounded-md",padding:"px-1.5 py-1.5",size:"text-sm",color:"text-gray-900 dark:text-white",container:"flex items-center gap-1.5 min-w-0",active:"bg-gray-100 dark:bg-gray-900",inactive:"",selected:"pe-7",disabled:"cursor-not-allowed opacity-50",empty:"text-sm text-gray-400 dark:text-gray-500 px-2 py-1.5",icon:{base:"flex-shrink-0 h-5 w-5",active:"text-gray-900 dark:text-white",inactive:"text-gray-400 dark:text-gray-500"},selectedIcon:{wrapper:"absolute inset-y-0 end-0 flex items-center",padding:"pe-2",base:"h-5 w-5 text-gray-900 dark:text-white flex-shrink-0"},avatar:{base:"flex-shrink-0",size:"2xs"},chip:{base:"flex-shrink-0 w-2 h-2 mx-1 rounded-full"}},transition:{leaveActiveClass:"transition ease-in duration-100",leaveFromClass:"opacity-100",leaveToClass:"opacity-0"},popper:{placement:"bottom-end"},default:{selectedIcon:"i-heroicons-check-20-solid",trailingIcon:"i-heroicons-chevron-down-20-solid"},arrow:{...Dx,ring:"before:ring-1 before:ring-gray-200 dark:before:ring-gray-700",background:"before:bg-white dark:before:bg-gray-700"}},uM={wrapper:"",inner:"",label:{wrapper:"flex content-center items-center justify-between",base:"block font-medium text-gray-700 dark:text-gray-200",required:"after:content-['*'] after:ms-0.5 after:text-red-500 dark:after:text-red-400"},size:{"2xs":"text-xs",xs:"text-xs",sm:"text-sm",md:"text-sm",lg:"text-sm",xl:"text-base"},container:"mt-1 relative",description:"text-gray-500 dark:text-gray-400",hint:"text-gray-500 dark:text-gray-400",help:"mt-2 text-gray-500 dark:text-gray-400",error:"mt-2 text-red-500 dark:text-red-400",default:{size:"sm"}},cM={...xg,form:"form-textarea",default:{size:"sm",color:"white",variant:"outline"}},fM={...xg,form:"form-select",placeholder:"text-gray-400 dark:text-gray-500",default:{size:"sm",color:"white",variant:"outline",loadingIcon:"i-heroicons-arrow-path-20-solid",trailingIcon:"i-heroicons-chevron-down-20-solid"}},jj={...Pb,select:"inline-flex items-center text-left cursor-default",input:"block w-[calc(100%+0.5rem)] focus:ring-transparent text-sm px-3 py-1.5 text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-800 border-0 border-b border-gray-200 dark:border-gray-700 sticky -top-1 -mt-1 mb-1 -mx-1 z-10 placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none",required:"absolute inset-0 w-px opacity-0 cursor-default",label:"block truncate",option:{...Pb.option,create:"block truncate"},transition:{leaveActiveClass:"transition ease-in duration-100",leaveFromClass:"opacity-100",leaveToClass:"opacity-0"},popper:{placement:"bottom-end"},default:{selectedIcon:"i-heroicons-check-20-solid",clearSearchOnClose:!1,showCreateOptionWhen:"empty"},arrow:{...Dx,ring:"before:ring-1 before:ring-gray-200 dark:before:ring-gray-700",background:"before:bg-white dark:before:bg-gray-700"}},dM={wrapper:"relative flex items-start",container:"flex items-center h-5",base:"h-4 w-4 dark:checked:bg-current dark:checked:border-transparent dark:indeterminate:bg-current dark:indeterminate:border-transparent disabled:opacity-50 disabled:cursor-not-allowed focus:ring-0 focus:ring-transparent focus:ring-offset-transparent",form:"form-checkbox",rounded:"rounded",color:"text-{color}-500 dark:text-{color}-400",background:"bg-white dark:bg-gray-900",border:"border border-gray-300 dark:border-gray-700",ring:"focus-visible:ring-2 focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white dark:focus-visible:ring-offset-gray-900",inner:"ms-3 flex flex-col",label:"text-sm font-medium text-gray-700 dark:text-gray-200",required:"text-sm text-red-500 dark:text-red-400",help:"text-sm text-gray-500 dark:text-gray-400",default:{color:"primary"}},hM={base:"relative inline-flex flex-shrink-0 border-2 border-transparent disabled:cursor-not-allowed disabled:opacity-50 focus:outline-none",rounded:"rounded-full",ring:"focus-visible:ring-2 focus-visible:ring-{color}-500 dark:focus-visible:ring-{color}-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white dark:focus-visible:ring-offset-gray-900",active:"bg-{color}-500 dark:bg-{color}-400",inactive:"bg-gray-200 dark:bg-gray-700",size:{"2xs":"h-3 w-5",xs:"h-3.5 w-6",sm:"h-4 w-7",md:"h-5 w-9",lg:"h-6 w-11",xl:"h-7 w-[3.25rem]","2xl":"h-8 w-[3.75rem]"},container:{base:"pointer-events-none relative inline-block rounded-full bg-white dark:bg-gray-900 shadow transform ring-0 transition ease-in-out duration-200",active:{"2xs":"translate-x-2 rtl:-translate-x-2",xs:"translate-x-2.5 rtl:-translate-x-2.5",sm:"translate-x-3 rtl:-translate-x-3",md:"translate-x-4 rtl:-translate-x-4",lg:"translate-x-5 rtl:-translate-x-5",xl:"translate-x-6 rtl:-translate-x-6","2xl":"translate-x-7 rtl:-translate-x-7"},inactive:"translate-x-0 rtl:-translate-x-0",size:{"2xs":"h-2 w-2",xs:"h-2.5 w-2.5",sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5",xl:"h-6 w-6","2xl":"h-7 w-7"}},icon:{base:"absolute inset-0 h-full w-full flex items-center justify-center transition-opacity",active:"opacity-100 ease-in duration-200",inactive:"opacity-0 ease-out duration-100",size:{"2xs":"h-2 w-2",xs:"h-2 w-2",sm:"h-2 w-2",md:"h-3 w-3",lg:"h-4 w-4",xl:"h-5 w-5","2xl":"h-6 w-6"},on:"text-{color}-500 dark:text-{color}-400",off:"text-gray-400 dark:text-gray-500",loading:"animate-spin text-{color}-500 dark:text-{color}-400"},default:{onIcon:null,offIcon:null,loadingIcon:"i-heroicons-arrow-path-20-solid",color:"primary",size:"md"}},pM={base:"",background:"bg-white dark:bg-gray-900",divide:"divide-y divide-gray-200 dark:divide-gray-800",ring:"ring-1 ring-gray-200 dark:ring-gray-800",rounded:"rounded-lg",shadow:"shadow",body:{base:"",background:"",padding:"px-4 py-5 sm:p-6"},header:{base:"",background:"",padding:"px-4 py-5 sm:px-6"},footer:{base:"",background:"",padding:"px-4 py-4 sm:px-6"}},gM={base:"mx-auto",padding:"px-4 sm:px-6 lg:px-8",constrained:"max-w-7xl"},mM={wrapper:"relative z-50",inner:"fixed inset-0 overflow-y-auto",container:"flex min-h-full items-end sm:items-center justify-center text-center",padding:"p-4 sm:p-0",margin:"sm:my-8",base:"relative text-left rtl:text-right flex flex-col",overlay:{base:"fixed inset-0 transition-opacity",background:"bg-gray-200/75 dark:bg-gray-800/75",transition:{enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0"}},background:"bg-white dark:bg-gray-900",ring:"",rounded:"rounded-lg",shadow:"shadow-xl",width:"w-full sm:max-w-lg",height:"",fullscreen:"w-screen h-screen",transition:{enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"}},vM={wrapper:"fixed inset-0 flex z-50",overlay:{base:"fixed inset-0 transition-opacity",background:"bg-gray-200/75 dark:bg-gray-800/75",transition:{enter:"ease-in-out duration-500",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in-out duration-500",leaveFrom:"opacity-100",leaveTo:"opacity-0"}},base:"relative flex-1 flex flex-col w-full focus:outline-none",background:"bg-white dark:bg-gray-900",ring:"",rounded:"",padding:"",shadow:"shadow-xl",width:"w-screen max-w-md",translate:{base:"translate-x-0",left:"-translate-x-full rtl:translate-x-full",right:"translate-x-full rtl:-translate-x-full"},transition:{enter:"transform transition ease-in-out duration-300",leave:"transform transition ease-in-out duration-200"}},yM={wrapper:"w-full pointer-events-auto",container:"relative overflow-hidden",inner:"w-0 flex-1",title:"text-sm font-medium text-gray-900 dark:text-white",description:"mt-1 text-sm leading-4 text-gray-500 dark:text-gray-400",actions:"flex items-center gap-2 mt-3 flex-shrink-0",background:"bg-white dark:bg-gray-900",shadow:"shadow-lg",rounded:"rounded-lg",padding:"p-4",gap:"gap-3",ring:"ring-1 ring-gray-200 dark:ring-gray-800",icon:{base:"flex-shrink-0 w-5 h-5",color:"text-{color}-500 dark:text-{color}-400"},avatar:{base:"flex-shrink-0 self-center",size:"md"},progress:{base:"absolute bottom-0 end-0 start-0 h-1",background:"bg-{color}-500 dark:bg-{color}-400"},transition:{enterActiveClass:"transform ease-out duration-300 transition",enterFromClass:"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",enterToClass:"translate-y-0 opacity-100 sm:translate-x-0",leaveActiveClass:"transition ease-in duration-100",leaveFromClass:"opacity-100",leaveToClass:"opacity-0"},default:{color:"primary",icon:null,timeout:5e3,closeButton:{icon:"i-heroicons-x-mark-20-solid",color:"gray",variant:"link",padded:!1},actionButton:{size:"xs",color:"white"}}},bM={wrapper:"fixed flex flex-col justify-end z-[55]",position:"bottom-0 end-0",width:"w-full sm:w-96",container:"px-4 sm:px-6 py-6 space-y-3 overflow-y-auto"},Mb=An(Ge.ui.strategy,Ge.ui.checkbox,dM),_M=_e({inheritAttrs:!1,props:{id:{type:String,default:()=>null},value:{type:[String,Number,Boolean,Object],default:null},modelValue:{type:[Boolean,Array],default:null},name:{type:String,default:null},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:void 0},help:{type:String,default:null},label:{type:String,default:null},required:{type:Boolean,default:!1},color:{type:String,default:()=>Mb.default.color,validator(e){return Ge.ui.colors.includes(e)}},inputClass:{type:String,default:""},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},emits:["update:modelValue","change"],setup(e,{emit:t}){const{ui:n,attrs:r}=Vn("checkbox",Mt(e,"ui"),Mb,Mt(e,"class")),{emitFormChange:o,color:s,name:a,inputId:u}=Al(e),f=u.value??Ys("$YWrWuPJ69t"),c=N({get(){return e.modelValue},set(p){t("update:modelValue",p)}}),d=p=>{t("change",p.target.checked),o()},g=N(()=>er(gt(n.value.base,n.value.form,n.value.rounded,n.value.background,n.value.border,s.value&&n.value.ring.replaceAll("{color}",s.value),s.value&&n.value.color.replaceAll("{color}",s.value)),e.inputClass));return{ui:n,attrs:r,toggle:c,inputId:f,name:a,inputClass:g,onChange:d}}}),wM=["data-n-ids"],xM=["id","name","required","value","disabled","indeterminate"],kM=["for"];function SM(e,t,n,r,o,s){return H(),J("div",{class:ae(e.ui.wrapper),"data-n-ids":e.attrs["data-n-ids"]},[R("div",{class:ae(e.ui.container)},[I1(R("input",lt({id:e.inputId,"onUpdate:modelValue":t[0]||(t[0]=a=>e.toggle=a),name:e.name,required:e.required,value:e.value,disabled:e.disabled,indeterminate:e.indeterminate,type:"checkbox",class:e.inputClass},e.attrs,{onChange:t[1]||(t[1]=(...a)=>e.onChange&&e.onChange(...a))}),null,16,xM),[[R4,e.toggle]])],2),e.label||e.$slots.label?(H(),J("div",{key:0,class:ae(e.ui.inner)},[R("label",{for:e.inputId,class:ae(e.ui.label)},[at(e.$slots,"label",{},()=>[de(tt(e.label),1)]),e.required?(H(),J("span",{key:0,class:ae(e.ui.required)},"*",2)):Ie("",!0)],10,kM),e.help?(H(),J("p",{key:0,class:ae(e.ui.help)},tt(e.help),3)):Ie("",!0)],2)):Ie("",!0)],10,wM)}const Bx=qt(_M,[["render",SM]]),EM={},CM={class:"bg-gray-50 dark:bg-gray-700 dark:border-gray-800 overflow-hidden border sm:rounded-lg"},TM={class:"px-4 py-5 sm:p-6"};function AM(e,t){return H(),J("div",CM,[R("div",TM,[at(e.$slots,"default")])])}const $l=qt(EM,[["render",AM]]),Fx=Object.freeze({left:0,top:0,width:16,height:16}),Nx=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),kg=Object.freeze({...Fx,...Nx});Object.freeze({...kg,body:"",hidden:!1});({...Fx});const Ux=Object.freeze({width:null,height:null}),zx=Object.freeze({...Ux,...Nx});function $M(e,t){const n={...e};for(const r in t){const o=t[r],s=typeof o;r in Ux?(o===null||o&&(s==="string"||s==="number"))&&(n[r]=o):s===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const IM=/[\s,]+/;function RM(e,t){t.split(IM).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function LM(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return t}const OM=/(-?[0-9.]*[0-9]+[0-9.]*)/g,PM=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Db(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(OM);if(r===null||!r.length)return e;const o=[];let s=r.shift(),a=PM.test(s);for(;;){if(a){const u=parseFloat(s);isNaN(u)?o.push(s):o.push(Math.ceil(u*t*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");a=!a}}function MM(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const o=e.indexOf(">",r),s=e.indexOf("",s);if(a===-1)break;n+=e.slice(o+1,s).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:n,content:e}}function DM(e,t){return e?""+e+""+t:t}function BM(e,t,n){const r=MM(e);return DM(r.defs,t+r.content+n)}const FM=e=>e==="unset"||e==="undefined"||e==="none";function NM(e,t){const n={...kg,...e},r={...zx,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(k=>{const _=[],x=k.hFlip,E=k.vFlip;let w=k.rotate;x?E?w+=2:(_.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),_.push("scale(-1 1)"),o.top=o.left=0):E&&(_.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),_.push("scale(1 -1)"),o.top=o.left=0);let T;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:T=o.height/2+o.top,_.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:_.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:T=o.width/2+o.left,_.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")");break}w%2===1&&(o.left!==o.top&&(T=o.left,o.left=o.top,o.top=T),o.width!==o.height&&(T=o.width,o.width=o.height,o.height=T)),_.length&&(s=BM(s,'',""))});const a=r.width,u=r.height,f=o.width,c=o.height;let d,g;a===null?(g=u===null?"1em":u==="auto"?c:u,d=Db(g,f/c)):(d=a==="auto"?f:a,g=u===null?Db(d,c/f):u==="auto"?c:u);const p={},v=(k,_)=>{FM(_)||(p[k]=_.toString())};v("width",d),v("height",g);const y=[o.left,o.top,f,c];return p.viewBox=y.join(" "),{attributes:p,viewBox:y,body:s}}const UM=/\sid="(\S+)"/g,zM="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let VM=0;function HM(e,t=zM){const n=[];let r;for(;r=UM.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const a=typeof t=="function"?t(s):t+(VM++).toString(),u=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+u+')([")]|\\.[a-z])',"g"),"$1"+a+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}function jM(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}function WM(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function KM(e){return"data:image/svg+xml,"+WM(e)}function qM(e){return'url("'+KM(e)+'")'}const Bb={...zx,inline:!1},GM={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},ZM={display:"inline-block"},gp={backgroundColor:"currentColor"},Vx={backgroundColor:"transparent"},Fb={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Nb={webkitMask:gp,mask:gp,background:Vx};for(const e in Nb){const t=Nb[e];for(const n in Fb)t[e+n]=Fb[n]}const rc={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";rc[e+"-flip"]=t,rc[e.slice(0,1)+"-flip"]=t,rc[e+"Flip"]=t});function Ub(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const JM=(e,t)=>{const n=$M(Bb,t),r={...GM},o=t.mode||"svg",s={},a=t.style,u=typeof a=="object"&&!(a instanceof Array)?a:{};for(let k in t){const _=t[k];if(_!==void 0)switch(k){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":n[k]=_===!0||_==="true"||_===1;break;case"flip":typeof _=="string"&&RM(n,_);break;case"color":s.color=_;break;case"rotate":typeof _=="string"?n[k]=LM(_):typeof _=="number"&&(n[k]=_);break;case"ariaHidden":case"aria-hidden":_!==!0&&_!=="true"&&delete r["aria-hidden"];break;default:{const x=rc[k];x?(_===!0||_==="true"||_===1)&&(n[x]=!0):Bb[k]===void 0&&(r[k]=_)}}}const f=NM(e,n),c=f.attributes;if(n.inline&&(s.verticalAlign="-0.125em"),o==="svg"){r.style={...s,...u},Object.assign(r,c);let k=0,_=t.id;return typeof _=="string"&&(_=_.replace(/-/g,"_")),r.innerHTML=HM(f.body,_?()=>_+"ID"+k++:"iconifyVue"),Ye("svg",r)}const{body:d,width:g,height:p}=e,v=o==="mask"||(o==="bg"?!1:d.indexOf("currentColor")!==-1),y=jM(d,{...c,width:g+"",height:p+""});return r.style={...s,"--svg":qM(y),width:Ub(c.width),height:Ub(c.height),...ZM,...v?gp:Vx,...u},Ye("span",r)},YM=Object.create(null),XM=_e({inheritAttrs:!1,render(){const e=this.$attrs,t=e.icon,n=typeof t=="string"?YM[t]:typeof t=="object"?t:null;return n===null||typeof n!="object"||typeof n.body!="string"?this.$slots.default?this.$slots.default():null:JM({...kg,...n},e)}}),ja=/^[a-z0-9]+(-[a-z0-9]+)*$/,Zc=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const u=o.pop(),f=o.pop(),c={provider:o.length>0?o[0]:r,prefix:f,name:u};return t&&!oc(c)?null:c}const s=o[0],a=s.split("-");if(a.length>1){const u={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!oc(u)?null:u}if(n&&r===""){const u={provider:r,prefix:"",name:s};return t&&!oc(u,n)?null:u}return null},oc=(e,t)=>e?!!((e.provider===""||e.provider.match(ja))&&(t&&e.prefix===""||e.prefix.match(ja))&&e.name.match(ja)):!1,Hx=Object.freeze({left:0,top:0,width:16,height:16}),Tc=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Sg=Object.freeze({...Hx,...Tc}),mp=Object.freeze({...Sg,body:"",hidden:!1});function QM(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function zb(e,t){const n=QM(e,t);for(const r in mp)r in Tc?r in e&&!(r in n)&&(n[r]=Tc[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function eD(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(a){if(n[a])return o[a]=[];if(!(a in o)){o[a]=null;const u=r[a]&&r[a].parent,f=u&&s(u);f&&(o[a]=[u].concat(f))}return o[a]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(s),o}function tD(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let s={};function a(u){s=zb(r[u]||o[u],s)}return a(t),n.forEach(a),zb(e,s)}function jx(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=eD(e);for(const o in r){const s=r[o];s&&(t(o,tD(e,o,s)),n.push(o))}return n}const nD={provider:"",aliases:{},not_found:{},...Hx};function Yd(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Wx(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Yd(e,nD))return null;const n=t.icons;for(const o in n){const s=n[o];if(!o.match(ja)||typeof s.body!="string"||!Yd(s,mp))return null}const r=t.aliases||Object.create(null);for(const o in r){const s=r[o],a=s.parent;if(!o.match(ja)||typeof a!="string"||!n[a]&&!r[a]||!Yd(s,mp))return null}return t}const Vb=Object.create(null);function rD(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Ki(e,t){const n=Vb[e]||(Vb[e]=Object.create(null));return n[t]||(n[t]=rD(e,t))}function Eg(e,t){return Wx(t)?jx(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function oD(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let ol=!1;function Kx(e){return typeof e=="boolean"&&(ol=e),ol}function iD(e){const t=typeof e=="string"?Zc(e,!0,ol):e;if(t){const n=Ki(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function sD(e,t){const n=Zc(e,!0,ol);if(!n)return!1;const r=Ki(n.provider,n.prefix);return oD(r,n.name,t)}function aD(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),ol&&!t&&!e.prefix){let o=!1;return Wx(e)&&(e.prefix="",jx(e,(s,a)=>{a&&sD(s,a)&&(o=!0)})),o}const n=e.prefix;if(!oc({provider:t,prefix:n,name:"a"}))return!1;const r=Ki(t,n);return!!Eg(r,e)}const lD=Object.freeze({width:null,height:null}),uD=Object.freeze({...lD,...Tc});""+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);const vp=Object.create(null);function cD(e,t){vp[e]=t}function yp(e){return vp[e]||vp[""]}function Cg(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Tg=Object.create(null),Ea=["https://api.simplesvg.com","https://api.unisvg.com"],ic=[];for(;Ea.length>0;)Ea.length===1||Math.random()>.5?ic.push(Ea.shift()):ic.push(Ea.pop());Tg[""]=Cg({resources:["https://api.iconify.design"].concat(ic)});function bp(e,t){const n=Cg(t);return n===null?!1:(Tg[e]=n,!0)}function Ag(e){return Tg[e]}const fD=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Hb=fD();function dD(e,t){const n=Ag(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(a=>{o=Math.max(o,a.length)});const s=t+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function hD(e){return e===404}const pD=(e,t,n)=>{const r=[],o=dD(e,t),s="icons";let a={type:s,provider:e,prefix:t,icons:[]},u=0;return n.forEach((f,c)=>{u+=f.length+1,u>=o&&c>0&&(r.push(a),a={type:s,provider:e,prefix:t,icons:[]},u=f.length),a.icons.push(f)}),r.push(a),r};function gD(e){if(typeof e=="string"){const t=Ag(e);if(t)return t.path}return"/"}const mD=(e,t,n)=>{if(!Hb){n("abort",424);return}let r=gD(t.provider);switch(t.type){case"icons":{const s=t.prefix,u=t.icons.join(","),f=new URLSearchParams({icons:u});r+=s+".json?"+f.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;Hb(e+r).then(s=>{const a=s.status;if(a!==200){setTimeout(()=>{n(hD(a)?"abort":"next",a)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},vD={prepare:pD,send:mD};function yD(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,a=o.prefix,u=o.name,f=n[s]||(n[s]=Object.create(null)),c=f[a]||(f[a]=Ki(s,a));let d;u in c.icons?d=t.loaded:a===""||c.missing.has(u)?d=t.missing:d=t.pending;const g={provider:s,prefix:a,name:u};d.push(g)}),t}function qx(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function bD(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(s=>{const a=s.icons,u=a.pending.length;a.pending=a.pending.filter(f=>{if(f.prefix!==o)return!0;const c=f.name;if(e.icons[c])a.loaded.push({provider:r,prefix:o,name:c});else if(e.missing.has(c))a.missing.push({provider:r,prefix:o,name:c});else return n=!0,!0;return!1}),a.pending.length!==u&&(n||qx([e],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}let _D=0;function wD(e,t,n){const r=_D++,o=qx.bind(null,n,r);if(!t.pending.length)return o;const s={id:r,icons:t,callback:e,abort:o};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(s)}),o}function xD(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?Zc(o,t,n):o;s&&r.push(s)}),r}var kD={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function SD(e,t,n,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let a;if(e.random){let M=e.resources.slice(0);for(a=[];M.length>1;){const F=Math.floor(Math.random()*M.length);a.push(M[F]),M=M.slice(0,F).concat(M.slice(F+1))}a=a.concat(M)}else a=e.resources.slice(s).concat(e.resources.slice(0,s));const u=Date.now();let f="pending",c=0,d,g=null,p=[],v=[];typeof r=="function"&&v.push(r);function y(){g&&(clearTimeout(g),g=null)}function k(){f==="pending"&&(f="aborted"),y(),p.forEach(M=>{M.status==="pending"&&(M.status="aborted")}),p=[]}function _(M,F){F&&(v=[]),typeof M=="function"&&v.push(M)}function x(){return{startTime:u,payload:t,status:f,queriesSent:c,queriesPending:p.length,subscribe:_,abort:k}}function E(){f="failed",v.forEach(M=>{M(void 0,d)})}function w(){p.forEach(M=>{M.status==="pending"&&(M.status="aborted")}),p=[]}function T(M,F,z){const U=F!=="success";switch(p=p.filter(B=>B!==M),f){case"pending":break;case"failed":if(U||!e.dataAfterTimeout)return;break;default:return}if(F==="abort"){d=z,E();return}if(U){d=z,p.length||(a.length?O():E());return}if(y(),w(),!e.random){const B=e.resources.indexOf(M.resource);B!==-1&&B!==e.index&&(e.index=B)}f="completed",v.forEach(B=>{B(z)})}function O(){if(f!=="pending")return;y();const M=a.shift();if(M===void 0){if(p.length){g=setTimeout(()=>{y(),f==="pending"&&(w(),E())},e.timeout);return}E();return}const F={status:"pending",resource:M,callback:(z,U)=>{T(F,z,U)}};p.push(F),c++,g=setTimeout(O,e.rotate),n(M,t,F.callback)}return setTimeout(O),x}function Gx(e){const t={...kD,...e};let n=[];function r(){n=n.filter(u=>u().status==="pending")}function o(u,f,c){const d=SD(t,u,f,(g,p)=>{r(),c&&c(g,p)});return n.push(d),d}function s(u){return n.find(f=>u(f))||null}return{query:o,find:s,setIndex:u=>{t.index=u},getIndex:()=>t.index,cleanup:r}}function jb(){}const Xd=Object.create(null);function ED(e){if(!Xd[e]){const t=Ag(e);if(!t)return;const n=Gx(t),r={config:t,redundancy:n};Xd[e]=r}return Xd[e]}function CD(e,t,n){let r,o;if(typeof e=="string"){const s=yp(e);if(!s)return n(void 0,424),jb;o=s.send;const a=ED(e);a&&(r=a.redundancy)}else{const s=Cg(e);if(s){r=Gx(s);const a=e.resources?e.resources[0]:"",u=yp(a);u&&(o=u.send)}}return!r||!o?(n(void 0,424),jb):r.query(t,o,n)().abort}const Wb="iconify2",il="iconify",Zx=il+"-count",Kb=il+"-version",Jx=36e5,TD=168,AD=50;function _p(e,t){try{return e.getItem(t)}catch{}}function $g(e,t,n){try{return e.setItem(t,n),!0}catch{}}function qb(e,t){try{e.removeItem(t)}catch{}}function wp(e,t){return $g(e,Zx,t.toString())}function xp(e){return parseInt(_p(e,Zx))||0}const Jc={local:!0,session:!0},Yx={local:new Set,session:new Set};let Ig=!1;function $D(e){Ig=e}let Vu=typeof window>"u"?{}:window;function Xx(e){const t=e+"Storage";try{if(Vu&&Vu[t]&&typeof Vu[t].length=="number")return Vu[t]}catch{}Jc[e]=!1}function Qx(e,t){const n=Xx(e);if(!n)return;const r=_p(n,Kb);if(r!==Wb){if(r){const u=xp(n);for(let f=0;f{const f=il+u.toString(),c=_p(n,f);if(typeof c=="string"){try{const d=JSON.parse(c);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>o&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,u))return!0}catch{}qb(n,f)}};let a=xp(n);for(let u=a-1;u>=0;u--)s(u)||(u===a-1?(a--,wp(n,a)):Yx[e].add(u))}function e2(){if(!Ig){$D(!0);for(const e in Jc)Qx(e,t=>{const n=t.data,r=t.provider,o=n.prefix,s=Ki(r,o);if(!Eg(s,n).length)return!1;const a=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,a):a,!0})}}function ID(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in Jc)Qx(r,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function RD(e,t){Ig||e2();function n(r){let o;if(!Jc[r]||!(o=Xx(r)))return;const s=Yx[r];let a;if(s.size)s.delete(a=Array.from(s).shift());else if(a=xp(o),a>=AD||!wp(o,a+1))return;const u={cached:Math.floor(Date.now()/Jx),provider:e.provider,data:t};return $g(o,il+a.toString(),JSON.stringify(u))}t.lastModified&&!ID(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Gb(){}function LD(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,bD(e)}))}function OD(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;if(!o||!(s=yp(n)))return;s.prepare(n,r,o).forEach(u=>{CD(n,u,f=>{if(typeof f!="object")u.icons.forEach(c=>{e.missing.add(c)});else try{const c=Eg(e,f);if(!c.length)return;const d=e.pendingIcons;d&&c.forEach(g=>{d.delete(g)}),RD(e,f)}catch(c){console.error(c)}LD(e)})})}))}const PD=(e,t)=>{const n=xD(e,!0,Kx()),r=yD(n);if(!r.pending.length){let f=!0;return t&&setTimeout(()=>{f&&t(r.loaded,r.missing,r.pending,Gb)}),()=>{f=!1}}const o=Object.create(null),s=[];let a,u;return r.pending.forEach(f=>{const{provider:c,prefix:d}=f;if(d===u&&c===a)return;a=c,u=d,s.push(Ki(c,d));const g=o[c]||(o[c]=Object.create(null));g[d]||(g[d]=[])}),r.pending.forEach(f=>{const{provider:c,prefix:d,name:g}=f,p=Ki(c,d),v=p.pendingIcons||(p.pendingIcons=new Set);v.has(g)||(v.add(g),o[c][d].push(g))}),s.forEach(f=>{const{provider:c,prefix:d}=f;o[c][d].length&&OD(f,o[c][d])}),t?wD(t,r,s):Gb},MD=e=>new Promise((t,n)=>{const r=typeof e=="string"?Zc(e,!0):e;if(!r){n(e);return}PD([r||e],o=>{if(o.length&&r){const s=iD(r);if(s){t({...Sg,...s});return}}n(e)})});({...uD});const Zb={backgroundColor:"currentColor"},DD={backgroundColor:"transparent"},Jb={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Yb={webkitMask:Zb,mask:Zb,background:DD};for(const e in Yb){const t=Yb[e];for(const n in Jb)t[e+n]=Jb[n]}const Qd={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";Qd[e+"-flip"]=t,Qd[e.slice(0,1)+"-flip"]=t,Qd[e+"Flip"]=t});Kx(!0);cD("",vD);if(typeof document<"u"&&typeof window<"u"){e2();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!aD(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;bp(n,o)||console.error(r)}catch{console.error(r)}}}}({...Sg});const BD=["fluent-emoji-high-contrast","material-symbols-light","cryptocurrency-color","icon-park-outline","icon-park-twotone","fluent-emoji-flat","emojione-monotone","streamline-emojis","heroicons-outline","simple-line-icons","material-symbols","flat-color-icons","icon-park-solid","pepicons-pencil","heroicons-solid","pepicons-print","cryptocurrency","pixelarticons","system-uicons","bitcoin-icons","devicon-plain","entypo-social","token-branded","grommet-icons","vscode-icons","pepicons-pop","svg-spinners","fluent-emoji","simple-icons","circle-flags","medical-icon","icomoon-free","majesticons","radix-icons","humbleicons","fa6-regular","emojione-v1","skill-icons","academicons","healthicons","fluent-mdl2","teenyicons","ant-design","gravity-ui","akar-icons","lets-icons","streamline","fa6-brands","file-icons","game-icons","foundation","fa-regular","mono-icons","iconamoon","zondicons","mdi-light","eos-icons","gridicons","icon-park","heroicons","fa6-solid","meteocons","arcticons","dashicons","fa-brands","websymbol","fontelico","mingcute","flowbite","marketeq","bytesize","guidance","openmoji","emojione","nonicons","brandico","flagpack","fa-solid","fontisto","si-glyph","pepicons","iconoir","tdesign","clarity","octicon","codicon","pajamas","formkit","line-md","twemoji","noto-v1","fxemoji","devicon","raphael","flat-ui","topcoat","feather","tabler","carbon","lucide","memory","mynaui","circum","fluent","nimbus","entypo","icons8","subway","vaadin","solar","basil","typcn","charm","prime","quill","logos","token","covid","maki","gala","mage","ooui","noto","unjs","flag","iwwa","zmdi","bpmn","mdi","ion","uil","bxs","cil","uiw","uim","uit","uis","jam","oui","bxl","cib","cbi","cif","gis","map","geo","fad","eva","wpf","whh","ic","ph","ri","bi","bx","gg","ci","ep","fe","mi","f7","ei","wi","la","fa","oi","et","el","ls","vs","il","ps"];function FD(e=""){let t,n="";if(e[0]==="@"&&e.includes(":")&&(n=e.split(":")[0].slice(1),e=e.split(":").slice(1).join(":")),e.startsWith("i-")){e=e.replace(/^i-/,"");for(const r of BD)if(e.startsWith(r)){t=r,e=e.slice(r.length+1);break}}else if(e.includes(":")){const[r,o]=e.split(":");t=r,e=o}return{provider:n,prefix:t||"",name:e||""}}const ND=_e({__name:"Icon",props:{name:{type:String,required:!0},size:{type:String,default:""}},async setup(e){let t,n;const r=nt(),o=Sl(),s=e;vt(()=>{var _;return(_=o.nuxtIcon)==null?void 0:_.iconifyApiOptions},()=>{var _,x,E,w,T,O;if((x=(_=o.nuxtIcon)==null?void 0:_.iconifyApiOptions)!=null&&x.url){try{new URL(o.nuxtIcon.iconifyApiOptions.url)}catch{console.warn("Nuxt Icon: Invalid custom Iconify API URL");return}if((w=(E=o.nuxtIcon)==null?void 0:E.iconifyApiOptions)!=null&&w.publicApiFallback){bp("custom",{resources:[(T=o.nuxtIcon)==null?void 0:T.iconifyApiOptions.url],index:0});return}bp("",{resources:[(O=o.nuxtIcon)==null?void 0:O.iconifyApiOptions.url]})}},{immediate:!0});const a=Js("icons",()=>({})),u=ne(!1),f=N(()=>{var _,x;return(x=(_=o.nuxtIcon)==null?void 0:_.aliases)!=null&&x[s.name]?o.nuxtIcon.aliases[s.name]:s.name}),c=N(()=>FD(f.value)),d=N(()=>[c.value.provider,c.value.prefix,c.value.name].filter(Boolean).join(":")),g=N(()=>{var _;return(_=a.value)==null?void 0:_[d.value]}),p=N(()=>{var _;return(_=r.vueApp)==null?void 0:_.component(f.value)}),v=N(()=>{var x,E,w;if(!s.size&&typeof((x=o.nuxtIcon)==null?void 0:x.size)=="boolean"&&!((E=o.nuxtIcon)!=null&&E.size))return;const _=s.size||((w=o.nuxtIcon)==null?void 0:w.size)||"1em";return String(Number(_))===_?`${_}px`:_}),y=N(()=>{var _;return((_=o==null?void 0:o.nuxtIcon)==null?void 0:_.class)??"icon"});async function k(){var _;p.value||(_=a.value)!=null&&_[d.value]||(u.value=!0,a.value[d.value]=await MD(c.value).catch(()=>{}),u.value=!1)}return vt(f,k),!p.value&&([t,n]=I3(()=>k()),t=await t,n()),(_,x)=>u.value?(H(),J("span",{key:0,class:ae(y.value),style:zi({width:v.value,height:v.value})},null,6)):g.value?(H(),$e($(XM),{key:1,icon:g.value,class:ae(y.value),width:v.value,height:v.value},null,8,["icon","class","width","height"])):p.value?(H(),$e(vo(p.value),{key:2,class:ae(y.value),width:v.value,height:v.value},null,8,["class","width","height"])):(H(),J("span",{key:3,class:ae(y.value),style:zi({fontSize:v.value,lineHeight:v.value,width:v.value,height:v.value})},[at(_.$slots,"default",{},()=>[de(tt(e.name),1)],!0)],6))}}),t2=qt(ND,[["__scopeId","data-v-e8d572f6"]]),UD=Object.freeze(Object.defineProperty({__proto__:null,default:t2},Symbol.toStringTag,{value:"Module"})),zD=_e({props:{name:{type:String,required:!0},dynamic:{type:Boolean,default:!1}},setup(e){const t=Sl();return{dynamic:N(()=>{var r,o;return e.dynamic||((o=(r=t.ui)==null?void 0:r.icons)==null?void 0:o.dynamic)})}}});function VD(e,t,n,r,o,s){const a=t2;return e.dynamic?(H(),$e(a,{key:0,name:e.name},null,8,["name"])):(H(),J("span",{key:1,class:ae(e.name)},null,2))}const _r=qt(zD,[["render",VD]]);function Rg({ui:e,props:t}){const n=nr();if(wt("ButtonGroupContextConsumer",!0),qe("ButtonGroupContextConsumer",!1))return{size:N(()=>t.size),rounded:N(()=>e.value.rounded)};let o=n.parent,s;for(;o&&!s;){if(o.type.name==="ButtonGroup"){s=qe(`group-${o.uid}`);break}o=o.parent}const a=N(()=>s==null?void 0:s.value.children.indexOf(n));return ut(()=>{s==null||s.value.register(n)}),Kt(()=>{s==null||s.value.unregister(n)}),{size:N(()=>(s==null?void 0:s.value.size)||t.size),rounded:N(()=>!s||a.value===-1?e.value.rounded:s.value.children.length===1?s.value.ui.rounded:a.value===0?s.value.rounded.start:a.value===s.value.children.length-1?s.value.rounded.end:"rounded-none")}}const lo=An(Ge.ui.strategy,Ge.ui.input,xg),HD=_e({components:{UIcon:_r},inheritAttrs:!1,props:{modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},id:{type:String,default:null},name:{type:String,default:null},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},autofocusDelay:{type:Number,default:100},icon:{type:String,default:null},loadingIcon:{type:String,default:()=>lo.default.loadingIcon},leadingIcon:{type:String,default:null},trailingIcon:{type:String,default:null},trailing:{type:Boolean,default:!1},leading:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},padded:{type:Boolean,default:!0},size:{type:String,default:null,validator(e){return Object.keys(lo.size).includes(e)}},color:{type:String,default:()=>lo.default.color,validator(e){return[...Ge.ui.colors,...Object.keys(lo.color)].includes(e)}},variant:{type:String,default:()=>lo.default.variant,validator(e){return[...Object.keys(lo.variant),...Object.values(lo.color).flatMap(t=>Object.keys(t))].includes(e)}},inputClass:{type:String,default:null},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})},modelModifiers:{type:Object,default:()=>({})}},emits:["update:modelValue","blur","change"],setup(e,{emit:t,slots:n}){const{ui:r,attrs:o}=Vn("input",Mt(e,"ui"),lo,Mt(e,"class")),{size:s,rounded:a}=Rg({ui:r,props:e}),{emitFormBlur:u,emitFormInput:f,size:c,color:d,inputId:g,name:p}=Al(e,lo),v=N(()=>s.value||c.value),y=ne(jc({},e.modelModifiers,{trim:!1,lazy:!1,number:!1})),k=ne(null),_=()=>{var le;e.autofocus&&((le=k.value)==null||le.focus())},x=le=>{y.value.trim&&(le=le.trim()),(y.value.number||e.type==="number")&&(le=kx(le)),t("update:modelValue",le),f()},E=le=>{y.value.lazy||x(le.target.value)},w=le=>{if(e.type==="file"){const xe=le.target.files;t("change",xe)}else{const xe=le.target.value;t("change",xe),y.value.lazy&&x(xe),y.value.trim&&(le.target.value=xe.trim())}},T=le=>{u(),t("blur",le)};ut(()=>{setTimeout(()=>{_()},e.autofocusDelay)});const O=N(()=>{var xe,se;const le=((se=(xe=r.value.color)==null?void 0:xe[d.value])==null?void 0:se[e.variant])||r.value.variant[e.variant];return er(gt(r.value.base,r.value.form,a.value,r.value.placeholder,e.type==="file"&&[r.value.file.base,r.value.file.padding[v.value]],r.value.size[v.value],e.padded?r.value.padding[v.value]:"p-0",le==null?void 0:le.replaceAll("{color}",d.value),(M.value||n.leading)&&r.value.leading.padding[v.value],(F.value||n.trailing)&&r.value.trailing.padding[v.value]),e.inputClass)}),M=N(()=>e.icon&&e.leading||e.icon&&!e.trailing||e.loading&&!e.trailing||e.leadingIcon),F=N(()=>e.icon&&e.trailing||e.loading&&e.trailing||e.trailingIcon),z=N(()=>e.loading?e.loadingIcon:e.leadingIcon||e.icon),U=N(()=>e.loading&&!M.value?e.loadingIcon:e.trailingIcon||e.icon),B=N(()=>gt(r.value.icon.leading.wrapper,r.value.icon.leading.pointer,r.value.icon.leading.padding[v.value])),q=N(()=>gt(r.value.icon.base,d.value&&Ge.ui.colors.includes(d.value)&&r.value.icon.color.replaceAll("{color}",d.value),r.value.icon.size[v.value],e.loading&&r.value.icon.loading)),G=N(()=>gt(r.value.icon.trailing.wrapper,r.value.icon.trailing.pointer,r.value.icon.trailing.padding[v.value])),me=N(()=>gt(r.value.icon.base,d.value&&Ge.ui.colors.includes(d.value)&&r.value.icon.color.replaceAll("{color}",d.value),r.value.icon.size[v.value],e.loading&&!M.value&&r.value.icon.loading));return{ui:r,attrs:o,name:p,inputId:g,input:k,isLeading:M,isTrailing:F,inputClass:O,leadingIconName:z,leadingIconClass:q,leadingWrapperIconClass:B,trailingIconName:U,trailingIconClass:me,trailingWrapperIconClass:G,onInput:E,onChange:w,onBlur:T}}}),jD=["id","name","value","type","required","placeholder","disabled"];function WD(e,t,n,r,o,s){const a=_r;return H(),J("div",{class:ae(e.ui.wrapper)},[R("input",lt({id:e.inputId,ref:"input",name:e.name,value:e.modelValue,type:e.type,required:e.required,placeholder:e.placeholder,disabled:e.disabled,class:e.inputClass},e.attrs,{onInput:t[0]||(t[0]=(...u)=>e.onInput&&e.onInput(...u)),onBlur:t[1]||(t[1]=(...u)=>e.onBlur&&e.onBlur(...u)),onChange:t[2]||(t[2]=(...u)=>e.onChange&&e.onChange(...u))}),null,16,jD),at(e.$slots,"default"),e.isLeading&&e.leadingIconName||e.$slots.leading?(H(),J("span",{key:0,class:ae(e.leadingWrapperIconClass)},[at(e.$slots,"leading",{disabled:e.disabled,loading:e.loading},()=>[L(a,{name:e.leadingIconName,class:ae(e.leadingIconClass)},null,8,["name","class"])])],2)):Ie("",!0),e.isTrailing&&e.trailingIconName||e.$slots.trailing?(H(),J("span",{key:1,class:ae(e.trailingWrapperIconClass)},[at(e.$slots,"trailing",{disabled:e.disabled,loading:e.loading},()=>[L(a,{name:e.trailingIconName,class:ae(e.trailingIconClass)},null,8,["name","class"])])],2)):Ie("",!0)],2)}const Qs=qt(HD,[["render",WD]]),eh=An(Ge.ui.strategy,Ge.ui.formGroup,uM),KD=_e({inheritAttrs:!1,props:{name:{type:String,default:null},size:{type:String,default:null,validator(e){return Object.keys(eh.size).includes(e)}},label:{type:String,default:null},description:{type:String,default:null},required:{type:Boolean,default:!1},help:{type:String,default:null},error:{type:[String,Boolean],default:null},hint:{type:String,default:null},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})},eagerValidation:{type:Boolean,default:!1}},setup(e){const{ui:t,attrs:n}=Vn("formGroup",Mt(e,"ui"),eh,Mt(e,"class")),r=qe("form-errors",null),o=N(()=>{var u,f;return e.error&&typeof e.error=="string"||typeof e.error=="boolean"?e.error:(f=(u=r==null?void 0:r.value)==null?void 0:u.find(c=>c.path===e.name))==null?void 0:f.message}),s=N(()=>t.value.size[e.size??eh.default.size]),a=ne(Ys("$K7dDJpdOWE"));return wt("form-group",{error:o,inputId:a,name:N(()=>e.name),size:N(()=>e.size),eagerValidation:N(()=>e.eagerValidation)}),{ui:t,attrs:n,inputId:a,size:s,error:o}}}),qD=["for"];function GD(e,t,n,r,o,s){return H(),J("div",lt({class:e.ui.wrapper},e.attrs),[R("div",{class:ae(e.ui.inner)},[e.label||e.$slots.label?(H(),J("div",{key:0,class:ae([e.ui.label.wrapper,e.size])},[R("label",{for:e.inputId,class:ae([e.ui.label.base,e.required?e.ui.label.required:""])},[e.$slots.label?at(e.$slots,"label",Ur(lt({key:0},{error:e.error,label:e.label,name:e.name,hint:e.hint,description:e.description,help:e.help}))):(H(),J(Xe,{key:1},[de(tt(e.label),1)],64))],10,qD),e.hint||e.$slots.hint?(H(),J("span",{key:0,class:ae([e.ui.hint])},[e.$slots.hint?at(e.$slots,"hint",Ur(lt({key:0},{error:e.error,label:e.label,name:e.name,hint:e.hint,description:e.description,help:e.help}))):(H(),J(Xe,{key:1},[de(tt(e.hint),1)],64))],2)):Ie("",!0)],2)):Ie("",!0),e.description||e.$slots.description?(H(),J("p",{key:1,class:ae([e.ui.description,e.size])},[e.$slots.description?at(e.$slots,"description",Ur(lt({key:0},{error:e.error,label:e.label,name:e.name,hint:e.hint,description:e.description,help:e.help}))):(H(),J(Xe,{key:1},[de(tt(e.description),1)],64))],2)):Ie("",!0)],2),R("div",{class:ae([e.label?e.ui.container:""])},[at(e.$slots,"default",Ur(zs({error:e.error}))),typeof e.error=="string"&&e.error||e.$slots.error?(H(),J("p",{key:0,class:ae([e.ui.error,e.size])},[e.$slots.error?at(e.$slots,"error",Ur(lt({key:0},{error:e.error,label:e.label,name:e.name,hint:e.hint,description:e.description,help:e.help}))):(H(),J(Xe,{key:1},[de(tt(e.error),1)],64))],2)):e.help||e.$slots.help?(H(),J("p",{key:1,class:ae([e.ui.help,e.size])},[e.$slots.help?at(e.$slots,"help",Ur(lt({key:0},{error:e.error,label:e.label,name:e.name,hint:e.hint,description:e.description,help:e.help}))):(H(),J(Xe,{key:1},[de(tt(e.help),1)],64))],2)):Ie("",!0)],2)],16)}const Xi=qt(KD,[["render",GD]]),ZD={class:"w-full flex justify-between items-center"},JD={class:"relative flex justify-start bg-inherit z-10"},YD=["textContent"],XD=R("div",{class:"w-full border-t-2 border-dashed border-gray-300 dark:border-gray-600"},null,-1),n2=_e({__name:"Divider",props:{title:{type:String,required:!0}},setup(e){return(t,n)=>(H(),J("div",ZD,[R("div",JD,[R("span",{class:"pr-3 text-lg font-bold text-gray-900 dark:text-gray-100 whitespace-nowrap",textContent:tt(e.title)},null,8,YD)]),XD]))}});function r2(e,t,n){let r=ne(n==null?void 0:n.value),o=N(()=>e.value!==void 0);return[N(()=>o.value?e.value:r.value),function(s){return o.value||(r.value=s),t==null?void 0:t(s)}]}let o2=Symbol("headlessui.useid"),QD=0;function yr(){return qe(o2,()=>`${++QD}`)()}function Lg(e){wt(o2,e)}function De(e){var t;if(e==null||e.value==null)return null;let n=(t=e.value.$el)!=null?t:e.value;return n instanceof Node?n:null}function tr(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,tr),r}var eB=Object.defineProperty,tB=(e,t,n)=>t in e?eB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xb=(e,t,n)=>(tB(e,typeof t!="symbol"?t+"":t,n),n);let nB=class{constructor(){Xb(this,"current",this.detect()),Xb(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},Il=new nB;function Ar(e){if(Il.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=De(e);if(t)return t.ownerDocument}return document}let kp=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Dn=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Dn||{}),Ac=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Ac||{}),rB=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(rB||{});function i2(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(kp)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Og=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Og||{});function Pg(e,t=0){var n;return e===((n=Ar(e))==null?void 0:n.body)?!1:tr(t,{0(){return e.matches(kp)},1(){let r=e;for(;r!==null;){if(r.matches(kp))return!0;r=r.parentElement}return!1}})}function s2(e){let t=Ar(e);hn(()=>{t&&!Pg(t.activeElement,0)&&Xo(e)})}var oB=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(oB||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Xo(e){e==null||e.focus({preventScroll:!0})}let iB=["textarea","input"].join(",");function sB(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,iB))!=null?n:!1}function Mg(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),s=t(r);if(o===null||s===null)return 0;let a=o.compareDocumentPosition(s);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function aB(e,t){return Ui(i2(),t,{relativeTo:e})}function Ui(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){var s;let a=(s=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)!=null?s:document,u=Array.isArray(e)?n?Mg(e):e:i2(e);o.length>0&&u.length>1&&(u=u.filter(y=>!o.includes(y))),r=r??a.activeElement;let f=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,u.indexOf(r))-1;if(t&4)return Math.max(0,u.indexOf(r))+1;if(t&8)return u.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=t&32?{preventScroll:!0}:{},g=0,p=u.length,v;do{if(g>=p||g+p<=0)return 0;let y=c+g;if(t&16)y=(y+p)%p;else{if(y<0)return 3;if(y>=p)return 1}v=u[y],v==null||v.focus(d),g+=f}while(v!==a.activeElement);return t&6&&sB(v)&&v.select(),2}function a2(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function lB(){return/Android/gi.test(window.navigator.userAgent)}function uB(){return a2()||lB()}function Hu(e,t,n){Il.isServer||on(r=>{document.addEventListener(e,t,n),r(()=>document.removeEventListener(e,t,n))})}function l2(e,t,n){Il.isServer||on(r=>{window.addEventListener(e,t,n),r(()=>window.removeEventListener(e,t,n))})}function u2(e,t,n=N(()=>!0)){function r(s,a){if(!n.value||s.defaultPrevented)return;let u=a(s);if(u===null||!u.getRootNode().contains(u))return;let f=function c(d){return typeof d=="function"?c(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(let c of f){if(c===null)continue;let d=c instanceof HTMLElement?c:De(c);if(d!=null&&d.contains(u)||s.composed&&s.composedPath().includes(d))return}return!Pg(u,Og.Loose)&&u.tabIndex!==-1&&s.preventDefault(),t(s,u)}let o=ne(null);Hu("pointerdown",s=>{var a,u;n.value&&(o.value=((u=(a=s.composedPath)==null?void 0:a.call(s))==null?void 0:u[0])||s.target)},!0),Hu("mousedown",s=>{var a,u;n.value&&(o.value=((u=(a=s.composedPath)==null?void 0:a.call(s))==null?void 0:u[0])||s.target)},!0),Hu("click",s=>{uB()||o.value&&(r(s,()=>o.value),o.value=null)},!0),Hu("touchend",s=>r(s,()=>s.target instanceof HTMLElement?s.target:null),!0),l2("blur",s=>r(s,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Qb(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function Dg(e,t){let n=ne(Qb(e.value.type,e.value.as));return ut(()=>{n.value=Qb(e.value.type,e.value.as)}),on(()=>{var r;n.value||De(t)&&De(t)instanceof HTMLButtonElement&&!((r=De(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}function e_(e){return[e.screenX,e.screenY]}function cB(){let e=ne([-1,-1]);return{wasMoved(t){let n=e_(t);return e.value[0]===n[0]&&e.value[1]===n[1]?!1:(e.value=n,!0)},update(t){e.value=e_(t)}}}function c2({container:e,accept:t,walk:n,enabled:r}){on(()=>{let o=e.value;if(!o||r!==void 0&&!r.value)return;let s=Ar(e);if(!s)return;let a=Object.assign(f=>t(f),{acceptNode:t}),u=s.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,a,!1);for(;u.nextNode();)n(u.currentNode)})}var ni=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(ni||{}),Ko=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Ko||{});function Jt({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...o}){var s;let a=d2(r,n),u=Object.assign(o,{props:a});if(e||t&2&&a.static)return th(u);if(t&1){let f=(s=a.unmount)==null||s?0:1;return tr(f,{0(){return null},1(){return th({...o,props:{...a,hidden:!0,style:{display:"none"}}})}})}return th(u)}function th({props:e,attrs:t,slots:n,slot:r,name:o}){var s,a;let{as:u,...f}=Yc(e,["unmount","static"]),c=(s=n.default)==null?void 0:s.call(n,r),d={};if(r){let g=!1,p=[];for(let[v,y]of Object.entries(r))typeof y=="boolean"&&(g=!0),y===!0&&p.push(v);g&&(d["data-headlessui-state"]=p.join(" "))}if(u==="template"){if(c=f2(c??[]),Object.keys(f).length>0||Object.keys(t).length>0){let[g,...p]=c??[];if(!fB(g)||p.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${o} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(f).concat(Object.keys(t)).map(k=>k.trim()).filter((k,_,x)=>x.indexOf(k)===_).sort((k,_)=>k.localeCompare(_)).map(k=>` - ${k}`).join(` +`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(k=>` - ${k}`).join(` +`)].join(` +`));let v=d2((a=g.props)!=null?a:{},f,d),y=vr(g,v,!0);for(let k in v)k.startsWith("on")&&(y.props||(y.props={}),y.props[k]=v[k]);return y}return Array.isArray(c)&&c.length===1?c[0]:c}return Ye(u,Object.assign({},f,d),{default:()=>c})}function f2(e){return e.flatMap(t=>t.type===Xe?f2(t.children):[t])}function d2(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](o,...s){let a=n[r];for(let u of a){if(o instanceof Event&&o.defaultPrevented)return;u(o,...s)}}});return t}function h2(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Yc(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function fB(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var js=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(js||{});let sl=_e({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{var r;let{features:o,...s}=e,a={"aria-hidden":(o&2)===2?!0:(r=s["aria-hidden"])!=null?r:void 0,hidden:(o&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(o&4)===4&&(o&2)!==2&&{display:"none"}}};return Jt({ourProps:a,theirProps:s,slot:{},attrs:n,slots:t,name:"Hidden"})}}}),p2=Symbol("Context");var Wt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Wt||{});function dB(){return Rl()!==null}function Rl(){return qe(p2,null)}function Bg(e){wt(p2,e)}var pt=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(pt||{});function hB(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Ai=[];hB(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Ai[0]!==t.target&&(Ai.unshift(t.target),Ai=Ai.filter(n=>n!=null&&n.isConnected),Ai.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function pB(e){throw new Error("Unexpected object: "+e)}var Xn=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Xn||{});function gB(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let s=0;s=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 2:{for(let s=o+1;s=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 4:{for(let s=0;ssetTimeout(()=>{throw t}))}function Ll(){let e=[],t={addEventListener(n,r,o,s){return n.addEventListener(r,o,s),t.add(()=>n.removeEventListener(r,o,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...n)})},setTimeout(...n){let r=setTimeout(...n);t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Fg(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=Ll();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function g2(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))v2(n,m2(t,r),o);return n}function m2(e,t){return e?e+"["+t+"]":t}function v2(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())v2(e,m2(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):g2(n,t,e)}function y2(e){var t,n;let r=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(r){for(let o of r.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(n=r.requestSubmit)==null||n.call(r)}}function b2(e,t,n,r){Il.isServer||on(o=>{e=e??window,e.addEventListener(t,n,r),o(()=>e.removeEventListener(t,n,r))})}var Oa=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Oa||{});function mB(){let e=ne(0);return l2("keydown",t=>{t.key==="Tab"&&(e.value=t.shiftKey?1:0)}),e}function _2(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.value){let r=De(n);r instanceof HTMLElement&&t.add(r)}return t}var w2=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(w2||{});let Ca=Object.assign(_e({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:ne(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){let o=ne(null);r({el:o,$el:o});let s=N(()=>Ar(o)),a=ne(!1);ut(()=>a.value=!0),Kt(()=>a.value=!1),yB({ownerDocument:s},N(()=>a.value&&!!(e.features&16)));let u=bB({ownerDocument:s,container:o,initialFocus:N(()=>e.initialFocus)},N(()=>a.value&&!!(e.features&2)));_B({ownerDocument:s,container:o,containers:e.containers,previousActiveElement:u},N(()=>a.value&&!!(e.features&8)));let f=mB();function c(v){let y=De(o);y&&(k=>k())(()=>{tr(f.value,{[Oa.Forwards]:()=>{Ui(y,Dn.First,{skipElements:[v.relatedTarget]})},[Oa.Backwards]:()=>{Ui(y,Dn.Last,{skipElements:[v.relatedTarget]})}})})}let d=ne(!1);function g(v){v.key==="Tab"&&(d.value=!0,requestAnimationFrame(()=>{d.value=!1}))}function p(v){if(!a.value)return;let y=_2(e.containers);De(o)instanceof HTMLElement&&y.add(De(o));let k=v.relatedTarget;k instanceof HTMLElement&&k.dataset.headlessuiFocusGuard!=="true"&&(x2(y,k)||(d.value?Ui(De(o),tr(f.value,{[Oa.Forwards]:()=>Dn.Next,[Oa.Backwards]:()=>Dn.Previous})|Dn.WrapAround,{relativeTo:v.target}):v.target instanceof HTMLElement&&Xo(v.target)))}return()=>{let v={},y={ref:o,onKeydown:g,onFocusout:p},{features:k,initialFocus:_,containers:x,...E}=e;return Ye(Xe,[!!(k&4)&&Ye(sl,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:c,features:js.Focusable}),Jt({ourProps:y,theirProps:{...t,...E},slot:v,attrs:t,slots:n,name:"FocusTrap"}),!!(k&4)&&Ye(sl,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:c,features:js.Focusable})])}}}),{features:w2});function vB(e){let t=ne(Ai.slice());return vt([e],([n],[r])=>{r===!0&&n===!1?Fg(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=Ai.slice())},{flush:"post"}),()=>{var n;return(n=t.value.find(r=>r!=null&&r.isConnected))!=null?n:null}}function yB({ownerDocument:e},t){let n=vB(t);ut(()=>{on(()=>{var r,o;t.value||((r=e.value)==null?void 0:r.activeElement)===((o=e.value)==null?void 0:o.body)&&Xo(n())},{flush:"post"})}),Kt(()=>{t.value&&Xo(n())})}function bB({ownerDocument:e,container:t,initialFocus:n},r){let o=ne(null),s=ne(!1);return ut(()=>s.value=!0),Kt(()=>s.value=!1),ut(()=>{vt([t,n,r],(a,u)=>{if(a.every((c,d)=>(u==null?void 0:u[d])===c)||!r.value)return;let f=De(t);f&&Fg(()=>{var c,d;if(!s.value)return;let g=De(n),p=(c=e.value)==null?void 0:c.activeElement;if(g){if(g===p){o.value=p;return}}else if(f.contains(p)){o.value=p;return}g?Xo(g):Ui(f,Dn.First|Dn.NoScroll)===Ac.Error&&console.warn("There are no focusable elements inside the "),o.value=(d=e.value)==null?void 0:d.activeElement})},{immediate:!0,flush:"post"})}),o}function _B({ownerDocument:e,container:t,containers:n,previousActiveElement:r},o){var s;b2((s=e.value)==null?void 0:s.defaultView,"focus",a=>{if(!o.value)return;let u=_2(n);De(t)instanceof HTMLElement&&u.add(De(t));let f=r.value;if(!f)return;let c=a.target;c&&c instanceof HTMLElement?x2(u,c)?(r.value=c,Xo(c)):(a.preventDefault(),a.stopPropagation(),Xo(f)):Xo(r.value)},!0)}function x2(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function wB(e){let t=Gr(e.getSnapshot());return Kt(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function xB(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...s){let a=t[o].call(n,...s);a&&(n=a,r.forEach(u=>u()))}}}function kB(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,o=r.clientWidth-r.offsetWidth,s=e-o;n.style(r,"paddingRight",`${s}px`)}}}function SB(){return a2()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(s=>s()).some(s=>s.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let u=Ll();u.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>u.dispose()))}let s=(o=window.scrollY)!=null?o:window.pageYOffset,a=null;t.addEventListener(e,"click",u=>{if(u.target instanceof HTMLElement)try{let f=u.target.closest("a");if(!f)return;let{hash:c}=new URL(f.href),d=e.querySelector(c);d&&!r(d)&&(a=d)}catch{}},!0),t.addEventListener(e,"touchstart",u=>{if(u.target instanceof HTMLElement)if(r(u.target)){let f=u.target;for(;f.parentElement&&r(f.parentElement);)f=f.parentElement;t.style(f,"overscrollBehavior","contain")}else t.style(u.target,"touchAction","none")}),t.addEventListener(e,"touchmove",u=>{if(u.target instanceof HTMLElement)if(r(u.target)){let f=u.target;for(;f.parentElement&&f.dataset.headlessuiPortal!==""&&!(f.scrollHeight>f.clientHeight||f.scrollWidth>f.clientWidth);)f=f.parentElement;f.dataset.headlessuiPortal===""&&u.preventDefault()}else u.preventDefault()},{passive:!1}),t.add(()=>{var u;let f=(u=window.scrollY)!=null?u:window.pageYOffset;s!==f&&window.scrollTo(0,s),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)})})}}:{}}function EB(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function CB(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Ri=xB(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Ll(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:CB(n)},o=[SB(),kB(),EB()];o.forEach(({before:s})=>s==null?void 0:s(r)),o.forEach(({after:s})=>s==null?void 0:s(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Ri.subscribe(()=>{let e=Ri.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&Ri.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Ri.dispatch("TEARDOWN",n)}});function TB(e,t,n){let r=wB(Ri),o=N(()=>{let s=e.value?r.value.get(e.value):void 0;return s?s.count>0:!1});return vt([e,t],([s,a],[u],f)=>{if(!s||!a)return;Ri.dispatch("PUSH",s,n);let c=!1;f(()=>{c||(Ri.dispatch("POP",u??s,n),c=!0)})},{immediate:!0}),o}let nh=new Map,Ta=new Map;function t_(e,t=ne(!0)){on(n=>{var r;if(!t.value)return;let o=De(e);if(!o)return;n(function(){var a;if(!o)return;let u=(a=Ta.get(o))!=null?a:1;if(u===1?Ta.delete(o):Ta.set(o,u-1),u!==1)return;let f=nh.get(o);f&&(f["aria-hidden"]===null?o.removeAttribute("aria-hidden"):o.setAttribute("aria-hidden",f["aria-hidden"]),o.inert=f.inert,nh.delete(o))});let s=(r=Ta.get(o))!=null?r:0;Ta.set(o,s+1),s===0&&(nh.set(o,{"aria-hidden":o.getAttribute("aria-hidden"),inert:o.inert}),o.setAttribute("aria-hidden","true"),o.inert=!0)})}function AB({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){let r=ne(null),o=Ar(r);function s(){var a,u,f;let c=[];for(let d of e)d!==null&&(d instanceof HTMLElement?c.push(d):"value"in d&&d.value instanceof HTMLElement&&c.push(d.value));if(t!=null&&t.value)for(let d of t.value)c.push(d);for(let d of(a=o==null?void 0:o.querySelectorAll("html > *, body > *"))!=null?a:[])d!==document.body&&d!==document.head&&d instanceof HTMLElement&&d.id!=="headlessui-portal-root"&&(d.contains(De(r))||d.contains((f=(u=De(r))==null?void 0:u.getRootNode())==null?void 0:f.host)||c.some(g=>d.contains(g))||c.push(d));return c}return{resolveContainers:s,contains(a){return s().some(u=>u.contains(a))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:Ye(sl,{features:js.Hidden,ref:r})}}}let k2=Symbol("ForcePortalRootContext");function $B(){return qe(k2,!1)}let n_=_e({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return wt(k2,e.force),()=>{let{force:r,...o}=e;return Jt({theirProps:o,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}}),S2=Symbol("StackContext");var Sp=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Sp||{});function IB(){return qe(S2,()=>{})}function RB({type:e,enabled:t,element:n,onUpdate:r}){let o=IB();function s(...a){r==null||r(...a),o(...a)}ut(()=>{vt(t,(a,u)=>{a?s(0,e,n):u===!0&&s(1,e,n)},{immediate:!0,flush:"sync"})}),Kt(()=>{t.value&&s(1,e,n)}),wt(S2,s)}let LB=Symbol("DescriptionContext");function Ng({slot:e=ne({}),name:t="Description",props:n={}}={}){let r=ne([]);function o(s){return r.value.push(s),()=>{let a=r.value.indexOf(s);a!==-1&&r.value.splice(a,1)}}return wt(LB,{register:o,slot:e,name:t,props:n}),N(()=>r.value.length>0?r.value.join(" "):void 0)}function OB(e){let t=Ar(e);if(!t){if(e===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`)}let n=t.getElementById("headlessui-portal-root");if(n)return n;let r=t.createElement("div");return r.setAttribute("id","headlessui-portal-root"),t.body.appendChild(r)}let PB=_e({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){let r=ne(null),o=N(()=>Ar(r)),s=$B(),a=qe(E2,null),u=ne(s===!0||a==null?OB(r.value):a.resolveTarget()),f=ne(!1);ut(()=>{f.value=!0}),on(()=>{s||a!=null&&(u.value=a.resolveTarget())});let c=qe(Ep,null),d=!1,g=nr();return vt(r,()=>{if(d||!c)return;let p=De(r);p&&(Kt(c.register(p),g),d=!0)}),Kt(()=>{var p,v;let y=(p=o.value)==null?void 0:p.getElementById("headlessui-portal-root");y&&u.value===y&&u.value.children.length<=0&&((v=u.value.parentElement)==null||v.removeChild(u.value))}),()=>{if(!f.value||u.value===null)return null;let p={ref:r,"data-headlessui-portal":""};return Ye(Q1,{to:u.value},Jt({ourProps:p,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}}),Ep=Symbol("PortalParentContext");function MB(){let e=qe(Ep,null),t=ne([]);function n(s){return t.value.push(s),e&&e.register(s),()=>r(s)}function r(s){let a=t.value.indexOf(s);a!==-1&&t.value.splice(a,1),e&&e.unregister(s)}let o={register:n,unregister:r,portals:t};return[t,_e({name:"PortalWrapper",setup(s,{slots:a}){return wt(Ep,o),()=>{var u;return(u=a.default)==null?void 0:u.call(a)}}})]}let E2=Symbol("PortalGroupContext"),DB=_e({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){let r=Tn({resolveTarget(){return e.target}});return wt(E2,r),()=>{let{target:o,...s}=e;return Jt({theirProps:s,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}});var BB=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(BB||{});let Cp=Symbol("DialogContext");function C2(e){let t=qe(Cp,null);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,C2),n}return t}let ju="DC8F892D-2EBD-447C-A4C8-A03058436FF4",T2=_e({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:ju},initialFocus:{type:Object,default:null},id:{type:String,default:null},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:o}){var s,a;let u=(s=e.id)!=null?s:`headlessui-dialog-${yr()}`,f=ne(!1);ut(()=>{f.value=!0});let c=!1,d=N(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(c||(c=!0,console.warn(`Invalid role [${d}] passed to . Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),g=ne(0),p=Rl(),v=N(()=>e.open===ju&&p!==null?(p.value&Wt.Open)===Wt.Open:e.open),y=ne(null),k=N(()=>Ar(y));if(o({el:y,$el:y}),!(e.open!==ju||p!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof v.value!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${v.value===ju?void 0:e.open}`);let _=N(()=>f.value&&v.value?0:1),x=N(()=>_.value===0),E=N(()=>g.value>1),w=qe(Cp,null)!==null,[T,O]=MB(),{resolveContainers:M,mainTreeNodeRef:F,MainTreeNode:z}=AB({portals:T,defaultContainers:[N(()=>{var Re;return(Re=Se.panelRef.value)!=null?Re:y.value})]}),U=N(()=>E.value?"parent":"leaf"),B=N(()=>p!==null?(p.value&Wt.Closing)===Wt.Closing:!1),q=N(()=>w||B.value?!1:x.value),G=N(()=>{var Re,ze,Ut;return(Ut=Array.from((ze=(Re=k.value)==null?void 0:Re.querySelectorAll("body > *"))!=null?ze:[]).find(zt=>zt.id==="headlessui-portal-root"?!1:zt.contains(De(F))&&zt instanceof HTMLElement))!=null?Ut:null});t_(G,q);let me=N(()=>E.value?!0:x.value),le=N(()=>{var Re,ze,Ut;return(Ut=Array.from((ze=(Re=k.value)==null?void 0:Re.querySelectorAll("[data-headlessui-portal]"))!=null?ze:[]).find(zt=>zt.contains(De(F))&&zt instanceof HTMLElement))!=null?Ut:null});t_(le,me),RB({type:"Dialog",enabled:N(()=>_.value===0),element:y,onUpdate:(Re,ze)=>{if(ze==="Dialog")return tr(Re,{[Sp.Add]:()=>g.value+=1,[Sp.Remove]:()=>g.value-=1})}});let xe=Ng({name:"DialogDescription",slot:N(()=>({open:v.value}))}),se=ne(null),Se={titleId:se,panelRef:ne(null),dialogState:_,setTitleId(Re){se.value!==Re&&(se.value=Re)},close(){t("close",!1)}};wt(Cp,Se);let ye=N(()=>!(!x.value||E.value));u2(M,(Re,ze)=>{Re.preventDefault(),Se.close(),hn(()=>ze==null?void 0:ze.focus())},ye);let Bt=N(()=>!(E.value||_.value!==0));b2((a=k.value)==null?void 0:a.defaultView,"keydown",Re=>{Bt.value&&(Re.defaultPrevented||Re.key===pt.Escape&&(Re.preventDefault(),Re.stopPropagation(),Se.close()))});let Yt=N(()=>!(B.value||_.value!==0||w));return TB(k,Yt,Re=>{var ze;return{containers:[...(ze=Re.containers)!=null?ze:[],M]}}),on(Re=>{if(_.value!==0)return;let ze=De(y);if(!ze)return;let Ut=new ResizeObserver(zt=>{for(let yn of zt){let Et=yn.target.getBoundingClientRect();Et.x===0&&Et.y===0&&Et.width===0&&Et.height===0&&Se.close()}});Ut.observe(ze),Re(()=>Ut.disconnect())}),()=>{let{open:Re,initialFocus:ze,...Ut}=e,zt={...n,ref:y,id:u,role:d.value,"aria-modal":_.value===0?!0:void 0,"aria-labelledby":se.value,"aria-describedby":xe.value},yn={open:_.value===0};return Ye(n_,{force:!0},()=>[Ye(PB,()=>Ye(DB,{target:y.value},()=>Ye(n_,{force:!1},()=>Ye(Ca,{initialFocus:ze,containers:M,features:x.value?tr(U.value,{parent:Ca.features.RestoreFocus,leaf:Ca.features.All&~Ca.features.FocusLock}):Ca.features.None},()=>Ye(O,{},()=>Jt({ourProps:zt,theirProps:{...Ut,...n},slot:yn,attrs:n,slots:r,visible:_.value===0,features:ni.RenderStrategy|ni.Static,name:"Dialog"})))))),Ye(z)])}}}),A2=_e({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:r}){var o;let s=(o=e.id)!=null?o:`headlessui-dialog-panel-${yr()}`,a=C2("DialogPanel");r({el:a.panelRef,$el:a.panelRef});function u(f){f.stopPropagation()}return()=>{let{...f}=e,c={id:s,ref:a.panelRef,onClick:u};return Jt({ourProps:c,theirProps:f,slot:{open:a.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}});var FB=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(FB||{});let $2=Symbol("DisclosureContext");function Ug(e){let t=qe($2,null);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ug),n}return t}let I2=Symbol("DisclosurePanelContext");function NB(){return qe(I2,null)}let UB=_e({name:"Disclosure",props:{as:{type:[Object,String],default:"template"},defaultOpen:{type:[Boolean],default:!1}},setup(e,{slots:t,attrs:n}){let r=ne(e.defaultOpen?0:1),o=ne(null),s=ne(null),a={buttonId:ne(`headlessui-disclosure-button-${yr()}`),panelId:ne(`headlessui-disclosure-panel-${yr()}`),disclosureState:r,panel:o,button:s,toggleDisclosure(){r.value=tr(r.value,{0:1,1:0})},closeDisclosure(){r.value!==1&&(r.value=1)},close(u){a.closeDisclosure();let f=u?u instanceof HTMLElement?u:u.value instanceof HTMLElement?De(u):De(a.button):De(a.button);f==null||f.focus()}};return wt($2,a),Bg(N(()=>tr(r.value,{0:Wt.Open,1:Wt.Closed}))),()=>{let{defaultOpen:u,...f}=e,c={open:r.value===0,close:a.close};return Jt({theirProps:f,ourProps:{},slot:c,slots:t,attrs:n,name:"Disclosure"})}}}),zB=_e({name:"DisclosureButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:r}){let o=Ug("DisclosureButton"),s=NB(),a=N(()=>s===null?!1:s.value===o.panelId.value);ut(()=>{a.value||e.id!==null&&(o.buttonId.value=e.id)}),Kt(()=>{a.value||(o.buttonId.value=null)});let u=ne(null);r({el:u,$el:u}),a.value||on(()=>{o.button.value=u.value});let f=Dg(N(()=>({as:e.as,type:t.type})),u);function c(){var p;e.disabled||(a.value?(o.toggleDisclosure(),(p=De(o.button))==null||p.focus()):o.toggleDisclosure())}function d(p){var v;if(!e.disabled)if(a.value)switch(p.key){case pt.Space:case pt.Enter:p.preventDefault(),p.stopPropagation(),o.toggleDisclosure(),(v=De(o.button))==null||v.focus();break}else switch(p.key){case pt.Space:case pt.Enter:p.preventDefault(),p.stopPropagation(),o.toggleDisclosure();break}}function g(p){switch(p.key){case pt.Space:p.preventDefault();break}}return()=>{var p;let v={open:o.disclosureState.value===0},{id:y,...k}=e,_=a.value?{ref:u,type:f.value,onClick:c,onKeydown:d}:{id:(p=o.buttonId.value)!=null?p:y,ref:u,type:f.value,"aria-expanded":o.disclosureState.value===0,"aria-controls":o.disclosureState.value===0||De(o.panel)?o.panelId.value:void 0,disabled:e.disabled?!0:void 0,onClick:c,onKeydown:d,onKeyup:g};return Jt({ourProps:_,theirProps:k,slot:v,attrs:t,slots:n,name:"DisclosureButton"})}}}),VB=_e({name:"DisclosurePanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:r}){let o=Ug("DisclosurePanel");ut(()=>{e.id!==null&&(o.panelId.value=e.id)}),Kt(()=>{o.panelId.value=null}),r({el:o.panel,$el:o.panel}),wt(I2,o.panelId);let s=Rl(),a=N(()=>s!==null?(s.value&Wt.Open)===Wt.Open:o.disclosureState.value===0);return()=>{var u;let f={open:o.disclosureState.value===0,close:o.close},{id:c,...d}=e,g={id:(u=o.panelId.value)!=null?u:c,ref:o.panel};return Jt({ourProps:g,theirProps:d,slot:f,attrs:t,slots:n,features:ni.RenderStrategy|ni.Static,visible:a.value,name:"DisclosurePanel"})}}}),r_=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function o_(e){var t,n;let r=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return r;let s=!1;for(let u of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))u.remove(),s=!0;let a=s?(n=o.innerText)!=null?n:"":r;return r_.test(a)&&(a=a.replace(r_,"")),a}function HB(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(o=>{let s=document.getElementById(o);if(s){let a=s.getAttribute("aria-label");return typeof a=="string"?a.trim():o_(s).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return o_(e).trim()}function jB(e){let t=ne(""),n=ne("");return()=>{let r=De(e);if(!r)return"";let o=r.innerText;if(t.value===o)return n.value;let s=HB(r).trim().toLowerCase();return t.value=o,n.value=s,s}}var WB=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(WB||{}),KB=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(KB||{});function qB(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let R2=Symbol("MenuContext");function Xc(e){let t=qe(R2,null);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Xc),n}return t}let GB=_e({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(e,{slots:t,attrs:n}){let r=ne(1),o=ne(null),s=ne(null),a=ne([]),u=ne(""),f=ne(null),c=ne(1);function d(p=v=>v){let v=f.value!==null?a.value[f.value]:null,y=Mg(p(a.value.slice()),_=>De(_.dataRef.domRef)),k=v?y.indexOf(v):null;return k===-1&&(k=null),{items:y,activeItemIndex:k}}let g={menuState:r,buttonRef:o,itemsRef:s,items:a,searchQuery:u,activeItemIndex:f,activationTrigger:c,closeMenu:()=>{r.value=1,f.value=null},openMenu:()=>r.value=0,goToItem(p,v,y){let k=d(),_=gB(p===Xn.Specific?{focus:Xn.Specific,id:v}:{focus:p},{resolveItems:()=>k.items,resolveActiveIndex:()=>k.activeItemIndex,resolveId:x=>x.id,resolveDisabled:x=>x.dataRef.disabled});u.value="",f.value=_,c.value=y??1,a.value=k.items},search(p){let v=u.value!==""?0:1;u.value+=p.toLowerCase();let y=(f.value!==null?a.value.slice(f.value+v).concat(a.value.slice(0,f.value+v)):a.value).find(_=>_.dataRef.textValue.startsWith(u.value)&&!_.dataRef.disabled),k=y?a.value.indexOf(y):-1;k===-1||k===f.value||(f.value=k,c.value=1)},clearSearch(){u.value=""},registerItem(p,v){let y=d(k=>[...k,{id:p,dataRef:v}]);a.value=y.items,f.value=y.activeItemIndex,c.value=1},unregisterItem(p){let v=d(y=>{let k=y.findIndex(_=>_.id===p);return k!==-1&&y.splice(k,1),y});a.value=v.items,f.value=v.activeItemIndex,c.value=1}};return u2([o,s],(p,v)=>{var y;g.closeMenu(),Pg(v,Og.Loose)||(p.preventDefault(),(y=De(o))==null||y.focus())},N(()=>r.value===0)),wt(R2,g),Bg(N(()=>tr(r.value,{0:Wt.Open,1:Wt.Closed}))),()=>{let p={open:r.value===0,close:g.closeMenu};return Jt({ourProps:{},theirProps:e,slot:p,slots:t,attrs:n,name:"Menu"})}}}),ZB=_e({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:r}){var o;let s=(o=e.id)!=null?o:`headlessui-menu-button-${yr()}`,a=Xc("MenuButton");r({el:a.buttonRef,$el:a.buttonRef});function u(g){switch(g.key){case pt.Space:case pt.Enter:case pt.ArrowDown:g.preventDefault(),g.stopPropagation(),a.openMenu(),hn(()=>{var p;(p=De(a.itemsRef))==null||p.focus({preventScroll:!0}),a.goToItem(Xn.First)});break;case pt.ArrowUp:g.preventDefault(),g.stopPropagation(),a.openMenu(),hn(()=>{var p;(p=De(a.itemsRef))==null||p.focus({preventScroll:!0}),a.goToItem(Xn.Last)});break}}function f(g){switch(g.key){case pt.Space:g.preventDefault();break}}function c(g){e.disabled||(a.menuState.value===0?(a.closeMenu(),hn(()=>{var p;return(p=De(a.buttonRef))==null?void 0:p.focus({preventScroll:!0})})):(g.preventDefault(),a.openMenu(),qB(()=>{var p;return(p=De(a.itemsRef))==null?void 0:p.focus({preventScroll:!0})})))}let d=Dg(N(()=>({as:e.as,type:t.type})),a.buttonRef);return()=>{var g;let p={open:a.menuState.value===0},{...v}=e,y={ref:a.buttonRef,id:s,type:d.value,"aria-haspopup":"menu","aria-controls":(g=De(a.itemsRef))==null?void 0:g.id,"aria-expanded":a.menuState.value===0,onKeydown:u,onKeyup:f,onClick:c};return Jt({ourProps:y,theirProps:v,slot:p,attrs:t,slots:n,name:"MenuButton"})}}}),JB=_e({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:r}){var o;let s=(o=e.id)!=null?o:`headlessui-menu-items-${yr()}`,a=Xc("MenuItems"),u=ne(null);r({el:a.itemsRef,$el:a.itemsRef}),c2({container:N(()=>De(a.itemsRef)),enabled:N(()=>a.menuState.value===0),accept(p){return p.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:p.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(p){p.setAttribute("role","none")}});function f(p){var v;switch(u.value&&clearTimeout(u.value),p.key){case pt.Space:if(a.searchQuery.value!=="")return p.preventDefault(),p.stopPropagation(),a.search(p.key);case pt.Enter:if(p.preventDefault(),p.stopPropagation(),a.activeItemIndex.value!==null){let y=a.items.value[a.activeItemIndex.value];(v=De(y.dataRef.domRef))==null||v.click()}a.closeMenu(),s2(De(a.buttonRef));break;case pt.ArrowDown:return p.preventDefault(),p.stopPropagation(),a.goToItem(Xn.Next);case pt.ArrowUp:return p.preventDefault(),p.stopPropagation(),a.goToItem(Xn.Previous);case pt.Home:case pt.PageUp:return p.preventDefault(),p.stopPropagation(),a.goToItem(Xn.First);case pt.End:case pt.PageDown:return p.preventDefault(),p.stopPropagation(),a.goToItem(Xn.Last);case pt.Escape:p.preventDefault(),p.stopPropagation(),a.closeMenu(),hn(()=>{var y;return(y=De(a.buttonRef))==null?void 0:y.focus({preventScroll:!0})});break;case pt.Tab:p.preventDefault(),p.stopPropagation(),a.closeMenu(),hn(()=>aB(De(a.buttonRef),p.shiftKey?Dn.Previous:Dn.Next));break;default:p.key.length===1&&(a.search(p.key),u.value=setTimeout(()=>a.clearSearch(),350));break}}function c(p){switch(p.key){case pt.Space:p.preventDefault();break}}let d=Rl(),g=N(()=>d!==null?(d.value&Wt.Open)===Wt.Open:a.menuState.value===0);return()=>{var p,v;let y={open:a.menuState.value===0},{...k}=e,_={"aria-activedescendant":a.activeItemIndex.value===null||(p=a.items.value[a.activeItemIndex.value])==null?void 0:p.id,"aria-labelledby":(v=De(a.buttonRef))==null?void 0:v.id,id:s,onKeydown:f,onKeyup:c,role:"menu",tabIndex:0,ref:a.itemsRef};return Jt({ourProps:_,theirProps:k,slot:y,attrs:t,slots:n,features:ni.RenderStrategy|ni.Static,visible:g.value,name:"MenuItems"})}}}),Mr=_e({name:"MenuItem",inheritAttrs:!1,props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(e,{slots:t,attrs:n,expose:r}){var o;let s=(o=e.id)!=null?o:`headlessui-menu-item-${yr()}`,a=Xc("MenuItem"),u=ne(null);r({el:u,$el:u});let f=N(()=>a.activeItemIndex.value!==null?a.items.value[a.activeItemIndex.value].id===s:!1),c=jB(u),d=N(()=>({disabled:e.disabled,get textValue(){return c()},domRef:u}));ut(()=>a.registerItem(s,d)),Kt(()=>a.unregisterItem(s)),on(()=>{a.menuState.value===0&&f.value&&a.activationTrigger.value!==0&&hn(()=>{var x,E;return(E=(x=De(u))==null?void 0:x.scrollIntoView)==null?void 0:E.call(x,{block:"nearest"})})});function g(x){if(e.disabled)return x.preventDefault();a.closeMenu(),s2(De(a.buttonRef))}function p(){if(e.disabled)return a.goToItem(Xn.Nothing);a.goToItem(Xn.Specific,s)}let v=cB();function y(x){v.update(x)}function k(x){v.wasMoved(x)&&(e.disabled||f.value||a.goToItem(Xn.Specific,s,0))}function _(x){v.wasMoved(x)&&(e.disabled||f.value&&a.goToItem(Xn.Nothing))}return()=>{let{disabled:x,...E}=e,w={active:f.value,disabled:x,close:a.closeMenu};return Jt({ourProps:{id:s,ref:u,role:"menuitem",tabIndex:x===!0?void 0:-1,"aria-disabled":x===!0?!0:void 0,onClick:g,onFocus:p,onPointerenter:y,onMouseenter:y,onPointermove:k,onMousemove:k,onPointerleave:_,onMouseleave:_},theirProps:{...n,...E},slot:w,attrs:n,slots:t,name:"MenuItem"})}}}),L2=Symbol("LabelContext");function O2(){let e=qe(L2,null);if(e===null){let t=new Error("You used a